14 #ifdef HAVE_SYS_PARAM_H 15 #include <sys/param.h> 22 #if !defined(__GLIBC__) 24 #include <crt_externs.h> 25 #define environ (*_NSGetEnviron()) 32 #if !defined(HAVE_STPCPY) 33 char *
stpcpy(
char * dest,
const char * src);
36 #if !defined(HAVE_STPNCPY) 37 char *
stpncpy(
char * dest,
const char * src,
size_t n);
40 #if HAVE_SECURE_GETENV 41 #define getenv(_s) secure_getenv(_s) 42 #elif HAVE___SECURE_GETENV 43 #define getenv(_s) __secure_getenv(_s) 54 # define NLENGTH(direct) (strlen((direct)->d_name)) 56 # define dirent direct 57 # define NLENGTH(direct) ((direct)->d_namlen) 58 # ifdef HAVE_SYS_NDIR_H 59 # include <sys/ndir.h> 61 # ifdef HAVE_SYS_DIR_H 74 #ifdef _POSIX_PATH_MAX 75 #define PATH_MAX _POSIX_PATH_MAX 76 #elif defined MAXPATHLEN 77 #define PATH_MAX MAXPATHLEN 85 #define xmalloc(_size) rmalloc((_size)) 86 #define xcalloc(_nmemb, _size) rcalloc((_nmemb), (_size)) 87 #define xrealloc(_ptr, _size) rrealloc((_ptr), (_size)) 88 #define xstrdup(_str) rstrdup((_str)) 89 #define _free(_ptr) rfree((_ptr)) 92 #if defined __GLIBC__ && __GLIBC__ >= 2 93 #if __GLIBC_MINOR__ >= 1 94 #define __progname __assert_program_name 96 #define setprogname(pn) 98 #define __progname program_name 99 #define setprogname(pn) \ 100 { if ((__progname = strrchr(pn, '/')) != NULL) __progname++; \ 101 else __progname = pn; \ 109 # include <libintl.h> 110 # define _(Text) dgettext (PACKAGE, Text) 112 # define _(Text) Text 115 #define N_(Text) Text 119 #include "misc/fnmatch.h" char * stpcpy(char *dest, const char *src)
Miscellaneous utility macros:
char * stpncpy(char *dest, const char *src, size_t n)