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

configure.in

Blame
    • Tom Lane's avatar
      e9f475f9
      Arrange to supply declarations for strtoll/strtoull if needed. · e9f475f9
      Tom Lane authored
      Buildfarm member dromedary is still unhappy about the recently-added
      ecpg "long long" tests.  The reason turns out to be that it includes
      "-ansi" in its CFLAGS, and in their infinite wisdom Apple have decided
      to hide the declarations of strtoll/strtoull in C89-compliant builds.
      (I find it pretty curious that they hide those function declarations
      when you can nonetheless declare a "long long" variable, but anyway
      that is their behavior, both on dromedary's obsolete macOS version and
      the newest and shiniest.)  As a result, gcc assumes these functions
      return "int", leading naturally to wrong results.
      
      (Looking at dromedary's past build results, it's evident that this
      problem also breaks pg_strtouint64() on 32-bit platforms; but we
      evidently have no regression tests that exercise that function with
      values above 32 bits.)
      
      To fix, supply declarations for these functions when the platform
      provides the functions but not the declarations, using the same type
      of mechanism as we use for some other similar cases.
      
      Discussion: https://postgr.es/m/151935568942.1461.14623890240535309745@wrigleys.postgresql.org
      e9f475f9
      History
      Arrange to supply declarations for strtoll/strtoull if needed.
      Tom Lane authored
      Buildfarm member dromedary is still unhappy about the recently-added
      ecpg "long long" tests.  The reason turns out to be that it includes
      "-ansi" in its CFLAGS, and in their infinite wisdom Apple have decided
      to hide the declarations of strtoll/strtoull in C89-compliant builds.
      (I find it pretty curious that they hide those function declarations
      when you can nonetheless declare a "long long" variable, but anyway
      that is their behavior, both on dromedary's obsolete macOS version and
      the newest and shiniest.)  As a result, gcc assumes these functions
      return "int", leading naturally to wrong results.
      
      (Looking at dromedary's past build results, it's evident that this
      problem also breaks pg_strtouint64() on 32-bit platforms; but we
      evidently have no regression tests that exercise that function with
      values above 32 bits.)
      
      To fix, supply declarations for these functions when the platform
      provides the functions but not the declarations, using the same type
      of mechanism as we use for some other similar cases.
      
      Discussion: https://postgr.es/m/151935568942.1461.14623890240535309745@wrigleys.postgresql.org