diff options
author | wollman <wollman@FreeBSD.org> | 1999-01-21 17:46:19 +0000 |
---|---|---|
committer | wollman <wollman@FreeBSD.org> | 1999-01-21 17:46:19 +0000 |
commit | 704d8282475b2a01ab2303f41fc07a752381ba29 (patch) | |
tree | fa346c365fa2596c643775bd10ddacbae657b852 /usr.sbin/zic/private.h | |
parent | 8e5b9c1b13b1386578a9b8537e6b9c49fae067b2 (diff) | |
download | FreeBSD-src-704d8282475b2a01ab2303f41fc07a752381ba29.zip FreeBSD-src-704d8282475b2a01ab2303f41fc07a752381ba29.tar.gz |
Merge changes from vendor branch (tzcode1999a), plus the following additional
changes:
- Finish migrating zic to its own private.h.
- Fix zic.8 so that it really is written in -mdoc.
- Add four new flags to zic (&document):
-D don't create directories
-u change ownership of newly-created files to user
-g change ownership of newly-created files to group
-m change mode of newly-created files to modespec
These, once proven, can be used to clean up the installation.
Obtained from: ftp://elsie.nci.nih.gov/pub/tzcode1999a.tar.gz (partially)
Diffstat (limited to 'usr.sbin/zic/private.h')
-rw-r--r-- | usr.sbin/zic/private.h | 110 |
1 files changed, 11 insertions, 99 deletions
diff --git a/usr.sbin/zic/private.h b/usr.sbin/zic/private.h index f2c0558..11a80e4 100644 --- a/usr.sbin/zic/private.h +++ b/usr.sbin/zic/private.h @@ -8,6 +8,15 @@ */ /* + * FreeBSD modifications: separate libc's privates from zic's. + * This makes it easier when we need to update one but not the other. + * I have removed all of the ifdef spaghetti which is not relevant to + * zic from this file. + * + * $Id: private.h,v 1.2 1999/01/21 17:12:49 wollman Exp $ + */ + +/* ** This header is for use ONLY with the time conversion code. ** There is no guarantee that it will remain unchanged, ** or that it will remain at all. @@ -30,20 +39,12 @@ static char privatehid[] = "@(#)private.h 7.48"; ** You can override these in your C compiler options, e.g. `-DHAVE_ADJTIME=0'. */ -#ifndef HAVE_ADJTIME -#define HAVE_ADJTIME 1 -#endif /* !defined HAVE_ADJTIME */ - #ifndef HAVE_GETTEXT #define HAVE_GETTEXT 0 #endif /* !defined HAVE_GETTEXT */ -#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 @@ -54,14 +55,6 @@ static char privatehid[] = "@(#)private.h 7.48"; #define HAVE_UNISTD_H 1 #endif /* !defined HAVE_UNISTD_H */ -#ifndef HAVE_UTMPX_H -#define HAVE_UTMPX_H 0 -#endif /* !defined HAVE_UTMPX_H */ - -#ifndef LOCALE_HOME -#define LOCALE_HOME "/usr/lib/locale" -#endif /* !defined LOCALE_HOME */ - /* ** Nested includes */ @@ -94,87 +87,7 @@ static char privatehid[] = "@(#)private.h 7.48"; /* Unlike <ctype.h>'s isdigit, this also works if c < 0 | c > UCHAR_MAX. */ #define is_digit(c) ((unsigned)(c) - '0' <= 9) -/* -** Workarounds for compilers/systems. -*/ - -/* -** SunOS 4.1.1 cc lacks const. -*/ - -#ifndef const -#ifndef __STDC__ -#define const -#endif /* !defined __STDC__ */ -#endif /* !defined const */ - -/* -** SunOS 4.1.1 cc lacks prototypes. -*/ - -#ifndef P -#ifdef __STDC__ -#define P(x) x -#endif /* defined __STDC__ */ -#ifndef __STDC__ -#define P(x) () -#endif /* !defined __STDC__ */ -#endif /* !defined P */ - -/* -** SunOS 4.1.1 headers lack EXIT_SUCCESS. -*/ - -#ifndef EXIT_SUCCESS -#define EXIT_SUCCESS 0 -#endif /* !defined EXIT_SUCCESS */ - -/* -** SunOS 4.1.1 headers lack EXIT_FAILURE. -*/ - -#ifndef EXIT_FAILURE -#define EXIT_FAILURE 1 -#endif /* !defined EXIT_FAILURE */ - -/* -** SunOS 4.1.1 headers lack FILENAME_MAX. -*/ - -#ifndef FILENAME_MAX - -#ifndef MAXPATHLEN -#ifdef unix -#include "sys/param.h" -#endif /* defined unix */ -#endif /* !defined MAXPATHLEN */ - -#ifdef MAXPATHLEN -#define FILENAME_MAX MAXPATHLEN -#endif /* defined MAXPATHLEN */ -#ifndef MAXPATHLEN -#define FILENAME_MAX 1024 /* Pure guesswork */ -#endif /* !defined MAXPATHLEN */ - -#endif /* !defined FILENAME_MAX */ - -/* -** SunOS 4.1.1 libraries lack remove. -*/ - -#ifndef remove -extern int unlink P((const char * filename)); -#define remove unlink -#endif /* !defined remove */ - -/* -** Some ancient errno.h implementations don't declare errno. -** But some newer errno.h implementations define it as a macro. -** Fix the former without affecting the latter. -*/ -#ifndef errno -extern int errno; -#endif /* !defined errno */ +#define P(x) x /* ** Private function declarations. @@ -188,7 +101,6 @@ void icfree P((char * pointer)); void ifree P((char * pointer)); char * scheck P((const char *string, const char *format)); - /* ** Finally, some convenience items. */ |