Skip to content
Snippets Groups Projects
Select Git revision
  • benchmark-tools
  • postgres-lambda
  • master default
  • REL9_4_25
  • REL9_5_20
  • REL9_6_16
  • REL_10_11
  • REL_11_6
  • REL_12_1
  • REL_12_0
  • REL_12_RC1
  • REL_12_BETA4
  • REL9_4_24
  • REL9_5_19
  • REL9_6_15
  • REL_10_10
  • REL_11_5
  • REL_12_BETA3
  • REL9_4_23
  • REL9_5_18
  • REL9_6_14
  • REL_10_9
  • REL_11_4
23 results

c-library.m4

  • Tom Lane's avatar
    7871a362
    Fix detection of the result type of strerror_r(). · 7871a362
    Tom Lane authored
    The method we've traditionally used, of redeclaring strerror_r() to
    see if the compiler complains of inconsistent declarations, turns out
    not to work reliably because some compilers only report a warning,
    not an error.  Amazingly, this has gone undetected for years, even
    though it certainly breaks our detection of whether strerror_r
    succeeded.
    
    Let's instead test whether the compiler will take the result of
    strerror_r() as a switch() argument.  It's possible this won't
    work universally either, but it's the best idea I could come up with
    on the spur of the moment.
    
    Back-patch of commit 751f532b.  Buildfarm results indicate that only
    icc-on-Linux actually has an issue here; perhaps the lack of field
    reports indicates that people don't build PG for production that way.
    
    Discussion: https://postgr.es/m/10877.1537993279@sss.pgh.pa.us
    7871a362
    History
    Fix detection of the result type of strerror_r().
    Tom Lane authored
    The method we've traditionally used, of redeclaring strerror_r() to
    see if the compiler complains of inconsistent declarations, turns out
    not to work reliably because some compilers only report a warning,
    not an error.  Amazingly, this has gone undetected for years, even
    though it certainly breaks our detection of whether strerror_r
    succeeded.
    
    Let's instead test whether the compiler will take the result of
    strerror_r() as a switch() argument.  It's possible this won't
    work universally either, but it's the best idea I could come up with
    on the spur of the moment.
    
    Back-patch of commit 751f532b.  Buildfarm results indicate that only
    icc-on-Linux actually has an issue here; perhaps the lack of field
    reports indicates that people don't build PG for production that way.
    
    Discussion: https://postgr.es/m/10877.1537993279@sss.pgh.pa.us