]> git.sur5r.net Git - openldap/blobdiff - include/ac/string.h
Merge remote branch 'origin/mdb.master' into OPENLDAP_REL_ENG_2_4
[openldap] / include / ac / string.h
index 00c79d34a11e8c7302b1756d0f42869043737fa7..a6a5ae348c5bbc33e7a92d8b5df991da87746807 100644 (file)
@@ -2,7 +2,7 @@
 /* $OpenLDAP$ */
 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
  *
- * Copyright 1998-2009 The OpenLDAP Foundation.
+ * Copyright 1998-2013 The OpenLDAP Foundation.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -94,11 +94,10 @@ int (strncasecmp)();
 #define memcmp lutil_memcmp
 #endif
 
+void *(lutil_memrchr)(const void *b, int c, size_t n);
 /* GNU extension (glibc >= 2.1.91), only declared when defined(_GNU_SOURCE) */
-#ifndef HAVE_MEMRCHR
-#undef memrchr
-#define memrchr lutil_memrchr
-void * memrchr(const void *b, int c, size_t len);
+#if defined(HAVE_MEMRCHR) && defined(_GNU_SOURCE)
+#define lutil_memrchr(b, c, n) memrchr(b, c, n)
 #endif /* ! HAVE_MEMRCHR */
 
 #define STRLENOF(s)    (sizeof(s)-1)