Commit Graph

112 Commits

Author SHA1 Message Date
Tom Lane e85493559c Stamp 9.1.24. 2016-10-24 16:19:49 -04:00
Tom Lane cb5b88af7d Stamp 9.1.23. 2016-08-08 16:35:15 -04:00
Tom Lane ddb0843d44 Stamp 9.1.22. 2016-05-09 16:57:25 -04:00
Tom Lane 158a0fb254 Stamp 9.1.21. 2016-03-28 16:16:20 -04:00
Tom Lane 0c94970c93 Cope if platform declares mbstowcs_l(), but not locale_t, in <xlocale.h>.
Previously, we included <xlocale.h> only if necessary to get the definition
of type locale_t.  According to notes in PGAC_TYPE_LOCALE_T, this is
important because on some versions of glibc that file supplies an
incompatible declaration of locale_t.  (This info may be obsolete, because
on my RHEL6 box that seems to be the *only* definition of locale_t; but
there may still be glibc's in the wild for which it's a live concern.)

It turns out though that on FreeBSD and maybe other BSDen, you can get
locale_t from stdlib.h or locale.h but mbstowcs_l() and friends only from
<xlocale.h>.  This was leaving us compiling calls to mbstowcs_l() and
friends with no visible prototype, which causes a warning and could
possibly cause actual trouble, since it's not declared to return int.

Hence, adjust the configure checks so that we'll include <xlocale.h>
either if it's necessary to get type locale_t or if it's necessary to
get a declaration of mbstowcs_l().

Report and patch by Aleksander Alekseev, somewhat whacked around by me.
Back-patch to all supported branches, since we have been using
mbstowcs_l() since 9.1.
2016-03-15 13:19:58 -04:00
Tom Lane 3dca6f36fc Stamp 9.1.20. 2016-02-08 16:21:40 -05:00
Tom Lane f0ceb25d04 Stamp 9.1.19. 2015-10-05 15:17:54 -04:00
Tom Lane 2b7c7ac9ab Stamp 9.1.18. 2015-06-09 15:34:46 -04:00
Tom Lane f2044bd49f Stamp 9.1.17. 2015-06-01 15:12:43 -04:00
Tom Lane 46c877ee46 Stamp 9.1.16. 2015-05-18 14:36:42 -04:00
Tom Lane 506a519f3a Stamp 9.1.15. 2015-02-02 15:45:23 -05:00
Tom Lane 972a21d736 Stamp 9.1.14. 2014-07-21 15:14:13 -04:00
Noah Misch 3243fa391e Add mkdtemp() to libpgport.
This function is pervasive on free software operating systems; import
NetBSD's implementation.  Back-patch to 8.4, like the commit that will
harness it.
2014-06-14 09:41:18 -04:00
Tom Lane 697becf743 Stamp 9.1.13. 2014-03-17 15:37:27 -04:00
Tom Lane ae51ce4c47 Stamp 9.1.12. 2014-02-17 14:40:10 -05:00
Tom Lane c53cbb39f8 Stamp 9.1.11. 2013-12-02 16:02:21 -05:00
Peter Eisentraut b444726ef6 Stamp 9.1.10. 2013-10-07 23:13:47 -04:00
Tom Lane 114fca526e Stamp 9.1.9. 2013-04-01 14:23:05 -04:00
Tom Lane 69c026512f Stamp 9.1.8. 2013-02-04 16:28:27 -05:00
Tom Lane c47f643c49 Stamp 9.1.7. 2012-12-03 15:19:35 -05:00
Tom Lane 04a37a5716 Stamp 9.1.6. 2012-09-19 17:50:31 -04:00
Tom Lane 97395185b8 Make configure probe for mbstowcs_l as well as wcstombs_l.
We previously supposed that any given platform would supply both or neither
of these functions, so that one configure test would be sufficient.  It now
appears that at least on AIX this is not the case ... which is likely an
AIX bug, but nonetheless we need to cope with it.  So use separate tests.
Per bug #6758; thanks to Andrew Hastie for doing the followup testing
needed to confirm what was happening.

Backpatch to 9.1, where we began using these functions.
2012-08-31 14:18:08 -04:00
Tom Lane 04e96bc69d Stamp 9.1.5. 2012-08-14 18:41:04 -04:00
Tom Lane 8e61ded616 Stamp 9.1.4. 2012-05-31 19:07:09 -04:00
Tom Lane 64c47e4542 Stamp 9.1.3. 2012-02-23 17:53:36 -05:00
Tom Lane 630fa6f308 Allow MinGW builds to use standardly-named OpenSSL libraries.
In the Fedora variant of MinGW, the openssl libraries have their normal
names, not libeay32 and libssleay32.  Adjust configure probes to allow
that, per bug #6486.

Tomasz Ostrowski
2012-02-23 15:05:17 -05:00
Tom Lane cfd8cf37d2 Stamp 9.1.2. 2011-12-01 16:47:20 -05:00
Tom Lane 8da4007a4d Stamp 9.1.1. 2011-09-22 17:57:57 -04:00
Tom Lane 1f43001424 Stamp 9.1.0. 2011-09-08 17:13:27 -04:00
Tom Lane d89b8daf5e Tag 9.1rc1. 2011-08-18 17:23:13 -04:00
Tom Lane 6c76524620 Tag 9.1beta3. 2011-07-07 20:12:33 -04:00
Tom Lane 829ae4bf83 Tag 9.1beta2. 2011-06-09 19:40:42 -04:00
Tom Lane be4585b1c2 Replace use of credential control messages with getsockopt(LOCAL_PEERCRED).
It turns out the reason we hadn't found out about the portability issues
with our credential-control-message code is that almost no modern platforms
use that code at all; the ones that used to need it now offer getpeereid(),
which we choose first.  The last holdout was NetBSD, and they added
getpeereid() as of 5.0.  So far as I can tell, the only live platform on
which that code was being exercised was Debian/kFreeBSD, ie, FreeBSD kernel
with Linux userland --- since glibc doesn't provide getpeereid(), we fell
back to the control message code.  However, the FreeBSD kernel provides a
LOCAL_PEERCRED socket parameter that's functionally equivalent to Linux's
SO_PEERCRED.  That is both much simpler to use than control messages, and
superior because it doesn't require receiving a message from the other end
at just the right time.

Therefore, add code to use LOCAL_PEERCRED when necessary, and rip out all
the credential-control-message code in the backend.  (libpq still has such
code so that it can still talk to pre-9.1 servers ... but eventually we can
get rid of it there too.)  Clean up related autoconf probes, too.

This means that libpq's requirepeer parameter now works on exactly the same
platforms where the backend supports peer authentication, so adjust the
documentation accordingly.
2011-05-31 16:10:46 -04:00
Tom Lane 993c5e5904 Tag 9.1beta1. 2011-04-27 17:17:22 -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
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 a534728afb Only build in crashdump support on Windows if there's a working dbghelp.h. 2010-12-26 10:34:47 -05:00
Peter Eisentraut fc946c39ae Remove useless whitespace at end of lines 2010-11-23 22:34:55 +02:00
Tom Lane b40466c337 Stamp HEAD as 9.1devel.
(And there was much rejoicing.)
2010-07-09 04:10:58 +00:00
Marc G. Fournier 1084f31770 tag beta3 2010-07-09 02:43:12 +00:00
Marc G. Fournier dcd52a64bd tag 9.0beta2 2010-06-04 07:28:30 +00:00
Marc G. Fournier f9d9b2b34a tag for 9.0beta1 2010-04-30 03:16:58 +00:00
Peter Eisentraut 2f6cf9192c Revert version stamping in wrong branch 2010-02-19 18:42:30 +00:00
Peter Eisentraut a779afb40c Version stamp 9.0alpha4 2010-02-19 16:03:22 +00:00
Tom Lane 50a90fac40 Stamp HEAD as 9.0devel, and update various places that were referring to 8.5
(hope I got 'em all).  Per discussion, this release will be 9.0 not 8.5.
2010-02-17 04:19:41 +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 8491998d3d Set proper sizes for size_t and void* on 64-bit Windows builds.
Tsutomu Yamada
2010-01-02 13:56:37 +00:00
Tom Lane 85d02a6586 Redefine Datum as uintptr_t, instead of unsigned long.
This is more in keeping with modern practice, and is a first step towards
porting to Win64 (which has sizeof(pointer) > sizeof(long)).

Tsutomu Yamada, Magnus Hagander, Tom Lane
2009-12-31 19:41:37 +00:00
Tom Lane e97281c46c Write psql's ~/.psql_history file using history_truncate_file() and
append_history(), if libreadline is new enough to have those functions
(they seem to be present at least since 4.2; but libedit may not have them).
This gives significantly saner behavior when two or more sessions overlap in
their use of the history file; although having two sessions exit at just the
same time is still perilous to your history.  The behavior of \s remains
unchanged, ie, overwrite whatever was there.
Per bug #5052 from Marek Wójtowicz.
2009-09-13 22:18:22 +00:00
Tom Lane f4ab0b032b Stamp HEAD as 8.5devel. 2009-07-01 23:15:55 +00:00