Unverified Commit f7a545b9 authored by Johny Mattsson's avatar Johny Mattsson Committed by GitHub
Browse files

Evict c_types.h, tidy up a other c_prefixes. (#2841)

parent 526d21da
...@@ -14,7 +14,8 @@ ...@@ -14,7 +14,8 @@
* Created on: Apr 22, 2016 * Created on: Apr 22, 2016
* Author: liuhan * Author: liuhan
*/ */
#include "c_types.h" #include <stdint.h>
#include <stddef.h>
#include "ets_sys.h" #include "ets_sys.h"
#include "os_type.h" #include "os_type.h"
......
#ifndef __FPM_SLEEP_H__ #ifndef __FPM_SLEEP_H__
#define __FPM_SLEEP_H__ #define __FPM_SLEEP_H__
#include "user_interface.h" #include "user_interface.h"
#include "c_types.h" #include <stdint.h>
#include "lauxlib.h" #include "lauxlib.h"
#include "gpio.h" #include "gpio.h"
#include "platform.h" #include "platform.h"
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
#ifndef _ROM_H_ #ifndef _ROM_H_
#define _ROM_H_ #define _ROM_H_
#include "c_types.h" #include <stdint.h>
#include "ets_sys.h" #include "ets_sys.h"
// SHA1 is assumed to match the netbsd sha1.h headers // SHA1 is assumed to match the netbsd sha1.h headers
......
#ifndef RTC_ACCESS_H #ifndef RTC_ACCESS_H
#define RTC_ACCESS_H #define RTC_ACCESS_H
#include <c_types.h> #include <stdint.h>
#define RTC_MMIO_BASE 0x60000700 #define RTC_MMIO_BASE 0x60000700
#define RTC_USER_MEM_BASE 0x60001200 #define RTC_USER_MEM_BASE 0x60001200
......
...@@ -38,7 +38,7 @@ ...@@ -38,7 +38,7 @@
* relevant functions and expose these instead, through the rtctime.c module. * relevant functions and expose these instead, through the rtctime.c module.
*/ */
#include <c_types.h> #include <stdint.h>
#include "sections.h" #include "sections.h"
#ifndef _RTCTIME_INTERNAL_H_ #ifndef _RTCTIME_INTERNAL_H_
......
#include "c_types.h" #include <stdint.h>
#include <stddef.h>
#include "user_config.h" #include "user_config.h"
......
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
#include <stdlib.h> #include <stdlib.h>
#include <ctype.h> #include <ctype.h>
#include <string.h> #include <string.h>
#include <stdint.h>
#ifdef LUA_CROSS_COMPILER #ifdef LUA_CROSS_COMPILER
#define ICACHE_RODATA_ATTR #define ICACHE_RODATA_ATTR
......
...@@ -2,7 +2,6 @@ ...@@ -2,7 +2,6 @@
#include "legc.h" #include "legc.h"
#include "lstate.h" #include "lstate.h"
#include "c_types.h"
void legc_set_mode(lua_State *L, int mode, int limit) { void legc_set_mode(lua_State *L, int mode, int limit) {
global_State *g = G(L); global_State *g = G(L);
......
...@@ -6,73 +6,14 @@ ...@@ -6,73 +6,14 @@
#define luac_cross_h #define luac_cross_h
#ifdef LUA_CROSS_COMPILER #ifdef LUA_CROSS_COMPILER
#define C_HEADER_ASSERT <assert.h>
#define C_HEADER_CTYPE <ctype.h>
#define C_HEADER_ERRNO <errno.h>
#define C_HEADER_FCNTL <fcntl.h>
#define C_HEADER_LOCALE <locale.h>
#define C_HEADER_MATH <math.h>
#define C_HEADER_STDIO <stdio.h>
#define C_HEADER_STDLIB <stdlib.h>
#define C_HEADER_STRING <string.h>
#define C_HEADER_TIME <time.h>
#define ICACHE_RODATA_ATTR #define ICACHE_RODATA_ATTR
#define c_abs abs
#define c_exit exit
#define c_fclose fclose
#define c_feof feof
#define c_ferror ferror
#define c_fopen fopen
#define c_fread fread
#define c_free free
#define c_freopen freopen
#define c_getc getc
#define c_getenv getenv
#define c_malloc malloc
#define c_memcmp memcmp
#define c_memcpy memcpy
#define c_printf printf
#define c_puts puts
#define c_reader reader
#define c_realloc realloc
#define c_sprintf sprintf
#define c_stderr stderr #define c_stderr stderr
#define c_stdin stdin #define c_stdin stdin
#define c_stdout stdout #define c_stdout stdout
#define c_strcat strcat
#define c_strchr strchr
#define c_strcmp strcmp
#define c_strcoll strcoll
#define c_strcpy strcpy
#define c_strcspn strcspn
#define c_strerror strerror
#define c_strlen strlen
#define c_strncat strncat
#define c_strncmp strncmp
#define c_strncpy strncpy
#define c_strpbrk strpbrk
#define c_strrchr strrchr
#define c_strstr strstr
double c_strtod(const char *__n, char **__end_PTR);
#define c_ungetc ungetc
#define c_strtol strtol
#define c_strtoul strtoul
#define dbg_printf printf #define dbg_printf printf
#else #else
#define C_HEADER_ASSERT "c_assert.h"
#define C_HEADER_CTYPE "c_ctype.h"
#define C_HEADER_ERRNO "c_errno.h"
#define C_HEADER_FCNTL "c_fcntl.h"
#define C_HEADER_LOCALE "c_locale.h"
#define C_HEADER_MATH "c_math.h"
#define C_HEADER_STDIO "c_stdio.h"
#define C_HEADER_STDLIB "c_stdlib.h"
#define C_HEADER_STRING "c_string.h"
#define C_HEADER_TIME "c_time.h"
#endif /* LUA_CROSS_COMPILER */ #endif /* LUA_CROSS_COMPILER */
#endif /* luac_cross_h */ #endif /* luac_cross_h */
...@@ -7,10 +7,10 @@ ...@@ -7,10 +7,10 @@
#define LUAC_CROSS_FILE #define LUAC_CROSS_FILE
#include "luac_cross.h" #include "luac_cross.h"
#include C_HEADER_CTYPE #include <ctype.h>
#include C_HEADER_STDIO #include <stdio.h>
#include C_HEADER_STDLIB #include <stdlib.h>
#include C_HEADER_STRING #include <string.h>
#define lflashimg_c #define lflashimg_c
#define LUA_CORE #define LUA_CORE
......
...@@ -7,11 +7,11 @@ ...@@ -7,11 +7,11 @@
#define LUAC_CROSS_FILE #define LUAC_CROSS_FILE
#include "luac_cross.h" #include "luac_cross.h"
#include C_HEADER_ERRNO #include <errno.h>
#include C_HEADER_LOCALE #include <locale.h>
#include C_HEADER_STDLIB #include <stdlib.h>
#include C_HEADER_STRING #include <string.h>
#include C_HEADER_TIME #include <time.h>
#define loslib_c #define loslib_c
#define LUA_LIB #define LUA_LIB
...@@ -217,7 +217,7 @@ static int os_setlocale (lua_State *L) { ...@@ -217,7 +217,7 @@ static int os_setlocale (lua_State *L) {
static int os_exit (lua_State *L) { static int os_exit (lua_State *L) {
c_exit(luaL_optint(L, 1, EXIT_SUCCESS)); exit(luaL_optint(L, 1, EXIT_SUCCESS));
} }
LROT_PUBLIC_BEGIN(oslib) LROT_PUBLIC_BEGIN(oslib)
......
...@@ -7,10 +7,10 @@ ...@@ -7,10 +7,10 @@
#define LUAC_CROSS_FILE #define LUAC_CROSS_FILE
#include "luac_cross.h" #include "luac_cross.h"
#include C_HEADER_ERRNO #include <errno.h>
#include C_HEADER_STDIO #include <stdio.h>
#include C_HEADER_STDLIB #include <stdlib.h>
#include C_HEADER_STRING #include <string.h>
#include <time.h> #include <time.h>
#define luac_c #define luac_c
......
...@@ -7,8 +7,8 @@ ...@@ -7,8 +7,8 @@
#define LUAC_CROSS_FILE #define LUAC_CROSS_FILE
#include "luac_cross.h" #include "luac_cross.h"
#include C_HEADER_CTYPE #include <ctype.h>
#include C_HEADER_STDIO #include <stdio.h>
#define luac_c #define luac_c
#define LUA_CORE #define LUA_CORE
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* copyright (c) 2010 - 2011 espressif system * copyright (c) 2010 - 2011 espressif system
*/ */
#include "c_types.h" #include <stdint.h>
#include "ets_sys.h" #include "ets_sys.h"
#include "osapi.h" #include "osapi.h"
#include "os_type.h" #include "os_type.h"
......
#include "c_types.h" #include <stdint.h>
#include "mem.h" #include "mem.h"
#include "user_interface.h" #include "user_interface.h"
......
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
* *
*/ */
#include "c_types.h" #include <stdint.h>
#include <stdio.h> #include <stdio.h>
//#include "os.h" //#include "os.h"
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
#include "lauxlib.h" #include "lauxlib.h"
#include "platform.h" #include "platform.h"
#include "c_types.h" #include <stdint.h>
#include "user_interface.h" #include "user_interface.h"
// Lua: read(id) , return system adc // Lua: read(id) , return system adc
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
#include "module.h" #include "module.h"
#include "lauxlib.h" #include "lauxlib.h"
#include <string.h> #include <string.h>
#include "c_types.h" #include <stdint.h>
#include "../crypto/sha2.h" #include "../crypto/sha2.h"
#if defined(LUA_USE_MODULES_BLOOM) && !defined(SHA2_ENABLE) #if defined(LUA_USE_MODULES_BLOOM) && !defined(SHA2_ENABLE)
......
...@@ -5,9 +5,9 @@ ...@@ -5,9 +5,9 @@
#include "platform.h" #include "platform.h"
#include <string.h> #include <string.h>
#include <stdlib.h> #include <stddef.h>
#include "c_types.h" #include <stdint.h>
#include "mem.h" #include "mem.h"
#include "lwip/ip_addr.h" #include "lwip/ip_addr.h"
#include "espconn.h" #include "espconn.h"
......
...@@ -4,12 +4,12 @@ ...@@ -4,12 +4,12 @@
#include "lauxlib.h" #include "lauxlib.h"
#include "lmem.h" #include "lmem.h"
#include "user_interface.h" #include "user_interface.h"
#include "c_types.h" #include <stdint.h>
#include <stddef.h>
#include <string.h> #include <string.h>
#include "ets_sys.h" #include "ets_sys.h"
#include "time.h" #include "time.h"
#include "rtc/rtctime.h" #include "rtc/rtctime.h"
#include "stdlib.h"
#include "mem.h" #include "mem.h"
struct cronent_desc { struct cronent_desc {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment