~mdw
/
sgt
/
agedu
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Change the magic number used to introduce a trie file, so that instead
[sgt/agedu]
/
agedu.h
diff --git
a/agedu.h
b/agedu.h
index
2e6cc51
..
ec035d4
100644
(file)
--- a/
agedu.h
+++ b/
agedu.h
@@
-88,7
+88,16
@@
#ifdef HAVE_SYS_SELECT_H
# include <sys/select.h>
#endif
#ifdef HAVE_SYS_SELECT_H
# include <sys/select.h>
#endif
+#ifdef HAVE_NETDB_H
+# include <netdb.h>
+#endif
+#ifndef HOST_NAME_MAX
+/* Reportedly at least one Solaris fails to comply with its POSIX
+ * requirement to define this (see POSIX spec for gethostname) */
+#define HOST_NAME_MAX 255 /* upper bound specified in SUS */
+#endif
+
#define PNAME "agedu"
#define DUMPHDR "agedu dump file. pathsep="
#define PNAME "agedu"
#define DUMPHDR "agedu dump file. pathsep="
@@
-99,10
+108,13
@@
extern char pathsep;
#if defined HAVE_LSTAT64 && HAVE_STAT64
#define STRUCT_STAT struct stat64
#if defined HAVE_LSTAT64 && HAVE_STAT64
#define STRUCT_STAT struct stat64
-#define LSTAT lstat64
-#define STAT stat64
+#define LSTAT
_FUNC
lstat64
+#define STAT
_FUNC
stat64
#else
#define STRUCT_STAT struct stat
#else
#define STRUCT_STAT struct stat
-#define LSTAT lstat
-#define STAT stat
+#define LSTAT
_FUNC
lstat
+#define STAT
_FUNC
stat
#endif
#endif
+
+#define max(x,y) ( (x) > (y) ? (x) : (y) )
+#define min(x,y) ( (x) < (y) ? (x) : (y) )