Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit3ad815f

Browse files
committed
port.c no longer required...individual functions that were in there are
auto-generated via configureindividual functions in individual files
1 parent5379b84 commit3ad815f

File tree

4 files changed

+45
-46
lines changed

4 files changed

+45
-46
lines changed

‎src/backend/port/gethostname.c

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
#include<sys/types.h>
2+
#include<string.h>
3+
4+
#include<sys/utsname.h>
5+
6+
int
7+
gethostname(char*name,intnamelen)
8+
{
9+
staticstructutsnamemname;
10+
staticintcalled=0;
11+
12+
if (!called)
13+
{
14+
called++;
15+
uname(&mname);
16+
}
17+
strncpy(name,mname.nodename, (SYS_NMLN<namelen ?SYS_NMLN :namelen));
18+
19+
return (0);
20+
}
Lines changed: 1 addition & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,9 @@
1-
/*-------------------------------------------------------------------------
2-
*
3-
* port.c--
4-
* Intel x86/Intel SVR4-specific routines
5-
*
6-
* Copyright (c) 1994, Regents of the University of California
7-
*
8-
*
9-
* IDENTIFICATION
10-
* /usr/local/devel/pglite/cvs/src/backend/port/svr4/port.c,v 1.2 1995/03/17 06:40:19 andrew Exp
11-
*
12-
*-------------------------------------------------------------------------
13-
*/
14-
#include<math.h>/* for pow() prototype */
1+
#include<math.h>/* for pow() prototype */
152

163
#include<errno.h>
174
#include"rusagestub.h"
185
#include"port-protos.h"
196

20-
long
21-
random()
22-
{
23-
return (lrand48());
24-
}
25-
26-
void
27-
srandom(intseed)
28-
{
29-
srand48((longint)seed);
30-
}
31-
327
int
338
getrusage(intwho,structrusage*rusage)
349
{
@@ -70,23 +45,3 @@ getrusage(int who, struct rusage * rusage)
7045
return (0);
7146
}
7247

73-
#include<sys/types.h>
74-
#include<string.h>
75-
76-
#include<sys/utsname.h>
77-
78-
int
79-
gethostname(char*name,intnamelen)
80-
{
81-
staticstructutsnamemname;
82-
staticintcalled=0;
83-
84-
if (!called)
85-
{
86-
called++;
87-
uname(&mname);
88-
}
89-
strncpy(name,mname.nodename, (SYS_NMLN<namelen ?SYS_NMLN :namelen));
90-
91-
return (0);
92-
}

‎src/backend/port/random.c

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#include<math.h>/* for pow() prototype */
2+
3+
#include<errno.h>
4+
#include"rusagestub.h"
5+
#include"port-protos.h"
6+
7+
long
8+
random()
9+
{
10+
return (lrand48());
11+
}
12+

‎src/backend/port/srandom.c

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#include<math.h>/* for pow() prototype */
2+
3+
#include<errno.h>
4+
#include"rusagestub.h"
5+
#include"port-protos.h"
6+
7+
void
8+
srandom(intseed)
9+
{
10+
srand48((longint)seed);
11+
}
12+

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp