5 #if defined (__GLIBC__) && defined(__LCLINT__)
8 extern __const __int32_t
*__ctype_tolower
;
10 extern __const __int32_t
*__ctype_toupper
;
25 #ifdef HAVE_SYS_TYPES_H
26 # include <sys/types.h>
37 # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
50 #define __attribute__(x)
54 /* access macros are not declared in non posix mode in unistd.h -
55 don't try to use posix on NeXTstep 3.3 ! */
59 #if defined(__LCLINT__)
60 /*@-declundef -incondefs @*/ /* LCL: missing annotation */
62 void * alloca (size_t __size
)
63 /*@ensures MaxSet(result) == (__size - 1) @*/
65 /*@=declundef =incondefs @*/
68 /* AIX requires this to be the first thing in the file. */
77 # ifndef alloca /* predefined by HP cc +Olibcalls */
78 char *alloca(size_t size
);
84 # define alloca(sz) malloc(sz) /* Kludge this for now */
88 #elif !defined(alloca)
89 #define alloca __builtin_alloca
93 size_t strlcpy(char *d
, const char *s
, size_t bufsize
);
97 size_t strlcat(char *d
, const char *s
, size_t bufsize
);
100 #if HAVE_MCHECK_H && defined(__GNUC__)
102 xstrdup(const char *s
)
104 size_t memsize
= strlen(s
) + 1;
105 char *ptr
= malloc(memsize
);
107 fprintf(stderr
, "virtual memory exhausted.\n");
110 strlcpy(ptr
, s
, memsize
);
114 #define xstrdup(_str) strdup(_str)
115 #endif /* HAVE_MCHECK_H && defined(__GNUC__) */
117 #if HAVE___SECURE_GETENV && !defined(__LCLINT__)
118 #define getenv(_s) __secure_getenv(_s)
121 #if !defined HAVE_SNPRINTF || !defined HAVE_C99_VSNPRINTF
122 #define snprintf rsync_snprintf
123 int snprintf(char *str
,size_t count
,const char *fmt
,...);
126 #define UNUSED(x) x __attribute__((__unused__))
128 #define PACKAGE "rsync"