aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/backend/utils/error/elog.c14
-rw-r--r--src/backend/utils/misc/guc.c10
-rw-r--r--src/include/pg_config.h.in7
-rw-r--r--src/include/utils/elog.h4
4 files changed, 17 insertions, 18 deletions
diff --git a/src/backend/utils/error/elog.c b/src/backend/utils/error/elog.c
index ef05d9180c9..dedbb9f68db 100644
--- a/src/backend/utils/error/elog.c
+++ b/src/backend/utils/error/elog.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/error/elog.c,v 1.95 2002/04/04 04:43:44 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/error/elog.c,v 1.96 2002/04/21 00:22:52 ishii Exp $
*
*-------------------------------------------------------------------------
*/
@@ -22,7 +22,7 @@
#include <signal.h>
#include <sys/time.h>
#include <ctype.h>
-#ifdef ENABLE_SYSLOG
+#ifdef HAVE_SYSLOG
#include <syslog.h>
#endif
@@ -46,7 +46,7 @@ int client_min_messages;
char *client_min_messages_str = NULL;
const char client_min_messages_str_default[] = "notice";
-#ifdef ENABLE_SYSLOG
+#ifdef HAVE_SYSLOG
/*
* 0 = only stdout/stderr
* 1 = stdout+stderr and syslog
@@ -351,7 +351,7 @@ elog(int lev, const char *fmt,...)
* Message prepared; send it where it should go
*/
-#ifdef ENABLE_SYSLOG
+#ifdef HAVE_SYSLOG
/* Write to syslog, if enabled */
if (output_to_server && Use_syslog >= 1)
{
@@ -389,7 +389,7 @@ elog(int lev, const char *fmt,...)
write_syslog(syslog_level, msg_buf + timestamp_size);
}
-#endif /* ENABLE_SYSLOG */
+#endif /* HAVE_SYSLOG */
/* syslog doesn't want a trailing newline, but other destinations do */
strcat(msg_buf, "\n");
@@ -612,7 +612,7 @@ print_pid(void)
-#ifdef ENABLE_SYSLOG
+#ifdef HAVE_SYSLOG
#ifndef PG_SYSLOG_LIMIT
#define PG_SYSLOG_LIMIT 128
@@ -733,7 +733,7 @@ write_syslog(int level, const char *line)
syslog(level, "[%lu] %s", seq, line);
}
}
-#endif /* ENABLE_SYSLOG */
+#endif /* HAVE_SYSLOG */
static void
diff --git a/src/backend/utils/misc/guc.c b/src/backend/utils/misc/guc.c
index 8abf451b630..4d4e9f274da 100644
--- a/src/backend/utils/misc/guc.c
+++ b/src/backend/utils/misc/guc.c
@@ -4,7 +4,7 @@
* Support for grand unified configuration scheme, including SET
* command, configuration file, and command line options.
*
- * $Header: /cvsroot/pgsql/src/backend/utils/misc/guc.c,v 1.65 2002/04/03 05:39:32 petere Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/misc/guc.c,v 1.66 2002/04/21 00:22:52 ishii Exp $
*
* Copyright 2000 by PostgreSQL Global Development Group
* Written by Peter Eisentraut <peter_e@gmx.net>.
@@ -54,7 +54,7 @@ extern int CommitDelay;
extern int CommitSiblings;
extern bool FixBTree;
-#ifdef ENABLE_SYSLOG
+#ifdef HAVE_SYSLOG
extern char *Syslog_facility;
extern char *Syslog_ident;
static bool check_facility(const char *facility);
@@ -394,7 +394,7 @@ static struct config_int
1000, 0, INT_MAX, NULL, NULL
},
-#ifdef ENABLE_SYSLOG
+#ifdef HAVE_SYSLOG
{
"syslog", PGC_SIGHUP, PGC_S_DEFAULT, &Use_syslog,
0, 0, 2, NULL, NULL
@@ -612,7 +612,7 @@ static struct config_string
assign_server_min_messages
},
-#ifdef ENABLE_SYSLOG
+#ifdef HAVE_SYSLOG
{
"syslog_facility", PGC_POSTMASTER, PGC_S_DEFAULT, &Syslog_facility,
"LOCAL0", check_facility, NULL
@@ -1364,7 +1364,7 @@ ParseLongOption(const char *string, char **name, char **value)
-#ifdef ENABLE_SYSLOG
+#ifdef HAVE_SYSLOG
static bool
check_facility(const char *facility)
diff --git a/src/include/pg_config.h.in b/src/include/pg_config.h.in
index 2cfe5b16d6a..2cae99aaefb 100644
--- a/src/include/pg_config.h.in
+++ b/src/include/pg_config.h.in
@@ -8,7 +8,7 @@
* or in pg_config.h afterwards. Of course, if you edit pg_config.h, then your
* changes will be overwritten the next time you run configure.
*
- * $Id: pg_config.h.in,v 1.21 2002/04/10 22:47:09 petere Exp $
+ * $Id: pg_config.h.in,v 1.22 2002/04/21 00:22:52 ishii Exp $
*/
#ifndef PG_CONFIG_H
@@ -47,9 +47,6 @@
/* Set to 1 if you want ASSERT checking (--enable-cassert) */
#undef USE_ASSERT_CHECKING
-/* Set to 1 to use syslog() to write postmaster log (--enable-syslog) */
-#undef ENABLE_SYSLOG
-
/* Define to build with Kerberos 4 support (--with-krb4[=DIR]) */
#undef KRB4
@@ -708,6 +705,8 @@ extern int fdatasync(int fildes);
#undef HAVE_UINT64
#undef HAVE_SIG_ATOMIC_T
+/* Define if you have syslog() */
+#undef HAVE_SYSLOG
/*
*------------------------------------------------------------------------
diff --git a/src/include/utils/elog.h b/src/include/utils/elog.h
index 6a13ff40870..6e0d5808280 100644
--- a/src/include/utils/elog.h
+++ b/src/include/utils/elog.h
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $Id: elog.h,v 1.35 2002/03/06 06:23:20 momjian Exp $
+ * $Id: elog.h,v 1.36 2002/04/21 00:22:52 ishii Exp $
*
*-------------------------------------------------------------------------
*/
@@ -41,7 +41,7 @@
/*#define DEBUG DEBUG1*/ /* Backward compatibility with pre-7.3 */
/* Configurable parameters */
-#ifdef ENABLE_SYSLOG
+#ifdef HAVE_SYSLOG
extern int Use_syslog;
#endif
extern bool Log_timestamp;