X-Git-Url: https://mattmccutchen.net/rsync/rsync.git/blobdiff_plain/7447419266981a80c4191403df3b84b5b3467f90..9775d6ab66dc59e05f0daa4f6048d24bc7989602:/popt/system.h diff --git a/popt/system.h b/popt/system.h index 85daed3b..6f496ed5 100644 --- a/popt/system.h +++ b/popt/system.h @@ -2,7 +2,17 @@ #include "config.h" #endif +#if defined (__GLIBC__) && defined(__LCLINT__) +/*@-declundef@*/ +/*@unchecked@*/ +extern __const __int32_t *__ctype_tolower; +/*@unchecked@*/ +extern __const __int32_t *__ctype_toupper; +/*@=declundef@*/ +#endif + #include + #include #include #include @@ -12,11 +22,32 @@ #endif #include -#include -#include +#ifdef HAVE_SYS_TYPES_H +# include +#endif +#ifdef STDC_HEADERS +# include +# include +#else +# ifdef HAVE_STDLIB_H +# include +# endif +#endif +#ifdef HAVE_STRING_H +# if !defined STDC_HEADERS && defined HAVE_MEMORY_H +# include +# endif +# include +#endif +#ifdef HAVE_STRINGS_H +# include +#endif +#ifdef HAVE_UNISTD_H +# include +#endif -#if HAVE_UNISTD_H -#include +#ifndef __GNUC__ +#define __attribute__(x) #endif #ifdef __NeXT @@ -26,11 +57,12 @@ #endif #if defined(__LCLINT__) -/*@-declundef -incondefs -redecl@*/ /* LCL: missing annotation */ -/*@only@*/ void * alloca (size_t __size) +/*@-declundef -incondefs @*/ /* LCL: missing annotation */ +/*@only@*/ /*@out@*/ +void * alloca (size_t __size) /*@ensures MaxSet(result) == (__size - 1) @*/ /*@*/; -/*@=declundef =incondefs =redecl@*/ +/*@=declundef =incondefs @*/ #endif /* AIX requires this to be the first thing in the file. */ @@ -41,7 +73,7 @@ # ifdef _AIX #pragma alloca # else -# if HAVE_ALLOCA +# ifdef HAVE_ALLOCA # ifndef alloca /* predefined by HP cc +Olibcalls */ char *alloca (); # endif @@ -58,7 +90,8 @@ char *alloca (); #endif /*@-redecl -redef@*/ -/*@mayexit@*/ /*@only@*/ char * xstrdup (const char *str) +/*@mayexit@*/ /*@only@*/ /*@unused@*/ +char * xstrdup (const char *str) /*@*/; /*@=redecl =redef@*/ @@ -69,5 +102,33 @@ char *alloca (); #define xstrdup(_str) strdup(_str) #endif /* HAVE_MCHECK_H && defined(__GNUC__) */ +#if HAVE___SECURE_GETENV && !defined(__LCLINT__) +#define getenv(_s) __secure_getenv(_s) +#endif + +#ifndef HAVE_STRLCPY +size_t strlcpy(char *d, const char *s, size_t bufsize); +#endif + +#ifndef HAVE_STRLCAT +size_t strlcat(char *d, const char *s, size_t bufsize); +#endif + +#if !defined HAVE_SNPRINTF || !defined HAVE_C99_VSNPRINTF +#define snprintf rsync_snprintf +int snprintf(char *str,size_t count,const char *fmt,...); +#endif + +#define UNUSED(x) x __attribute__((__unused__)) + +#define PACKAGE "rsync" + +#ifndef DBL_EPSILON +#define DBL_EPSILON 2.2204460492503131e-16 +#endif + +#ifdef _ABS +#undef _ABS +#endif #include "popt.h"