From: Kurt Zeilenga Date: Sat, 19 Sep 1998 17:43:52 +0000 (+0000) Subject: import generic headers X-Git-Tag: PHP3_TOOL_0_0~18^2~96 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=e01f6988a3e5bb9e9927c131eb4c4a5600655c3a;p=openldap import generic headers --- diff --git a/include/ac/alloca.h b/include/ac/alloca.h new file mode 100644 index 0000000000..80bcd44fee --- /dev/null +++ b/include/ac/alloca.h @@ -0,0 +1,24 @@ +/* Generic alloca.h */ + +#ifndef _AC_ALLOCA_H +#define _AC_ALLOCA_H + +/* AIX requires this to be the first thing in the file. */ +#ifdef __GNUC__ +# define alloca __builtin_alloca +#else +# if HAVE_ALLOCA_H +# include +# else +# ifdef _AIX +#pragma alloca +# else +# ifndef alloca /* predefined by HP cc +Olibcalls */ +char *alloca (); +# endif +# endif +# endif +#endif + + +#endif /* _AC_ALLOCA_H */ diff --git a/include/ac/dirent.h b/include/ac/dirent.h new file mode 100644 index 0000000000..b6ec697318 --- /dev/null +++ b/include/ac/dirent.h @@ -0,0 +1,23 @@ +/* Generic dirent.h */ + +#ifndef _AC_DIRENT_H +#define _AC_DIRENT_H + +#if HAVE_DIRENT_H +# include +# define NAMLEN(dirent) strlen((dirent)->d_name) +#else +# define dirent direct +# define NAMLEN(dirent) (dirent)->d_namlen +# if HAVE_SYS_NDIR_H +# include +# endif +# if HAVE_SYS_DIR_H +# include +# endif +# if HAVE_NDIR_H +# include +# endif +#endif + +#endif /* _AC_DIRENT_H */ diff --git a/include/ac/string.h b/include/ac/string.h new file mode 100644 index 0000000000..4123f4c9e3 --- /dev/null +++ b/include/ac/string.h @@ -0,0 +1,20 @@ +/* Generic string.h */ + +#ifndef _AC_STRING_H +#define _AC_STRING_H + +#if STDC_HEADERS +# include +#else +# ifndef HAVE_STRCHR +# define strchr index +# define strrchr rindex +# endif +char *strchr (), *strrchr (); +# ifndef HAVE_MEMCPY +# define memcpy(d, s, n) bcopy ((s), (d), (n)) +# define memmove(d, s, n) bcopy ((s), (d), (n)) +# endif +#endif + +#endif /* _AC_STRING_H */ diff --git a/include/ac/time.h b/include/ac/time.h new file mode 100644 index 0000000000..9cc89f43b4 --- /dev/null +++ b/include/ac/time.h @@ -0,0 +1,17 @@ +/* Generic time.h */ + +#ifndef _AC_TIME_H +#define _AC_TIME_H + +#if TIME_WITH_SYS_TIME +# include +# include +#else +# if HAVE_SYS_TIME_H +# include +# else +# include +# endif +#endif + +#endif /* _AC_TIME_H */ diff --git a/include/ac/unistd.h b/include/ac/unistd.h new file mode 100644 index 0000000000..f524f99b2f --- /dev/null +++ b/include/ac/unistd.h @@ -0,0 +1,13 @@ +/* Generic unistd.h */ + +#ifndef _AC_UNISTD_H +#define _AC_UNISTD_H + +#if HAVE_UNISTD_H +# include +# include +#endif + +/* use _POSIX_VERSION for POSIX.1 code */ + +#endif /* _AC_UNISTD_H */ diff --git a/include/ac/wait.h b/include/ac/wait.h new file mode 100644 index 0000000000..ab69a883a7 --- /dev/null +++ b/include/ac/wait.h @@ -0,0 +1,17 @@ +/* Generic wait.h */ + +#ifndef _AC_WAIT_H +#define _AC_WAIT_H + +#include +#if HAVE_SYS_WAIT_H +# include +#endif +#ifndef WEXITSTATUS +# define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8) +#endif +#ifndef WIFEXITED +# define WIFEXITED(stat_val) (((stat_val) & 255) == 0) +#endif + +#endif /* _AC_WAIT_H */