From 5a8170253a38a26b8110e0a9573c5f18b08d57f8 Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Wed, 2 Jun 1999 23:39:55 +0000 Subject: [PATCH] Add to genericize memory allocators. Remove memory.h/malloc.h inclusion from . Need to s// everywhere. --- include/ac/stdlib.h | 30 ++++++++++++++++++++++++++++++ include/ac/string.h | 6 ------ 2 files changed, 30 insertions(+), 6 deletions(-) create mode 100644 include/ac/stdlib.h diff --git a/include/ac/stdlib.h b/include/ac/stdlib.h new file mode 100644 index 0000000000..c7ad9f00c8 --- /dev/null +++ b/include/ac/stdlib.h @@ -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 + +#else + +# ifdef HAVE_MEMORY_H +# include +# endif + +# ifdef HAVE_MALLOC_H +# include +# endif + +#endif + +#endif /* _AC_STDLIB_H */ diff --git a/include/ac/string.h b/include/ac/string.h index 96056c2aa0..a5592baef9 100644 --- a/include/ac/string.h +++ b/include/ac/string.h @@ -24,11 +24,6 @@ # ifdef HAVE_MEMORY_H # include -# endif - - /* we should actually create */ -# ifdef HAVE_MALLOC_H -# include # endif # ifndef HAVE_STRRCHR @@ -77,5 +72,4 @@ extern int (strncasecmp)(); # endif #endif - #endif /* _AC_STRING_H */ -- 2.39.5