mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-01-24 13:24:56 +08:00
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:
parent
3046c0449e
commit
5a8170253a
30
include/ac/stdlib.h
Normal file
30
include/ac/stdlib.h
Normal 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 */
|
@ -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 */
|
||||
|
Loading…
Reference in New Issue
Block a user