HP/UX: Make more use of roken
authorSimon Wilkinson <sxw@your-file-system.com>
Fri, 25 Mar 2011 17:14:26 +0000 (17:14 +0000)
committerDerrick Brashear <shadow@dementia.org>
Sun, 27 Mar 2011 05:18:58 +0000 (22:18 -0700)
Make more use of roken on HP/UX by letting it provide definitions
for random and srandom, and using its implementation of
getdtablesize

Change-Id: I1212c77ea9cc6ef436cfc5c16e893aefbc33d31b
Reviewed-on: http://gerrit.openafs.org/4341
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

acinclude.m4
src/util/hputil.c

index ff01db4..6ed38ed 100644 (file)
@@ -1250,6 +1250,7 @@ AC_CHECK_HEADERS([ \
                   sys/statfs.h \
                   sys/statvfs.h \
                   sys/socket.h \
+                  sys/sysctl.h \
                   sys/time.h \
                   sys/types.h \
                   sys/un.h \
@@ -1341,6 +1342,8 @@ AC_CHECK_FUNCS([ \
        sigaction \
        strcasestr \
        strerror \
+       sysconf \
+       sysctl \
        timegm \
 ])
 
@@ -1352,7 +1355,6 @@ dnl haven't found a need for yet, and so haven't imported
 AC_CHECK_FUNCS([ \
        chown \
        fchown \
-       getdtablesize \
        gethostname \
        gettimeofday \
        localtime_r \
@@ -1385,6 +1387,7 @@ AC_REPLACE_FUNCS([ \
        erealloc \
        err \
        errx \
+       getdtablesize \
        getopt \
        getprogname \
        mkstemp \
index 3e9ae03..0613e4e 100644 (file)
@@ -29,24 +29,6 @@ utimes(char *file, struct timeval tvp[2])
 }
 #endif
 
-int
-random(void)
-{
-    return rand();
-}
-
-void
-srandom(int seed)
-{
-    srand(seed);
-}
-
-int
-getdtablesize(void)
-{
-    return (20);
-}
-
 void
 setlinebuf(FILE * file)
 {