Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Greenplum
Gpdb
提交
f16874c2
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,发现更多精彩内容 >>
提交
f16874c2
编写于
5月 19, 2004
作者:
B
Bruce Momjian
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Win32 can't have the same function coming from two library object files,
so we make is_absolute_path a macro so libpq doesn't use path.o.
上级
48eb73b5
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
31 addition
and
25 deletion
+31
-25
src/include/port.h
src/include/port.h
+26
-2
src/interfaces/libpq/Makefile
src/interfaces/libpq/Makefile
+4
-4
src/port/path.c
src/port/path.c
+1
-19
未找到文件。
src/include/port.h
浏览文件 @
f16874c2
...
...
@@ -6,7 +6,7 @@
* Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
* $PostgreSQL: pgsql/src/include/port.h,v 1.3
2 2004/05/17 14:35:34
momjian Exp $
* $PostgreSQL: pgsql/src/include/port.h,v 1.3
3 2004/05/19 04:21:49
momjian Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -21,7 +21,6 @@
bool
set_noblock
(
int
sock
);
/* Portable path handling for Unix/Win32 */
extern
bool
is_absolute_path
(
const
char
*
filename
);
extern
char
*
first_path_separator
(
const
char
*
filename
);
extern
char
*
last_path_separator
(
const
char
*
filename
);
extern
void
canonicalize_path
(
char
*
path
);
...
...
@@ -32,6 +31,31 @@ extern void get_include_path(const char *my_exec_path, char *ret_path);
extern
void
get_pkginclude_path
(
const
char
*
my_exec_path
,
char
*
ret_path
);
extern
void
get_pkglib_path
(
const
char
*
my_exec_path
,
char
*
ret_path
);
/*
* is_absolute_path
*
* This capability is needed by libpq and initdb.c
* On Win32, you can't reference the same object file that is
* in two different libraries (pgport and libpq), so a macro is best.
*/
#ifndef WIN32
#define is_absolute_path(filename) \
( \
((filename)[0] == '/') \
)
#else
#define is_absolute_path(filename) \
( \
((filename)[0] == '/') || \
(filename)[0] == '\\' || \
(isalpha((filename)[0]) && (filename)[1] == ':' && \
((filename)[2] == '\\' || (filename)[2] == '/')) \
)
#endif
/* Portable way to find binaries */
extern
int
find_my_exec
(
const
char
*
argv0
,
char
*
full_path
);
...
...
src/interfaces/libpq/Makefile
浏览文件 @
f16874c2
...
...
@@ -4,7 +4,7 @@
#
# Copyright (c) 1994, Regents of the University of California
#
# $PostgreSQL: pgsql/src/interfaces/libpq/Makefile,v 1.10
6 2004/05/17 14:35:34
momjian Exp $
# $PostgreSQL: pgsql/src/interfaces/libpq/Makefile,v 1.10
7 2004/05/19 04:21:49
momjian Exp $
#
#-------------------------------------------------------------------------
...
...
@@ -30,7 +30,7 @@ override CFLAGS += $(PTHREAD_CFLAGS) \
OBJS
=
fe-auth.o fe-connect.o fe-exec.o fe-misc.o fe-print.o fe-lobj.o
\
fe-protocol2.o fe-protocol3.o pqexpbuffer.o pqsignal.o fe-secure.o
\
dllist.o md5.o ip.o wchar.o encnames.o
\
$(
filter
crypt.o getaddrinfo.o inet_aton.o noblock.o pgstrcasecmp.o snprintf.o strerror.o open.o
path.o
thread.o,
$(LIBOBJS)
)
$(
filter
crypt.o getaddrinfo.o inet_aton.o noblock.o pgstrcasecmp.o snprintf.o strerror.o open.o thread.o,
$(LIBOBJS)
)
ifeq
($(PORTNAME), win32)
OBJS
+=
win32.o
endif
...
...
@@ -59,7 +59,7 @@ backend_src = $(top_srcdir)/src/backend
# For port modules, this only happens if configure decides the module
# is needed (see filter hack in OBJS, above).
crypt.c getaddrinfo.c inet_aton.c noblock.c pgstrcasecmp.c snprintf.c strerror.c open.c
path.c
thread.c
:
% : $(top_srcdir)/src/port/%
crypt.c getaddrinfo.c inet_aton.c noblock.c pgstrcasecmp.c snprintf.c strerror.c open.c thread.c
:
% : $(top_srcdir)/src/port/%
rm
-f
$@
&&
$(LN_S)
$<
.
md5.c ip.c
:
% : $(backend_src)/libpq/%
...
...
@@ -85,4 +85,4 @@ uninstall: uninstall-lib
rm
-f
$(DESTDIR)$(includedir)
/libpq-fe.h
$(DESTDIR)$(includedir_internal)
/libpq-int.h
$(DESTDIR)$(includedir_internal)
/pqexpbuffer.h
clean distclean maintainer-clean
:
clean-lib
rm
-f
$(OBJS)
crypt.c getaddrinfo.c inet_aton.c noblock.c pgstrcasecmp.c snprintf.c strerror.c open.c
path.c
thread.c dllist.c md5.c ip.c encnames.c wchar.c
rm
-f
$(OBJS)
crypt.c getaddrinfo.c inet_aton.c noblock.c pgstrcasecmp.c snprintf.c strerror.c open.c thread.c dllist.c md5.c ip.c encnames.c wchar.c
src/port/path.c
浏览文件 @
f16874c2
...
...
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/port/path.c,v 1.
9 2004/05/18 03:36:45
momjian Exp $
* $PostgreSQL: pgsql/src/port/path.c,v 1.
10 2004/05/19 04:21:49
momjian Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -34,24 +34,6 @@ static void trim_trailing_separator(char *path);
}
/*
* is_absolute_path
*/
bool
is_absolute_path
(
const
char
*
filename
)
{
return
filename
[
0
]
==
'/'
#ifdef WIN32
/* WIN32 paths can either have forward or
* backward slashes */
||
filename
[
0
]
==
'\\'
||
(
isalpha
(
filename
[
0
])
&&
filename
[
1
]
==
':'
&&
(
filename
[
2
]
==
'\\'
||
filename
[
2
]
==
'/'
))
#endif
;
}
/*
* first_path_separator
*/
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录