Rename MG_ARCH_NEWLIB -> MG_ARCH_ARM_GCC

This commit is contained in:
Sergey Lyubka committed 2025-07-15 11:22:17 +01:00
1 parent 8bfd0c2ca3
commit 6c044d6aeb
36 files changed
+67 -63

No files matched your search

+27 -25
View File
@@ -35,7 +35,7 @@ extern "C" {
#define MG_ARCH_FREERTOS 5 // FreeRTOS
#define MG_ARCH_THREADX 6 // Eclipse ThreadX (former MS Azure RTOS)
#define MG_ARCH_ZEPHYR 7 // Zephyr RTOS
#define MG_ARCH_NEWLIB 8 // Bare metal ARM
#define MG_ARCH_ARMGCC 8 // Plain ARM GCC
#define MG_ARCH_CMSIS_RTOS1 9 // CMSIS-RTOS API v1 (Keil RTX)
#define MG_ARCH_TIRTOS 10 // Texas Semi TI-RTOS
#define MG_ARCH_PICOSDK 11 // Raspberry Pi Pico-SDK (RP2040, RP2350)
@@ -44,6 +44,8 @@ extern "C" {
#define MG_ARCH_RTTHREAD 14 // RT-Thread RTOS
#define MG_ARCH_ARMCGT 15 // Texas Semi ARM-CGT
#define MG_ARCH_NEWLIB MG_ARCH_ARMGCC // Alias, deprecate in 2025
#if !defined(MG_ARCH)
#if defined(__unix__) || defined(__APPLE__)
#define MG_ARCH MG_ARCH_UNIX
@@ -97,6 +99,29 @@ extern "C" {
#endif
#if MG_ARCH == MG_ARCH_ARMGCC
#define _POSIX_TIMERS
#include <ctype.h>
#include <errno.h>
#include <stdarg.h>
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/stat.h>
#include <sys/time.h>
#include <sys/types.h>
#include <time.h>
#include <unistd.h>
#define MG_PATH_MAX 100
#define MG_ENABLE_SOCKET 0
#define MG_ENABLE_DIRLIST 0
#endif
#if MG_ARCH == MG_ARCH_ESP32
#include <ctype.h>
@@ -206,29 +231,6 @@ static inline int mg_mkdir(const char *path, mode_t mode) {
#endif // MG_ARCH == MG_ARCH_FREERTOS
#if MG_ARCH == MG_ARCH_NEWLIB
#define _POSIX_TIMERS
#include <ctype.h>
#include <errno.h>
#include <stdarg.h>
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/stat.h>
#include <sys/time.h>
#include <sys/types.h>
#include <time.h>
#include <unistd.h>
#define MG_PATH_MAX 100
#define MG_ENABLE_SOCKET 0
#define MG_ENABLE_DIRLIST 0
#endif
#if MG_ARCH == MG_ARCH_PICOSDK
#if !defined(MG_ENABLE_LWIP) || !MG_ENABLE_LWIP
#include <errno.h>
@@ -622,8 +624,8 @@ typedef int socklen_t;
#if MG_ARCH == MG_ARCH_ZEPHYR
#include <zephyr/version.h>
#include <zephyr/kernel.h>
#include <zephyr/version.h>
#include <ctype.h>
#include <errno.h>