Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
3aae0f53
Commit
3aae0f53
authored
Dec 19, 1997
by
Marc G. Fournier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
More cleanups...several ports are major redundancies of other ports
parent
3ad815fc
Changes
12
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
19 additions
and
377 deletions
+19
-377
src/backend/port/Makefile.in
src/backend/port/Makefile.in
+3
-2
src/backend/port/getrusage.c
src/backend/port/getrusage.c
+12
-0
src/backend/port/hpux/port.c
src/backend/port/hpux/port.c
+1
-18
src/backend/port/i386_solaris/port.c
src/backend/port/i386_solaris/port.c
+0
-70
src/backend/port/rusagestub.h
src/backend/port/rusagestub.h
+0
-0
src/backend/port/sco/Makefile
src/backend/port/sco/Makefile
+0
-35
src/backend/port/sco/port.c
src/backend/port/sco/port.c
+0
-60
src/backend/port/sparc_solaris/Makefile
src/backend/port/sparc_solaris/Makefile
+2
-2
src/backend/port/sparc_solaris/port.c
src/backend/port/sparc_solaris/port.c
+0
-83
src/backend/port/srandom.c
src/backend/port/srandom.c
+1
-1
src/backend/port/strcasecmp.c
src/backend/port/strcasecmp.c
+0
-71
src/backend/port/svr4/Makefile
src/backend/port/svr4/Makefile
+0
-35
No files found.
src/backend/port/Makefile.in
View file @
3aae0f53
...
...
@@ -19,14 +19,15 @@
# be converted to Method 2.
#
# IDENTIFICATION
# $Header: /cvsroot/pgsql/src/backend/port/Attic/Makefile.in,v 1.
5 1997/12/19 02:06:24
scrappy Exp $
# $Header: /cvsroot/pgsql/src/backend/port/Attic/Makefile.in,v 1.
6 1997/12/19 02:45:38
scrappy Exp $
#
#-------------------------------------------------------------------------
SRCDIR
=
../..
include
../../Makefile.global
OBJS
=
@PORTNAME@/SUBSYS.o @INET_ATON@ @STRERROR@
OBJS
=
@PORTNAME@/SUBSYS.o @INET_ATON@ @STRERROR@ @RANDOM@ @SRANDOM@
OBJS
+=
@GETHOSTNAME@ @GETRUSAGE@ @STRCASECMP@
all
:
submake SUBSYS.o
...
...
src/backend/port/getrusage.c
View file @
3aae0f53
...
...
@@ -4,6 +4,11 @@
#include "rusagestub.h"
#include "port-protos.h"
#ifdef 0
/* this is from univel port ... how does compiler define? */
/* same for i386_solaris port ... how does compiler define? */
/* same for sco port ... how does compiler define? */
/* same for sparc_solaris port ... how does compiler define? */
/* same for svr4 port ... how does compiler define? */
int
getrusage
(
int
who
,
struct
rusage
*
rusage
)
{
...
...
@@ -44,4 +49,11 @@ getrusage(int who, struct rusage * rusage)
rusage
->
ru_stime
.
tv_usec
=
TICK_TO_USEC
(
u
,
tick_rate
);
return
(
0
);
}
#endif
#ifdef 0
/* this is for hpux port ... how does compiler define? */
getrusage
(
int
who
,
struct
rusage
*
ru
)
{
return
(
syscall
(
SYS_GETRUSAGE
,
who
,
ru
));
}
#endif
src/backend/port/hpux/port.c
View file @
3aae0f53
...
...
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/port/hpux/Attic/port.c,v 1.
3 1997/09/07 04:45:52 momjian
Exp $
* $Header: /cvsroot/pgsql/src/backend/port/hpux/Attic/port.c,v 1.
4 1997/12/19 02:45:44 scrappy
Exp $
*
* NOTES
* For the most part, this file gets around some non-POSIX calls
...
...
@@ -30,20 +30,3 @@ init_address_fixup()
* by the kernel.
*/
}
long
random
()
{
return
(
lrand48
());
}
void
srandom
(
unsigned
seed
)
{
srand48
((
long
int
)
seed
);
}
getrusage
(
int
who
,
struct
rusage
*
ru
)
{
return
(
syscall
(
SYS_GETRUSAGE
,
who
,
ru
));
}
src/backend/port/i386_solaris/port.c
deleted
100644 → 0
View file @
3ad815fc
/*-------------------------------------------------------------------------
*
* port.c--
* SunOS5-specific routines
*
* Copyright (c) 1994, Regents of the University of California
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/port/i386_solaris/Attic/port.c,v 1.3 1997/09/08 02:26:28 momjian Exp $
*
*-------------------------------------------------------------------------
*/
#include <math.h>
/* for pow() prototype */
#include <errno.h>
#include "rusagestub.h"
long
random
()
{
return
(
lrand48
());
}
void
srandom
(
int
seed
)
{
srand48
((
long
int
)
seed
);
}
int
getrusage
(
int
who
,
struct
rusage
*
rusage
)
{
struct
tms
tms
;
register
int
tick_rate
=
CLK_TCK
;
/* ticks per second */
clock_t
u
,
s
;
if
(
rusage
==
(
struct
rusage
*
)
NULL
)
{
errno
=
EFAULT
;
return
(
-
1
);
}
if
(
times
(
&
tms
)
<
0
)
{
/* errno set by times */
return
(
-
1
);
}
switch
(
who
)
{
case
RUSAGE_SELF
:
u
=
tms
.
tms_utime
;
s
=
tms
.
tms_stime
;
break
;
case
RUSAGE_CHILDREN
:
u
=
tms
.
tms_cutime
;
s
=
tms
.
tms_cstime
;
break
;
default:
errno
=
EINVAL
;
return
(
-
1
);
}
#define TICK_TO_SEC(T, RATE) ((T)/(RATE))
#define TICK_TO_USEC(T,RATE) (((T)%(RATE)*1000000)/RATE)
rusage
->
ru_utime
.
tv_sec
=
TICK_TO_SEC
(
u
,
tick_rate
);
rusage
->
ru_utime
.
tv_usec
=
TICK_TO_USEC
(
u
,
tick_rate
);
rusage
->
ru_stime
.
tv_sec
=
TICK_TO_SEC
(
s
,
tick_rate
);
rusage
->
ru_stime
.
tv_usec
=
TICK_TO_USEC
(
u
,
tick_rate
);
return
(
0
);
}
src/backend/port/
sco/
rusagestub.h
→
src/backend/port/rusagestub.h
View file @
3aae0f53
File moved
src/backend/port/sco/Makefile
deleted
100644 → 0
View file @
3ad815fc
#-------------------------------------------------------------------------
#
# Makefile--
# Makefile for port/sco
#
# IDENTIFICATION
# $Header: /cvsroot/pgsql/src/backend/port/sco/Attic/Makefile,v 1.1 1997/07/28 01:33:54 momjian Exp $
#
#-------------------------------------------------------------------------
SRCDIR
=
../../..
include
../../../Makefile.global
INCLUDE_OPT
=
-I
../..
\
-I
../../../include
CFLAGS
+=
$(INCLUDE_OPT)
OBJS
=
port.o
all
:
SUBSYS.o
SUBSYS.o
:
$(OBJS)
$(LD)
-r
-o
SUBSYS.o
$(OBJS)
depend dep
:
$(CC)
-MM
$(INCLUDE_OPT)
*
.c
>
depend
clean
:
rm
-f
SUBSYS.o
$(OBJS)
ifeq
(depend,$(wildcard depend))
include
depend
endif
src/backend/port/sco/port.c
deleted
100644 → 0
View file @
3ad815fc
/*-------------------------------------------------------------------------
*
* port.c--
* SCO 3.2v5.0.2 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 <unistd.h>
#include <math.h>
/* for pow() prototype */
#include <errno.h>
#include "rusagestub.h"
int
getrusage
(
int
who
,
struct
rusage
*
rusage
)
{
struct
tms
tms
;
register
int
tick_rate
=
CLK_TCK
;
/* ticks per second */
clock_t
u
,
s
;
if
(
rusage
==
(
struct
rusage
*
)
NULL
)
{
errno
=
EFAULT
;
return
(
-
1
);
}
if
(
times
(
&
tms
)
<
0
)
{
/* errno set by times */
return
(
-
1
);
}
switch
(
who
)
{
case
RUSAGE_SELF
:
u
=
tms
.
tms_utime
;
s
=
tms
.
tms_stime
;
break
;
case
RUSAGE_CHILDREN
:
u
=
tms
.
tms_cutime
;
s
=
tms
.
tms_cstime
;
break
;
default:
errno
=
EINVAL
;
return
(
-
1
);
}
#define TICK_TO_SEC(T, RATE) ((T)/(RATE))
#define TICK_TO_USEC(T,RATE) (((T)%(RATE)*1000000)/RATE)
rusage
->
ru_utime
.
tv_sec
=
TICK_TO_SEC
(
u
,
tick_rate
);
rusage
->
ru_utime
.
tv_usec
=
TICK_TO_USEC
(
u
,
tick_rate
);
rusage
->
ru_stime
.
tv_sec
=
TICK_TO_SEC
(
s
,
tick_rate
);
rusage
->
ru_stime
.
tv_usec
=
TICK_TO_USEC
(
u
,
tick_rate
);
return
(
0
);
}
src/backend/port/sparc_solaris/Makefile
View file @
3aae0f53
...
...
@@ -4,7 +4,7 @@
# Makefile for port/sparc_solaris
#
# IDENTIFICATION
# $Header: /cvsroot/pgsql/src/backend/port/sparc_solaris/Attic/Makefile,v 1.
3 1996/11/10 00:38:38 bryanh
Exp $
# $Header: /cvsroot/pgsql/src/backend/port/sparc_solaris/Attic/Makefile,v 1.
4 1997/12/19 02:46:16 scrappy
Exp $
#
#-------------------------------------------------------------------------
...
...
@@ -17,7 +17,7 @@ INCLUDE_OPT = -I.. \
CFLAGS
+=
$(INCLUDE_OPT)
OBJS
=
port.o
tas.o
OBJS
=
tas.o
all
:
SUBSYS.o
...
...
src/backend/port/sparc_solaris/port.c
deleted
100644 → 0
View file @
3ad815fc
/*-------------------------------------------------------------------------
*
* port.c--
* SunOS5-specific routines
*
* Copyright (c) 1994, Regents of the University of California
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/port/sparc_solaris/Attic/port.c,v 1.7 1997/09/18 16:09:15 scrappy Exp $
*
*-------------------------------------------------------------------------
*/
#include <math.h>
/* for pow() prototype */
#include <stdlib.h>
#include <errno.h>
#include "postgres.h"
#include "port-protos.h"
#ifndef HAVE_GETRUSAGE
#include "rusagestub.h"
#endif
/* HAVE_GETRUSAGE */
#ifndef HAVE_RANDOM
long
random
()
{
return
(
lrand48
());
}
#endif
#ifndef HAVE_RANDOM
void
srandom
(
int
seed
)
{
srand48
((
long
int
)
seed
);
}
#endif
#ifndef HAVE_GETRUSAGE
int
getrusage
(
int
who
,
struct
rusage
*
rusage
)
{
struct
tms
tms
;
register
int
tick_rate
=
CLK_TCK
;
/* ticks per second */
clock_t
u
,
s
;
if
(
rusage
==
(
struct
rusage
*
)
NULL
)
{
errno
=
EFAULT
;
return
(
-
1
);
}
if
(
times
(
&
tms
)
<
0
)
{
/* errno set by times */
return
(
-
1
);
}
switch
(
who
)
{
case
RUSAGE_SELF
:
u
=
tms
.
tms_utime
;
s
=
tms
.
tms_stime
;
break
;
case
RUSAGE_CHILDREN
:
u
=
tms
.
tms_cutime
;
s
=
tms
.
tms_cstime
;
break
;
default:
errno
=
EINVAL
;
return
(
-
1
);
}
#define TICK_TO_SEC(T, RATE) ((T)/(RATE))
#define TICK_TO_USEC(T,RATE) (((T)%(RATE)*1000000)/RATE)
rusage
->
ru_utime
.
tv_sec
=
TICK_TO_SEC
(
u
,
tick_rate
);
rusage
->
ru_utime
.
tv_usec
=
TICK_TO_USEC
(
u
,
tick_rate
);
rusage
->
ru_stime
.
tv_sec
=
TICK_TO_SEC
(
s
,
tick_rate
);
rusage
->
ru_stime
.
tv_usec
=
TICK_TO_USEC
(
u
,
tick_rate
);
return
(
0
);
}
#endif
/* HAVE_GETRUSAGE */
src/backend/port/srandom.c
View file @
3aae0f53
...
...
@@ -5,7 +5,7 @@
#include "port-protos.h"
void
srandom
(
int
seed
)
srandom
(
unsigned
int
seed
)
{
srand48
((
long
int
)
seed
);
}
...
...
src/backend/port/s
vr4/port
.c
→
src/backend/port/s
trcasecmp
.c
View file @
3aae0f53
/*-------------------------------------------------------------------------
*
* 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 <math.h>
/* for pow() prototype */
#include <errno.h>
#include "rusagestub.h"
long
random
()
{
return
(
lrand48
());
}
void
srandom
(
int
seed
)
{
srand48
((
long
int
)
seed
);
}
int
getrusage
(
int
who
,
struct
rusage
*
rusage
)
{
struct
tms
tms
;
register
int
tick_rate
=
CLK_TCK
;
/* ticks per second */
clock_t
u
,
s
;
if
(
rusage
==
(
struct
rusage
*
)
NULL
)
{
errno
=
EFAULT
;
return
(
-
1
);
}
if
(
times
(
&
tms
)
<
0
)
{
/* errno set by times */
return
(
-
1
);
}
switch
(
who
)
{
case
RUSAGE_SELF
:
u
=
tms
.
tms_utime
;
s
=
tms
.
tms_stime
;
break
;
case
RUSAGE_CHILDREN
:
u
=
tms
.
tms_cutime
;
s
=
tms
.
tms_cstime
;
break
;
default:
errno
=
EINVAL
;
return
(
-
1
);
}
#define TICK_TO_SEC(T, RATE) ((T)/(RATE))
#define TICK_TO_USEC(T,RATE) (((T)%(RATE)*1000000)/RATE)
rusage
->
ru_utime
.
tv_sec
=
TICK_TO_SEC
(
u
,
tick_rate
);
rusage
->
ru_utime
.
tv_usec
=
TICK_TO_USEC
(
u
,
tick_rate
);
rusage
->
ru_stime
.
tv_sec
=
TICK_TO_SEC
(
s
,
tick_rate
);
rusage
->
ru_stime
.
tv_usec
=
TICK_TO_USEC
(
u
,
tick_rate
);
return
(
0
);
}
/*
* Copyright (c) 1987 Regents of the University of California.
* All rights reserved.
...
...
src/backend/port/svr4/Makefile
deleted
100644 → 0
View file @
3ad815fc
#-------------------------------------------------------------------------
#
# Makefile--
# Makefile for port/svr4
#
# IDENTIFICATION
# $Header: /cvsroot/pgsql/src/backend/port/svr4/Attic/Makefile,v 1.2 1996/11/09 06:20:26 momjian Exp $
#
#-------------------------------------------------------------------------
SRCDIR
=
../../..
include
../../../Makefile.global
INCLUDE_OPT
=
-I
../..
\
-I
../../../include
CFLAGS
+=
$(INCLUDE_OPT)
OBJS
=
port.o
all
:
SUBSYS.o
SUBSYS.o
:
$(OBJS)
$(LD)
-r
-o
SUBSYS.o
$(OBJS)
depend dep
:
$(CC)
-MM
$(INCLUDE_OPT)
*
.c
>
depend
clean
:
rm
-f
SUBSYS.o
$(OBJS)
ifeq
(depend,$(wildcard depend))
include
depend
endif
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment