krb5 commit: Get getopt from unistd.h (not getopt.h) in tests

Greg Hudson ghudson at MIT.EDU
Fri Mar 28 15:56:53 EDT 2014


https://github.com/krb5/krb5/commit/613c62d689c31a325d51be88657dedd17af3cf81
commit 613c62d689c31a325d51be88657dedd17af3cf81
Author: Greg Hudson <ghudson at mit.edu>
Date:   Fri Mar 28 12:33:43 2014 -0400

    Get getopt from unistd.h (not getopt.h) in tests
    
    POSIX defines getopt to be declared in unistd.h, and HP-UX (as of
    version 11.31) does not appear to have getopt.h.  In test programs
    which currently include getopt.h and aren't currently built on
    Windows, include unistd.h or just assume we will get it via k5-int.h.
    
    ticket: 7894 (new)
    target_version: 1.12.2
    tags: pullup

 src/lib/krb5/krb/t_cc_config.c |    1 -
 src/lib/krb5/krb/t_in_ccache.c |    1 -
 src/tests/gssapi/t_enctypes.c  |    1 -
 src/tests/responder.c          |    2 +-
 4 files changed, 1 insertions(+), 4 deletions(-)

diff --git a/src/lib/krb5/krb/t_cc_config.c b/src/lib/krb5/krb/t_cc_config.c
index 156a5b5..51d1ef5 100644
--- a/src/lib/krb5/krb/t_cc_config.c
+++ b/src/lib/krb5/krb/t_cc_config.c
@@ -37,7 +37,6 @@
 
 #include <k5-int.h>
 #include "int-proto.h"
-#include <getopt.h>
 
 static void
 bail_on_err(krb5_context context, const char *msg, krb5_error_code code)
diff --git a/src/lib/krb5/krb/t_in_ccache.c b/src/lib/krb5/krb/t_in_ccache.c
index 30b7f28..0bb203f 100644
--- a/src/lib/krb5/krb/t_in_ccache.c
+++ b/src/lib/krb5/krb/t_in_ccache.c
@@ -36,7 +36,6 @@
  */
 
 #include "k5-int.h"
-#include <getopt.h>
 
 static void
 bail_on_err(krb5_context context, const char *msg, krb5_error_code code)
diff --git a/src/tests/gssapi/t_enctypes.c b/src/tests/gssapi/t_enctypes.c
index 79a732a..63ca79a 100644
--- a/src/tests/gssapi/t_enctypes.c
+++ b/src/tests/gssapi/t_enctypes.c
@@ -33,7 +33,6 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
-#include <getopt.h>
 #include "k5-int.h"
 #include "common.h"
 
diff --git a/src/tests/responder.c b/src/tests/responder.c
index 13623d8..d17fdae 100644
--- a/src/tests/responder.c
+++ b/src/tests/responder.c
@@ -56,7 +56,7 @@
  */
 
 #include <sys/types.h>
-#include <getopt.h>
+#include <unistd.h>
 #include <stdio.h>
 #include <string.h>
 #include <krb5.h>


More information about the cvs-krb5 mailing list