Skip to content
Snippets Groups Projects
  1. Mar 28, 2016
  2. Mar 15, 2016
    • Tom Lane's avatar
      Cope if platform declares mbstowcs_l(), but not locale_t, in <xlocale.h>. · e39f86fe
      Tom Lane authored
      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.
      e39f86fe
  3. Feb 08, 2016
  4. Dec 16, 2015
    • Tom Lane's avatar
      Cope with Readline's failure to track SIGWINCH events outside of input. · bcce4a5e
      Tom Lane authored
      It emerges that libreadline doesn't notice terminal window size change
      events unless they occur while collecting input.  This is easy to stumble
      over if you resize the window while using a pager to look at query output,
      but it can be demonstrated without any pager involvement.  The symptom is
      that queries exceeding one line are misdisplayed during subsequent input
      cycles, because libreadline has the wrong idea of the screen dimensions.
      
      The safest, simplest way to fix this is to call rl_reset_screen_size()
      just before calling readline().  That causes an extra ioctl(TIOCGWINSZ)
      for every command; but since it only happens when reading from a tty, the
      performance impact should be negligible.  A more valid objection is that
      this still leaves a tiny window during entry to readline() wherein delivery
      of SIGWINCH will be missed; but the practical consequences of that are
      probably negligible.  In any case, there doesn't seem to be any good way to
      avoid the race, since readline exposes no functions that seem safe to call
      from a generic signal handler --- rl_reset_screen_size() certainly isn't.
      
      It turns out that we also need an explicit rl_initialize() call, else
      rl_reset_screen_size() dumps core when called before the first readline()
      call.
      
      rl_reset_screen_size() is not present in old versions of libreadline,
      so we need a configure test for that.  (rl_initialize() is present at
      least back to readline 4.0, so we won't bother with a test for it.)
      We would need a configure test anyway since libedit's emulation of
      libreadline doesn't currently include such a function.  Fortunately,
      libedit seems not to have any corresponding bug.
      
      Merlin Moncure, adjusted a bit by me
      bcce4a5e
  5. Nov 18, 2015
    • Tom Lane's avatar
      Accept flex > 2.5.x in configure. · 6e1d26f1
      Tom Lane authored
      Per buildfarm member anchovy, 2.6.0 exists in the wild now.
      Hopefully it works with Postgres; if not, we'll have to do something
      about that, but in any case claiming it's "too old" is pretty silly.
      6e1d26f1
  6. Oct 05, 2015
  7. Jul 17, 2015
    • Noah Misch's avatar
      AIX: Test the -qlonglong option before use. · 12073b9a
      Noah Misch authored
      xlc provides "long long" unconditionally at C99-compatible language
      levels, and this option provokes a warning.  The warning interferes with
      "configure" tests that fail in response to any warning.  Notably, before
      commit 85a2a890, it interfered with the
      test for -qnoansialias.  Back-patch to 9.0 (all supported versions).
      12073b9a
  8. Jul 05, 2015
    • Tom Lane's avatar
      Make numeric form of PG version number readily available in Makefiles. · 89b8cf47
      Tom Lane authored
      Expose PG_VERSION_NUM (e.g., "90600") as a Make variable; but for
      consistency with the other Make variables holding similar info,
      call the variable just VERSION_NUM not PG_VERSION_NUM.
      
      There was some discussion of making this value available as a pg_config
      value as well.  However, that would entail substantially more work than
      this two-line patch.  Given that there was not exactly universal consensus
      that we need this at all, let's just do a minimal amount of work for now.
      
      Back-patch of commit a5d489cc, so that this
      variable is actually useful for its intended purpose sometime before 2020.
      
      Michael Paquier, reviewed by Pavel Stehule
      89b8cf47
  9. Jun 30, 2015
  10. Jun 09, 2015
  11. Jun 01, 2015
  12. May 27, 2015
    • Tom Lane's avatar
      Remove configure check prohibiting threaded libpython on OpenBSD. · 1b145712
      Tom Lane authored
      According to recent tests, this case now works fine, so there's no reason
      to reject it anymore.  (Even if there are still some OpenBSD platforms
      in the wild where it doesn't work, removing the check won't break any case
      that worked before.)
      
      We can actually remove the entire test that discovers whether libpython
      is threaded, since without the OpenBSD case there's no need to know that
      at all.
      
      Per report from Davin Potts.  Back-patch to all active branches.
      1b145712
  13. May 18, 2015
  14. Feb 02, 2015
  15. Jan 08, 2015
    • Noah Misch's avatar
      On Darwin, detect and report a multithreaded postmaster. · 5ca4e444
      Noah Misch authored
      Darwin --enable-nls builds use a substitute setlocale() that may start a
      thread.  Buildfarm member orangutan experienced BackendList corruption
      on account of different postmaster threads executing signal handlers
      simultaneously.  Furthermore, a multithreaded postmaster risks undefined
      behavior from sigprocmask() and fork().  Emit LOG messages about the
      problem and its workaround.  Back-patch to 9.0 (all supported versions).
      5ca4e444
  16. Jul 22, 2014
    • Noah Misch's avatar
      Diagnose incompatible OpenLDAP versions during build and test. · cec0c218
      Noah Misch authored
      With OpenLDAP versions 2.4.24 through 2.4.31, inclusive, PostgreSQL
      backends can crash at exit.  Raise a warning during "configure" based on
      the compile-time OpenLDAP version number, and test the crash scenario in
      the dblink test suite.  Back-patch to 9.0 (all supported versions).
      cec0c218
  17. Jul 21, 2014
  18. Jun 14, 2014
    • Noah Misch's avatar
      Add mkdtemp() to libpgport. · a919937f
      Noah Misch authored
      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.
      a919937f
  19. May 10, 2014
    • Tom Lane's avatar
      Accept tcl 8.6 in configure's probe for tclsh. · 9bc1b439
      Tom Lane authored
      Usually the search would find plain "tclsh" without any trouble,
      but some installations might only have the version-numbered flavor
      of that program.
      
      No compatibility problems have been reported with 8.6, so we might
      as well back-patch this to all active branches.
      
      Christoph Berg
      9bc1b439
  20. May 02, 2014
    • Tom Lane's avatar
      Fix "quiet inline" configure test for newer clang compilers. · 5788052f
      Tom Lane authored
      This test used to just define an unused static inline function and check
      whether that causes a warning.  But newer clang versions warn about
      unused static inline functions when defined inside a .c file, but not
      when defined in an included header, which is the case we care about.
      Change the test to cope.
      
      Andres Freund
      5788052f
  21. Mar 17, 2014
  22. Feb 17, 2014
  23. Dec 02, 2013
  24. Oct 08, 2013
  25. Jul 25, 2013
    • Tom Lane's avatar
      Fix configure probe for sys/ucred.h. · 8714465f
      Tom Lane authored
      The configure script's test for <sys/ucred.h> did not work on OpenBSD,
      because on that platform <sys/param.h> has to be included first.
      As a result, socket peer authentication was disabled on that platform.
      Problem introduced in commit be4585b1.
      
      Andres Freund, slightly simplified by me.
      8714465f
  26. Apr 01, 2013
  27. Feb 04, 2013
  28. Dec 18, 2012
    • Tom Lane's avatar
      Ignore libedit/libreadline while probing for standard functions. · 31e0349a
      Tom Lane authored
      Some versions of libedit expose bogus definitions of setproctitle(),
      optreset, and perhaps other symbols that we don't want configure to pick up
      on.  There was a previous report of similar problems with strlcpy(), which
      we addressed in commit 59cf88da, but the
      problem has evidently grown in scope since then.  In hopes of not having to
      deal with it again in future, rearrange configure's tests for supplied
      functions so that we ignore libedit/libreadline except when probing
      specifically for functions we expect them to provide.
      
      Per report from Christoph Berg, though this is slightly more aggressive
      than his proposed patch.
      31e0349a
  29. Dec 03, 2012
  30. Sep 19, 2012
  31. Sep 06, 2012
  32. Aug 31, 2012
    • Tom Lane's avatar
      Make configure probe for mbstowcs_l as well as wcstombs_l. · e4679442
      Tom Lane authored
      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.
      e4679442
  33. Aug 24, 2012
  34. Aug 17, 2012
    • Tom Lane's avatar
      Check LIBXML_VERSION instead of testing in configure script. · 33f40976
      Tom Lane authored
      We had put a test for libxml2's xmlStructuredErrorContext variable in
      configure, but of course that doesn't work on Windows builds.  The next
      best alternative seems to be to test the LIBXML_VERSION symbol provided
      by xmlversion.h.
      
      Per report from Talha Bin Rizwan, though this fixes it in a different way
      than his proposed patch.
      33f40976
  35. Aug 15, 2012
  36. Aug 03, 2012
  37. Jun 01, 2012
  38. May 15, 2012
    • Tom Lane's avatar
      Put back AC_REQUIRE([AC_STRUCT_TM]). · f667747b
      Tom Lane authored
      The BSD-ish members of the buildfarm all seem to think removing this
      was a bad idea.  It looks to me like it resulted in omitting the system
      header inclusion necessary to detect the fields of struct tm correctly.
      f667747b
  39. May 14, 2012
Loading