summaryrefslogtreecommitdiff
path: root/src/include/port.h
Commit message (Collapse)AuthorAgeFilesLines
* Rename our substitute qsort to pg_qsort at the link-symbol level (butTom Lane2006-10-191-1/+6
| | | | | provide a macro so code can still just say qsort). Avoids linker warnings on pickier platforms such as Darwin, and outright failure on MSVC.
* pgindent run for 8.2.Bruce Momjian2006-10-041-21/+20
|
* Switch over to using our own qsort() all the time, as has been proposedTom Lane2006-10-031-1/+10
| | | | | | | | | | repeatedly. Now that we don't have to worry about memory leaks from glibc's qsort, we can safely put CHECK_FOR_INTERRUPTS into the tuplesort comparators, as was requested a couple months ago. Also, get rid of non-reentrancy and an extra level of function call in tuplesort.c by providing a variant qsort_arg() API that passes an extra void * argument through to the comparison routine. (We might want to use that in other places too, I didn't look yet.)
* Properly handle the case where strlcpy() exists in libc but isn'tTom Lane2006-10-021-2/+2
| | | | | declared in the system headers. Per report from Bruce than some BSDen are like this.
* BSD/OS doesn't have a prototype for strlcpy() but has the function, soBruce Momjian2006-09-301-2/+2
| | | | work around that with defines.
* Add strlcpy() to the set of functions supported by src/port/ when notTom Lane2006-09-271-2/+6
| | | | | available directly on the platform. Per discussion, this function is sufficiently widely recognized to be treated as standard.
* Fix bugs in plpgsql and ecpg caused by assuming that isspace() would onlyTom Lane2006-09-221-2/+2
| | | | | | | | | return true for exactly the characters treated as whitespace by their flex scanners. Per report from Victor Snezhko and subsequent investigation. Also fix a passel of unsafe usages of <ctype.h> functions, that is, ye olde char-vs-unsigned-char issue. I won't miss <ctype.h> when we are finally able to stop using it.
* Move set_pglocale_pgservice() from path.c to exec.c, so that pulling inTom Lane2006-09-111-9/+8
| | | | | path.c does not in itself force linking of both exec.c and libintl. Should fix current ecpglib build failure on pickier platforms.
* Fix things so that fopen's, not only open's, pass FILE_SHARE_DELETETom Lane2006-08-301-3/+6
| | | | | and other special flags on Windows. May fix intermittent 'Permission denied' errors. Magnus Hagander
* Update Win32 CMD quoting rules information location, CMD /?, fromBruce Momjian2006-08-181-2/+2
| | | | Magnus.
* Update WIN32 quoting roles documentation.Bruce Momjian2006-07-191-3/+19
|
* Allow each C include file to compile on its own by including any neededBruce Momjian2006-07-111-1/+5
| | | | header files.
* Fix Win32/Cygwin problems:Bruce Momjian2006-06-251-3/+3
| | | | | | | | | | | | | | After updating to the latest cvs, and also building most of the addons (like PLs), the following patch is neededf for win32 + Visual C++. * Switch to use the new win32 semaphore code * Rename win32_open to pgwin32_open. win32_open collides with symbols defined in Perl. MingW didn't detect ig, MSVC did. And it's a bit too generic a name to export globally, imho... * Python defines some partially broken #pragmas in the headers when doing a debug build. Workaround. Magnus Hagander
* Prepare code to be built by MSVC:Bruce Momjian2006-06-071-9/+4
| | | | | | | | | | o remove many WIN32_CLIENT_ONLY defines o add WIN32_ONLY_COMPILER define o add 3rd argument to open() for portability o add include/port/win32_msvc directory for system includes Magnus Hagander
* Fixes for BCC 5.5 compile of libpq. Backpatch to 8.1.X.Bruce Momjian2006-04-241-3/+1
| | | | Mark Morgan Lloyd
* Update copyright for 2006. Update scripts.Bruce Momjian2006-03-051-2/+2
|
* Check for "msys" so it doesn't use 'con' by checking for an evironmentBruce Momjian2006-03-051-2/+2
| | | | variable.
* Use DEVTTY as 'con' on Win32 as a replacement for /dev/tty.Bruce Momjian2006-03-041-1/+4
|
* Add documentation on the use of *printf() macros and libintl.Bruce Momjian2005-12-061-3/+4
| | | | Backpatch to 8.1.X.
* Put undef's before extern declarations that need 'em, per Andrew Dunstan.Tom Lane2005-12-061-19/+19
|
* Make Win32 build use our port/snprintf.c routines, instead of dependingTom Lane2005-12-061-3/+25
| | | | | on libintl which may or may not provide what we need. Make a few marginal cleanups to ensure this works. Andrew Dunstan and Tom Lane.
* Standard pgindent run for 8.1.Bruce Momjian2005-10-151-14/+18
|
* Fix problems with PGXS builds against an installation tree that wasTom Lane2005-09-271-1/+3
| | | | | | | relocated after installation. We can't trust the installation paths inserted into Makefile.global by configure, so instead we must get the paths from pg_config. This requires extending pg_config to support all the separately-configurable path names, but that was on TODO anyway.
* Fix platform-specific test for path prefix-ness: move it into path.c whereTom Lane2005-08-291-1/+2
| | | | | it can be done right. Allow explicit use of absolute DataDir path. Per Dave Page.
* Fix up canonicalize_path to do the right thing in all cases (I think ...Tom Lane2005-08-121-1/+2
| | | | | this was harder than it seemed at first glance). Also push code for checking for ".." in file names into path.c where it belongs.
* Clean up CREATE DATABASE processing to make it more robust and get ridTom Lane2005-08-021-3/+3
| | | | | | | | | | | | of special case for Windows port. Put a PG_TRY around most of createdb() to ensure that we remove copied subdirectories on failure, even if the failure happens while creating the pg_database row. (I think this explains Oliver Siegmar's recent report.) Having done that, there's no need for the fragile assumption that copydir() mustn't ereport(ERROR), so simplify its API. Eliminate the old code that used system("cp ...") to copy subdirectories, in favor of using copydir() on all platforms. This not only should allow much better error reporting, but allows us to fsync the created files before trusting that the copy has succeeded.
* Complete zic patch backout by removing NO_PGPORT workaround.Bruce Momjian2005-07-061-5/+5
|
* Add NO_PGPORT defines to fix win32/cygwin builds for new target platformBruce Momjian2005-07-051-4/+4
| | | | build of zic.
* Restructure zic #define fprintf checks to use a NO_PGPORT macro instead.Bruce Momjian2005-07-041-2/+2
|
* Remove support for Kerberos V4. It seems no one is using this, it hasNeil Conway2005-06-271-5/+1
| | | | | some security issues, and upstream has declared it "dead". Patch from Magnus Hagander, minor editorialization from Neil Conway.
* Add parentheses to macros when args are used in computations. WithoutBruce Momjian2005-05-251-3/+3
| | | | them, the executation behavior could be unexpected.
* Kerberos fixes from Magnus Hagander --- in theory Kerberos 5 authTom Lane2005-03-251-2/+3
| | | | | | should work on Windows now. Also, rename set_noblock to pg_set_noblock; since it is included in libpq, the former name polluted application namespace.
* Add sprintf support, that were were missing.Bruce Momjian2005-03-161-1/+6
| | | | Add support for snprintf '+', 'h', and %* length settings.
* Add fprintf() custom version to libpgport.Bruce Momjian2005-03-111-2/+12
| | | | | | | Document use of macros for pg_printf functions. Bump major versions of all interfaces to handle movement of get_progname from libpq to libpgport in 8.0, and probably other libpgport changes in 8.1.
* Define snprintf() to call pg_snprintf() so our own snprintf-likeBruce Momjian2005-03-111-1/+21
| | | | | implementation doesn't export out via libpq and get used by a user application.
* Allow Win32 to support the O_SYNC open flag as an wal_sync_method method.Bruce Momjian2005-02-271-2/+3
| | | | Magnus Hagander
* Make the various places that determine the user's "home directory"Tom Lane2005-01-061-7/+1
| | | | | | | | consistent. On Unix we now always consult getpwuid(); $HOME isn't used at all. On Windows the code currently consults $USERPROFILE, or $HOME if that's not defined, but I expect this will change as soon as the win32 hackers come to a consensus. Nothing done yet about changing the file names used underneath $USERPROFILE.
* Tag appropriate files for rc3PostgreSQL Daemon2004-12-311-2/+2
| | | | | | | | Also performed an initial run through of upgrading our Copyright date to extend to 2005 ... first run here was very simple ... change everything where: grep 1996-2004 && the word 'Copyright' ... scanned through the generated list with 'less' first, and after, to make sure that I only picked up the right entries ...
* Miscellaneous Cygwin build fixes from Reini Urban.Tom Lane2004-11-171-7/+12
|
* Update workding on why we use is_absolute_path() as a macro.Bruce Momjian2004-11-081-4/+3
|
* Code cleanup in path.c and exec.c. Handle Windows drive and network specsTom Lane2004-11-061-24/+14
| | | | | | everywhere not just some places, get rid of . and .. when joining path sections together. This should eliminate most of the ugly paths like /foo/bar/./baz that we've been generating.
* Use native Cygwin symlinks so tablespaces work on Win95/98/ME whichBruce Momjian2004-10-111-3/+11
| | | | don't support junction points. Doesn't affect native Win32.
* Add new macro as shorthand for MS VC and Borland C++:Bruce Momjian2004-09-271-5/+6
| | | | | | + #if defined(_MSC_VER) || defined(__BORLANDC__) + #define WIN32_CLIENT_ONLY + #endif
* Improve MS VC builds for psql by handlling flex properly and preventBruce Momjian2004-09-271-1/+6
| | | | rename prototype conflict.
* Move TIMEZONE_GLOBAL out into the proper place.Bruce Momjian2004-09-091-10/+10
|
* Fix Cygwin defines to be consistent.Bruce Momjian2004-09-091-2/+2
|
* Make TZNAME_GLOBAL for reference to tzname global variable.Bruce Momjian2004-09-091-2/+3
|
* Use _timezone global on Cygwin instead of timezone.Bruce Momjian2004-09-081-1/+9
|
* Add WAL logging for CREATE/DROP DATABASE and CREATE/DROP TABLESPACE.Tom Lane2004-08-291-1/+2
| | | | | | | | Fix TablespaceCreateDbspace() to be able to create a dummy directory in place of a dropped tablespace's symlink. This eliminates the open problem of a PANIC during WAL replay when a replayed action attempts to touch a file in a since-deleted tablespace. It also makes for a significant improvement in the usability of PITR replay.
* Pgindent run for 8.0.Bruce Momjian2004-08-291-21/+23
|