[PHP-users 11204] Re: PHP4.3.0pre2/devは壊れている?
Youichi Iwakiri
php-users@php.gr.jp
Wed, 30 Oct 2002 17:50:25 +0900
いわきりです
Kiryu Tsukimiya wrote in <20021030173155.9BCA.PHP@angelicwing.net> :
>PHP-4.3.0pre2とcvs版なのですが
>make中に警告を大量に吐いた後、止まってしまいます。
>場所は
>php-4.3.0pre2/ext/standard/basic_functions.c
>の1377行〜1548行あたりです。
>こちらの環境はFreeBSD4.6です。
>10/12あたりのcvs版や、4.2.3はmakeできています。
>どなたか無事makeできた方いらっしゃいますか?
壊れてますね。
reverse patch 当てたらどうでしょうか?
#昨日のcvsは壊れてなかったので
-----------------------------
Index: php4/ext/standard/basic_functions.c
diff -u php4/ext/standard/basic_functions.c:1.538 php4/ext/standard/basic_functions.c:1.539
--- php4/ext/standard/basic_functions.c:1.538 Fri Oct 25 15:33:09 2002
+++ php4/ext/standard/basic_functions.c Tue Oct 29 18:35:49 2002
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: basic_functions.c,v 1.538 2002/10/25 19:33:09 iliaa Exp $ */
+/* $Id: basic_functions.c,v 1.539 2002/10/29 23:35:49 helly Exp $ */
#include "php.h"
#include "php_streams.h"
@@ -508,8 +508,10 @@
PHP_FE(getopt, NULL)
#endif
+#ifdef HAVE_GETTIMEOFDAY
PHP_FE(microtime, NULL)
PHP_FE(gettimeofday, NULL)
+#endif
#ifdef HAVE_GETRUSAGE
PHP_FE(getrusage, NULL)
Index: php4/ext/standard/microtime.c
diff -u php4/ext/standard/microtime.c:1.38 php4/ext/standard/microtime.c:1.39
--- php4/ext/standard/microtime.c:1.38 Fri Sep 6 03:44:30 2002
+++ php4/ext/standard/microtime.c Tue Oct 29 18:35:49 2002
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: microtime.c,v 1.38 2002/09/06 07:44:30 hyanantha Exp $ */
+/* $Id: microtime.c,v 1.39 2002/10/29 23:35:49 helly Exp $ */
#include "php.h"
@@ -53,9 +53,9 @@
/* {{{ proto string microtime(void)
Returns a string containing the current time in seconds and microseconds */
+#ifdef HAVE_GETTIMEOFDAY
PHP_FUNCTION(microtime)
{
-#ifdef HAVE_GETTIMEOFDAY
struct timeval tp;
long sec = 0L;
double msec = 0.0;
@@ -68,17 +68,18 @@
if (msec >= 1.0) msec -= (long) msec;
snprintf(ret, 100, "%.8f %ld", msec, sec);
RETVAL_STRING(ret,1);
- } else
-#endif
+ } else {
RETURN_FALSE;
+ }
}
+#endif
/* }}} */
/* {{{ proto array gettimeofday(void)
Returns the current time as array */
+#ifdef HAVE_GETTIMEOFDAY
PHP_FUNCTION(gettimeofday)
{
-#ifdef HAVE_GETTIMEOFDAY
struct timeval tp;
struct timezone tz;
@@ -95,10 +96,11 @@
#endif
add_assoc_long(return_value, "dsttime", tz.tz_dsttime);
return;
- } else
-#endif
- RETURN_FALSE;
+ } else {
+ RETURN_FALSE;
+ }
}
+#endif
/* }}} */
#ifdef HAVE_GETRUSAGE
Index: php4/ext/standard/microtime.h
diff -u php4/ext/standard/microtime.h:1.9 php4/ext/standard/microtime.h:1.10
--- php4/ext/standard/microtime.h:1.9 Thu Feb 28 03:26:46 2002
+++ php4/ext/standard/microtime.h Tue Oct 29 18:35:49 2002
@@ -16,13 +16,17 @@
+----------------------------------------------------------------------+
*/
-/* $Id: microtime.h,v 1.9 2002/02/28 08:26:46 sebastian Exp $ */
+/* $Id: microtime.h,v 1.10 2002/10/29 23:35:49 helly Exp $ */
#ifndef MICROTIME_H
#define MICROTIME_H
+#ifdef HAVE_GETTIMEOFDAY
PHP_FUNCTION(microtime);
PHP_FUNCTION(gettimeofday);
+#endif
+#ifdef HAVE_GETRUSAGE
PHP_FUNCTION(getrusage);
+#endif
#endif /* MICROTIME_H */
--
Youichi Iwakiri