From: Harlan Stenn Date: Fri, 18 Aug 2006 07:33:56 +0000 (-0400) Subject: libopts upgrade X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=15b15b48ecc9638fbe707471046b240d6eccea55;p=thirdparty%2Fntp.git libopts upgrade bk: 44e56d64PftCERuwmdzZKtFw3Kc2Fg --- diff --git a/libopts/autoopts.h b/libopts/autoopts.h index d972fb526f..628b14cf3b 100644 --- a/libopts/autoopts.h +++ b/libopts/autoopts.h @@ -1,8 +1,8 @@ /* - * Time-stamp: "2006-07-15 13:52:50 bkorb" + * Time-stamp: "2006-08-12 10:26:19 bkorb" * - * autoopts.h $Id: autoopts.h,v 4.25 2006/07/15 22:10:21 bkorb Exp $ + * autoopts.h $Id: autoopts.h,v 4.14 2006/08/12 17:36:43 bkorb Exp $ * Time-stamp: "2005-02-14 05:59:50 bkorb" * * This file defines all the global structures and special values @@ -107,12 +107,20 @@ typedef int tDirection; * * USAGE: define procedures to return "tSuccess". Test their results * with the SUCCEEDED, FAILED and HADGLITCH macros. + * + * Microsoft sticks its nose into user space here, so for Windows' sake, + * make sure all of these are undefined. */ #undef SUCCESS -#define SUCCESS ((tSuccess) 0) #undef FAILURE -#define FAILURE ((tSuccess)-1) #undef PROBLEM +#undef SUCCEEDED +#undef SUCCESSFUL +#undef FAILED +#undef HADGLITCH + +#define SUCCESS ((tSuccess) 0) +#define FAILURE ((tSuccess)-1) #define PROBLEM ((tSuccess) 1) typedef int tSuccess; diff --git a/libopts/m4/libopts.m4 b/libopts/m4/libopts.m4 index 65b876e371..a044564edd 100644 --- a/libopts/m4/libopts.m4 +++ b/libopts/m4/libopts.m4 @@ -2,7 +2,7 @@ dnl -*- buffer-read-only: t -*- vi: set ro: dnl dnl DO NOT EDIT THIS FILE (libopts.m4) dnl -dnl It has been AutoGen-ed Thursday July 27, 2006 at 09:14:31 PM PDT +dnl It has been AutoGen-ed Saturday August 12, 2006 at 10:36:56 AM PDT dnl From the definitions libopts.def dnl and the template file conftest.tpl dnl @@ -25,7 +25,7 @@ AC_DEFUN([INVOKE_LIBOPTS_MACROS_FIRST],[ AC_CHECK_HEADERS(dlfcn.h errno.h fcntl.h libgen.h memory.h netinet/in.h \ setjmp.h sys/mman.h sys/param.h sys/poll.h sys/procset.h sys/select.h \ sys/socket.h sys/stropts.h sys/time.h sys/un.h sys/wait.h unistd.h \ - utime.h) + utime.h ) # -------------------------------------------- # Verify certain entries from AC_CHECK_HEADERS @@ -66,8 +66,8 @@ AC_DEFUN([INVOKE_LIBOPTS_MACROS_FIRST],[ # ...and int types headers # ======================== AC_CHECK_HEADERS(stdint.h inttypes.h, break) - AC_CHECK_TYPES([uint_t,int8_t, uint8_t, int16_t, uint16_t, int32_t, uint32_t, - intptr_t]) + AC_CHECK_TYPES([int8_t, uint8_t, int16_t, uint16_t, int32_t, uint32_t, + intptr_t, uint_t]) # ==================== # uintptr type & sizes diff --git a/libopts/usage.c b/libopts/usage.c index 73617bc189..18843cdd0f 100644 --- a/libopts/usage.c +++ b/libopts/usage.c @@ -1,6 +1,6 @@ /* - * usage.c $Id: usage.c,v 4.14 2006/07/01 21:57:23 bkorb Exp $ + * usage.c $Id: usage.c,v 4.10 2006/08/12 17:36:43 bkorb Exp $ * Time-stamp: "2006-07-01 12:41:02 bkorb" * * This module implements the default usage procedure for @@ -141,7 +141,7 @@ optionOnlyUsage( tOptions* pOpts, int ex_code ) { - tCC* pOptTitle; + tCC* pOptTitle = NULL; /* * Determine which header and which option formatting strings to use @@ -188,7 +188,7 @@ optionUsage( fprintf( option_usage_fp, pOptions->pzUsageTitle, pOptions->pzProgName ); { - tCC* pOptTitle; + tCC* pOptTitle = NULL; /* * Determine which header and which option formatting strings to use diff --git a/sntp/libopts/autoopts.h b/sntp/libopts/autoopts.h index d972fb526f..628b14cf3b 100644 --- a/sntp/libopts/autoopts.h +++ b/sntp/libopts/autoopts.h @@ -1,8 +1,8 @@ /* - * Time-stamp: "2006-07-15 13:52:50 bkorb" + * Time-stamp: "2006-08-12 10:26:19 bkorb" * - * autoopts.h $Id: autoopts.h,v 4.25 2006/07/15 22:10:21 bkorb Exp $ + * autoopts.h $Id: autoopts.h,v 4.14 2006/08/12 17:36:43 bkorb Exp $ * Time-stamp: "2005-02-14 05:59:50 bkorb" * * This file defines all the global structures and special values @@ -107,12 +107,20 @@ typedef int tDirection; * * USAGE: define procedures to return "tSuccess". Test their results * with the SUCCEEDED, FAILED and HADGLITCH macros. + * + * Microsoft sticks its nose into user space here, so for Windows' sake, + * make sure all of these are undefined. */ #undef SUCCESS -#define SUCCESS ((tSuccess) 0) #undef FAILURE -#define FAILURE ((tSuccess)-1) #undef PROBLEM +#undef SUCCEEDED +#undef SUCCESSFUL +#undef FAILED +#undef HADGLITCH + +#define SUCCESS ((tSuccess) 0) +#define FAILURE ((tSuccess)-1) #define PROBLEM ((tSuccess) 1) typedef int tSuccess; diff --git a/sntp/libopts/m4/libopts.m4 b/sntp/libopts/m4/libopts.m4 index 786802e5bf..a044564edd 100644 --- a/sntp/libopts/m4/libopts.m4 +++ b/sntp/libopts/m4/libopts.m4 @@ -2,7 +2,7 @@ dnl -*- buffer-read-only: t -*- vi: set ro: dnl dnl DO NOT EDIT THIS FILE (libopts.m4) dnl -dnl It has been AutoGen-ed Thursday July 27, 2006 at 09:14:31 PM PDT +dnl It has been AutoGen-ed Saturday August 12, 2006 at 10:36:56 AM PDT dnl From the definitions libopts.def dnl and the template file conftest.tpl dnl @@ -25,7 +25,7 @@ AC_DEFUN([INVOKE_LIBOPTS_MACROS_FIRST],[ AC_CHECK_HEADERS(dlfcn.h errno.h fcntl.h libgen.h memory.h netinet/in.h \ setjmp.h sys/mman.h sys/param.h sys/poll.h sys/procset.h sys/select.h \ sys/socket.h sys/stropts.h sys/time.h sys/un.h sys/wait.h unistd.h \ - utime.h) + utime.h ) # -------------------------------------------- # Verify certain entries from AC_CHECK_HEADERS @@ -66,8 +66,8 @@ AC_DEFUN([INVOKE_LIBOPTS_MACROS_FIRST],[ # ...and int types headers # ======================== AC_CHECK_HEADERS(stdint.h inttypes.h, break) - AC_CHECK_TYPES([uint_t, int8_t, uint8_t, int16_t, uint16_t, int32_t, uint32_t, - intptr_t]) + AC_CHECK_TYPES([int8_t, uint8_t, int16_t, uint16_t, int32_t, uint32_t, + intptr_t, uint_t]) # ==================== # uintptr type & sizes diff --git a/sntp/libopts/usage.c b/sntp/libopts/usage.c index 73617bc189..18843cdd0f 100644 --- a/sntp/libopts/usage.c +++ b/sntp/libopts/usage.c @@ -1,6 +1,6 @@ /* - * usage.c $Id: usage.c,v 4.14 2006/07/01 21:57:23 bkorb Exp $ + * usage.c $Id: usage.c,v 4.10 2006/08/12 17:36:43 bkorb Exp $ * Time-stamp: "2006-07-01 12:41:02 bkorb" * * This module implements the default usage procedure for @@ -141,7 +141,7 @@ optionOnlyUsage( tOptions* pOpts, int ex_code ) { - tCC* pOptTitle; + tCC* pOptTitle = NULL; /* * Determine which header and which option formatting strings to use @@ -188,7 +188,7 @@ optionUsage( fprintf( option_usage_fp, pOptions->pzUsageTitle, pOptions->pzProgName ); { - tCC* pOptTitle; + tCC* pOptTitle = NULL; /* * Determine which header and which option formatting strings to use