Index: size.c =================================================================== RCS file: /projects/pgadmin-tools/support/size.c,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -Lsupport/size.c -Lsupport/size.c -u -w -r1.1.1.1 -r1.2 --- support/size.c +++ support/size.c @@ -11,6 +11,7 @@ * */ + #include "postgres.h" #include @@ -22,6 +23,8 @@ #include "catalog/pg_tablespace.h" #include "miscadmin.h" +extern DLLIMPORT char *DataDir; + Datum pg_tablespace_size(PG_FUNCTION_ARGS); Datum pg_database_size(PG_FUNCTION_ARGS); Datum pg_relation_size(PG_FUNCTION_ARGS); Index: genfile.c =================================================================== RCS file: /projects/pgadmin-tools/support/genfile.c,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -Lsupport/genfile.c -Lsupport/genfile.c -u -w -r1.1.1.1 -r1.2 --- support/genfile.c +++ support/genfile.c @@ -24,6 +24,9 @@ #include "catalog/pg_type.h" #include "funcapi.h" +extern DLLIMPORT char *DataDir; +extern DLLIMPORT char *Log_directory; +extern DLLIMPORT char *Log_filename_prefix; Datum pg_file_stat(PG_FUNCTION_ARGS); @@ -40,8 +43,6 @@ PG_FUNCTION_INFO_V1(pg_file_unlink); PG_FUNCTION_INFO_V1(pg_dir_ls); -extern char *Log_directory; - typedef struct { char *location; Index: misc.c =================================================================== RCS file: /projects/pgadmin-tools/support/misc.c,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -Lsupport/misc.c -Lsupport/misc.c -u -w -r1.1.1.1 -r1.2 --- support/misc.c +++ support/misc.c @@ -26,6 +26,11 @@ #include "catalog/pg_tablespace.h" #include "postmaster/syslogger.h" +extern DLLIMPORT char *DataDir; +extern DLLIMPORT char *Log_directory; +extern DLLIMPORT char *Log_filename_prefix; +extern DLLIMPORT pid_t PostmasterPid; + Datum pg_reload_conf(PG_FUNCTION_ARGS); Datum pg_logfile_rotate(PG_FUNCTION_ARGS); Datum pg_logdir_ls(PG_FUNCTION_ARGS); @@ -34,7 +39,6 @@ PG_FUNCTION_INFO_V1(pg_logfile_rotate); PG_FUNCTION_INFO_V1(pg_logdir_ls); - Datum pg_reload_conf(PG_FUNCTION_ARGS) { @@ -98,7 +102,6 @@ oldcontext = MemoryContextSwitchTo(funcctx->multi_call_memory_ctx); fctx = palloc(sizeof(directory_fctx)); - if (is_absolute_path(Log_directory)) fctx->location = Log_directory; else @@ -106,7 +109,6 @@ fctx->location = palloc(strlen(DataDir) + strlen(Log_directory) +2); sprintf(fctx->location, "%s/%s", DataDir, Log_directory); } - tupdesc = CreateTemplateTupleDesc(3, false); TupleDescInitEntry(tupdesc, (AttrNumber) 1, "starttime", TIMESTAMPOID, -1, 0);