Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/posix/include/posix/unistd.h

    r1165a419 r7f9df7b9  
    3737#define POSIX_UNISTD_H_
    3838
    39 #ifndef __POSIX_DEF__
    40 #define __POSIX_DEF__(x) x
    41 #endif
    42 
    4339#include "sys/types.h"
    4440#include "stddef.h"
     
    5147#define _exit exit
    5248
    53 extern char *__POSIX_DEF__(optarg);
     49extern char *optarg;
    5450extern int optind, opterr, optopt;
    55 extern int __POSIX_DEF__(getopt)(int, char * const [], const char *);
     51extern int getopt(int, char * const [], const char *);
    5652
    5753/* Environment */
    58 extern char **__POSIX_DEF__(environ);
     54extern char **environ;
    5955
    6056/* Sleeping */
    61 extern unsigned int __POSIX_DEF__(sleep)(unsigned int);
     57extern unsigned int sleep(unsigned int);
    6258
    6359/* Login Information */
    64 extern char *__POSIX_DEF__(getlogin)(void);
    65 extern int __POSIX_DEF__(getlogin_r)(char *name, size_t namesize);
     60extern char *getlogin(void);
     61extern int getlogin_r(char *name, size_t namesize);
    6662
    6763/* Identifying Terminals */
    68 extern int __POSIX_DEF__(isatty)(int fd);
     64extern int isatty(int fd);
    6965
    7066/* Working Directory */
    71 extern char *__POSIX_DEF__(getcwd)(char *buf, size_t size);
    72 extern int __POSIX_DEF__(chdir)(const char *path);
     67extern char *getcwd(char *buf, size_t size);
     68extern int chdir(const char *path);
    7369
    7470/* Query Memory Parameters */
    75 extern int __POSIX_DEF__(getpagesize)(void);
     71extern int getpagesize(void);
    7672
    7773/* Process Identification */
    78 extern __POSIX_DEF__(pid_t) __POSIX_DEF__(getpid)(void);
    79 extern __POSIX_DEF__(uid_t) __POSIX_DEF__(getuid)(void);
    80 extern __POSIX_DEF__(gid_t) __POSIX_DEF__(getgid)(void);
     74extern pid_t getpid(void);
     75extern uid_t getuid(void);
     76extern gid_t getgid(void);
    8177
    8278/* File Manipulation */
    83 extern int __POSIX_DEF__(close)(int fildes);
    84 extern ssize_t __POSIX_DEF__(read)(int fildes, void *buf, size_t nbyte);
    85 extern ssize_t __POSIX_DEF__(write)(int fildes, const void *buf, size_t nbyte);
    86 extern __POSIX_DEF__(off_t) __POSIX_DEF__(lseek)(int fildes,
    87     __POSIX_DEF__(off_t) offset, int whence);
    88 extern int __POSIX_DEF__(fsync)(int fildes);
    89 extern int __POSIX_DEF__(ftruncate)(int fildes, __POSIX_DEF__(off_t) length);
    90 extern int __POSIX_DEF__(rmdir)(const char *path);
    91 extern int __POSIX_DEF__(unlink)(const char *path);
    92 extern int __POSIX_DEF__(dup)(int fildes);
    93 extern int __POSIX_DEF__(dup2)(int fildes, int fildes2);
     79extern int close(int fildes);
     80extern ssize_t read(int fildes, void *buf, size_t nbyte);
     81extern ssize_t write(int fildes, const void *buf, size_t nbyte);
     82extern off_t lseek(int fildes,
     83    off_t offset, int whence);
     84extern int fsync(int fildes);
     85extern int ftruncate(int fildes, off_t length);
     86extern int rmdir(const char *path);
     87extern int unlink(const char *path);
     88extern int dup(int fildes);
     89extern int dup2(int fildes, int fildes2);
    9490
    9591/* Standard Streams */
     
    110106#define W_OK 2 /* Test for write permission. */
    111107#define R_OK 4 /* Test for read permission. */
    112 extern int __POSIX_DEF__(access)(const char *path, int amode);
     108extern int access(const char *path, int amode);
    113109
    114110/* System Parameters */
     
    119115        _SC_CLK_TCK
    120116};
    121 extern long __POSIX_DEF__(sysconf)(int name);
     117extern long sysconf(int name);
    122118
    123119/* Path Configuration Parameters */
     
    143139        _PC_VDISABLE
    144140};
    145 extern long __POSIX_DEF__(pathconf)(const char *path, int name);
     141extern long pathconf(const char *path, int name);
    146142
    147143/* Creating a Process */
    148 extern __POSIX_DEF__(pid_t) __POSIX_DEF__(fork)(void);
     144extern pid_t fork(void);
    149145
    150146/* Executing a File */
    151 extern int __POSIX_DEF__(execv)(const char *path, char *const argv[]);
    152 extern int __POSIX_DEF__(execvp)(const char *file, char *const argv[]);
     147extern int execv(const char *path, char *const argv[]);
     148extern int execvp(const char *file, char *const argv[]);
    153149
    154150/* Creating a Pipe */
    155 extern int __POSIX_DEF__(pipe)(int fildes[2]);
     151extern int pipe(int fildes[2]);
    156152
    157153/* Issue alarm signal. */
    158 extern unsigned int __POSIX_DEF__(alarm)(unsigned int);
     154extern unsigned int alarm(unsigned int);
    159155
    160156#endif /* POSIX_UNISTD_H_ */
Note: See TracChangeset for help on using the changeset viewer.