5 #if defined (__GLIBC__) && defined(__LCLINT__)
8 extern __const __int32_t
*__ctype_tolower
;
10 extern __const __int32_t
*__ctype_toupper
;
15 # include <floss.h(floss_execvp,floss_read)>
29 #ifdef HAVE_SYS_TYPES_H
30 # include <sys/types.h>
41 # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
54 #define __attribute__(x)
58 /* access macros are not declared in non posix mode in unistd.h -
59 don't try to use posix on NeXTstep 3.3 ! */
63 #if defined(__LCLINT__)
64 /*@-declundef -incondefs @*/ /* LCL: missing annotation */
66 void * alloca (size_t __size
)
67 /*@ensures MaxSet(result) == (__size - 1) @*/
69 /*@=declundef =incondefs @*/
72 /* AIX requires this to be the first thing in the file. */
81 # ifndef alloca /* predefined by HP cc +Olibcalls */
82 char *alloca(size_t size
);
88 # define alloca(sz) malloc(sz) /* Kludge this for now */
92 #elif !defined(alloca)
93 #define alloca __builtin_alloca
97 size_t strlcpy(char *d
, const char *s
, size_t bufsize
);
101 size_t strlcat(char *d
, const char *s
, size_t bufsize
);
104 #if HAVE_MCHECK_H && defined(__GNUC__)
106 xstrdup(const char *s
)
108 size_t memsize
= strlen(s
) + 1;
109 char *ptr
= malloc(memsize
);
111 fprintf(stderr
, "virtual memory exhausted.\n");
114 strlcpy(ptr
, s
, memsize
);
118 #define xstrdup(_str) strdup(_str)
119 #endif /* HAVE_MCHECK_H && defined(__GNUC__) */
121 #if HAVE___SECURE_GETENV && !defined(__LCLINT__)
122 #define getenv(_s) __secure_getenv(_s)
125 #if !defined HAVE_SNPRINTF || !defined HAVE_C99_VSNPRINTF
126 #define snprintf rsync_snprintf
127 int snprintf(char *str
,size_t count
,const char *fmt
,...);
130 #define UNUSED(x) x __attribute__((__unused__))
132 #define PACKAGE "rsync"