Back to index

php5  5.3.10
php_posix.h
Go to the documentation of this file.
00001 /* 
00002    +----------------------------------------------------------------------+
00003    | PHP Version 5                                                        |
00004    +----------------------------------------------------------------------+
00005    | Copyright (c) 1997-2012 The PHP Group                                |
00006    +----------------------------------------------------------------------+
00007    | This source file is subject to version 3.01 of the PHP license,      |
00008    | that is bundled with this package in the file LICENSE, and is        |
00009    | available through the world-wide-web at the following url:           |
00010    | http://www.php.net/license/3_01.txt                                  |
00011    | If you did not receive a copy of the PHP license and are unable to   |
00012    | obtain it through the world-wide-web, please send a note to          |
00013    | license@php.net so we can mail you a copy immediately.               |
00014    +----------------------------------------------------------------------+
00015    | Author: Kristian Koehntopp <kris@koehntopp.de>                       |
00016    +----------------------------------------------------------------------+
00017  */
00018 
00019 
00020 /* $Id: php_posix.h 321634 2012-01-01 13:15:04Z felipe $ */
00021 
00022 #ifndef PHP_POSIX_H
00023 #define PHP_POSIX_H
00024 
00025 #ifdef HAVE_CONFIG_H
00026 #include "config.h"
00027 #endif
00028 
00029 #if HAVE_POSIX
00030 #ifndef DLEXPORT
00031 #define DLEXPORT
00032 #endif
00033 
00034 extern zend_module_entry posix_module_entry;
00035 #define posix_module_ptr &posix_module_entry
00036 
00037 /* POSIX.1, 3.3 */
00038 PHP_FUNCTION(posix_kill);
00039 
00040 /* POSIX.1, 4.1 */
00041 PHP_FUNCTION(posix_getpid);
00042 PHP_FUNCTION(posix_getppid);
00043 
00044 /* POSIX.1,  4.2 */
00045 PHP_FUNCTION(posix_getuid);
00046 PHP_FUNCTION(posix_getgid);
00047 PHP_FUNCTION(posix_geteuid);
00048 PHP_FUNCTION(posix_getegid);
00049 PHP_FUNCTION(posix_setuid);
00050 PHP_FUNCTION(posix_setgid);
00051 #ifdef HAVE_SETEUID
00052 PHP_FUNCTION(posix_seteuid);
00053 #endif
00054 #ifdef HAVE_SETEGID
00055 PHP_FUNCTION(posix_setegid);
00056 #endif
00057 #ifdef HAVE_GETGROUPS
00058 PHP_FUNCTION(posix_getgroups);
00059 #endif
00060 #ifdef HAVE_GETLOGIN
00061 PHP_FUNCTION(posix_getlogin);
00062 #endif
00063 
00064 /* POSIX.1, 4.3 */
00065 PHP_FUNCTION(posix_getpgrp);
00066 #ifdef HAVE_SETSID
00067 PHP_FUNCTION(posix_setsid);
00068 #endif
00069 PHP_FUNCTION(posix_setpgid);
00070 /* Non-Posix functions which are common */
00071 #ifdef HAVE_GETPGID
00072 PHP_FUNCTION(posix_getpgid);
00073 #endif
00074 #ifdef HAVE_GETSID
00075 PHP_FUNCTION(posix_getsid);
00076 #endif
00077 
00078 /* POSIX.1, 4.4 */
00079 PHP_FUNCTION(posix_uname);
00080 PHP_FUNCTION(posix_times);
00081 
00082 /* POSIX.1, 4.5 */
00083 #ifdef HAVE_CTERMID
00084 PHP_FUNCTION(posix_ctermid);
00085 #endif
00086 PHP_FUNCTION(posix_ttyname);
00087 PHP_FUNCTION(posix_isatty);
00088 
00089 /* POSIX.1, 5.2 */
00090 PHP_FUNCTION(posix_getcwd);
00091 
00092 /* POSIX.1, 5.4 */
00093 #ifdef HAVE_MKFIFO
00094 PHP_FUNCTION(posix_mkfifo);
00095 #endif
00096 #ifdef HAVE_MKNOD
00097 PHP_FUNCTION(posix_mknod);
00098 #endif
00099 
00100 /* POSIX.1, 5.6 */
00101 PHP_FUNCTION(posix_access);
00102 
00103 /* POSIX.1, 9.2 */
00104 PHP_FUNCTION(posix_getgrnam);
00105 PHP_FUNCTION(posix_getgrgid);
00106 PHP_FUNCTION(posix_getpwnam);
00107 PHP_FUNCTION(posix_getpwuid);
00108 
00109 #ifdef HAVE_GETRLIMIT
00110 PHP_FUNCTION(posix_getrlimit);
00111 #endif
00112 
00113 #ifdef HAVE_INITGROUPS
00114 PHP_FUNCTION(posix_initgroups);
00115 #endif
00116 
00117 PHP_FUNCTION(posix_get_last_error);
00118 PHP_FUNCTION(posix_strerror);
00119 
00120 ZEND_BEGIN_MODULE_GLOBALS(posix)
00121        int last_error;
00122 ZEND_END_MODULE_GLOBALS(posix)
00123 
00124 #ifdef ZTS
00125 # define POSIX_G(v) TSRMG(posix_globals_id, zend_posix_globals *, v)
00126 #else
00127 # define POSIX_G(v)  (posix_globals.v)
00128 #endif
00129 
00130 #else
00131 
00132 #define posix_module_ptr NULL
00133 
00134 #endif
00135 
00136 #define phpext_posix_ptr posix_module_ptr
00137 
00138 #endif /* PHP_POSIX_H */