[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

AC_REPLACE_FUNCS and function prototypes

From: Masao Yonenaga
Subject: AC_REPLACE_FUNCS and function prototypes
Date: Sat, 19 Aug 2006 15:54:40 +0900


I want to use a non-standard function like memrchr().  So I added:


in, and to prevent warnings, add

   #ifndef HAVE_MEMRCHR
   extern void *memrchr(const void *, int, size_t);

in a header file.

Now, I was able to compile it on platforms which have no memrchr()
function in libc.  But on Linux (glibc), I got a warning like this:

  warning: implicit declaration of function `memrchr'

because the memrchr() declaration in string.h is protected by #ifdef
__USE_GNU.  How can I handle this situation properly?  I want to avoid
unconditionally defining _GNU_SOURCE because its side effects are


Yonenaga Masao

reply via email to

[Prev in Thread] Current Thread [Next in Thread]