source: compat/compat.h @ 2cbe7c3

release-1.8release-1.9
Last change on this file since 2cbe7c3 was 2cbe7c3, checked in by Anders Kaseorg <andersk@mit.edu>, 10 years ago
Protect memrchr prototype by !HAVE_DECL_MEMCHR instead of !HAVE_MEMCHR This fixes viewwin.c:393:7: warning: implicit declaration of function ‘memrchr’ on platforms where PERL_CFLAGS doesn’t contain -D_GNU_SOURCE. !HAVE_MEMRCHR means that memrchr is undefined at link time, so we need to provide our own implementation; but !HAVE_DECL_MEMRCHR means that memrchr is not declared at compile time, so we need to provide our own prototype. http://lists.gnu.org/archive/html/bug-autoconf/2008-12/msg00037.html Signed-off-by: Anders Kaseorg <andersk@mit.edu>
  • Property mode set to 100644
File size: 148 bytes
Line 
1#include "../config.h"
2
3#include <stddef.h>
4
5#if !HAVE_DECL_MEMRCHR
6void *memrchr(const void *s, int c, size_t n);
7#endif  /* !HAVE_DECL_MEMRCHR */
Note: See TracBrowser for help on using the repository browser.