From 96489b85c691a9da580ff128363758345c267ff2 Mon Sep 17 00:00:00 2001 From: Martin Lenders Date: Mon, 30 Sep 2013 15:48:35 +0200 Subject: [PATCH] Define stdin, stdout and stderr --- Makefile.dep | 31 +++++++++++++++++++------------ sys/posix/include/unistd.h | 4 ++++ 2 files changed, 23 insertions(+), 12 deletions(-) diff --git a/Makefile.dep b/Makefile.dep index ae54a9c68f..4ae604dd6c 100644 --- a/Makefile.dep +++ b/Makefile.dep @@ -7,6 +7,25 @@ ifneq (,$(findstring vtimer,$(USEMODULE))) endif endif + +ifneq (,$(findstring pnet, $(USEMODULE))) + ifeq (,$(findstring posix, $(USEMODULE))) + USEMODULE += posix + endif + ifeq (,$(findstring destiny, $(USEMODULE))) + USEMODULE += destiny + endif + ifeq (,$(findstring net_help, $(USEMODULE))) + USEMODULE += net_help + endif +endif + +ifneq (,$(findstring posix, $(USEMODULE))) + ifeq (,$(findstring uart0, $(USEMODULE))) + USEMODULE += uart0 + endif +endif + ifneq (,$(findstring uart0,$(USEMODULE))) ifeq (,$(findstring lib,$(USEMODULE))) USEMODULE += lib @@ -42,18 +61,6 @@ ifneq (,$(findstring at86rf231,$(USEMODULE))) endif endif -ifneq (,$(findstring pnet, $(USEMODULE))) - ifeq (,$(findstring posix, $(USEMODULE))) - USEMODULE += posix - endif - ifeq (,$(findstring destiny, $(USEMODULE))) - USEMODULE += destiny - endif - ifeq (,$(findstring net_help, $(USEMODULE))) - USEMODULE += net_help - endif -endif - ifneq (,$(findstring destiny,$(USEMODULE))) ifeq (,$(findstring sixlowpan,$(USEMODULE))) USEMODULE += sixlowpan diff --git a/sys/posix/include/unistd.h b/sys/posix/include/unistd.h index a051e8a144..5ec8ec9cf5 100644 --- a/sys/posix/include/unistd.h +++ b/sys/posix/include/unistd.h @@ -24,6 +24,10 @@ #ifndef _UNISTD_H #define _UNISTD_H +#define STDIN_FILENO 0 ///< stdin file descriptor +#define STDOUT_FILENO 1 ///< stdout file descriptor +#define STDERR_FILENO 2 ///< stderr file descriptor + /** * @brief Close a file descriptor. * @details shall deallocate the file descriptor indicated by *fildes*. To