summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ext/ftp/ftp.c5
-rw-r--r--ext/ldap/ldap.mak30
-rw-r--r--ext/mysql/mysql.mak35
-rw-r--r--ext/session/mod_files.c12
-rw-r--r--ext/session/session.c8
5 files changed, 59 insertions, 31 deletions
diff --git a/ext/ftp/ftp.c b/ext/ftp/ftp.c
index 72723b3009..2648fe305f 100644
--- a/ext/ftp/ftp.c
+++ b/ext/ftp/ftp.c
@@ -68,6 +68,11 @@
#include "ftp.h"
#include "ext/standard/fsock.h"
+/* Additional headers for NetWare */
+#if defined(NETWARE) && defined(NEW_LIBC) && !defined(USE_WINSOCK)
+#include <sys/select.h>
+#endif
+
/* sends an ftp command, returns true on success, false on error.
* it sends the string "cmd args\r\n" if args is non-null, or
* "cmd\r\n" if args is null
diff --git a/ext/ldap/ldap.mak b/ext/ldap/ldap.mak
index 16b67ca13f..52db328f78 100644
--- a/ext/ldap/ldap.mak
+++ b/ext/ldap/ldap.mak
@@ -4,10 +4,10 @@ PROJECT_ROOT = ..\..
# Module details
MODULE_NAME = php_ldap
-MODULE_DESC = "PHP LDAP Extension"
-VMAJ = 0
-VMIN = 60
-VREV = 1
+MODULE_DESC = "PHP 4.3 - LDAP Extension"
+VMAJ = 3
+VMIN = 0
+VREV = 0
#include the common settings
include $(PROJECT_ROOT)/netware/common.mif
@@ -44,12 +44,14 @@ C_FLAGS += -c -maxerrors 25 -msgstyle gcc
C_FLAGS += -wchar_t on -bool on
C_FLAGS += -processor Pentium
C_FLAGS += -nostdinc -nosyspath
+C_FLAGS += -relax_pointers # To remove type-casting errors
C_FLAGS += -DNETWARE -DZTS
C_FLAGS += -DNEW_LIBC
-C_FLAGS += -DCOMPILE_DL_LDAP -DCOMPILE_DL=1
-C_FLAGS += -I. -I$(PROJECT_ROOT)/main -I$(PROJECT_ROOT)/ext/standard -I$(PROJECT_ROOT) -I$(PROJECT_ROOT)/netware
+C_FLAGS += -DCOMPILE_DL_LDAP
+C_FLAGS += -I. -I- -I$(PROJECT_ROOT) -I$(PROJECT_ROOT)/main
+C_FLAGS += -I$(PROJECT_ROOT)/ext/standard -I$(PROJECT_ROOT)/netware
C_FLAGS += -I$(PROJECT_ROOT)/zend -I$(PROJECT_ROOT)/tsrm
-C_FLAGS += -I- -I$(SDK_DIR)/include -I$(MWCIncludes)
+C_FLAGS += -I$(SDK_DIR)/include -I$(MWCIncludes)
C_FLAGS += -I$(LDAP_DIR)/inc
C_FLAGS += -I$(WINSOCK_DIR)/include/nlm -I$(WINSOCK_DIR)/include
@@ -81,10 +83,6 @@ IMPORT = @$(SDK_DIR)/imports/libc.imp \
@$(MPK_DIR)/import/mpkOrg.imp \
@$(LDAP_DIR)/lib/nlm/Ldapsdk.imp \
@$(PROJECT_ROOT)/netware/phplib.imp
-#EXPORT = get_module
-#EXPORT = ldap_functions \
-# ldap_module_entry \
-# ($(MODULE_NAME).nlm) get_module
EXPORT = ($(MODULE_NAME)) get_module
API = OutputToScreen
@@ -122,7 +120,7 @@ $(OBJ_DIR)/%.obj: %.c
@$(CC) $< $(C_FLAGS) -o $@
-$(BINARY): $(DEPDS) $(OBJECTS)
+$(BINARY): $(OBJECTS)
@echo Import $(IMPORT) > $(basename $@).def
ifdef API
@echo Import $(API) >> $(basename $@).def
@@ -136,8 +134,10 @@ ifeq '$(BUILD)' 'debug'
@echo Debug >> $(basename $@).def
endif
@echo Flag_On 0x00000008 >> $(basename $@).def
- @echo Start _NonAppStart >> $(basename $@).def
- @echo Exit _NonAppStop >> $(basename $@).def
+# @echo Start _NonAppStart >> $(basename $@).def
+# @echo Exit _NonAppStop >> $(basename $@).def
+ @echo Start _LibCPrelude >> $(basename $@).def
+ @echo Exit _LibCPostlude >> $(basename $@).def
$(MPKTOOL) $(XDCFLAGS) $(basename $@).xdc
@echo xdcdata $(basename $@).xdc >> $(basename $@).def
@@ -150,7 +150,7 @@ endif
.PHONY: clean
-clean: cleand cleanobj cleanbin
+clean: cleanobj cleanbin
.PHONY: cleand
cleand:
diff --git a/ext/mysql/mysql.mak b/ext/mysql/mysql.mak
index 8dd34ec601..ffdf6f20a4 100644
--- a/ext/mysql/mysql.mak
+++ b/ext/mysql/mysql.mak
@@ -4,9 +4,9 @@ PROJECT_ROOT = ..\..
# Module details
MODULE_NAME = phpmysql
-MODULE_DESC = "PHP MySQL Extension"
-VMAJ = 0
-VMIN = 60
+MODULE_DESC = "PHP 4.2.3 - MySQL Extension"
+VMAJ = 3
+VMIN = 0
VREV = 0
#include the common settings
@@ -47,13 +47,15 @@ ifndef BINARY
endif
# Compile flags
-C_FLAGS = -c -maxerrors 25 -msgstyle gcc -wchar_t on -bool on -processor Pentium -align 1
+C_FLAGS = -c -maxerrors 25 -msgstyle gcc -wchar_t on -bool on -processor Pentium
C_FLAGS += -nostdinc -nosyspath
-C_FLAGS += -DNETWARE -DZTS -DNEW_LIBC -DUSE_OLD_FUNCTIONS -DCOMPILE_DL=1
-C_FLAGS += -I. -I$(PROJECT_ROOT)/main -I$(PROJECT_ROOT)/ext/standard -I$(PROJECT_ROOT) -I$(PROJECT_ROOT)/netware
+C_FLAGS += -relax_pointers # To remove type-casting errors
+C_FLAGS += -DNETWARE -DZTS -DNEW_LIBC -DUSE_OLD_FUNCTIONS -DCOMPILE_DL_MYSQL=1
+C_FLAGS += -I. -I- -I$(PROJECT_ROOT) -I$(PROJECT_ROOT)/main
+C_FLAGS += -I$(PROJECT_ROOT)/ext/standard -I$(PROJECT_ROOT)/netware
C_FLAGS += -I$(PROJECT_ROOT)/zend -I$(PROJECT_ROOT)/tsrm
-C_FLAGS += -I- -I$(SDK_DIR)/include -I$(MWCIncludes)
-C_FLAGS += -I$(MYSQL_DIR)/include -DCOMPILE_DL_MYSQL=1
+C_FLAGS += -I$(SDK_DIR)/include -I$(MWCIncludes)
+C_FLAGS += -I$(MYSQL_DIR)/include
C_FLAGS += -I$(WINSOCK_DIR)/include/nlm -I$(WINSOCK_DIR)/include
@@ -79,10 +81,6 @@ IMPORT = @$(SDK_DIR)/imports/libc.imp \
@$(SDK_DIR)/imports/ws2nlm.imp \
@$(MPK_DIR)/import/mpkOrg.imp \
@$(PROJECT_ROOT)/netware/phplib.imp
-
-#EXPORT = mysql_functions \
-# mysql_module_entry \
-# ($(MODULE_NAME).nlm) get_module
EXPORT = ($(MODULE_NAME)) get_module
API = OutputToScreen
@@ -119,7 +117,7 @@ $(OBJ_DIR)/%.obj: %.c
@$(CC) $< $(C_FLAGS) -o $@
-$(BINARY): $(DEPDS) $(OBJECTS)
+$(BINARY): $(OBJECTS)
@echo Import $(IMPORT) > $(basename $@).def
ifdef API
@echo Import $(API) >> $(basename $@).def
@@ -133,8 +131,13 @@ ifeq '$(BUILD)' 'debug'
@echo Debug >> $(basename $@).def
endif
@echo Flag_On 0x00000008 >> $(basename $@).def
- @echo Start _NonAppStart >> $(basename $@).def
- @echo Exit _NonAppStop >> $(basename $@).def
+# @echo Start _NonAppStart >> $(basename $@).def
+# @echo Exit _NonAppStop >> $(basename $@).def
+ @echo Start _LibCPrelude >> $(basename $@).def
+ @echo Exit _LibCPostlude >> $(basename $@).def
+
+ $(MPKTOOL) $(XDCFLAGS) $(basename $@).xdc
+ @echo xdcdata $(basename $@).xdc >> $(basename $@).def
@echo Linking $@...
@echo $(LD_FLAGS) -commandfile $(basename $@).def > $(basename $@).link
@@ -143,7 +146,7 @@ endif
.PHONY: clean
-clean: cleand cleanobj cleanbin
+clean: cleanobj cleanbin
.PHONY: cleand
cleand:
diff --git a/ext/session/mod_files.c b/ext/session/mod_files.c
index 684b42c793..af6c1dbf1d 100644
--- a/ext/session/mod_files.c
+++ b/ext/session/mod_files.c
@@ -172,7 +172,11 @@ static int ps_files_cleanup_dir(const char *dirname, int maxlifetime TSRMLS_DC)
DIR *dir;
char dentry[sizeof(struct dirent) + MAXPATHLEN];
struct dirent *entry = (struct dirent *) &dentry;
+#if defined(NETWARE) && defined(CLIB_STAT_PATCH)
+ struct stat_libc sbuf;
+#else
struct stat sbuf;
+#endif
char buf[MAXPATHLEN];
time_t now;
int nrdels = 0;
@@ -206,7 +210,11 @@ static int ps_files_cleanup_dir(const char *dirname, int maxlifetime TSRMLS_DC)
buf[dirname_len + entry_len + 1] = '\0';
/* check whether its last access was more than maxlifet ago */
if (VCWD_STAT(buf, &sbuf) == 0 &&
+#if defined(NETWARE) && defined(CLIB_STAT_PATCH)
+ (now - (sbuf.st_mtime).tv_sec) > maxlifetime) {
+#else
(now - sbuf.st_mtime) > maxlifetime) {
+#endif
VCWD_UNLINK(buf);
nrdels++;
}
@@ -258,7 +266,11 @@ PS_CLOSE_FUNC(files)
PS_READ_FUNC(files)
{
long n;
+#if defined(NETWARE) && defined(CLIB_STAT_PATCH)
+ struct stat_libc sbuf;
+#else
struct stat sbuf;
+#endif
PS_FILES_DATA;
ps_files_open(data, key TSRMLS_CC);
diff --git a/ext/session/session.c b/ext/session/session.c
index a720cf004a..1392d309d1 100644
--- a/ext/session/session.c
+++ b/ext/session/session.c
@@ -729,7 +729,11 @@ static void strcpy_gmt(char *ubuf, time_t *when)
static void last_modified(TSRMLS_D)
{
const char *path;
+#if defined(NETWARE) && defined(CLIB_STAT_PATCH)
+ struct stat_libc sb;
+#else
struct stat sb;
+#endif
char buf[MAX_STR + 1];
path = SG(request_info).path_translated;
@@ -740,7 +744,11 @@ static void last_modified(TSRMLS_D)
#define LAST_MODIFIED "Last-Modified: "
memcpy(buf, LAST_MODIFIED, sizeof(LAST_MODIFIED) - 1);
+#ifdef NETWARE
+ strcpy_gmt(buf + sizeof(LAST_MODIFIED) - 1, &((sb.st_mtime).tv_sec));
+#else
strcpy_gmt(buf + sizeof(LAST_MODIFIED) - 1, &sb.st_mtime);
+#endif
ADD_COOKIE(buf);
}
}