Improved NetWare diff - 2.
| From: | Ananth Kesari | Date: | Thu, 26 Feb 2004 11:10:55 +0000 |
| Subject: | Improved NetWare diff - 2. | ||
| Groups: | php.internals | ||
| Request: | Send a blank email to internals+get-8166@lists.php.net to get a copy of this message | ||
Hi,
This is the second part of the NetWare diff.
Please give me your feedback and let me know if we can check this
into the php5 sources.
Thanks,
Ananth.
Index: netware/ApacheCore.imp =================================================================== RCS file: /repository/php-src/netware/ApacheCore.imp,v retrieving revision 1.2 diff -u -r1.2 ApacheCore.imp --- netware/ApacheCore.imp 3 Jan 2003 12:15:36 -0000 1.2 +++ netware/ApacheCore.imp 26 Feb 2004 10:50:20 -0000 @@ -1,365 +1,365 @@ - ap_MD5Final, - ap_MD5Init, - ap_MD5Update, - ap_acquire_mutex, - ap_add_cgi_vars, - ap_add_common_vars, - ap_add_loaded_module, - ap_add_module, - ap_add_named_module, - ap_add_per_dir_conf, - ap_add_per_url_conf, - ap_add_version_component, - ap_allow_options, - ap_allow_overrides, - ap_append_arrays, - ap_array_cat, - ap_auth_name, - ap_auth_type, - ap_basic_http_header, - ap_bclose, - ap_bcreate, - ap_bfilbuf, - ap_bfileno, - ap_bflsbuf, - ap_bflush, - ap_bgetopt, - ap_bgets, - ap_bhalfduplex, - ap_block_alarms, - ap_blookc, - ap_bnonblock, - ap_bonerror, - ap_bpushfd, - ap_bputs, - ap_bread, - ap_bsetflag, - ap_bsetopt, - ap_bskiplf, - ap_bspawn_child, - ap_bwrite, - ap_bytes_in_free_blocks, - ap_bytes_in_pool, - ap_call_exec, - ap_can_exec, - ap_cfg_closefile, - ap_cfg_getc, - ap_cfg_getline, - ap_chdir_file, - ap_check_alarm, - ap_check_cmd_context, - ap_checkmask, - ap_cleanup_for_exec, - ap_clear_module_list, - ap_clear_pool, - ap_clear_table, - ap_close_piped_log, - ap_construct_server, - ap_construct_url, - ap_content_type_tolower, - ap_copy_array, - ap_copy_array_hdr, - ap_copy_table, - ap_count_dirs, - ap_cpystrn, - ap_create_environment, - ap_create_mutex, - ap_create_per_dir_config, - ap_custom_response, - ap_default_port_for_request, - ap_default_port_for_scheme, - ap_default_type, - ap_destroy_mutex, - ap_destroy_pool, - ap_destroy_sub_req, - ap_die, - ap_discard_request_body, - ap_document_root, - ap_each_byterange, - ap_error_log2stderr, - ap_escape_html, - ap_escape_path_segment, - ap_escape_quotes, - ap_escape_shell_cmd, - ap_exists_scoreboard_image, - ap_finalize_request_protocol, - ap_find_command, - ap_find_command_in_modules, - ap_find_last_token, - ap_find_linked_module, - ap_find_module_name, - ap_find_path_info, - ap_find_token, - ap_get_basic_auth_pw, - ap_get_client_block, - ap_get_gmtoff, - ap_get_limit_req_body, - ap_get_remote_host, - ap_get_remote_logname, - ap_get_server_built, - ap_get_server_name, - ap_get_server_port, - ap_get_server_version, - ap_get_time, - ap_get_token, - ap_getparents, - ap_getword, - ap_getword_conf, - ap_getword_conf_nc, - ap_getword_nc, - ap_getword_nulls, - ap_getword_nulls_nc, - ap_getword_white, - ap_getword_white_nc, - ap_gm_timestr_822, - ap_gname2id, - ap_handle_command, - ap_hard_timeout, - ap_ht_time, - ap_ind, - ap_index_of_response, - ap_init_virtual_host, - ap_internal_redirect, - ap_internal_redirect_handler, - ap_is_directory, - ap_is_fnmatch, - ap_is_initial_req, - ap_is_matchexp, - ap_is_url, - ap_kill_cleanup, - ap_kill_cleanups_for_fd, - ap_kill_cleanups_for_socket, - ap_kill_timeout, - ap_log_assert, - ap_log_error_old, - ap_log_reason, - ap_log_unixerr, - ap_make_array, - ap_make_dirstr, - ap_make_dirstr_parent, - ap_make_dirstr_prefix, - ap_make_full_path, - ap_make_sub_pool, - ap_make_table, - ap_matches_request_vhost, - ap_md5, - ap_md5_binary, - ap_md5contextTo64, - ap_md5digest, - ap_meets_conditions, - ap_no2slash, - ap_note_auth_failure, - ap_note_basic_auth_failure, - ap_note_cleanups_for_fd, - ap_note_cleanups_for_file, - ap_note_cleanups_for_socket, - ap_note_digest_auth_failure, - ap_note_subprocess, - ap_open_mutex, - ap_open_piped_log, - ap_os_escape_path, - ap_overlap_tables, - ap_overlay_tables, - ap_palloc, - ap_parseHTTPdate, - ap_parse_hostinfo_components, - ap_parse_uri, - ap_parse_uri_components, - ap_pcalloc, - ap_pcfg_open_custom, - ap_pcfg_openfile, - ap_pclosedir, - ap_pclosef, - ap_pclosesocket, - ap_pduphostent, - ap_pfclose, - ap_pfdopen, - ap_pfopen, - ap_pgethostbyname, - ap_popendir, - ap_popenf, - ap_pregcomp, - ap_pregfree, - ap_pregsub, - ap_psignature, - ap_psocket, - ap_pstrdup, - ap_pstrndup, - ap_push_array, - ap_pvsprintf, - ap_rationalize_mtime, - ap_register_cleanup, - ap_release_mutex, - ap_remove_loaded_module, - ap_remove_module, - ap_requires, - ap_reset_timeout, - ap_rflush, - ap_rind, - ap_rputc, - ap_rputs, - ap_run_cleanup, - ap_run_sub_req, - ap_rwrite, - ap_satisfies, - ap_scan_script_header_err, - ap_scan_script_header_err_buff, - ap_scan_script_header_err_core, - ap_send_fb, - ap_send_fb_length, - ap_send_fd, - ap_send_fd_length, - ap_send_http_header, - ap_send_http_trace, - ap_send_mmap, - ap_send_size, - ap_server_root_relative, - ap_set_byterange, - ap_set_content_length, - ap_set_etag, - ap_set_keepalive, - ap_set_last_modified, - ap_setup_client_block, - ap_should_client_block, - ap_soft_timeout, - ap_some_auth_required, - ap_spawn_child, - ap_srm_command_loop, - ap_str_tolower, - ap_strcasecmp_match, - ap_strcmp_match, - ap_sub_req_lookup_file, - ap_sub_req_lookup_uri, - ap_sync_scoreboard_image, - ap_table_add, - ap_table_addn, - ap_table_get, - ap_table_merge, - ap_table_mergen, - ap_table_set, - ap_table_setn, - ap_table_unset, - ap_tm2sec, - ap_uname2id, - ap_unblock_alarms, - ap_unescape_url, - ap_unparse_uri_components, - ap_update_mtime, - ap_uudecode, - ap_uuencode, - ap_vbprintf, - ap_vformatter, - ap_vsnprintf, - regcomp, - regexec, - regfree, - access_module, - alias_module, - ap_bprintf, - ap_bvputs, - ap_day_snames, - ap_extended_status, - ap_limit_section, - ap_loaded_modules, - ap_log_error, - ap_log_printf, - ap_log_rerror, - ap_month_snames, - ap_null_cleanup, - ap_psprintf, - ap_pstrcat, - ap_restart_time, - ap_rprintf, - ap_rvputs, - ap_scoreboard_image, - ap_send_header_field, - ap_server_argv0, - ap_server_root, - ap_set_file_slot, - ap_set_flag_slot, - ap_set_string_slot, - ap_set_string_slot_lower, - ap_snprintf, - ap_suexec_enabled, - ap_table_do, - apache_main, - asis_module, - auth_module, - autoindex_module, - config_log_module, - core_module, - dir_module, - env_module, - imap_module, - includes_module, - mime_module, - negotiation_module, - setenvif_module, - so_module, - top_module, - ap_fnmatch, - ap_method_number_of, - ap_exists_config_define, - ap_single_module_configure, - ap_make_etag, - ap_array_pstrcat, - ap_find_list_item, - ap_MD5Encode, - ap_validate_password, - ap_size_list_item, - ap_get_list_item, - ap_scoreboard_fname, - ap_pid_fname, - ap_excess_requests_per_child, - ap_threads_per_child, - ap_max_requests_per_child, - ap_daemons_to_start, - ap_daemons_min_free, - ap_daemons_max_free, - ap_daemons_limit, - ap_user_name, - ap_user_id, - ap_group_id, - ap_standalone, - ap_server_confname, - ap_sub_req_method_uri, - ap_regerror, - ap_regexec, - ap_field_noparam, - ap_pbase64decode, - ap_pbase64encode, - ap_base64encode, - ap_base64encode_binary, - ap_base64encode_len, - ap_base64decode, - ap_base64decode_binary, - ap_base64decode_len, - ap_SHA1Init, - ap_SHA1Update_binary, - ap_SHA1Update, - ap_SHA1Final, - ap_sha1_base64, - ap_my_generation, - ap_get_virthost_addr, - ap_listeners, - ap_listenbacklog, - clean_parent_exit, - init_tsd, - ap_set_config_vectors, - ap_strcasestr, - ap_to64, - ap_vrprintf, - regerror, - ap_add_file_conf, - ap_configtestonly, - ap_is_rdirectory, - ap_remove_spaces, - ap_scan_script_header_err_strs, - ap_start_shutdown, - ap_start_restart, - ap_stripprefix, - ap_send_error_response, - ap_os_canonical_filename, - ap_os_http_method, - os_readdir, - os_opendir + ap_MD5Final, + ap_MD5Init, + ap_MD5Update, + ap_acquire_mutex, + ap_add_cgi_vars, + ap_add_common_vars, + ap_add_loaded_module, + ap_add_module, + ap_add_named_module, + ap_add_per_dir_conf, + ap_add_per_url_conf, + ap_add_version_component, + ap_allow_options, + ap_allow_overrides, + ap_append_arrays, + ap_array_cat, + ap_auth_name, + ap_auth_type, + ap_basic_http_header, + ap_bclose, + ap_bcreate, + ap_bfilbuf, + ap_bfileno, + ap_bflsbuf, + ap_bflush, + ap_bgetopt, + ap_bgets, + ap_bhalfduplex, + ap_block_alarms, + ap_blookc, + ap_bnonblock, + ap_bonerror, + ap_bpushfd, + ap_bputs, + ap_bread, + ap_bsetflag, + ap_bsetopt, + ap_bskiplf, + ap_bspawn_child, + ap_bwrite, + ap_bytes_in_free_blocks, + ap_bytes_in_pool, + ap_call_exec, + ap_can_exec, + ap_cfg_closefile, + ap_cfg_getc, + ap_cfg_getline, + ap_chdir_file, + ap_check_alarm, + ap_check_cmd_context, + ap_checkmask, + ap_cleanup_for_exec, + ap_clear_module_list, + ap_clear_pool, + ap_clear_table, + ap_close_piped_log, + ap_construct_server, + ap_construct_url, + ap_content_type_tolower, + ap_copy_array, + ap_copy_array_hdr, + ap_copy_table, + ap_count_dirs, + ap_cpystrn, + ap_create_environment, + ap_create_mutex, + ap_create_per_dir_config, + ap_custom_response, + ap_default_port_for_request, + ap_default_port_for_scheme, + ap_default_type, + ap_destroy_mutex, + ap_destroy_pool, + ap_destroy_sub_req, + ap_die, + ap_discard_request_body, + ap_document_root, + ap_each_byterange, + ap_error_log2stderr, + ap_escape_html, + ap_escape_path_segment, + ap_escape_quotes, + ap_escape_shell_cmd, + ap_exists_scoreboard_image, + ap_finalize_request_protocol, + ap_find_command, + ap_find_command_in_modules, + ap_find_last_token, + ap_find_linked_module, + ap_find_module_name, + ap_find_path_info, + ap_find_token, + ap_get_basic_auth_pw, + ap_get_client_block, + ap_get_gmtoff, + ap_get_limit_req_body, + ap_get_remote_host, + ap_get_remote_logname, + ap_get_server_built, + ap_get_server_name, + ap_get_server_port, + ap_get_server_version, + ap_get_time, + ap_get_token, + ap_getparents, + ap_getword, + ap_getword_conf, + ap_getword_conf_nc, + ap_getword_nc, + ap_getword_nulls, + ap_getword_nulls_nc, + ap_getword_white, + ap_getword_white_nc, + ap_gm_timestr_822, + ap_gname2id, + ap_handle_command, + ap_hard_timeout, + ap_ht_time, + ap_ind, + ap_index_of_response, + ap_init_virtual_host, + ap_internal_redirect, + ap_internal_redirect_handler, + ap_is_directory, + ap_is_fnmatch, + ap_is_initial_req, + ap_is_matchexp, + ap_is_url, + ap_kill_cleanup, + ap_kill_cleanups_for_fd, + ap_kill_cleanups_for_socket, + ap_kill_timeout, + ap_log_assert, + ap_log_error_old, + ap_log_reason, + ap_log_unixerr, + ap_make_array, + ap_make_dirstr, + ap_make_dirstr_parent, + ap_make_dirstr_prefix, + ap_make_full_path, + ap_make_sub_pool, + ap_make_table, + ap_matches_request_vhost, + ap_md5, + ap_md5_binary, + ap_md5contextTo64, + ap_md5digest, + ap_meets_conditions, + ap_no2slash, + ap_note_auth_failure, + ap_note_basic_auth_failure, + ap_note_cleanups_for_fd, + ap_note_cleanups_for_file, + ap_note_cleanups_for_socket, + ap_note_digest_auth_failure, + ap_note_subprocess, + ap_open_mutex, + ap_open_piped_log, + ap_os_escape_path, + ap_overlap_tables, + ap_overlay_tables, + ap_palloc, + ap_parseHTTPdate, + ap_parse_hostinfo_components, + ap_parse_uri, + ap_parse_uri_components, + ap_pcalloc, + ap_pcfg_open_custom, + ap_pcfg_openfile, + ap_pclosedir, + ap_pclosef, + ap_pclosesocket, + ap_pduphostent, + ap_pfclose, + ap_pfdopen, + ap_pfopen, + ap_pgethostbyname, + ap_popendir, + ap_popenf, + ap_pregcomp, + ap_pregfree, + ap_pregsub, + ap_psignature, + ap_psocket, + ap_pstrdup, + ap_pstrndup, + ap_push_array, + ap_pvsprintf, + ap_rationalize_mtime, + ap_register_cleanup, + ap_release_mutex, + ap_remove_loaded_module, + ap_remove_module, + ap_requires, + ap_reset_timeout, + ap_rflush, + ap_rind, + ap_rputc, + ap_rputs, + ap_run_cleanup, + ap_run_sub_req, + ap_rwrite, + ap_satisfies, + ap_scan_script_header_err, + ap_scan_script_header_err_buff, + ap_scan_script_header_err_core, + ap_send_fb, + ap_send_fb_length, + ap_send_fd, + ap_send_fd_length, + ap_send_http_header, + ap_send_http_trace, + ap_send_mmap, + ap_send_size, + ap_server_root_relative, + ap_set_byterange, + ap_set_content_length, + ap_set_etag, + ap_set_keepalive, + ap_set_last_modified, + ap_setup_client_block, + ap_should_client_block, + ap_soft_timeout, + ap_some_auth_required, + ap_spawn_child, + ap_srm_command_loop, + ap_str_tolower, + ap_strcasecmp_match, + ap_strcmp_match, + ap_sub_req_lookup_file, + ap_sub_req_lookup_uri, + ap_sync_scoreboard_image, + ap_table_add, + ap_table_addn, + ap_table_get, + ap_table_merge, + ap_table_mergen, + ap_table_set, + ap_table_setn, + ap_table_unset, + ap_tm2sec, + ap_uname2id, + ap_unblock_alarms, + ap_unescape_url, + ap_unparse_uri_components, + ap_update_mtime, + ap_uudecode, + ap_uuencode, + ap_vbprintf, + ap_vformatter, + ap_vsnprintf, + regcomp, + regexec, + regfree, + access_module, + alias_module, + ap_bprintf, + ap_bvputs, + ap_day_snames, + ap_extended_status, + ap_limit_section, + ap_loaded_modules, + ap_log_error, + ap_log_printf, + ap_log_rerror, + ap_month_snames, + ap_null_cleanup, + ap_psprintf, + ap_pstrcat, + ap_restart_time, + ap_rprintf, + ap_rvputs, + ap_scoreboard_image, + ap_send_header_field, + ap_server_argv0, + ap_server_root, + ap_set_file_slot, + ap_set_flag_slot, + ap_set_string_slot, + ap_set_string_slot_lower, + ap_snprintf, + ap_suexec_enabled, + ap_table_do, + apache_main, + asis_module, + auth_module, + autoindex_module, + config_log_module, + core_module, + dir_module, + env_module, + imap_module, + includes_module, + mime_module, + negotiation_module, + setenvif_module, + so_module, + top_module, + ap_fnmatch, + ap_method_number_of, + ap_exists_config_define, + ap_single_module_configure, + ap_make_etag, + ap_array_pstrcat, + ap_find_list_item, + ap_MD5Encode, + ap_validate_password, + ap_size_list_item, + ap_get_list_item, + ap_scoreboard_fname, + ap_pid_fname, + ap_excess_requests_per_child, + ap_threads_per_child, + ap_max_requests_per_child, + ap_daemons_to_start, + ap_daemons_min_free, + ap_daemons_max_free, + ap_daemons_limit, + ap_user_name, + ap_user_id, + ap_group_id, + ap_standalone, + ap_server_confname, + ap_sub_req_method_uri, + ap_regerror, + ap_regexec, + ap_field_noparam, + ap_pbase64decode, + ap_pbase64encode, + ap_base64encode, + ap_base64encode_binary, + ap_base64encode_len, + ap_base64decode, + ap_base64decode_binary, + ap_base64decode_len, + ap_SHA1Init, + ap_SHA1Update_binary, + ap_SHA1Update, + ap_SHA1Final, + ap_sha1_base64, + ap_my_generation, + ap_get_virthost_addr, + ap_listeners, + ap_listenbacklog, + clean_parent_exit, + init_tsd, + ap_set_config_vectors, + ap_strcasestr, + ap_to64, + ap_vrprintf, + regerror, + ap_add_file_conf, + ap_configtestonly, + ap_is_rdirectory, + ap_remove_spaces, + ap_scan_script_header_err_strs, + ap_start_shutdown, + ap_start_restart, + ap_stripprefix, + ap_send_error_response, + ap_os_canonical_filename, + ap_os_http_method, + os_readdir, + os_opendir Index: netware/BisonExtStandard.bat =================================================================== RCS file: /repository/php-src/netware/BisonExtStandard.bat,v retrieving revision 1.2 diff -u -r1.2 BisonExtStandard.bat --- netware/BisonExtStandard.bat 3 Jan 2003 12:15:36 -0000 1.2 +++ netware/BisonExtStandard.bat 26 Feb 2004 10:50:20 -0000 @@ -1,3 +1,3 @@ -@echo off - -bison --output=ext\standard\parsedate.c -v -d -p phplib ext\standard\parsedate.y +@echo off + +bison --output=ext\standard\parsedate.c -v -d -p phplib ext\standard\parsedate.y Index: netware/BisonFlexZend.bat =================================================================== RCS file: /repository/php-src/netware/BisonFlexZend.bat,v retrieving revision 1.2 diff -u -r1.2 BisonFlexZend.bat --- netware/BisonFlexZend.bat 3 Jan 2003 12:15:36 -0000 1.2 +++ netware/BisonFlexZend.bat 26 Feb 2004 10:50:20 -0000 @@ -1,8 +1,8 @@ -@echo off - -bison --output=zend_ini_parser.c -v -d -p ini_ zend_ini_parser.y -flex -B -i -Sflex.skl -Pini_ -ozend_ini_scanner.c zend_ini_scanner.l -REM flex -i -Pini_ -ozend_ini_scanner.c zend_ini_scanner.l -bison --output=zend_language_parser.c -v -d -p zend zend_language_parser.y -flex -B -i -Sflex.skl -Pzend -ozend_language_scanner.c zend_language_scanner.l -REM flex -i -Pzend -ozend_language_scanner.c zend_language_scanner.l +@echo off + +bison --output=zend_ini_parser.c -v -d -p ini_ zend_ini_parser.y +flex -B -i -Sflex.skl -Pini_ -ozend_ini_scanner.c zend_ini_scanner.l +REM flex -i -Pini_ -ozend_ini_scanner.c zend_ini_scanner.l +bison --output=zend_language_parser.c -v -d -p zend zend_language_parser.y +flex -B -i -Sflex.skl -Pzend -ozend_language_scanner.c zend_language_scanner.l +REM flex -i -Pzend -ozend_language_scanner.c zend_language_scanner.l Index: netware/ZendEngine2.mak =================================================================== RCS file: /repository/php-src/netware/ZendEngine2.mak,v retrieving revision 1.4 diff -u -r1.4 ZendEngine2.mak --- netware/ZendEngine2.mak 3 Jan 2003 11:46:20 -0000 1.4 +++ netware/ZendEngine2.mak 26 Feb 2004 10:50:21 -0000 @@ -1,4 +1,4 @@ -# Temporarily here -- later may go into some batch file +# Temporarily here -- later may go into some batch file # which will set this as an environment variable PROJECT_ROOT = .. @@ -18,6 +18,7 @@ zend_builtin_functions.c \ zend_compile.c \ zend_constants.c \ + zend_default_classes.c \ zend_dynamic_array.c \ zend_execute.c \ zend_execute_API.c \ @@ -28,20 +29,26 @@ zend_ini.c \ zend_ini_parser.c \ zend_ini_scanner.c \ + zend_interfaces.c \ + zend_iterators.c \ zend_language_parser.c \ zend_language_scanner.c \ zend_list.c \ zend_llist.c \ + zend_mm.c \ zend_multibyte.c \ zend_object_handlers.c \ zend_objects.c \ + zend_objects_API.c \ zend_opcode.c \ zend_operators.c \ zend_ptr_stack.c \ zend_qsort.c \ + zend_reflection_api.c \ zend_sprintf.c \ zend_stack.c \ zend_static_allocator.c \ + zend_stream.c \ zend_ts_hash.c \ zend_variables.c @@ -59,39 +66,43 @@ # Compile flags -C_FLAGS = -c -maxerrors 25 -msgstyle std +C_FLAGS += -c -maxerrors 25 -msgstyle std C_FLAGS += -wchar_t on -bool on C_FLAGS += -processor Pentium C_FLAGS += -nostdinc C_FLAGS += -relax_pointers # To remove type-casting errors C_FLAGS += -D__C9X_CMATH_INLINES_DEFINED C_FLAGS += -DNETWARE -DZTS -C_FLAGS += -DNEW_LIBC -C_FLAGS += -DCLIB_STAT_PATCH C_FLAGS += -DTHREAD_SWITCH # These are required to use dlclose so that the PHP extensions are automatically unloaded # when apache is unloaded -C_FLAGS += -DHAVE_DLFCN_H -DHAVE_LIBDL +C_FLAGS += -DHAVE_DLFCN_H=1 -DHAVE_LIBDL=1 -C_FLAGS += -I. -I- -I../netware -I$(SDK_DIR)/include # ../netware added for special SYS/STAT.H -C_FLAGS += -I$(MWCIncludes) +ifeq '$(APACHE_VER)' '1.3' +C_FLAGS += -DAPACHE_1_BUILD=1 +endif +ifeq '$(APACHE_VER)' '2' +C_FLAGS += -DAPACHE_2_BUILD=1 +endif +C_FLAGS += -I. -I- -I../netware # ../netware added for special SYS/STAT.H +C_FLAGS += -I$(SDK_DIR)/include -I$(MWCIncludes) # Link flags -LD_FLAGS = -type library +LD_FLAGS = -type library LD_FLAGS += -o $(BINARY) # Extra stuff based on debug / release builds ifeq '$(BUILD)' 'debug' - C_FLAGS += -DZEND_DEBUG=1 - C_FLAGS += -inline smart -sym on -sym codeview4 -sym internal -opt off -opt intrinsics + C_FLAGS += -DZEND_DEBUG=1 + C_FLAGS += -inline smart -sym on -sym codeview4 -sym internal -opt off -opt intrinsics LD_FLAGS += -sym codeview4 -sym internal export MWLibraryFiles=$(SDK_DIR)/imports/libcpre.o;mwcrtld.lib else - C_FLAGS += -opt speed -inline on -inline auto -sym off - C_FLAGS += -DZEND_DEBUG=0 + C_FLAGS += -opt all -inline on -inline auto -sym off + C_FLAGS += -DZEND_DEBUG=0 LD_FLAGS += -sym off export MWLibraryFiles=$(SDK_DIR)/imports/libcpre.o;mwcrtl.lib endif Index: netware/buildext.bat =================================================================== RCS file: /repository/php-src/netware/buildext.bat,v retrieving revision 1.1 diff -u -r1.1 buildext.bat --- netware/buildext.bat 12 Jul 2002 13:02:45 -0000 1.1 +++ netware/buildext.bat 26 Feb 2004 10:50:21 -0000 @@ -2,16 +2,28 @@ cd ..\ext\%1 +set MYSQL_VER=%3 + if "%2" == "clean" make -f %1.mak clean if "%2" == "/?" goto USAGE REM Build command make -f %1.mak + +if not "%3" == "" goto RENAME + goto EXIT +:RENAME +cd %BUILD% +ren phpmysql.nlm phpmysql%3.nlm +cd .. +goto EXIT + + :USAGE @echo on - @echo Usage: buildext extension_name [clean] + @echo Usage: buildext extension_name [clean] [mysql_version] @echo clean - delete all object files and binaries before building :EXIT Index: netware/common.mif =================================================================== RCS file: /repository/php-src/netware/common.mif,v retrieving revision 1.4 diff -u -r1.4 common.mif --- netware/common.mif 3 Jan 2003 11:36:24 -0000 1.4 +++ netware/common.mif 26 Feb 2004 10:50:21 -0000 @@ -26,7 +26,7 @@ WINSOCK_DIR = P:/APPS/script/sw/Winsock2 # LDAP stuff -LDAP_DIR = P:/APPS/script/sw/cldapsdk +LDAP_DIR = P:/APPS/script/sw/cldapsdk/netware/libc # XML-EXPAT stuff EXPAT_DIR = P:/APPS/script/sw/expat @@ -67,14 +67,13 @@ endif ifndef COPYRIGHT -COPYRIGHT = "Copyright (C) 2002-2003 Novell\, Inc. All Rights Reserved." +COPYRIGHT = "Copyright (C) 2002-2004 Novell\, Inc. All Rights Reserved." endif # Compile flags ifeq '$(APACHE_VER)' '1.3' C_FLAGS = -align 1 -C_FLAGS += -DCLIB_STAT_PATCH else C_FLAGS = -align 4 endif Index: netware/php-nw.bat =================================================================== RCS file: /repository/php-src/netware/php-nw.bat,v retrieving revision 1.3 diff -u -r1.3 php-nw.bat --- netware/php-nw.bat 3 Jan 2003 11:46:19 -0000 1.3 +++ netware/php-nw.bat 26 Feb 2004 10:50:21 -0000 @@ -7,4 +7,4 @@ set path=%path%;P:\APPS\SCRIPT\SW\GNUWIN32\BIN REM Build options -setbuild r 1 +setbuild r 2 Index: netware/php5apache.mak =================================================================== RCS file: /repository/php-src/netware/php5apache.mak,v retrieving revision 1.1 diff -u -r1.1 php5apache.mak --- netware/php5apache.mak 17 Jan 2004 13:00:00 -0000 1.1 +++ netware/php5apache.mak 26 Feb 2004 10:50:21 -0000 @@ -5,7 +5,7 @@ # Module details MODULE_NAME = mod_php MODULE_DESC = "PHP 5 - Apache 1.3 Module" -VMAJ = 3 +VMAJ = 1 VMIN = 0 VREV = 0 @@ -17,10 +17,10 @@ .SUFFIXES: .nlm .lib .obj .cpp .c .msg .mlc .mdb .xdc .d # Source files -C_SRC = mod_php5.c \ +C_SRC = libpre.c \ + mod_php5.c \ php_apache.c \ sapi_apache.c \ - libpre.c # Destination directories and files OBJ_DIR = $(BUILD) @@ -36,7 +36,7 @@ # Compile flags -C_FLAGS = -c -maxerrors 25 -msgstyle gcc +C_FLAGS += -c -maxerrors 25 -msgstyle gcc C_FLAGS += -wchar_t on -bool on C_FLAGS += -processor Pentium C_FLAGS += -w nounusedarg -msext on @@ -47,27 +47,30 @@ C_FLAGS += -DNLM_PLATFORM C_FLAGS += -DN_PLAT_NLM -DNLM=1 -D__NO_MATH_OPS C_FLAGS += -D__C9X_CMATH_INLINES_DEFINED -DAPACHE_OS_H -DNO_USE_SIGACTION -DMULTITHREAD -C_FLAGS += -DCLIB_STAT_PATCH -C_FLAGS += -DNEW_LIBC -C_FLAGS += -I. -I- -I. -I../../netware -I$(SDK_DIR)/include # ../../netware added for special SYS/STAT.H -C_FLAGS += -I$(MWCIncludes) + +# Required only for the Apache sapi module since this is the only thing +# that interacts with Apache 1.3 Web server that is Clib based +C_FLAGS += -DCLIB_STAT_PATCH=1 + +C_FLAGS += -I. -I- -I../../netware # ../../netware added for special SYS/STAT.H +C_FLAGS += -I$(SDK_DIR)/include -I$(MWCIncludes) C_FLAGS += -I$(APACHE_DIR)/include -I$(APACHE_DIR)/os/netware -C_FLAGS += -I- -I../../main -I../../Zend -I../../TSRM -I../../ext/standard -C_FLAGS += -I../../ -I../../netware -I$(PROJECT_ROOT)/regex +C_FLAGS += -I../../main -I../../Zend -I../../TSRM -I../../ext/standard +C_FLAGS += -I../../ -I$(PROJECT_ROOT)/regex C_FLAGS += -I$(WINSOCK_DIR)/include/nlm -I$(WINSOCK_DIR)/include # Extra stuff based on debug / release builds ifeq '$(BUILD)' 'debug' SYM_FILE = $(FINAL_DIR)\$(MODULE_NAME).sym - C_FLAGS += -inline smart -sym on -sym codeview4 -opt off -opt intrinsics -sym internal -DDEBUGGING -DDKFBPON + C_FLAGS += -inline smart -sym on -sym codeview4 -opt off -opt intrinsics -sym internal -DDEBUGGING -DDKFBPON C_FLAGS += -r -DZEND_DEBUG=1 C_FLAGS += -exc cw LD_FLAGS += -sym on -sym codeview4 -sym internal -osym $(SYM_FILE) - LD_FLAGS += -msgstyle std + LD_FLAGS += -msgstyle std export MWLibraryFiles=$(SDK_DIR)/imports/libcpre.o;mwcrtld.lib else - C_FLAGS += -opt speed -inline on -inline smart -inline auto -sym off -DZEND_DEBUG=0 + C_FLAGS += -opt all -inline on -inline smart -inline auto -sym off -DZEND_DEBUG=0 C_FLAGS += -opt intrinsics C_FLAGS += -opt level=4 LD_FLAGS += -sym off Index: netware/php5apache2filter.mak =================================================================== RCS file: /repository/php-src/netware/php5apache2filter.mak,v retrieving revision 1.1 diff -u -r1.1 php5apache2filter.mak --- netware/php5apache2filter.mak 17 Jan 2004 13:00:00 -0000 1.1 +++ netware/php5apache2filter.mak 26 Feb 2004 10:50:21 -0000 @@ -5,7 +5,7 @@ # Module details MODULE_NAME = mod_php MODULE_DESC = "PHP 5 - Apache 2.0 Module" -VMAJ = 3 +VMAJ = 1 VMIN = 0 VREV = 0 @@ -41,19 +41,20 @@ C_FLAGS += -w nounusedarg -msext on C_FLAGS += -nostdinc C_FLAGS += -relax_pointers # To remove type-casting errors -C_FLAGS += -DNETWARE +C_FLAGS += -DNETWARE -D__GNUC__ C_FLAGS += -DZTS C_FLAGS += -DNLM_PLATFORM C_FLAGS += -DN_PLAT_NLM -DNLM=1 -D__NO_MATH_OPS C_FLAGS += -D__C9X_CMATH_INLINES_DEFINED -DAPACHE_OS_H -DNO_USE_SIGACTION -DMULTITHREAD -C_FLAGS += -DCLIB_STAT_PATCH -C_FLAGS += -DNEW_LIBC -C_FLAGS += -I. -I- -I. -I../../netware -I$(SDK_DIR)/include # ../../netware added for special SYS/STAT.H -C_FLAGS += -I$(SDK_DIR)/include/winsock # For Apache 2.0 headers -C_FLAGS += -I$(MWCIncludes) + +C_FLAGS += -DAPACHE_2_BUILD=1 + +C_FLAGS += -I. -I- -I../../netware # ../../netware added for special SYS/STAT.H +C_FLAGS += -I$(SDK_DIR)/include -I$(MWCIncludes) C_FLAGS += -I$(APACHE_DIR)/include -C_FLAGS += -I- -I../../main -I../../Zend -I../../TSRM -I../../ext/standard +C_FLAGS += -I../../main -I../../Zend -I../../TSRM -I../../ext/standard C_FLAGS += -I../../ -I../../netware -I$(PROJECT_ROOT)/regex +C_FLAGS += -I$(SDK_DIR)/include/winsock # For Apache 2.0 headers C_FLAGS += -I$(WINSOCK_DIR)/include/nlm -I$(WINSOCK_DIR)/include @@ -67,7 +68,7 @@ LD_FLAGS += -msgstyle std export MWLibraryFiles=$(SDK_DIR)/imports/libcpre.o;mwcrtld.lib else - C_FLAGS += -opt speed -inline on -inline smart -inline auto -sym off -DZEND_DEBUG=0 + C_FLAGS += -opt all -inline on -inline smart -inline auto -sym off -DZEND_DEBUG=0 C_FLAGS += -opt intrinsics C_FLAGS += -opt level=4 LD_FLAGS += -sym off @@ -77,7 +78,7 @@ # Dependencies MODULE = LibC \ phplib -IMPORT = @$(SDK_DIR)/imports/libc.imp \ +IMPORT = @$(SDK_DIR)/imports/libc.imp \ @$(APACHE_DIR)/lib/httpd.imp \ @$(APACHE_DIR)/lib/aprlib.imp \ @$(PROJECT_ROOT)/netware/phplib.imp Index: netware/php5cli.mak =================================================================== RCS file: /repository/php-src/netware/php5cli.mak,v retrieving revision 1.1 diff -u -r1.1 php5cli.mak --- netware/php5cli.mak 17 Jan 2004 13:00:00 -0000 1.1 +++ netware/php5cli.mak 26 Feb 2004 10:50:21 -0000 @@ -5,7 +5,7 @@ # Module details MODULE_NAME = php MODULE_DESC = "PHP 5 - Command Line Interface" -VMAJ = 2 +VMAJ = 1 VMIN = 0 VREV = 0 @@ -48,11 +48,11 @@ C_FLAGS += -DNLM_PLATFORM C_FLAGS += -DN_PLAT_NLM -DNLM=1 -D__NO_MATH_OPS C_FLAGS += -D__C9X_CMATH_INLINES_DEFINED -DAPACHE_OS_H -DNO_USE_SIGACTION -DMULTITHREAD -C_FLAGS += -DNEW_LIBC -C_FLAGS += -I. -I- -I. -I../../netware -I$(SDK_DIR)/include # ../../netware added for special SYS/STAT.H -C_FLAGS += -I$(MWCIncludes) -C_FLAGS += -I- -I../../main -I../../Zend -I../../TSRM -I../../ext/standard -C_FLAGS += -I../../ -I../../netware -I$(PROJECT_ROOT)/regex + +C_FLAGS += -I. -I- -I../../netware # ../../netware added for special SYS/STAT.H +C_FLAGS += -I../../main -I../../Zend -I../../TSRM -I../../ext/standard +C_FLAGS += -I../../ -I$(PROJECT_ROOT)/regex +C_FLAGS += -I$(SDK_DIR)/include -I$(MWCIncludes) C_FLAGS += -I$(WINSOCK_DIR)/include/nlm -I$(WINSOCK_DIR)/include # Extra stuff based on debug / release builds @@ -64,7 +64,7 @@ LD_FLAGS += -sym on -sym codeview4 -sym internal -osym $(SYM_FILE) export MWLibraryFiles=$(SDK_DIR)/imports/libcpre.o;mwcrtld.lib else - C_FLAGS += -opt speed -inline on -inline smart -inline auto -sym off -DZEND_DEBUG=0 + C_FLAGS += -opt all -inline on -inline smart -inline auto -sym off -DZEND_DEBUG=0 C_FLAGS += -opt intrinsics C_FLAGS += -opt level=4 LD_FLAGS += -sym off Index: netware/phplib.imp =================================================================== RCS file: /repository/php-src/netware/phplib.imp,v retrieving revision 1.6 diff -u -r1.6 phplib.imp --- netware/phplib.imp 7 Mar 2003 05:15:27 -0000 1.6 +++ netware/phplib.imp 26 Feb 2004 10:50:21 -0000 @@ -11,9 +11,16 @@ _object_init_ex, _php_stream_cast, _php_stream_free, +_php_stream_get_line, _php_stream_open_wrapper_ex, +_safe_emalloc, +_zend_bailout, _zend_get_parameters_array, _zend_get_parameters_array_ex, +_zend_hash_add_or_update, +_zend_hash_index_update_or_next_insert, +_zend_hash_init, +_zend_hash_init_ex, _zend_list_addref, _zend_list_delete, _zend_list_find, @@ -21,27 +28,33 @@ _zval_dtor, _zval_ptr_dtor, add_assoc_bool_ex, +add_assoc_double_ex, add_assoc_long_ex, +add_assoc_null_ex, +add_assoc_string_ex, +add_assoc_stringl_ex, add_assoc_zval_ex, +add_index_bool, add_index_null, add_index_long, -add_index_zval, -add_assoc_string_ex, -add_assoc_stringl_ex, -add_assoc_null_ex, add_index_string, add_index_stringl, +add_index_zval, add_next_index_bool, +add_next_index_double, add_next_index_long, add_next_index_string, add_next_index_stringl, add_next_index_zval, add_property_long_ex, +add_property_resource_ex, add_property_string_ex, call_user_function, +call_user_function_ex, +cfg_get_long, compiler_globals_id, -convert_to_boolean, convert_to_array, +convert_to_boolean, convert_to_double, convert_to_long, core_globals_id, @@ -50,31 +63,35 @@ empty_string, executor_globals_id, expand_filepath, -get_zend_version, get_active_function_name, +get_zend_version, highlight_file, le_index_ptr, module_registry, multi_convert_to_long_ex, +OnUpdateBool, +OnUpdateLong, +OnUpdateString, +OnUpdateStringUnempty, open_file_for_scanning, php_addslashes, +php_body_write, php_check_open_basedir, php_checkuid, -php_execute_script, -php_fopen_primary_script, -php_handle_aborted_connection, -php_handle_special_queries, -php_body_write, php_end_ob_buffers, php_error_docref0, +php_execute_script, +php_fopen_primary_script, php_get_current_user, php_get_highlight_struct, +php_handle_aborted_connection, php_handle_auth_data, +php_handle_special_queries, php_header, php_header_write, php_import_environment_variables, -php_info_print_table_end, php_info_print_table_colspan_header, +php_info_print_table_end, php_info_print_table_header, php_info_print_table_row, php_info_print_table_start, @@ -112,66 +129,83 @@ sapi_free_header, sapi_get_default_content_type, sapi_globals_id, +sapi_module, sapi_shutdown, sapi_startup, second_arg_force_ref, +third_arg_force_ref, ts_allocate_id, +ts_free_thread, ts_resource_ex, tsrm_shutdown, tsrm_startup, virtual_filepath, virtual_fopen, +virtual_open, +virtual_stat, zend_alter_ini_entry, +zend_call_function, zend_error, zend_eval_string, +zend_eval_string_ex, +zend_exception_get_default, zend_execute_scripts, zend_extensions, +zend_fetch_class, zend_fetch_resource, +zend_get_class_entry, +zend_get_parameters, zend_get_parameters_ex, -zend_hash_add_or_update, zend_hash_apply, zend_hash_apply_with_argument, zend_hash_clean, +zend_hash_copy, zend_hash_del_key_or_index, zend_hash_destroy, zend_hash_exists, zend_hash_find, -zend_hash_get_current_key_ex, zend_hash_get_current_data_ex, +zend_hash_get_current_key_ex, zend_hash_index_find, -zend_hash_index_update_or_next_insert, -zend_hash_init, -zend_hash_init_ex, zend_hash_internal_pointer_reset_ex zend_hash_merge_ex, zend_hash_move_forward_ex, zend_hash_num_elements, +zend_hash_sort, zend_highlight, zend_ini_deactivate, zend_ini_boolean_displayer_cb, zend_ini_string, +zend_is_auto_global, +zend_is_callable, zend_list_insert, zend_llist_add_element, zend_llist_apply, zend_llist_apply_with_argument, +zend_llist_copy, zend_llist_destroy, zend_llist_init, +zend_llist_sort, zend_load_extension, +zend_merge_properties, zend_parse_parameters, zend_parse_parameters_ex, zend_printf, +zend_qsort, +zend_register_constant, zend_register_ini_entries, zend_register_internal_class, zend_register_list_destructors_ex, zend_register_long_constant, zend_register_resource, +zend_register_string_constant, zend_startup_module, zend_standard_class_def, +zend_throw_exception, +zend_throw_exception_ex, zend_strip, +zend_strndup, zend_unregister_ini_entries, +zend_uv, zend_wrong_param_count, -zval_add_ref, -OnUpdateBool, -OnUpdateLong, -OnUpdateString, -OnUpdateStringUnempty +zval_add_ref Index: netware/phplib.mak =================================================================== RCS file: /repository/php-src/netware/phplib.mak,v retrieving revision 1.6 diff -u -r1.6 phplib.mak --- netware/phplib.mak 17 Jan 2004 13:00:00 -0000 1.6 +++ netware/phplib.mak 26 Feb 2004 10:50:22 -0000 @@ -5,7 +5,7 @@ # Module details MODULE_NAME = phplib MODULE_DESC = "PHP 5 - Script Interpreter and Library" -VMAJ = 3 +VMAJ = 1 VMIN = 0 VREV = 0 @@ -52,12 +52,12 @@ ext/calendar/julian.c \ ext/ftp/ftp.c \ ext/ftp/php_ftp.c \ - ext/mcal/php_mcal.c \ ext/pcre/php_pcre.c \ ext/pcre/pcrelib/chartables.c \ ext/pcre/pcrelib/get.c \ ext/pcre/pcrelib/maketables.c \ ext/pcre/pcrelib/pcre.c \ + ext/pcre/pcrelib/pcregrep.c \ ext/pcre/pcrelib/pcreposix.c \ ext/pcre/pcrelib/study.c \ ext/session/mod_files.c \ @@ -65,7 +65,6 @@ ext/session/mod_user.c \ ext/session/session.c \ ext/snmp/snmp.c \ - ext/standard/aggregation.c \ ext/standard/array.c \ ext/standard/assert.c \ ext/standard/base64.c \ @@ -90,6 +89,7 @@ ext/standard/ftp_fopen_wrapper.c \ ext/standard/head.c \ ext/standard/html.c \ + ext/standard/http.c \ ext/standard/http_fopen_wrapper.c \ ext/standard/image.c \ ext/standard/incomplete_class.c \ @@ -107,27 +107,31 @@ ext/standard/pageinfo.c \ ext/standard/parsedate.c \ ext/standard/php_fopen_wrapper.c \ + ext/standard/proc_open.c \ ext/standard/quot_print.c \ ext/standard/rand.c \ ext/standard/reg.c \ ext/standard/scanf.c \ ext/standard/sha1.c \ ext/standard/soundex.c \ + ext/standard/streamsfuncs.c \ ext/standard/string.c \ ext/standard/strnatcmp.c \ + ext/standard/sunfuncs.c \ + ext/standard/syslog.c \ ext/standard/type.c \ ext/standard/uniqid.c \ ext/standard/url.c \ ext/standard/url_scanner.c \ ext/standard/url_scanner_ex.c \ ext/standard/user_filters.c \ + ext/standard/uuencode.c \ ext/standard/var.c \ ext/standard/var_unserializer.c \ ext/standard/versioning.c \ main/fopen_wrappers.c \ main/internal_functions_nw.c \ main/main.c \ - main/memory_streams.c \ main/mergesort.c \ main/network.c \ main/output.c \ @@ -135,6 +139,7 @@ main/php_ini.c \ main/php_logos.c \ main/php_open_temporary_file.c \ + main/php_scandir.c \ main/php_sprintf.c \ main/php_ticks.c \ main/php_variables.c \ @@ -144,10 +149,17 @@ main/SAPI.c \ main/snprintf.c \ main/spprintf.c \ - main/streams.c \ main/strlcat.c \ main/strlcpy.c \ - main/user_streams.c \ + main/streams/cast.c \ + main/streams/filter.c \ + main/streams/memory.c \ + main/streams/mmap.c \ + main/streams/plain_wrapper.c \ + main/streams/streams.c \ + main/streams/transports.c \ + main/streams/userspace.c \ + main/streams/xp_socket.c \ netware/geterrnoptr.c \ netware/mktemp.c \ netware/pipe.c \ @@ -159,16 +171,13 @@ regex/regerror.c \ regex/regexec.c \ regex/regfree.c \ -# ext/standard/crypt.c \ # ext/com/COM.c \ # ext/com/conversion.c \ # ext/odbc/php_odbc.c \ # ext/snmp/winsnmp.c \ -# netware/winutil.c \ -# netware/registry.c \ -# main/alloca.c \ +# ext/standard/crypt.c \ # ext/wddx/wddx.c \ -# netware/readdir.c \ +# main/alloca.c \ WIN32_C_SRC = sendmail.c \ @@ -199,36 +208,47 @@ C_FLAGS += -relax_pointers # To remove type-casting errors C_FLAGS += -processor Pentium C_FLAGS += -nostdinc -nosyspath -C_FLAGS += -DNETWARE -D__BIT_TYPES_DEFINED__ -DZTS -C_FLAGS += -DPHP5DLLTS_EXPORTS -DPHP_EXPORTS -DLIBZEND_EXPORTS -DTSRM_EXPORTS -DSAPI_EXPORTS -C_FLAGS += -DHAVE_SYS_TIME_H -DHAVE_STRUCT_FLOCK -DVIRTUAL_DIR -DHAVE_TZNAME -C_FLAGS += -DHAVE_DLFCN_H -DHAVE_LIBDL -C_FLAGS += -DCLIB_STAT_PATCH # stat patch -C_FLAGS += -DNEW_LIBC -DHAVE_ARPA_INET_H=1 -DHAVE_NETINET_IN_H=1 -DHAVE_INET_ATON=1 +C_FLAGS += -DNETWARE -D__BIT_TYPES_DEFINED__ -DZTS +C_FLAGS += -DPHP5DLLTS_EXPORTS -DPHP_EXPORTS -DLIBZEND_EXPORTS -DTSRM_EXPORTS -DSAPI_EXPORTS +C_FLAGS += -DHAVE_SYS_TIME_H=1 -DHAVE_STRUCT_FLOCK=1 -DVIRTUAL_DIR=1 -DHAVE_TZNAME=1 +C_FLAGS += -DHAVE_ARPA_INET_H=1 -DHAVE_NETINET_IN_H=1 -DHAVE_INET_ATON=1 + +# These are required to use dlclose so that the PHP extensions are automatically unloaded +# when apache is unloaded +C_FLAGS += -DHAVE_DLFCN_H=1 -DHAVE_LIBDL=1 + +C_FLAGS += -DLINK_SIZE=2 # Added for the new definition in ext\pcre\pcrelib\internal.h -C_FLAGS += -DLINK_SIZE=2 # Added for the new definition in ext\pcre\pcrelib\internal.h # Below added for the file ext\pcre\pcrelib\pcreposix.c and # the default value is what is defined in the changelog file -C_FLAGS += -DPOSIX_MALLOC_THRESHOLD=5 +C_FLAGS += -DPOSIX_MALLOC_THRESHOLD=5 + +ifeq '$(APACHE_VER)' '1.3' +C_FLAGS += -DAPACHE_1_BUILD=1 +endif +ifeq '$(APACHE_VER)' '2' +C_FLAGS += -DAPACHE_2_BUILD=1 +endif -C_FLAGS += -I. -Imain -Inetware -Iregex -IZend -ITSRM -C_FLAGS += -Iext/standard -Iext/mcal -Iext/pcre -Iext/pcre/pcrelib -C_FLAGS += -Iext/bcmath -Iext/bcmath/libbcmath/src -C_FLAGS += -Iext/odbc -Iext/session -Iext/ftp -Iext/wddx -Iext/calendar -Iext/snmp -C_FLAGS += -I- -Inetware -I$(SDK_DIR)/include -I$(MWCIncludes) # netware added for special SYS/STAT.H : Venkat(6/2/02) -C_FLAGS += -Iwin32 -C_FLAGS += -I$(SDK_DIR)/include/winsock # Added for socket calls +C_FLAGS += -I. -ir main -Imain -Inetware -Iregex -IZend -ITSRM +C_FLAGS += -Iext/standard -Iext/pcre -Iext/pcre/pcrelib +C_FLAGS += -Iext/bcmath -Iext/bcmath/libbcmath/src +C_FLAGS += -Iext/odbc -Iext/session -Iext/ftp -Iext/wddx -Iext/calendar -Iext/snmp +C_FLAGS += -I- -Inetware # netware added for special SYS/STAT.H +C_FLAGS += -I$(SDK_DIR)/include -I$(MWCIncludes) +C_FLAGS += -I$(SDK_DIR)/include/winsock # Added for socket calls +C_FLAGS += -Iwin32 # Extra stuff based on debug / release builds ifeq '$(BUILD)' 'debug' SYM_FILE = $(FINAL_DIR)\$(MODULE_NAME).sym - C_FLAGS += -inline smart -sym on -sym codeview4 -sym internal -opt off -opt intrinsics + C_FLAGS += -inline smart -sym on -sym codeview4 -sym internal -opt off -opt intrinsics C_FLAGS += -D_DEBUG -DZEND_DEBUG=1 LD_FLAGS += -sym codeview4 -sym internal -osym $(SYM_FILE) export MWLibraryFiles=$(SDK_DIR)/imports/libcpre.o;mwcrtl.lib else - C_FLAGS += -opt speed -inline on -inline auto -sym off -DZEND_DEBUG=0 + C_FLAGS += -opt all -inline on -inline auto -sym off -DZEND_DEBUG=0 LD_FLAGS += -sym off export MWLibraryFiles=$(SDK_DIR)/imports/libcpre.o;mwcrtl.lib endif @@ -262,7 +282,6 @@ @if not exist ext\standard\$(OBJ_DIR) md ext\standard\$(OBJ_DIR) @if not exist ext\bcmath\$(OBJ_DIR) md ext\bcmath\$(OBJ_DIR) @if not exist ext\bcmath\libbcmath\src\$(OBJ_DIR) md ext\bcmath\libbcmath\src\$(OBJ_DIR) - @if not exist ext\mcal\$(OBJ_DIR) md ext\mcal\$(OBJ_DIR) @if not exist ext\pcre\$(OBJ_DIR) md ext\pcre\$(OBJ_DIR) @if not exist ext\pcre\pcrelib\$(OBJ_DIR) md ext\pcre\pcrelib\$(OBJ_DIR) @if not exist ext\odbc\$(OBJ_DIR) md ext\odbc\$(OBJ_DIR) @@ -271,6 +290,7 @@ @if not exist ext\wddx\$(OBJ_DIR) md ext\wddx\$(OBJ_DIR) @if not exist ext\calendar\$(OBJ_DIR) md ext\calendar\$(OBJ_DIR) @if not exist ext\snmp\$(OBJ_DIR) md ext\snmp\$(OBJ_DIR) + @if not exist main\streams\$(OBJ_DIR) md main\streams\$(OBJ_DIR) @if not exist $(FINAL_DIR) md $(FINAL_DIR) project: $(BINARY) $(MESSAGE) @@ -336,7 +356,9 @@ @echo $(wordlist 126, 130, $(OBJECTS)) >> $(basename $@).link @echo $(wordlist 131, 135, $(OBJECTS)) >> $(basename $@).link @echo $(wordlist 136, 140, $(OBJECTS)) >> $(basename $@).link - @echo $(wordlist 141, 141, $(OBJECTS)) >> $(basename $@).link + @echo $(wordlist 141, 145, $(OBJECTS)) >> $(basename $@).link + @echo $(wordlist 146, 150, $(OBJECTS)) >> $(basename $@).link + @echo $(wordlist 151, 155, $(OBJECTS)) >> $(basename $@).link @echo $(wordlist 1, 2, $(WIN32_OBJECTS)) >> $(basename $@).link @@ -355,7 +377,6 @@ -@del "ext\standard\$(OBJ_DIR)\*.d" -@del "ext\bcmath\$(OBJ_DIR)\*.d" -@del "ext\bcmath\libbcmath\src\$(OBJ_DIR)\*.d" - -@del "ext\mcal\$(OBJ_DIR)\*.d" -@del "ext\pcre\$(OBJ_DIR)\*.d" -@del "ext\pcre\pcrelib\$(OBJ_DIR)\*.d" -@del "ext\odbc\$(OBJ_DIR)\*.d" @@ -381,7 +402,6 @@ -@del "ext\standard\$(OBJ_DIR)\*.obj" -@del "ext\bcmath\$(OBJ_DIR)\*.obj" -@del "ext\bcmath\libbcmath\src\$(OBJ_DIR)\*.obj" - -@del "ext\mcal\$(OBJ_DIR)\*.obj" -@del "ext\pcre\$(OBJ_DIR)\*.obj" -@del "ext\pcre\pcrelib\$(OBJ_DIR)\*.obj" -@del "ext\odbc\$(OBJ_DIR)\*.obj" Index: netware/pwd.h =================================================================== RCS file: /repository/php-src/netware/pwd.h,v retrieving revision 1.2 diff -u -r1.2 pwd.h --- netware/pwd.h 3 Jan 2003 11:46:20 -0000 1.2 +++ netware/pwd.h 26 Feb 2004 10:50:22 -0000 @@ -47,8 +47,4 @@ extern struct passwd *getpwnam(char *name); extern char *getlogin(void); -#ifndef NEW_LIBC -int getpid(); -#endif - #endif Index: netware/sendmail_nw.h =================================================================== RCS file: /repository/php-src/netware/sendmail_nw.h,v retrieving revision 1.1 diff -u -r1.1 sendmail_nw.h --- netware/sendmail_nw.h 3 Jan 2003 11:12:40 -0000 1.1 +++ netware/sendmail_nw.h 26 Feb 2004 10:50:22 -0000 @@ -1,12 +1,10 @@ #ifdef USE_WINSOCK -/*#include <ws2nlm.h>*/ #include <novsock2.h> #else #include <sys/socket.h> /* For struct sockaddr, 'PF_INET' and 'AF_INET' */ #include <netinet\in.h> /* For struct sockaddr_in */ #include <netdb.h> /* For struct hostent */ -/*#include <ws2name.h>*/ #endif /* USE_WINSOCK */ typedef int SOCKET; /* Borrowed from winsock\novsock2.h */ Index: netware/time_nw.h =================================================================== RCS file: /repository/php-src/netware/time_nw.h,v retrieving revision 1.2 diff -u -r1.2 time_nw.h --- netware/time_nw.h 3 Jan 2003 11:46:20 -0000 1.2 +++ netware/time_nw.h 26 Feb 2004 10:50:22 -0000 @@ -14,7 +14,6 @@ /* Include stuff ************************************************************ */ #ifdef USE_WINSOCK -/*#include <ws2nlm.h>*/ #include <novsock2.h> #else #include <sys/socket.h> Index: netware/tsrm.mak =================================================================== RCS file: /repository/php-src/netware/tsrm.mak,v retrieving revision 1.3 diff -u -r1.3 tsrm.mak --- netware/tsrm.mak 3 Jan 2003 11:46:20 -0000 1.3 +++ netware/tsrm.mak 26 Feb 2004 10:50:22 -0000 @@ -31,19 +31,23 @@ endif # Compile flags -C_FLAGS = -c -maxerrors 25 -msgstyle gcc +C_FLAGS += -c -maxerrors 25 -msgstyle gcc C_FLAGS += -wchar_t on -bool on C_FLAGS += -processor Pentium C_FLAGS += -nostdinc C_FLAGS += -relax_pointers # To remove type-casting errors -C_FLAGS += -DZTS -DNETWARE -DHAVE_DIRENT_H=1 -C_FLAGS += -DNEW_LIBC -C_FLAGS += -DUSE_MKFIFO -C_FLAGS += -DCLIB_STAT_PATCH -#C_FLAGS += -DUSE_MPK # To use the LibC recursive mutex locking -C_FLAGS += -I. -I- -I../netware -I$(SDK_DIR)/include # ../netware added for special SYS/STAT.H -C_FLAGS += -I$(MPK_DIR)/include1 -C_FLAGS += -I$(MWCIncludes) +C_FLAGS += -DZTS -DNETWARE -DHAVE_DIRENT_H=1 +C_FLAGS += -DUSE_MKFIFO +C_FLAGS += -DVIRTUAL_DIR=1 + +ifeq '$(APACHE_VER)' '2' +C_FLAGS += -DPTHREADS +C_FLAGS += -DAPACHE_2_BUILD=1 +endif + +C_FLAGS += -I. -I- -I../netware # ../netware added for special SYS/STAT.H +C_FLAGS += -I$(SDK_DIR)/include -I$(MPK_DIR)/include1 +C_FLAGS += -I$(MWCIncludes) # Link flags @@ -56,7 +60,7 @@ LD_FLAGS += -sym codeview4 -sym internal export MWLibraryFiles=$(SDK_DIR)/imports/libcpre.o;mwcrtld.lib else - C_FLAGS += -opt speed -inline smart -inline auto -sym off -DTSRM_DEBUG=0 + C_FLAGS += -opt all -inline smart -inline auto -sym off -DTSRM_DEBUG=0 LD_FLAGS += -sym off export MWLibraryFiles=$(SDK_DIR)/imports/libcpre.o;mwcrtl.lib endif @@ -89,7 +93,6 @@ @echo Linking $@... @$(LINK) $(LD_FLAGS) $(OBJECTS) - .PHONY: clean clean: cleanobj cleanbin Index: netware/zend.mak =================================================================== RCS file: /repository/php-src/netware/zend.mak,v retrieving revision 1.3 diff -u -r1.3 zend.mak --- netware/zend.mak 3 Jan 2003 11:46:20 -0000 1.3 +++ netware/zend.mak 26 Feb 2004 10:50:22 -0000 @@ -18,6 +18,7 @@ zend_builtin_functions.c \ zend_compile.c \ zend_constants.c \ + zend_default_classes.c \ zend_dynamic_array.c \ zend_execute.c \ zend_execute_API.c \ @@ -28,18 +29,27 @@ zend_ini.c \ zend_ini_parser.c \ zend_ini_scanner.c \ + zend_interfaces.c \ + zend_iterators.c \ zend_language_parser.c \ zend_language_scanner.c \ zend_list.c \ zend_llist.c \ + zend_mm.c \ zend_multibyte.c \ + zend_object_handlers.c \ + zend_objects.c \ + zend_objects_API.c \ zend_opcode.c \ zend_operators.c \ zend_ptr_stack.c \ zend_qsort.c \ + zend_reflection_api.c \ zend_sprintf.c \ zend_stack.c \ zend_static_allocator.c \ + zend_stream.c \ + zend_ts_hash.c \ zend_variables.c @@ -56,39 +66,43 @@ # Compile flags -C_FLAGS = -c -maxerrors 25 -msgstyle std +C_FLAGS += -c -maxerrors 25 -msgstyle std C_FLAGS += -wchar_t on -bool on C_FLAGS += -processor Pentium C_FLAGS += -nostdinc C_FLAGS += -relax_pointers # To remove type-casting errors C_FLAGS += -D__C9X_CMATH_INLINES_DEFINED C_FLAGS += -DNETWARE -DZTS -C_FLAGS += -DNEW_LIBC -C_FLAGS += -DCLIB_STAT_PATCH C_FLAGS += -DTHREAD_SWITCH # These are required to use dlclose so that the PHP extensions are automatically unloaded # when apache is unloaded -C_FLAGS += -DHAVE_DLFCN_H -DHAVE_LIBDL +C_FLAGS += -DHAVE_DLFCN_H=1 -DHAVE_LIBDL=1 -C_FLAGS += -I. -I- -I../netware -I$(SDK_DIR)/include # ../netware added for special SYS/STAT.H -C_FLAGS += -I$(MWCIncludes) +ifeq '$(APACHE_VER)' '1.3' +C_FLAGS += -DAPACHE_1_BUILD=1 +endif +ifeq '$(APACHE_VER)' '2' +C_FLAGS += -DAPACHE_2_BUILD=1 +endif +C_FLAGS += -I. -I- -I../netware # ../netware added for special SYS/STAT.H +C_FLAGS += -I$(SDK_DIR)/include -I$(MWCIncludes) # Link flags -LD_FLAGS = -type library +LD_FLAGS = -type library LD_FLAGS += -o $(BINARY) # Extra stuff based on debug / release builds ifeq '$(BUILD)' 'debug' - C_FLAGS += -DZEND_DEBUG=1 - C_FLAGS += -inline smart -sym on -sym codeview4 -sym internal -opt off -opt intrinsics + C_FLAGS += -DZEND_DEBUG=1 + C_FLAGS += -inline smart -sym on -sym codeview4 -sym internal -opt off -opt intrinsics LD_FLAGS += -sym codeview4 -sym internal export MWLibraryFiles=$(SDK_DIR)/imports/libcpre.o;mwcrtld.lib else - C_FLAGS += -opt speed -inline on -inline auto -sym off - C_FLAGS += -DZEND_DEBUG=0 + C_FLAGS += -opt all -inline on -inline auto -sym off + C_FLAGS += -DZEND_DEBUG=0 LD_FLAGS += -sym off export MWLibraryFiles=$(SDK_DIR)/imports/libcpre.o;mwcrtl.lib endif @@ -155,4 +169,3 @@ cleanbin: @echo Deleting binary files... -@del "$(FINAL_DIR)\$(MODULE_NAME).lib" - Index: netware/sys/stat.h =================================================================== RCS file: /repository/php-src/netware/sys/stat.h,v retrieving revision 1.6 diff -u -r1.6 stat.h --- netware/sys/stat.h 8 Jan 2004 17:33:07 -0000 1.6 +++ netware/sys/stat.h 26 Feb 2004 10:50:22 -0000 @@ -29,40 +29,8 @@ #include <pshpack1.h> -#ifdef CLIB_STAT_PATCH - -/***************** stat structure taken from CLib and modified ***************/ -struct stat -{ - long st_dev; /* volume number */ /* dev_t replaced by long */ - MACHINE_WORD st_ino; /* directory entry number of the st_name */ /* ino_t replaced by MACHINE_WORD */ - unsigned short st_mode; /* emulated file mode */ - unsigned short st_pad1; /* reserved for alignment */ - unsigned long st_nlink; /* count of hard links (always 1) */ - unsigned long st_uid; /* object id of owner */ - unsigned long st_gid; /* group-id (always 0) */ - long st_rdev; /* device type (always 0) */ /* dev_t replaced by long */ - off_t st_size; /* total file size--files only */ - time_t st_atime; /* last access date--files only */ - time_t st_mtime; /* last modify date and time */ - time_t st_ctime; /* POSIX: last status change time... */ - /* ...NetWare: creation date/time */ - time_t st_btime; /* last archived date and time */ - unsigned long st_attr; /* file attributes */ - unsigned long st_archivedID; /* user/object ID of last archive */ - unsigned long st_updatedID; /* user/object ID of last update */ - unsigned short st_inheritedRightsMask; /* inherited rights mask */ - unsigned short st_pad2; /* reserved for alignment */ - unsigned int st_originatingNameSpace; /* namespace of creation */ - size_t st_blksize; /* block size for allocation--files only */ - size_t st_blocks; /* count of blocks allocated to file */ - unsigned int st_flags; /* user-defined flags */ - unsigned long st_spare[4]; /* for future use */ - unsigned char st_name[255+1];/* TARGET_NAMESPACE name */ -}; -/***************** stat structure taken from CLib and modified ***************/ - -struct stat_libc +#ifndef CLIB_STAT_PATCH +struct stat { uint32_t st_userspec; /* untouched by stat() */ uint32_t st_flags; /* flags for this entry */ @@ -88,36 +56,37 @@ timespec_t st_btime; /* last archived date and time */ uint64_t st_spare4[44]; }; /* sizeof(struct dirent) == 0x200 (512.) */ - #else /* CLIB_STAT_PATCH */ - +/***************** stat structure taken from CLib ***************/ struct stat { - uint32_t st_userspec; /* untouched by stat() */ - uint32_t st_flags; /* flags for this entry */ - mode_t st_mode; /* emulated file mode */ - uint32_t st_spare1; - uint64_t st_gen; /* generation number of inode */ - ino_t st_ino; /* directory entry number */ - dev_t st_dev; /* volume number */ - dev_t st_rdev; /* device type (always 0) */ - off64_t st_size; /* total file size */ - uint64_t st_spare2; - blkcnt_t st_blocks; /* count of blocks allocated to file */ - blksize_t st_blksize; /* block size for allocation--files only */ - nlink_t st_nlink; /* count of hard links (always 1) */ - uint32_t st_spare3[3]; - uid_t st_uid; /* owner (object) identity */ - gid_t st_gid; /* group-id (always 0) */ - uid_t st_bid; /* identity of last archiver */ - uid_t st_mid; /* identity of last updator */ - timespec_t st_atime; /* last access date--files only */ - timespec_t st_mtime; /* last modify date and time */ - timespec_t st_ctime; /* last file attributes modification */ - timespec_t st_btime; /* last archived date and time */ - uint64_t st_spare4[44]; -}; /* sizeof(struct dirent) == 0x200 (512.) */ - + long st_dev; /* volume number */ /* dev_t replaced by long */ + MACHINE_WORD st_ino; /* directory entry number of the st_name */ /* ino_t replaced by MACHINE_WORD */ + unsigned short st_mode; /* emulated file mode */ + unsigned short st_pad1; /* reserved for alignment */ + unsigned long st_nlink; /* count of hard links (always 1) */ + unsigned long st_uid; /* object id of owner */ + unsigned long st_gid; /* group-id (always 0) */ + long st_rdev; /* device type (always 0) */ /* dev_t replaced by long */ + off_t st_size; /* total file size--files only */ + time_t st_atime; /* last access date--files only */ + time_t st_mtime; /* last modify date and time */ + time_t st_ctime; /* POSIX: last status change time... */ + /* ...NetWare: creation date/time */ + time_t st_btime; /* last archived date and time */ + unsigned long st_attr; /* file attributes */ + unsigned long st_archivedID; /* user/object ID of last archive */ + unsigned long st_updatedID; /* user/object ID of last update */ + unsigned short st_inheritedRightsMask; /* inherited rights mask */ + unsigned short st_pad2; /* reserved for alignment */ + unsigned int st_originatingNameSpace; /* namespace of creation */ + size_t st_blksize; /* block size for allocation--files only */ + size_t st_blocks; /* count of blocks allocated to file */ + unsigned int st_flags; /* user-defined flags */ + unsigned long st_spare[4]; /* for future use */ + unsigned char st_name[255+1];/* TARGET_NAMESPACE name */ +}; +/***************** stat structure taken from CLib ***************/ #endif /* CLIB_STAT_PATCH */ Index: sapi/apache/mod_php5.c =================================================================== RCS file: /repository/php-src/sapi/apache/mod_php5.c,v retrieving revision 1.7 diff -u -r1.7 mod_php5.c --- sapi/apache/mod_php5.c 8 Jan 2004 08:18:03 -0000 1.7 +++ sapi/apache/mod_php5.c 26 Feb 2004 10:50:24 -0000 @@ -825,21 +825,45 @@ static int php_xbithack_handler(request_rec * r) { HashTable *per_dir_conf; +#ifndef NETWARE + /* Anantha Kesari 21 Jan 2004 + * Further comments given below. + */ TSRMLS_FETCH(); +#endif if (!(r->finfo.st_mode & S_IXUSR)) { r->allowed |= (1 << METHODS) - 1; return DECLINED; } - per_dir_conf = (HashTable *) get_module_config(r->per_dir_config, &php5_module); - if (per_dir_conf) { - zend_hash_apply((HashTable *) per_dir_conf, (apply_func_t) php_apache_alter_ini_entries TSRMLS_CC); - } - if(!AP(xbithack)) { - r->allowed |= (1 << METHODS) - 1; - return DECLINED; +#ifdef NETWARE + /* Anantha Kesari 21 Jan 2004 + * + * TSRMLS_FETCH() allocates memory. + * What was happening here is that even for HTML pages, + * TSRMLS_FETCH() was being called and it allocated memory. + * But for HTML pages, request is not served and this memory + * is not freed since it returns DECLINED before it comes + * to this stage. So, there was a memory leak even for + * HTML pages execution with PHP enabled. By putting TSRMLS_FETCH() + * below, this memory leak is avoided since this stage + * is reached only if it is a PHP script and not just a HTML page. + */ + { + TSRMLS_FETCH(); +#endif + per_dir_conf = (HashTable *) get_module_config(r->per_dir_config, &php5_module); + if (per_dir_conf) { + zend_hash_apply((HashTable *) per_dir_conf, (apply_func_t) php_apache_alter_ini_entries TSRMLS_CC); + } + if(!AP(xbithack)) { + r->allowed |= (1 << METHODS) - 1; + return DECLINED; + } + return send_parsed_php(r); +#ifdef NETWARE } - return send_parsed_php(r); +#endif } /* }}} */ Index: sapi/apache/php_apache.c =================================================================== RCS file: /repository/php-src/sapi/apache/php_apache.c,v retrieving revision 1.86 diff -u -r1.86 php_apache.c --- sapi/apache/php_apache.c 8 Jan 2004 08:18:03 -0000 1.86 +++ sapi/apache/php_apache.c 26 Feb 2004 10:50:24 -0000 @@ -217,10 +217,9 @@ sprintf(output_buf, "Connection: %d - Keep-Alive: %d", serv->timeout, serv->keep_alive_timeout); php_info_print_table_row(2, "Timeouts", output_buf); #if !defined(WIN32) && !defined(WINNT) -/* - This block seems to be working on NetWare; But it seems to be showing - all modules instead of just the loaded ones -*/ + /* This block seems to be working on NetWare; But it seems to be showing + * all modules instead of just the loaded ones. + */ php_info_print_table_row(2, "Server Root", server_root); strcpy(modulenames, ""); Index: sapi/apache/php_apache_http.h =================================================================== RCS file: /repository/php-src/sapi/apache/php_apache_http.h,v retrieving revision 1.12 diff -u -r1.12 php_apache_http.h --- sapi/apache/php_apache_http.h 8 Jan 2004 17:33:15 -0000 1.12 +++ sapi/apache/php_apache_http.h 26 Feb 2004 10:50:25 -0000 @@ -27,6 +27,7 @@ #endif #ifdef NETWARE +/* Works fine for both Winsock and Berkeley sockets */ #include <netinet/in.h> #endif Index: sapi/apache2filter/php_apache.h =================================================================== RCS file: /repository/php-src/sapi/apache2filter/php_apache.h,v retrieving revision 1.23 diff -u -r1.23 php_apache.h --- sapi/apache2filter/php_apache.h 8 Jan 2004 17:33:17 -0000 1.23 +++ sapi/apache2filter/php_apache.h 26 Feb 2004 10:50:25 -0000 @@ -41,11 +41,7 @@ /* Index for reading from buffer */ int post_idx; /* stat structure of the current file */ -#if defined(NETWARE) && defined(CLIB_STAT_PATCH) - struct stat_libc finfo; -#else struct stat finfo; -#endif /* Buffer for request body filter */ char *post_data; /* Whether or not we've processed PHP in the output filters yet. */ Index: sapi/apache2filter/sapi_apache2.c =================================================================== RCS file: /repository/php-src/sapi/apache2filter/sapi_apache2.c,v retrieving revision 1.121 diff -u -r1.121 sapi_apache2.c --- sapi/apache2filter/sapi_apache2.c 8 Jan 2004 08:18:04 -0000 1.121 +++ sapi/apache2filter/sapi_apache2.c 26 Feb 2004 10:50:25 -0000 @@ -31,10 +31,10 @@ #include "SAPI.h" #include "ext/standard/php_smart_str.h" -#ifndef NETWARE -#include "ext/standard/php_standard.h" -#else +#ifdef NETWARE #include "ext/standard/basic_functions.h" +#else +#include "ext/standard/php_standard.h" #endif #include "apr_strings.h" @@ -172,7 +172,7 @@ ctx->finfo.st_uid = ctx->r->finfo.user; ctx->finfo.st_gid = ctx->r->finfo.group; ctx->finfo.st_ino = ctx->r->finfo.inode; -#if defined(NETWARE) && defined(CLIB_STAT_PATCH) +#ifdef NETWARE ctx->finfo.st_atime.tv_sec = ctx->r->finfo.atime/1000000; ctx->finfo.st_mtime.tv_sec = ctx->r->finfo.mtime/1000000; ctx->finfo.st_ctime.tv_sec = ctx->r->finfo.ctime/1000000; @@ -595,8 +595,12 @@ apache2_sapi_module.php_ini_path_override = apache2_php_ini_path_override; } #ifdef ZTS +#ifdef NETWARE + tsrm_startup(250, 1, 0, NULL); /* 250 threads */ +#else tsrm_startup(1, 1, 0, NULL); #endif +#endif sapi_startup(&apache2_sapi_module); apache2_sapi_module.startup(&apache2_sapi_module); apr_pool_cleanup_register(pconf, NULL, php_apache_server_shutdown, apr_pool_cleanup_null); @@ -628,27 +632,65 @@ } } +static apr_status_t php_server_context_cleanup(void *data_) +{ + void **data = data_; + *data = NULL; + return APR_SUCCESS; +} + static void php_insert_filter(request_rec *r) { int content_type_len = strlen("application/x-httpd-php"); if (r->content_type && !strncmp(r->content_type, "application/x-httpd-php", content_type_len-1)) { if (r->content_type[content_type_len] == '\0' || !strncmp(r->content_type+content_type_len, "-source", sizeof("-source"))) { +#if defined(NETWARE) && defined(ZTS) + /* Srivathsa / Anantha Kesari 5 Dec 2003 + * Do this only for PHP scripts and not for others. + * For non-PHP pages, this loop will not be entered. + * For more details, see the comments in php_post_read_request function. + */ + + php_struct *ctx; + TSRMLS_FETCH(); + + /* Initialize filter context */ + SG(server_context) = ctx = apr_pcalloc(r->pool, sizeof(*ctx)); + + /* register a cleanup so we clear out the SG(server_context) + * after each request. Note: We pass in the pointer to the + * server_context in case this is handled by a different thread. */ + apr_pool_cleanup_register(r->pool, (void *)&SG(server_context), + php_server_context_cleanup, + apr_pool_cleanup_null); + + /* Save the entire request, so we can get the input or output + * filters if we need them. */ + ctx->r = r; +#endif + php_add_filter(r, r->output_filters); php_add_filter(r, r->input_filters); } } } -static apr_status_t php_server_context_cleanup(void *data_) -{ - void **data = data_; - *data = NULL; - return APR_SUCCESS; -} - static int php_post_read_request(request_rec *r) { +#ifndef NETWARE + /* Srivathsa / Anantha Kesari 5 Dec 2003 + * The below code was being executed even when only the html page + * was requested. When compiled with ZTS option, PHP is designed NOT + * to free memory but keep it, so that next requests can reuse them. + * This is done for improving performance. Now even for html pages, + * memory was being allocated through TSRMLS_FETCH() call below + * and this was not freed since PHP for NetWare is compiled with ZTS option. + * This would cause memory leak even for non-PHP pages. + * So, we have commented this portion and put this portion into + * php_insert_filter function where PHP scripts are invoked. + */ + php_struct *ctx; TSRMLS_FETCH(); @@ -665,6 +707,7 @@ /* Save the entire request, so we can get the input or output * filters if we need them. */ ctx->r = r; +#endif return OK; } Index: sapi/apache2handler/php_apache.h =================================================================== RCS file: /repository/php-src/sapi/apache2handler/php_apache.h,v retrieving revision 1.7 diff -u -r1.7 php_apache.h --- sapi/apache2handler/php_apache.h 8 Jan 2004 17:33:18 -0000 1.7 +++ sapi/apache2handler/php_apache.h 26 Feb 2004 10:50:26 -0000 @@ -37,11 +37,7 @@ request_rec *r; apr_bucket_brigade *brigade; /* stat structure of the current file */ -#if defined(NETWARE) && defined(CLIB_STAT_PATCH) - struct stat_libc finfo; -#else struct stat finfo; -#endif /* Whether or not we've processed PHP in the output filters yet. */ int request_processed; } php_struct; Index: sapi/apache2handler/sapi_apache2.c =================================================================== RCS file: /repository/php-src/sapi/apache2handler/sapi_apache2.c,v retrieving revision 1.32 diff -u -r1.32 sapi_apache2.c --- sapi/apache2handler/sapi_apache2.c 8 Jan 2004 08:18:05 -0000 1.32 +++ sapi/apache2handler/sapi_apache2.c 26 Feb 2004 10:50:26 -0000 @@ -31,10 +31,10 @@ #include <fcntl.h> #include "ext/standard/php_smart_str.h" -#ifndef NETWARE -#include "ext/standard/php_standard.h" -#else +#ifdef NETWARE #include "ext/standard/basic_functions.h" +#else +#include "ext/standard/php_standard.h" #endif #include "apr_strings.h" @@ -182,7 +182,7 @@ ctx->finfo.st_uid = ctx->r->finfo.user; ctx->finfo.st_gid = ctx->r->finfo.group; ctx->finfo.st_ino = ctx->r->finfo.inode; -#if defined(NETWARE) && defined(CLIB_STAT_PATCH) +#ifdef NETWARE ctx->finfo.st_atime.tv_sec = ctx->r->finfo.atime/1000000; ctx->finfo.st_mtime.tv_sec = ctx->r->finfo.mtime/1000000; ctx->finfo.st_ctime.tv_sec = ctx->r->finfo.ctime/1000000; Index: sapi/cli/php_getopt.h =================================================================== RCS file: /repository/php-src/sapi/cli/php_getopt.h,v retrieving revision 1.5 diff -u -r1.5 php_getopt.h --- sapi/cli/php_getopt.h 8 Jan 2004 17:33:23 -0000 1.5 +++ sapi/cli/php_getopt.h 26 Feb 2004 10:50:27 -0000 @@ -20,6 +20,14 @@ #include "php.h" +#ifdef NETWARE +/* The below are undefined since these symbols are using in CLI and + * this clashes with the same defines made in LibC. + */ +#undef optarg +#undef optind +#endif + /* Define structure for one recognized option (both single char and long name). * If short_open is '-' this is the last option. */ Index: win32/sendmail.c =================================================================== RCS file: /repository/php-src/win32/sendmail.c,v retrieving revision 1.59 diff -u -r1.59 sendmail.c --- win32/sendmail.c 8 Dec 2003 22:10:42 -0000 1.59 +++ win32/sendmail.c 26 Feb 2004 10:50:29 -0000 @@ -1,5 +1,5 @@ /* - * PHP Sendmail for Windows. + * PHP Sendmail for Windows and NetWare. * * This file is rewriten specificly for PHPFI. Some functionality * has been removed (MIME and file attachments). This code was @@ -97,7 +97,7 @@ #ifndef NETWARE char *php_mailer = "PHP 4 WIN32"; #else -char *php_mailer = "PHP 4 NetWare"; +char *php_mailer = "PHP 5 NetWare"; #endif /* NETWARE */ char *get_header(char *h, char *headers);
Index: netware/ApacheCore.imp =================================================================== RCS file: /repository/php-src/netware/ApacheCore.imp,v retrieving revision 1.2 diff -u -r1.2 ApacheCore.imp --- netware/ApacheCore.imp 3 Jan 2003 12:15:36 -0000 1.2 +++ netware/ApacheCore.imp 26 Feb 2004 10:50:20 -0000 @@ -1,365 +1,365 @@ - ap_MD5Final, - ap_MD5Init, - ap_MD5Update, - ap_acquire_mutex, - ap_add_cgi_vars, - ap_add_common_vars, - ap_add_loaded_module, - ap_add_module, - ap_add_named_module, - ap_add_per_dir_conf, - ap_add_per_url_conf, - ap_add_version_component, - ap_allow_options, - ap_allow_overrides, - ap_append_arrays, - ap_array_cat, - ap_auth_name, - ap_auth_type, - ap_basic_http_header, - ap_bclose, - ap_bcreate, - ap_bfilbuf, - ap_bfileno, - ap_bflsbuf, - ap_bflush, - ap_bgetopt, - ap_bgets, - ap_bhalfduplex, - ap_block_alarms, - ap_blookc, - ap_bnonblock, - ap_bonerror, - ap_bpushfd, - ap_bputs, - ap_bread, - ap_bsetflag, - ap_bsetopt, - ap_bskiplf, - ap_bspawn_child, - ap_bwrite, - ap_bytes_in_free_blocks, - ap_bytes_in_pool, - ap_call_exec, - ap_can_exec, - ap_cfg_closefile, - ap_cfg_getc, - ap_cfg_getline, - ap_chdir_file, - ap_check_alarm, - ap_check_cmd_context, - ap_checkmask, - ap_cleanup_for_exec, - ap_clear_module_list, - ap_clear_pool, - ap_clear_table, - ap_close_piped_log, - ap_construct_server, - ap_construct_url, - ap_content_type_tolower, - ap_copy_array, - ap_copy_array_hdr, - ap_copy_table, - ap_count_dirs, - ap_cpystrn, - ap_create_environment, - ap_create_mutex, - ap_create_per_dir_config, - ap_custom_response, - ap_default_port_for_request, - ap_default_port_for_scheme, - ap_default_type, - ap_destroy_mutex, - ap_destroy_pool, - ap_destroy_sub_req, - ap_die, - ap_discard_request_body, - ap_document_root, - ap_each_byterange, - ap_error_log2stderr, - ap_escape_html, - ap_escape_path_segment, - ap_escape_quotes, - ap_escape_shell_cmd, - ap_exists_scoreboard_image, - ap_finalize_request_protocol, - ap_find_command, - ap_find_command_in_modules, - ap_find_last_token, - ap_find_linked_module, - ap_find_module_name, - ap_find_path_info, - ap_find_token, - ap_get_basic_auth_pw, - ap_get_client_block, - ap_get_gmtoff, - ap_get_limit_req_body, - ap_get_remote_host, - ap_get_remote_logname, - ap_get_server_built, - ap_get_server_name, - ap_get_server_port, - ap_get_server_version, - ap_get_time, - ap_get_token, - ap_getparents, - ap_getword, - ap_getword_conf, - ap_getword_conf_nc, - ap_getword_nc, - ap_getword_nulls, - ap_getword_nulls_nc, - ap_getword_white, - ap_getword_white_nc, - ap_gm_timestr_822, - ap_gname2id, - ap_handle_command, - ap_hard_timeout, - ap_ht_time, - ap_ind, - ap_index_of_response, - ap_init_virtual_host, - ap_internal_redirect, - ap_internal_redirect_handler, - ap_is_directory, - ap_is_fnmatch, - ap_is_initial_req, - ap_is_matchexp, - ap_is_url, - ap_kill_cleanup, - ap_kill_cleanups_for_fd, - ap_kill_cleanups_for_socket, - ap_kill_timeout, - ap_log_assert, - ap_log_error_old, - ap_log_reason, - ap_log_unixerr, - ap_make_array, - ap_make_dirstr, - ap_make_dirstr_parent, - ap_make_dirstr_prefix, - ap_make_full_path, - ap_make_sub_pool, - ap_make_table, - ap_matches_request_vhost, - ap_md5, - ap_md5_binary, - ap_md5contextTo64, - ap_md5digest, - ap_meets_conditions, - ap_no2slash, - ap_note_auth_failure, - ap_note_basic_auth_failure, - ap_note_cleanups_for_fd, - ap_note_cleanups_for_file, - ap_note_cleanups_for_socket, - ap_note_digest_auth_failure, - ap_note_subprocess, - ap_open_mutex, - ap_open_piped_log, - ap_os_escape_path, - ap_overlap_tables, - ap_overlay_tables, - ap_palloc, - ap_parseHTTPdate, - ap_parse_hostinfo_components, - ap_parse_uri, - ap_parse_uri_components, - ap_pcalloc, - ap_pcfg_open_custom, - ap_pcfg_openfile, - ap_pclosedir, - ap_pclosef, - ap_pclosesocket, - ap_pduphostent, - ap_pfclose, - ap_pfdopen, - ap_pfopen, - ap_pgethostbyname, - ap_popendir, - ap_popenf, - ap_pregcomp, - ap_pregfree, - ap_pregsub, - ap_psignature, - ap_psocket, - ap_pstrdup, - ap_pstrndup, - ap_push_array, - ap_pvsprintf, - ap_rationalize_mtime, - ap_register_cleanup, - ap_release_mutex, - ap_remove_loaded_module, - ap_remove_module, - ap_requires, - ap_reset_timeout, - ap_rflush, - ap_rind, - ap_rputc, - ap_rputs, - ap_run_cleanup, - ap_run_sub_req, - ap_rwrite, - ap_satisfies, - ap_scan_script_header_err, - ap_scan_script_header_err_buff, - ap_scan_script_header_err_core, - ap_send_fb, - ap_send_fb_length, - ap_send_fd, - ap_send_fd_length, - ap_send_http_header, - ap_send_http_trace, - ap_send_mmap, - ap_send_size, - ap_server_root_relative, - ap_set_byterange, - ap_set_content_length, - ap_set_etag, - ap_set_keepalive, - ap_set_last_modified, - ap_setup_client_block, - ap_should_client_block, - ap_soft_timeout, - ap_some_auth_required, - ap_spawn_child, - ap_srm_command_loop, - ap_str_tolower, - ap_strcasecmp_match, - ap_strcmp_match, - ap_sub_req_lookup_file, - ap_sub_req_lookup_uri, - ap_sync_scoreboard_image, - ap_table_add, - ap_table_addn, - ap_table_get, - ap_table_merge, - ap_table_mergen, - ap_table_set, - ap_table_setn, - ap_table_unset, - ap_tm2sec, - ap_uname2id, - ap_unblock_alarms, - ap_unescape_url, - ap_unparse_uri_components, - ap_update_mtime, - ap_uudecode, - ap_uuencode, - ap_vbprintf, - ap_vformatter, - ap_vsnprintf, - regcomp, - regexec, - regfree, - access_module, - alias_module, - ap_bprintf, - ap_bvputs, - ap_day_snames, - ap_extended_status, - ap_limit_section, - ap_loaded_modules, - ap_log_error, - ap_log_printf, - ap_log_rerror, - ap_month_snames, - ap_null_cleanup, - ap_psprintf, - ap_pstrcat, - ap_restart_time, - ap_rprintf, - ap_rvputs, - ap_scoreboard_image, - ap_send_header_field, - ap_server_argv0, - ap_server_root, - ap_set_file_slot, - ap_set_flag_slot, - ap_set_string_slot, - ap_set_string_slot_lower, - ap_snprintf, - ap_suexec_enabled, - ap_table_do, - apache_main, - asis_module, - auth_module, - autoindex_module, - config_log_module, - core_module, - dir_module, - env_module, - imap_module, - includes_module, - mime_module, - negotiation_module, - setenvif_module, - so_module, - top_module, - ap_fnmatch, - ap_method_number_of, - ap_exists_config_define, - ap_single_module_configure, - ap_make_etag, - ap_array_pstrcat, - ap_find_list_item, - ap_MD5Encode, - ap_validate_password, - ap_size_list_item, - ap_get_list_item, - ap_scoreboard_fname, - ap_pid_fname, - ap_excess_requests_per_child, - ap_threads_per_child, - ap_max_requests_per_child, - ap_daemons_to_start, - ap_daemons_min_free, - ap_daemons_max_free, - ap_daemons_limit, - ap_user_name, - ap_user_id, - ap_group_id, - ap_standalone, - ap_server_confname, - ap_sub_req_method_uri, - ap_regerror, - ap_regexec, - ap_field_noparam, - ap_pbase64decode, - ap_pbase64encode, - ap_base64encode, - ap_base64encode_binary, - ap_base64encode_len, - ap_base64decode, - ap_base64decode_binary, - ap_base64decode_len, - ap_SHA1Init, - ap_SHA1Update_binary, - ap_SHA1Update, - ap_SHA1Final, - ap_sha1_base64, - ap_my_generation, - ap_get_virthost_addr, - ap_listeners, - ap_listenbacklog, - clean_parent_exit, - init_tsd, - ap_set_config_vectors, - ap_strcasestr, - ap_to64, - ap_vrprintf, - regerror, - ap_add_file_conf, - ap_configtestonly, - ap_is_rdirectory, - ap_remove_spaces, - ap_scan_script_header_err_strs, - ap_start_shutdown, - ap_start_restart, - ap_stripprefix, - ap_send_error_response, - ap_os_canonical_filename, - ap_os_http_method, - os_readdir, - os_opendir + ap_MD5Final, + ap_MD5Init, + ap_MD5Update, + ap_acquire_mutex, + ap_add_cgi_vars, + ap_add_common_vars, + ap_add_loaded_module, + ap_add_module, + ap_add_named_module, + ap_add_per_dir_conf, + ap_add_per_url_conf, + ap_add_version_component, + ap_allow_options, + ap_allow_overrides, + ap_append_arrays, + ap_array_cat, + ap_auth_name, + ap_auth_type, + ap_basic_http_header, + ap_bclose, + ap_bcreate, + ap_bfilbuf, + ap_bfileno, + ap_bflsbuf, + ap_bflush, + ap_bgetopt, + ap_bgets, + ap_bhalfduplex, + ap_block_alarms, + ap_blookc, + ap_bnonblock, + ap_bonerror, + ap_bpushfd, + ap_bputs, + ap_bread, + ap_bsetflag, + ap_bsetopt, + ap_bskiplf, + ap_bspawn_child, + ap_bwrite, + ap_bytes_in_free_blocks, + ap_bytes_in_pool, + ap_call_exec, + ap_can_exec, + ap_cfg_closefile, + ap_cfg_getc, + ap_cfg_getline, + ap_chdir_file, + ap_check_alarm, + ap_check_cmd_context, + ap_checkmask, + ap_cleanup_for_exec, + ap_clear_module_list, + ap_clear_pool, + ap_clear_table, + ap_close_piped_log, + ap_construct_server, + ap_construct_url, + ap_content_type_tolower, + ap_copy_array, + ap_copy_array_hdr, + ap_copy_table, + ap_count_dirs, + ap_cpystrn, + ap_create_environment, + ap_create_mutex, + ap_create_per_dir_config, + ap_custom_response, + ap_default_port_for_request, + ap_default_port_for_scheme, + ap_default_type, + ap_destroy_mutex, + ap_destroy_pool, + ap_destroy_sub_req, + ap_die, + ap_discard_request_body, + ap_document_root, + ap_each_byterange, + ap_error_log2stderr, + ap_escape_html, + ap_escape_path_segment, + ap_escape_quotes, + ap_escape_shell_cmd, + ap_exists_scoreboard_image, + ap_finalize_request_protocol, + ap_find_command, + ap_find_command_in_modules, + ap_find_last_token, + ap_find_linked_module, + ap_find_module_name, + ap_find_path_info, + ap_find_token, + ap_get_basic_auth_pw, + ap_get_client_block, + ap_get_gmtoff, + ap_get_limit_req_body, + ap_get_remote_host, + ap_get_remote_logname, + ap_get_server_built, + ap_get_server_name, + ap_get_server_port, + ap_get_server_version, + ap_get_time, + ap_get_token, + ap_getparents, + ap_getword, + ap_getword_conf, + ap_getword_conf_nc, + ap_getword_nc, + ap_getword_nulls, + ap_getword_nulls_nc, + ap_getword_white, + ap_getword_white_nc, + ap_gm_timestr_822, + ap_gname2id, + ap_handle_command, + ap_hard_timeout, + ap_ht_time, + ap_ind, + ap_index_of_response, + ap_init_virtual_host, + ap_internal_redirect, + ap_internal_redirect_handler, + ap_is_directory, + ap_is_fnmatch, + ap_is_initial_req, + ap_is_matchexp, + ap_is_url, + ap_kill_cleanup, + ap_kill_cleanups_for_fd, + ap_kill_cleanups_for_socket, + ap_kill_timeout, + ap_log_assert, + ap_log_error_old, + ap_log_reason, + ap_log_unixerr, + ap_make_array, + ap_make_dirstr, + ap_make_dirstr_parent, + ap_make_dirstr_prefix, + ap_make_full_path, + ap_make_sub_pool, + ap_make_table, + ap_matches_request_vhost, + ap_md5, + ap_md5_binary, + ap_md5contextTo64, + ap_md5digest, + ap_meets_conditions, + ap_no2slash, + ap_note_auth_failure, + ap_note_basic_auth_failure, + ap_note_cleanups_for_fd, + ap_note_cleanups_for_file, + ap_note_cleanups_for_socket, + ap_note_digest_auth_failure, + ap_note_subprocess, + ap_open_mutex, + ap_open_piped_log, + ap_os_escape_path, + ap_overlap_tables, + ap_overlay_tables, + ap_palloc, + ap_parseHTTPdate, + ap_parse_hostinfo_components, + ap_parse_uri, + ap_parse_uri_components, + ap_pcalloc, + ap_pcfg_open_custom, + ap_pcfg_openfile, + ap_pclosedir, + ap_pclosef, + ap_pclosesocket, + ap_pduphostent, + ap_pfclose, + ap_pfdopen, + ap_pfopen, + ap_pgethostbyname, + ap_popendir, + ap_popenf, + ap_pregcomp, + ap_pregfree, + ap_pregsub, + ap_psignature, + ap_psocket, + ap_pstrdup, + ap_pstrndup, + ap_push_array, + ap_pvsprintf, + ap_rationalize_mtime, + ap_register_cleanup, + ap_release_mutex, + ap_remove_loaded_module, + ap_remove_module, + ap_requires, + ap_reset_timeout, + ap_rflush, + ap_rind, + ap_rputc, + ap_rputs, + ap_run_cleanup, + ap_run_sub_req, + ap_rwrite, + ap_satisfies, + ap_scan_script_header_err, + ap_scan_script_header_err_buff, + ap_scan_script_header_err_core, + ap_send_fb, + ap_send_fb_length, + ap_send_fd, + ap_send_fd_length, + ap_send_http_header, + ap_send_http_trace, + ap_send_mmap, + ap_send_size, + ap_server_root_relative, + ap_set_byterange, + ap_set_content_length, + ap_set_etag, + ap_set_keepalive, + ap_set_last_modified, + ap_setup_client_block, + ap_should_client_block, + ap_soft_timeout, + ap_some_auth_required, + ap_spawn_child, + ap_srm_command_loop, + ap_str_tolower, + ap_strcasecmp_match, + ap_strcmp_match, + ap_sub_req_lookup_file, + ap_sub_req_lookup_uri, + ap_sync_scoreboard_image, + ap_table_add, + ap_table_addn, + ap_table_get, + ap_table_merge, + ap_table_mergen, + ap_table_set, + ap_table_setn, + ap_table_unset, + ap_tm2sec, + ap_uname2id, + ap_unblock_alarms, + ap_unescape_url, + ap_unparse_uri_components, + ap_update_mtime, + ap_uudecode, + ap_uuencode, + ap_vbprintf, + ap_vformatter, + ap_vsnprintf, + regcomp, + regexec, + regfree, + access_module, + alias_module, + ap_bprintf, + ap_bvputs, + ap_day_snames, + ap_extended_status, + ap_limit_section, + ap_loaded_modules, + ap_log_error, + ap_log_printf, + ap_log_rerror, + ap_month_snames, + ap_null_cleanup, + ap_psprintf, + ap_pstrcat, + ap_restart_time, + ap_rprintf, + ap_rvputs, + ap_scoreboard_image, + ap_send_header_field, + ap_server_argv0, + ap_server_root, + ap_set_file_slot, + ap_set_flag_slot, + ap_set_string_slot, + ap_set_string_slot_lower, + ap_snprintf, + ap_suexec_enabled, + ap_table_do, + apache_main, + asis_module, + auth_module, + autoindex_module, + config_log_module, + core_module, + dir_module, + env_module, + imap_module, + includes_module, + mime_module, + negotiation_module, + setenvif_module, + so_module, + top_module, + ap_fnmatch, + ap_method_number_of, + ap_exists_config_define, + ap_single_module_configure, + ap_make_etag, + ap_array_pstrcat, + ap_find_list_item, + ap_MD5Encode, + ap_validate_password, + ap_size_list_item, + ap_get_list_item, + ap_scoreboard_fname, + ap_pid_fname, + ap_excess_requests_per_child, + ap_threads_per_child, + ap_max_requests_per_child, + ap_daemons_to_start, + ap_daemons_min_free, + ap_daemons_max_free, + ap_daemons_limit, + ap_user_name, + ap_user_id, + ap_group_id, + ap_standalone, + ap_server_confname, + ap_sub_req_method_uri, + ap_regerror, + ap_regexec, + ap_field_noparam, + ap_pbase64decode, + ap_pbase64encode, + ap_base64encode, + ap_base64encode_binary, + ap_base64encode_len, + ap_base64decode, + ap_base64decode_binary, + ap_base64decode_len, + ap_SHA1Init, + ap_SHA1Update_binary, + ap_SHA1Update, + ap_SHA1Final, + ap_sha1_base64, + ap_my_generation, + ap_get_virthost_addr, + ap_listeners, + ap_listenbacklog, + clean_parent_exit, + init_tsd, + ap_set_config_vectors, + ap_strcasestr, + ap_to64, + ap_vrprintf, + regerror, + ap_add_file_conf, + ap_configtestonly, + ap_is_rdirectory, + ap_remove_spaces, + ap_scan_script_header_err_strs, + ap_start_shutdown, + ap_start_restart, + ap_stripprefix, + ap_send_error_response, + ap_os_canonical_filename, + ap_os_http_method, + os_readdir, + os_opendir Index: netware/BisonExtStandard.bat =================================================================== RCS file: /repository/php-src/netware/BisonExtStandard.bat,v retrieving revision 1.2 diff -u -r1.2 BisonExtStandard.bat --- netware/BisonExtStandard.bat 3 Jan 2003 12:15:36 -0000 1.2 +++ netware/BisonExtStandard.bat 26 Feb 2004 10:50:20 -0000 @@ -1,3 +1,3 @@ -@echo off - -bison --output=ext\standard\parsedate.c -v -d -p phplib ext\standard\parsedate.y +@echo off + +bison --output=ext\standard\parsedate.c -v -d -p phplib ext\standard\parsedate.y Index: netware/BisonFlexZend.bat =================================================================== RCS file: /repository/php-src/netware/BisonFlexZend.bat,v retrieving revision 1.2 diff -u -r1.2 BisonFlexZend.bat --- netware/BisonFlexZend.bat 3 Jan 2003 12:15:36 -0000 1.2 +++ netware/BisonFlexZend.bat 26 Feb 2004 10:50:20 -0000 @@ -1,8 +1,8 @@ -@echo off - -bison --output=zend_ini_parser.c -v -d -p ini_ zend_ini_parser.y -flex -B -i -Sflex.skl -Pini_ -ozend_ini_scanner.c zend_ini_scanner.l -REM flex -i -Pini_ -ozend_ini_scanner.c zend_ini_scanner.l -bison --output=zend_language_parser.c -v -d -p zend zend_language_parser.y -flex -B -i -Sflex.skl -Pzend -ozend_language_scanner.c zend_language_scanner.l -REM flex -i -Pzend -ozend_language_scanner.c zend_language_scanner.l +@echo off + +bison --output=zend_ini_parser.c -v -d -p ini_ zend_ini_parser.y +flex -B -i -Sflex.skl -Pini_ -ozend_ini_scanner.c zend_ini_scanner.l +REM flex -i -Pini_ -ozend_ini_scanner.c zend_ini_scanner.l +bison --output=zend_language_parser.c -v -d -p zend zend_language_parser.y +flex -B -i -Sflex.skl -Pzend -ozend_language_scanner.c zend_language_scanner.l +REM flex -i -Pzend -ozend_language_scanner.c zend_language_scanner.l Index: netware/ZendEngine2.mak =================================================================== RCS file: /repository/php-src/netware/ZendEngine2.mak,v retrieving revision 1.4 diff -u -r1.4 ZendEngine2.mak --- netware/ZendEngine2.mak 3 Jan 2003 11:46:20 -0000 1.4 +++ netware/ZendEngine2.mak 26 Feb 2004 10:50:21 -0000 @@ -1,4 +1,4 @@ -# Temporarily here -- later may go into some batch file +# Temporarily here -- later may go into some batch file # which will set this as an environment variable PROJECT_ROOT = .. @@ -18,6 +18,7 @@ zend_builtin_functions.c \ zend_compile.c \ zend_constants.c \ + zend_default_classes.c \ zend_dynamic_array.c \ zend_execute.c \ zend_execute_API.c \ @@ -28,20 +29,26 @@ zend_ini.c \ zend_ini_parser.c \ zend_ini_scanner.c \ + zend_interfaces.c \ + zend_iterators.c \ zend_language_parser.c \ zend_language_scanner.c \ zend_list.c \ zend_llist.c \ + zend_mm.c \ zend_multibyte.c \ zend_object_handlers.c \ zend_objects.c \ + zend_objects_API.c \ zend_opcode.c \ zend_operators.c \ zend_ptr_stack.c \ zend_qsort.c \ + zend_reflection_api.c \ zend_sprintf.c \ zend_stack.c \ zend_static_allocator.c \ + zend_stream.c \ zend_ts_hash.c \ zend_variables.c @@ -59,39 +66,43 @@ # Compile flags -C_FLAGS = -c -maxerrors 25 -msgstyle std +C_FLAGS += -c -maxerrors 25 -msgstyle std C_FLAGS += -wchar_t on -bool on C_FLAGS += -processor Pentium C_FLAGS += -nostdinc C_FLAGS += -relax_pointers # To remove type-casting errors C_FLAGS += -D__C9X_CMATH_INLINES_DEFINED C_FLAGS += -DNETWARE -DZTS -C_FLAGS += -DNEW_LIBC -C_FLAGS += -DCLIB_STAT_PATCH C_FLAGS += -DTHREAD_SWITCH # These are required to use dlclose so that the PHP extensions are automatically unloaded # when apache is unloaded -C_FLAGS += -DHAVE_DLFCN_H -DHAVE_LIBDL +C_FLAGS += -DHAVE_DLFCN_H=1 -DHAVE_LIBDL=1 -C_FLAGS += -I. -I- -I../netware -I$(SDK_DIR)/include # ../netware added for special SYS/STAT.H -C_FLAGS += -I$(MWCIncludes) +ifeq '$(APACHE_VER)' '1.3' +C_FLAGS += -DAPACHE_1_BUILD=1 +endif +ifeq '$(APACHE_VER)' '2' +C_FLAGS += -DAPACHE_2_BUILD=1 +endif +C_FLAGS += -I. -I- -I../netware # ../netware added for special SYS/STAT.H +C_FLAGS += -I$(SDK_DIR)/include -I$(MWCIncludes) # Link flags -LD_FLAGS = -type library +LD_FLAGS = -type library LD_FLAGS += -o $(BINARY) # Extra stuff based on debug / release builds ifeq '$(BUILD)' 'debug' - C_FLAGS += -DZEND_DEBUG=1 - C_FLAGS += -inline smart -sym on -sym codeview4 -sym internal -opt off -opt intrinsics + C_FLAGS += -DZEND_DEBUG=1 + C_FLAGS += -inline smart -sym on -sym codeview4 -sym internal -opt off -opt intrinsics LD_FLAGS += -sym codeview4 -sym internal export MWLibraryFiles=$(SDK_DIR)/imports/libcpre.o;mwcrtld.lib else - C_FLAGS += -opt speed -inline on -inline auto -sym off - C_FLAGS += -DZEND_DEBUG=0 + C_FLAGS += -opt all -inline on -inline auto -sym off + C_FLAGS += -DZEND_DEBUG=0 LD_FLAGS += -sym off export MWLibraryFiles=$(SDK_DIR)/imports/libcpre.o;mwcrtl.lib endif Index: netware/buildext.bat =================================================================== RCS file: /repository/php-src/netware/buildext.bat,v retrieving revision 1.1 diff -u -r1.1 buildext.bat --- netware/buildext.bat 12 Jul 2002 13:02:45 -0000 1.1 +++ netware/buildext.bat 26 Feb 2004 10:50:21 -0000 @@ -2,16 +2,28 @@ cd ..\ext\%1 +set MYSQL_VER=%3 + if "%2" == "clean" make -f %1.mak clean if "%2" == "/?" goto USAGE REM Build command make -f %1.mak + +if not "%3" == "" goto RENAME + goto EXIT +:RENAME +cd %BUILD% +ren phpmysql.nlm phpmysql%3.nlm +cd .. +goto EXIT + + :USAGE @echo on - @echo Usage: buildext extension_name [clean] + @echo Usage: buildext extension_name [clean] [mysql_version] @echo clean - delete all object files and binaries before building :EXIT Index: netware/common.mif =================================================================== RCS file: /repository/php-src/netware/common.mif,v retrieving revision 1.4 diff -u -r1.4 common.mif --- netware/common.mif 3 Jan 2003 11:36:24 -0000 1.4 +++ netware/common.mif 26 Feb 2004 10:50:21 -0000 @@ -26,7 +26,7 @@ WINSOCK_DIR = P:/APPS/script/sw/Winsock2 # LDAP stuff -LDAP_DIR = P:/APPS/script/sw/cldapsdk +LDAP_DIR = P:/APPS/script/sw/cldapsdk/netware/libc # XML-EXPAT stuff EXPAT_DIR = P:/APPS/script/sw/expat @@ -67,14 +67,13 @@ endif ifndef COPYRIGHT -COPYRIGHT = "Copyright (C) 2002-2003 Novell\, Inc. All Rights Reserved." +COPYRIGHT = "Copyright (C) 2002-2004 Novell\, Inc. All Rights Reserved." endif # Compile flags ifeq '$(APACHE_VER)' '1.3' C_FLAGS = -align 1 -C_FLAGS += -DCLIB_STAT_PATCH else C_FLAGS = -align 4 endif Index: netware/php-nw.bat =================================================================== RCS file: /repository/php-src/netware/php-nw.bat,v retrieving revision 1.3 diff -u -r1.3 php-nw.bat --- netware/php-nw.bat 3 Jan 2003 11:46:19 -0000 1.3 +++ netware/php-nw.bat 26 Feb 2004 10:50:21 -0000 @@ -7,4 +7,4 @@ set path=%path%;P:\APPS\SCRIPT\SW\GNUWIN32\BIN REM Build options -setbuild r 1 +setbuild r 2 Index: netware/php5apache.mak =================================================================== RCS file: /repository/php-src/netware/php5apache.mak,v retrieving revision 1.1 diff -u -r1.1 php5apache.mak --- netware/php5apache.mak 17 Jan 2004 13:00:00 -0000 1.1 +++ netware/php5apache.mak 26 Feb 2004 10:50:21 -0000 @@ -5,7 +5,7 @@ # Module details MODULE_NAME = mod_php MODULE_DESC = "PHP 5 - Apache 1.3 Module" -VMAJ = 3 +VMAJ = 1 VMIN = 0 VREV = 0 @@ -17,10 +17,10 @@ .SUFFIXES: .nlm .lib .obj .cpp .c .msg .mlc .mdb .xdc .d # Source files -C_SRC = mod_php5.c \ +C_SRC = libpre.c \ + mod_php5.c \ php_apache.c \ sapi_apache.c \ - libpre.c # Destination directories and files OBJ_DIR = $(BUILD) @@ -36,7 +36,7 @@ # Compile flags -C_FLAGS = -c -maxerrors 25 -msgstyle gcc +C_FLAGS += -c -maxerrors 25 -msgstyle gcc C_FLAGS += -wchar_t on -bool on C_FLAGS += -processor Pentium C_FLAGS += -w nounusedarg -msext on @@ -47,27 +47,30 @@ C_FLAGS += -DNLM_PLATFORM C_FLAGS += -DN_PLAT_NLM -DNLM=1 -D__NO_MATH_OPS C_FLAGS += -D__C9X_CMATH_INLINES_DEFINED -DAPACHE_OS_H -DNO_USE_SIGACTION -DMULTITHREAD -C_FLAGS += -DCLIB_STAT_PATCH -C_FLAGS += -DNEW_LIBC -C_FLAGS += -I. -I- -I. -I../../netware -I$(SDK_DIR)/include # ../../netware added for special SYS/STAT.H -C_FLAGS += -I$(MWCIncludes) + +# Required only for the Apache sapi module since this is the only thing +# that interacts with Apache 1.3 Web server that is Clib based +C_FLAGS += -DCLIB_STAT_PATCH=1 + +C_FLAGS += -I. -I- -I../../netware # ../../netware added for special SYS/STAT.H +C_FLAGS += -I$(SDK_DIR)/include -I$(MWCIncludes) C_FLAGS += -I$(APACHE_DIR)/include -I$(APACHE_DIR)/os/netware -C_FLAGS += -I- -I../../main -I../../Zend -I../../TSRM -I../../ext/standard -C_FLAGS += -I../../ -I../../netware -I$(PROJECT_ROOT)/regex +C_FLAGS += -I../../main -I../../Zend -I../../TSRM -I../../ext/standard +C_FLAGS += -I../../ -I$(PROJECT_ROOT)/regex C_FLAGS += -I$(WINSOCK_DIR)/include/nlm -I$(WINSOCK_DIR)/include # Extra stuff based on debug / release builds ifeq '$(BUILD)' 'debug' SYM_FILE = $(FINAL_DIR)\$(MODULE_NAME).sym - C_FLAGS += -inline smart -sym on -sym codeview4 -opt off -opt intrinsics -sym internal -DDEBUGGING -DDKFBPON + C_FLAGS += -inline smart -sym on -sym codeview4 -opt off -opt intrinsics -sym internal -DDEBUGGING -DDKFBPON C_FLAGS += -r -DZEND_DEBUG=1 C_FLAGS += -exc cw LD_FLAGS += -sym on -sym codeview4 -sym internal -osym $(SYM_FILE) - LD_FLAGS += -msgstyle std + LD_FLAGS += -msgstyle std export MWLibraryFiles=$(SDK_DIR)/imports/libcpre.o;mwcrtld.lib else - C_FLAGS += -opt speed -inline on -inline smart -inline auto -sym off -DZEND_DEBUG=0 + C_FLAGS += -opt all -inline on -inline smart -inline auto -sym off -DZEND_DEBUG=0 C_FLAGS += -opt intrinsics C_FLAGS += -opt level=4 LD_FLAGS += -sym off Index: netware/php5apache2filter.mak =================================================================== RCS file: /repository/php-src/netware/php5apache2filter.mak,v retrieving revision 1.1 diff -u -r1.1 php5apache2filter.mak --- netware/php5apache2filter.mak 17 Jan 2004 13:00:00 -0000 1.1 +++ netware/php5apache2filter.mak 26 Feb 2004 10:50:21 -0000 @@ -5,7 +5,7 @@ # Module details MODULE_NAME = mod_php MODULE_DESC = "PHP 5 - Apache 2.0 Module" -VMAJ = 3 +VMAJ = 1 VMIN = 0 VREV = 0 @@ -41,19 +41,20 @@ C_FLAGS += -w nounusedarg -msext on C_FLAGS += -nostdinc C_FLAGS += -relax_pointers # To remove type-casting errors -C_FLAGS += -DNETWARE +C_FLAGS += -DNETWARE -D__GNUC__ C_FLAGS += -DZTS C_FLAGS += -DNLM_PLATFORM C_FLAGS += -DN_PLAT_NLM -DNLM=1 -D__NO_MATH_OPS C_FLAGS += -D__C9X_CMATH_INLINES_DEFINED -DAPACHE_OS_H -DNO_USE_SIGACTION -DMULTITHREAD -C_FLAGS += -DCLIB_STAT_PATCH -C_FLAGS += -DNEW_LIBC -C_FLAGS += -I. -I- -I. -I../../netware -I$(SDK_DIR)/include # ../../netware added for special SYS/STAT.H -C_FLAGS += -I$(SDK_DIR)/include/winsock # For Apache 2.0 headers -C_FLAGS += -I$(MWCIncludes) + +C_FLAGS += -DAPACHE_2_BUILD=1 + +C_FLAGS += -I. -I- -I../../netware # ../../netware added for special SYS/STAT.H +C_FLAGS += -I$(SDK_DIR)/include -I$(MWCIncludes) C_FLAGS += -I$(APACHE_DIR)/include -C_FLAGS += -I- -I../../main -I../../Zend -I../../TSRM -I../../ext/standard +C_FLAGS += -I../../main -I../../Zend -I../../TSRM -I../../ext/standard C_FLAGS += -I../../ -I../../netware -I$(PROJECT_ROOT)/regex +C_FLAGS += -I$(SDK_DIR)/include/winsock # For Apache 2.0 headers C_FLAGS += -I$(WINSOCK_DIR)/include/nlm -I$(WINSOCK_DIR)/include @@ -67,7 +68,7 @@ LD_FLAGS += -msgstyle std export MWLibraryFiles=$(SDK_DIR)/imports/libcpre.o;mwcrtld.lib else - C_FLAGS += -opt speed -inline on -inline smart -inline auto -sym off -DZEND_DEBUG=0 + C_FLAGS += -opt all -inline on -inline smart -inline auto -sym off -DZEND_DEBUG=0 C_FLAGS += -opt intrinsics C_FLAGS += -opt level=4 LD_FLAGS += -sym off @@ -77,7 +78,7 @@ # Dependencies MODULE = LibC \ phplib -IMPORT = @$(SDK_DIR)/imports/libc.imp \ +IMPORT = @$(SDK_DIR)/imports/libc.imp \ @$(APACHE_DIR)/lib/httpd.imp \ @$(APACHE_DIR)/lib/aprlib.imp \ @$(PROJECT_ROOT)/netware/phplib.imp Index: netware/php5cli.mak =================================================================== RCS file: /repository/php-src/netware/php5cli.mak,v retrieving revision 1.1 diff -u -r1.1 php5cli.mak --- netware/php5cli.mak 17 Jan 2004 13:00:00 -0000 1.1 +++ netware/php5cli.mak 26 Feb 2004 10:50:21 -0000 @@ -5,7 +5,7 @@ # Module details MODULE_NAME = php MODULE_DESC = "PHP 5 - Command Line Interface" -VMAJ = 2 +VMAJ = 1 VMIN = 0 VREV = 0 @@ -48,11 +48,11 @@ C_FLAGS += -DNLM_PLATFORM C_FLAGS += -DN_PLAT_NLM -DNLM=1 -D__NO_MATH_OPS C_FLAGS += -D__C9X_CMATH_INLINES_DEFINED -DAPACHE_OS_H -DNO_USE_SIGACTION -DMULTITHREAD -C_FLAGS += -DNEW_LIBC -C_FLAGS += -I. -I- -I. -I../../netware -I$(SDK_DIR)/include # ../../netware added for special SYS/STAT.H -C_FLAGS += -I$(MWCIncludes) -C_FLAGS += -I- -I../../main -I../../Zend -I../../TSRM -I../../ext/standard -C_FLAGS += -I../../ -I../../netware -I$(PROJECT_ROOT)/regex + +C_FLAGS += -I. -I- -I../../netware # ../../netware added for special SYS/STAT.H +C_FLAGS += -I../../main -I../../Zend -I../../TSRM -I../../ext/standard +C_FLAGS += -I../../ -I$(PROJECT_ROOT)/regex +C_FLAGS += -I$(SDK_DIR)/include -I$(MWCIncludes) C_FLAGS += -I$(WINSOCK_DIR)/include/nlm -I$(WINSOCK_DIR)/include # Extra stuff based on debug / release builds @@ -64,7 +64,7 @@ LD_FLAGS += -sym on -sym codeview4 -sym internal -osym $(SYM_FILE) export MWLibraryFiles=$(SDK_DIR)/imports/libcpre.o;mwcrtld.lib else - C_FLAGS += -opt speed -inline on -inline smart -inline auto -sym off -DZEND_DEBUG=0 + C_FLAGS += -opt all -inline on -inline smart -inline auto -sym off -DZEND_DEBUG=0 C_FLAGS += -opt intrinsics C_FLAGS += -opt level=4 LD_FLAGS += -sym off Index: netware/phplib.imp =================================================================== RCS file: /repository/php-src/netware/phplib.imp,v retrieving revision 1.6 diff -u -r1.6 phplib.imp --- netware/phplib.imp 7 Mar 2003 05:15:27 -0000 1.6 +++ netware/phplib.imp 26 Feb 2004 10:50:21 -0000 @@ -11,9 +11,16 @@ _object_init_ex, _php_stream_cast, _php_stream_free, +_php_stream_get_line, _php_stream_open_wrapper_ex, +_safe_emalloc, +_zend_bailout, _zend_get_parameters_array, _zend_get_parameters_array_ex, +_zend_hash_add_or_update, +_zend_hash_index_update_or_next_insert, +_zend_hash_init, +_zend_hash_init_ex, _zend_list_addref, _zend_list_delete, _zend_list_find, @@ -21,27 +28,33 @@ _zval_dtor, _zval_ptr_dtor, add_assoc_bool_ex, +add_assoc_double_ex, add_assoc_long_ex, +add_assoc_null_ex, +add_assoc_string_ex, +add_assoc_stringl_ex, add_assoc_zval_ex, +add_index_bool, add_index_null, add_index_long, -add_index_zval, -add_assoc_string_ex, -add_assoc_stringl_ex, -add_assoc_null_ex, add_index_string, add_index_stringl, +add_index_zval, add_next_index_bool, +add_next_index_double, add_next_index_long, add_next_index_string, add_next_index_stringl, add_next_index_zval, add_property_long_ex, +add_property_resource_ex, add_property_string_ex, call_user_function, +call_user_function_ex, +cfg_get_long, compiler_globals_id, -convert_to_boolean, convert_to_array, +convert_to_boolean, convert_to_double, convert_to_long, core_globals_id, @@ -50,31 +63,35 @@ empty_string, executor_globals_id, expand_filepath, -get_zend_version, get_active_function_name, +get_zend_version, highlight_file, le_index_ptr, module_registry, multi_convert_to_long_ex, +OnUpdateBool, +OnUpdateLong, +OnUpdateString, +OnUpdateStringUnempty, open_file_for_scanning, php_addslashes, +php_body_write, php_check_open_basedir, php_checkuid, -php_execute_script, -php_fopen_primary_script, -php_handle_aborted_connection, -php_handle_special_queries, -php_body_write, php_end_ob_buffers, php_error_docref0, +php_execute_script, +php_fopen_primary_script, php_get_current_user, php_get_highlight_struct, +php_handle_aborted_connection, php_handle_auth_data, +php_handle_special_queries, php_header, php_header_write, php_import_environment_variables, -php_info_print_table_end, php_info_print_table_colspan_header, +php_info_print_table_end, php_info_print_table_header, php_info_print_table_row, php_info_print_table_start, @@ -112,66 +129,83 @@ sapi_free_header, sapi_get_default_content_type, sapi_globals_id, +sapi_module, sapi_shutdown, sapi_startup, second_arg_force_ref, +third_arg_force_ref, ts_allocate_id, +ts_free_thread, ts_resource_ex, tsrm_shutdown, tsrm_startup, virtual_filepath, virtual_fopen, +virtual_open, +virtual_stat, zend_alter_ini_entry, +zend_call_function, zend_error, zend_eval_string, +zend_eval_string_ex, +zend_exception_get_default, zend_execute_scripts, zend_extensions, +zend_fetch_class, zend_fetch_resource, +zend_get_class_entry, +zend_get_parameters, zend_get_parameters_ex, -zend_hash_add_or_update, zend_hash_apply, zend_hash_apply_with_argument, zend_hash_clean, +zend_hash_copy, zend_hash_del_key_or_index, zend_hash_destroy, zend_hash_exists, zend_hash_find, -zend_hash_get_current_key_ex, zend_hash_get_current_data_ex, +zend_hash_get_current_key_ex, zend_hash_index_find, -zend_hash_index_update_or_next_insert, -zend_hash_init, -zend_hash_init_ex, zend_hash_internal_pointer_reset_ex zend_hash_merge_ex, zend_hash_move_forward_ex, zend_hash_num_elements, +zend_hash_sort, zend_highlight, zend_ini_deactivate, zend_ini_boolean_displayer_cb, zend_ini_string, +zend_is_auto_global, +zend_is_callable, zend_list_insert, zend_llist_add_element, zend_llist_apply, zend_llist_apply_with_argument, +zend_llist_copy, zend_llist_destroy, zend_llist_init, +zend_llist_sort, zend_load_extension, +zend_merge_properties, zend_parse_parameters, zend_parse_parameters_ex, zend_printf, +zend_qsort, +zend_register_constant, zend_register_ini_entries, zend_register_internal_class, zend_register_list_destructors_ex, zend_register_long_constant, zend_register_resource, +zend_register_string_constant, zend_startup_module, zend_standard_class_def, +zend_throw_exception, +zend_throw_exception_ex, zend_strip, +zend_strndup, zend_unregister_ini_entries, +zend_uv, zend_wrong_param_count, -zval_add_ref, -OnUpdateBool, -OnUpdateLong, -OnUpdateString, -OnUpdateStringUnempty +zval_add_ref Index: netware/phplib.mak =================================================================== RCS file: /repository/php-src/netware/phplib.mak,v retrieving revision 1.6 diff -u -r1.6 phplib.mak --- netware/phplib.mak 17 Jan 2004 13:00:00 -0000 1.6 +++ netware/phplib.mak 26 Feb 2004 10:50:22 -0000 @@ -5,7 +5,7 @@ # Module details MODULE_NAME = phplib MODULE_DESC = "PHP 5 - Script Interpreter and Library" -VMAJ = 3 +VMAJ = 1 VMIN = 0 VREV = 0 @@ -52,12 +52,12 @@ ext/calendar/julian.c \ ext/ftp/ftp.c \ ext/ftp/php_ftp.c \ - ext/mcal/php_mcal.c \ ext/pcre/php_pcre.c \ ext/pcre/pcrelib/chartables.c \ ext/pcre/pcrelib/get.c \ ext/pcre/pcrelib/maketables.c \ ext/pcre/pcrelib/pcre.c \ + ext/pcre/pcrelib/pcregrep.c \ ext/pcre/pcrelib/pcreposix.c \ ext/pcre/pcrelib/study.c \ ext/session/mod_files.c \ @@ -65,7 +65,6 @@ ext/session/mod_user.c \ ext/session/session.c \ ext/snmp/snmp.c \ - ext/standard/aggregation.c \ ext/standard/array.c \ ext/standard/assert.c \ ext/standard/base64.c \ @@ -90,6 +89,7 @@ ext/standard/ftp_fopen_wrapper.c \ ext/standard/head.c \ ext/standard/html.c \ + ext/standard/http.c \ ext/standard/http_fopen_wrapper.c \ ext/standard/image.c \ ext/standard/incomplete_class.c \ @@ -107,27 +107,31 @@ ext/standard/pageinfo.c \ ext/standard/parsedate.c \ ext/standard/php_fopen_wrapper.c \ + ext/standard/proc_open.c \ ext/standard/quot_print.c \ ext/standard/rand.c \ ext/standard/reg.c \ ext/standard/scanf.c \ ext/standard/sha1.c \ ext/standard/soundex.c \ + ext/standard/streamsfuncs.c \ ext/standard/string.c \ ext/standard/strnatcmp.c \ + ext/standard/sunfuncs.c \ + ext/standard/syslog.c \ ext/standard/type.c \ ext/standard/uniqid.c \ ext/standard/url.c \ ext/standard/url_scanner.c \ ext/standard/url_scanner_ex.c \ ext/standard/user_filters.c \ + ext/standard/uuencode.c \ ext/standard/var.c \ ext/standard/var_unserializer.c \ ext/standard/versioning.c \ main/fopen_wrappers.c \ main/internal_functions_nw.c \ main/main.c \ - main/memory_streams.c \ main/mergesort.c \ main/network.c \ main/output.c \ @@ -135,6 +139,7 @@ main/php_ini.c \ main/php_logos.c \ main/php_open_temporary_file.c \ + main/php_scandir.c \ main/php_sprintf.c \ main/php_ticks.c \ main/php_variables.c \ @@ -144,10 +149,17 @@ main/SAPI.c \ main/snprintf.c \ main/spprintf.c \ - main/streams.c \ main/strlcat.c \ main/strlcpy.c \ - main/user_streams.c \ + main/streams/cast.c \ + main/streams/filter.c \ + main/streams/memory.c \ + main/streams/mmap.c \ + main/streams/plain_wrapper.c \ + main/streams/streams.c \ + main/streams/transports.c \ + main/streams/userspace.c \ + main/streams/xp_socket.c \ netware/geterrnoptr.c \ netware/mktemp.c \ netware/pipe.c \ @@ -159,16 +171,13 @@ regex/regerror.c \ regex/regexec.c \ regex/regfree.c \ -# ext/standard/crypt.c \ # ext/com/COM.c \ # ext/com/conversion.c \ # ext/odbc/php_odbc.c \ # ext/snmp/winsnmp.c \ -# netware/winutil.c \ -# netware/registry.c \ -# main/alloca.c \ +# ext/standard/crypt.c \ # ext/wddx/wddx.c \ -# netware/readdir.c \ +# main/alloca.c \ WIN32_C_SRC = sendmail.c \ @@ -199,36 +208,47 @@ C_FLAGS += -relax_pointers # To remove type-casting errors C_FLAGS += -processor Pentium C_FLAGS += -nostdinc -nosyspath -C_FLAGS += -DNETWARE -D__BIT_TYPES_DEFINED__ -DZTS -C_FLAGS += -DPHP5DLLTS_EXPORTS -DPHP_EXPORTS -DLIBZEND_EXPORTS -DTSRM_EXPORTS -DSAPI_EXPORTS -C_FLAGS += -DHAVE_SYS_TIME_H -DHAVE_STRUCT_FLOCK -DVIRTUAL_DIR -DHAVE_TZNAME -C_FLAGS += -DHAVE_DLFCN_H -DHAVE_LIBDL -C_FLAGS += -DCLIB_STAT_PATCH # stat patch -C_FLAGS += -DNEW_LIBC -DHAVE_ARPA_INET_H=1 -DHAVE_NETINET_IN_H=1 -DHAVE_INET_ATON=1 +C_FLAGS += -DNETWARE -D__BIT_TYPES_DEFINED__ -DZTS +C_FLAGS += -DPHP5DLLTS_EXPORTS -DPHP_EXPORTS -DLIBZEND_EXPORTS -DTSRM_EXPORTS -DSAPI_EXPORTS +C_FLAGS += -DHAVE_SYS_TIME_H=1 -DHAVE_STRUCT_FLOCK=1 -DVIRTUAL_DIR=1 -DHAVE_TZNAME=1 +C_FLAGS += -DHAVE_ARPA_INET_H=1 -DHAVE_NETINET_IN_H=1 -DHAVE_INET_ATON=1 + +# These are required to use dlclose so that the PHP extensions are automatically unloaded +# when apache is unloaded +C_FLAGS += -DHAVE_DLFCN_H=1 -DHAVE_LIBDL=1 + +C_FLAGS += -DLINK_SIZE=2 # Added for the new definition in ext\pcre\pcrelib\internal.h -C_FLAGS += -DLINK_SIZE=2 # Added for the new definition in ext\pcre\pcrelib\internal.h # Below added for the file ext\pcre\pcrelib\pcreposix.c and # the default value is what is defined in the changelog file -C_FLAGS += -DPOSIX_MALLOC_THRESHOLD=5 +C_FLAGS += -DPOSIX_MALLOC_THRESHOLD=5 + +ifeq '$(APACHE_VER)' '1.3' +C_FLAGS += -DAPACHE_1_BUILD=1 +endif +ifeq '$(APACHE_VER)' '2' +C_FLAGS += -DAPACHE_2_BUILD=1 +endif -C_FLAGS += -I. -Imain -Inetware -Iregex -IZend -ITSRM -C_FLAGS += -Iext/standard -Iext/mcal -Iext/pcre -Iext/pcre/pcrelib -C_FLAGS += -Iext/bcmath -Iext/bcmath/libbcmath/src -C_FLAGS += -Iext/odbc -Iext/session -Iext/ftp -Iext/wddx -Iext/calendar -Iext/snmp -C_FLAGS += -I- -Inetware -I$(SDK_DIR)/include -I$(MWCIncludes) # netware added for special SYS/STAT.H : Venkat(6/2/02) -C_FLAGS += -Iwin32 -C_FLAGS += -I$(SDK_DIR)/include/winsock # Added for socket calls +C_FLAGS += -I. -ir main -Imain -Inetware -Iregex -IZend -ITSRM +C_FLAGS += -Iext/standard -Iext/pcre -Iext/pcre/pcrelib +C_FLAGS += -Iext/bcmath -Iext/bcmath/libbcmath/src +C_FLAGS += -Iext/odbc -Iext/session -Iext/ftp -Iext/wddx -Iext/calendar -Iext/snmp +C_FLAGS += -I- -Inetware # netware added for special SYS/STAT.H +C_FLAGS += -I$(SDK_DIR)/include -I$(MWCIncludes) +C_FLAGS += -I$(SDK_DIR)/include/winsock # Added for socket calls +C_FLAGS += -Iwin32 # Extra stuff based on debug / release builds ifeq '$(BUILD)' 'debug' SYM_FILE = $(FINAL_DIR)\$(MODULE_NAME).sym - C_FLAGS += -inline smart -sym on -sym codeview4 -sym internal -opt off -opt intrinsics + C_FLAGS += -inline smart -sym on -sym codeview4 -sym internal -opt off -opt intrinsics C_FLAGS += -D_DEBUG -DZEND_DEBUG=1 LD_FLAGS += -sym codeview4 -sym internal -osym $(SYM_FILE) export MWLibraryFiles=$(SDK_DIR)/imports/libcpre.o;mwcrtl.lib else - C_FLAGS += -opt speed -inline on -inline auto -sym off -DZEND_DEBUG=0 + C_FLAGS += -opt all -inline on -inline auto -sym off -DZEND_DEBUG=0 LD_FLAGS += -sym off export MWLibraryFiles=$(SDK_DIR)/imports/libcpre.o;mwcrtl.lib endif @@ -262,7 +282,6 @@ @if not exist ext\standard\$(OBJ_DIR) md ext\standard\$(OBJ_DIR) @if not exist ext\bcmath\$(OBJ_DIR) md ext\bcmath\$(OBJ_DIR) @if not exist ext\bcmath\libbcmath\src\$(OBJ_DIR) md ext\bcmath\libbcmath\src\$(OBJ_DIR) - @if not exist ext\mcal\$(OBJ_DIR) md ext\mcal\$(OBJ_DIR) @if not exist ext\pcre\$(OBJ_DIR) md ext\pcre\$(OBJ_DIR) @if not exist ext\pcre\pcrelib\$(OBJ_DIR) md ext\pcre\pcrelib\$(OBJ_DIR) @if not exist ext\odbc\$(OBJ_DIR) md ext\odbc\$(OBJ_DIR) @@ -271,6 +290,7 @@ @if not exist ext\wddx\$(OBJ_DIR) md ext\wddx\$(OBJ_DIR) @if not exist ext\calendar\$(OBJ_DIR) md ext\calendar\$(OBJ_DIR) @if not exist ext\snmp\$(OBJ_DIR) md ext\snmp\$(OBJ_DIR) + @if not exist main\streams\$(OBJ_DIR) md main\streams\$(OBJ_DIR) @if not exist $(FINAL_DIR) md $(FINAL_DIR) project: $(BINARY) $(MESSAGE) @@ -336,7 +356,9 @@ @echo $(wordlist 126, 130, $(OBJECTS)) >> $(basename $@).link @echo $(wordlist 131, 135, $(OBJECTS)) >> $(basename $@).link @echo $(wordlist 136, 140, $(OBJECTS)) >> $(basename $@).link - @echo $(wordlist 141, 141, $(OBJECTS)) >> $(basename $@).link + @echo $(wordlist 141, 145, $(OBJECTS)) >> $(basename $@).link + @echo $(wordlist 146, 150, $(OBJECTS)) >> $(basename $@).link + @echo $(wordlist 151, 155, $(OBJECTS)) >> $(basename $@).link @echo $(wordlist 1, 2, $(WIN32_OBJECTS)) >> $(basename $@).link @@ -355,7 +377,6 @@ -@del "ext\standard\$(OBJ_DIR)\*.d" -@del "ext\bcmath\$(OBJ_DIR)\*.d" -@del "ext\bcmath\libbcmath\src\$(OBJ_DIR)\*.d" - -@del "ext\mcal\$(OBJ_DIR)\*.d" -@del "ext\pcre\$(OBJ_DIR)\*.d" -@del "ext\pcre\pcrelib\$(OBJ_DIR)\*.d" -@del "ext\odbc\$(OBJ_DIR)\*.d" @@ -381,7 +402,6 @@ -@del "ext\standard\$(OBJ_DIR)\*.obj" -@del "ext\bcmath\$(OBJ_DIR)\*.obj" -@del "ext\bcmath\libbcmath\src\$(OBJ_DIR)\*.obj" - -@del "ext\mcal\$(OBJ_DIR)\*.obj" -@del "ext\pcre\$(OBJ_DIR)\*.obj" -@del "ext\pcre\pcrelib\$(OBJ_DIR)\*.obj" -@del "ext\odbc\$(OBJ_DIR)\*.obj" Index: netware/pwd.h =================================================================== RCS file: /repository/php-src/netware/pwd.h,v retrieving revision 1.2 diff -u -r1.2 pwd.h --- netware/pwd.h 3 Jan 2003 11:46:20 -0000 1.2 +++ netware/pwd.h 26 Feb 2004 10:50:22 -0000 @@ -47,8 +47,4 @@ extern struct passwd *getpwnam(char *name); extern char *getlogin(void); -#ifndef NEW_LIBC -int getpid(); -#endif - #endif Index: netware/sendmail_nw.h =================================================================== RCS file: /repository/php-src/netware/sendmail_nw.h,v retrieving revision 1.1 diff -u -r1.1 sendmail_nw.h --- netware/sendmail_nw.h 3 Jan 2003 11:12:40 -0000 1.1 +++ netware/sendmail_nw.h 26 Feb 2004 10:50:22 -0000 @@ -1,12 +1,10 @@ #ifdef USE_WINSOCK -/*#include <ws2nlm.h>*/ #include <novsock2.h> #else #include <sys/socket.h> /* For struct sockaddr, 'PF_INET' and 'AF_INET' */ #include <netinet\in.h> /* For struct sockaddr_in */ #include <netdb.h> /* For struct hostent */ -/*#include <ws2name.h>*/ #endif /* USE_WINSOCK */ typedef int SOCKET; /* Borrowed from winsock\novsock2.h */ Index: netware/time_nw.h =================================================================== RCS file: /repository/php-src/netware/time_nw.h,v retrieving revision 1.2 diff -u -r1.2 time_nw.h --- netware/time_nw.h 3 Jan 2003 11:46:20 -0000 1.2 +++ netware/time_nw.h 26 Feb 2004 10:50:22 -0000 @@ -14,7 +14,6 @@ /* Include stuff ************************************************************ */ #ifdef USE_WINSOCK -/*#include <ws2nlm.h>*/ #include <novsock2.h> #else #include <sys/socket.h> Index: netware/tsrm.mak =================================================================== RCS file: /repository/php-src/netware/tsrm.mak,v retrieving revision 1.3 diff -u -r1.3 tsrm.mak --- netware/tsrm.mak 3 Jan 2003 11:46:20 -0000 1.3 +++ netware/tsrm.mak 26 Feb 2004 10:50:22 -0000 @@ -31,19 +31,23 @@ endif # Compile flags -C_FLAGS = -c -maxerrors 25 -msgstyle gcc +C_FLAGS += -c -maxerrors 25 -msgstyle gcc C_FLAGS += -wchar_t on -bool on C_FLAGS += -processor Pentium C_FLAGS += -nostdinc C_FLAGS += -relax_pointers # To remove type-casting errors -C_FLAGS += -DZTS -DNETWARE -DHAVE_DIRENT_H=1 -C_FLAGS += -DNEW_LIBC -C_FLAGS += -DUSE_MKFIFO -C_FLAGS += -DCLIB_STAT_PATCH -#C_FLAGS += -DUSE_MPK # To use the LibC recursive mutex locking -C_FLAGS += -I. -I- -I../netware -I$(SDK_DIR)/include # ../netware added for special SYS/STAT.H -C_FLAGS += -I$(MPK_DIR)/include1 -C_FLAGS += -I$(MWCIncludes) +C_FLAGS += -DZTS -DNETWARE -DHAVE_DIRENT_H=1 +C_FLAGS += -DUSE_MKFIFO +C_FLAGS += -DVIRTUAL_DIR=1 + +ifeq '$(APACHE_VER)' '2' +C_FLAGS += -DPTHREADS +C_FLAGS += -DAPACHE_2_BUILD=1 +endif + +C_FLAGS += -I. -I- -I../netware # ../netware added for special SYS/STAT.H +C_FLAGS += -I$(SDK_DIR)/include -I$(MPK_DIR)/include1 +C_FLAGS += -I$(MWCIncludes) # Link flags @@ -56,7 +60,7 @@ LD_FLAGS += -sym codeview4 -sym internal export MWLibraryFiles=$(SDK_DIR)/imports/libcpre.o;mwcrtld.lib else - C_FLAGS += -opt speed -inline smart -inline auto -sym off -DTSRM_DEBUG=0 + C_FLAGS += -opt all -inline smart -inline auto -sym off -DTSRM_DEBUG=0 LD_FLAGS += -sym off export MWLibraryFiles=$(SDK_DIR)/imports/libcpre.o;mwcrtl.lib endif @@ -89,7 +93,6 @@ @echo Linking $@... @$(LINK) $(LD_FLAGS) $(OBJECTS) - .PHONY: clean clean: cleanobj cleanbin Index: netware/zend.mak =================================================================== RCS file: /repository/php-src/netware/zend.mak,v retrieving revision 1.3 diff -u -r1.3 zend.mak --- netware/zend.mak 3 Jan 2003 11:46:20 -0000 1.3 +++ netware/zend.mak 26 Feb 2004 10:50:22 -0000 @@ -18,6 +18,7 @@ zend_builtin_functions.c \ zend_compile.c \ zend_constants.c \ + zend_default_classes.c \ zend_dynamic_array.c \ zend_execute.c \ zend_execute_API.c \ @@ -28,18 +29,27 @@ zend_ini.c \ zend_ini_parser.c \ zend_ini_scanner.c \ + zend_interfaces.c \ + zend_iterators.c \ zend_language_parser.c \ zend_language_scanner.c \ zend_list.c \ zend_llist.c \ + zend_mm.c \ zend_multibyte.c \ + zend_object_handlers.c \ + zend_objects.c \ + zend_objects_API.c \ zend_opcode.c \ zend_operators.c \ zend_ptr_stack.c \ zend_qsort.c \ + zend_reflection_api.c \ zend_sprintf.c \ zend_stack.c \ zend_static_allocator.c \ + zend_stream.c \ + zend_ts_hash.c \ zend_variables.c @@ -56,39 +66,43 @@ # Compile flags -C_FLAGS = -c -maxerrors 25 -msgstyle std +C_FLAGS += -c -maxerrors 25 -msgstyle std C_FLAGS += -wchar_t on -bool on C_FLAGS += -processor Pentium C_FLAGS += -nostdinc C_FLAGS += -relax_pointers # To remove type-casting errors C_FLAGS += -D__C9X_CMATH_INLINES_DEFINED C_FLAGS += -DNETWARE -DZTS -C_FLAGS += -DNEW_LIBC -C_FLAGS += -DCLIB_STAT_PATCH C_FLAGS += -DTHREAD_SWITCH # These are required to use dlclose so that the PHP extensions are automatically unloaded # when apache is unloaded -C_FLAGS += -DHAVE_DLFCN_H -DHAVE_LIBDL +C_FLAGS += -DHAVE_DLFCN_H=1 -DHAVE_LIBDL=1 -C_FLAGS += -I. -I- -I../netware -I$(SDK_DIR)/include # ../netware added for special SYS/STAT.H -C_FLAGS += -I$(MWCIncludes) +ifeq '$(APACHE_VER)' '1.3' +C_FLAGS += -DAPACHE_1_BUILD=1 +endif +ifeq '$(APACHE_VER)' '2' +C_FLAGS += -DAPACHE_2_BUILD=1 +endif +C_FLAGS += -I. -I- -I../netware # ../netware added for special SYS/STAT.H +C_FLAGS += -I$(SDK_DIR)/include -I$(MWCIncludes) # Link flags -LD_FLAGS = -type library +LD_FLAGS = -type library LD_FLAGS += -o $(BINARY) # Extra stuff based on debug / release builds ifeq '$(BUILD)' 'debug' - C_FLAGS += -DZEND_DEBUG=1 - C_FLAGS += -inline smart -sym on -sym codeview4 -sym internal -opt off -opt intrinsics + C_FLAGS += -DZEND_DEBUG=1 + C_FLAGS += -inline smart -sym on -sym codeview4 -sym internal -opt off -opt intrinsics LD_FLAGS += -sym codeview4 -sym internal export MWLibraryFiles=$(SDK_DIR)/imports/libcpre.o;mwcrtld.lib else - C_FLAGS += -opt speed -inline on -inline auto -sym off - C_FLAGS += -DZEND_DEBUG=0 + C_FLAGS += -opt all -inline on -inline auto -sym off + C_FLAGS += -DZEND_DEBUG=0 LD_FLAGS += -sym off export MWLibraryFiles=$(SDK_DIR)/imports/libcpre.o;mwcrtl.lib endif @@ -155,4 +169,3 @@ cleanbin: @echo Deleting binary files... -@del "$(FINAL_DIR)\$(MODULE_NAME).lib" - Index: netware/sys/stat.h =================================================================== RCS file: /repository/php-src/netware/sys/stat.h,v retrieving revision 1.6 diff -u -r1.6 stat.h --- netware/sys/stat.h 8 Jan 2004 17:33:07 -0000 1.6 +++ netware/sys/stat.h 26 Feb 2004 10:50:22 -0000 @@ -29,40 +29,8 @@ #include <pshpack1.h> -#ifdef CLIB_STAT_PATCH - -/***************** stat structure taken from CLib and modified ***************/ -struct stat -{ - long st_dev; /* volume number */ /* dev_t replaced by long */ - MACHINE_WORD st_ino; /* directory entry number of the st_name */ /* ino_t replaced by MACHINE_WORD */ - unsigned short st_mode; /* emulated file mode */ - unsigned short st_pad1; /* reserved for alignment */ - unsigned long st_nlink; /* count of hard links (always 1) */ - unsigned long st_uid; /* object id of owner */ - unsigned long st_gid; /* group-id (always 0) */ - long st_rdev; /* device type (always 0) */ /* dev_t replaced by long */ - off_t st_size; /* total file size--files only */ - time_t st_atime; /* last access date--files only */ - time_t st_mtime; /* last modify date and time */ - time_t st_ctime; /* POSIX: last status change time... */ - /* ...NetWare: creation date/time */ - time_t st_btime; /* last archived date and time */ - unsigned long st_attr; /* file attributes */ - unsigned long st_archivedID; /* user/object ID of last archive */ - unsigned long st_updatedID; /* user/object ID of last update */ - unsigned short st_inheritedRightsMask; /* inherited rights mask */ - unsigned short st_pad2; /* reserved for alignment */ - unsigned int st_originatingNameSpace; /* namespace of creation */ - size_t st_blksize; /* block size for allocation--files only */ - size_t st_blocks; /* count of blocks allocated to file */ - unsigned int st_flags; /* user-defined flags */ - unsigned long st_spare[4]; /* for future use */ - unsigned char st_name[255+1];/* TARGET_NAMESPACE name */ -}; -/***************** stat structure taken from CLib and modified ***************/ - -struct stat_libc +#ifndef CLIB_STAT_PATCH +struct stat { uint32_t st_userspec; /* untouched by stat() */ uint32_t st_flags; /* flags for this entry */ @@ -88,36 +56,37 @@ timespec_t st_btime; /* last archived date and time */ uint64_t st_spare4[44]; }; /* sizeof(struct dirent) == 0x200 (512.) */ - #else /* CLIB_STAT_PATCH */ - +/***************** stat structure taken from CLib ***************/ struct stat { - uint32_t st_userspec; /* untouched by stat() */ - uint32_t st_flags; /* flags for this entry */ - mode_t st_mode; /* emulated file mode */ - uint32_t st_spare1; - uint64_t st_gen; /* generation number of inode */ - ino_t st_ino; /* directory entry number */ - dev_t st_dev; /* volume number */ - dev_t st_rdev; /* device type (always 0) */ - off64_t st_size; /* total file size */ - uint64_t st_spare2; - blkcnt_t st_blocks; /* count of blocks allocated to file */ - blksize_t st_blksize; /* block size for allocation--files only */ - nlink_t st_nlink; /* count of hard links (always 1) */ - uint32_t st_spare3[3]; - uid_t st_uid; /* owner (object) identity */ - gid_t st_gid; /* group-id (always 0) */ - uid_t st_bid; /* identity of last archiver */ - uid_t st_mid; /* identity of last updator */ - timespec_t st_atime; /* last access date--files only */ - timespec_t st_mtime; /* last modify date and time */ - timespec_t st_ctime; /* last file attributes modification */ - timespec_t st_btime; /* last archived date and time */ - uint64_t st_spare4[44]; -}; /* sizeof(struct dirent) == 0x200 (512.) */ - + long st_dev; /* volume number */ /* dev_t replaced by long */ + MACHINE_WORD st_ino; /* directory entry number of the st_name */ /* ino_t replaced by MACHINE_WORD */ + unsigned short st_mode; /* emulated file mode */ + unsigned short st_pad1; /* reserved for alignment */ + unsigned long st_nlink; /* count of hard links (always 1) */ + unsigned long st_uid; /* object id of owner */ + unsigned long st_gid; /* group-id (always 0) */ + long st_rdev; /* device type (always 0) */ /* dev_t replaced by long */ + off_t st_size; /* total file size--files only */ + time_t st_atime; /* last access date--files only */ + time_t st_mtime; /* last modify date and time */ + time_t st_ctime; /* POSIX: last status change time... */ + /* ...NetWare: creation date/time */ + time_t st_btime; /* last archived date and time */ + unsigned long st_attr; /* file attributes */ + unsigned long st_archivedID; /* user/object ID of last archive */ + unsigned long st_updatedID; /* user/object ID of last update */ + unsigned short st_inheritedRightsMask; /* inherited rights mask */ + unsigned short st_pad2; /* reserved for alignment */ + unsigned int st_originatingNameSpace; /* namespace of creation */ + size_t st_blksize; /* block size for allocation--files only */ + size_t st_blocks; /* count of blocks allocated to file */ + unsigned int st_flags; /* user-defined flags */ + unsigned long st_spare[4]; /* for future use */ + unsigned char st_name[255+1];/* TARGET_NAMESPACE name */ +}; +/***************** stat structure taken from CLib ***************/ #endif /* CLIB_STAT_PATCH */ Index: sapi/apache/mod_php5.c =================================================================== RCS file: /repository/php-src/sapi/apache/mod_php5.c,v retrieving revision 1.7 diff -u -r1.7 mod_php5.c --- sapi/apache/mod_php5.c 8 Jan 2004 08:18:03 -0000 1.7 +++ sapi/apache/mod_php5.c 26 Feb 2004 10:50:24 -0000 @@ -825,21 +825,45 @@ static int php_xbithack_handler(request_rec * r) { HashTable *per_dir_conf; +#ifndef NETWARE + /* Anantha Kesari 21 Jan 2004 + * Further comments given below. + */ TSRMLS_FETCH(); +#endif if (!(r->finfo.st_mode & S_IXUSR)) { r->allowed |= (1 << METHODS) - 1; return DECLINED; } - per_dir_conf = (HashTable *) get_module_config(r->per_dir_config, &php5_module); - if (per_dir_conf) { - zend_hash_apply((HashTable *) per_dir_conf, (apply_func_t) php_apache_alter_ini_entries TSRMLS_CC); - } - if(!AP(xbithack)) { - r->allowed |= (1 << METHODS) - 1; - return DECLINED; +#ifdef NETWARE + /* Anantha Kesari 21 Jan 2004 + * + * TSRMLS_FETCH() allocates memory. + * What was happening here is that even for HTML pages, + * TSRMLS_FETCH() was being called and it allocated memory. + * But for HTML pages, request is not served and this memory + * is not freed since it returns DECLINED before it comes + * to this stage. So, there was a memory leak even for + * HTML pages execution with PHP enabled. By putting TSRMLS_FETCH() + * below, this memory leak is avoided since this stage + * is reached only if it is a PHP script and not just a HTML page. + */ + { + TSRMLS_FETCH(); +#endif + per_dir_conf = (HashTable *) get_module_config(r->per_dir_config, &php5_module); + if (per_dir_conf) { + zend_hash_apply((HashTable *) per_dir_conf, (apply_func_t) php_apache_alter_ini_entries TSRMLS_CC); + } + if(!AP(xbithack)) { + r->allowed |= (1 << METHODS) - 1; + return DECLINED; + } + return send_parsed_php(r); +#ifdef NETWARE } - return send_parsed_php(r); +#endif } /* }}} */ Index: sapi/apache/php_apache.c =================================================================== RCS file: /repository/php-src/sapi/apache/php_apache.c,v retrieving revision 1.86 diff -u -r1.86 php_apache.c --- sapi/apache/php_apache.c 8 Jan 2004 08:18:03 -0000 1.86 +++ sapi/apache/php_apache.c 26 Feb 2004 10:50:24 -0000 @@ -217,10 +217,9 @@ sprintf(output_buf, "Connection: %d - Keep-Alive: %d", serv->timeout, serv->keep_alive_timeout); php_info_print_table_row(2, "Timeouts", output_buf); #if !defined(WIN32) && !defined(WINNT) -/* - This block seems to be working on NetWare; But it seems to be showing - all modules instead of just the loaded ones -*/ + /* This block seems to be working on NetWare; But it seems to be showing + * all modules instead of just the loaded ones. + */ php_info_print_table_row(2, "Server Root", server_root); strcpy(modulenames, ""); Index: sapi/apache/php_apache_http.h =================================================================== RCS file: /repository/php-src/sapi/apache/php_apache_http.h,v retrieving revision 1.12 diff -u -r1.12 php_apache_http.h --- sapi/apache/php_apache_http.h 8 Jan 2004 17:33:15 -0000 1.12 +++ sapi/apache/php_apache_http.h 26 Feb 2004 10:50:25 -0000 @@ -27,6 +27,7 @@ #endif #ifdef NETWARE +/* Works fine for both Winsock and Berkeley sockets */ #include <netinet/in.h> #endif Index: sapi/apache2filter/php_apache.h =================================================================== RCS file: /repository/php-src/sapi/apache2filter/php_apache.h,v retrieving revision 1.23 diff -u -r1.23 php_apache.h --- sapi/apache2filter/php_apache.h 8 Jan 2004 17:33:17 -0000 1.23 +++ sapi/apache2filter/php_apache.h 26 Feb 2004 10:50:25 -0000 @@ -41,11 +41,7 @@ /* Index for reading from buffer */ int post_idx; /* stat structure of the current file */ -#if defined(NETWARE) && defined(CLIB_STAT_PATCH) - struct stat_libc finfo; -#else struct stat finfo; -#endif /* Buffer for request body filter */ char *post_data; /* Whether or not we've processed PHP in the output filters yet. */ Index: sapi/apache2filter/sapi_apache2.c =================================================================== RCS file: /repository/php-src/sapi/apache2filter/sapi_apache2.c,v retrieving revision 1.121 diff -u -r1.121 sapi_apache2.c --- sapi/apache2filter/sapi_apache2.c 8 Jan 2004 08:18:04 -0000 1.121 +++ sapi/apache2filter/sapi_apache2.c 26 Feb 2004 10:50:25 -0000 @@ -31,10 +31,10 @@ #include "SAPI.h" #include "ext/standard/php_smart_str.h" -#ifndef NETWARE -#include "ext/standard/php_standard.h" -#else +#ifdef NETWARE #include "ext/standard/basic_functions.h" +#else +#include "ext/standard/php_standard.h" #endif #include "apr_strings.h" @@ -172,7 +172,7 @@ ctx->finfo.st_uid = ctx->r->finfo.user; ctx->finfo.st_gid = ctx->r->finfo.group; ctx->finfo.st_ino = ctx->r->finfo.inode; -#if defined(NETWARE) && defined(CLIB_STAT_PATCH) +#ifdef NETWARE ctx->finfo.st_atime.tv_sec = ctx->r->finfo.atime/1000000; ctx->finfo.st_mtime.tv_sec = ctx->r->finfo.mtime/1000000; ctx->finfo.st_ctime.tv_sec = ctx->r->finfo.ctime/1000000; @@ -595,8 +595,12 @@ apache2_sapi_module.php_ini_path_override = apache2_php_ini_path_override; } #ifdef ZTS +#ifdef NETWARE + tsrm_startup(250, 1, 0, NULL); /* 250 threads */ +#else tsrm_startup(1, 1, 0, NULL); #endif +#endif sapi_startup(&apache2_sapi_module); apache2_sapi_module.startup(&apache2_sapi_module); apr_pool_cleanup_register(pconf, NULL, php_apache_server_shutdown, apr_pool_cleanup_null); @@ -628,27 +632,65 @@ } } +static apr_status_t php_server_context_cleanup(void *data_) +{ + void **data = data_; + *data = NULL; + return APR_SUCCESS; +} + static void php_insert_filter(request_rec *r) { int content_type_len = strlen("application/x-httpd-php"); if (r->content_type && !strncmp(r->content_type, "application/x-httpd-php", content_type_len-1)) { if (r->content_type[content_type_len] == '\0' || !strncmp(r->content_type+content_type_len, "-source", sizeof("-source"))) { +#if defined(NETWARE) && defined(ZTS) + /* Srivathsa / Anantha Kesari 5 Dec 2003 + * Do this only for PHP scripts and not for others. + * For non-PHP pages, this loop will not be entered. + * For more details, see the comments in php_post_read_request function. + */ + + php_struct *ctx; + TSRMLS_FETCH(); + + /* Initialize filter context */ + SG(server_context) = ctx = apr_pcalloc(r->pool, sizeof(*ctx)); + + /* register a cleanup so we clear out the SG(server_context) + * after each request. Note: We pass in the pointer to the + * server_context in case this is handled by a different thread. */ + apr_pool_cleanup_register(r->pool, (void *)&SG(server_context), + php_server_context_cleanup, + apr_pool_cleanup_null); + + /* Save the entire request, so we can get the input or output + * filters if we need them. */ + ctx->r = r; +#endif + php_add_filter(r, r->output_filters); php_add_filter(r, r->input_filters); } } } -static apr_status_t php_server_context_cleanup(void *data_) -{ - void **data = data_; - *data = NULL; - return APR_SUCCESS; -} - static int php_post_read_request(request_rec *r) { +#ifndef NETWARE + /* Srivathsa / Anantha Kesari 5 Dec 2003 + * The below code was being executed even when only the html page + * was requested. When compiled with ZTS option, PHP is designed NOT + * to free memory but keep it, so that next requests can reuse them. + * This is done for improving performance. Now even for html pages, + * memory was being allocated through TSRMLS_FETCH() call below + * and this was not freed since PHP for NetWare is compiled with ZTS option. + * This would cause memory leak even for non-PHP pages. + * So, we have commented this portion and put this portion into + * php_insert_filter function where PHP scripts are invoked. + */ + php_struct *ctx; TSRMLS_FETCH(); @@ -665,6 +707,7 @@ /* Save the entire request, so we can get the input or output * filters if we need them. */ ctx->r = r; +#endif return OK; } Index: sapi/apache2handler/php_apache.h =================================================================== RCS file: /repository/php-src/sapi/apache2handler/php_apache.h,v retrieving revision 1.7 diff -u -r1.7 php_apache.h --- sapi/apache2handler/php_apache.h 8 Jan 2004 17:33:18 -0000 1.7 +++ sapi/apache2handler/php_apache.h 26 Feb 2004 10:50:26 -0000 @@ -37,11 +37,7 @@ request_rec *r; apr_bucket_brigade *brigade; /* stat structure of the current file */ -#if defined(NETWARE) && defined(CLIB_STAT_PATCH) - struct stat_libc finfo; -#else struct stat finfo; -#endif /* Whether or not we've processed PHP in the output filters yet. */ int request_processed; } php_struct; Index: sapi/apache2handler/sapi_apache2.c =================================================================== RCS file: /repository/php-src/sapi/apache2handler/sapi_apache2.c,v retrieving revision 1.32 diff -u -r1.32 sapi_apache2.c --- sapi/apache2handler/sapi_apache2.c 8 Jan 2004 08:18:05 -0000 1.32 +++ sapi/apache2handler/sapi_apache2.c 26 Feb 2004 10:50:26 -0000 @@ -31,10 +31,10 @@ #include <fcntl.h> #include "ext/standard/php_smart_str.h" -#ifndef NETWARE -#include "ext/standard/php_standard.h" -#else +#ifdef NETWARE #include "ext/standard/basic_functions.h" +#else +#include "ext/standard/php_standard.h" #endif #include "apr_strings.h" @@ -182,7 +182,7 @@ ctx->finfo.st_uid = ctx->r->finfo.user; ctx->finfo.st_gid = ctx->r->finfo.group; ctx->finfo.st_ino = ctx->r->finfo.inode; -#if defined(NETWARE) && defined(CLIB_STAT_PATCH) +#ifdef NETWARE ctx->finfo.st_atime.tv_sec = ctx->r->finfo.atime/1000000; ctx->finfo.st_mtime.tv_sec = ctx->r->finfo.mtime/1000000; ctx->finfo.st_ctime.tv_sec = ctx->r->finfo.ctime/1000000; Index: sapi/cli/php_getopt.h =================================================================== RCS file: /repository/php-src/sapi/cli/php_getopt.h,v retrieving revision 1.5 diff -u -r1.5 php_getopt.h --- sapi/cli/php_getopt.h 8 Jan 2004 17:33:23 -0000 1.5 +++ sapi/cli/php_getopt.h 26 Feb 2004 10:50:27 -0000 @@ -20,6 +20,14 @@ #include "php.h" +#ifdef NETWARE +/* The below are undefined since these symbols are using in CLI and + * this clashes with the same defines made in LibC. + */ +#undef optarg +#undef optind +#endif + /* Define structure for one recognized option (both single char and long name). * If short_open is '-' this is the last option. */ Index: win32/sendmail.c =================================================================== RCS file: /repository/php-src/win32/sendmail.c,v retrieving revision 1.59 diff -u -r1.59 sendmail.c --- win32/sendmail.c 8 Dec 2003 22:10:42 -0000 1.59 +++ win32/sendmail.c 26 Feb 2004 10:50:29 -0000 @@ -1,5 +1,5 @@ /* - * PHP Sendmail for Windows. + * PHP Sendmail for Windows and NetWare. * * This file is rewriten specificly for PHPFI. Some functionality * has been removed (MIME and file attachments). This code was @@ -97,7 +97,7 @@ #ifndef NETWARE char *php_mailer = "PHP 4 WIN32"; #else -char *php_mailer = "PHP 4 NetWare"; +char *php_mailer = "PHP 5 NetWare"; #endif /* NETWARE */ char *get_header(char *h, char *headers);