aboutsummaryrefslogtreecommitdiff
path: root/src/port/path.c
Commit message (Collapse)AuthorAge
...
* Add make_native_path() because Win32 COPY is an internal CMD.EXE commandBruce Momjian2004-08-12
| | | | | | | | | | and doesn't process forward slashes in the same way as external commands. Quoting the first argument to COPY does not convert forward to backward slashes, but COPY does properly process quoted forward slashes in the second argument. Win32 COPY works with quoted forward slashes in the first argument only if the current directory is the same as the directory of the first argument.
* Path-mangling logic was failing to account for paths containing mentionsTom Lane2004-08-09
| | | | | | | | of '.' or '..'. Extend canonicalize_path() to trim off trailing occurrences of these things, and use it to fix up paths where needed (which I think is only after places where we trim the last path component, but maybe some others will turn up). Fixes Josh's complaint that './initdb' does not work.
* Create a C version of pg_config.Bruce Momjian2004-08-01
| | | | Andrew Dunstan
* Add blank line to new canonicalize_path file, which handles "a b\" properly.Bruce Momjian2004-07-12
|
* Put back canonicalization of PGDATA environment variable.Bruce Momjian2004-07-12
|
* Use canonicalize_path for -D, GUC paths, and paths coming in fromBruce Momjian2004-07-11
| | | | environment variables.
* Fix trim_trailing_separator() to not trim c:\ nor \\network\ on Win32.Bruce Momjian2004-07-11
|
* Fix BSD-only coding in port.c (passing a local variable to putenv).Tom Lane2004-07-10
| | | | | | Also a quick but half-baked attempt to make trim_trailing_separator do the right thing with path consisting only of '/' --- still needs work for Windows I think.
* Use sizeof() rather than strlen() in array size.Bruce Momjian2004-06-11
|
* Attached is a patch that takes care of the PATHSEP issue. I made a moreBruce Momjian2004-06-10
| | | | | | | | | | | | | | | | | | | extensive change then what was suggested. I found the file path.c that contained a lot of "Unix/Windows" agnostic functions so I added a function there instead and removed the PATHSEP declaration in exec.c altogether. All to keep things from scattering all over the code. I also took the liberty of changing the name of the functions "first_path_sep" and "last_path_sep". Where I come from (and I'm apparently not alone given the former macro name PATHSEP), they should be called "first_dir_sep" and "last_dir_sep". The new function I introduced, that actually finds path separators, is now the "first_path_sep". The patch contains changes on all affected places of course. I also changed the documentation on dynamic_library_path to reflect the chagnes. Thomas Hallgren
* Change PGETC to PGSYSCONFDIR and PGLOCALE to PGLOCALEDIR, per Peter.Bruce Momjian2004-06-08
|
* Add PGETC (for pg_service.conf) and PGLOCALE (for locale dir)Bruce Momjian2004-06-03
| | | | | | | | | environment variable processing to libpq. The patch also adds code to our client apps so we set the environment variable directly based on our binary location, unless it is already set. This will allow our applications to emit proper locale messages that are generated in libpq.
* Move setlocale() outside of NLS-only defines.Bruce Momjian2004-05-26
|
* Allow relative paths as long as the hardcoded path matches the bin pathBruce Momjian2004-05-25
| | | | up to the last bin directory name.
* Fix set_pglocale to properly pass my_exec_path to get_locale_path instead of ↵Bruce Momjian2004-05-25
| | | | argv0.
* Skip settting LC_ALL in the backend.Bruce Momjian2004-05-25
|
* Make the locale location relocatable.Bruce Momjian2004-05-25
| | | | Adjust get_*_path functions to be limited to MAXPGPATH.
* Put path configuration information into a .h file instead of clutteringTom Lane2004-05-21
| | | | | | several different module Makefiles with it. Also, do any adjustment of installation paths during configure, rather than every time Makefile.global is read.
* Win32 can't have the same function coming from two library object files,Bruce Momjian2004-05-19
| | | | so we make is_absolute_path a macro so libpq doesn't use path.o.
* Clean up some relative path install issues with Claudio's help.Bruce Momjian2004-05-18
|
* Reorganize code to allow path-relative installs.Bruce Momjian2004-05-17
| | | | | | | Create new get_* functions to access compiled-in paths and adjust if relative installs are to be used. Clean up substitute_libpath_macro() code.
* Rename find_my_binary/find_other_binary toBruce Momjian2004-05-12
| | | | | | | | | find_my_exec/find_other_exec(). Remove passing of progname to these functions as they can find that out from argv[0], which they already have. Make get_progname return const char *, and update all progname variables to be const char *.
* As part of the work for making relocatable installs, I have re-factoredBruce Momjian2004-05-11
| | | | | | | | | | | | all the code that looks for other binaries. I move FindExec into port/exec.c (and renamed it to find_my_binary()). I also added find_other_binary that looks for another binary in the same directory as the calling program, and checks the version string. The only behavior change was that initdb and pg_dump would look in the hard-coded bindir directory if it can't find the requested binary in the same directory as the caller. The new code throws an error. The old behavior seemed too error prone for version mismatches.
* The win32 port backend will require the functionality provided byBruce Momjian2004-03-09
| | | | | | canonicalize_path. Patch moves it from initdb.c to port/path.c. Claudio Natoli
* $Header: -> $PostgreSQL Changes ...PostgreSQL Daemon2003-11-29
|
* Update /port C header descriptions.Bruce Momjian2003-11-11
|
* pgindent run.Bruce Momjian2003-08-04
|
* Add Win32 path handling for / vs. \ and drive letters.Bruce Momjian2003-04-04