port.c no longer required...individual functions that were in there are
authorMarc G. Fournier
Fri, 19 Dec 1997 02:27:20 +0000 (02:27 +0000)
committerMarc G. Fournier
Fri, 19 Dec 1997 02:27:20 +0000 (02:27 +0000)
auto-generated via configure

individual functions in individual files

src/backend/port/gethostname.c [new file with mode: 0644]
src/backend/port/getrusage.c [moved from src/backend/port/univel/port.c with 51% similarity]
src/backend/port/random.c [new file with mode: 0644]
src/backend/port/srandom.c [new file with mode: 0644]

diff --git a/src/backend/port/gethostname.c b/src/backend/port/gethostname.c
new file mode 100644 (file)
index 0000000..2971c79
--- /dev/null
@@ -0,0 +1,20 @@
+#include 
+#include 
+
+#include 
+
+int
+gethostname(char *name, int namelen)
+{
+   static struct utsname mname;
+   static int  called = 0;
+
+   if (!called)
+   {
+       called++;
+       uname(&mname);
+   }
+   strncpy(name, mname.nodename, (SYS_NMLN < namelen ? SYS_NMLN : namelen));
+
+   return (0);
+}
similarity index 51%
rename from src/backend/port/univel/port.c
rename to src/backend/port/getrusage.c
index 907e344ee73508349d38dd9fdc39962f8f4ec250..a560d4afa3fe4f5766b1212ee153a91944829bf2 100644 (file)
@@ -1,34 +1,9 @@
-/*-------------------------------------------------------------------------
- *
- * port.c--
- *   Intel x86/Intel SVR4-specific routines
- *
- * Copyright (c) 1994, Regents of the University of California
- *
- *
- * IDENTIFICATION
- *   /usr/local/devel/pglite/cvs/src/backend/port/svr4/port.c,v 1.2 1995/03/17 06:40:19 andrew Exp
- *
- *-------------------------------------------------------------------------
- */
-#include               /* for pow() prototype */
+#include                /* for pow() prototype */
 
 #include 
 #include "rusagestub.h"
 #include "port-protos.h"
 
-long
-random()
-{
-   return (lrand48());
-}
-
-void
-srandom(int seed)
-{
-   srand48((long int) seed);
-}
-
 int
 getrusage(int who, struct rusage * rusage)
 {
@@ -70,23 +45,3 @@ getrusage(int who, struct rusage * rusage)
    return (0);
 }
 
-#include 
-#include 
-
-#include 
-
-int
-gethostname(char *name, int namelen)
-{
-   static struct utsname mname;
-   static int  called = 0;
-
-   if (!called)
-   {
-       called++;
-       uname(&mname);
-   }
-   strncpy(name, mname.nodename, (SYS_NMLN < namelen ? SYS_NMLN : namelen));
-
-   return (0);
-}
diff --git a/src/backend/port/random.c b/src/backend/port/random.c
new file mode 100644 (file)
index 0000000..5cef1d8
--- /dev/null
@@ -0,0 +1,12 @@
+#include                /* for pow() prototype */
+
+#include 
+#include "rusagestub.h"
+#include "port-protos.h"
+
+long
+random()
+{
+   return (lrand48());
+}
+
diff --git a/src/backend/port/srandom.c b/src/backend/port/srandom.c
new file mode 100644 (file)
index 0000000..71977bd
--- /dev/null
@@ -0,0 +1,12 @@
+#include                /* for pow() prototype */
+
+#include 
+#include "rusagestub.h"
+#include "port-protos.h"
+
+void
+srandom(int seed)
+{
+   srand48((long int) seed);
+}
+