Skip to content

Commit

Permalink
[cmds] Replace use of non-standard malloc.h header with stdlib.h
Browse files Browse the repository at this point in the history
  • Loading branch information
ghaerr committed Feb 7, 2024
1 parent bb9e196 commit e6def4a
Show file tree
Hide file tree
Showing 10 changed files with 6 additions and 13 deletions.
4 changes: 0 additions & 4 deletions elks/tools/objdump86/objdump86.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,7 @@
*/

#include <stdio.h>
#ifdef __STDC__
#include <stdlib.h>
#else
#include <malloc.h>
#endif
#include <string.h>

/* config.h - configuration for linker */
Expand Down
1 change: 0 additions & 1 deletion elkscmd/busyelks/sash.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <malloc.h>
#include <ctype.h>

#define CMDLEN 512
Expand Down
2 changes: 1 addition & 1 deletion elkscmd/nano-X/engine/devrgn.c
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ SOFTWARE.
* the y-x-banding that's so nice to have...
*/
#include <stdio.h>
#include <malloc.h>
#include <stdlib.h>
#include "device.h"

typedef void (*voidProcp)();
Expand Down
2 changes: 1 addition & 1 deletion elkscmd/nano-X/engine/list.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#include <stdio.h>
#include <malloc.h>
#include <stdlib.h>
#include "list.h"
/*
* linked list routines
Expand Down
1 change: 0 additions & 1 deletion elkscmd/sash/sash.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <malloc.h>
#include <ctype.h>
#include <unistd.h>
#include <fcntl.h>
Expand Down
1 change: 0 additions & 1 deletion elkscmd/sh_utils/shutils.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <malloc.h>
#include <ctype.h>

#define CMDLEN 512
Expand Down
2 changes: 1 addition & 1 deletion elkscmd/test/libc/malloc.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#include "testlib.h"

#include <errno.h>
#include <malloc.h>
#include <stdlib.h>
#include <string.h>

TEST_CASE(malloc_malloc_free) {
Expand Down
2 changes: 1 addition & 1 deletion libc/misc/putenv.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
*/
#include <string.h>
#include <unistd.h>
#include <malloc.h>
#include <stdlib.h>
#include <errno.h>

/* macro for matching environment name in string*/
Expand Down
2 changes: 1 addition & 1 deletion libc/regex/regex.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
*/
#include <stdio.h>
#include <regex.h>
#include <malloc.h>
#include <stdlib.h>
#include <string.h>
#include "regmagic.h"

Expand Down
2 changes: 1 addition & 1 deletion libc/string/strdup.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include <malloc.h>
#include <stdlib.h>
#include <string.h>

char *
Expand Down

0 comments on commit e6def4a

Please sign in to comment.