diff --git a/Makefile.dep b/Makefile.dep index 58879065a8..5e5872a9e7 100644 --- a/Makefile.dep +++ b/Makefile.dep @@ -68,7 +68,7 @@ ifneq (,$(filter gnrc_uhcpc,$(USEMODULE))) endif ifneq (,$(filter uhcpc,$(USEMODULE))) - USEMODULE += posix + USEMODULE += posix_inet endif ifneq (,$(filter nordic_softdevice_ble,$(USEPKG))) @@ -388,7 +388,7 @@ ifneq (,$(filter posix_sockets,$(USEMODULE))) USEMODULE += bitfield USEMODULE += random USEMODULE += vfs - USEMODULE += posix + USEMODULE += posix_headers USEMODULE += xtimer endif @@ -407,17 +407,23 @@ endif ifneq (,$(filter shell_commands,$(USEMODULE))) ifneq (,$(filter fib,$(USEMODULE))) - USEMODULE += posix + USEMODULE += posix_inet endif endif ifneq (,$(filter posix_semaphore,$(USEMODULE))) USEMODULE += sema USEMODULE += xtimer + USEMODULE += posix_headers endif ifneq (,$(filter posix_time,$(USEMODULE))) USEMODULE += xtimer + USEMODULE += posix_headers +endif + +ifneq (,$(filter posix_inet,$(USEMODULE))) + USEMODULE += posix_headers endif ifneq (,$(filter lwip_sixlowpan,$(USEMODULE))) @@ -499,6 +505,7 @@ endif ifneq (,$(filter fib,$(USEMODULE))) USEMODULE += universal_address USEMODULE += xtimer + USEMODULE += posix_headers endif ifneq (,$(filter oonf_rfc5444,$(USEMODULE))) @@ -695,6 +702,7 @@ ifneq (,$(filter devfs,$(USEMODULE))) endif ifneq (,$(filter vfs,$(USEMODULE))) + USEMODULE += posix_headers ifeq (native, $(BOARD)) USEMODULE += native_vfs endif @@ -702,11 +710,11 @@ endif ifneq (,$(filter sock_dns,$(USEMODULE))) USEMODULE += sock_util - USEMODULE += posix + USEMODULE += posix_headers endif ifneq (,$(filter sock_util,$(USEMODULE))) - USEMODULE += posix + USEMODULE += posix_inet USEMODULE += fmt USEMODULE += sock_udp endif diff --git a/cpu/esp32/Makefile.dep b/cpu/esp32/Makefile.dep index c5d8e58038..91edbc8ba9 100644 --- a/cpu/esp32/Makefile.dep +++ b/cpu/esp32/Makefile.dep @@ -77,7 +77,7 @@ ifneq (,$(filter ndn-riot,$(USEPKG))) USEMODULE += cipher_modes endif -ifneq (,$(findstring posix,$(USEMODULE))) +ifneq (,$(findstring posix_headers,$(USEMODULE))) USEMODULE += newlib_syscalls_default endif diff --git a/dist/Makefile b/dist/Makefile index 6ce785a993..9f1ec8720f 100644 --- a/dist/Makefile +++ b/dist/Makefile @@ -33,7 +33,7 @@ QUIET ?= 1 # Modules to include: #USEMODULE += shell -#USEMODULE += posix +#USEMODULE += posix_headers #USEMODULE += xtimer # If your application is very simple and doesn't use modules that use diff --git a/examples/posix_sockets/Makefile b/examples/posix_sockets/Makefile index d6f2ceb807..8b9f564ab4 100644 --- a/examples/posix_sockets/Makefile +++ b/examples/posix_sockets/Makefile @@ -26,6 +26,7 @@ USEMODULE += gnrc_udp USEMODULE += gnrc_sock_udp USEMODULE += posix_sockets USEMODULE += posix_time +USEMODULE += posix_inet # Add also the shell, some shell commands USEMODULE += shell USEMODULE += shell_commands diff --git a/makefiles/pseudomodules.inc.mk b/makefiles/pseudomodules.inc.mk index ec1a7f5462..d4057d8e78 100644 --- a/makefiles/pseudomodules.inc.mk +++ b/makefiles/pseudomodules.inc.mk @@ -55,6 +55,7 @@ PSEUDOMODULES += newlib_gnu_source PSEUDOMODULES += newlib_nano PSEUDOMODULES += openthread PSEUDOMODULES += pktqueue +PSEUDOMODULES += posix_headers PSEUDOMODULES += printf_float PSEUDOMODULES += prng PSEUDOMODULES += prng_% diff --git a/pkg/ccn-lite/Makefile.dep b/pkg/ccn-lite/Makefile.dep index 82d2439e95..5eac60c714 100644 --- a/pkg/ccn-lite/Makefile.dep +++ b/pkg/ccn-lite/Makefile.dep @@ -4,4 +4,5 @@ ifneq (,$(filter ccn-lite,$(USEPKG))) USEMODULE += random USEMODULE += timex USEMODULE += tlsf-malloc + USEMODULE += posix_headers endif diff --git a/pkg/ccn-lite/Makefile.include b/pkg/ccn-lite/Makefile.include index a91eba997a..d7578c81ce 100644 --- a/pkg/ccn-lite/Makefile.include +++ b/pkg/ccn-lite/Makefile.include @@ -2,6 +2,5 @@ INCLUDES += -I$(PKGDIRBASE)/ccn-lite/src/ccnl-riot/include INCLUDES += -I$(PKGDIRBASE)/ccn-lite/src/ccnl-core/include INCLUDES += -I$(PKGDIRBASE)/ccn-lite/src/ccnl-pkt/include INCLUDES += -I$(PKGDIRBASE)/ccn-lite/src/ccnl-fwd/include -INCLUDES += -I$(RIOTBASE)/sys/posix/include CFLAGS += -DCCNL_RIOT diff --git a/pkg/cn-cbor/Makefile.dep b/pkg/cn-cbor/Makefile.dep index 493d7a17cb..ec9bf57823 100644 --- a/pkg/cn-cbor/Makefile.dep +++ b/pkg/cn-cbor/Makefile.dep @@ -1 +1 @@ -USEMODULE += posix +USEMODULE += posix_headers diff --git a/pkg/libcoap/Makefile.dep b/pkg/libcoap/Makefile.dep index f0d3cd06f1..35d651d968 100644 --- a/pkg/libcoap/Makefile.dep +++ b/pkg/libcoap/Makefile.dep @@ -1,4 +1,5 @@ ifneq (,$(filter libcoap,$(USEPKG))) USEMODULE += posix_sockets + USEMODULE += posix_headers USEMODULE += gnrc_sock_udp endif diff --git a/pkg/libcoap/Makefile.include b/pkg/libcoap/Makefile.include index 969fda2c67..fe1f5c4f43 100644 --- a/pkg/libcoap/Makefile.include +++ b/pkg/libcoap/Makefile.include @@ -1,2 +1 @@ -INCLUDES += -I$(PKGDIRBASE)/libcoap \ - -I$(RIOTBASE)/sys/posix/include +INCLUDES += -I$(PKGDIRBASE)/libcoap diff --git a/sys/Makefile b/sys/Makefile index e0da84091c..5a7f2c340b 100644 --- a/sys/Makefile +++ b/sys/Makefile @@ -4,6 +4,9 @@ endif ifneq (,$(filter eepreg,$(USEMODULE))) DIRS += eepreg endif +ifneq (,$(filter posix_inet,$(USEMODULE))) + DIRS += posix/inet +endif ifneq (,$(filter posix_semaphore,$(USEMODULE))) DIRS += posix/semaphore endif diff --git a/sys/Makefile.include b/sys/Makefile.include index d4b5b1b83d..827bc8aa33 100644 --- a/sys/Makefile.include +++ b/sys/Makefile.include @@ -2,9 +2,6 @@ ifneq (,$(filter nhdp,$(USEMODULE))) USEMODULE_INCLUDES += $(RIOTBASE)/sys/net/routing/nhdp endif -ifneq (,$(filter fib,$(USEMODULE))) - USEMODULE_INCLUDES += $(RIOTBASE)/sys/posix/include -endif ifneq (,$(filter gnrc_netif,$(USEMODULE))) USEMODULE_INCLUDES += $(RIOTBASE)/sys/net/gnrc/netif/include endif @@ -14,15 +11,11 @@ ifneq (,$(filter gnrc_sock,$(USEMODULE))) CFLAGS += -DSOCK_HAS_IPV6 endif endif -ifneq (,$(filter posix,$(USEMODULE))) - USEMODULE_INCLUDES += $(RIOTBASE)/sys/posix/include -endif -ifneq (,$(filter posix_semaphore,$(USEMODULE))) - USEMODULE_INCLUDES += $(RIOTBASE)/sys/posix/include -endif -ifneq (,$(filter posix_sockets,$(USEMODULE))) + +ifneq (,$(filter posix_headers,$(USEMODULE))) USEMODULE_INCLUDES += $(RIOTBASE)/sys/posix/include endif + ifneq (,$(filter pthread,$(USEMODULE))) USEMODULE_INCLUDES += $(RIOTBASE)/sys/posix/pthread/include endif @@ -41,10 +34,6 @@ ifneq (,$(filter app_metadata,$(USEMODULE))) endif endif -ifneq (,$(filter vfs,$(USEMODULE))) - USEMODULE_INCLUDES += $(RIOTBASE)/sys/posix/include -endif - ifneq (,$(filter cpp11-compat,$(USEMODULE))) USEMODULE_INCLUDES += $(RIOTBASE)/sys/cpp11-compat/include # make sure cppsupport.o is linked explicitly because __dso_handle is not diff --git a/sys/posix/Makefile b/sys/posix/inet/Makefile similarity index 64% rename from sys/posix/Makefile rename to sys/posix/inet/Makefile index 48422e909a..b2a0e4ef58 100644 --- a/sys/posix/Makefile +++ b/sys/posix/inet/Makefile @@ -1 +1,3 @@ +MODULE=posix_inet + include $(RIOTBASE)/Makefile.base diff --git a/sys/posix/inet.c b/sys/posix/inet/inet.c similarity index 100% rename from sys/posix/inet.c rename to sys/posix/inet/inet.c diff --git a/tests/gnrc_sock_dns/Makefile b/tests/gnrc_sock_dns/Makefile index feaa00bf68..326cabc0b3 100644 --- a/tests/gnrc_sock_dns/Makefile +++ b/tests/gnrc_sock_dns/Makefile @@ -17,7 +17,7 @@ USEMODULE += auto_init_gnrc_netif USEMODULE += shell_commands -USEMODULE += posix +USEMODULE += posix_inet LOW_MEMORY_BOARDS := nucleo-f334r8 msb-430 msb-430h diff --git a/tests/pthread/Makefile b/tests/pthread/Makefile index a4f9ee0549..9e7fd05ef1 100644 --- a/tests/pthread/Makefile +++ b/tests/pthread/Makefile @@ -6,7 +6,7 @@ BOARD_BLACKLIST := arduino-duemilanove arduino-mega2560 arduino-nano \ # jiminy-mega256rfr2: unknown type name: clockid_t # mega-xplained: unknown type name: clockid_t -USEMODULE += posix +USEMODULE += posix_headers USEMODULE += pthread TEST_ON_CI_WHITELIST += all diff --git a/tests/pthread_condition_variable/Makefile b/tests/pthread_condition_variable/Makefile index aeda385edc..ff1bbae67d 100644 --- a/tests/pthread_condition_variable/Makefile +++ b/tests/pthread_condition_variable/Makefile @@ -8,7 +8,7 @@ BOARD_BLACKLIST := arduino-duemilanove arduino-mega2560 arduino-nano \ BOARD_INSUFFICIENT_MEMORY := nucleo-f031k6 -USEMODULE += posix +USEMODULE += posix_headers USEMODULE += pthread USEMODULE += xtimer diff --git a/tests/pthread_cooperation/Makefile b/tests/pthread_cooperation/Makefile index 869dc40d68..07c46b0ea9 100644 --- a/tests/pthread_cooperation/Makefile +++ b/tests/pthread_cooperation/Makefile @@ -8,7 +8,7 @@ BOARD_BLACKLIST := arduino-duemilanove arduino-mega2560 arduino-nano \ BOARD_INSUFFICIENT_MEMORY := nucleo-f031k6 -USEMODULE += posix +USEMODULE += posix_headers USEMODULE += pthread TEST_ON_CI_WHITELIST += all diff --git a/tests/pthread_tls/Makefile b/tests/pthread_tls/Makefile index a4f9ee0549..9e7fd05ef1 100644 --- a/tests/pthread_tls/Makefile +++ b/tests/pthread_tls/Makefile @@ -6,7 +6,7 @@ BOARD_BLACKLIST := arduino-duemilanove arduino-mega2560 arduino-nano \ # jiminy-mega256rfr2: unknown type name: clockid_t # mega-xplained: unknown type name: clockid_t -USEMODULE += posix +USEMODULE += posix_headers USEMODULE += pthread TEST_ON_CI_WHITELIST += all diff --git a/tests/unittests/tests-sock_util/Makefile.include b/tests/unittests/tests-sock_util/Makefile.include index c94b82ec69..4d1e90cd79 100644 --- a/tests/unittests/tests-sock_util/Makefile.include +++ b/tests/unittests/tests-sock_util/Makefile.include @@ -3,4 +3,4 @@ USEMODULE += gnrc_sock USEMODULE += gnrc_ipv6 USEMODULE += ipv4_addr USEMODULE += ipv6_addr -USEMODULE += posix +USEMODULE += posix_headers