]> git.ipfire.org Git - thirdparty/openldap.git/commitdiff
generic headers
authorKurt Zeilenga <kurt@openldap.org>
Fri, 14 Aug 1998 06:07:26 +0000 (06:07 +0000)
committerKurt Zeilenga <kurt@openldap.org>
Fri, 14 Aug 1998 06:07:26 +0000 (06:07 +0000)
include/ac/dirent.h [new file with mode: 0644]
include/ac/string.h [new file with mode: 0644]
include/ac/time.h [new file with mode: 0644]
include/ac/unistd.h [new file with mode: 0644]

diff --git a/include/ac/dirent.h b/include/ac/dirent.h
new file mode 100644 (file)
index 0000000..b6ec697
--- /dev/null
@@ -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 */
diff --git a/include/ac/string.h b/include/ac/string.h
new file mode 100644 (file)
index 0000000..4123f4c
--- /dev/null
@@ -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 */
diff --git a/include/ac/time.h b/include/ac/time.h
new file mode 100644 (file)
index 0000000..9cc89f4
--- /dev/null
@@ -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 */
diff --git a/include/ac/unistd.h b/include/ac/unistd.h
new file mode 100644 (file)
index 0000000..f524f99
--- /dev/null
@@ -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 */