summaryrefslogtreecommitdiff
path: root/pkgtools
diff options
context:
space:
mode:
authorgrant <grant>2003-06-23 13:15:59 +0000
committergrant <grant>2003-06-23 13:15:59 +0000
commit27403eabd0308dd38f06aba89e235f5106186872 (patch)
treef709f7dbb6529f4c3b879d51daaad4d9e550d07f /pkgtools
parente94a33002f4f8653801922dcfeb21210abefff7a (diff)
downloadpkgsrc-27403eabd0308dd38f06aba89e235f5106186872.tar.gz
not all systems define all of the time related constants we
need in tzfile.h, avoid redefinition warnings.
Diffstat (limited to 'pkgtools')
-rw-r--r--pkgtools/libnbcompat/files/nbcompat.h42
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 */