+++ /dev/null
-# Temporarily here -- later may go into some batch file
-# which will set this as an environment variable
-PROJECT_ROOT = ..
-
-# Module details
-MODULE_NAME = ZendEngine2
-
-#MODULE_ROOT = $(PROJECT_ROOT)\\$(MODULE_NAME)
-
-#include the common settings
-include $(PROJECT_ROOT)/netware/common.mif
-
-# Extensions of all input and output files
-.SUFFIXES:
-.SUFFIXES: .nlm .lib .obj .cpp .c .msg .mlc .mdb .xdc .d
-
-C_SRC = zend.c \
- zend_alloc.c \
- zend_API.c \
- zend_builtin_functions.c \
- zend_compile.c \
- zend_constants.c \
- zend_dynamic_array.c \
- zend_execute.c \
- zend_execute_API.c \
- zend_extensions.c \
- zend_hash.c \
- zend_highlight.c \
- zend_indent.c \
- zend_ini.c \
- zend_list.c \
- zend_llist.c \
- zend_multibyte.c \
- zend_object_handlers.c \
- zend_objects.c \
- zend_opcode.c \
- zend_operators.c \
- zend_ptr_stack.c \
- zend_qsort.c \
- zend_sprintf.c \
- zend_stack.c \
- zend_static_allocator.c \
- zend_ts_hash.c \
- zend_variables.c \
- zend_ini_parser.c \
- zend_ini_scanner.c \
- zend_language_parser.c \
- zend_language_scanner.c
-
-
-# Destination directories and files
-OBJ_DIR = $(BUILD)
-FINAL_DIR = $(BUILD)
-OBJECTS = $(addprefix $(OBJ_DIR)/,$(CPP_SRC:.cpp=.obj) $(C_SRC:.c=.obj))
-DEPDS = $(addprefix $(OBJ_DIR)/,$(CPP_SRC:.cpp=.d) $(C_SRC:.c=.d))
-
-# Binary file
-ifndef BINARY
- BINARY=$(FINAL_DIR)\$(MODULE_NAME).lib
-endif
-
-
-# Compile flags
-C_FLAGS = -c -maxerrors 25 -msgstyle std
-C_FLAGS += -wchar_t on -bool on
-C_FLAGS += -processor Pentium -align 1
-C_FLAGS += -nostdinc
-C_FLAGS += -D__C9X_CMATH_INLINES_DEFINED
-C_FLAGS += -DNETWARE -D__GNUC__
-C_FLAGS += -DZTS
-C_FLAGS += -DCLIB_STAT_PATCH
-C_FLAGS += -DTHREAD_SWITCH
-C_FLAGS += -I. -I- -I../netware -I$(SDK_DIR)/include # ../netware added for special SYS/STAT.H
-C_FLAGS += -I$(MWCIncludes)
-
-# Link flags
-LD_FLAGS = -type library
-LD_FLAGS += -o $(BINARY)
-
-
-# Extra stuff based on debug / release builds
-ifeq '$(BUILD)' 'debug'
- C_FLAGS += -DZEND_DEBUG
- 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
- LD_FLAGS += -sym off
- export MWLibraryFiles=$(SDK_DIR)/imports/libcpre.o;mwcrtl.lib
-endif
-
-
-# Virtual paths
-vpath %.cpp .
-vpath %.c .
-vpath %.obj $(OBJ_DIR)
-
-
-all: prebuild project
-
-.PHONY: all
-
-prebuild:
- @if not exist $(OBJ_DIR) md $(OBJ_DIR)
-
-project: $(BINARY) $(MESSAGE)
- @echo Build complete.
-
-
-##zend_ini_parser.c zend_ini_parser.h : zend_ini_parser.y
-## @bison --output=$@ -v -d -p ini_ zend_ini_parser.y
-
-##zend_ini_scanner.c : zend_ini_scanner.l
-## @flex -i -Pini_ -o$@ zend_ini_scanner.l
-
-##zend_language_parser.c zend_language_parser.h : zend_language_parser.y
-## @bison --output=$@ -v -d -p zend zend_language_parser.y
-
-##zend_language_scanner.c : zend_language_scanner.l
-## @flex -i -Pzend -o$@ zend_language_scanner.l
-
-$(OBJ_DIR)/%.d: %.c
- @echo Building Dependencies for $(<F)
- @$(CC) -M $< $(C_FLAGS) -o $@
-
-$(OBJ_DIR)/%.obj: %.c
- @echo Compiling $?...
- @$(CC) $< $(C_FLAGS) -o $@
-
-
-$(BINARY): $(DEPDS) $(OBJECTS)
- @echo Linking $@...
- @$(LINK) $(LD_FLAGS) $(OBJECTS)
-
-
-.PHONY: clean
-clean: cleansrc cleand cleanobj cleanbin
-
-.PHONY: cleansrc
-cleansrc:
- @echo Deleting all generated source files...
- -@del "zend_ini_parser.c"
- -@del "zend_ini_parser.h"
- -@del "zend_ini_scanner.c"
- -@del "zend_language_parser.c"
- -@del "zend_language_parser.h"
- -@del "zend_language_scanner.c"
- -@del "zend_ini_parser.output"
- -@del "zend_language_parser.output"
-
-
-.PHONY: cleand
-cleand:
- @echo Deleting all dependency files...
- -@del "$(OBJ_DIR)\*.d"
-
-.PHONY: cleanobj
-cleanobj:
- @echo Deleting all object files...
- -@del "$(OBJ_DIR)\*.obj"
-
-.PHONY: cleanbin
-cleanbin:
- @echo Deleting binary files...
- -@del "$(FINAL_DIR)\$(MODULE_NAME).lib"
-
+++ /dev/null
-@echo off
-
-cd ..\%1
-
-if "%2" == "clean" make -f ..\netware\%1.mak clean
-if "%2" == "/?" goto USAGE
-
-if "%1" == "zend" call ..\netware\BisonFlexZend
-if "%1" == "ZendEngine2" call ..\netware\BisonFlexZend
-
-REM Build command
-make -f ..\netware\%1.mak
-goto EXIT
-
-:USAGE
- @echo on
- @echo Usage: build moduleName [clean]
- @echo clean - delete all object files and binaries before building
-
-:EXIT
-cd ..\netware
\ No newline at end of file
+++ /dev/null
-@echo off
-
-cd ..\ext\%1
-
-if "%2" == "clean" make -f %1.mak clean
-if "%2" == "/?" goto USAGE
-
-REM Build command
-make -f %1.mak
-goto EXIT
-
-:USAGE
- @echo on
- @echo Usage: buildext extension_name [clean]
- @echo clean - delete all object files and binaries before building
-
-:EXIT
-cd ..\..\netware
+++ /dev/null
-@echo off
-
-cd ..
-
-if "%1" == "clean" make -f netware\phplib.mak clean
-if "%1" == "/?" goto USAGE
-
-REM Build command
-make -f netware\phplib.mak
-goto EXIT
-
-:USAGE
- @echo on
- @echo Usage: buildlib [clean]
- @echo clean - delete all object files and binaries before building
-
-:EXIT
-cd netware
\ No newline at end of file
+++ /dev/null
-@echo off
-
-cd ..\sapi\%1
-
-if "%2" == "clean" make -f ..\..\netware\php4%1.mak clean
-if "%2" == "/?" goto USAGE
-
-REM Build command
-make -f ..\..\netware\php4%1.mak
-goto EXIT
-
-:USAGE
- @echo on
- @echo Usage: buildsapi SAPI_Module_Name [clean]
- @echo clean - delete all object files and binaries before building
-
-:EXIT
-cd ..\..\netware
+++ /dev/null
-#
-# common include file for PHP build
-# include this in every make file
-#
-
-# Set following directories based on your setting
-
-# Path to CodeWarrior installation
-CW_PATH = P:/APPS/SCRIPT/SW/CW71-4
-
-# NWSDK directories
-ifndef SDK_DIR
-SDK_DIR = R:/script/common/libc
-endif
-
-# MPK related directory
-ifndef MPK_DIR
-MPK_DIR = p:/apps/script/mpk
-endif
-
-#ifndef CLIB_DIR
-#CLIB_DIR = p:/apps/ndk0601/nwsdk
-#endif
-
-# Winsock stuff
-WINSOCK_DIR = P:/APPS/script/sw/Winsock2
-
-# LDAP stuff
-LDAP_DIR = P:/APPS/script/sw/cldapsdk
-
-# Apache directory
-ifndef APACHE_DIR
-APACHE_DIR = P:/APPS/script/sw/Apache1.3.xSource
-endif
-
-
-# CW includes, libraries and tools
-export MWCIncludes=$(CW_PATH)/include
-export MWLibraries=$(CW_PATH)/lib
-
-# Compiler and linker tools
-CC = mwccnlm
-LINK = mwldnlm
-
-# Build type defaults to 'release'
-ifndef BUILD
-BUILD = release
-endif
-#BUILD = debug
-
-OBJ_DIR = $(BUILD)
-FINAL_DIR = $(BUILD)
-MAP_FILE = $(FINAL_DIR)\$(MODULE_NAME).map
-
-ifndef STACK_SIZE
-STACK_SIZE=65536
-endif
-
-ifndef COPYRIGHT
-#COPYRIGHT = "Copyright (c) 1997-2002 The PHP Group. All Rights Reserved."
-COPYRIGHT = "Copyright (c) 1999\, 2000 The PHP Group. All rights reserved."
-endif
-
-# Link flags
-LD_FLAGS = -stacksize $(STACK_SIZE) -type generic -zerobss
-LD_FLAGS += -o $(BINARY) -map $(MAP_FILE) -nlmversion $(VMAJ),$(VMIN),$(VREV)
-
-# Module details
-LD_FLAGS += -desc $(MODULE_DESC)
-LD_FLAGS += -copy $(COPYRIGHT)
-LD_FLAGS += -screenname Default
-LD_FLAGS += -threadname $(MODULE_NAME)__p
-
+++ /dev/null
-char* mktemp(char* templateStr);
+++ /dev/null
-@echo off
-
-REM CodeWarrior stuff
-set path=%path%;P:\APPS\SCRIPT\SW\CW71-4\BIN
-
-REM Cygwin stuff
-REM set path=%path%;R:\SCRIPT\PHP\CYGWIN\BIN
-REM set CYGWIN=R:\SCRIPT\PHP\CYGWIN
-
-REM Tools for building Zend
-set path=%path%;P:\APPS\SCRIPT\SW\GNUWIN32\BIN
-
-REM Build options
-REM set BUILD=release
-setbuild r 1
+++ /dev/null
-# Temporarily here -- later may go into some batch file
-# which will set this as an environment variable
-PROJECT_ROOT = ../..
-
-# Module details
-MODULE_NAME = mod_php
-MODULE_DESC = "PHP 4.x.x for NetWare - mod_php"
-VMAJ = 0
-VMIN = 90
-VREV = 0
-
-#include the common settings
-include $(PROJECT_ROOT)/netware/common.mif
-
-# Extensions of all input and output files
-.SUFFIXES:
-.SUFFIXES: .nlm .lib .obj .cpp .c .msg .mlc .mdb .xdc .d
-
-# Source files
-C_SRC = mod_php4.c \
- php_apache.c \
- sapi_apache.c
-
-# Destination directories and files
-OBJ_DIR = $(BUILD)
-FINAL_DIR = $(BUILD)
-MAP_FILE = $(FINAL_DIR)\$(MODULE_NAME).map
-OBJECTS = $(addprefix $(OBJ_DIR)/,$(CPP_SRC:.cpp=.obj) $(C_SRC:.c=.obj))
-DEPDS = $(addprefix $(OBJ_DIR)/,$(CPP_SRC:.cpp=.d) $(C_SRC:.c=.d))
-
-# Binary file
-ifndef BINARY
-BINARY=$(FINAL_DIR)\$(MODULE_NAME).nlm
-endif
-
-
-# Compile flags
-C_FLAGS = -c -maxerrors 25 -msgstyle gcc
-C_FLAGS += -wchar_t on -bool on
-C_FLAGS += -processor Pentium -align 1
-C_FLAGS += -w nounusedarg -msext on
-C_FLAGS += -nostdinc
-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 += -DUSE_WINSOCK_DIRECTLY=1
-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$(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$(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 += -r -DZEND_DEBUG
- C_FLAGS += -exc cw
- LD_FLAGS += -sym on -sym codeview4 -sym internal -osym $(SYM_FILE)
- 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 intrinsics
- C_FLAGS += -opt level=4
- LD_FLAGS += -sym off
- export MWLibraryFiles=$(SDK_DIR)/imports/libcpre.o;mwcrtl.lib
-endif
-
-# Dependencies
-MODULE = LibC \
- phplib
-IMPORT = @$(SDK_DIR)/imports/libc.imp \
- @$(APACHE_DIR)/os/netware/apachecore.imp \
- @$(PROJECT_ROOT)/netware/phplib.imp
-EXPORT = php4_module
-
-
-# Virtual paths
-vpath %.cpp .
-vpath %.c .
-vpath %.obj $(OBJ_DIR)
-
-
-all: prebuild project
-
-.PHONY: all
-
-prebuild:
- @if not exist $(OBJ_DIR) md $(OBJ_DIR)
-
-project: $(BINARY) $(MESSAGE)
- @echo Build complete.
-
-
-$(OBJ_DIR)/%.d: %.c
- @echo Building Dependencies for $(<F)
- @$(CC) -M $< $(C_FLAGS) -o $@
-
-$(OBJ_DIR)/%.obj: %.c
- @echo Compiling $?...
- @$(CC) $< $(C_FLAGS) -o $@
-
-
-$(BINARY): $(DEPDS) $(OBJECTS)
- @echo Import $(IMPORT) > $(basename $@).def
-ifdef API
- @echo Import $(API) >> $(basename $@).def
-endif
- @echo Module $(MODULE) >> $(basename $@).def
-ifdef EXPORT
- @echo Export $(EXPORT) >> $(basename $@).def
-endif
- @echo AutoUnload >> $(basename $@).def
-ifeq '$(BUILD)' 'debug'
- @echo Debug >> $(basename $@).def
-endif
- @echo Flag_On 0x00000008 >> $(basename $@).def
- @echo Start _lib_start >> $(basename $@).def
- @echo Exit _lib_stop >> $(basename $@).def
-
- @echo Linking $@...
- @echo $(LD_FLAGS) -commandfile $(basename $@).def > $(basename $@).link
-ifdef LIBRARY
- @echo $(LIBRARY) >> $(basename $@).link
-endif
- @echo $(OBJECTS) $(APACHE_DIR)/os/netware/libpre.obj >> $(basename $@).link
-
- @$(LINK) @$(basename $@).link
-
-
-.PHONY: clean
-clean: cleand cleanobj cleanbin
-
-.PHONY: cleand
-cleand:
- @echo Deleting all dependency files...
- -@del "$(OBJ_DIR)\*.d"
-
-.PHONY: cleanobj
-cleanobj:
- @echo Deleting all object files...
- -@del "$(OBJ_DIR)\*.obj"
-
-.PHONY: cleanbin
-cleanbin:
- @echo Deleting binary files...
- -@del "$(FINAL_DIR)\$(MODULE_NAME).nlm"
- @echo Deleting MAP, DEF files, etc....
- -@del "$(FINAL_DIR)\$(MODULE_NAME).map"
- -@del "$(FINAL_DIR)\$(MODULE_NAME).def"
- -@del "$(FINAL_DIR)\$(MODULE_NAME).link"
-ifeq '$(BUILD)' 'debug'
- -@del $(FINAL_DIR)\$(MODULE_NAME).sym
-endif
+++ /dev/null
-_array_init,
-_convert_to_string,
-_efree,
-_emalloc,
-_estrdup,
-_estrndup,
-_object_init,
-_object_init_ex,
-_persist_alloc,
-_zend_get_parameters_array,
-_zend_list_addref,
-_zend_list_delete,
-_zend_list_find,
-_zval_copy_ctor,
-_zval_dtor,
-add_assoc_long_ex,
-add_index_null,
-add_index_long,
-add_assoc_string_ex,
-add_assoc_stringl_ex,
-add_assoc_null_ex,
-add_index_string,
-add_index_stringl,
-add_next_index_bool,
-add_next_index_long,
-add_next_index_string,
-add_next_index_stringl,
-add_property_long_ex,
-add_property_string_ex,
-compiler_globals_id,
-convert_to_boolean,
-convert_to_long,
-core_globals_id,
-display_ini_entries,
-display_link_numbers,
-empty_string,
-executor_globals_id,
-expand_filepath,
-get_zend_version,
-get_active_function_name,
-highlight_file,
-le_index_ptr,
-module_registry,
-open_file_for_scanning,
-_object_and_properties_init,
-php_addslashes,
-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_get_current_user,
-php_get_highlight_struct,
-php_handle_auth_data,
-php_header,
-php_header_write,
-php_import_environment_variables,
-php_info_print_table_end,
-php_info_print_table_colspan_header,
-php_info_print_table_header,
-php_info_print_table_row,
-php_info_print_table_start,
-php_lint_script,
-php_log_err,
-php_module_shutdown,
-php_module_shutdown_for_exec,
-php_module_shutdown_wrapper,
-php_module_startup,
-php_output_activate,
-php_output_set_status,
-php_output_startup,
-php_print_info,
-php_printf,
-php_register_variable,
-php_request_shutdown,
-php_request_shutdown_for_exec,
-php_request_startup,
-php_strlcpy,
-php_strtolower,
-sapi_free_header,
-sapi_get_default_content_type,
-sapi_globals_id,
-sapi_shutdown,
-sapi_startup,
-ts_allocate_id,
-ts_resource_ex,
-tsrm_shutdown,
-tsrm_startup,
-virtual_fopen,
-zend_alter_ini_entry,
-zend_error,
-zend_execute_scripts,
-zend_fetch_resource,
-zend_get_parameters_ex,
-zend_hash_add_or_update,
-zend_hash_apply,
-zend_hash_apply_with_argument,
-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_index_find,
-zend_hash_index_update_or_next_insert,
-zend_hash_init,
-zend_hash_internal_pointer_reset_ex
-zend_hash_merge_ex,
-zend_hash_move_forward_ex,
-zend_hash_num_elements,
-zend_highlight,
-zend_ini_deactivate,
-zend_ini_boolean_displayer_cb,
-zend_list_insert,
-zend_llist_add_element,
-zend_llist_apply,
-zend_llist_destroy,
-zend_llist_init,
-zend_load_extension,
-zend_parse_parameters,
-zend_printf,
-zend_register_ini_entries,
-zend_register_internal_class,
-zend_register_list_destructors_ex,
-zend_register_long_constant,
-zend_register_resource,
-zend_startup_module,
-zend_standard_class_def,
-zend_unregister_ini_entries,
-zend_wrong_param_count,
-OnUpdateInt,
-OnUpdateString,
-OnUpdateStringUnempty
+++ /dev/null
-# Temporarily here -- later may go into some batch file
-# which will set this as an environment variable
-PROJECT_ROOT = .
-
-# Module details
-MODULE_NAME = phplib
-MODULE_DESC = "PHP 4.0.8 for NetWare (Beta) - PHP Library"
-VMAJ = 0
-VMIN = 60
-VREV = 1
-
-#include the common settings
-include $(PROJECT_ROOT)/netware/common.mif
-
-
-# Extensions of all input and output files
-.SUFFIXES:
-.SUFFIXES: .nlm .lib .obj .cpp .c .msg .mlc .mdb .xdc .d
-
-# Source files
-C_SRC = ext/bcmath/bcmath.c \
- ext/bcmath/libbcmath/src/add.c \
- ext/bcmath/libbcmath/src/compare.c \
- ext/bcmath/libbcmath/src/debug.c \
- ext/bcmath/libbcmath/src/div.c \
- ext/bcmath/libbcmath/src/divmod.c \
- ext/bcmath/libbcmath/src/doaddsub.c \
- ext/bcmath/libbcmath/src/init.c \
- ext/bcmath/libbcmath/src/int2num.c \
- ext/bcmath/libbcmath/src/nearzero.c \
- ext/bcmath/libbcmath/src/neg.c \
- ext/bcmath/libbcmath/src/num2long.c \
- ext/bcmath/libbcmath/src/num2str.c \
- ext/bcmath/libbcmath/src/outofmem.c \
- ext/bcmath/libbcmath/src/output.c \
- ext/bcmath/libbcmath/src/raise.c \
- ext/bcmath/libbcmath/src/raisemod.c \
- ext/bcmath/libbcmath/src/recmul.c \
- ext/bcmath/libbcmath/src/rmzero.c \
- ext/bcmath/libbcmath/src/rt.c \
- ext/bcmath/libbcmath/src/sqrt.c \
- ext/bcmath/libbcmath/src/str2num.c \
- ext/bcmath/libbcmath/src/sub.c \
- ext/bcmath/libbcmath/src/zero.c \
- ext/calendar/cal_unix.c \
- ext/calendar/calendar.c \
- ext/calendar/dow.c \
- ext/calendar/easter.c \
- ext/calendar/french.c \
- ext/calendar/gregor.c \
- ext/calendar/jewish.c \
- 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/study.c \
- ext/session/mod_files.c \
- ext/session/mod_user.c \
- ext/session/session.c \
- ext/snmp/snmp.c \
- ext/standard/array.c \
- ext/standard/assert.c \
- ext/standard/base64.c \
- ext/standard/basic_functions.c \
- ext/standard/browscap.c \
- ext/standard/crc32.c \
- ext/standard/credits.c \
- ext/standard/cyr_convert.c \
- ext/standard/datetime.c \
- ext/standard/dir.c \
- ext/standard/dl.c \
- ext/standard/dns.c \
- ext/standard/exec.c \
- ext/standard/file.c \
- ext/standard/filestat.c \
- ext/standard/flock_compat.c \
- ext/standard/formatted_print.c \
- ext/standard/fsock.c \
- ext/standard/ftp_fopen_wrapper.c \
- ext/standard/head.c \
- ext/standard/html.c \
- ext/standard/http_fopen_wrapper.c \
- ext/standard/image.c \
- ext/standard/incomplete_class.c \
- ext/standard/info.c \
- ext/standard/iptc.c \
- ext/standard/lcg.c \
- ext/standard/levenshtein.c \
- ext/standard/link.c \
- ext/standard/mail.c \
- ext/standard/math.c \
- ext/standard/md5.c \
- ext/standard/metaphone.c \
- ext/standard/microtime.c \
- ext/standard/pack.c \
- ext/standard/pageinfo.c \
- ext/standard/parsedate.c \
- ext/standard/php_fopen_wrapper.c \
- ext/standard/quot_print.c \
- ext/standard/rand.c \
- ext/standard/reg.c \
- ext/standard/scanf.c \
- ext/standard/soundex.c \
- ext/standard/string.c \
- ext/standard/strnatcmp.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/var.c \
- main/fopen_wrappers.c \
- main/internal_functions_nw.c \
- main/main.c \
- main/mergesort.c \
- main/network.c \
- main/output.c \
- main/php_content_types.c \
- main/php_ini.c \
- main/php_logos.c \
- main/php_open_temporary_file.c \
- main/php_ticks.c \
- main/php_variables.c \
- main/reentrancy.c \
- main/rfc1867.c \
- main/safe_mode.c \
- main/SAPI.c \
- main/snprintf.c \
- main/strlcat.c \
- main/strlcpy.c \
- netware/env.c \
- netware/geterrnoptr.c \
- netware/mktemp.c \
- netware/pipe.c \
- netware/pwd.c \
- netware/sendmail.c \
- netware/start.c \
- netware/wfile.c \
- regex/regcomp.c \
- regex/regerror.c \
- regex/regexec.c \
- regex/regfree.c \
-# ext/standard/crypt.c \
-# ext/xml/xml.c \
-# ext/com/COM.c \
-# ext/com/conversion.c \
-# ext/ldap/ldap.c \
-# ext/odbc/php_odbc.c \
-# ext/snmp/winsnmp.c \
-# netware/winutil.c \
-# ext/mysql/php_mysql.c \
-# ext/standard/syslog.c \
-# netware/registry.c \
-# netware/time_nw.c \
-# netware/wsyslog.c
-# ext/xml/expat/xmlparse/hashtable.c \
-# ext/xml/expat/xmlparse/xmlparse.c \
-# ext/xml/expat/xmltok/xmlrole.c \
-# ext/xml/expat/xmltok/xmltok.c \
-# ext/xml/expat/xmltok/xmltok_impl.c \
-# ext/xml/expat/xmltok/xmltok_ns.c \
-# ext/wddx/wddx.c \
-# netware/readdir.c \
-
-
-CPP_SRC_NODIR = $(notdir $(CPP_SRC))
-C_SRC_NODIR = $(notdir $(C_SRC))
-SRC_DIR = $(dir $(CPP_SRC) $(C_SRC))
-
-# Library files
-LIBRARY = $(PROJECT_ROOT)/Zend/$(BUILD)/Zend.lib $(PROJECT_ROOT)/TSRM/$(BUILD)/TSRM.lib
-LIBRARY += $(PROJECT_ROOT)/win32build/lib/resolv.lib
-#LIBRARY += libmysql.lib
-
-# Destination directories and files
-OBJ_DIR = $(BUILD)
-FINAL_DIR = $(BUILD)
-MAP_FILE = $(FINAL_DIR)\$(MODULE_NAME).map
-OBJECTS = $(join $(SRC_DIR), $(addprefix $(OBJ_DIR)/,$(CPP_SRC_NODIR:.c=.obj) $(C_SRC_NODIR:.c=.obj)))
-DEPDS = $(join $(SRC_DIR), $(addprefix $(OBJ_DIR)/,$(CPP_SRC_NODIR:.c=.d) $(C_SRC_NODIR:.c=.d)))
-
-# Binary file
-ifndef BINARY
- BINARY=$(FINAL_DIR)\$(MODULE_NAME).nlm
-endif
-
-# Compile flags
-C_FLAGS += -c -maxerrors 25 -msgstyle gcc
-C_FLAGS += -wchar_t on -bool on
-C_FLAGS += -processor Pentium
-C_FLAGS += -nostdinc -nosyspath
-C_FLAGS += -DNETWARE -D__BIT_TYPES_DEFINED__ -DZTS
-#C_FLAGS += -DZEND_DEBUG
-C_FLAGS += -DPHP4DLLTS_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 += -DCOMPILE_DL_LDAP
-C_FLAGS += -DNEW_LIBC -DHAVE_ARPA_INET_H=1 -DHAVE_NETINET_IN_H=1 -DHAVE_INET_ATON=1
-#C_FLAGS += -DUSE_WINSOCK -DUSE_WINSOCK_DIRECTLY=1
-C_FLAGS += -I. -Imain -Inetware -Iregex -I./bindlib_w32 -IZend -ITSRM
-C_FLAGS += -Iext/standard -Iext/mcal -Iext/pcre -Iext/pcre/pcrelib
-C_FLAGS += -Iext/bcmath -Iext/bcmath/libbcmath/src
-#C_FLAGS += -Iext/ldap
-C_FLAGS += -Iext/xml -Iext/xml/expat/xmltok -Iext/xml/expat -Iext/xml/expat/xmlparse
-C_FLAGS += -Iext/odbc -Iext/session -Iext/ftp -Iext/wddx -Iext/calendar -Iext/snmp
-#C_FLAGS += -Iext/mysql -Iext/mysql/libmysql
-#C_FLAGS += -I- -Inetware -I$(SDK_DIR)/sdk -I$(MWCIncludes) # netware added for special SYS/STAT.H : Venkat(6/2/02)
-C_FLAGS += -I- -Inetware -I$(SDK_DIR)/include -I$(MWCIncludes) # netware added for special SYS/STAT.H : Venkat(6/2/02)
-
-C_FLAGS += -I$(SDK_DIR)/include/winsock # Added for socket calls : Ananth (16 Aug 2002)
-
-#C_FLAGS += -I$(LDAP_DIR)/inc
-
-
-# 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 += -D_DEBUG -DZEND_DEBUG=1 #-r
- 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
- LD_FLAGS += -sym off
- export MWLibraryFiles=$(SDK_DIR)/imports/libcpre.o;mwcrtl.lib
-endif
-
-# Dependencies
-MODULE = LibC
-IMPORT = @$(SDK_DIR)/imports/libc.imp \
- @$(SDK_DIR)/imports/ws2nlm.imp \
- @$(MPK_DIR)/import/mpkOrg.imp
-EXPORT = @$(PROJECT_ROOT)/netware/phplib.imp
-API = NXGetEnvCount \
- NXCopyEnv \
- OutputToScreen \
- bsd_fd_set
-
-
-# Virtual paths
-vpath %.cpp .
-vpath %.c .
-vpath %.obj $(OBJ_DIR)
-
-
-all: prebuild project
-
-.PHONY: all
-
-prebuild:
- @if not exist main\$(OBJ_DIR) md main\$(OBJ_DIR)
- @if not exist regex\$(OBJ_DIR) md regex\$(OBJ_DIR)
- @if not exist bindlib_w32\$(OBJ_DIR) md bindlib_w32\$(OBJ_DIR)
- @if not exist netware\$(OBJ_DIR) md netware\$(OBJ_DIR)
- @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\mysql\$(OBJ_DIR) md ext\mysql\$(OBJ_DIR)
- @if not exist ext\mysql\libmysql\$(OBJ_DIR) md ext\mysql\libmysql\$(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)
- @if not exist ext\xml\$(OBJ_DIR) md ext\xml\$(OBJ_DIR)
- @if not exist ext\xml\expat\xmlparse\$(OBJ_DIR) md ext\xml\expat\xmlparse\$(OBJ_DIR)
- @if not exist ext\xml\expat\xmltok\$(OBJ_DIR) md ext\xml\expat\xmltok\$(OBJ_DIR)
- @if not exist ext\session\$(OBJ_DIR) md ext\session\$(OBJ_DIR)
- @if not exist ext\ftp\$(OBJ_DIR) md ext\ftp\$(OBJ_DIR)
-# @if not exist ext\ldap\$(OBJ_DIR) md ext\ldap\$(OBJ_DIR)
- @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 $(FINAL_DIR) md $(FINAL_DIR)
-
-project: $(BINARY) $(MESSAGE)
- @echo Build complete.
-
-%.d: ../%.c
- @echo Building Dependencies for $(<F)
- @$(CC) -M $< $(C_FLAGS) -o $@
-
-%.obj: ../%.c
- @echo Compiling $?...
-# writing the flags to a file. Otherwise fails on win95 due too many characters in command line.
- @echo $(wordlist 1, 20, $(C_FLAGS)) > $(basename $(OBJ_DIR)\$(notdir $@)).cfg
- @echo $(wordlist 21, 40, $(C_FLAGS)) >> $(basename $(OBJ_DIR)\$(notdir $@)).cfg
- @echo $(wordlist 41, 60, $(C_FLAGS)) >> $(basename $(OBJ_DIR)\$(notdir $@)).cfg
- @echo $(wordlist 61, 80, $(C_FLAGS)) >> $(basename $(OBJ_DIR)\$(notdir $@)).cfg
- @$(CC) $< @$(basename $(OBJ_DIR)\$(notdir $@)).cfg -o $@
- @del $(basename $(OBJ_DIR)\$(notdir $@)).cfg
-# @$(CC) $< $(C_FLAGS) -o $@
-
-
-#$(BINARY): $(DEPDS) $(OBJECTS) $(LIBRARY)
-$(BINARY): $(OBJECTS) $(LIBRARY)
- @echo Import $(IMPORT) > $(basename $@).def
-ifdef API
- @echo Import $(API) >> $(basename $@).def
-endif
- @echo Module $(MODULE) >> $(basename $@).def
-ifdef EXPORT
- @echo Export $(EXPORT) >> $(basename $@).def
-endif
- @echo AutoUnload >> $(basename $@).def
-ifeq '$(BUILD)' 'debug'
- @echo Debug >> $(basename $@).def
-endif
- @echo Flag_On 0x00000008 >> $(basename $@).def
- @echo Start _NonAppStart >> $(basename $@).def
- @echo Exit _NonAppStop >> $(basename $@).def
-
- $(MPKTOOL) $(XDCFLAGS) $(basename $@).xdc
- @echo xdcdata $(basename $@).xdc >> $(basename $@).def
-
- @echo Linking $@...
- @echo $(LD_FLAGS) -commandfile $(basename $@).def > $(basename $@).link
-ifdef LIBRARY
- @echo $(LIBRARY) >> $(basename $@).link
-endif
- @echo $(wordlist 1, 10, $(OBJECTS)) >> $(basename $@).link
- @echo $(wordlist 11, 20, $(OBJECTS)) >> $(basename $@).link
- @echo $(wordlist 21, 30, $(OBJECTS)) >> $(basename $@).link
- @echo $(wordlist 31, 40, $(OBJECTS)) >> $(basename $@).link
- @echo $(wordlist 41, 50, $(OBJECTS)) >> $(basename $@).link
- @echo $(wordlist 51, 60, $(OBJECTS)) >> $(basename $@).link
- @echo $(wordlist 61, 70, $(OBJECTS)) >> $(basename $@).link
- @echo $(wordlist 71, 80, $(OBJECTS)) >> $(basename $@).link
- @echo $(wordlist 81, 85, $(OBJECTS)) >> $(basename $@).link
- @echo $(wordlist 86, 90, $(OBJECTS)) >> $(basename $@).link
- @echo $(wordlist 91, 95, $(OBJECTS)) >> $(basename $@).link
- @echo $(wordlist 96, 100, $(OBJECTS)) >> $(basename $@).link
- @echo $(wordlist 101, 105, $(OBJECTS)) >> $(basename $@).link
- @echo $(wordlist 106, 110, $(OBJECTS)) >> $(basename $@).link
- @echo $(wordlist 111, 115, $(OBJECTS)) >> $(basename $@).link
- @echo $(wordlist 116, 120, $(OBJECTS)) >> $(basename $@).link
- @echo $(wordlist 121, 125, $(OBJECTS)) >> $(basename $@).link
- @echo $(wordlist 126, 127, $(OBJECTS)) >> $(basename $@).link
-# @echo $(wordlist 126, 134, $(OBJECTS)) >> $(basename $@).link
-
- @$(LINK) @$(basename $@).link
-
-
-.PHONY: clean
-clean: cleand cleanobj cleanbin
-
-.PHONY: cleand
-cleand:
- @echo Deleting all dependency files...
- -@del "main\$(OBJ_DIR)\*.d"
- -@del "regex\$(OBJ_DIR)\*.d"
- -@del "..\bindlib_w32\$(OBJ_DIR)\*.d"
- -@del "netware\$(OBJ_DIR)\*.d"
- -@del "ext\standard\$(OBJ_DIR)\*.d"
- -@del "ext\bcmath\$(OBJ_DIR)\*.d"
- -@del "ext\bcmath\libbcmath\src\$(OBJ_DIR)\*.d"
-# -@del "ext\ldap\$(OBJ_DIR)\*.d"
- -@del "ext\mcal\$(OBJ_DIR)\*.d"
- -@del "ext\mysql\$(OBJ_DIR)\*.d"
- -@del "ext\mysql\libmysql\$(OBJ_DIR)\*.d"
- -@del "ext\pcre\$(OBJ_DIR)\*.d"
- -@del "ext\pcre\pcrelib\$(OBJ_DIR)\*.d"
- -@del "ext\odbc\$(OBJ_DIR)\*.d"
- -@del "ext\xml\$(OBJ_DIR)\*.d"
- -@del "ext\xml\expat\xmlparse\$(OBJ_DIR)\*.d"
- -@del "ext\xml\expat\xmltok\$(OBJ_DIR)\*.d"
- -@del "ext\session\$(OBJ_DIR)\*.d"
- -@del "ext\ftp\$(OBJ_DIR)\*.d"
- -@del "ext\wddx\$(OBJ_DIR)\*.d"
- -@del "ext\calendar\$(OBJ_DIR)\*.d"
- -@del "ext\snmp\$(OBJ_DIR)\*.d"
-
-.PHONY: cleanobj
-cleanobj:
- @echo Deleting all object files...
- -@del "main\$(OBJ_DIR)\*.obj"
- -@del "regex\$(OBJ_DIR)\*.obj"
- -@del "..\bindlib_w32\$(OBJ_DIR)\*.obj"
- -@del "netware\$(OBJ_DIR)\*.obj"
- -@del "ext\standard\$(OBJ_DIR)\*.obj"
- -@del "ext\bcmath\$(OBJ_DIR)\*.obj"
- -@del "ext\bcmath\libbcmath\src\$(OBJ_DIR)\*.obj"
-# -@del "ext\ldap\$(OBJ_DIR)\*.obj"
- -@del "ext\mcal\$(OBJ_DIR)\*.obj"
- -@del "ext\mysql\$(OBJ_DIR)\*.obj"
- -@del "ext\mysql\libmysql\$(OBJ_DIR)\*.obj"
- -@del "ext\pcre\$(OBJ_DIR)\*.obj"
- -@del "ext\pcre\pcrelib\$(OBJ_DIR)\*.obj"
- -@del "ext\odbc\$(OBJ_DIR)\*.obj"
- -@del "ext\xml\$(OBJ_DIR)\*.obj"
- -@del "ext\xml\expat\xmlparse\$(OBJ_DIR)\*.obj"
- -@del "ext\xml\expat\xmltok\$(OBJ_DIR)\*.obj"
- -@del "ext\session\$(OBJ_DIR)\*.obj"
- -@del "ext\ftp\$(OBJ_DIR)\*.obj"
- -@del "ext\wddx\$(OBJ_DIR)\*.obj"
- -@del "ext\calendar\$(OBJ_DIR)\*.obj"
- -@del "ext\snmp\$(OBJ_DIR)\*.obj"
-
-.PHONY: cleanbin
-cleanbin:
- @echo Deleting binary files...
- -@del "$(FINAL_DIR)\$(MODULE_NAME).nlm"
- @echo Deleting MAP, DEF files, etc....
- -@del "$(FINAL_DIR)\$(MODULE_NAME).map"
- -@del "$(FINAL_DIR)\$(MODULE_NAME).def"
- -@del "$(FINAL_DIR)\$(MODULE_NAME).link"
-ifeq '$(BUILD)' 'debug'
- -@del $(FINAL_DIR)\$(MODULE_NAME).sym
-endif
+++ /dev/null
-/* pwd.h - Try to approximate UN*X's getuser...() functions under MS-DOS.
- Copyright (C) 1990 by Thorsten Ohl, td12@ddagsi3.bitnet
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 1, or (at your option)
- any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-
- */
-
-/* This 'implementation' is conjectured from the use of this functions in
- the RCS and BASH distributions. Of course these functions don't do too
- much useful things under MS-DOS, but using them avoids many "#ifdef
- MSDOS" in ported UN*X code ... */
-
-#ifndef PWD_H
-#define PWD_H
-
-/*
- Not available in LibC / SDK header or CodeWarrior header files; so taking from Winsock
- definitions, which should be OK
-*/
-typedef unsigned int DWORD;
-
-struct passwd {
- char *pw_name; /* user name */
- char *pw_passwd; /* encrypted password */
- int pw_uid; /* user uid */
- int pw_gid; /* user gid */
- char *pw_comment; /* comment */
- char *pw_gecos; /* Honeywell login info */
- char *pw_dir; /* home directory */
- char *pw_shell; /* default shell */
-};
-
-extern struct passwd *getpwuid(int);
-extern struct passwd *getpwnam(char *name);
-extern char *getlogin(void);
-
-#endif
+++ /dev/null
-
-/*
- * PHP Sendmail for NetWare.
- *
- * This code is based on the sendmail.c file under Win32 folder
- *
- * This file is rewriten specificly for PHPFI. Some functionality
- * has been removed (MIME and file attachments). This code was
- * modified from code based on code writen by Jarle Aase.
- *
- * This class is based on the original code by Jarle Aase, see bellow:
- * wSendmail.cpp It has been striped of some functionality to match
- * the requirements of phpfi.
- *
- * Very simple SMTP Send-mail program for sending command-line level
- * emails and CGI-BIN form response for the Windows platform.
- *
- * The complete wSendmail package with source code can be located
- * from http://www.jgaa.com
- *
- */
-
-#include "php.h" /*php specific */
-#include <stdio.h>
-#include <stdlib.h>
-#ifdef USE_WINSOCK
-/*#include <ws2nlm.h>*/
-#include <novsock2.h>
-#else
-//#include <sys/socket.h>
-#include <netinet\in.h>
-#include <ws2name.h>
-#endif
-
-#include "time.h"
-#include <string.h>
-//#include <malloc.h>
-//#include <memory.h>
-//#include <winbase.h>
-#include "sendmail.h"
-#include "php_ini.h"
-
-
-static char *days[] =
-{"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"};
-static char *months[] =
-{"Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"};
-
-
-#ifndef THREAD_SAFE
-char Buffer[MAIL_BUFFER_SIZE];
-
-/* socket related data */
-typedef int SOCKET;
-typedef struct sockaddr_in SOCKADDR_IN;
-typedef struct sockaddr * LPSOCKADDR;
-typedef struct hostent * LPHOSTENT;
-
-#define INVALID_SOCKET (SOCKET)(~0)
-
-SOCKET sc;
-//WSADATA Data;
-//struct hostent *adr;
-SOCKADDR_IN sock_in;
-//int WinsockStarted;
-/* values set by the constructor */
-//char *AppName;
-char MailHost[HOST_NAME_LEN];
-char LocalHost[HOST_NAME_LEN];
-#endif
-
-
-char seps[] = " ,\t\n";
-char *php_mailer = "PHP 4.0 NetWare";
-
-char *get_header(char *h, char *headers);
-
-/* Error messages */
-static char *ErrorMessages[] =
-{
- {"Success"},
- {"Bad arguments from form"},
- {"Unable to open temporary mailfile for read"},
- {"Failed to Start Sockets"},
- {"Failed to Resolve Host"},
- {"Failed to obtain socket handle"},
- {"Failed to Connect"},
- {"Failed to Send"},
- {"Failed to Receive"},
- {"Server Error"},
- {"Failed to resolve the host IP name"},
- {"Out of memory"},
- {"Unknown error"},
- {"Bad Message Contents"},
- {"Bad Message Subject"},
- {"Bad Message destination"},
- {"Bad Message Return Path"},
- {"Bad Mail Host"},
- {"Bad Message File"},
- {"PHP Internal error: php.ini sendmail from variable not set!"}
-};
-
-
-/*********************************************************************
-// Name: TSendMail
-// Input: 1) host: Name of the mail host where the SMTP server resides
-// max accepted length of name = 256
-// 2) appname: Name of the application to use in the X-mailer
-// field of the message. if NULL is given the application
-// name is used as given by the GetCommandLine() function
-// max accespted length of name = 100
-// Output: 1) error: Returns the error code if something went wrong or
-// SUCCESS otherwise.
-//
-// See SendText() for additional args!
-//********************************************************************/
-int TSendMail(char *host, int *error,
- char *headers, char *Subject, char *mailTo, char *data)
-{
- int ret;
- char *RPath = NULL;
-
- if (host == NULL) {
- *error = BAD_MAIL_HOST;
- return BAD_MAIL_HOST;
- } else if (strlen(host) >= HOST_NAME_LEN) {
- *error = BAD_MAIL_HOST;
- return BAD_MAIL_HOST;
- } else {
- strcpy(MailHost, host);
- }
-
- if (INI_STR("sendmail_from")){
- RPath = estrdup(INI_STR("sendmail_from"));
- } else {
- return 19;
- }
-
- /* attempt to connect with mail host */
- *error = MailConnect();
- if (*error != 0) {
- if(RPath)efree(RPath);
- return *error;
- } else {
- ret = SendText(RPath, Subject, mailTo, data, headers);
- TSMClose();
- if (ret != SUCCESS) {
- *error = ret;
- }
- if(RPath)efree(RPath);
- return ret;
- }
-}
-
-
-//********************************************************************
-// Name: TSMClose
-// Input:
-// Output:
-// Description: DESTRUCTOR
-// Author/Date: jcar 20/9/96
-// History:
-//********************************************************************/
-void TSMClose()
-{
- Post("QUIT\r\n");
- Ack();
- /* to guarantee that the cleanup is not made twice and
- compomise the rest of the application if sockets are used
- elesewhere
- */
-
- shutdown(sc, 0);
-
- /* closesocket commented out since it was giving undefined symbol linker error
- close added in its place */
-// closesocket(sc);
- close(sc);
-}
-
-
-/*********************************************************************
-// Name: char *GetSMErrorText
-// Input: Error index returned by the menber functions
-// Output: pointer to a string containing the error description
-// Description:
-// Author/Date: jcar 20/9/96
-// History:
-//*******************************************************************/
-char *GetSMErrorText(int index)
-{
-
- if ((index > MAX_ERROR_INDEX) || (index < MIN_ERROR_INDEX))
- return (ErrorMessages[UNKNOWN_ERROR]);
- else
- return (ErrorMessages[index]);
-}
-
-
-/*********************************************************************
-// Name: TSendText
-// Input: 1) RPath: return path of the message
-// Is used to fill the "Return-Path" and the
-// "X-Sender" fields of the message.
-// 2) Subject: Subject field of the message. If NULL is given
-// the subject is set to "No Subject"
-// 3) mailTo: Destination address
-// 4) data: Null terminated string containing the data to be send.
-// Output: Error code or SUCCESS
-// Description:
-// Author/Date: jcar 20/9/96
-// History:
-//*******************************************************************/
-int SendText(char *RPath, char *Subject, char *mailTo, char *data, char *headers)
-{
- int res, i;
- char *p;
- char *tempMailTo, *token, *pos1, *pos2;
-
- /* check for NULL parameters */
- if (data == NULL)
- return (BAD_MSG_CONTENTS);
- if (mailTo == NULL)
- return (BAD_MSG_DESTINATION);
- if (RPath == NULL)
- return (BAD_MSG_RPATH);
-
- /* simple checks for the mailto address */
- /* have ampersand ? */
- if (strchr(mailTo, '@') == NULL)
- return (BAD_MSG_DESTINATION);
-
- sprintf(Buffer, "HELO %s\r\n", LocalHost);
-
- /* in the beggining of the dialog */
- /* attempt reconnect if the first Post fail */
- if ((res = Post(Buffer)) != SUCCESS) {
- MailConnect();
- if ((res = Post(Buffer)) != SUCCESS)
- return (res);
- }
- if ((res = Ack()) != SUCCESS)
- return (res);
-
- sprintf(Buffer, "MAIL FROM:<%s>\r\n", RPath);
- if ((res = Post(Buffer)) != SUCCESS)
- return (res);
- if ((res = Ack()) != SUCCESS)
- return (res);
-
-
- tempMailTo = estrdup(mailTo);
-
- /* Send mail to all rcpt's */
- token = strtok(tempMailTo, ",");
- while(token != NULL)
- {
- sprintf(Buffer, "RCPT TO:<%s>\r\n", token);
- if ((res = Post(Buffer)) != SUCCESS)
- return (res);
- if ((res = Ack()) != SUCCESS)
- return (res);
- token = strtok(NULL, ",");
- }
-
- /* Send mail to all Cc rcpt's */
- efree(tempMailTo);
- if (headers && (pos1 = strstr(headers, "Cc:"))) {
- pos2 = strstr(pos1, "\r\n");
- tempMailTo = estrndup(pos1, pos2-pos1);
-
- token = strtok(tempMailTo, ",");
- while(token != NULL)
- {
- sprintf(Buffer, "RCPT TO:<%s>\r\n", token);
- if ((res = Post(Buffer)) != SUCCESS)
- return (res);
- if ((res = Ack()) != SUCCESS)
- return (res);
- token = strtok(NULL, ",");
- }
- efree(tempMailTo);
- }
-
- if ((res = Post("DATA\r\n")) != SUCCESS)
- return (res);
- if ((res = Ack()) != SUCCESS)
- return (res);
-
- /* send message header */
- if (Subject == NULL)
- res = PostHeader(RPath, "No Subject", mailTo, headers);
- else
- res = PostHeader(RPath, Subject, mailTo, headers);
- if (res != SUCCESS)
- return (res);
-
- /* send message contents in 1024 chunks */
- if (strlen(data) <= 1024) {
- if ((res = Post(data)) != SUCCESS)
- return (res);
- } else {
- p = data;
- while (1) {
- if (*p == '\0')
- break;
- if (strlen(p) >= 1024)
- i = 1024;
- else
- i = strlen(p);
-
- /* put next chunk in buffer */
- strncpy(Buffer, p, i);
- Buffer[i] = '\0';
- p += i;
-
- /* send chunk */
- if ((res = Post(Buffer)) != SUCCESS)
- return (res);
- }
- }
-
- /*send termination dot */
- if ((res = Post("\r\n.\r\n")) != SUCCESS)
- return (res);
- if ((res = Ack()) != SUCCESS)
- return (res);
-
- return (SUCCESS);
-}
-
-
-/*********************************************************************
-// Name: PostHeader
-// Input: 1) return path
-// 2) Subject
-// 3) destination address
-// 4) DoMime flag
-// Output: Error code or Success
-// Description:
-// Author/Date: jcar 20/9/96
-// History:
-//********************************************************************/
-int PostHeader(char *RPath, char *Subject, char *mailTo, char *xheaders)
-{
-
- /* Print message header according to RFC 822 */
- /* Return-path, Received, Date, From, Subject, Sender, To, cc */
-
- time_t tNow = time(NULL);
- struct tm *tm = localtime(&tNow);
- int zoneh = abs(_timezone);
- int zonem, res;
- char *p;
-
- p = Buffer;
- zoneh /= (60 * 60);
- zonem = (abs(_timezone) / 60) - (zoneh * 60);
-
- if(!xheaders || !strstr(xheaders, "Date:")){
- p += sprintf(p, "Date: %s, %02d %s %04d %02d:%02d:%02d %s%02d%02d\r\n",
- days[tm->tm_wday],
- tm->tm_mday,
- months[tm->tm_mon],
- tm->tm_year + 1900,
- tm->tm_hour,
- tm->tm_min,
- tm->tm_sec,
- (_timezone > 0) ? "+" : (_timezone < 0) ? "-" : "",
- zoneh,
- zonem);
- }
-
- if(!xheaders || !strstr(xheaders, "From:")){
- p += sprintf(p, "From: %s\r\n", RPath);
- }
- p += sprintf(p, "Subject: %s\r\n", Subject);
- if(!xheaders || !strstr(xheaders, "To:")){
- p += sprintf(p, "To: %s\r\n", mailTo);
- }
- if(xheaders){
- p += sprintf(p, "%s\r\n", xheaders);
- }
-
- if ((res = Post(Buffer)) != SUCCESS)
- return (res);
-
- if ((res = Post("\r\n")) != SUCCESS)
- return (res);
-
- return (SUCCESS);
-}
-
-
-/*********************************************************************
-// Name: MailConnect
-// Input: None
-// Output: None
-// Description: Connect to the mail host and receive the welcome message.
-// Author/Date: jcar 20/9/96
-// History:
-//********************************************************************/
-int MailConnect()
-{
- int res;
- short portnum;
-
- /* Create Socket */
- if ((sc = socket(PF_INET, SOCK_STREAM, 0)) == INVALID_SOCKET)
- return (FAILED_TO_OBTAIN_SOCKET_HANDLE);
-
- /* Get our own host name */
- if (gethostname(LocalHost, HOST_NAME_LEN))
- return (FAILED_TO_GET_HOSTNAME);
-
- /* Resolve the servers IP */
- /*
- if (!isdigit(MailHost[0])||!gethostbyname(MailHost))
- {
- return (FAILED_TO_RESOLVE_HOST);
- }
- */
-
- portnum = (short) INI_INT("sendmail_port");
- if (!portnum) {
- portnum = 25;
- }
-
- /* Connect to server */
- sock_in.sin_family = AF_INET;
- sock_in.sin_port = htons(portnum);
- sock_in.sin_addr.S_un.S_addr = GetAddr(MailHost);
-
- if (connect(sc, (LPSOCKADDR) & sock_in, sizeof(sock_in)))
- return (FAILED_TO_CONNECT);
-
- /* receive Server welcome message */
- res = Ack();
- return (res);
-}
-
-
-/*********************************************************************
-// Name: Post
-// Input:
-// Output:
-// Description:
-// Author/Date: jcar 20/9/96
-// History:
-//********************************************************************/
-int Post(char * msg)
-{
- int len = strlen(msg);
- int slen;
- int index = 0;
-
- while (len > 0) {
- if ((slen = send(sc, msg + index, len, 0)) < 1)
- return (FAILED_TO_SEND);
- len -= slen;
- index += slen;
- }
- return (SUCCESS);
-}
-
-
-/*********************************************************************
-// Name: Ack
-// Input:
-// Output:
-// Description:
-// Get the response from the server. We only want to know if the
-// last command was successful.
-// Author/Date: jcar 20/9/96
-// History:
-//********************************************************************/
-int Ack()
-{
- static char *buf;
- int rlen;
- int Index = 0;
- int Received = 0;
-
- if (!buf)
- if ((buf = (char *) malloc(1024 * 4)) == NULL)
- return (OUT_OF_MEMORY);
-
- again:
-
- if ((rlen = recv(sc, buf + Index, ((1024 * 4) - 1) - Received, 0)) < 1)
- return (FAILED_TO_RECEIVE);
-
- Received += rlen;
- buf[Received] = 0;
- /*err_msg fprintf(stderr,"Received: (%d bytes) %s", rlen, buf + Index); */
-
- /* Check for newline */
- Index += rlen;
-
- if ((buf[Received - 4] == ' ' && buf[Received - 3] == '-') ||
- (buf[Received - 2] != '\r') || (buf[Received - 1] != '\n'))
- /* err_msg fprintf(stderr,"Incomplete server message. Awaiting CRLF\n"); */
- goto again; /* Incomplete data. Line must be terminated by CRLF
- And not contain a space followed by a '-' */
-
- if (buf[0] > '3')
- return (SMTP_SERVER_ERROR);
-
- return (SUCCESS);
-}
-
-
-/*********************************************************************
-// Name: unsigned long GetAddr (LPSTR szHost)
-// Input:
-// Output:
-// Description: Given a string, it will return an IP address.
-// - first it tries to convert the string directly
-// - if that fails, it tries o resolve it as a hostname
-//
-// WARNING: gethostbyname() is a blocking function
-// Author/Date: jcar 20/9/96
-// History:
-//********************************************************************/
-unsigned long GetAddr(char * szHost)
-{
- LPHOSTENT lpstHost;
- u_long lAddr = INADDR_ANY;
-
- /* check that we have a string */
- if (*szHost) {
-
- /* check for a dotted-IP address string */
- lAddr = inet_addr(szHost);
-
- /* If not an address, then try to resolve it as a hostname */
- if ((lAddr == INADDR_NONE) && (strcmp(szHost, "255.255.255.255"))) {
-
- /*
- Added the (LPHOSTENT) typecasting since the CodeWarrior compiler
- was cribbing without that:
- " illegal implicit conversion from 'int' to 'struct hostent *' "
- */
- lpstHost = (LPHOSTENT) gethostbyname(szHost);
-
- if (lpstHost) { /* success */
- /*
- The below line commented since it is giving compiler error.
- The next line is done in its place. But it is WRONG and
- we need to get the below line to work.
- Due to this work-around, the mail functionality will not work
- if the "server name" of the mail server is given.
- It only works when the IP address is given.
- */
-// lAddr = *((u_long FAR *) (lpstHost->h_addr));
- lAddr = (u_long) 0xf;
-
- } else {
- lAddr = INADDR_ANY; /* failure */
- }
- }
- }
- return (lAddr);
-} /* end GetAddr() */
+++ /dev/null
-
-#if !defined(SENDMAIL_H) /* Sentry, use file only if it's not already included. */
-#define SENDMAIL_H
-
-
-#define HOST_NAME_LEN 256
-#define MAX_APPNAME_LENGHT 100
-#define MAX_ERROR_INDEX 17
-#define MIN_ERROR_INDEX 0
-#define MAIL_BUFFER_SIZE (1024*4) /* 4k buffer */
-
-/* Return values */
-#define SUCCESS 0
-#define FAILED_TO_PARSE_ARGUMENTS 1
-#define FAILED_TO_OPEN_MAILFILE 2
-#define FAILED_TO_START_SOCKETS 3
-#define FAILED_TO_RESOLVE_HOST 4
-#define FAILED_TO_OBTAIN_SOCKET_HANDLE 5
-#define FAILED_TO_CONNECT 6
-#define FAILED_TO_SEND 7
-#define FAILED_TO_RECEIVE 8
-#define SMTP_SERVER_ERROR 9
-#define FAILED_TO_GET_HOSTNAME 10
-#define OUT_OF_MEMORY 11
-#define UNKNOWN_ERROR 12
-#define BAD_MSG_CONTENTS 13
-#define BAD_MSG_SUBJECT 14
-#define BAD_MSG_DESTINATION 15
-#define BAD_MSG_RPATH 16
-#define BAD_MAIL_HOST 17
-#define BAD_MSG_FILE 18
-
-
-int TSendMail(char *smtpaddr, int *returnerror,
- char *RPath, char *Subject, char *mailTo, char *data);
-void TSMClose(void);
-int SendText(char *RPath, char *Subject, char *mailTo, char *data, char *headers);
-char *GetSMErrorText(int index);
-
-int MailConnect();
-int PostHeader(char *, char *, char *, char *);
-int Post(char *);
-int Ack();
-unsigned long GetAddr(char * szHost);
-
-
-#endif /* SENDMAIL_H */
+++ /dev/null
-@echo off
-
-if "%1" == "/?" goto USAGE
-
-if "%1" == "d" set BUILD=debug
-if "%1" == "r" set BUILD=release
-
-if "%2" == "1" set APACHE_VER=1.3
-if "%2" == "2" set APACHE_VER=2
-
-goto EXIT
-
-:USAGE
- @echo on
- @echo Usage: setbuild d|r 1|2
- @echo set build type as 'debug' or 'release'
- @echo set Web Server as Apache 1.3.x or Apache 2.0.x
-
-:EXIT
\ No newline at end of file
+++ /dev/null
-# Temporarily here -- later may go into some batch file
-# which will set this as an environment variable
-PROJECT_ROOT = ..
-
-# Module details
-MODULE_NAME = TSRM
-
-#MODULE_ROOT = $(PROJECT_ROOT)\\$(MODULE_NAME)
-
-#include the common settings
-include $(PROJECT_ROOT)/netware/common.mif
-
-# Extensions of all input and output files
-.SUFFIXES:
-.SUFFIXES: .nlm .lib .obj .cpp .c .msg .mlc .mdb .xdc .d
-
-# Source files
-CPP_SRC =
-C_SRC = TSRM.c \
- tsrm_strtok_r.c \
- tsrm_virtual_cwd.c \
- tsrm_nw.c
-
-# Destination directories and files
-OBJ_DIR = $(BUILD)
-FINAL_DIR = $(BUILD)
-OBJECTS = $(addprefix $(OBJ_DIR)/,$(CPP_SRC:.cpp=.obj) $(C_SRC:.c=.obj))
-DEPDS = $(addprefix $(OBJ_DIR)/,$(CPP_SRC:.cpp=.d) $(C_SRC:.c=.d))
-
-# Binary file
-ifndef BINARY
- BINARY=$(FINAL_DIR)\$(MODULE_NAME).lib
-endif
-
-# Compile flags
-C_FLAGS = -c -maxerrors 25 -msgstyle gcc
-C_FLAGS += -wchar_t on -bool on
-C_FLAGS += -processor Pentium -align 1
-C_FLAGS += -nostdinc
-C_FLAGS += -DZTS -DNETWARE -DHAVE_DIRENT_H
-#C_FLAGS += -DUSE_PIPE_OPEN
-C_FLAGS += -DUSE_MKFIFO
-C_FLAGS += -DCLIB_STAT_PATCH -DUSE_MPK
-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)
-
-# Link flags
-LD_FLAGS = -type library
-LD_FLAGS += -o $(BINARY)
-
-# Extra stuff based on debug / release builds
-ifeq '$(BUILD)' 'debug'
- C_FLAGS += -inline smart -sym on -sym codeview4 -sym internal -opt off -opt intrinsics -DTSRM_DEBUG=1
- 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
- LD_FLAGS += -sym off
- export MWLibraryFiles=$(SDK_DIR)/imports/libcpre.o;mwcrtl.lib
-endif
-
-# Virtual paths
-vpath %.cpp .
-vpath %.c .
-vpath %.obj $(OBJ_DIR)
-
-
-all: prebuild project
-
-.PHONY: all
-
-prebuild:
- @if not exist $(OBJ_DIR) md $(OBJ_DIR)
-
-project: $(BINARY) $(MESSAGE)
- @echo Build complete.
-
-$(OBJ_DIR)/%.d: %.c
- @echo Building Dependencies for $(<F)
- @$(CC) -M $< $(C_FLAGS) -o $@
-
-$(OBJ_DIR)/%.obj: %.c
- @echo Compiling $?...
- @$(CC) $< $(C_FLAGS) -o $@
-
-$(BINARY): $(DEPDS) $(OBJECTS)
- @echo Linking $@...
- @$(LINK) $(LD_FLAGS) $(OBJECTS)
-
-
-.PHONY: clean
-clean: cleand cleanobj cleanbin
-
-.PHONY: cleand
-cleand:
- @echo Deleting all dependency files...
- -@del "$(OBJ_DIR)\*.d"
-
-.PHONY: cleanobj
-cleanobj:
- @echo Deleting all object files...
- -@del "$(OBJ_DIR)\*.obj"
-
-.PHONY: cleanbin
-cleanbin:
- @echo Deleting binary files...
- -@del "$(FINAL_DIR)\$(MODULE_NAME).lib"
+++ /dev/null
-# Temporarily here -- later may go into some batch file
-# which will set this as an environment variable
-PROJECT_ROOT = ..
-
-# Module details
-MODULE_NAME = ZEND
-
-#MODULE_ROOT = $(PROJECT_ROOT)\\$(MODULE_NAME)
-
-#include the common settings
-include $(PROJECT_ROOT)/netware/common.mif
-
-# Extensions of all input and output files
-.SUFFIXES:
-.SUFFIXES: .nlm .lib .obj .cpp .c .msg .mlc .mdb .xdc .d
-
-C_SRC = zend.c \
- zend_alloc.c \
- zend_API.c \
- zend_builtin_functions.c \
- zend_compile.c \
- zend_constants.c \
- zend_dynamic_array.c \
- zend_execute.c \
- zend_execute_API.c \
- zend_extensions.c \
- zend_hash.c \
- zend_highlight.c \
- zend_indent.c \
- zend_ini.c \
- zend_list.c \
- zend_llist.c \
- zend_opcode.c \
- zend_operators.c \
- zend_ptr_stack.c \
- zend_qsort.c \
- zend_sprintf.c \
- zend_stack.c \
- zend_static_allocator.c \
- zend_variables.c \
- zend_ini_parser.c \
- zend_ini_scanner.c \
- zend_language_parser.c \
- zend_language_scanner.c
-
-
-# Destination directories and files
-OBJ_DIR = $(BUILD)
-FINAL_DIR = $(BUILD)
-OBJECTS = $(addprefix $(OBJ_DIR)/,$(CPP_SRC:.cpp=.obj) $(C_SRC:.c=.obj))
-DEPDS = $(addprefix $(OBJ_DIR)/,$(CPP_SRC:.cpp=.d) $(C_SRC:.c=.d))
-
-# Binary file
-ifndef BINARY
- BINARY=$(FINAL_DIR)\$(MODULE_NAME).lib
-endif
-
-
-# Compile flags
-C_FLAGS = -c -maxerrors 25 -msgstyle std
-C_FLAGS += -wchar_t on -bool on
-C_FLAGS += -processor Pentium -align 1
-C_FLAGS += -nostdinc
-C_FLAGS += -D__C9X_CMATH_INLINES_DEFINED
-C_FLAGS += -DNETWARE -D__GNUC__
-C_FLAGS += -DZTS
-C_FLAGS += -DCLIB_STAT_PATCH
-C_FLAGS += -DTHREAD_SWITCH
-C_FLAGS += -I. -I- -I../netware -I$(SDK_DIR)/include # ../netware added for special SYS/STAT.H
-C_FLAGS += -I$(MWCIncludes)
-
-# Link flags
-LD_FLAGS = -type library
-LD_FLAGS += -o $(BINARY)
-
-
-# Extra stuff based on debug / release builds
-ifeq '$(BUILD)' 'debug'
- C_FLAGS += -DZEND_DEBUG
- 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
- LD_FLAGS += -sym off
- export MWLibraryFiles=$(SDK_DIR)/imports/libcpre.o;mwcrtl.lib
-endif
-
-
-# Virtual paths
-vpath %.cpp .
-vpath %.c .
-vpath %.obj $(OBJ_DIR)
-
-
-all: prebuild project
-
-.PHONY: all
-
-prebuild:
- @if not exist $(OBJ_DIR) md $(OBJ_DIR)
-
-project: $(BINARY) $(MESSAGE)
- @echo Build complete.
-
-
-##zend_ini_parser.c zend_ini_parser.h : zend_ini_parser.y
-## @bison --output=$@ -v -d -p ini_ zend_ini_parser.y
-
-##zend_ini_scanner.c : zend_ini_scanner.l
-## @flex -i -Pini_ -o$@ zend_ini_scanner.l
-
-##zend_language_parser.c zend_language_parser.h : zend_language_parser.y
-## @bison --output=$@ -v -d -p zend zend_language_parser.y
-
-##zend_language_scanner.c : zend_language_scanner.l
-## @flex -i -Pzend -o$@ zend_language_scanner.l
-
-$(OBJ_DIR)/%.d: %.c
- @echo Building Dependencies for $(<F)
- @$(CC) -M $< $(C_FLAGS) -o $@
-
-$(OBJ_DIR)/%.obj: %.c
- @echo Compiling $?...
- @$(CC) $< $(C_FLAGS) -o $@
-
-
-$(BINARY): $(DEPDS) $(OBJECTS)
- @echo Linking $@...
- @$(LINK) $(LD_FLAGS) $(OBJECTS)
-
-
-.PHONY: clean
-clean: cleansrc cleand cleanobj cleanbin
-
-.PHONY: cleansrc
-cleansrc:
- @echo Deleting all generated source files...
- -@del "zend_ini_parser.c"
- -@del "zend_ini_parser.h"
- -@del "zend_ini_scanner.c"
- -@del "zend_language_parser.c"
- -@del "zend_language_parser.h"
- -@del "zend_language_scanner.c"
- -@del "zend_ini_parser.output"
- -@del "zend_language_parser.output"
-
-
-.PHONY: cleand
-cleand:
- @echo Deleting all dependency files...
- -@del "$(OBJ_DIR)\*.d"
-
-.PHONY: cleanobj
-cleanobj:
- @echo Deleting all object files...
- -@del "$(OBJ_DIR)\*.obj"
-
-.PHONY: cleanbin
-cleanbin:
- @echo Deleting binary files...
- -@del "$(FINAL_DIR)\$(MODULE_NAME).lib"
-