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
ef6164de
Commit
ef6164de
authored
Aug 29, 2000
by
Peter Eisentraut
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert removal of signed, volatile, and signal handler arg type tests.
parent
dffd8cac
Changes
13
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
376 additions
and
230 deletions
+376
-230
aclocal.m4
aclocal.m4
+36
-6
config/c-compiler.m4
config/c-compiler.m4
+31
-1
configure
configure
+247
-183
configure.in
configure.in
+2
-0
src/backend/commands/async.c
src/backend/commands/async.c
+2
-2
src/backend/postmaster/postmaster.c
src/backend/postmaster/postmaster.c
+12
-12
src/backend/storage/lmgr/proc.c
src/backend/storage/lmgr/proc.c
+4
-4
src/backend/tcop/postgres.c
src/backend/tcop/postgres.c
+12
-12
src/bin/psql/common.c
src/bin/psql/common.c
+2
-2
src/bin/psql/common.h
src/bin/psql/common.h
+2
-2
src/include/commands/async.h
src/include/commands/async.h
+2
-2
src/include/config.h.in
src/include/config.h.in
+21
-1
src/include/tcop/tcopprot.h
src/include/tcop/tcopprot.h
+3
-3
No files found.
aclocal.m4
View file @
ef6164de
# $Header: /cvsroot/pgsql/aclocal.m4,v 1.
6 2000/08/28 11:53:12
petere Exp $
# $Header: /cvsroot/pgsql/aclocal.m4,v 1.
7 2000/08/29 09:36:37
petere Exp $
# This comes from the official Autoconf macro archive at
# <http://research.cys.de/autoconf-archive/>
# (I removed the $ before the Id CVS keyword below.)
...
...
@@ -65,7 +65,37 @@ extern accept ($ac_cv_func_accept_arg1, $ac_cv_func_accept_arg2, $ac_cv_func_acc
AC_DEFINE_UNQUOTED(ACCEPT_TYPE_ARG3,$ac_cv_func_accept_arg3)
])
# Macros to detect C compiler features
# $Header: /cvsroot/pgsql/aclocal.m4,v 1.6 2000/08/28 11:53:12 petere Exp $
# $Header: /cvsroot/pgsql/aclocal.m4,v 1.7 2000/08/29 09:36:37 petere Exp $
# PGAC_C_SIGNED
# -------------
# Check if the C compiler understands signed types.
AC_DEFUN([PGAC_C_SIGNED],
[AC_CACHE_CHECK(for signed types, pgac_cv_c_signed,
[AC_TRY_COMPILE([],
[signed char c; signed short s; signed int i;],
[pgac_cv_c_signed=yes],
[pgac_cv_c_signed=no])])
if test x"$pgac_cv_c_signed" = xno ; then
AC_DEFINE(signed,, [Define empty if the C compiler does not understand signed types])
fi])# PGAC_C_SIGNED
# PGAC_C_VOLATILE
# ---------------
# Check if the C compiler understands `volatile'. Note that if it doesn't
# then this will potentially break the program semantics.
AC_DEFUN([PGAC_C_VOLATILE],
[AC_CACHE_CHECK(for volatile, pgac_cv_c_volatile,
[AC_TRY_COMPILE([],
[extern volatile int i;],
[pgac_cv_c_volatile=yes],
[pgac_cv_c_volatile=no])])
if test x"$pgac_cv_c_volatile" = xno ; then
AC_DEFINE(volatile,, [Define empty if the C compiler does not understand `volatile'])
fi])# PGAC_C_VOLATILE
...
...
@@ -154,7 +184,7 @@ undefine([AC_TYPE_NAME])dnl
undefine([AC_CV_NAME])dnl
])# PGAC_CHECK_ALIGNOF
# Macros that test various C library quirks
# $Header: /cvsroot/pgsql/aclocal.m4,v 1.
6 2000/08/28 11:53:12
petere Exp $
# $Header: /cvsroot/pgsql/aclocal.m4,v 1.
7 2000/08/29 09:36:37
petere Exp $
# PGAC_VAR_INT_TIMEZONE
...
...
@@ -233,7 +263,7 @@ fi
HAVE_POSIX_SIGNALS=$pgac_cv_func_posix_signals
AC_SUBST(HAVE_POSIX_SIGNALS)])# PGAC_FUNC_POSIX_SIGNALS
# Macros to detect certain C++ features
# $Header: /cvsroot/pgsql/aclocal.m4,v 1.
6 2000/08/28 11:53:12
petere Exp $
# $Header: /cvsroot/pgsql/aclocal.m4,v 1.
7 2000/08/29 09:36:37
petere Exp $
# PGAC_CLASS_STRING
...
...
@@ -299,7 +329,7 @@ AC_LANG_RESTORE])
if test $pgac_cv_cxx_namespace_std = yes ; then
AC_DEFINE(HAVE_NAMESPACE_STD, 1, [Define to 1 if the C++ compiler understands `using namespace std'])
fi])# PGAC_CXX_NAMESPACE_STD
# $Header: /cvsroot/pgsql/aclocal.m4,v 1.
6 2000/08/28 11:53:12
petere Exp $
# $Header: /cvsroot/pgsql/aclocal.m4,v 1.
7 2000/08/29 09:36:37
petere Exp $
# PGAC_PATH_FLEX
...
...
@@ -374,7 +404,7 @@ AC_SUBST(FLEXFLAGS)
#
# Autoconf macros for configuring the build of Python extension modules
#
# $Header: /cvsroot/pgsql/aclocal.m4,v 1.
6 2000/08/28 11:53:12
petere Exp $
# $Header: /cvsroot/pgsql/aclocal.m4,v 1.
7 2000/08/29 09:36:37
petere Exp $
#
# PGAC_PROG_PYTHON
...
...
config/c-compiler.m4
View file @
ef6164de
# Macros to detect C compiler features
# $Header: /cvsroot/pgsql/config/c-compiler.m4,v 1.2 2000/08/27 19:00:22 petere Exp $
# $Header: /cvsroot/pgsql/config/c-compiler.m4,v 1.3 2000/08/29 09:36:37 petere Exp $
# PGAC_C_SIGNED
# -------------
# Check if the C compiler understands signed types.
AC_DEFUN([PGAC_C_SIGNED],
[AC_CACHE_CHECK(for signed types, pgac_cv_c_signed,
[AC_TRY_COMPILE([],
[signed char c; signed short s; signed int i;],
[pgac_cv_c_signed=yes],
[pgac_cv_c_signed=no])])
if test x"$pgac_cv_c_signed" = xno ; then
AC_DEFINE(signed,, [Define empty if the C compiler does not understand signed types])
fi])# PGAC_C_SIGNED
# PGAC_C_VOLATILE
# ---------------
# Check if the C compiler understands `volatile'. Note that if it doesn't
# then this will potentially break the program semantics.
AC_DEFUN([PGAC_C_VOLATILE],
[AC_CACHE_CHECK(for volatile, pgac_cv_c_volatile,
[AC_TRY_COMPILE([],
[extern volatile int i;],
[pgac_cv_c_volatile=yes],
[pgac_cv_c_volatile=no])])
if test x"$pgac_cv_c_volatile" = xno ; then
AC_DEFINE(volatile,, [Define empty if the C compiler does not understand `volatile'])
fi])# PGAC_C_VOLATILE
...
...
configure
View file @
ef6164de
This diff is collapsed.
Click to expand it.
configure.in
View file @
ef6164de
...
...
@@ -802,6 +802,8 @@ fi
AC_C_CONST
AC_C_INLINE
AC_C_STRINGIZE
PGAC_C_SIGNED
PGAC_C_VOLATILE
AC_STRUCT_TIMEZONE
PGAC_UNION_SEMUN
...
...
src/backend/commands/async.c
View file @
ef6164de
...
...
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/commands/async.c,v 1.6
7 2000/08/27 19:00:24
petere Exp $
* $Header: /cvsroot/pgsql/src/backend/commands/async.c,v 1.6
8 2000/08/29 09:36:39
petere Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -587,7 +587,7 @@ AtAbort_Notify()
*/
void
Async_NotifyHandler
(
int
signum
)
Async_NotifyHandler
(
SIGNAL_ARGS
)
{
/*
...
...
src/backend/postmaster/postmaster.c
View file @
ef6164de
...
...
@@ -11,7 +11,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/postmaster/postmaster.c,v 1.16
1 2000/08/27 19:00:26
petere Exp $
* $Header: /cvsroot/pgsql/src/backend/postmaster/postmaster.c,v 1.16
2 2000/08/29 09:36:41
petere Exp $
*
* NOTES
*
...
...
@@ -231,10 +231,10 @@ static void pmdaemonize(int argc, char *argv[]);
static
Port
*
ConnCreate
(
int
serverFd
);
static
void
ConnFree
(
Port
*
port
);
static
void
reset_shared
(
int
port
);
static
void
SIGHUP_handler
(
int
signum
);
static
void
pmdie
(
int
signum
);
static
void
reaper
(
int
signum
);
static
void
dumpstatus
(
int
signum
);
static
void
SIGHUP_handler
(
SIGNAL_ARGS
);
static
void
pmdie
(
SIGNAL_ARGS
);
static
void
reaper
(
SIGNAL_ARGS
);
static
void
dumpstatus
(
SIGNAL_ARGS
);
static
void
CleanupProc
(
int
pid
,
int
exitstatus
);
static
int
DoBackend
(
Port
*
port
);
static
void
ExitPostmaster
(
int
status
);
...
...
@@ -246,7 +246,7 @@ static int processCancelRequest(Port *port, PacketLen len, void *pkt);
static
int
initMasks
(
fd_set
*
rmask
,
fd_set
*
wmask
);
static
long
PostmasterRandom
(
void
);
static
void
RandomSalt
(
char
*
salt
);
static
void
SignalChildren
(
int
signum
);
static
void
SignalChildren
(
SIGNAL_ARGS
);
static
int
CountChildren
(
void
);
static
bool
CreateOptsFile
(
int
argc
,
char
*
argv
[]);
...
...
@@ -1266,7 +1266,7 @@ reset_shared(int port)
* main loop
*/
static
void
SIGHUP_handler
(
int
signum
)
SIGHUP_handler
(
SIGNAL_ARGS
)
{
got_SIGHUP
=
true
;
if
(
Shutdown
>
SmartShutdown
)
...
...
@@ -1281,14 +1281,14 @@ SIGHUP_handler(int signum)
* pmdie -- signal handler for cleaning up after a kill signal.
*/
static
void
pmdie
(
int
signum
)
pmdie
(
SIGNAL_ARGS
)
{
PG_SETMASK
(
&
BlockSig
);
if
(
DebugLvl
>=
1
)
elog
(
DEBUG
,
"pmdie %d"
,
signum
);
elog
(
DEBUG
,
"pmdie %d"
,
postgres_signal_arg
);
switch
(
signum
)
switch
(
postgres_signal_arg
)
{
case
SIGUSR2
:
...
...
@@ -1399,7 +1399,7 @@ pmdie(int signum)
* Reaper -- signal handler to cleanup after a backend (child) dies.
*/
static
void
reaper
(
int
signum
)
reaper
(
SIGNAL_ARGS
)
{
/* GH: replace waitpid for !HAVE_WAITPID. Does this work ? */
#ifdef HAVE_WAITPID
...
...
@@ -1970,7 +1970,7 @@ ExitPostmaster(int status)
}
static
void
dumpstatus
(
int
signum
)
dumpstatus
(
SIGNAL_ARGS
)
{
Dlelem
*
curr
;
...
...
src/backend/storage/lmgr/proc.c
View file @
ef6164de
...
...
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/storage/lmgr/proc.c,v 1.7
8 2000/08/27 19:00:28
petere Exp $
* $Header: /cvsroot/pgsql/src/backend/storage/lmgr/proc.c,v 1.7
9 2000/08/29 09:36:44
petere Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -47,7 +47,7 @@
* This is so that we can support more backends. (system-wide semaphore
* sets run out pretty fast.) -ay 4/95
*
* $Header: /cvsroot/pgsql/src/backend/storage/lmgr/proc.c,v 1.7
8 2000/08/27 19:00:28
petere Exp $
* $Header: /cvsroot/pgsql/src/backend/storage/lmgr/proc.c,v 1.7
9 2000/08/29 09:36:44
petere Exp $
*/
#include <sys/time.h>
#include <unistd.h>
...
...
@@ -68,7 +68,7 @@
#include "storage/proc.h"
void
HandleDeadLock
(
int
signum
);
void
HandleDeadLock
(
SIGNAL_ARGS
);
static
void
ProcFreeAllSemaphores
(
void
);
static
bool
GetOffWaitqueue
(
PROC
*
);
...
...
@@ -812,7 +812,7 @@ ProcAddLock(SHM_QUEUE *elem)
* --------------------
*/
void
HandleDeadLock
(
int
signum
)
HandleDeadLock
(
SIGNAL_ARGS
)
{
LOCK
*
mywaitlock
;
...
...
src/backend/tcop/postgres.c
View file @
ef6164de
...
...
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/tcop/postgres.c,v 1.17
2 2000/08/27 19:00:31
petere Exp $
* $Header: /cvsroot/pgsql/src/backend/tcop/postgres.c,v 1.17
3 2000/08/29 09:36:47
petere Exp $
*
* NOTES
* this is the "main" module of the postgres backend and
...
...
@@ -83,7 +83,7 @@ CommandDest whereToSendOutput = Debug;
extern
void
StartupXLOG
(
void
);
extern
void
ShutdownXLOG
(
void
);
extern
void
HandleDeadLock
(
int
signum
);
extern
void
HandleDeadLock
(
SIGNAL_ARGS
);
extern
char
XLogDir
[];
extern
char
ControlFilePath
[];
...
...
@@ -129,9 +129,9 @@ int XfuncMode = 0;
static
int
InteractiveBackend
(
StringInfo
inBuf
);
static
int
SocketBackend
(
StringInfo
inBuf
);
static
int
ReadCommand
(
StringInfo
inBuf
);
static
void
SigHupHandler
(
int
signum
);
static
void
FloatExceptionHandler
(
int
signum
);
static
void
quickdie
(
int
signum
);
static
void
SigHupHandler
(
SIGNAL_ARGS
);
static
void
FloatExceptionHandler
(
SIGNAL_ARGS
);
static
void
quickdie
(
SIGNAL_ARGS
);
/*
* Flag to mark SIGHUP. Whenever the main loop comes around it
...
...
@@ -705,13 +705,13 @@ pg_exec_query_dest(char *query_string, /* string to execute */
*/
void
handle_warn
(
int
signum
)
handle_warn
(
SIGNAL_ARGS
)
{
siglongjmp
(
Warn_restart
,
1
);
}
static
void
quickdie
(
int
signum
)
quickdie
(
SIGNAL_ARGS
)
{
PG_SETMASK
(
&
BlockSig
);
elog
(
NOTICE
,
"Message from PostgreSQL backend:"
...
...
@@ -735,7 +735,7 @@ quickdie(int signum)
* Abort transaction and exit
*/
void
die
(
int
signum
)
die
(
SIGNAL_ARGS
)
{
PG_SETMASK
(
&
BlockSig
);
...
...
@@ -752,7 +752,7 @@ die(int signum)
/* signal handler for floating point exception */
static
void
FloatExceptionHandler
(
int
signum
)
FloatExceptionHandler
(
SIGNAL_ARGS
)
{
elog
(
ERROR
,
"floating point exception!"
" The last floating point operation either exceeded legal ranges"
...
...
@@ -761,7 +761,7 @@ FloatExceptionHandler(int signum)
/* signal handler for query cancel signal from postmaster */
static
void
QueryCancelHandler
(
int
signum
)
QueryCancelHandler
(
SIGNAL_ARGS
)
{
QueryCancel
=
true
;
LockWaitCancel
();
...
...
@@ -779,7 +779,7 @@ CancelQuery(void)
}
static
void
SigHupHandler
(
int
signum
)
SigHupHandler
(
SIGNAL_ARGS
)
{
got_SIGHUP
=
true
;
}
...
...
@@ -1404,7 +1404,7 @@ PostgresMain(int argc, char *argv[], int real_argc, char *real_argv[])
if
(
!
IsUnderPostmaster
)
{
puts
(
"
\n
POSTGRES backend interactive interface "
);
puts
(
"$Revision: 1.17
2 $ $Date: 2000/08/27 19:00:31
$
\n
"
);
puts
(
"$Revision: 1.17
3 $ $Date: 2000/08/29 09:36:47
$
\n
"
);
}
/*
...
...
src/bin/psql/common.c
View file @
ef6164de
...
...
@@ -3,7 +3,7 @@
*
* Copyright 2000 by PostgreSQL Global Development Group
*
* $Header: /cvsroot/pgsql/src/bin/psql/common.c,v 1.2
2 2000/08/27 19:00:34
petere Exp $
* $Header: /cvsroot/pgsql/src/bin/psql/common.c,v 1.2
3 2000/08/29 09:36:48
petere Exp $
*/
#include "postgres.h"
#include "common.h"
...
...
@@ -252,7 +252,7 @@ volatile bool cancel_pressed;
#define write_stderr(String) write(fileno(stderr), String, strlen(String))
void
handle_sigint
(
int
signum
)
handle_sigint
(
SIGNAL_ARGS
)
{
/* Don't muck around if copying in or prompting for a password. */
if
((
copy_in_state
&&
pset
.
cur_cmd_interactive
)
||
prompt_state
)
...
...
src/bin/psql/common.h
View file @
ef6164de
...
...
@@ -3,7 +3,7 @@
*
* Copyright 2000 by PostgreSQL Global Development Group
*
* $Header: /cvsroot/pgsql/src/bin/psql/common.h,v 1.1
1 2000/08/27 19:00:36
petere Exp $
* $Header: /cvsroot/pgsql/src/bin/psql/common.h,v 1.1
2 2000/08/29 09:36:48
petere Exp $
*/
#ifndef COMMON_H
#define COMMON_H
...
...
@@ -34,7 +34,7 @@ extern volatile bool cancel_pressed;
extern
PGconn
*
cancelConn
;
#ifndef WIN32
void
handle_sigint
(
int
signum
);
void
handle_sigint
(
SIGNAL_ARGS
);
#endif
/* not WIN32 */
...
...
src/include/commands/async.h
View file @
ef6164de
...
...
@@ -6,7 +6,7 @@
* Portions Copyright (c) 1996-2000, PostgreSQL, Inc
* Portions Copyright (c) 1994, Regents of the University of California
*
* $Id: async.h,v 1.1
5 2000/08/27 19:00:41
petere Exp $
* $Id: async.h,v 1.1
6 2000/08/29 09:36:50
petere Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -25,7 +25,7 @@ extern void AtCommit_Notify(void);
extern
void
AtAbort_Notify
(
void
);
/* signal handler for inbound notifies (SIGUSR2) */
extern
void
Async_NotifyHandler
(
int
signum
);
extern
void
Async_NotifyHandler
(
SIGNAL_ARGS
);
/*
* enable/disable processing of inbound notifies directly from signal handler.
...
...
src/include/config.h.in
View file @
ef6164de
...
...
@@ -8,7 +8,7 @@
* or in config.h afterwards. Of course, if you edit config.h, then your
* changes will be overwritten the next time you run configure.
*
* $Id: config.h.in,v 1.13
3 2000/08/27 19:00:3
9 petere Exp $
* $Id: config.h.in,v 1.13
4 2000/08/29 09:36:4
9 petere Exp $
*/
#ifndef CONFIG_H
...
...
@@ -300,6 +300,12 @@
/* Define as your compiler's spelling of "inline", or empty if no inline. */
#undef inline
/* Define as empty if the C compiler doesn't understand "signed". */
#undef signed
/* Define as empty if the C compiler doesn't understand "volatile". */
#undef volatile
/* Define if your cpp understands the ANSI stringizing operators in macros */
#undef HAVE_STRINGIZE
...
...
@@ -582,4 +588,18 @@ extern void srandom(unsigned int seed);
#include "os.h"
/*
* The following is used as the arg list for signal handlers. Any ports
* that take something other than an int argument should override this in
* the port-specific os.h file. Note that variable names are required
* because it is used in both the prototypes as well as the definitions.
* Note also the long name. We expect that this won't collide with
* other names causing compiler warnings.
*/
#ifndef SIGNAL_ARGS
#define SIGNAL_ARGS int postgres_signal_arg
#endif
#endif /* CONFIG_H */
src/include/tcop/tcopprot.h
View file @
ef6164de
...
...
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2000, PostgreSQL, Inc
* Portions Copyright (c) 1994, Regents of the University of California
*
* $Id: tcopprot.h,v 1.3
2 2000/08/27 19:00:4
1 petere Exp $
* $Id: tcopprot.h,v 1.3
3 2000/08/29 09:36:5
1 petere Exp $
*
* OLD COMMENTS
* This file was created so that other c files could get the two
...
...
@@ -41,8 +41,8 @@ extern void pg_exec_query_dest(char *query_string,
#endif
/* BOOTSTRAP_INCLUDE */
extern
void
handle_warn
(
int
signum
);
extern
void
die
(
int
signum
);
extern
void
handle_warn
(
SIGNAL_ARGS
);
extern
void
die
(
SIGNAL_ARGS
);
extern
void
CancelQuery
(
void
);
extern
int
PostgresMain
(
int
argc
,
char
*
argv
[],
int
real_argc
,
char
*
real_argv
[]);
...
...
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