From cbdf54fcdd98f6622fa16196511d60f9a6fac179 Mon Sep 17 00:00:00 2001 From: Jonas 'Sortie' Termansen Date: Fri, 24 Feb 2012 17:34:50 +0100 Subject: [PATCH] Moved SEEK_SET, SEEK_CUR, and SEEK_SET to . --- libmaxsi/decl/SEEK_CUR.h | 3 --- libmaxsi/decl/SEEK_END.h | 3 --- libmaxsi/decl/SEEK_SET.h | 3 --- libmaxsi/include/fcntl.h | 5 +---- libmaxsi/include/stdio.h | 7 +------ libmaxsi/include/unistd.h | 5 +---- sortix/seek.h | 39 +++++++++++++++++++++++++++++++++++++++ 7 files changed, 42 insertions(+), 23 deletions(-) delete mode 100644 libmaxsi/decl/SEEK_CUR.h delete mode 100644 libmaxsi/decl/SEEK_END.h delete mode 100644 libmaxsi/decl/SEEK_SET.h create mode 100644 sortix/seek.h diff --git a/libmaxsi/decl/SEEK_CUR.h b/libmaxsi/decl/SEEK_CUR.h deleted file mode 100644 index 18f6e05c..00000000 --- a/libmaxsi/decl/SEEK_CUR.h +++ /dev/null @@ -1,3 +0,0 @@ -#ifndef SEEK_CUR -#define SEEK_CUR 1 /* Seek from current position. */ -#endif diff --git a/libmaxsi/decl/SEEK_END.h b/libmaxsi/decl/SEEK_END.h deleted file mode 100644 index 13f1e0f7..00000000 --- a/libmaxsi/decl/SEEK_END.h +++ /dev/null @@ -1,3 +0,0 @@ -#ifndef SEEK_END -#define SEEK_END 2 /* Seek from end of file. */ -#endif diff --git a/libmaxsi/decl/SEEK_SET.h b/libmaxsi/decl/SEEK_SET.h deleted file mode 100644 index 1d71d9e9..00000000 --- a/libmaxsi/decl/SEEK_SET.h +++ /dev/null @@ -1,3 +0,0 @@ -#ifndef SEEK_SET -#define SEEK_SET 0 /* Seek from beginning of file. */ -#endif diff --git a/libmaxsi/include/fcntl.h b/libmaxsi/include/fcntl.h index b9519d59..0208afdc 100644 --- a/libmaxsi/include/fcntl.h +++ b/libmaxsi/include/fcntl.h @@ -29,6 +29,7 @@ #include #include +#include #include __BEGIN_DECLS @@ -39,10 +40,6 @@ __BEGIN_DECLS /* TODO: F_RDLCK, F_UNLCK, F_WRLCK missing here */ -@include(SEEK_SET.h) -@include(SEEK_CUR.h) -@include(SEEK_END.h) - /* TODO: AT_FDCWD missing here */ /* TODO: AT_EACCESS missing here */ /* TODO: AT_SYMLINK_NOFOLLOW missing here */ diff --git a/libmaxsi/include/stdio.h b/libmaxsi/include/stdio.h index 7680ec5e..c5c57803 100644 --- a/libmaxsi/include/stdio.h +++ b/libmaxsi/include/stdio.h @@ -26,6 +26,7 @@ #define _STDIO_H 1 #include +#include __BEGIN_DECLS @@ -45,12 +46,6 @@ typedef struct _fpos_t fpos_t; /* TODO: Implement L_tmpnam */ #endif -/* The possibilities for the third argument to `fseek'. - These values should not be changed. */ -@include(SEEK_SET.h) -@include(SEEK_CUR.h) -@include(SEEK_END.h) - /* The possibilities for the third argument to `setvbuf'. */ #define _IOFBF 0 /* Fully buffered. */ #define _IOLBF 1 /* Line buffered. */ diff --git a/libmaxsi/include/unistd.h b/libmaxsi/include/unistd.h index a6302b73..a895e7f5 100644 --- a/libmaxsi/include/unistd.h +++ b/libmaxsi/include/unistd.h @@ -29,6 +29,7 @@ #define _UNISTD_H 1 #include +#include __BEGIN_DECLS @@ -51,10 +52,6 @@ __BEGIN_DECLS /* TODO: _CS_* is missing here. */ -@include(SEEK_CUR.h) -@include(SEEK_END.h) -@include(SEEK_SET.h) - /* TODO: F_* is missing here. */ /* TODO: _PC_* is missing here. */ diff --git a/sortix/seek.h b/sortix/seek.h new file mode 100644 index 00000000..c7a54c5c --- /dev/null +++ b/sortix/seek.h @@ -0,0 +1,39 @@ +/******************************************************************************* + + COPYRIGHT(C) JONAS 'SORTIE' TERMANSEN 2012. + + This file is part of Sortix. + + Sortix is free software: you can redistribute it and/or modify it under the + terms of the GNU General Public License as published by the Free Software + Foundation, either version 3 of the License, or (at your option) any later + version. + + Sortix is distributed in the hope that it will be useful, but WITHOUT ANY + WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + FOR A PARTICULAR PURPOSE. See the GNU General Public License for more + details. + + You should have received a copy of the GNU General Public License along with + Sortix. If not, see . + + seek.h + Defines the SEEK_CUR, SEEK_SET, and SEEK_END values. + +*******************************************************************************/ + +#ifndef SORTIX_SEEK_H +#define SORTIX_SEEK_H + +#include + +__BEGIN_DECLS + +#define SEEK_SET 0 /* Seek from beginning of file. */ +#define SEEK_CUR 1 /* Seek from current position. */ +#define SEEK_END 2 /* Seek from end of file. */ + +__END_DECLS + +#endif +