Changeset 823d8e1 for lib


Ignore:
Timestamp:
06/29/18 09:49:20 (2 years ago)
Author:
Alistair King <alistair@…>
Branches:
cachetimestamps, develop, master, rc-4.0.4, ringdecrementfix, ringperformance
Children:
47d64ce
Parents:
c7f1faf
Message:

Replace AC_CHECK_FUNCS with AC_CHECK_DECLS

It seems that AC_CHECK_FUNCS does not correctly detect when these "functions" are implemented as macros. (I've seen this happening on macOS, and Ubuntu 16.04 with snprintf and strndup respectively.) Replacing AC_CHECK_FUNCS (and the similar AC_REPLACE_FUNCS) with AC_CHECK_DECLS seems to solve this problem, though I don't have access to any systems that do not have these functions to be sure that it correctly detects them as missing.

Location:
lib
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • lib/Makefile.am

    rb663d33 r823d8e1  
    7878                data-struct/buckets.c data-struct/simple_circular_buffer.c \
    7979                combiner_sorted.c combiner_unordered.c \
    80                 pthread_spinlock.c pthread_spinlock.h
     80                pthread_spinlock.c pthread_spinlock.h \
     81                strndup.c
    8182
    8283if DAG2_4
  • lib/libtrace_int.h

    r32ee9b2 r823d8e1  
    9999#endif
    100100
    101 #ifndef HAVE_STRNDUP
     101#if !HAVE_DECL_STRNDUP
    102102char *strndup(const char *s, size_t size);
    103103#endif
    104104
    105 #ifndef HAVE_STRNCASECMP
     105#if !HAVE_DECL_STRNCASECMP
    106106# ifndef HAVE__STRNICMP
    107107/** A local implementation of strncasecmp (as some systems do not have it) */
     
    112112#endif
    113113
    114 #ifndef HAVE_SNPRINTF
     114#if !HAVE_DECL_SNPRINTF
    115115# ifndef HAVE_SPRINTF_S
    116116/** A local implementation of snprintf (as some systems do not have it) */
  • lib/strndup.c

    ree6e802 r823d8e1  
    2424 *
    2525 */
    26 #ifndef HAVE_STRNDUP
     26#include "config.h"
     27#if !HAVE_DECL_STRNDUP
    2728
    2829#include <stdlib.h>
Note: See TracChangeset for help on using the changeset viewer.