[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [tyndur-devel] [PATCH] libc: POSIX: Div. Header erweitern
Am Sonntag, 17. Mai 2009 17:29 schrieb Antoine Kaufmann:
> + libc: POSIX: Div. Header erweitern
>
> Signed-off-by: Antoine Kaufmann <toni@xxxxxxxxxx>
> ---
> src/modules/include/sys/types.h | 9 +++++++++
> src/modules/include/termios.h | 24 +++++++++++++++---------
> src/modules/include/time.h | 3 +++
> 3 files changed, 27 insertions(+), 9 deletions(-)
>
> diff --git a/src/modules/include/sys/types.h
> b/src/modules/include/sys/types.h index 0e538c5..6d696a0 100644
> --- a/src/modules/include/sys/types.h
> +++ b/src/modules/include/sys/types.h
> @@ -28,6 +28,8 @@
> #ifndef _SYS_TYPES_H_
> #define _SYS_TYPES_H_
>
> +#include <stdint.h>
> +
> // FIXME
> #define _NO_LOST_TYPES
> #include <types.h>
> @@ -46,4 +48,11 @@ typedef unsigned int blkcnt_t;
> typedef long time_t;
> typedef unsigned long suseconds_t;
>
> +typedef uint8_t u_int8_t;
> +typedef uint16_t u_int16_t;
> +typedef uint32_t u_int32_t;
> +typedef uint64_t u_int64_t;
> +
> +typedef unsigned int u_int;
> +typedef unsigned long u_long;
> #endif //ifndef _SYS_TYPES_H_
> diff --git a/src/modules/include/termios.h b/src/modules/include/termios.h
> index bd54fe8..eb917e4 100644
> --- a/src/modules/include/termios.h
> +++ b/src/modules/include/termios.h
> @@ -32,17 +32,23 @@
> #ifndef CONFIG_LIBC_NO_STUBS
>
> // Anzahl der Kontrollzeichen
> -#define NCCS 10
> +#define NCCS 17
>
> // Namen fuer Zeichen in c_cc
> -/// Ein Zeichen loeschen
> -#define VERASE 0
> -///
> -#define VKILL 1
> -///
> -#define VMIN 2
> -///
> -#define VTIME 3
> +#define VINTR 0
> +#define VQUIT 1
> +#define VERASE 2
> +#define VKILL 3
> +#define VEOF 4
> +#define VTIME 5
> +#define VMIN 6
> +#define VSTART 8
> +#define VSTOP 9
> +#define VSUSP 10
> +#define VEOL 11
> +#define VWERASE 14
> +#define VLNEXT 15
> +#define VEOL2 16
Vielleicht lieber ein enum?
> // Eingabeflags
> /// CR => NL bei der Eingabe
> diff --git a/src/modules/include/time.h b/src/modules/include/time.h
> index 4ee4b2e..4031f8a 100644
> --- a/src/modules/include/time.h
> +++ b/src/modules/include/time.h
> @@ -30,6 +30,7 @@
> #define _TIME_H_
> #include <sys/types.h>
> #include <lost/config.h>
> +#include <stdint.h>
>
> struct tm {
> int tm_sec; /// Sekunden 0-60
> @@ -43,6 +44,8 @@ struct tm {
> int tm_isdst; /// Todo
> };
>
> +typedef uint64_t clock_t;
Gehört nach sys/types.h