diff options
author | grant <grant@pkgsrc.org> | 2003-06-23 13:15:59 +0000 |
---|---|---|
committer | grant <grant@pkgsrc.org> | 2003-06-23 13:15:59 +0000 |
commit | fc4ac99b0b526a3c8915a6dc5a8d4541ad850650 (patch) | |
tree | f709f7dbb6529f4c3b879d51daaad4d9e550d07f | |
parent | 0d6688542d17a6e8a7f8f0bfbd37e654fa9f68ac (diff) | |
download | pkgsrc-fc4ac99b0b526a3c8915a6dc5a8d4541ad850650.tar.gz |
not all systems define all of the time related constants we
need in tzfile.h, avoid redefinition warnings.
-rw-r--r-- | pkgtools/libnbcompat/files/nbcompat.h | 42 |
1 files changed, 33 insertions, 9 deletions
diff --git a/pkgtools/libnbcompat/files/nbcompat.h b/pkgtools/libnbcompat/files/nbcompat.h index f863cc7a657..d3ce0d66aba 100644 --- a/pkgtools/libnbcompat/files/nbcompat.h +++ b/pkgtools/libnbcompat/files/nbcompat.h @@ -165,10 +165,43 @@ char *tgoto(const char *, int, int); void tputs(const char *, int, int (*)(int)); #endif +/* not all systems define all of these in tzfile.h */ #if HAVE_TZFILE_H # include <tzfile.h> #endif +#ifndef DAYSPERNYEAR +# define DAYSPERNYEAR 365 +#endif + +#ifndef EPOCH_YEAR +# define EPOCH_YEAR 1970 +#endif + +#ifndef HOURSPERDAY +# define HOURSPERDAY 24 +#endif + +#ifndef MINSPERHOUR +# define MINSPERHOUR 60 +#endif + +#ifndef SECSPERHOUR +# define SECSPERHOUR 3600 +#endif + +#ifndef SECSPERMIN +# define SECSPERMIN 60 +#endif + +#ifndef SECSPERDAY +# define SECSPERDAY 86400 +#endif + +#ifndef TM_YEAR_BASE +# define TM_YEAR_BASE 1900 +#endif + #if HAVE_UTIL_H # include <util.h> #endif @@ -339,13 +372,4 @@ char *strsep(char **stringp, const char *delim); # define ALLPERMS (S_ISUID|S_ISGID|S_ISVTX|S_IRWXU|S_IRWXG|S_IRWXO) #endif -#define DAYSPERNYEAR 365 -#define EPOCH_YEAR 1970 -#define HOURSPERDAY 24 -#define MINSPERHOUR 60 -#define SECSPERHOUR 3600 -#define SECSPERMIN 60 -#define SECSPERDAY 86400 -#define TM_YEAR_BASE 1900 - #endif /* _NBCOMPAT_H */ |