summaryrefslogtreecommitdiffstats
path: root/lib/libc/stdtime/private.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libc/stdtime/private.h')
-rw-r--r--lib/libc/stdtime/private.h61
1 files changed, 57 insertions, 4 deletions
diff --git a/lib/libc/stdtime/private.h b/lib/libc/stdtime/private.h
index 214442c..a3c7778 100644
--- a/lib/libc/stdtime/private.h
+++ b/lib/libc/stdtime/private.h
@@ -1,9 +1,10 @@
#ifndef PRIVATE_H
#define PRIVATE_H
+
/*
** This file is in the public domain, so clarified as of
-** June 5, 1996 by Arthur David Olson (arthur_david_olson@nih.gov).
+** 1996-06-05 by Arthur David Olson (arthur_david_olson@nih.gov).
**
** $FreeBSD$
*/
@@ -36,7 +37,7 @@
#ifndef lint
#ifndef NOID
/*
-static char privatehid[] = "@(#)private.h 7.43";
+static char privatehid[] = "@(#)private.h 7.53";
*/
#endif /* !defined NOID */
#endif /* !defined lint */
@@ -54,14 +55,30 @@ static char privatehid[] = "@(#)private.h 7.43";
#define HAVE_GETTEXT 0
#endif /* !defined HAVE_GETTEXT */
+#ifndef HAVE_INCOMPATIBLE_CTIME_R
+#define HAVE_INCOMPATIBLE_CTIME_R 0
+#endif /* !defined INCOMPATIBLE_CTIME_R */
+
#ifndef HAVE_SETTIMEOFDAY
#define HAVE_SETTIMEOFDAY 3
#endif /* !defined HAVE_SETTIMEOFDAY */
#ifndef HAVE_STRERROR
-#define HAVE_STRERROR 0
+#define HAVE_STRERROR 1
#endif /* !defined HAVE_STRERROR */
+#ifndef HAVE_SYMLINK
+#define HAVE_SYMLINK 1
+#endif /* !defined HAVE_SYMLINK */
+
+#ifndef HAVE_SYS_STAT_H
+#define HAVE_SYS_STAT_H 1
+#endif /* !defined HAVE_SYS_STAT_H */
+
+#ifndef HAVE_SYS_WAIT_H
+#define HAVE_SYS_WAIT_H 1
+#endif /* !defined HAVE_SYS_WAIT_H */
+
#ifndef HAVE_UNISTD_H
#define HAVE_UNISTD_H 1
#endif /* !defined HAVE_UNISTD_H */
@@ -74,6 +91,11 @@ static char privatehid[] = "@(#)private.h 7.43";
#define LOCALE_HOME "/usr/lib/locale"
#endif /* !defined LOCALE_HOME */
+#if HAVE_INCOMPATIBLE_CTIME_R
+#define asctime_r _incompatible_asctime_r
+#define ctime_r _incompatible_ctime_r
+#endif /* HAVE_INCOMPATIBLE_CTIME_R */
+
/*
** Nested includes
*/
@@ -90,6 +112,17 @@ static char privatehid[] = "@(#)private.h 7.43";
#include "libintl.h"
#endif /* HAVE_GETTEXT - 0 */
+#if HAVE_SYS_WAIT_H - 0
+#include <sys/wait.h> /* for WIFEXITED and WEXITSTATUS */
+#endif /* HAVE_SYS_WAIT_H - 0 */
+
+#ifndef WIFEXITED
+#define WIFEXITED(status) (((status) & 0xff) == 0)
+#endif /* !defined WIFEXITED */
+#ifndef WEXITSTATUS
+#define WEXITSTATUS(status) (((status) >> 8) & 0xff)
+#endif /* !defined WEXITSTATUS */
+
#if HAVE_UNISTD_H - 0
#include "unistd.h" /* for F_OK and R_OK */
#endif /* HAVE_UNISTD_H - 0 */
@@ -128,6 +161,19 @@ static char privatehid[] = "@(#)private.h 7.43";
#endif /* !defined FILENAME_MAX */
/*
+** Private function declarations.
+*/
+char * icalloc(int nelem, int elsize);
+char * icatalloc(char * old, const char * new);
+char * icpyalloc(const char * string);
+char * imalloc(int n);
+void * irealloc(void * pointer, int size);
+void icfree(char * pointer);
+void ifree(char * pointer);
+char * scheck(const char *string, const char *format);
+
+
+/*
** Finally, some convenience items.
*/
@@ -200,8 +246,15 @@ static char privatehid[] = "@(#)private.h 7.43";
#define TZ_DOMAIN "tz"
#endif /* !defined TZ_DOMAIN */
+#if HAVE_INCOMPATIBLE_CTIME_R
+#undef asctime_r
+#undef ctime_r
+char *asctime_r(struct tm const *, char *);
+char *ctime_r(time_t const *, char *);
+#endif /* HAVE_INCOMPATIBLE_CTIME_R */
+
/*
-** UNIX was a registered trademark of UNIX System Laboratories in 1993.
+** UNIX was a registered trademark of The Open Group in 2003.
*/
#endif /* !defined PRIVATE_H */
OpenPOWER on IntegriCloud