Add <ac/stdlib.h> to genericize memory allocators.

Remove memory.h/malloc.h inclusion from <ac/string.h>.
Need to s/<stdlib.h>/<ac/stdlib.h> everywhere.
This commit is contained in:
Kurt Zeilenga 1999-06-02 23:39:55 +00:00
parent 3046c0449e
commit 5a8170253a
2 changed files with 30 additions and 6 deletions

30
include/ac/stdlib.h Normal file
View File

@ -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 */

View File

@ -24,11 +24,6 @@
# 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 */