Commit Graph

454 Commits

Author SHA1 Message Date
Andres Freund db4ec2ffce Fix alignment of pg_atomic_uint64 variables on some 32bit platforms.
I failed to recognize that pg_atomic_uint64 wasn't guaranteed to be 8
byte aligned on some 32bit platforms - which it has to be on some
platforms to guarantee the desired atomicity and which we assert.

As this is all compiler specific code anyway we can just rely on
compiler specific tricks to enforce alignment.

I've been unable to find concrete documentation about the version that
introduce the sunpro alignment support, so that might need additional
guards.

I've verified that this works with gcc x86 32bit, but I don't have
access to any other 32bit environment.

Discussion: op.xpsjdkil0sbe7t@vld-kuci

Per report from Vladimir Koković.
2015-01-11 01:06:37 +01:00
Andres Freund 93be095007 Move comment about sun cc's __machine_rw_barrier being a full barrier.
I'd accidentally written the comment besides the read barrier, instead
of the full barrier, implementation.

Noticed by Oskari Saarenmaa
2015-01-08 13:08:05 +01:00
Bruce Momjian 4baaf863ec Update copyright for 2015
Backpatch certain files through 9.0
2015-01-06 11:43:47 -05:00
Andres Freund 4a54b99e9c Add native compiler and memory barriers for solaris studio.
Discussion: 20140925133459.GB9633@alap3.anarazel.de
Author: Oskari Saarenmaa
2014-10-25 11:11:39 +02:00
Andres Freund f9f07411a5 Further atomic ops portability improvements and bug fixes.
* Don't play tricks for a more efficient pg_atomic_clear_flag() in the
  generic gcc implementation. The old version was broken on gcc < 4.7
  on !x86 platforms. Per buildfarm member chipmunk.
* Make usage of __atomic() fences depend on HAVE_GCC__ATOMIC_INT32_CAS
  instead of HAVE_GCC__ATOMIC_INT64_CAS - there's platforms with 32bit
  support that don't support 64bit atomics.
* Blindly fix two superflous #endif in generic-xlc.h
* Check for --disable-atomics in platforms but x86.
2014-09-26 15:55:44 +02:00
Andres Freund a30199b01b Fix a couple occurrences of 'the the' in the new atomics API.
Author: Erik Rijkers
2014-09-26 09:37:20 +02:00
Peter Eisentraut d11339c099 Fix whitespace 2014-09-26 02:43:46 -04:00
Andres Freund f18cad9449 Fix atomic ops inline x86 inline assembly for older 32bit gccs.
Some x86 32bit versions of gcc apparently generate references to the
nonexistant %sil register when using when using the r input
constraint, but not with the =q constraint. The latter restricts
allocations to a/b/c/d which should all work.
2014-09-26 02:44:44 +02:00
Andres Freund 88bcdf9da5 Fix atomic ops for x86 gcc compilers that don't understand atomic intrinsics.
Per buildfarm animal locust.
2014-09-26 02:28:52 +02:00
Andres Freund b64d92f1a5 Add a basic atomic ops API abstracting away platform/architecture details.
Several upcoming performance/scalability improvements require atomic
operations. This new API avoids the need to splatter compiler and
architecture dependent code over all the locations employing atomic
ops.

For several of the potential usages it'd be problematic to maintain
both, a atomics using implementation and one using spinlocks or
similar. In all likelihood one of the implementations would not get
tested regularly under concurrency. To avoid that scenario the new API
provides a automatic fallback of atomic operations to spinlocks. All
properties of atomic operations are maintained. This fallback -
obviously - isn't as fast as just using atomic ops, but it's not bad
either. For one of the future users the atomics ontop spinlocks
implementation was actually slightly faster than the old purely
spinlock using implementation. That's important because it reduces the
fear of regressing older platforms when improving the scalability for
new ones.

The API, loosely modeled after the C11 atomics support, currently
provides 'atomic flags' and 32 bit unsigned integers. If the platform
efficiently supports atomic 64 bit unsigned integers those are also
provided.

To implement atomics support for a platform/architecture/compiler for
a type of atomics 32bit compare and exchange needs to be
implemented. If available and more efficient native support for flags,
32 bit atomic addition, and corresponding 64 bit operations may also
be provided. Additional useful atomic operations are implemented
generically ontop of these.

The implementation for various versions of gcc, msvc and sun studio have
been tested. Additional existing stub implementations for
* Intel icc
* HUPX acc
* IBM xlc
are included but have never been tested. These will likely require
fixes based on buildfarm and user feedback.

As atomic operations also require barriers for some operations the
existing barrier support has been moved into the atomics code.

Author: Andres Freund with contributions from Oskari Saarenmaa
Reviewed-By: Amit Kapila, Robert Haas, Heikki Linnakangas and Álvaro Herrera
Discussion: CA+TgmoYBW+ux5-8Ja=Mcyuy8=VXAnVRHp3Kess6Pn3DMXAPAEA@mail.gmail.com,
    20131015123303.GH5300@awork2.anarazel.de,
    20131028205522.GI20248@awork2.anarazel.de
2014-09-25 23:49:05 +02:00
Andres Freund a6d488cb53 Remove Alpha and Tru64 support.
Support for running postgres on Alpha hasn't been tested for a long
while. Due to Alpha's uniquely lax cache coherency model it's a hard
to develop for platform (especially blindly!) and thought to be
unlikely to currently work correctly.

As Alpha is the only supported architecture for Tru64 drop support for
it as well. Tru64's support has ended 2012 and it has been in
maintenance-only mode for much longer.

Also remove stray references to __ksr__ and ultrix defines.
2014-06-28 21:46:15 +02:00
Bruce Momjian 0a78320057 pgindent run for 9.4
This includes removing tabs after periods in C comments, which was
applied to back branches, so this change should not effect backpatching.
2014-05-06 12:12:18 -04:00
Andrew Dunstan cec8394b5c Enable building with Visual Studion 2013.
Backpatch to 9.3.

Brar Piening.
2014-01-26 09:49:10 -05:00
Tom Lane 09a89cb5fc Get rid of use of asprintf() in favor of a more portable implementation.
asprintf(), aside from not being particularly portable, has a fundamentally
badly-designed API; the psprintf() function that was added in passing in
the previous patch has a much better API choice.  Moreover, the NetBSD
implementation that was borrowed for the previous patch doesn't work with
non-C99-compliant vsnprintf, which is something we still have to cope with
on some platforms; and it depends on va_copy which isn't all that portable
either.  Get rid of that code in favor of an implementation similar to what
we've used for many years in stringinfo.c.  Also, move it into libpgcommon
since it's not really libpgport material.

I think this patch will be enough to turn the buildfarm green again, but
there's still cosmetic work left to do, namely get rid of pg_asprintf()
in favor of using psprintf().  That will come in a followon patch.
2013-10-22 18:42:13 -04:00
Peter Eisentraut c2316dcda1 Fix for lack of va_copy() on certain Windows versions
Based-on-patch-by: David Rowley <dgrowleyml@gmail.com>
2013-10-18 09:54:50 -04:00
Robert Haas ea91a6be89 Remove IRIX port.
Development of IRIX has been discontinued, and support is scheduled
to end in December of 2013.  Therefore, there will be no supported
versions of this operating system by the time PostgreSQL 9.4 is
released.  Furthermore, we have no maintainer for this platform.
2013-10-18 08:14:21 -04:00
Andrew Dunstan 73838b5251 Unconditionally use the WSA equivalents of Socket error constants.
This change will only apply to mingw compilers, and has been found
necessary by late versions of the mingw-w64 compiler. It's the same as
what is done elsewhere for the Microsoft compilers.

If this doesn't upset older compilers in the buildfarm, it will be
backpatched to 9.1.

Problem reported by Michael Cronenworth, although not his patch.
2013-08-20 14:11:36 -04:00
Bruce Momjian 9af4159fce pgindent run for release 9.3
This is the first run of the Perl-based pgindent script.  Also update
pgindent instructions.
2013-05-29 16:58:43 -04:00
Bruce Momjian aa69670e42 Add URLs to document why DLLIMPORT is needed on Windows.
Per email from Craig Ringer
2012-11-07 15:01:25 -05:00
Andrew Dunstan 6e9876dc32 Remove checks for now long outdated compilers. 2012-09-28 19:43:50 -04:00
Bruce Momjian 927d61eeff Run pgindent on 9.2 source tree in preparation for first 9.3
commit-fest.
2012-06-10 15:20:04 -04:00
Bruce Momjian ebcaa5fcde Remove BSD/OS (BSDi) port. There are no known users upgrading to
Postgres 9.2, and perhaps no existing users either.
2012-05-03 10:58:44 -04:00
Peter Eisentraut f2f9439fbf Remove dead ports
Remove the following ports:

- dgux
- nextstep
- sunos4
- svr4
- ultrix4
- univel

These are obsolete and not worth rescuing.  In most cases, there is
circumstantial evidence that they wouldn't work anymore anyway.
2012-05-01 22:11:12 +03:00
Robert Haas 5d4b60f2f2 Lots of doc corrections.
Josh Kupershmidt
2012-04-23 22:43:09 -04:00
Andrew Dunstan 63876d3bac Support for building with MS Visual Studio 2010.
Brar Piening, reviewed by Craig Ringer.
2012-01-03 08:44:26 -05:00
Andrew Dunstan 1a0c76c32f Enable compiling with the mingw-w64 32 bit compiler.
Original patch by Lars Kanis, reviewed by Nishiyama Tomoaki and tweaked some by me.

This compiler, or at least the latest version of it, is currently broken, and
only passes the regression tests if built with -O0.
2011-12-10 15:35:41 -05:00
Andrew Dunstan 6693fec0e8 Revert "Force use of "%I64d" format for 64 bit ints on MinGW."
This reverts commit 52d01c2f52.

the UINT64_FORMAT bit broke the b uildfarm, so I'm reverting the whole thing pending further investigation.
2011-04-27 14:55:18 -04:00
Andrew Dunstan 52d01c2f52 Force use of "%I64d" format for 64 bit ints on MinGW.
Both this and "%lld" work, but the compiler's format checking doesn't
like "%lld", so we get all sorts of spurious warnings.
2011-04-27 10:09:23 -04:00
Andrew Dunstan 860be17ec3 Assorted minor changes to silence Windows compiler warnings.
Mostly to do with macro redefinitions or object signedness.
2011-04-25 12:56:53 -04:00
Tom Lane 2ab0796d7a Fix char2wchar/wchar2char to support collations properly.
These functions should take a pg_locale_t, not a collation OID, and should
call mbstowcs_l/wcstombs_l where available.  Where those functions are not
available, temporarily select the correct locale with uselocale().

This change removes the bogus assumption that all locales selectable in
a given database have the same wide-character conversion method; in
particular, the collate.linux.utf8 regression test now passes with
LC_CTYPE=C, so long as the database encoding is UTF8.

I decided to move the char2wchar/wchar2char functions out of mbutils.c and
into pg_locale.c, because they work on wchar_t not pg_wchar_t and thus
don't really belong with the mbutils.c functions.  Keeping them where they
were would have required importing pg_locale_t into pg_wchar.h somehow,
which did not seem like a good plan.
2011-04-23 12:35:41 -04:00
Tom Lane f510fc1d90 Add some more mapping macros for Microsoft wide-character API.
Per buildfarm.
2011-04-10 19:37:24 -04:00
Bruce Momjian bf50caf105 pgindent run before PG 9.1 beta 1. 2011-04-10 11:42:00 -04:00
Peter Eisentraut 11745364d0 Add collation support on Windows (MSVC build)
There is not yet support in initdb to populate the pg_collation
catalog, but if that is done manually, the rest should work.
2011-04-10 00:15:41 +03:00
Andrew Dunstan 48c9de8028 Fix typo 2011-01-30 20:34:05 -05:00
Andrew Dunstan 91812df4ed Enable building with the Mingw64 compiler.
This can be used to build 64 bit Windows binaries, not only on 64 bit
Windows but on supported cross-compiling hosts including 32 bit Windows,
Cygwin, Darwin and Linux.
2011-01-30 19:56:46 -05:00
Magnus Hagander dcb09b595f Support for collecting crash dumps on Windows
Add support for collecting "minidump" style crash dumps on
Windows, by setting up an exception handling filter. Crash
dumps will be generated in PGDATA/crashdumps if the directory
is created (the existance of the directory is used as on/off
switch for the generation of the dumps).

Craig Ringer and Magnus Hagander
2010-12-19 16:45:28 +01:00
Tom Lane 5132ad8bdf Make S_IRGRP etc available in mingw builds as well as MSVC.
(Hm, I wonder whether BCC defines them either...)

Also label dangling endifs a bit better in this area.
2010-12-12 13:43:44 -05:00
Tom Lane 1319002e2e Provide a complete set of file-permission-bit macros in win32.h.
My previous patch exposed the fact that we didn't have these.  Those
hard-wired octal constants were actually wrong on Windows, not just
inconsistent.
2010-12-11 13:11:18 -05:00
Tom Lane 576477e73c Force default wal_sync_method to be fdatasync on Linux.
Recent versions of the Linux system header files cause xlogdefs.h to
believe that open_datasync should be the default sync method, whereas
formerly fdatasync was the default on Linux.  open_datasync is a bad
choice, first because it doesn't actually outperform fdatasync (in fact
the reverse), and second because we try to use O_DIRECT with it, causing
failures on certain filesystems (e.g., ext4 with data=journal option).
This part of the patch is largely per a proposal from Marti Raudsepp.
More extensive changes are likely to follow in HEAD, but this is as much
change as we want to back-patch.

Also clean up confusing code and incorrect documentation surrounding the
fsync_writethrough option.  Those changes shouldn't result in any actual
behavioral change, but I chose to back-patch them anyway to keep the
branches looking similar in this area.

In 9.0 and HEAD, also do some copy-editing on the WAL Reliability
documentation section.

Back-patch to all supported branches, since any of them might get used
on modern Linux versions.
2010-12-08 20:01:09 -05:00
Itagaki Takahiro 844ed5dc97 Don't use __declspec (dllimport) for PGDLLEXPORT to reduce warnings
by gcc version 4 on mingw and cygwin. We don't use dllexport here
because dllexport and dllwrap don't work well together.
2010-11-10 12:17:43 +09:00
Magnus Hagander 9f2e211386 Remove cvs keywords from all files. 2010-09-20 22:08:53 +02:00
Tom Lane 9eef3318a2 Fix several broken $PostgreSQL$ keywords. Noted while experimenting
with Magnus's script to remove these.
2010-09-19 16:17:45 +00:00
Bruce Momjian 239d769e7e pgindent run for 9.0, second run 2010-07-06 19:19:02 +00:00
Itagaki Takahiro e54b0cba96 PGDLLEXPORT is __declspec (dllexport) only on MSVC,
but is __declspec (dllimport) on other compilers
because cygwin and mingw don't like dllexport.
2010-05-28 16:34:15 +00:00
Itagaki Takahiro 77e50a61ff Mark PG_MODULE_MAGIC and PG_FUNCTION_INFO_V1 with PGDLLEXPORT
independently from BUILDING_DLL. It is always __declspec(dllexport).
2010-05-27 07:59:48 +00:00
Magnus Hagander 215cbc90f8 Add emulation of non-blocking sockets to the win32 socket/signal layer,
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.
2010-02-16 19:26:02 +00:00
Tom Lane e08ab7c312 Support inlining various small performance-critical functions on non-GCC
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
2010-02-13 02:34:16 +00:00
Magnus Hagander 0a27347141 Make RADIUS authentication use pg_getaddrinfo_all() to get address of
the server.

Gets rid of a fairly ugly hack for Solaris, and also provides hostname
and IPV6 support.
2010-02-02 19:09:37 +00:00
Magnus Hagander 21d3ae09da Define INADDR_NONE on Solaris when it's missing. Per a couple of buildfarm
members complaining.
2010-01-28 11:36:14 +00:00
Magnus Hagander c3705d8cc5 Make ssize_t 64-bit on Win64, for compatibility with for example plpython. 2010-01-02 22:47:37 +00:00
Magnus Hagander 9f0e84a65d Change our WIN32 API version to be 5.01 (Windows XP), to bring in the proper
IPV6 headers in newer SDKs.
2009-09-07 11:22:12 +00:00
Magnus Hagander a7e587863c Reserve the shared memory region during backend startup on Windows, so
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.
2009-07-24 20:12:42 +00:00
Bruce Momjian d747140279 8.4 pgindent run, with new combined Linux/FreeBSD/MinGW typedef list
provided by Andrew.
2009-06-11 14:49:15 +00:00
Tom Lane ce53791b2a Assorted portability fixes for Borland C, from Pavel Golub. 2009-04-19 22:37:13 +00:00
Magnus Hagander 0154345078 Make win32 builds always do SetEnvironmentVariable() when doing putenv().
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.
2009-01-21 10:30:02 +00:00
Bruce Momjian d00a3472cf Update MinGW so it handles fseeko() similar to Unix. 2009-01-07 03:39:33 +00:00
Peter Eisentraut 21a743e886 Move carefully obscured SunOS 4 specific #include out of c.h into port
header file.  SunOS 4 is probably broken anyway, but this item stuck out as
completely weird.
2008-12-11 09:17:07 +00:00
Andrew Dunstan 53972b460c Add $PostgreSQL$ markers to a lot of files that were missing them.
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 */'
2008-05-17 01:28:26 +00:00
Tom Lane cd00406774 Replace time_t with pg_time_t (same values, but always int64) in on-disk
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.
2008-02-17 02:09:32 +00:00
Magnus Hagander 8d546c7170 Don't enforce 32-bit time_t for FRONTEND apps. Fixes standalone
builds of libpq in both 32 and 64-bit. Per gripe from Hiroshi Saito.
2008-01-09 09:16:43 +00:00
Magnus Hagander 22867ab986 Use _USE_32BIT_TIME_T when building with MSVC. Also, enforce that it's
used when building addons.

Dave Page
2007-12-11 14:34:43 +00:00
Bruce Momjian 0d072761d3 Borland BCC does not support SSPI, per cnliou9@fastmail.fm. 2007-11-24 01:55:26 +00:00
Bruce Momjian 7a1b72f6ef Borland CC 5.5.1 needs ssize_t, per cnliou9@fastmail.fm. 2007-11-24 01:32:48 +00:00
Bruce Momjian fdf5a5efb7 pgindent run for 8.3. 2007-11-15 21:14:46 +00:00
Magnus Hagander 6f14effbf9 New versions of mingw have gettimeofday(), so add an autoconf test
for this.
2007-10-29 11:25:42 +00:00
Magnus Hagander bb98b2e27e Change win32 child-death tracking code to use a threadpool to wait for
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.
2007-10-26 21:50:10 +00:00
Magnus Hagander 906b2e1b37 Rename DLLIMPORT macro to PGDLLIMPORT to avoid conflict with
third party includes (like tcl) that define DLLIMPORT.
2007-07-25 12:22:54 +00:00
Magnus Hagander d602592494 Make it possible, and default, for MingW to build with SSPI support
by dynamically loading the function that's missing from the MingW
headers and library.
2007-07-24 09:00:27 +00:00
Tom Lane 1c7fe33fdb Fix failure to restart Postgres when Linux kernel returns EIDRM for shmctl().
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.
2007-07-02 20:11:55 +00:00
Tom Lane 37a609b27f Now that core functionality is depending on autoconf's AC_C_BIGENDIAN to be
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.
2007-04-06 05:36:51 +00:00
Magnus Hagander 1ca6ab1c78 Remove headers for old sysv shmem emulation that I forgot.
Also remove headers for old sysv semaphore emulation that were forgotten
when that was changed about a year ago.
2007-03-23 08:30:55 +00:00
Tom Lane 4355d214c2 On Windows, use pgwin32_waitforsinglesocket() instead of select() to wait for
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...
2007-01-26 20:06:52 +00:00
Bruce Momjian 70268b50dd Update Win32 exception comment. 2007-01-25 21:50:49 +00:00
Bruce Momjian 867c133599 Add comment about exception lists in both winnt.h and ntstatus.h. 2007-01-23 16:21:17 +00:00
Bruce Momjian 882b9948d7 Back out use of FormatMessage(), does error values, not exception
values.  Point to /include/ntstatus.h for an exception list, rather than
a URL.
2007-01-23 03:28:49 +00:00
Bruce Momjian 610f60a092 Print meaningfull error text for abonormal process exit on Win32, rather
than hex codes, using FormatMessage().
2007-01-23 01:45:11 +00:00
Bruce Momjian d26a5f1fea Uppercase hex value. 2007-01-22 18:32:57 +00:00
Bruce Momjian 208ae0c290 When system() fails in Win32, report it as an exception, print the
exception value in hex, and give a URL where the value can be looked-up.
2007-01-22 18:31:51 +00:00
Bruce Momjian a5ec2ec77a Allow Borland CC to compile libpq and psql.
Backpatch to 8.2.X.

L Bayuk
2007-01-11 02:42:31 +00:00
Tom Lane c4e7e675d8 Make sure BYTE_ORDER gets defined in 64-bit builds on Solaris,
per Stefan Kaltenbrunner.
2007-01-10 18:22:50 +00:00
Bruce Momjian cac2d912d9 finite() no longer used; remove finite() platform-specific
infrastructure.
2007-01-02 21:25:50 +00:00
Tom Lane f6e00ae128 Further MSVC portability fixes from Magnus. 2006-10-19 20:03:08 +00:00
Tom Lane b2c04d5e6b Work around buggy strtod on (some versions of?) IRIX. Combination of
proposed patches from John Jorgensen and Steve Singer.
2006-10-05 01:40:45 +00:00
Bruce Momjian 03ea9ecbda Update Solaris strtod() bug comment. 2006-10-04 22:49:44 +00:00
Bruce Momjian 50a3fb9f22 Update Solaris strtol() bug comment. 2006-10-04 22:48:41 +00:00
Bruce Momjian f99a569a2e pgindent run for 8.2. 2006-10-04 00:30:14 +00:00
Tom Lane 0184c6835c Rearrange MSVC errcode hack, fix incorrect _MSC_VER test. Magnus 2006-10-03 20:33:20 +00:00
Bruce Momjian 878f32feab Move WIN32_ONLY_COMPILER define from c.h to win32.h because it was being
defined too late.
2006-10-03 03:59:22 +00:00
Tom Lane 801cbe3310 Define errcode as __msvc_errcode not __vc_errcode for MSVC builds,
per Magnus.
2006-09-16 13:35:49 +00:00
Bruce Momjian e860e746e1 Return inline to win32.h because code was OK, but keep additional
comment.  8.1.X is not affected by this commit.
2006-08-10 01:41:29 +00:00
Bruce Momjian 3929b6e9f6 Move "#define inline __inline" from port/win32.h to c.h because Win32
interface builds like libpq need it.

Backpatch addition to 8.1.X.
2006-08-10 01:35:21 +00:00
Bruce Momjian f896b5e146 Formatting improvement. 2006-08-09 17:33:52 +00:00
Bruce Momjian c554bf878f Fix definition of "errcode" for MSVC.
Hiroshi Saito
2006-08-08 18:49:14 +00:00
Bruce Momjian 1a271f0c71 Fix WIN32 wait() return value macros to be accurate, particularly
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.
2006-07-30 01:45:21 +00:00
Tom Lane 93120f3501 In a Windows backend, don't build src/port/pgsleep.c's version of
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.
2006-07-16 20:17:04 +00:00
Tom Lane 808849e54f Fix lack of repeat-inclusion guard in win32 substitute sys/socket.h.
I think this explains the 'implicit declaration of function gai_strerror'
warnings visible in the current buildfarm report from snake: if
sys/socket.h is included again after getaddrinfo.h, the file would
merrily undefine the gai_strerror macro.
2006-07-16 01:35:28 +00:00
Tom Lane c713683fd7 Reverse inclusion order of <ws2tcpip.h> and <winsock2.h>, per Dave Page. 2006-07-11 14:25:09 +00:00
Bruce Momjian e56756e94e Use Unix line endings instead of DOS ones, per Magnus. 2006-06-26 12:59:44 +00:00
Bruce Momjian e2fee8cf6d Update include files to Unix newline format, per report from Magnus. 2006-06-26 12:52:12 +00:00
Bruce Momjian 399a36a75d Prepare code to be built by MSVC:
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
2006-06-07 22:24:46 +00:00
Bruce Momjian f3d99d160d Add CVS tag lines to files that were lacking them. 2006-03-11 04:38:42 +00:00
Bruce Momjian 502e9aefdc Clarify macro layout for win32 IMPORT. 2006-03-03 20:52:36 +00:00
Tom Lane 558bc2584d Fix fsync code to test whether F_FULLFSYNC is available, instead of
assuming it always is on Darwin.  Per report from Neil Brandt.
2006-01-17 23:52:31 +00:00
Andrew Dunstan ad24b8e6ee remove unneeded defines for uid_t and gid_t, which conflict with perl's typedefs. 2006-01-10 01:01:03 +00:00
Bruce Momjian 44f9021223 Remove BEOS port. 2006-01-05 03:01:38 +00:00
Bruce Momjian 6f84b2da75 Remove QNX file. 2006-01-05 02:43:38 +00:00
Tom Lane 25777f6fd3 Fix Windows setitimer() emulation to not depend on delivering an APC
to the main thread.  This allows removal of WaitForSingleObjectEx() calls
from the main thread, thereby allowing us to re-enable Qingqing Zhou's
CHECK_FOR_INTERRUPTS performance improvement.  Qingqing, Magnus, et al.
2005-10-25 15:15:16 +00:00
Tom Lane 6aad07d270 Improve performance of CHECK_FOR_INTERRUPTS() macro on Windows by not doing
a kernel call unless there's some evidence of a pending signal.  This should
bring its performance on Windows into line with the Unix version.  Problem
diagnosis and patch by Qingqing Zhou.  Minor stylistic tweaks by moi ...
if it's broken, it's my fault.
2005-10-21 21:43:46 +00:00
Bruce Momjian 1dc3498251 Standard pgindent run for 8.1. 2005-10-15 02:49:52 +00:00
Tom Lane a310a1d80c Some more mop-up for Windows IPv6 support. Andrew Dunstan 2005-08-26 03:15:12 +00:00
Bruce Momjian 26cbccd52c Add fsync() define for Win32 to cover cases other than wal_sync_method
where we need fsync().
2005-06-16 17:53:54 +00:00
Bruce Momjian 6dc7760ac3 Add support for wal_fsync_writethrough for Darwin, and restructure the
code to better handle writethrough.

Chris Campbell
2005-05-20 14:53:26 +00:00
Bruce Momjian b1f57d88f5 Change Win32 O_SYNC method to O_DSYNC because that is what the method
currently does.  This is now the default Win32 wal sync method because
we perfer o_datasync to fsync.

Also, change Win32 fsync to a new wal sync method called
fsync_writethrough because that is the behavior of _commit, which is
what is used for fsync on Win32.

Backpatch to 8.0.X.
2005-03-24 04:36:20 +00:00
Bruce Momjian afbc30e5d4 Allow Win32 to support the O_SYNC open flag as an wal_sync_method method.
Magnus Hagander
2005-02-27 00:53:29 +00:00
Tom Lane 5cfdd68f84 Rearrange include file contents into a saner order, add inclusion of
<signal.h>.  Per Andrew Dunstan.
2004-12-26 19:20:33 +00:00
Bruce Momjian ee9007a2e1 Allow libpq to build on MS Visual Studio .NET 2003 on Windows XP. 2004-12-01 23:42:26 +00:00
Tom Lane 0021ae06be Fix Win32 problems with signals and sockets, by making the forkexec code
even uglier than it was already :-(.  Also, on Windows only, use temporary
shared memory segments instead of ordinary files to pass over critical
variable values from postmaster to child processes.  Magnus Hagander
2004-11-17 00:14:14 +00:00
Bruce Momjian aa20badeaf Fix improper defines for uid_t and gid_t. Had them backwards. 2004-10-06 17:47:53 +00:00
Bruce Momjian 87ea6f0dbe Use #define instead of typedef for plperl because perl defines
uid_t/gid_t too.
2004-10-06 16:36:02 +00:00
Bruce Momjian 902ca3e225 Here is a patch to fix win32 ssl builds. Summary of changes:
* Links with -leay32 and -lssleay32 instead of crypto and ssl. On win32,
"crypto and ssl" is only used for static linking.

* Initializes SSL in the backend and not just in the postmaster. We
cannot pass the SSL context from the postmaster through the parameter
file, because it contains function pointers.

* Split one error check in be-secure.c. Previously we could not tell
which of three calls actually failed. The previous code also returned
incorrect error messages if SSL_accept() failed - that function needs to
use SSL_get_error() on the return value, can't just use the error queue.

* Since the win32 implementation uses non-blocking sockets "behind the
scenes" in order to deliver signals correctly, implements a version of
SSL_accept() that can handle this. Also, add a wait function in case
SSL_read or SSL_write() needs more data.

Magnus Hagander
2004-10-06 09:35:23 +00:00
Bruce Momjian 4d47db363b Fix typo in recent Win32 typedef change. 2004-10-05 14:27:07 +00:00
Bruce Momjian 2def476de3 Remove unused Win32 defines, convert them to typdefs, per suggestion
from Peter.
2004-10-05 13:48:35 +00:00
Bruce Momjian e1c8b37afb Add new macro as shorthand for MS VC and Borland C++:
+ #if   defined(_MSC_VER) || defined(__BORLANDC__)
+ #define       WIN32_CLIENT_ONLY
+ #endif
2004-09-27 23:24:45 +00:00
Tom Lane 4f7d3e0faf Win32 compile fix for misc_utils.
Claudio Natoli
2004-09-14 03:50:17 +00:00
Bruce Momjian f1d1116178 Fix Cygwin defines to be consistent. 2004-09-09 00:59:49 +00:00
Tom Lane cb79234307 Apparently HPUX runs the IA64 in big-endian mode. 2004-09-02 21:03:30 +00:00
Bruce Momjian b4456e6d6a Define lstat with parameters, rather than just redefining the symbol. 2004-08-31 11:29:56 +00:00
Bruce Momjian 2e88d29f88 Fix typo in lstat() macro exposed by new tablespace code. 2004-08-31 11:25:33 +00:00
Bruce Momjian b6b71b85bc Pgindent run for 8.0. 2004-08-29 05:07:03 +00:00
Bruce Momjian 704ff0b2f2 >>> I understand your disliking of non-posix stuff. OTOH,
>>GetLastError will
>>> give much more details than errno.
>>
>>How much more, really?  That mapping table gave me the impression that
>>the win32 error codes aren't all that much more detailed than errno...
>
>The mapping table is not complete. My winerror.h from the SDK
>lists 2209
>error codes, whereas errno.h lists 42...
>
>I still don't think we'll get that much more stuff. Right now,
>the Win32
>code paths that actually use the more advanced functions already write
>out the error number in case something happens. We can keep doing that
>for the other paths (ereport the error *number* when the mapping does
>not have a match). The map to errno will catch almost all cases, I
>think. And in the corner cases we can do with just the number, and use
>"net helpmsg" to get the actual message when checking...

Here's an attempt on this. new file goes in backend/port/win32.

Magnus Hagander
2004-08-29 00:38:03 +00:00
Tom Lane b2d9fbeef2 Work around broken strtod() that's present in many Solaris releases.
Thanks to Michael Fuhr for identifying the problem.
2004-08-11 17:20:50 +00:00
Bruce Momjian 25c161eba6 Move Win32 defines from port.h to win32.h. 2004-07-23 01:58:36 +00:00
Tom Lane b15f9b08ef Replace direct fprintf(stderr) calls by write_stderr(), and cause this
routine to do something appropriate on Win32.  Also, add a security check
on Win32 that parallels the can't-run-as-root check on Unix.

Magnus Hagander
2004-06-24 21:03:42 +00:00
Bruce Momjian 83526ccf06 Cleanup for Win32 pgkill. 2004-05-27 14:39:33 +00:00
Bruce Momjian 6f21f4adaa Move pgkill out into /port so pg_ctl can use it on Win32. 2004-05-27 13:08:57 +00:00
Bruce Momjian 178c08d0c7 Rename another irix file. 2004-05-19 21:39:16 +00:00
Tom Lane 0bd61548ab Solve the 'Turkish problem' with undesirable locale behavior for case
conversion of basic ASCII letters.  Remove all uses of strcasecmp and
strncasecmp in favor of new functions pg_strcasecmp and pg_strncasecmp;
remove most but not all direct uses of toupper and tolower in favor of
pg_toupper and pg_tolower.  These functions use the same notions of
case folding already developed for identifier case conversion.  I left
the straight locale-based folding in place for situations where we are
just manipulating user data and not trying to match it to built-in
strings --- for example, the SQL upper() function is still locale
dependent.  Perhaps this will prove not to be what's wanted, but at
the moment we can initdb and pass regression tests in Turkish locale.
2004-05-07 00:24:59 +00:00
Bruce Momjian b00d50d365 Per discussion earlier today, here is a fix that lets ereport() on win32
report socket errors.

Magnus Hagander
2004-04-22 03:51:24 +00:00
Bruce Momjian 31338352bd * Most changes are to fix warnings issued when compiling win32
* removed a few redundant defines
* get_user_name safe under win32
* rationalized pipe read EOF for win32 (UPDATED PATCH USED)
* changed all backend instances of sleep() to pg_usleep

    - except for the SLEEP_ON_ASSERT in assert.c, as it would exceed a
32-bit long [Note to patcher: If a SLEEP_ON_ASSERT of 2000 seconds is
acceptable, please replace with pg_usleep(2000000000L)]

I added a comment to that part of the code:

    /*
     *  It would be nice to use pg_usleep() here, but only does 2000 sec
     *  or 33 minutes, which seems too short.
     */
    sleep(1000000);

Claudio Natoli
2004-04-19 17:42:59 +00:00
Bruce Momjian a4c40f140d Here's an attempt at new socket and signal code for win32.
It works on the principle of turning sockets into non-blocking, and then
emulate blocking behaviour on top of that, while allowing signals to
run. Signals are now implemented using an event instead of APCs, thus
getting rid of the issue of APCs not being compatible with "old style"
sockets functions.

It also moves the win32 specific code away from pqsignal.h/c into
port/win32, and also removes the "thread style workaround" of the APC
issue previously in place.

In order to make things work, a few things are also changed in pgstat.c:

1) There is now a separate pipe to the collector and the bufferer. This
is required because the pipe will otherwise only be signalled in one of
the processes when the postmaster goes down. The MS winsock code for
select() must have some kind of workaround for this behaviour, but I
have found no stable way of doing that. You really are not supposed to
use the same socket from more than one process (unless you use
WSADuplicateSocket(), in which case the docs specifically say that only
one will be flagged).

2) The check for "postmaster death" is moved into a separate select()
call after the main loop. The previous behaviour select():ed on the
postmaster pipe, while later explicitly saying "we do NOT check for
postmaster exit inside the loop".
The issue was that the code relies on the same select() call seeing both
the postmaster pipe *and* the pgstat pipe go away. This does not always
happen, and it appears that useing WSAEventSelect() makes it even more
common that it does not.
Since it's only called when the process exits, I don't think using a
separate select() call will have any significant impact on how the stats
collector works.

Magnus Hagander
2004-04-12 16:19:18 +00:00
Tom Lane 1bc2d544b9 Localize our dependencies on the way to create NAN or INFINITY.
Per recent proposal to pghackers.
2004-03-15 03:29:22 +00:00
Bruce Momjian 24262be5f9 Add missing checks for Borland C compiler.
L J Bayuk
2004-03-02 18:35:59 +00:00
Tom Lane 4f571319d3 NOFILE isn't used anywhere any more. 2004-02-23 20:48:03 +00:00
Bruce Momjian af3b182a57 Here is a patch that implements setitimer() on win32. With this patch
applied, deadlock detection and statement_timeout now works.

The file timer.c goes into src/backend/port/win32/.

The patch also removes two lines of "printf debugging" accidentally left
in pqsignal.h, in the console control handler.

Magnus Hagander
2004-02-18 16:25:12 +00:00
Neil Conway f06e79525a Win32 signals cleanup. Patch by Magnus Hagander, with input from Claudio
Natoli and Bruce Momjian (and some cosmetic fixes from Neil Conway).
Changes:

    - remove duplicate signal definitions from pqsignal.h

    - replace pqkill() with kill() and redefine kill() in Win32

    - use ereport() in place of fprintf() in some error handling in
      pqsignal.c

    - export pg_queue_signal() and make use of it where necessary

    - add a console control handler for Ctrl-C and similar handling
      on Win32

    - do WaitForSingleObjectEx() in CHECK_FOR_INTERRUPTS() on Win32;
      query cancelling should now work on Win32

    - various other fixes and cleanups
2004-02-08 22:28:57 +00:00
Bruce Momjian eec08b95e7 [all] Removed call to getppid in SendPostmasterSignal, replacing with a
PostmasterPid variable, which gets set (early) in PostmasterMain
getppid would not be the postmaster?

[fork/exec] Implements processCancelRequest by keeping an array of

pid/cancel_key structs in shared mem

[fork/exec] Moves AttachSharedMemoryAndSemaphores call for backends into
SubPostmasterMain

[win32] Implements reaper/waitpid by keeping an arrays of children
pids,handles in postmaster local mem
      - this item is largely untested, for reasons which should be
obvious, but appears sound

[win32/all] Added extern for pgpipe in Win32 case, and changed the second
pipe call (which seems to have been missed earlier) to pgpipe

[win32] #define'd ftruncate to chsize in the Win32 case

[win32] PG_USLEEP for Win32 has a misplaced paren. Fixed.

[win32] DLLIMPORT handling for MingW case


Claudio Natoli
2004-01-26 22:59:54 +00:00
Bruce Momjian ede3b762a3 Back out win32 patch so we can apply it separately. 2004-01-26 22:54:58 +00:00
Bruce Momjian f4921e5ca3 Attached is a patch that fixes some trivial typos and alignment. Please
apply.

Alvaro Herrera
2004-01-26 22:51:56 +00:00
Tom Lane 9adaf64da3 Mop-up for HAS_TEST_AND_SET refactoring. Un-break two or three platforms
that were broken, try to make layout of s_lock.h entries consistent,
use HAVE_SPINLOCKS in preference to HAS_TEST_AND_SET everywhere outside
s_lock.h itself.
2003-12-23 18:13:17 +00:00
Bruce Momjian 69f2e9b0fc Move slock_t typdefs into s_lock.h from include/port files for
centralization and easier maintanence.
2003-12-23 03:31:30 +00:00
Bruce Momjian 887b5a7be0 Remove NEED_I386_TAS_ASM and just test for compiler defines. 2003-12-23 00:32:06 +00:00
Bruce Momjian 9114cb1c5f This applied patch remove NEED_SPARC_TAS_ASM and instead uses __sparc ||
__sparc__.
2003-12-22 23:39:53 +00:00
PostgreSQL Daemon 969685ad44 $Header: -> $PostgreSQL Changes ... 2003-11-29 19:52:15 +00:00
Bruce Momjian ce26858fac Update for m68k from Peter. 2003-10-26 01:41:10 +00:00
Bruce Momjian 72ecc222b7 Fix #elif typo. 2003-10-26 00:27:59 +00:00
Bruce Momjian 1fdbc8cc20 Update linux/mips port.
Add m68k to linux port.
2003-10-26 00:26:13 +00:00
Tom Lane 026f9c05d5 Move -D_GNU_SOURCE hack from port header to template, so that
configure's tests see the same compilation environment as the code.
Per discussion with Stephan Szabo.
2003-09-26 17:39:13 +00:00
Tom Lane 241cea18f7 Add missing support for Opteron (__x86_64__). 2003-09-14 20:21:18 +00:00
Bruce Momjian 69a46e9ce1 Enable Opteron/Itanium spinlocks. 2003-09-12 15:49:34 +00:00
Bruce Momjian 089003fb46 pgindent run. 2003-08-04 00:43:34 +00:00
Tom Lane 13ac54d1ca Since HPUX now exists for Itanium, we should decouple the assumption
that OS=hpux is the same as CPU=hppa.  First steps at doing this.
With these patches, we still work on hppa with either gcc or HP's cc.
We might work on hpux/itanium with gcc, but I can't test it.  Definitely
will not work on hpux/itanium with non-gcc compiler, for lack of spinlock
code.
2003-08-01 19:12:52 +00:00
Bruce Momjian b4cea00a1f IPv6 cleanups.
Kurt Roeckx
Andrew Dunstan
2003-06-12 07:36:51 +00:00
Bruce Momjian 77645b99f4 Add define for missing EAI_ADDRFAMILY in BSD/OS 4.3. 2003-05-22 19:14:25 +00:00
Peter Eisentraut 6fabec242d Fix compilation on Cygwin. 2003-05-22 17:20:44 +00:00
Bruce Momjian 36adb2e095 Rename Win32 include directory from win32_include to win32. 2003-05-19 17:31:59 +00:00
Bruce Momjian c42581eba3 Allow interfaces to compile under MingGW/Win32 by adding _P to symbols
in ecpg.
2003-05-16 04:59:24 +00:00
Bruce Momjian bee0ac67ee Add missing win32 file --- seems best way to find these is to just
commmit then do a cvs update again.
2003-05-15 16:40:29 +00:00
Bruce Momjian 12c9423832 Allow Win32 to compile under MinGW. Major changes are:
Win32 port is now called 'win32' rather than 'win'
        add -lwsock32 on Win32
        make gethostname() be only used when kerberos4 is enabled
        use /port/getopt.c
        new /port/opendir.c routines
        disable GUC unix_socket_group on Win32
        convert some keywords.c symbols to KEYWORD_P to prevent conflict
        create new FCNTL_NONBLOCK macro to turn off socket blocking
        create new /include/port.h file that has /port prototypes, move
          out of c.h
        new /include/port/win32_include dir to hold missing include files
        work around ERROR being defined in Win32 includes
2003-05-15 16:35:30 +00:00
Bruce Momjian d85a0a6bef More cleanups now that we have crypt(). 2003-05-09 16:59:43 +00:00
Bruce Momjian 89eae96b2f Remove rint() prototype from QNX. 2003-05-09 16:35:57 +00:00
Bruce Momjian 19141f5584 Remove unneeded define. 2003-04-29 18:25:54 +00:00
Bruce Momjian 20ead395c7 Add Win32 shmem/sema prototypes. 2003-04-24 21:23:01 +00:00
Bruce Momjian 4d4953fc41 Make Win32 tests to match existing Cygwin tests, where appropriate. 2003-04-18 01:03:42 +00:00
Peter Eisentraut 1a7f4ed525 Make "win" a separate port from "cygwin". This means you can now
configure under native Windows (MinGW that is), but you won't get very far
compiling yet.  The dynaloader files are from Jan Wieck's patch set.
2003-03-21 17:18:34 +00:00
Tom Lane e4704001ea This patch fixes a bunch of spelling mistakes in comments throughout the
PostgreSQL source code.

Neil Conway
2003-03-10 22:28:22 +00:00
Tom Lane a26ac42b76 Awhile back I wrote that freebsd.h was probably broken in the places where
it diverged from netbsd.h and openbsd.h.  This has now been confirmed.
Accordingly, make all three exactly alike.
2003-01-01 20:35:39 +00:00
Tom Lane 5eb6de5991 Remove NO_MKTIME_BEFORE_1970. I had speculated that it was not needed
anymore given the mktime() workaround now done in DetermineLocalTimeZone.
This has now been confirmed by Robert Bruccoleri for Irix, and I'm going
to extrapolate to AIX as well.
2002-11-12 00:39:08 +00:00
Bruce Momjian ceb4f5ea9c > > I'll re-check that with the ppc architecture guy here.
>
> ... he is now about to write an inlined version that can go into
> s_lock.h . I'll send the new patch later on...

OK, here it comes:

An inlined version of tas(), that works for both, powerpc and
powerpc64. The patch is against 7.3b5 and passes the test suite on
both architectures.

Reinhard Max
2002-11-10 00:33:43 +00:00
Tom Lane 9a1ced2732 Add #define _GNU_SOURCE to work around what seems to be Perl 5.8.0's
problem.  Per recent discussions about plperl failing to build on Linux.
2002-11-07 22:09:51 +00:00
Peter Eisentraut 12bb3679db Remove useless O_DIROPEN stuff. 2002-09-24 20:20:10 +00:00
Bruce Momjian e50f52a074 pgindent run. 2002-09-04 20:31:48 +00:00
Tom Lane a4dbbb52c9 Revert _LARGEFILE64_SOURCE addition; good try but doesn't work,
at least not on HPUX 10.20, and there's no reason to think it
is needed on later versions.
2002-08-30 02:01:34 +00:00
Peter Eisentraut d525ab81c3 Workaround for broken large file support on HP-UX 2002-08-29 22:09:22 +00:00
Tom Lane 846429e3d6 Not needed anymore. 2002-05-05 16:47:09 +00:00
Tom Lane 04c8d4c660 libpq++/pgconnection.h must not include postgres_fe.h, else it fails to
compile in client apps that use the standard installed header set.
To allow removing that include, move DLLIMPORT definitions out of c.h
and into the appropriate port-specific header files.
2002-01-22 19:02:40 +00:00
Bruce Momjian 77e4fd889c Fix indenting for 'extern "C"' cases. 2001-11-08 20:37:52 +00:00
Bruce Momjian ea08e6cd55 New pgindent run with fixes suggested by Tom. Patch manually reviewed,
initdb/regression tests pass.
2001-11-05 17:46:40 +00:00
Bruce Momjian 6783b2372e Another pgindent run. Fixes enum indenting, and improves #endif
spacing.  Also adds space for one-line comments.
2001-10-28 06:26:15 +00:00
Bruce Momjian b81844b173 pgindent run on all C files. Java run to follow. initdb/regression
tests pass.
2001-10-25 05:50:21 +00:00
Peter Eisentraut 8401f06efd Treat __s390x__ the same as __s390__. (taken from RPM patch set) 2001-09-24 20:10:44 +00:00
Bruce Momjian 1b2d57dc83 A small patch to keep postgres working on the latest BeOS.
Cyril VELTER
2001-08-07 16:56:17 +00:00
Bruce Momjian f36fc7bb63 I haven't tried building postgres with the Watcom compiler for 7.1 because
it does not support 64bit integers. AFAIK that's the default data type for
OIDs, so I am not surprised that this does not work. Use gcc instead.
BTW., 7.1 does not compile as is with gcc either, I believed the
required patches made it into the 7.1.1 release but obviously I missed
the deadline.
Since the ports mailing list does not seem to be archived I have attached
a copy of the patch (for 7.1 and 7.1.1).

I've just performed a build of a Watcom compiled version and found a couple
of bugs in the watcom specific part of that patch. Please use the attached
version instead.

Tegge, Bernd
2001-05-24 15:53:34 +00:00
Bruce Momjian 0686d49da0 Remove dashes in comments that don't need them, rewrap with pgindent. 2001-03-22 06:16:21 +00:00
Bruce Momjian 9e1552607a pgindent run. Make it all clean. 2001-03-22 04:01:46 +00:00
Tom Lane 4bd983bf34 Patches from Cyril Velter to make shared-memory-conflict-detection code
work in BeOS port.
2001-03-18 18:22:08 +00:00
Bruce Momjian 7582bd91cb Please apply the following patch to fix AIX and IRIX timestamp behavior
as previously discussed.

It makes AIX and IRIX not use DST for dates before 1970.

The following expected files need to be removed from the regression tests,
they contain wrong results and are not needed any more.

src/test/regress/expected/horology-1947-PDT.out
src/test/regress/expected/tinterval-1947-PDT.out
src/test/regress/expected/abstime-1947-PDT.out

Zeugswetter Andreas
2001-02-13 14:32:52 +00:00
Bruce Momjian cf516c3bb1 I have deleted the include of termios.h in include/port/qnx4.h.
Then I recompiled pgsql and I have compiled a program with ecpg.

I have removed the termios.h, and the ECHO hack.

Thanks
Maurizio
2001-02-09 15:13:49 +00:00
Tom Lane a7ea9f46e1 Still further tweaking of s_lock assembler: do not assume that leading
whitespace is unimportant in assembly code.  Also, move VAX definition
of typedef slock_t to port header files to be like all the other ports.
Note that netbsd.h and openbsd.h are now identical, and I rather think
that freebsd.h is broken in the places where it doesn't agree --- but
I'll leave it to the freebsders to look at that.
2001-01-20 00:03:55 +00:00
Peter Eisentraut 58f4028518 From Jason Tishler <jt@dothill.com>
* doc/FAQ_MSWIN: Update to be consistent with software -- mainly change
comment from lack of Cygwin UNIX domain socket support and to list of
current Cygwin UNIX domain socket issues.
* src/include/config.h.in: Enable UNIX domain sockets for Cygwin.
* src/include/port/win.h: Disable UNIX domain sockets for Cygwin b20.1.
* src/test/regress/pg_regress.sh: Use UNIX domain sockets for Cygwin
instead of TCP/IP.
2001-01-19 23:43:36 +00:00
Peter Eisentraut c3f9371956 Add configure check for sys_nerr, to end all discussions. 2001-01-09 18:40:15 +00:00