]> granicus.if.org Git - php/commitdiff
- Only include ftok() if it is available
authorDerick Rethans <derick@php.net>
Sun, 20 Oct 2002 13:35:56 +0000 (13:35 +0000)
committerDerick Rethans <derick@php.net>
Sun, 20 Oct 2002 13:35:56 +0000 (13:35 +0000)
ext/standard/basic_functions.c
ext/standard/ftok.c
ext/standard/php_ftok.h

index ccc0b0a833cd0486b5c026b4635e704654f6913d..c8d5aa505a5d172a7e67d8d7824a0d39d24d4431 100644 (file)
@@ -832,7 +832,9 @@ function_entry basic_functions[] = {
     PHP_FE(version_compare,                                                                                                    NULL)
 
        /* functions from ftok.c*/
+#if HAVE_FTOK
        PHP_FE(ftok,    NULL)
+#endif
 
        PHP_FE(str_rot13, NULL)
 
index 7f4adf450d7d3143aff40f6adf3ae6ba4b40719f..adb374e060f37e6b8f2172206b5666eef7b23714 100644 (file)
@@ -23,6 +23,7 @@
 #include <sys/types.h>                                                                                                        
 #include <sys/ipc.h>
 
+#if HAVE_FTOK
 /* {{{ proto int ftok(string pathname, string proj)
    Convert a pathname and a project identifier to a System V IPC key */
 PHP_FUNCTION(ftok)
@@ -53,6 +54,7 @@ PHP_FUNCTION(ftok)
     RETURN_LONG(k);
 }
 /* }}} */
+#endif
 
 /*
  * Local variables:
index 6f8029cde79f7b0da2e1b0357fcbc5afa2a47658..978520a30aacb7b8c6be1d791344b728ff0f7b45 100644 (file)
@@ -21,6 +21,8 @@
 #ifndef PHP_FTOK_H
 #define PHP_FTOK_H
 
+#if HAVE_FTOK
 PHP_FUNCTION(ftok);
+#endif
 
 #endif /* PHP_FTOK_H */