Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Greenplum
Gpdb
提交
ecc198bd
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,发现更多精彩内容 >>
提交
ecc198bd
编写于
5月 19, 2004
作者:
B
Bruce Momjian
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Re-add elog() to exec.c, per Tom.
上级
ba71d824
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
45 addition
and
22 deletion
+45
-22
src/bin/initdb/Makefile
src/bin/initdb/Makefile
+7
-3
src/bin/pg_dump/Makefile
src/bin/pg_dump/Makefile
+8
-4
src/bin/psql/Makefile
src/bin/psql/Makefile
+7
-3
src/interfaces/ecpg/preproc/Makefile
src/interfaces/ecpg/preproc/Makefile
+7
-3
src/port/exec.c
src/port/exec.c
+16
-9
未找到文件。
src/bin/initdb/Makefile
浏览文件 @
ecc198bd
...
...
@@ -5,7 +5,7 @@
# Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group
# Portions Copyright (c) 1994, Regents of the University of California
#
# $PostgreSQL: pgsql/src/bin/initdb/Makefile,v 1.
39 2004/05/18 20:18:58
momjian Exp $
# $PostgreSQL: pgsql/src/bin/initdb/Makefile,v 1.
40 2004/05/19 17:15:20
momjian Exp $
#
#-------------------------------------------------------------------------
...
...
@@ -15,13 +15,17 @@ include $(top_builddir)/src/Makefile.global
override CPPFLAGS
:
= -DFRONTEND -I$(libpq_srcdir) $(CPPFLAGS)
OBJS
=
initdb.o
OBJS
=
initdb.o
\
$(
filter
exec.o,
$(LIBOBJS)
)
all
:
submake-libpq submake-libpgport initdb
initdb
:
$(OBJS) $(libpq_builddir)/libpq.a
$(CC)
$(CFLAGS)
$(OBJS)
$(libpq)
$(LDFLAGS)
$(LIBS)
-o
$@$(X)
exec.c
:
% : $(top_srcdir)/src/port/%
rm
-f
$@
&&
$(LN_S)
$<
.
install
:
all installdirs
$(INSTALL_PROGRAM)
initdb
$(X)
$(DESTDIR)$(bindir)
/initdb
$(X)
...
...
@@ -32,7 +36,7 @@ uninstall:
rm
-f
$(DESTDIR)$(bindir)
/initdb
$(X)
clean distclean maintainer-clean
:
rm
-f
initdb
$(X)
$(OBJS)
rm
-f
initdb
$(X)
$(OBJS)
exec.c
# ensure that changes in datadir propagate into object file
...
...
src/bin/pg_dump/Makefile
浏览文件 @
ecc198bd
...
...
@@ -5,7 +5,7 @@
# Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group
# Portions Copyright (c) 1994, Regents of the University of California
#
# $PostgreSQL: pgsql/src/bin/pg_dump/Makefile,v 1.4
8 2004/05/18 20:18:58
momjian Exp $
# $PostgreSQL: pgsql/src/bin/pg_dump/Makefile,v 1.4
9 2004/05/19 17:15:20
momjian Exp $
#
#-------------------------------------------------------------------------
...
...
@@ -18,6 +18,7 @@ override CPPFLAGS += -DFRONTEND
OBJS
=
pg_backup_archiver.o pg_backup_db.o pg_backup_custom.o
\
pg_backup_files.o pg_backup_null.o pg_backup_tar.o
\
dumputils.o
PG_DUMPALL_OBJS
=
$(
filter
exec.o,
$(LIBOBJS)
)
EXTRA_OBJS
=
$(top_builddir)
/src/backend/parser/keywords.o
...
...
@@ -32,8 +33,11 @@ pg_dump: pg_dump.o common.o pg_dump_sort.o $(OBJS) $(libpq_builddir)/libpq.a
pg_restore
:
pg_restore.o $(OBJS) $(libpq_builddir)/libpq.a
$(CC)
$(CFLAGS)
pg_restore.o
$(OBJS)
$(EXTRA_OBJS)
$(libpq)
$(LDFLAGS)
$(LIBS)
-o
$@$(X)
pg_dumpall
:
pg_dumpall.o dumputils.o $(libpq_builddir)/libpq.a
$(CC)
$(CFLAGS)
pg_dumpall.o dumputils.o
$(EXTRA_OBJS)
$(libpq)
$(LDFLAGS)
$(LIBS)
-o
$@$(X)
pg_dumpall
:
pg_dumpall.o dumputils.o $(PG_DUMPALL_OBJS) $(libpq_builddir)/libpq.a
$(CC)
$(CFLAGS)
pg_dumpall.o dumputils.o
$(PG_DUMPALL_OBJS)
$(EXTRA_OBJS)
$(libpq)
$(LDFLAGS)
$(LIBS)
-o
$@$(X)
exec.c
:
% : $(top_srcdir)/src/port/%
rm
-f
$@
&&
$(LN_S)
$<
.
.PHONY
:
submake-backend
submake-backend
:
...
...
@@ -52,4 +56,4 @@ uninstall:
rm
-f
$(
addprefix
$(DESTDIR)$(bindir)
/, pg_dump
$(X)
pg_restore
$(X)
pg_dumpall
$(X)
)
clean distclean maintainer-clean
:
rm
-f
pg_dump
$(X)
pg_restore
$(X)
pg_dumpall
$(X)
$(OBJS)
pg_dump.o common.o pg_dump_sort.o pg_restore.o pg_dumpall.o
rm
-f
pg_dump
$(X)
pg_restore
$(X)
pg_dumpall
$(X)
$(OBJS)
pg_dump.o common.o pg_dump_sort.o pg_restore.o pg_dumpall.o
exec.c
src/bin/psql/Makefile
浏览文件 @
ecc198bd
...
...
@@ -5,7 +5,7 @@
# Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group
# Portions Copyright (c) 1994, Regents of the University of California
#
# $PostgreSQL: pgsql/src/bin/psql/Makefile,v 1.4
5 2004/05/18 20:18:58
momjian Exp $
# $PostgreSQL: pgsql/src/bin/psql/Makefile,v 1.4
6 2004/05/19 17:15:21
momjian Exp $
#
#-------------------------------------------------------------------------
...
...
@@ -19,7 +19,8 @@ override CPPFLAGS := -I$(libpq_srcdir) $(CPPFLAGS) -DFRONTEND
OBJS
=
command.o common.o help.o input.o stringutils.o mainloop.o copy.o
\
startup.o prompt.o variables.o large_obj.o print.o describe.o
\
psqlscan.o tab-complete.o mbprint.o
psqlscan.o tab-complete.o mbprint.o
\
$(
filter
exec.o,
$(LIBOBJS)
)
FLEXFLAGS
=
-Cfe
...
...
@@ -29,6 +30,9 @@ all: submake-libpq submake-libpgport psql
psql
:
$(OBJS) $(libpq_builddir)/libpq.a
$(CC)
$(CFLAGS)
$(OBJS)
$(libpq)
$(LDFLAGS)
$(LIBS)
-o
$@$(X)
exec.c
:
% : $(top_srcdir)/src/port/%
rm
-f
$@
&&
$(LN_S)
$<
.
help.o
:
$(srcdir)/sql_help.h
ifdef
PERL
...
...
@@ -60,7 +64,7 @@ uninstall:
# psqlscan.c is in the distribution tarball, so is not cleaned here
clean distclean
:
rm
-f
psql
$(X)
$(OBJS)
rm
-f
psql
$(X)
$(OBJS)
exec.c
maintainer-clean
:
distclean
rm
-f
$(srcdir)
/sql_help.h
$(srcdir)
/psqlscan.c
src/interfaces/ecpg/preproc/Makefile
浏览文件 @
ecc198bd
# $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/Makefile,v 1.10
5 2004/05/18 20:18:58
momjian Exp $
# $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/Makefile,v 1.10
6 2004/05/19 17:15:21
momjian Exp $
subdir
=
src/interfaces/ecpg/preproc
top_builddir
=
../../../..
...
...
@@ -19,13 +19,17 @@ endif
override
CFLAGS
+=
$(PTHREAD_CFLAGS)
OBJS
=
preproc.o type.o ecpg.o ecpg_keywords.o output.o
\
keywords.o c_keywords.o ../ecpglib/typename.o descriptor.o variable.o
keywords.o c_keywords.o ../ecpglib/typename.o descriptor.o variable.o
\
$(
filter
exec.o,
$(LIBOBJS)
)
all
:
submake-libpgport ecpg
ecpg
:
$(OBJS)
$(CC)
$(CFLAGS)
$(LDFLAGS)
$^
$(LIBS)
$(PTHREAD_LIBS)
-o
$@$(X)
exec.c
:
% : $(top_srcdir)/src/port/%
rm
-f
$@
&&
$(LN_S)
$<
.
# pgc is compiled as part of preproc
preproc.o
:
$(srcdir)/pgc.c
...
...
@@ -62,7 +66,7 @@ uninstall:
rm
-f
$(DESTDIR)$(bindir)
/ecpg
$(X)
clean distclean
:
rm
-f
*
.o ecpg
$(X)
rm
-f
*
.o ecpg
$(X)
exec.c
# garbage from partial builds
@rm
-f
y.tab.c
y.tab.h
# garbage from development
...
...
src/port/exec.c
浏览文件 @
ecc198bd
...
...
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/port/exec.c,v 1.
9 2004/05/19 04:36:33
momjian Exp $
* $PostgreSQL: pgsql/src/port/exec.c,v 1.
10 2004/05/19 17:15:21
momjian Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -48,6 +48,13 @@
#define S_IXOTH ((S_IXUSR)>>6)
#endif
#ifndef FRONTEND
/* We use only 3-parameter elog calls in this file, for simplicity */
#define log_error(str, param) elog(LOG, (str), (param))
#else
#define log_error(str, param) fprintf(stderr, (str), (param))
#endif
static
void
win32_make_absolute
(
char
*
path
);
/*
...
...
@@ -192,7 +199,7 @@ find_my_exec(const char *argv0, char *full_path)
{
if
(
*++
p
==
'\0'
)
{
fprintf
(
stderr
,
"argv[0] ends with a path separator
\"
%s
\"
"
,
argv0
);
log_error
(
"argv[0] ends with a path separator
\"
%s
\"
"
,
argv0
);
return
-
1
;
}
if
(
is_absolute_path
(
argv0
)
||
!
getcwd
(
buf
,
MAXPGPATH
))
...
...
@@ -208,7 +215,7 @@ find_my_exec(const char *argv0, char *full_path)
}
else
{
fprintf
(
stderr
,
"invalid binary
\"
%s
\"
"
,
buf
);
log_error
(
"invalid binary
\"
%s
\"
"
,
buf
);
return
-
1
;
}
}
...
...
@@ -245,7 +252,7 @@ find_my_exec(const char *argv0, char *full_path)
case
-
1
:
/* wasn't even a candidate, keep looking */
break
;
case
-
2
:
/* found but disqualified */
fprintf
(
stderr
,
"could not read binary
\"
%s
\"
"
,
buf
);
log_error
(
"could not read binary
\"
%s
\"
"
,
buf
);
free
(
path
);
return
-
1
;
}
...
...
@@ -255,7 +262,7 @@ find_my_exec(const char *argv0, char *full_path)
free
(
path
);
}
fprintf
(
stderr
,
"could not find a
\"
%s
\"
to execute"
,
argv0
);
log_error
(
"could not find a
\"
%s
\"
to execute"
,
argv0
);
return
-
1
;
#if 0
...
...
@@ -337,17 +344,17 @@ pclose_check(FILE *stream)
}
else
if
(
WIFEXITED
(
exitstatus
))
{
fprintf
(
stderr
,
_
(
"child process exited with exit code %d
\n
"
),
log_error
(
_
(
"child process exited with exit code %d
\n
"
),
WEXITSTATUS
(
exitstatus
));
}
else
if
(
WIFSIGNALED
(
exitstatus
))
{
fprintf
(
stderr
,
_
(
"child process was terminated by signal %d
\n
"
),
log_error
(
_
(
"child process was terminated by signal %d
\n
"
),
WTERMSIG
(
exitstatus
));
}
else
{
fprintf
(
stderr
,
_
(
"child process exited with unrecognized status %d
\n
"
),
log_error
(
_
(
"child process exited with unrecognized status %d
\n
"
),
exitstatus
);
}
...
...
@@ -369,7 +376,7 @@ win32_make_absolute(char *path)
if
(
_fullpath
(
abspath
,
path
,
MAXPGPATH
)
==
NULL
)
{
fprintf
(
stderr
,
"Win32 path expansion failed: %s"
,
strerror
(
errno
));
log_error
(
"Win32 path expansion failed: %s"
,
strerror
(
errno
));
StrNCpy
(
abspath
,
path
,
MAXPGPATH
);
}
canonicalize_path
(
abspath
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录