Skip to content
  1. Nov 03, 2014
    • Peter Wu's avatar
      cmake: clean OtherTests, fixing -Werror · 8cb01014
      Peter Wu authored
      
      
      There were several -Wunused warnings and one duplicate macro definition.
      The EXTRA_DEFINES variable of the CurlCheckCSources macro was being
      abused ("__unused1\n#undef inline\n#define __unused2", seriously?) to
      insert extra C code. Avoid this broken abstraction and use cmake's
      check_c_source_compiles directly (works fine with CMake 2.8, maybe
      even cmake 2.6).
      
      After cleaning up all related variables (EXTRA_DEFINES,
      HEADER_INCLUDES, auxiliary headers_hack), also remove a duplicate
      add_headers_include macro and remove duplicate header additions before
      the struct timeval check.
      
      Oh, and now the code is converted to use CheckCSourceRuns and
      CheckCSourceCompiles, the two curl-specific helpers can be removed.
      Unfortunately, the cmake output is now slightly more verbose. Before:
      
          Performing Test int send(int, const void *, size_t, int) (curl_cv_func_send_test)
          Performing Test int send(int, const void *, size_t, int) (curl_cv_func_send_test) - Failed
      
      Since check_c_source_compiles prints the varname, now you see:
      
          Performing Test curl_cv_func_send_test
          Performing Test curl_cv_func_send_test - Failed
          Tested: int send(int, const void *, size_t, int)
      
      Compared cmake output with each other using vimdiff, no functional
      differences were found. Tested with GCC 4.9.1 and Clang 3.5.0.
      
      Signed-off-by: default avatarPeter Wu <peter@lekensteyn.nl>
      8cb01014
    • Peter Wu's avatar
      cmake: fix gethostby{addr,name}_r in CurlTests · aebfd4cf
      Peter Wu authored
      
      
      This patch cleans up the automatically-generated (?) code and fixes one
      case that will always fail due to syntax error.
      
      HAVE_GETHOSTBYADDR_R_5_REENTRANT always failed because of a trailing
      character ("int length;q"). Several parameter type and unused variable
      warnings popped up. This causes a detection failure with -Werror.
      
      Observe that the REENTRANT cases are exactly the same as their
      non-REENTRANT cases except for a `_REENTRANT` macro definition.
      Merge all these pieces and build one big main function with different
      cases, but reusing variables where logical.
      
      For the cases where the parameters where NULL, I looked at
      lib/hostip4.c to get an idea of the parameters types.
      
      void-cast variables such as 'rc' to avoid -Wuninitialized errors.
      
      Signed-off-by: default avatarPeter Wu <peter@lekensteyn.nl>
      aebfd4cf
    • Peter Wu's avatar
      cmake: drop _BSD_SOURCE macro usage · b2bb51f3
      Peter Wu authored
      
      
      autotools does not use features.h nor _BSD_SOURCE. As this macro
      triggers warnings since glibc 2.20, remove it. It should not have
      functional differences.
      
      Signed-off-by: default avatarPeter Wu <peter@lekensteyn.nl>
      b2bb51f3
  2. Nov 02, 2014
  3. Nov 01, 2014
  4. Oct 31, 2014
  5. Oct 30, 2014
  6. Oct 29, 2014