[PHP4BETA] CVS update: php4/ext/standard
| From: | ssb | Date: | Thu, 22 Apr 1999 02:48:25 +0000 |
| Subject: | [PHP4BETA] CVS update: php4/ext/standard | ||
| Groups: | php.version4 | ||
| Request: | Send a blank email to php-version4+get-334@lists.php.net to get a copy of this message | ||
Date: Wednesday April 21, 1999 @ 22:48
Author: ssb
Update of /repository/php4/ext/standard
In directory php:/tmp/cvs-serv8480/ext/standard
Modified Files:
Makefile.am basic_functions.c config.h.stub config.m4 fsock.c
php3_standard.h string.c var.c
Added Files:
mime.c mime.h post.c post.h
Log Message:
last bunch of extensions moving to ext/
fhttpd module taken out of functions, functions is ready to go.
The only extensions I have tested are gd+freetype and odbc(solid).
Please try compiling in your favourite extensions and let me know how it
works.
Index: php4/ext/standard/Makefile.am
diff -c php4/ext/standard/Makefile.am:1.3 php4/ext/standard/Makefile.am:1.4
*** php4/ext/standard/Makefile.am:1.3 Wed Apr 21 20:25:56 1999
--- php4/ext/standard/Makefile.am Wed Apr 21 22:48:25 1999
***************
*** 7,11 ****
html.c image.c info.c link.c mail.c math.c md5.c microtime.c \
pack.c pageinfo.c rand.c reg.c soundex.c string.c \
syslog.c type.c uniqid.c url.c iptc.c var.c quot_print.c \
! cyr_convert.c flock_compat.c crypt.c dl.c head.c
--- 7,13 ----
html.c image.c info.c link.c mail.c math.c md5.c microtime.c \
pack.c pageinfo.c rand.c reg.c soundex.c string.c \
syslog.c type.c uniqid.c url.c iptc.c var.c quot_print.c \
! cyr_convert.c flock_compat.c crypt.c dl.c head.c mime.c post.c
+ #number.o: number.c
+ # $(CC) $(CFLAGS) -w@WARNING_LEVEL@ -c $< -o $@
Index: php4/ext/standard/basic_functions.c
diff -c php4/ext/standard/basic_functions.c:1.4 php4/ext/standard/basic_functions.c:1.5
*** php4/ext/standard/basic_functions.c:1.4 Wed Apr 21 13:28:54 1999
--- php4/ext/standard/basic_functions.c Wed Apr 21 22:48:25 1999
***************
*** 52,83 ****
#include <strings.h>
#endif
#include "safe_mode.h"
- /*
- #include "functions/basic_functions.h"
- #include "functions/phpmath.h"
- #include "functions/php3_string.h"
- #include "functions/dns.h"
- #include "functions/md5.h"
- #include "functions/html.h"
- #include "functions/post.h"
- #include "functions/exec.h"
- #include "functions/info.h"
- #include "functions/url.h"
- #include "functions/datetime.h"
- #include "functions/fsock.h"
- #include "functions/image.h"
- #include "functions/php3_link.h"
- #include "functions/php3_filestat.h"
- #include "functions/microtime.h"
- #include "functions/pageinfo.h"
- #include "functions/uniqid.h"
- #include "functions/base64.h"
- #include "functions/php3_mail.h"
- #include "functions/php3_var.h"
- #include "functions/php3_iptc.h"
- #include "functions/quot_print.h"
- #include "functions/cyr_convert.h"
- */
#if WIN32|WINNT
#include "win32/unistd.h"
#endif
--- 52,57 ----
Index: php4/ext/standard/config.h.stub
diff -c php4/ext/standard/config.h.stub:1.1 php4/ext/standard/config.h.stub:1.2
*** php4/ext/standard/config.h.stub:1.1 Wed Apr 21 20:45:14 1999
--- php4/ext/standard/config.h.stub Wed Apr 21 22:48:25 1999
***************
*** 1,2 ****
--- 1,14 ----
/* Define if you have the crypt() function */
#define HAVE_CRYPT 1
+
+ /* Define if you have and want to use libcrypt */
+ #define HAVE_LIBCRYPT 0
+
+ /* crypt capability checks */
+ #undef PHP3_STD_DES_CRYPT
+ #undef PHP3_EXT_DES_CRYPT
+ #undef PHP3_MD5_CRYPT
+ #undef PHP3_BLOWFISH_CRYPT
+
+ /* Define if you have libdl (used for dynamic linking) */
+ #define HAVE_LIBDL 0
Index: php4/ext/standard/config.m4
diff -c php4/ext/standard/config.m4:1.1 php4/ext/standard/config.m4:1.2
*** php4/ext/standard/config.m4:1.1 Fri Apr 16 20:37:06 1999
--- php4/ext/standard/config.m4 Wed Apr 21 22:48:25 1999
***************
*** 1,3 ****
! dnl $Id: config.m4,v 1.1 1999/04/17 00:37:06 ssb Exp $ -*- sh -*-
PHP_EXTENSION(standard)
--- 1,114 ----
! dnl $Id: config.m4,v 1.2 1999/04/22 02:48:25 ssb Exp $ -*- sh -*-
+ divert(1)
+
+ dnl
+ dnl Check for crypt() capabilities
+ dnl
+ AC_DEFUN(AC_CRYPT_CAP,[
+
+ AC_MSG_CHECKING([for standard DES crypt])
+ AC_TRY_RUN([
+ main() {
+ #if HAVE_CRYPT
+ exit (strcmp((char
*)crypt("rasmuslerdorf","rl"),"rl.3StKT.4T8M"));
+ #else
+ exit(0);
+ #endif
+ }],[
+ AC_DEFINE(PHP3_STD_DES_CRYPT,1)
+ AC_MSG_RESULT(yes)
+ ],[
+ AC_DEFINE(PHP3_STD_DES_CRYPT,0)
+ AC_MSG_RESULT(no)
+ ],[
+ AC_DEFINE(PHP3_STD_DES_CRYPT,1)
+ AC_MSG_RESULT(cannot check, guessing yes)
+ ])
+
+ AC_MSG_CHECKING([for extended DES crypt])
+ AC_TRY_RUN([
+ main() {
+ #if HAVE_CRYPT
+ exit (strcmp((char
*)crypt("rasmuslerdorf","_J9..rasm"),"_J9..rasmBYk8r9AiWNc"));
+ #else
+ exit(0);
+ #endif
+ }],[
+ AC_DEFINE(PHP3_EXT_DES_CRYPT,1)
+ AC_MSG_RESULT(yes)
+ ],[
+ AC_DEFINE(PHP3_EXT_DES_CRYPT,0)
+ AC_MSG_RESULT(no)
+ ],[
+ AC_DEFINE(PHP3_EXT_DES_CRYPT,0)
+ AC_MSG_RESULT(cannot check, guessing no)
+ ])
+
+ AC_MSG_CHECKING([for MD5 crypt])
+ AC_TRY_RUN([
+ main() {
+ #if HAVE_CRYPT
+ char salt[15], answer[40];
+
+ salt[0]='$'; salt[1]='1'; salt[2]='$';
+ salt[3]='r'; salt[4]='a'; salt[5]='s';
+ salt[6]='m'; salt[7]='u'; salt[8]='s';
+ salt[9]='l'; salt[10]='e'; salt[11]='$';
+ salt[12]='\0';
+ strcpy(answer,salt);
+ strcat(answer,"rISCgZzpwk3UhDidwXvin0");
+ exit (strcmp((char *)crypt("rasmuslerdorf",salt),answer));
+ #else
+ exit(0);
+ #endif
+ }],[
+ AC_DEFINE(PHP3_MD5_CRYPT,1)
+ AC_MSG_RESULT(yes)
+ ],[
+ AC_DEFINE(PHP3_MD5_CRYPT,0)
+ AC_MSG_RESULT(no)
+ ],[
+ AC_DEFINE(PHP3_MD5_CRYPT,0)
+ AC_MSG_RESULT(cannot check, guessing no)
+ ])
+
+ AC_MSG_CHECKING([for Blowfish crypt])
+ AC_TRY_RUN([
+ main() {
+ #if HAVE_CRYPT
+ char salt[25], answer[70];
+
+ salt[0]='$'; salt[1]='2'; salt[2]='a'; salt[3]='$';
salt[4]='0'; salt[5]='7'; salt[6]='$'; salt[7]='\0';
+ strcat(salt,"rasmuslerd");
+ strcpy(answer,salt);
+ strcpy(&answer[16],"O............gl95GkTKn53Of.H4YchXl5PwvvW.5ri");
+ exit (strcmp((char *)crypt("rasmuslerdorf",salt),answer));
+ #else
+ exit(0);
+ #endif
+ }],[
+ AC_DEFINE(PHP3_BLOWFISH_CRYPT,1)
+ AC_MSG_RESULT(yes)
+ ],[
+ AC_DEFINE(PHP3_BLOWFISH_CRYPT,0)
+ AC_MSG_RESULT(no)
+ ],[
+ AC_DEFINE(PHP3_BLOWFISH_CRYPT,0)
+ AC_MSG_RESULT(cannot check, guessing no)
+ ])
+ ])
+
+ AC_CHECK_LIB(c, dlopen, [
+ # fake it
+ AC_DEFINE(HAVE_LIBDL) ], [
+ AC_CHECK_LIB(dl, dlopen, [
+ LIBS="-ldl $LIBS"
+ AC_DEFINE(HAVE_LIBDL) ], []) ])
+
+ AC_CRYPT_CAP
+
+ divert(3)
+
PHP_EXTENSION(standard)
+
Index: php4/ext/standard/fsock.c
diff -c php4/ext/standard/fsock.c:1.2 php4/ext/standard/fsock.c:1.3
*** php4/ext/standard/fsock.c:1.2 Sun Apr 18 11:58:26 1999
--- php4/ext/standard/fsock.c Wed Apr 21 22:48:25 1999
***************
*** 27,33 ****
| Jim Winstead (jimw@php.net) |
+----------------------------------------------------------------------+
*/
! /* $Id: fsock.c,v 1.2 1999/04/18 15:58:26 zeev Exp $ */
#ifdef THREAD_SAFE
#include "tls.h"
#endif
--- 27,33 ----
| Jim Winstead (jimw@php.net) |
+----------------------------------------------------------------------+
*/
! /* $Id: fsock.c,v 1.3 1999/04/22 02:48:25 ssb Exp $ */
#ifdef THREAD_SAFE
#include "tls.h"
#endif
***************
*** 60,66 ****
#include "base64.h"
#include "file.h"
! #include "functions/post.h"
#include "url.h"
#include "fsock.h"
--- 60,66 ----
#include "base64.h"
#include "file.h"
! #include "post.h"
#include "url.h"
#include "fsock.h"
Index: php4/ext/standard/php3_standard.h
diff -c php4/ext/standard/php3_standard.h:1.2 php4/ext/standard/php3_standard.h:1.3
*** php4/ext/standard/php3_standard.h:1.2 Wed Apr 21 20:25:57 1999
--- php4/ext/standard/php3_standard.h Wed Apr 21 22:48:25 1999
***************
*** 28,34 ****
+----------------------------------------------------------------------+
*/
! /* $Id: php3_standard.h,v 1.2 1999/04/22 00:25:57 ssb Exp $ */
#include "basic_functions.h"
#include "phpmath.h"
--- 28,34 ----
+----------------------------------------------------------------------+
*/
! /* $Id: php3_standard.h,v 1.3 1999/04/22 02:48:25 ssb Exp $ */
#include "basic_functions.h"
#include "phpmath.h"
***************
*** 62,67 ****
--- 62,70 ----
#include "type.h"
#include "dl.h"
#include "php3_crypt.h"
+ #include "head.h"
+ #include "post.h"
+ #include "mime.h"
#define standard_module_ptr basic_functions_module_ptr
Index: php4/ext/standard/string.c
diff -c php4/ext/standard/string.c:1.5 php4/ext/standard/string.c:1.6
*** php4/ext/standard/string.c:1.5 Wed Apr 21 15:01:38 1999
--- php4/ext/standard/string.c Wed Apr 21 22:48:25 1999
***************
*** 30,43 ****
*/
! /* $Id: string.c,v 1.5 1999/04/21 19:01:38 zeev Exp $ */
#ifdef THREAD_SAFE
#include "tls.h"
#endif
#include <stdio.h>
#include "php.h"
#include "reg.h"
! #include "functions/post.h"
#include "php3_string.h"
#if HAVE_SETLOCALE
#include <locale.h>
--- 30,43 ----
*/
! /* $Id: string.c,v 1.6 1999/04/22 02:48:25 ssb Exp $ */
#ifdef THREAD_SAFE
#include "tls.h"
#endif
#include <stdio.h>
#include "php.h"
#include "reg.h"
! #include "post.h"
#include "php3_string.h"
#if HAVE_SETLOCALE
#include <locale.h>
Index: php4/ext/standard/var.c
diff -c php4/ext/standard/var.c:1.2 php4/ext/standard/var.c:1.3
*** php4/ext/standard/var.c:1.2 Sun Apr 18 11:58:27 1999
--- php4/ext/standard/var.c Wed Apr 21 22:48:25 1999
***************
*** 36,42 ****
#include "php.h"
#include "fopen-wrappers.h"
#include "reg.h"
! #include "functions/post.h"
#include "php3_string.h"
#if HAVE_SETLOCALE
#include <locale.h>
--- 36,42 ----
#include "php.h"
#include "fopen-wrappers.h"
#include "reg.h"
! #include "post.h"
#include "php3_string.h"
#if HAVE_SETLOCALE
#include <locale.h>
--
PHP 4 Beta