Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Greenplum
Gpdb
提交
8799d846
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,发现更多精彩内容 >>
提交
8799d846
编写于
12月 20, 2001
作者:
B
Bruce Momjian
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Add memcmp() test and new memcmp.c file, for SunOS. Tested by Tatsuo.
上级
960f6a5f
变更
6
展开全部
隐藏空白更改
内联
并排
Showing
6 changed file
with
265 addition
and
158 deletion
+265
-158
config/c-library.m4
config/c-library.m4
+25
-1
configure
configure
+197
-154
configure.in
configure.in
+3
-0
src/Makefile.global.in
src/Makefile.global.in
+2
-1
src/backend/port/Makefile.in
src/backend/port/Makefile.in
+2
-2
src/backend/port/memcmp.c
src/backend/port/memcmp.c
+36
-0
未找到文件。
config/c-library.m4
浏览文件 @
8799d846
# Macros that test various C library quirks
# $Header: /cvsroot/pgsql/config/c-library.m4,v 1.
9 2001/09/07 19:52:53
momjian Exp $
# $Header: /cvsroot/pgsql/config/c-library.m4,v 1.
10 2001/12/20 21:23:05
momjian Exp $
# PGAC_VAR_INT_TIMEZONE
...
...
@@ -36,6 +36,30 @@ if test x"$pgac_cv_func_gettimeofday_1arg" = xyes ; then
fi])# PGAC_FUNC_GETTIMEOFDAY_1ARG
# PGAC_FUNC_MEMCMP
# -----------
# Check if memcmp() properly handles negative bytes and returns +/-.
# SunOS does not.
# AC_FUNC_MEMCMP
AC_DEFUN(PGAC_FUNC_MEMCMP,
[AC_CACHE_CHECK(for 8-bit clean memcmp, pgac_cv_func_memcmp_clean,
[AC_TRY_RUN([
main()
{
char c0 = 0x40, c1 = 0x80, c2 = 0x81;
exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
}
], pgac_cv_func_memcmp_clean=yes, pgac_cv_func_memcmp_clean=no,
pgac_cv_func_memcmp_clean=no)])
if test $pgac_cv_func_memcmp_clean = no ; then
MEMCMP=memcmp.o
else
MEMCMP=
fi
AC_SUBST(MEMCMP)dnl
])
# PGAC_UNION_SEMUN
# ----------------
# Check if `union semun' exists. Define HAVE_UNION_SEMUN if so.
...
...
configure
浏览文件 @
8799d846
此差异已折叠。
点击以展开。
configure.in
浏览文件 @
8799d846
...
...
@@ -809,6 +809,9 @@ PGAC_VAR_INT_TIMEZONE
AC_FUNC_ACCEPT_ARGTYPES
PGAC_FUNC_GETTIMEOFDAY_1ARG
# SunOS doesn't handle negative byte comparisons properly with +/- return
PGAC_FUNC_MEMCMP
AC_CHECK_FUNCS([fcvt getopt_long memmove pstat setproctitle setsid sigprocmask sysconf waitpid dlopen fdatasync])
dnl Check whether <unistd.h> declares fdatasync().
...
...
src/Makefile.global.in
浏览文件 @
8799d846
# -*-makefile-*-
# $Header: /cvsroot/pgsql/src/Makefile.global.in,v 1.14
0 2001/10/13 15:24:23 tgl
Exp $
# $Header: /cvsroot/pgsql/src/Makefile.global.in,v 1.14
1 2001/12/20 21:23:05 momjian
Exp $
#------------------------------------------------------------------------------
# All PostgreSQL makefiles include this file and use the variables it sets,
...
...
@@ -328,6 +328,7 @@ INET_ATON = @INET_ATON@
STRERROR
=
@STRERROR@
SNPRINTF
=
@SNPRINTF@
STRDUP
=
@STRDUP@
MEMCMP
=
@MEMCMP@
STRTOUL
=
@STRTOUL@
...
...
src/backend/port/Makefile.in
浏览文件 @
8799d846
...
...
@@ -13,7 +13,7 @@
# be converted to Method 2.
#
# IDENTIFICATION
# $Header: /cvsroot/pgsql/src/backend/port/Attic/Makefile.in,v 1.
29 2001/05/08 19:38:57 petere
Exp $
# $Header: /cvsroot/pgsql/src/backend/port/Attic/Makefile.in,v 1.
30 2001/12/20 21:23:05 momjian
Exp $
#
#-------------------------------------------------------------------------
...
...
@@ -22,7 +22,7 @@ top_builddir = ../../..
include
$(top_builddir)/src/Makefile.global
OBJS
=
dynloader.o @INET_ATON@ @STRERROR@ @MISSING_RANDOM@ @SRANDOM@
OBJS
+=
@GETHOSTNAME@ @GETRUSAGE@ @STRCASECMP@ @TAS@ @ISINF@
OBJS
+=
@GETHOSTNAME@ @GETRUSAGE@ @
MEMCMP@ @
STRCASECMP@ @TAS@ @ISINF@
OBJS
+=
@STRTOL@ @STRTOUL@ @SNPRINTF@
ifdef
STRDUP
OBJS
+=
$(top_builddir)
/src/utils/strdup.o
...
...
src/backend/port/memcmp.c
0 → 100644
浏览文件 @
8799d846
/*-------------------------------------------------------------------------
*
* memcmp.c
* compares memory bytes
*
* Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/port/Attic/memcmp.c,v 1.1 2001/12/20 21:23:05 momjian Exp $
*
* This file was taken from NetBSD and is used by SunOS because memcmp
* on that platform does not properly compare negative bytes.
*
*-------------------------------------------------------------------------
*/
#include <string.h>
/*
* Compare memory regions.
*/
int
memcmp
(
const
void
*
s1
,
const
void
*
s2
,
size_t
n
)
{
if
(
n
!=
0
)
{
const
unsigned
char
*
p1
=
s1
,
*
p2
=
s2
;
do
{
if
(
*
p1
++
!=
*
p2
++
)
return
(
*--
p1
-
*--
p2
);
}
while
(
--
n
!=
0
);
}
return
0
;
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录