cvs: /php4 configure.in php.h /php4/ext/standard file.c file.h
| From: | Stig Bakken | Date: | Sun, 14 Nov 1999 11:06:08 +0000 |
| Subject: | cvs: /php4 configure.in php.h /php4/ext/standard file.c file.h | ||
| Groups: | php.version4 | ||
| Request: | Send a blank email to php-version4+get-6209@lists.php.net to get a copy of this message | ||
ssb Sun Nov 14 06:06:08 1999 EDT
Modified files:
/php4 configure.in php.h
/php4/ext/standard file.c file.h
Log:
Removed the mkstemp stuff and added tmpfile() function instead.
Index: php4/configure.in
diff -u php4/configure.in:1.32 php4/configure.in:1.33
--- php4/configure.in:1.32 Sat Nov 13 11:51:30 1999
+++ php4/configure.in Sun Nov 14 06:05:36 1999
@@ -1,4 +1,4 @@
-dnl ## $Id: configure.in,v 1.32 1999/11/13 16:51:30 sas Exp $ -*- sh -*-
+dnl ## $Id: configure.in,v 1.33 1999/11/14 11:05:36 ssb Exp $ -*- sh -*-
dnl ## Process this file with autoconf to produce a configure script.
divert(0)
@@ -333,7 +333,6 @@
usleep \
utime \
vsnprintf \
-mkstemp \
)
AC_REPLACE_FUNCS(strlcat strlcpy)
Index: php4/php.h
diff -u php4/php.h:1.43 php4/php.h:1.44
--- php4/php.h:1.43 Sat Nov 13 11:51:30 1999
+++ php4/php.h Sun Nov 14 06:05:36 1999
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php.h,v 1.43 1999/11/13 16:51:30 sas Exp $ */
+/* $Id: php.h,v 1.44 1999/11/14 11:05:36 ssb Exp $ */
#ifndef _PHP_H
#define _PHP_H
@@ -166,10 +166,6 @@
#ifndef HAVE_STRERROR
extern char *strerror(int);
-#endif
-
-#ifdef HAVE_MKSTEMP
-# define mktemp mkstemp
#endif
#include "fopen-wrappers.h"
Index: php4/ext/standard/file.c
diff -u php4/ext/standard/file.c:1.38 php4/ext/standard/file.c:1.39
--- php4/ext/standard/file.c:1.38 Tue Oct 26 16:09:59 1999
+++ php4/ext/standard/file.c Sun Nov 14 06:05:37 1999
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: file.c,v 1.38 1999/10/26 20:09:59 thies Exp $ */
+/* $Id: file.c,v 1.39 1999/11/14 11:05:37 ssb Exp $ */
/* Synced with php3 revision 1.218 1999-06-16 [ssb] */
@@ -232,6 +232,7 @@
PHP_FE(rename, NULL)
PHP_FE(copy, NULL)
PHP_FE(tempnam, NULL)
+ PHP_FE(tmpfile, NULL)
PHP_FE(file, NULL)
PHP_FE(fgetcsv, NULL)
PHP_FE(flock, NULL)
@@ -591,6 +592,23 @@
}
/* }}} */
+/* {{{ proto int tmpfile()
+ Create a temporary file that will be deleted automatically after use. */
+PHP_FUNCTION(tmpfile)
+{
+ FILE *fp;
+ if (ARG_COUNT(ht) != 0) {
+ WRONG_PARAM_COUNT;
+ }
+ fp = tmpfile();
+ if (fp == NULL) {
+ php_error(E_WARNING, "tmpfile: %s", strerror(errno));
+ RETURN_FALSE;
+ }
+ ZEND_REGISTER_RESOURCE(return_value, fp, le_fopen);
+}
+/* }}} */
+
/* {{{ proto int fopen(string filename, string mode [, int use_include_path])
Open a file or a URL and return a file pointer */
Index: php4/ext/standard/file.h
diff -u php4/ext/standard/file.h:1.11 php4/ext/standard/file.h:1.12
--- php4/ext/standard/file.h:1.11 Fri Oct 15 11:22:23 1999
+++ php4/ext/standard/file.h Sun Nov 14 06:05:37 1999
@@ -27,7 +27,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: file.h,v 1.11 1999/10/15 15:22:23 thies Exp $ */
+/* $Id: file.h,v 1.12 1999/11/14 11:05:37 ssb Exp $ */
/* Synced with php3 revision 1.30 1999-06-16 [ssb] */
@@ -40,6 +40,7 @@
extern PHP_MINIT_FUNCTION(file);
PHP_FUNCTION(tempnam);
+PHP_FUNCTION(tmpfile);
PHP_FUNCTION(fopen);
PHP_FUNCTION(fclose);
PHP_FUNCTION(popen);