]> granicus.if.org Git - postgresql/commitdiff
Rename function to be less win32 specific.
authorBruce Momjian <bruce@momjian.us>
Sat, 1 May 2004 01:34:47 +0000 (01:34 +0000)
committerBruce Momjian <bruce@momjian.us>
Sat, 1 May 2004 01:34:47 +0000 (01:34 +0000)
src/timezone/pgtz.c
src/timezone/pgtz.h

index efa9b4119ea2a6e7e0f594f12b56ff19f77c051e..0ce7d80e4111554c8a4dc1e9c71fb925c10837cc 100644 (file)
@@ -1,12 +1,12 @@
 /*-------------------------------------------------------------------------
  *
  * pgtz.c
- *    Timezone Library Integration Functions
+ *       Timezone Library Integration Functions
  *
  * Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group
  *
  * IDENTIFICATION
- *       $PostgreSQL: pgsql/src/timezone/pgtz.c,v 1.3 2004/04/30 20:23:28 momjian Exp $
+ *       $PostgreSQL: pgsql/src/timezone/pgtz.c,v 1.4 2004/05/01 01:34:47 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
 
 
 static char tzdir[MAXPGPATH];
-static int done_tzdir = 0;
-char *pgwin32_TZDIR(void) {
-       char *p;
+static int     done_tzdir = 0;
+char *
+pg_TZDIR(void)
+{
+       char       *p;
+
        if (done_tzdir)
                return tzdir;
 
 #ifndef WIN32
        StrNCpy(tzdir, PGDATADIR, MAXPGPATH);
 #else
-       if (GetModuleFileName(NULL,tzdir,MAXPGPATH) == 0)
+       if (GetModuleFileName(NULL, tzdir, MAXPGPATH) == 0)
                return NULL;
 #endif
-       
+
        canonicalize_path(tzdir);
+#if 0
        if ((p = last_path_separator(tzdir)) == NULL)
                return NULL;
        else
                *p = '\0';
-       
-       strcat(tzdir,"/timezone");
+#endif
+
+       strcat(tzdir, "/timezone");
+       puts(tzdir);
 
-       done_tzdir=1;
+       done_tzdir = 1;
        return tzdir;
 }
index 09205a5ee47e889b339774dcdefe31983f5b441a..8d3daee94f4a52f1805bbb2c5aa874a74a3bf9c2 100644 (file)
@@ -6,6 +6,6 @@
 
 
 #define NOID
-#define TZDIR pgwin32_TZDIR()
+#define TZDIR pg_TZDIR()
 
-char *pgwin32_TZDIR(void);
+char      *pg_TZDIR(void);