diff options
| author | Bruce Momjian <bruce@momjian.us> | 2004-05-17 14:35:34 +0000 |
|---|---|---|
| committer | Bruce Momjian <bruce@momjian.us> | 2004-05-17 14:35:34 +0000 |
| commit | 3febb477e643c1cd37fc8d2d3e02685dce6d1196 (patch) | |
| tree | adc5f3696ec9001b0bda4d9c0336c50c251c2f62 /src/timezone | |
| parent | 85383214ea2b0085658a650b4e6b293464dcf045 (diff) | |
| download | postgresql-3febb477e643c1cd37fc8d2d3e02685dce6d1196.tar.gz | |
Reorganize code to allow path-relative installs.
Create new get_* functions to access compiled-in paths and adjust if
relative installs are to be used.
Clean up substitute_libpath_macro() code.
Diffstat (limited to 'src/timezone')
| -rw-r--r-- | src/timezone/Makefile | 4 | ||||
| -rw-r--r-- | src/timezone/pgtz.c | 19 |
2 files changed, 3 insertions, 20 deletions
diff --git a/src/timezone/Makefile b/src/timezone/Makefile index ee3e15a120..bb3d872543 100644 --- a/src/timezone/Makefile +++ b/src/timezone/Makefile @@ -4,7 +4,7 @@ # Makefile for the timezone library # IDENTIFICATION -# $PostgreSQL: pgsql/src/timezone/Makefile,v 1.7 2004/04/30 20:23:28 momjian Exp $ +# $PostgreSQL: pgsql/src/timezone/Makefile,v 1.8 2004/05/17 14:35:34 momjian Exp $ # #------------------------------------------------------------------------- @@ -12,8 +12,6 @@ subdir = src/timezone top_builddir = ../.. include $(top_builddir)/src/Makefile.global -override CPPFLAGS += -DPGDATADIR=\"$(datadir)\" - OBJS= asctime.o difftime.o localtime.o pgtz.o ZICOBJS= zic.o ialloc.o scheck.o localtime.o asctime.o pgtz.o diff --git a/src/timezone/pgtz.c b/src/timezone/pgtz.c index 5cea4535cc..3cb3849434 100644 --- a/src/timezone/pgtz.c +++ b/src/timezone/pgtz.c @@ -6,7 +6,7 @@ * Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group * * IDENTIFICATION - * $PostgreSQL: pgsql/src/timezone/pgtz.c,v 1.7 2004/05/02 03:12:12 momjian Exp $ + * $PostgreSQL: pgsql/src/timezone/pgtz.c,v 1.8 2004/05/17 14:35:34 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -25,22 +25,7 @@ pg_TZDIR(void) if (done_tzdir) return tzdir; -#ifndef WIN32 - StrNCpy(tzdir, PGDATADIR, MAXPGPATH); -#else - if (GetModuleFileName(NULL, tzdir, MAXPGPATH) == 0) - return NULL; -#endif - - canonicalize_path(tzdir); -#ifdef WIN32 - /* trim off binary name, then go up a directory */ - if ((p = last_path_separator(tzdir)) == NULL) - return NULL; - else - *p = '\0'; - strcat(tzdir, "/../share"); -#endif + get_share_dir(my_exec_path, tzdir); strcat(tzdir, "/timezone"); done_tzdir = 1; |
