diff options
author | Jakob Kaivo <jkk@ung.org> | 2022-04-20 14:52:33 -0400 |
---|---|---|
committer | Jakob Kaivo <jkk@ung.org> | 2022-04-20 14:52:33 -0400 |
commit | fb4e2af442c8b09e7f5406d32fbb2961dd14584a (patch) | |
tree | 1b7fe654ac62d4740c9b10ce246dd04e8332cb14 /fcntl.h | |
parent | 1bdbf55cbf054bd2a4d0cd57b0a162522ce33a60 (diff) |
clean up
Diffstat (limited to 'fcntl.h')
-rw-r--r-- | fcntl.h | 53 |
1 files changed, 8 insertions, 45 deletions
@@ -57,100 +57,68 @@ SOFTWARE. #endif #if (defined _POSIX_SOURCE) -/* ./src/fcntl/FD_CLOEXEC.c */ #define FD_CLOEXEC (1) -/* ./src/fcntl/F_DUPFD.c */ #define F_DUPFD (1) -/* ./src/fcntl/F_GETFD.c */ #define F_GETFD (3) -/* ./src/fcntl/F_GETFL.c */ #define F_GETFL (5) -/* ./src/fcntl/F_GETLK.c */ #define F_GETLK (7) -/* ./src/fcntl/F_RDLCK.c */ #define F_RDLCK (1) -/* ./src/fcntl/F_SETFD.c */ #define F_SETFD (4) -/* ./src/fcntl/F_SETFL.c */ #define F_SETFL (6) -/* ./src/fcntl/F_SETLK.c */ #define F_SETLK (8) -/* ./src/fcntl/F_SETLKW.c */ #define F_SETLKW (9) -/* ./src/fcntl/F_UNLCK.c */ #define F_UNLCK (2) -/* ./src/fcntl/F_WRLCK.c */ #define F_WRLCK (3) -/* ./src/fcntl/O_ACCMODE.c */ #define O_ACCMODE (O_EXEC|O_RDONLY|O_RDWR|O_SEARCH|O_WRONLY) -/* ./src/fcntl/O_APPEND.c */ #define O_APPEND (1<<8) -/* ./src/fcntl/O_CREAT.c */ #define O_CREAT (1<<1) -/* ./src/fcntl/O_EXCL.c */ #define O_EXCL (1<<3) -/* ./src/fcntl/O_NOCTTY.c */ #define O_NOCTTY (1<<4) -/* ./src/fcntl/O_NONBLOCK.c */ #define O_NONBLOCK (1<<10) -/* ./src/fcntl/O_RDONLY.c */ #define O_RDONLY (1<<14) -/* ./src/fcntl/O_RDWR.c */ #define O_RDWR (1<<15) -/* ./src/fcntl/O_TRUNC.c */ #define O_TRUNC (1<<6) -/* ./src/fcntl/O_WRONLY.c */ #define O_WRONLY (1<<17) #endif #if (defined _POSIX_C_SOURCE && 199309 <= _POSIX_C_SOURCE) -/* ./src/fcntl/O_DSYNC.c */ #define O_DSYNC (1<<9) -/* ./src/fcntl/O_RSYNC.c */ #define O_RSYNC (1<<11) #endif #if (defined _POSIX_C_SOURCE && 199309 <= _POSIX_C_SOURCE) || \ (defined _XOPEN_SOURCE) -/* ./src/fcntl/O_SYNC.c */ #define O_SYNC (1<<12) #endif #if (defined _XOPEN_SOURCE) -/* src/stdio/SEEK_CUR.c */ #define SEEK_CUR (1) -/* src/stdio/SEEK_END.c */ #define SEEK_END (2) -/* src/stdio/SEEK_SET.c */ #define SEEK_SET (3) #endif #if (defined _XOPEN_SOURCE) -/* src/sys/types/mode_t.c */ -#ifndef __TYPE_mode_t_DEFINED__ -#define __TYPE_mode_t_DEFINED__ +#ifndef __mode_t_DEFINED__ +#define __mode_t_DEFINED__ typedef unsigned long int mode_t; #endif -/* src/sys/types/off_t.c */ -#ifndef __TYPE_off_t_DEFINED__ -#define __TYPE_off_t_DEFINED__ +#ifndef __off_t_DEFINED__ +#define __off_t_DEFINED__ typedef long int off_t; #endif -/* src/sys/types/pid_t.c */ -#ifndef __TYPE_pid_t_DEFINED__ -#define __TYPE_pid_t_DEFINED__ +#ifndef __pid_t_DEFINED__ +#define __pid_t_DEFINED__ typedef long int pid_t; #endif #endif #if (defined _POSIX_SOURCE) -/* ./src/fcntl/struct_flock.c */ -#ifndef __TYPE_struct_flock_DEFINED__ -#define __TYPE_struct_flock_DEFINED__ +#ifndef __struct_flock_DEFINED__ +#define __struct_flock_DEFINED__ struct flock { short l_type; short l_whence; @@ -163,14 +131,9 @@ struct flock { #endif #if (defined _POSIX_SOURCE) -/* ./src/fcntl/creat.c */ int creat(const char *__path, mode_t __mode); -/* ./src/fcntl/fcntl.c */ int fcntl(int __fildes, int __cmd, ...); -/* ./src/fcntl/open.c */ int open(const char *__path, int __oflag, ...); #endif #endif - -#include <ungol/fcntl.h> |