import generic headers

This commit is contained in:
Kurt Zeilenga 1998-09-19 17:43:52 +00:00
parent 2753c5176a
commit e01f6988a3
6 changed files with 114 additions and 0 deletions

24
include/ac/alloca.h Normal file
View file

@ -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 <alloca.h>
# else
# ifdef _AIX
#pragma alloca
# else
# ifndef alloca /* predefined by HP cc +Olibcalls */
char *alloca ();
# endif
# endif
# endif
#endif
#endif /* _AC_ALLOCA_H */

23
include/ac/dirent.h Normal file
View file

@ -0,0 +1,23 @@
/* Generic dirent.h */
#ifndef _AC_DIRENT_H
#define _AC_DIRENT_H
#if HAVE_DIRENT_H
# include <dirent.h>
# define NAMLEN(dirent) strlen((dirent)->d_name)
#else
# define dirent direct
# define NAMLEN(dirent) (dirent)->d_namlen
# if HAVE_SYS_NDIR_H
# include <sys/ndir.h>
# endif
# if HAVE_SYS_DIR_H
# include <sys/dir.h>
# endif
# if HAVE_NDIR_H
# include <ndir.h>
# endif
#endif
#endif /* _AC_DIRENT_H */

20
include/ac/string.h Normal file
View file

@ -0,0 +1,20 @@
/* Generic string.h */
#ifndef _AC_STRING_H
#define _AC_STRING_H
#if STDC_HEADERS
# include <string.h>
#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 */

17
include/ac/time.h Normal file
View file

@ -0,0 +1,17 @@
/* Generic time.h */
#ifndef _AC_TIME_H
#define _AC_TIME_H
#if TIME_WITH_SYS_TIME
# include <sys/time.h>
# include <time.h>
#else
# if HAVE_SYS_TIME_H
# include <sys/time.h>
# else
# include <time.h>
# endif
#endif
#endif /* _AC_TIME_H */

13
include/ac/unistd.h Normal file
View file

@ -0,0 +1,13 @@
/* Generic unistd.h */
#ifndef _AC_UNISTD_H
#define _AC_UNISTD_H
#if HAVE_UNISTD_H
# include <sys/types.h>
# include <unistd.h>
#endif
/* use _POSIX_VERSION for POSIX.1 code */
#endif /* _AC_UNISTD_H */

17
include/ac/wait.h Normal file
View file

@ -0,0 +1,17 @@
/* Generic wait.h */
#ifndef _AC_WAIT_H
#define _AC_WAIT_H
#include <sys/types.h>
#if HAVE_SYS_WAIT_H
# include <sys/wait.h>
#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 */