Get rid of malloc.h.
This is a non-POSIX/ISO-C header. It is ok to include this on Linux, but it is obsolete on BSD; FreeBSD even throws an error if you include it with __STDC__ defined. Every system should nowadays have malloc() defined in stdlib.h. Diff is largely mechanical, replacing malloc.h with stdlib.h where it is not yet included anyway.
This commit is contained in:
committed by
Jon Trulson
parent
18a5139d7a
commit
0bbd4ff9aa
@@ -67,7 +67,7 @@
|
||||
/* include files */
|
||||
#include <stdio.h>
|
||||
#include <stdarg.h>
|
||||
#include <malloc.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <math.h>
|
||||
#include <assert.h>
|
||||
|
||||
@@ -85,7 +85,6 @@ static char rcs_id[]="$XConsortium: Graphics.c /main/23 1996/12/06 11:12:54 cde-
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <malloc.h>
|
||||
#include <errno.h>
|
||||
#include <sys/stat.h>
|
||||
#include <X11/Xlib.h>
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <malloc.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <math.h>
|
||||
#include <setjmp.h>
|
||||
|
||||
@@ -41,8 +41,7 @@ static char version[] = "$XConsortium: ilhplrotation.c /main/3 1995/10/23 15:48:
|
||||
static char vdate[] = "$XConsortium: ilhplrotation.c /main/3 1995/10/23 15:48:35 rswiston $";
|
||||
|
||||
# include <stdio.h>
|
||||
# include <malloc.h>
|
||||
/*# include <stdlib.h> */
|
||||
# include <stdlib.h>
|
||||
# include <math.h>
|
||||
# include <limits.h> /* Get definition of */
|
||||
# include <float.h> /* FLX_MAX */
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
|
||||
#include <stdio.h>
|
||||
#include <ctype.h>
|
||||
#include <malloc.h>
|
||||
#include <stdlib.h>
|
||||
#include <limits.h>
|
||||
#include <string.h>
|
||||
#include <X11/X.h>
|
||||
|
||||
@@ -32,7 +32,6 @@
|
||||
#include <sys/types.h>
|
||||
|
||||
#include <unistd.h>
|
||||
#include <malloc.h>
|
||||
#include <sys/utsname.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/mman.h>
|
||||
#include <malloc.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include "DtHash.h"
|
||||
#include "DtShmDb.h"
|
||||
|
||||
@@ -37,7 +37,6 @@
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/mman.h>
|
||||
#include <malloc.h>
|
||||
#include <string.h>
|
||||
#include "DtHash.h"
|
||||
#include "DtShmDb.h"
|
||||
|
||||
@@ -125,7 +125,7 @@ extern size_t nl_strlen(); /* __OBSOLETE */
|
||||
#if defined(__cplusplus)
|
||||
}
|
||||
|
||||
#if defined(apollo) || defined(__aix) || defined(USL) || defined(__uxp__) || defined(__osf__)
|
||||
#if defined(apollo) || defined(__aix) || defined(USL) || defined(__uxp__) || defined(__osf__) || defined(linux) || defined(CSRG_BASED)
|
||||
#include <stdlib.h>
|
||||
#else
|
||||
#include <malloc.h>
|
||||
|
||||
@@ -29,7 +29,6 @@
|
||||
*/
|
||||
|
||||
#include <EUSCompat.h>
|
||||
#include <malloc.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include "rtable2.h"
|
||||
|
||||
@@ -29,7 +29,6 @@
|
||||
*/
|
||||
|
||||
#include <EUSCompat.h>
|
||||
#include <malloc.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include "rtable3.h"
|
||||
|
||||
@@ -29,7 +29,6 @@
|
||||
*/
|
||||
|
||||
#include <EUSCompat.h>
|
||||
#include <malloc.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include "rtable2.h"
|
||||
|
||||
@@ -29,7 +29,6 @@
|
||||
*/
|
||||
|
||||
#include <EUSCompat.h>
|
||||
#include <malloc.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include "rtable3.h"
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <string.h>
|
||||
#include <malloc.h>
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include <security/pam_appl.h>
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
#include <sys/stat.h>
|
||||
#include <utmpx.h>
|
||||
#include <string.h>
|
||||
#include <malloc.h>
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
#include <libintl.h>
|
||||
#include <synch.h>
|
||||
|
||||
@@ -82,7 +82,6 @@ typedef union
|
||||
# define TT_STRING 290
|
||||
# define TT_NUMBER 291
|
||||
|
||||
#include <malloc.h>
|
||||
#include <memory.h>
|
||||
|
||||
#if defined (__hpux)
|
||||
|
||||
@@ -54,7 +54,6 @@
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <malloc.h>
|
||||
#include <sys/param.h>
|
||||
#include <stdlib.h>
|
||||
#include <poll.h>
|
||||
|
||||
@@ -53,7 +53,7 @@
|
||||
*/
|
||||
|
||||
#include <string.h>
|
||||
#include <malloc.h>
|
||||
#include <stdlib.h>
|
||||
#include "CoEdSiteID.h"
|
||||
|
||||
CoEdSiteID::
|
||||
|
||||
@@ -55,7 +55,6 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <malloc.h>
|
||||
#include <limits.h>
|
||||
#include "CoEdTextVersion.h"
|
||||
#include "CoEdTextChange.h"
|
||||
|
||||
@@ -52,7 +52,7 @@
|
||||
* connection with the use or performance of this software.
|
||||
*/
|
||||
|
||||
#include <malloc.h>
|
||||
#include <stdlib.h>
|
||||
#include <rpc/types.h>
|
||||
#include <rpc/xdr.h>
|
||||
#include <memory.h>
|
||||
|
||||
@@ -37,7 +37,6 @@
|
||||
#define _API_STORAGE_H
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <malloc.h>
|
||||
#include "util/tt_object.h"
|
||||
#include "util/tt_list.h"
|
||||
|
||||
|
||||
@@ -35,13 +35,10 @@
|
||||
*/
|
||||
|
||||
#include "tt_options.h"
|
||||
#if defined(OPT_BUG_SUNOS_4) && defined(__GNUG__)
|
||||
# include <stdlib.h>
|
||||
#endif
|
||||
#include <stdlib.h>
|
||||
#include <rpc/rpc.h>
|
||||
#include "api/c/api_xdr.h"
|
||||
#include <mp/mp_xdr_functions.h>
|
||||
#include <malloc.h>
|
||||
|
||||
bool_t
|
||||
_tt_xdr_cstring_list(XDR *xdrs, char ***ar)
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
*/
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <malloc.h>
|
||||
#include <stdlib.h>
|
||||
#include "api/c/tt_c.h"
|
||||
#include "ttdnd.h"
|
||||
|
||||
|
||||
@@ -58,7 +58,7 @@ extern "C" { extern int ioctl (int, int, ...) ; };
|
||||
#include "mp/mp_desktop.h"
|
||||
#include "mp/mp_mp.h"
|
||||
#include <unistd.h>
|
||||
#include <malloc.h>
|
||||
#include <stdlib.h>
|
||||
#include "util/tt_gettext.h"
|
||||
|
||||
static int parse_Xdisplay_string(_Tt_string display,
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
#include "api/c/api_error.h"
|
||||
#include <errno.h>
|
||||
#include <sys/resource.h>
|
||||
#include <malloc.h>
|
||||
#include <stdlib.h>
|
||||
#include "tt_options.h"
|
||||
|
||||
#if defined(_AIX)
|
||||
|
||||
@@ -101,7 +101,7 @@ typedef union
|
||||
# define _TT_TRACE_LINETERM 280
|
||||
# define _TT_TRACE_PARSE_EOF 281
|
||||
|
||||
#include <malloc.h>
|
||||
#include <stdlib.h>
|
||||
#include <memory.h>
|
||||
#include <values.h>
|
||||
|
||||
|
||||
@@ -37,7 +37,6 @@
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <malloc.h>
|
||||
#include <string.h>
|
||||
#include <errno.h>
|
||||
#include "util/tt_new.h"
|
||||
|
||||
@@ -41,7 +41,7 @@ static char sccsid[] = "@(#)isalloc.c 1.3 89/07/17 Copyr 1988 Sun Micro";
|
||||
*/
|
||||
|
||||
#include "isam_impl.h"
|
||||
#include <malloc.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
/* strdup is not defined in Ultrix' string.h, so it is implemented in a separate
|
||||
* file named strdup.ultrix.c
|
||||
|
||||
Reference in New Issue
Block a user