]> granicus.if.org Git - php/commitdiff
Hardcode all functions which are mentioned in the Large File Support Spec
authorSascha Schumann <sas@php.net>
Thu, 7 Dec 2000 12:09:38 +0000 (12:09 +0000)
committerSascha Schumann <sas@php.net>
Thu, 7 Dec 2000 12:09:38 +0000 (12:09 +0000)
http://ewe3.sas.com/standards/large.file/specs/api+.007.html

ext/standard/basic_functions.c
ext/standard/dir.c
ext/standard/file.c
ext/standard/file.h
ext/standard/filestat.c
ext/standard/php_dir.h
ext/standard/php_filestat.h
main/php.h

index dbb6e7cb5412497ddec72bcc67fad205f6534592..ee4aa93c26442f89b97adba07371bd0bda3169a1 100644 (file)
@@ -393,10 +393,10 @@ function_entry basic_functions[] = {
        PHP_FE(fgets,                           NULL)
        PHP_FE(fgetss,                          NULL)
        PHP_FE(fread,                           NULL)
-       PHP_FE(fopen,                           NULL)
+       PHP_STATIC_FE("fopen", php_if_fopen,                    NULL)
        PHP_FE(fpassthru,                       NULL)
-       PHP_FE(ftruncate,               NULL)
-       PHP_FE(fstat,                           NULL)
+       PHP_STATIC_FE("ftruncate", php_if_ftruncate,    NULL)
+       PHP_STATIC_FE("fstat", php_if_fstat,                    NULL)
        PHP_FE(fseek,                           NULL)
        PHP_FE(ftell,                           NULL)
        PHP_FE(fflush,                          NULL)
@@ -406,7 +406,7 @@ function_entry basic_functions[] = {
        PHP_FE(rename,                          NULL)
        PHP_FE(copy,                            NULL)
        PHP_FE(tempnam,                         NULL)
-       PHP_FE(tmpfile,                         NULL)
+       PHP_STATIC_FE("tmpfile", php_if_tmpfile,                NULL)
        PHP_FE(file,                            NULL)
        PHP_FE(fgetcsv,                         NULL)
     PHP_FE(flock,                              NULL)
@@ -473,8 +473,8 @@ function_entry basic_functions[] = {
        PHP_FE(is_file,                                 NULL)
        PHP_FE(is_dir,                                  NULL)
        PHP_FE(is_link,                                 NULL)
-       PHP_FE(stat,                                    NULL)
-       PHP_FE(lstat,                                   NULL)
+       PHP_STATIC_FE("stat", php_if_stat,                              NULL)
+       PHP_STATIC_FE("lstat", php_if_lstat,                    NULL)
        PHP_FE(chown,                                   NULL)
        PHP_FE(chgrp,                                   NULL)
        PHP_FE(chmod,                                   NULL)
index 84e0d8e5c13151b6b42bec8a61246749b0b433a6..131540816ad7df32d013b8f5414beee52d04725f 100644 (file)
@@ -92,7 +92,7 @@ static zend_class_entry *dir_class_entry_ptr;
 static zend_function_entry php_dir_class_functions[] = {
        PHP_FALIAS(close,       closedir,       NULL)
        PHP_FALIAS(rewind,      rewinddir,      NULL)
-       PHP_FALIAS(read,        readdir,        NULL)
+       PHP_STATIC_FE("read", php_if_readdir, NULL)
        {NULL, NULL, NULL}
 };
 
@@ -294,7 +294,7 @@ PHP_FUNCTION(rewinddir)
 /* {{{ proto string readdir([int dir_handle])
    Read directory entry from dir_handle */
 
-PHP_FUNCTION(readdir)
+PHP_NAMED_FUNCTION(php_if_readdir)
 {
        pval **id, **tmp, *myself;
        php_dir *dirp;
index bc8a516ffbb58be45662bdbda5ef10d51d8292b3..d421230de7a53d05088cb5837ea400bd13538e17 100644 (file)
@@ -500,7 +500,7 @@ PHP_FUNCTION(tempnam)
 /* }}} */
 /* {{{ proto int tmpfile(void)
    Create a temporary file that will be deleted automatically after use */
-PHP_FUNCTION(tmpfile)
+PHP_NAMED_FUNCTION(php_if_tmpfile)
 {
        FILE *fp;
        if (ARG_COUNT(ht) != 0) {
@@ -518,7 +518,7 @@ PHP_FUNCTION(tmpfile)
 /* {{{ proto int fopen(string filename, string mode [, int use_include_path])
    Open a file or a URL and return a file pointer */
 
-PHP_FUNCTION(fopen)
+PHP_NAMED_FUNCTION(php_if_fopen)
 {
        pval **arg1, **arg2, **arg3;
        FILE *fp;
@@ -1552,7 +1552,7 @@ PHP_FUNCTION(unlink)
 
 /* {{{ proto int ftruncate (int fp, int size)
    Truncate file to 'size' length */
-PHP_FUNCTION(ftruncate)
+PHP_NAMED_FUNCTION(php_if_ftruncate)
 {
        zval **fp , **size;
        short int ret;
@@ -1581,7 +1581,7 @@ PHP_FUNCTION(ftruncate)
 
 /* {{{ proto int fstat(int fp)
    Stat() on a filehandle */
-PHP_FUNCTION(fstat)
+PHP_NAMED_FUNCTION(php_if_fstat)
 {
        zval **fp;
        int type;
index ab8216c33afaf5f48e1f8dacf8f9147592d042fd..cc2fe08cbc190060e5f0af3bd69d3370b1c84e56 100644 (file)
@@ -26,8 +26,8 @@
 extern PHP_MINIT_FUNCTION(file);
 
 PHP_FUNCTION(tempnam);
-PHP_FUNCTION(tmpfile);
-PHP_FUNCTION(fopen);
+PHP_NAMED_FUNCTION(php_if_tmpfile);
+PHP_NAMED_FUNCTION(php_if_fopen);
 PHP_FUNCTION(fclose);
 PHP_FUNCTION(popen);
 PHP_FUNCTION(pclose);
@@ -63,8 +63,8 @@ PHP_FUNCTION(fd_set);
 PHP_FUNCTION(fd_isset);
 PHP_FUNCTION(select);
 PHP_FUNCTION(realpath);
-PHP_FUNCTION(ftruncate);
-PHP_FUNCTION(fstat);
+PHP_NAMED_FUNCTION(php_if_ftruncate);
+PHP_NAMED_FUNCTION(php_if_fstat);
 
 PHPAPI int php_set_sock_blocking(int socketd, int block);
 PHPAPI int php_file_le_fopen(void);
index 6935834d858030feb6964d495f520ece00263a0b..0e499630734dd2815015c9b6015c95bc30edc6ae 100644 (file)
@@ -712,12 +712,12 @@ FileFunction(PHP_FN(file_exists),15)
 
 /* {{{ proto array lstat(string filename)
    Give information about a file or symbolic link */
-FileFunction(PHP_FN(lstat),16)
+FileFunction(php_if_lstat,16)
 /* }}} */
 
 /* {{{ proto array stat(string filename)
    Give information about a file */
-FileFunction(PHP_FN(stat),17)
+FileFunction(php_if_stat,17)
 /* }}} */
 
 /*
index 2f416fc5f495413177184e4c740ff7d6507ebb12..8bbaba3b80d87e22789a8647c919edad438aeebd 100644 (file)
@@ -30,7 +30,7 @@ PHP_FUNCTION(closedir);
 PHP_FUNCTION(chdir);
 PHP_FUNCTION(getcwd);
 PHP_FUNCTION(rewinddir);
-PHP_FUNCTION(readdir);
+PHP_NAMED_FUNCTION(php_if_readdir);
 PHP_FUNCTION(getdir);
 
 #endif /* PHP_DIR_H */
index 8f238d8a418f2c470029887f9973274664334e11..8e88431307a86a7d0f311a0d9c95bababb79628a 100644 (file)
@@ -41,8 +41,8 @@ PHP_FUNCTION(is_file);
 PHP_FUNCTION(is_dir);
 PHP_FUNCTION(is_link);
 PHP_FUNCTION(file_exists);
-PHP_FUNCTION(stat);
-PHP_FUNCTION(lstat);
+PHP_NAMED_FUNCTION(php_if_stat);
+PHP_NAMED_FUNCTION(php_if_lstat);
 PHP_FUNCTION(diskfreespace);
 PHP_FUNCTION(chown);
 PHP_FUNCTION(chgrp);
index 76acd56cb22ca29abdccaf88501b862e93bd1b8f..9296138640014fa48b65bef2d999df339046e242 100644 (file)
@@ -215,6 +215,7 @@ char *strerror(int);
 #define PHP_NAMED_FE(php_name, name, arg_types) { #php_name, name, arg_types },
 #define PHP_FE(name, arg_types) PHP_NAMED_FE(name, PHP_FN(name), arg_types)
 #define PHP_FALIAS(name, alias, arg_types) PHP_NAMED_FE(name, PHP_FN(alias), arg_types)
+#define PHP_STATIC_FE(php_name, func_name, arg_types) { php_name, func_name, arg_types },
 
 #define PHP_MINIT(module)      php_minit_##module
 #define PHP_MSHUTDOWN(module)  php_mshutdown_##module