summaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
Diffstat (limited to 'src/include')
-rw-r--r--src/include/c.h3
-rw-r--r--src/include/commands/dbcommands.h15
-rw-r--r--src/include/miscadmin.h40
-rw-r--r--src/include/utils/elog.h8
-rw-r--r--src/include/utils/palloc.h4
5 files changed, 39 insertions, 31 deletions
diff --git a/src/include/c.h b/src/include/c.h
index 53fe14e70a2..e80b9fd2850 100644
--- a/src/include/c.h
+++ b/src/include/c.h
@@ -7,7 +7,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: c.h,v 1.62 1999/12/20 00:51:21 tgl Exp $
+ * $Id: c.h,v 1.63 2000/01/13 18:26:15 petere Exp $
*
*-------------------------------------------------------------------------
*/
@@ -767,7 +767,6 @@ extern char *vararg_format(const char *fmt,...);
/* These are for things that are one way on Unix and another on NT */
#define NULL_DEV "/dev/null"
-#define COPY_CMD "cp"
#define SEP_CHAR '/'
/* defines for dynamic linking on Win32 platform */
diff --git a/src/include/commands/dbcommands.h b/src/include/commands/dbcommands.h
index 165b20505f4..90245d338a6 100644
--- a/src/include/commands/dbcommands.h
+++ b/src/include/commands/dbcommands.h
@@ -6,23 +6,14 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: dbcommands.h,v 1.11 1999/12/10 03:56:06 momjian Exp $
+ * $Id: dbcommands.h,v 1.12 2000/01/13 18:26:16 petere Exp $
*
*-------------------------------------------------------------------------
*/
#ifndef DBCOMMANDS_H
#define DBCOMMANDS_H
-#include <signal.h>
-#include "tcop/dest.h"
-
-/*
- * Originally from tmp/daemon.h. The functions declared in daemon.h does not
- * exist; hence removed. -- AY 7/29/94
- */
-#define SIGKILLDAEMON1 SIGTERM
-
-extern void createdb(char *dbname, char *dbpath, int encoding, CommandDest);
-extern void dropdb(char *dbname, CommandDest);
+extern void createdb(const char *dbname, const char *dbpath, int encoding);
+extern void dropdb(const char *dbname);
#endif /* DBCOMMANDS_H */
diff --git a/src/include/miscadmin.h b/src/include/miscadmin.h
index 4212c50dc5f..ee88a8a5efc 100644
--- a/src/include/miscadmin.h
+++ b/src/include/miscadmin.h
@@ -11,7 +11,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: miscadmin.h,v 1.46 2000/01/09 12:19:27 ishii Exp $
+ * $Id: miscadmin.h,v 1.47 2000/01/13 18:26:15 petere Exp $
*
* NOTES
* some of the information in this file will be moved to
@@ -47,6 +47,8 @@ extern long MyCancelKey;
extern char OutputFileName[];
+extern char *UserName;
+
/*
* done in storage/backendid.h for now.
*
@@ -110,13 +112,12 @@ extern char *DatabaseName;
extern char *DatabasePath;
/* in utils/misc/database.c */
-extern void GetRawDatabaseInfo(char *name, Oid *db_id, char *path);
-extern int GetDatabaseInfo(char *name, int4 *owner, char *path);
-extern char *ExpandDatabasePath(char *path);
+extern void GetRawDatabaseInfo(const char *name, Oid *db_id, char *path);
+extern char *ExpandDatabasePath(const char *path);
/* now in utils/init/miscinit.c */
-extern void SetDatabaseName(char *name);
-extern void SetDatabasePath(char *path);
+extern void SetDatabaseName(const char *name);
+extern void SetDatabasePath(const char *path);
/* even if MB is not enabled, this function is neccesary
* since pg_proc.h does have.
@@ -184,16 +185,27 @@ typedef int16 ExitStatus;
extern bool PostgresIsInitialized;
-extern void InitPostgres(char *name);
+extern void InitPostgres(const char *dbname);
+
+/* one of the ways to get out of here */
+#define ExitPostgres(status) proc_exec(status)
+
+/* processing mode support stuff */
+extern ProcessingMode Mode;
+
+#define IsBootstrapProcessingMode() ((bool)(Mode == BootstrapProcessing))
+#define IsInitProcessingMode() ((bool)(Mode == InitProcessing))
+#define IsNormalProcessingMode() ((bool)(Mode == NormalProcessing))
+
+#define SetProcessingMode(mode) \
+ do { \
+ AssertArg(mode == BootstrapProcessing || mode == InitProcessing || \
+ mode == NormalProcessing); \
+ Mode = mode; \
+ } while(0)
-/* in miscinit.c */
-extern void ExitPostgres(ExitStatus status);
+#define GetProcessingMode() Mode
-extern bool IsBootstrapProcessingMode(void);
-extern bool IsInitProcessingMode(void);
-extern bool IsNormalProcessingMode(void);
-extern void SetProcessingMode(ProcessingMode mode);
-extern ProcessingMode GetProcessingMode(void);
/*
* "postmaster.pid" is a file containing postmaster's pid, being
diff --git a/src/include/utils/elog.h b/src/include/utils/elog.h
index e69ef11d7a3..54239b45482 100644
--- a/src/include/utils/elog.h
+++ b/src/include/utils/elog.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: elog.h,v 1.13 1999/09/27 15:48:12 vadim Exp $
+ * $Id: elog.h,v 1.14 2000/01/13 18:26:17 petere Exp $
*
*-------------------------------------------------------------------------
*/
@@ -22,7 +22,13 @@
#define LOG DEBUG
#define NOIND (-3) /* debug message, don't indent as far */
+#ifndef __GNUC__
extern void elog(int lev, const char *fmt, ...);
+#else
+/* This extension allows gcc to check the format string for consistency with
+ the supplied arguments. */
+extern void elog(int lev, const char *fmt, ...) __attribute__ ((format (printf, 2, 3)));
+#endif
#ifndef PG_STANDALONE
extern int DebugFileOpen(void);
diff --git a/src/include/utils/palloc.h b/src/include/utils/palloc.h
index 5ea3d9bb849..9f3a51b4218 100644
--- a/src/include/utils/palloc.h
+++ b/src/include/utils/palloc.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: palloc.h,v 1.10 1999/07/14 01:20:30 momjian Exp $
+ * $Id: palloc.h,v 1.11 2000/01/13 18:26:18 petere Exp $
*
*-------------------------------------------------------------------------
*/
@@ -32,6 +32,6 @@
#endif /* PALLOC_IS_MALLOC */
/* like strdup except uses palloc */
-extern char *pstrdup(char *pointer);
+extern char *pstrdup(const char *pointer);
#endif /* PALLOC_H */