Links

GitHub

Open HUB

Quick Links

Download

STREAMS

SIGTRAN

SS7

Hardware

SCTP

Browse Source

Applications

SS7 Stack

ISDN Stack

SIGTRAN Stack

VoIP Stack

MG Stack

SS7/ISDN Devices

IP Transport

Embedded Systems

Operating System

Resources

Packages

Sys Req

Repositories

Download

Mailing Lists

Browse Source

CVS Archive

Bug Reports

Library

Hardware

Vendor Links

Home

Overview

Status

Documentation

Resources

About

News

Description: Code

File /code/usr/include/unistd.h



#ifndef	_UNISTD_H
#define	_UNISTD_H	1

#include <features.h>

__BEGIN_DECLS

#define	_POSIX_VERSION	199506L

#define	_POSIX2_C_VERSION	199209L

#define _POSIX2_VERSION	199209L

#define	_POSIX2_C_BIND	1

#define	_POSIX2_C_DEV	1

#define	_POSIX2_SW_DEV	1

#define _POSIX2_LOCALEDEF       1

#ifdef __USE_UNIX98
# define _XOPEN_VERSION	500
#else
# define _XOPEN_VERSION	4
#endif

#define _XOPEN_XCU_VERSION	4

#define _XOPEN_XPG2	1
#define _XOPEN_XPG3	1
#define _XOPEN_XPG4	1

#define _XOPEN_UNIX	1

#define	_XOPEN_CRYPT	1

#define	_XOPEN_ENH_I18N	1

#define _XOPEN_LEGACY	1

#include <bits/posix_opt.h>

#ifdef __USE_UNIX98
# include <bits/environments.h>
#endif

#define	STDIN_FILENO	0
#define	STDOUT_FILENO	1
#define	STDERR_FILENO	2

#include <bits/types.h>

#ifndef	__ssize_t_defined
typedef __ssize_t ssize_t;
# define __ssize_t_defined
#endif

#define	__need_size_t
#define __need_NULL
#include <stddef.h>

#ifdef __USE_XOPEN

# ifndef __gid_t_defined
typedef __gid_t gid_t;
#  define __gid_t_defined
# endif

# ifndef __uid_t_defined
typedef __uid_t uid_t;
#  define __uid_t_defined
# endif

# ifndef __off_t_defined
#  ifndef __USE_FILE_OFFSET64
typedef __off_t off_t;
#  else
typedef __off64_t off_t;
#  endif
#  define __off_t_defined
# endif
# if defined __USE_LARGEFILE64 && !defined __off64_t_defined
typedef __off64_t off64_t;
#  define __off64_t_defined
# endif

# ifndef __useconds_t_defined
typedef __useconds_t useconds_t;
#  define __useconds_t_defined
# endif

# ifndef __pid_t_defined
typedef __pid_t pid_t;
#  define __pid_t_defined
# endif
#endif

#if defined __USE_MISC || defined __USE_XOPEN_EXTENDED
# ifndef __intptr_t_defined
typedef __intptr_t intptr_t;
#  define __intptr_t_defined
# endif
#endif

#if defined __USE_BSD || defined __USE_XOPEN
# ifndef __socklen_t_defined
typedef __socklen_t socklen_t;
#  define __socklen_t_defined
# endif
#endif

#define	R_OK	4
#define	W_OK	2
#define	X_OK	1
#define	F_OK	0

extern int access (__const char *__name, int __type) __THROW;

#ifdef __USE_GNU

extern int euidaccess (__const char *__name, int __type) __THROW;
#endif

#ifndef	_STDIO_H
# define SEEK_SET	0
# define SEEK_CUR	1
# define SEEK_END	2
#endif

#if defined __USE_BSD && !defined L_SET

# define L_SET		SEEK_SET
# define L_INCR		SEEK_CUR
# define L_XTND		SEEK_END
#endif

#ifndef __USE_FILE_OFFSET64
extern __off_t lseek (int __fd, __off_t __offset, int __whence) __THROW;
#else
# ifdef __REDIRECT
extern __off64_t __REDIRECT (lseek,
			     (int __fd, __off64_t __offset, int __whence)
			     __THROW,
			     lseek64);
# else
#  define lseek lseek64
# endif
#endif
#ifdef __USE_LARGEFILE64
extern __off64_t lseek64 (int __fd, __off64_t __offset, int __whence) __THROW;
#endif

extern int close (int __fd) __THROW;

extern ssize_t read (int __fd, void *__buf, size_t __nbytes) __THROW;

extern ssize_t write (int __fd, __const void *__buf, size_t __n) __THROW;

#ifdef __USE_UNIX98
# ifndef __USE_FILE_OFFSET64
extern ssize_t pread (int __fd, void *__buf, size_t __nbytes, __off_t __offset)
     __THROW;
extern ssize_t pwrite (int __fd, __const void *__buf, size_t __n,
		       __off_t __offset) __THROW;
# else
#  ifdef __REDIRECT
extern ssize_t __REDIRECT (pread, (int __fd, void *__buf, size_t __nbytes,
				   __off64_t __offset) __THROW,
			   pread64);
extern ssize_t __REDIRECT (pwrite, (int __fd, __const void *__buf,
				    size_t __nbytes, __off64_t __offset)
			   __THROW,
			pwrite64);
#  else
#   define pread pread64
#   define pwrite pwrite64
#  endif
# endif

# ifdef __USE_LARGEFILE64

extern ssize_t pread64 (int __fd, void *__buf, size_t __nbytes,
			__off64_t __offset) __THROW;

extern ssize_t pwrite64 (int __fd, __const void *__buf, size_t __n,
			 __off64_t __offset) __THROW;
# endif
#endif

extern int pipe (int __pipedes[2]) __THROW;

extern unsigned int alarm (unsigned int __seconds) __THROW;

extern unsigned int sleep (unsigned int __seconds) __THROW;

#if defined __USE_BSD || defined __USE_XOPEN_EXTENDED

extern __useconds_t ualarm (__useconds_t __value, __useconds_t __interval)
     __THROW;

extern int usleep (__useconds_t __useconds) __THROW;
#endif

extern int pause (void) __THROW;

extern int chown (__const char *__file, __uid_t __owner, __gid_t __group)
     __THROW;

#if defined __USE_BSD || defined __USE_XOPEN_EXTENDED

extern int fchown (int __fd, __uid_t __owner, __gid_t __group) __THROW;

extern int lchown (__const char *__file, __uid_t __owner, __gid_t __group)
     __THROW;

#endif

extern int chdir (__const char *__path) __THROW;

#if defined __USE_BSD || defined __USE_XOPEN_EXTENDED

extern int fchdir (int __fd) __THROW;
#endif

extern char *getcwd (char *__buf, size_t __size) __THROW;

#ifdef	__USE_GNU

extern char *get_current_dir_name (void) __THROW;
#endif

#if defined __USE_BSD || defined __USE_XOPEN_EXTENDED

extern char *getwd (char *__buf) __THROW;
#endif

extern int dup (int __fd) __THROW;

extern int dup2 (int __fd, int __fd2) __THROW;

extern char **__environ;
#ifdef __USE_GNU
extern char **environ;
#endif

extern int execve (__const char *__path, char *__const __argv[],
		   char *__const __envp[]) __THROW;

#ifdef __USE_GNU

extern int fexecve (int __fd, char *__const __argv[], char *__const __envp[])
     __THROW;
#endif

extern int execv (__const char *__path, char *__const __argv[]) __THROW;

extern int execle (__const char *__path, __const char *__arg, ...) __THROW;

extern int execl (__const char *__path, __const char *__arg, ...) __THROW;

extern int execvp (__const char *__file, char *__const __argv[]) __THROW;

extern int execlp (__const char *__file, __const char *__arg, ...) __THROW;

#if defined __USE_MISC || defined __USE_XOPEN

extern int nice (int __inc) __THROW;
#endif

extern void _exit (int __status) __attribute__ ((__noreturn__));

#include <bits/confname.h>

extern long int pathconf (__const char *__path, int __name) __THROW;

extern long int fpathconf (int __fd, int __name) __THROW;

extern long int sysconf (int __name) __THROW __attribute__ ((__const__));

#ifdef	__USE_POSIX2

extern size_t confstr (int __name, char *__buf, size_t __len) __THROW;
#endif

extern __pid_t getpid (void) __THROW;

extern __pid_t getppid (void) __THROW;

#ifndef __FAVOR_BSD
extern __pid_t getpgrp (void) __THROW;
#else
# ifdef __REDIRECT
extern __pid_t __REDIRECT (getpgrp, (__pid_t __pid) __THROW, __getpgid);
# else
#  define getpgrp __getpgid
# endif
#endif

extern __pid_t __getpgid (__pid_t __pid) __THROW;
#ifdef __USE_XOPEN_EXTENDED
extern __pid_t getpgid (__pid_t __pid) __THROW;
#endif

extern int setpgid (__pid_t __pid, __pid_t __pgid) __THROW;

#if defined __USE_SVID || defined __USE_BSD || defined __USE_XOPEN_EXTENDED

# ifndef __FAVOR_BSD

extern int setpgrp (void) __THROW;

# else

#  ifdef __REDIRECT
extern int __REDIRECT (setpgrp, (__pid_t __pid, __pid_t __pgrp) __THROW,
		       setpgid);
#  else
#   define setpgrp setpgid
#  endif

# endif
#endif

extern __pid_t setsid (void) __THROW;

#ifdef __USE_XOPEN_EXTENDED

extern __pid_t getsid (__pid_t __pid) __THROW;
#endif

extern __uid_t getuid (void) __THROW;

extern __uid_t geteuid (void) __THROW;

extern __gid_t getgid (void) __THROW;

extern __gid_t getegid (void) __THROW;

extern int getgroups (int __size, __gid_t __list[]) __THROW;

#ifdef	__USE_GNU

extern int group_member (__gid_t __gid) __THROW;
#endif

extern int setuid (__uid_t __uid) __THROW;

#if defined __USE_BSD || defined __USE_XOPEN_EXTENDED

extern int setreuid (__uid_t __ruid, __uid_t __euid) __THROW;
#endif

#if defined __USE_BSD || defined __USE_XOPEN2K

extern int seteuid (__uid_t __uid) __THROW;
#endif

extern int setgid (__gid_t __gid) __THROW;

#if defined __USE_BSD || defined __USE_XOPEN_EXTENDED

extern int setregid (__gid_t __rgid, __gid_t __egid) __THROW;
#endif

#if defined __USE_BSD || defined __USE_XOPEN2K

extern int setegid (__gid_t __gid) __THROW;
#endif

extern __pid_t fork (void) __THROW;

#if defined __USE_BSD || defined __USE_XOPEN_EXTENDED

extern __pid_t vfork (void) __THROW;
#endif

extern char *ttyname (int __fd) __THROW;

extern int ttyname_r (int __fd, char *__buf, size_t __buflen) __THROW;

extern int isatty (int __fd) __THROW;

#if defined __USE_BSD \
    || (defined __USE_XOPEN_EXTENDED && !defined __USE_UNIX98)

extern int ttyslot (void) __THROW;
#endif

extern int link (__const char *__from, __const char *__to) __THROW;

#if defined __USE_BSD || defined __USE_XOPEN_EXTENDED

extern int symlink (__const char *__from, __const char *__to) __THROW;

extern int readlink (__const char *__restrict __path, char *__restrict __buf,
		     size_t __len) __THROW;
#endif

extern int unlink (__const char *__name) __THROW;

extern int rmdir (__const char *__path) __THROW;

extern __pid_t tcgetpgrp (int __fd) __THROW;

extern int tcsetpgrp (int __fd, __pid_t __pgrp_id) __THROW;

extern char *getlogin (void) __THROW;
#if defined __USE_REENTRANT || defined __USE_UNIX98

extern int getlogin_r (char *__name, size_t __name_len) __THROW;
#endif

#ifdef	__USE_BSD

extern int setlogin (__const char *__name) __THROW;
#endif

#ifdef	__USE_POSIX2

# define __need_getopt
# include <getopt.h>
#endif

#if defined __USE_BSD || defined __USE_XOPEN2K

extern int gethostname (char *__name, size_t __len) __THROW;
#endif

#if defined __USE_BSD || (defined __USE_XOPEN && !defined __USE_UNIX98)

extern int sethostname (__const char *__name, size_t __len) __THROW;

extern int sethostid (long int __id) __THROW;

extern int getdomainname (char *__name, size_t __len) __THROW;
extern int setdomainname (__const char *__name, size_t __len) __THROW;

extern int vhangup (void) __THROW;

extern int revoke (__const char *__file) __THROW;

extern int profil (unsigned short int *__sample_buffer, size_t __size,
		   size_t __offset, unsigned int __scale) __THROW;

extern int acct (__const char *__name) __THROW;

extern char *getusershell (void) __THROW;
extern void endusershell (void) __THROW;
extern void setusershell (void) __THROW;

extern int daemon (int __nochdir, int __noclose) __THROW;
#endif

#if defined __USE_BSD || (defined __USE_XOPEN && !defined __USE_XOPEN2K)

extern int chroot (__const char *__path) __THROW;

extern char *getpass (__const char *__prompt) __THROW;
#endif

#if defined __USE_BSD || defined __USE_XOPEN

extern int fsync (int __fd) __THROW;
#endif

#if defined __USE_BSD || defined __USE_XOPEN_EXTENDED

extern long int gethostid (void) __THROW;

extern void sync (void) __THROW;

extern int getpagesize (void)  __THROW __attribute__ ((__const__));

# ifndef __USE_FILE_OFFSET64
extern int truncate (__const char *__file, __off_t __length) __THROW;
# else
#  ifdef __REDIRECT
extern int __REDIRECT (truncate,
		       (__const char *__file, __off64_t __length) __THROW,
		       truncate64);
#  else
#   define truncate truncate64
#  endif
# endif
# ifdef __USE_LARGEFILE64
extern int truncate64 (__const char *__file, __off64_t __length) __THROW;
# endif

# ifndef __USE_FILE_OFFSET64
extern int ftruncate (int __fd, __off_t __length) __THROW;
# else
#  ifdef __REDIRECT
extern int __REDIRECT (ftruncate, (int __fd, __off64_t __length) __THROW,
		       ftruncate64);
#  else
#   define ftruncate ftruncate64
#  endif
# endif
# ifdef __USE_LARGEFILE64
extern int ftruncate64 (int __fd, __off64_t __length) __THROW;
# endif

extern int getdtablesize (void) __THROW;

#endif

#if defined __USE_MISC || defined __USE_XOPEN_EXTENDED

extern int brk (void *__addr) __THROW;

extern void *sbrk (intptr_t __delta) __THROW;
#endif

#ifdef __USE_MISC

extern long int syscall (long int __sysno, ...) __THROW;

#endif

#if (defined __USE_MISC || defined __USE_XOPEN_EXTENDED) && !defined F_LOCK

# define F_ULOCK 0
# define F_LOCK  1
# define F_TLOCK 2
# define F_TEST  3

# ifndef __USE_FILE_OFFSET64
extern int lockf (int __fd, int __cmd, __off_t __len) __THROW;
# else
#  ifdef __REDIRECT
extern int __REDIRECT (lockf, (int __fd, int __cmd, __off64_t __len) __THROW,
		       lockf64);
#  else
#   define lockf lockf64
#  endif
# endif
# ifdef __USE_LARGEFILE64
extern int lockf64 (int __fd, int __cmd, __off64_t __len) __THROW;
# endif
#endif

#ifdef __USE_GNU

# define TEMP_FAILURE_RETRY(expression) \
  (__extension__							      \
    ({ long int __result;						      \
       do __result = (long int) (expression);				      \
       while (__result == -1L && errno == EINTR);			      \
       __result; }))
#endif

#if defined __USE_POSIX199309 || defined __USE_UNIX98

extern int fdatasync (int __fildes) __THROW;
#endif

#ifdef	__USE_XOPEN

extern char *crypt (__const char *__key, __const char *__salt) __THROW;

extern void encrypt (char *__block, int __edflag) __THROW;

extern void swab (__const void *__restrict __from, void *__restrict __to,
		  ssize_t __n) __THROW;
#endif

#ifdef __USE_XOPEN

extern char *ctermid (char *__s) __THROW;
#endif

#ifdef __USE_POSIX199309

extern int pthread_atfork (void (*__prepare) (void),
			   void (*__parent) (void),
			   void (*__child) (void)) __THROW;
#endif

__END_DECLS

#endif

Last modified: Thu, 28 Nov 2024 19:46:24 GMT  
Copyright © 2014 OpenSS7 Corporation All Rights Reserved.