]> git.sur5r.net Git - openldap/commitdiff
Add <ac/stdlib.h> to genericize memory allocators.
authorKurt Zeilenga <kurt@openldap.org>
Wed, 2 Jun 1999 23:39:55 +0000 (23:39 +0000)
committerKurt Zeilenga <kurt@openldap.org>
Wed, 2 Jun 1999 23:39:55 +0000 (23:39 +0000)
Remove memory.h/malloc.h inclusion from <ac/string.h>.
Need to s/<stdlib.h>/<ac/stdlib.h> everywhere.

include/ac/stdlib.h [new file with mode: 0644]
include/ac/string.h

diff --git a/include/ac/stdlib.h b/include/ac/stdlib.h
new file mode 100644 (file)
index 0000000..c7ad9f0
--- /dev/null
@@ -0,0 +1,30 @@
+/* Generic stdlib.h */
+/*
+ * Copyright 1998,1999 The OpenLDAP Foundation, Redwood City, California, USA
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms are permitted only
+ * as authorized by the OpenLDAP Public License.  A copy of this
+ * license is available at http://www.OpenLDAP.org/license.html or
+ * in file LICENSE in the top-level directory of the distribution.
+ */
+
+#ifndef _AC_STDLIB_H
+#define _AC_STDLIB_H
+
+#ifdef STDC_HEADERS
+#      include <stdlib.h>
+
+#else
+
+#      ifdef HAVE_MEMORY_H
+#              include <memory.h>
+#      endif
+
+#      ifdef HAVE_MALLOC_H
+#              include <malloc.h>
+#      endif
+
+#endif
+
+#endif /* _AC_STDLIB_H */
index 96056c2aa0125b009637d4bc1be8a4d2dd9e7f32..a5592baef9f825f5033e6c05218610acc3b94543 100644 (file)
 
 #      ifdef HAVE_MEMORY_H
 #              include <memory.h>
-#      endif
-
-       /* we should actually create <ac/stdlib.h> */
-#      ifdef HAVE_MALLOC_H
-#              include <malloc.h>
 #      endif
 
 #      ifndef HAVE_STRRCHR
@@ -77,5 +72,4 @@ extern int (strncasecmp)();
 #      endif
 #endif
 
-
 #endif /* _AC_STRING_H */