aboutsummaryrefslogtreecommitdiff
path: root/src/include/port
Commit message (Collapse)AuthorAge
* Add emulation of non-blocking sockets to the win32 socket/signal layer,Magnus Hagander2010-02-16
| | | | | | | | | and use this in pq_getbyte_if_available. It's only a limited implementation which swithes the whole emulation layer no non-blocking mode, but that's enough as long as non-blocking is only used during a short period of time, and only one socket is accessed during this time.
* Support inlining various small performance-critical functions on non-GCCTom Lane2010-02-13
| | | | | | | | | compilers, by applying a configure check to see if the compiler will accept an unreferenced "static inline foo ..." function without warnings. It is believed that such warnings are the only reason not to declare inlined functions in headers, if the compiler understands "inline" at all. Kurt Harriman
* Make RADIUS authentication use pg_getaddrinfo_all() to get address ofMagnus Hagander2010-02-02
| | | | | | | the server. Gets rid of a fairly ugly hack for Solaris, and also provides hostname and IPV6 support.
* Define INADDR_NONE on Solaris when it's missing. Per a couple of buildfarmMagnus Hagander2010-01-28
| | | | members complaining.
* Make ssize_t 64-bit on Win64, for compatibility with for example plpython.Magnus Hagander2010-01-02
|
* Change our WIN32 API version to be 5.01 (Windows XP), to bring in the properMagnus Hagander2009-09-07
| | | | IPV6 headers in newer SDKs.
* Reserve the shared memory region during backend startup on Windows, soMagnus Hagander2009-07-24
| | | | | | | | | | that memory allocated by starting third party DLLs doesn't end up conflicting with it. Hopefully this solves the long-time issue with "could not reattach to shared memory" errors on Win32. Patch from Tsutomu Yamada and me, based on idea from Trevor Talbot.
* 8.4 pgindent run, with new combined Linux/FreeBSD/MinGW typedef listBruce Momjian2009-06-11
| | | | provided by Andrew.
* Assorted portability fixes for Borland C, from Pavel Golub.Tom Lane2009-04-19
|
* Make win32 builds always do SetEnvironmentVariable() when doing putenv().Magnus Hagander2009-01-21
| | | | | | | | | | | Also, if linked against other versions than the default MSVCRT library (for example the MSVC build which links against MSVCRT80), also update the cache in the default MSVCRT at the same time. This should fix the issues with setting LC_MESSAGES on the MSVC build. Original patch from Hiroshi Inoue and Hiroshi Saito, much rewritten by me.
* Update MinGW so it handles fseeko() similar to Unix.Bruce Momjian2009-01-07
|
* Move carefully obscured SunOS 4 specific #include out of c.h into portPeter Eisentraut2008-12-11
| | | | | header file. SunOS 4 is probably broken anyway, but this item stuck out as completely weird.
* Add $PostgreSQL$ markers to a lot of files that were missing them.Andrew Dunstan2008-05-17
| | | | | | | | | | This particular batch was just for *.c and *.h file. The changes were made with the following 2 commands: find . \( \( -name 'libstemmer' -o -name 'expected' -o -name 'ppport.h' \) -prune \) -o \( -name '*.[ch]' \) \( -exec grep -q '\$PostgreSQL' {} \; -o -print \) | while read file ; do head -n 1 < $file | grep -q '^/\*' && echo $file; done | xargs -l sed -i -e '1s/^\// /' -e '1i/*\n * $PostgreSQL:$ \n *' find . \( \( -name 'libstemmer' -o -name 'expected' -o -name 'ppport.h' \) -prune \) -o \( -name '*.[ch]' \) \( -exec grep -q '\$PostgreSQL' {} \; -o -print \) | xargs -l sed -i -e '1i/*\n * $PostgreSQL:$ \n */'
* Replace time_t with pg_time_t (same values, but always int64) in on-diskTom Lane2008-02-17
| | | | | | | | | | | | | | data structures and backend internal APIs. This solves problems we've seen recently with inconsistent layout of pg_control between machines that have 32-bit time_t and those that have already migrated to 64-bit time_t. Also, we can get out from under the problem that Windows' Unix-API emulation is not consistent about the width of time_t. There are a few remaining places where local time_t variables are used to hold the current or recent result of time(NULL). I didn't bother changing these since they do not affect any cross-module APIs and surely all platforms will have 64-bit time_t before overflow becomes an actual risk. time_t should be avoided for anything visible to extension modules, however.
* Don't enforce 32-bit time_t for FRONTEND apps. Fixes standaloneMagnus Hagander2008-01-09
| | | | builds of libpq in both 32 and 64-bit. Per gripe from Hiroshi Saito.
* Use _USE_32BIT_TIME_T when building with MSVC. Also, enforce that it'sMagnus Hagander2007-12-11
| | | | | | used when building addons. Dave Page
* Borland BCC does not support SSPI, per cnliou9@fastmail.fm.Bruce Momjian2007-11-24
|
* Borland CC 5.5.1 needs ssize_t, per cnliou9@fastmail.fm.Bruce Momjian2007-11-24
|
* pgindent run for 8.3.Bruce Momjian2007-11-15
|
* New versions of mingw have gettimeofday(), so add an autoconf testMagnus Hagander2007-10-29
| | | | for this.
* Change win32 child-death tracking code to use a threadpool to wait forMagnus Hagander2007-10-26
| | | | | | | | childprocess deaths instead of using one thread per child. This drastastically reduces the address space usage and should allow for more backends running. Also change the win32_waitpid functionality to use an IO Completion Port for queueing child death notices instead of using a fixed-size array.
* Rename DLLIMPORT macro to PGDLLIMPORT to avoid conflict withMagnus Hagander2007-07-25
| | | | third party includes (like tcl) that define DLLIMPORT.
* Make it possible, and default, for MingW to build with SSPI supportMagnus Hagander2007-07-24
| | | | | by dynamically loading the function that's missing from the MingW headers and library.
* Fix failure to restart Postgres when Linux kernel returns EIDRM for shmctl().Tom Lane2007-07-02
| | | | | | | | | | | | | This is a Linux kernel bug that apparently exists in every extant kernel version: sometimes shmctl() will fail with EIDRM when EINVAL is correct. We were assuming that EIDRM indicates a possible conflict with pre-existing backends, and refusing to start the postmaster when this happens. Fortunately, there does not seem to be any case where Linux can legitimately return EIDRM (it doesn't track shmem segments in a way that would allow that), so we can get away with just assuming that EIDRM means EINVAL on this platform. Per reports from Michael Fuhr and Jon Lapham --- it's a bit surprising we have not seen more reports, actually.
* Now that core functionality is depending on autoconf's AC_C_BIGENDIAN to beTom Lane2007-04-06
| | | | | | right, there seems precious little reason to have a pile of hand-maintained endianness definitions in src/include/port/*.h. Get rid of those, and make the couple of places that used them depend on WORDS_BIGENDIAN instead.
* Remove headers for old sysv shmem emulation that I forgot.Magnus Hagander2007-03-23
| | | | | Also remove headers for old sysv semaphore emulation that were forgotten when that was changed about a year ago.
* On Windows, use pgwin32_waitforsinglesocket() instead of select() to wait forTom Lane2007-01-26
| | | | | | | | | | input in the stats collector. Our select() emulation is apparently buggy for UDP sockets :-(. This should resolve problems with stats collection (and hence autovacuum) failing under more than minimal load. Diagnosis and patch by Magnus Hagander. Patch probably needs to be back-ported to 8.1 and 8.0, but first let's see if it makes the buildfarm happy...
* Update Win32 exception comment.Bruce Momjian2007-01-25
|
* Add comment about exception lists in both winnt.h and ntstatus.h.Bruce Momjian2007-01-23
|
* Back out use of FormatMessage(), does error values, not exceptionBruce Momjian2007-01-23
| | | | | values. Point to /include/ntstatus.h for an exception list, rather than a URL.
* Print meaningfull error text for abonormal process exit on Win32, ratherBruce Momjian2007-01-23
| | | | than hex codes, using FormatMessage().
* Uppercase hex value.Bruce Momjian2007-01-22
|
* When system() fails in Win32, report it as an exception, print theBruce Momjian2007-01-22
| | | | exception value in hex, and give a URL where the value can be looked-up.
* Allow Borland CC to compile libpq and psql.Bruce Momjian2007-01-11
| | | | | | Backpatch to 8.2.X. L Bayuk
* Make sure BYTE_ORDER gets defined in 64-bit builds on Solaris,Tom Lane2007-01-10
| | | | per Stefan Kaltenbrunner.
* finite() no longer used; remove finite() platform-specificBruce Momjian2007-01-02
| | | | infrastructure.
* Further MSVC portability fixes from Magnus.Tom Lane2006-10-19
|
* Work around buggy strtod on (some versions of?) IRIX. Combination ofTom Lane2006-10-05
| | | | proposed patches from John Jorgensen and Steve Singer.
* Update Solaris strtod() bug comment.Bruce Momjian2006-10-04
|
* Update Solaris strtol() bug comment.Bruce Momjian2006-10-04
|
* pgindent run for 8.2.Bruce Momjian2006-10-04
|
* Rearrange MSVC errcode hack, fix incorrect _MSC_VER test. MagnusTom Lane2006-10-03
|
* Move WIN32_ONLY_COMPILER define from c.h to win32.h because it was beingBruce Momjian2006-10-03
| | | | defined too late.
* Define errcode as __msvc_errcode not __vc_errcode for MSVC builds,Tom Lane2006-09-16
| | | | per Magnus.
* Return inline to win32.h because code was OK, but keep additionalBruce Momjian2006-08-10
| | | | comment. 8.1.X is not affected by this commit.
* Move "#define inline __inline" from port/win32.h to c.h because Win32Bruce Momjian2006-08-10
| | | | | | interface builds like libpq need it. Backpatch addition to 8.1.X.
* Formatting improvement.Bruce Momjian2006-08-09
|
* Fix definition of "errcode" for MSVC.Bruce Momjian2006-08-08
| | | | Hiroshi Saito
* Fix WIN32 wait() return value macros to be accurate, particularlyBruce Momjian2006-07-30
| | | | | | | | | because they are used for testing the return value from system(). (WIN32 doesn't overlay the return code with other failure conditions like Unix does, so they are just simple macros.) Fix regression checks to properly handle diff failures on Win32 using the new macros.
* In a Windows backend, don't build src/port/pgsleep.c's version ofTom Lane2006-07-16
| | | | | | | | pg_usleep at all. Instead call the replacement function in port/win32/signal.c by that name. Avoids tricky macro-redefinition logic and suppresses a compiler warning; furthermore it ensures that no one can accidentally use the non-signal-aware version of pg_usleep in a Windows backend.