Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Greenplum
Gpdb
提交
3aae0f53
G
Gpdb
项目概览
Greenplum
/
Gpdb
通知
7
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
G
Gpdb
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
3aae0f53
编写于
12月 19, 1997
作者:
M
Marc G. Fournier
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
More cleanups...several ports are major redundancies of other ports
上级
3ad815fc
变更
12
隐藏空白更改
内联
并排
Showing
12 changed file
with
19 addition
and
377 deletion
+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
未找到文件。
src/backend/port/Makefile.in
浏览文件 @
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
浏览文件 @
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
浏览文件 @
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
已删除
100644 → 0
浏览文件 @
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
浏览文件 @
3aae0f53
文件已移动
src/backend/port/sco/Makefile
已删除
100644 → 0
浏览文件 @
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
已删除
100644 → 0
浏览文件 @
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
浏览文件 @
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
已删除
100644 → 0
浏览文件 @
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
浏览文件 @
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
浏览文件 @
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
已删除
100644 → 0
浏览文件 @
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
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录