Compare commits

...
13 Commits
Author SHA1 Message Date
SVN Migration 7203320201 This commit was manufactured by cvs2svn to create tag 'php_4_2_3'. 2002-09-05 23:20:51 +00:00
Zeev Suraski 27176de818 Go with 4.2.3 (will be posted tomorrow) 2002-09-05 23:20:50 +00:00
Edin Kadribasic 5245a0dc9e Added UTF-8 support to pcre on windows as suggested by Wez Furlong. 2002-09-05 13:51:29 +00:00
foobar 0cb9d15e73 MFH: Fix the missing libgcc problems. 2002-09-04 18:17:41 +00:00
Dan Kalowsky 4a1ca49acb Taking out the PWRITE functions too... 2002-09-04 13:50:38 +00:00
Dan Kalowsky 2dd9fdfd85 MFH, removing PREAD for Bug #15983 2002-09-04 13:49:58 +00:00
Dan Kalowsky 85db415f29 No more C++ comments again 2002-09-04 04:04:36 +00:00
Dan Kalowsky e22cec443e No C++ comments 2002-09-04 03:56:18 +00:00
Marcus Boerger 7a6418cad2 Fix warnings again....
#So many different compilers...
2002-09-03 19:09:03 +00:00
foobar cc7433870c Patch by Melvyn to make ttf/ft string functions work again. 2002-09-03 13:09:29 +00:00
Markus Fischer 0151cb75cf - Update 2002-09-03 11:42:38 +00:00
Derick Rethans 80756295f6 - Fix #ifdefs 2002-09-03 07:39:10 +00:00
Markus Fischer 3131aafe57 - MFH as suggested by Derick, see HEAD commit for more on this
# This is a blind commit, I don't have the resources to build the 4_2_0 branch
# on win32, can someone test it?
2002-09-02 18:18:19 +00:00
25 changed files with 148 additions and 1638 deletions

No files matched your search

+2 -1
View File
@@ -1,6 +1,7 @@
PHP 4 NEWS
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
?? ??? 2002, Version 4.2.3
06 Sep 2002, Version 4.2.3
- Enabled strcoll() on win32. (Markus)
- Fixed possible ASCII control char injection in mail(). (Stefan Esser)
- Fixed a potential crash bug in import_request_variables() (Zeev)
- Fixed several problems with directory functions on Windows. (Steph)
-9
View File
@@ -1,9 +0,0 @@
#ifndef TSRM_CONFIG_NW_H
#define TSRM_CONFIG_NW_H
#define HAVE_UTIME 1
/* Though we have alloca(), this seems to be causing some problem with the stack pointer -- hence not using it */
/* #define HAVE_ALLOCA 1 */
#endif
-260
View File
@@ -1,260 +0,0 @@
/*
+----------------------------------------------------------------------+
| PHP Version 4 |
+----------------------------------------------------------------------+
| Copyright (c) 1997-2002 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 2.02 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
| available at through the world-wide-web at |
| http://www.php.net/license/2_02.txt. |
| If you did not receive a copy of the PHP license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@php.net so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
| Authors: Venkat Raghavan S <rvenkat@novell.com> |
+----------------------------------------------------------------------+
*/
/* $Id$ */
#include <stdlib.h>
#include <stdio.h>
#include <fcntl.h>
#include "TSRM.h"
#ifdef NETWARE
#ifdef USE_MKFIFO
#include <sys/stat.h>
#elif !defined(USE_PIPE_OPEN) /* NXFifoOpen */
#include <nks/fsio.h>
#endif
#include <nks/vm.h>
#include <nks/memory.h>
#include <string.h>
#include "mktemp.h"
/* strtok() call in LibC is abending when used in a different address space -- hence using
PHP's version itself for now : Venkat (30/4/02) */
#include "tsrm_strtok_r.h"
#define tsrm_strtok_r(a,b,c) strtok((a),(b))
#define WHITESPACE " \t"
#define MAX_ARGS 10
TSRM_API FILE* popen(const char *commandline, const char *type)
{
char *command = NULL, *argv[MAX_ARGS] = {'\0'}, **env = NULL;
char *tempName = "sys:/php/temp/phpXXXXXX.tmp";
char *filePath = NULL;
char *ptr = NULL;
int ptrLen = 0, argc = 0, i = 0, envCount = 0, err = 0;
FILE *stream = NULL;
#if defined(USE_PIPE_OPEN) || defined(USE_MKFIFO)
int pipe_handle;
int mode = O_RDONLY;
#else
NXHandle_t pipe_handle;
NXMode_t mode = NX_O_RDONLY;
#endif
NXExecEnvSpec_t envSpec;
NXNameSpec_t nameSpec;
NXVmId_t newVM = 0;
/* Check for validity of input parameters */
if (!commandline || !type)
return NULL;
/* Get temporary file name */
filePath = mktemp(tempName);
/*consoleprintf ("PHP | popen: file path = %s, mode = %s\n", filePath, type);*/
if (!filePath)
return NULL;
/* Set pipe mode according to type -- for now allow only "r" or "w" */
if (strcmp(type, "r") == 0)
#if defined(USE_PIPE_OPEN) || defined(USE_MKFIFO)
mode = O_RDONLY;
#else
mode = NX_O_RDONLY;
#endif
else if (strcmp(type, "w") == 0)
#if defined(USE_PIPE_OPEN) || defined(USE_MKFIFO)
mode = O_WRONLY;
#else
mode = NX_O_WRONLY;
#endif
else
return NULL;
#ifdef USE_PIPE_OPEN
pipe_handle = pipe_open(filePath, mode);
/*consoleprintf ("PHP | popen: pipe_open() returned %d\n", pipe_handle);*/
if (pipe_handle == -1)
return NULL;
#elif defined(USE_MKFIFO)
pipe_handle = mkfifo(filePath, mode);
consoleprintf ("PHP | popen: mkfifo() returned %d\n", pipe_handle);
if (pipe_handle == -1)
return NULL;
#else
/*
- NetWare doesn't require first parameter
- Allowing LibC to choose the buffer size for now
*/
err = NXFifoOpen(0, filePath, mode, 0, &pipe_handle);
/*consoleprintf ("PHP | popen: NXFifoOpen() returned %d\n", err);*/
if (err)
return NULL;
#endif
/* Copy the environment variables in preparation for the spawn call */
envCount = NXGetEnvCount() + 1; /* add one for NULL */
env = (char**)NXMemAlloc(sizeof(char*) * envCount, 0);
if (!env)
return NULL;
err = NXCopyEnv(env, envCount);
consoleprintf ("PHP | popen: NXCopyEnv() returned %d\n", err);
if (err)
{
NXMemFree (env);
return NULL;
}
/* Separate commandline string into words */
consoleprintf ("PHP | popen: commandline = %s\n", commandline);
ptr = tsrm_strtok_r((char*)commandline, WHITESPACE, NULL);
ptrLen = strlen(ptr);
command = (char*)malloc(ptrLen + 1);
if (!command)
{
NXMemFree (env);
return NULL;
}
strcpy (command, ptr);
ptr = tsrm_strtok_r(NULL, WHITESPACE, NULL);
while (ptr && (argc < MAX_ARGS))
{
ptrLen = strlen(ptr);
argv[argc] = (char*)malloc(ptrLen + 1);
if (!argv[argc])
{
NXMemFree (env);
if (command)
free (command);
for (i = 0; i < argc; i++)
{
if (argv[i])
free (argv[i]);
}
return NULL;
}
strcpy (argv[argc], ptr);
argc++;
ptr = tsrm_strtok_r(NULL, WHITESPACE, NULL);
}
consoleprintf ("PHP | popen: commandline string parsed into tokens\n");
/* Setup the execution environment and spawn new process */
envSpec.esFlags = 0; /* Not used */
envSpec.esArgc = argc;
envSpec.esArgv = (void**)argv;
envSpec.esEnv = (void**)env;
envSpec.esStdin.ssType =
envSpec.esStdout.ssType = NX_OBJ_FIFO;
envSpec.esStderr.ssType = NX_OBJ_FILE;
/*
envSpec.esStdin.ssHandle =
envSpec.esStdout.ssHandle =
envSpec.esStderr.ssHandle = -1;
*/
envSpec.esStdin.ssPathCtx =
envSpec.esStdout.ssPathCtx =
envSpec.esStderr.ssPathCtx = NULL;
#if defined(USE_PIPE_OPEN) || defined(USE_MKFIFO)
if (mode == O_RDONLY)
#else
if (mode == NX_O_RDONLY)
#endif
{
envSpec.esStdin.ssPath = filePath;
envSpec.esStdout.ssPath = stdout;
}
else /* Write Only */
{
envSpec.esStdin.ssPath = stdin;
envSpec.esStdout.ssPath = filePath;
}
envSpec.esStderr.ssPath = stdout;
nameSpec.ssType = NX_OBJ_FIFO;
/* nameSpec.ssHandle = 0; */ /* Not used */
nameSpec.ssPathCtx = NULL; /* Not used */
nameSpec.ssPath = argv[0];
consoleprintf ("PHP | popen: environment setup\n");
err = NXVmSpawn(&nameSpec, &envSpec, 0, &newVM);
consoleprintf ("PHP | popen: NXVmSpawn() returned %d\n", err);
if (!err)
/* Get file pointer corresponding to the pipe (file) opened */
stream = fdopen(pipe_handle, type);
/* Clean-up */
if (env)
NXMemFree (env);
if (pipe_handle)
#if defined(USE_PIPE_OPEN) || defined(USE_MKFIFO)
close(pipe_handle);
#else
NXClose(pipe_handle);
#endif
if (command)
free (command);
for (i = 0; i < argc; i++)
{
if (argv[i])
free (argv[i]);
}
consoleprintf ("PHP | popen: all clean-up done, returning...\n");
return stream;
}
TSRM_API int pclose(FILE* stream)
{
int err = 0;
NXHandle_t fd = 0;
/* Get the process associated with this pipe (file) handle and terminate it */
fd = fileno(stream);
NXClose (fd);
err = fclose(stream);
return err;
}
#endif
-28
View File
@@ -1,28 +0,0 @@
/*
+----------------------------------------------------------------------+
| PHP Version 4 |
+----------------------------------------------------------------------+
| Copyright (c) 1997-2002 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 2.02 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
| available at through the world-wide-web at |
| http://www.php.net/license/2_02.txt. |
| If you did not receive a copy of the PHP license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@php.net so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
| Authors: Venkat Raghavan S <rvenkat@novell.com> |
+----------------------------------------------------------------------+
*/
#ifndef TSRM_NW_H
#define TSRM_NW_H
#include "TSRM.h"
TSRM_API FILE* popen(const char *command, const char *type);
TSRM_API int pclose(FILE* stream);
#endif
+31 -35
View File
@@ -36,7 +36,7 @@ for arg in $0 "$@"; do
done
AC_CANONICAL_HOST
AM_INIT_AUTOMAKE(php, 4.2.3RC2, nodefine)
AM_INIT_AUTOMAKE(php, 4.2.3, nodefine)
AM_CONFIG_HEADER(main/php_config.h)
AM_MAINTAINER_MODE
@@ -70,40 +70,6 @@ if test -n "$with_apache" && test -n "$with_apxs"; then
AC_MSG_ERROR([--with-apache and --with-apxs cannot be used together])
fi
dnl Platform-specific compile settings.
dnl -------------------------------------------------------------------------
dnl if host_alias is empty, ac_cv_host_alias may still have the info
if test -z "$host_alias"; then
host_alias=$ac_cv_host_alias
fi
BSD_MAKEFILE=no
case $host_alias in
*solaris*)
CPPFLAGS="$CPPFLAGS -D_POSIX_PTHREAD_SEMANTICS"
if test "${enable_libgcc+set}" != "set" && test "$GCC" = "yes"; then
enable_libgcc=yes
fi
;;
*dgux*)
CPPFLAGS="$CPPFLAGS -D_BSD_TIMEOFDAY_FLAVOR";;
*darwin*|*rhapsody*)
CPPFLAGS="$CPPFLAGS -traditional-cpp";;
*bsdi*)
BSD_MAKEFILE=yes;;
*beos*)
beos_threads=1
LIBS="$LIBS -lbe -lroot";;
*mips*)
CPPFLAGS="$CPPFLAGS -D_XPG_IV";;
esac
dnl Settings we want to make before the checks.
dnl -------------------------------------------------------------------------
@@ -195,6 +161,36 @@ if test "$ac_cv_c_const" = "yes" ; then
fi
dnl Platform-specific compile settings.
dnl -------------------------------------------------------------------------
dnl if host_alias is empty, ac_cv_host_alias may still have the info
if test -z "$host_alias"; then
host_alias=$ac_cv_host_alias
fi
BSD_MAKEFILE=no
case $host_alias in
*solaris*)
CPPFLAGS="$CPPFLAGS -D_POSIX_PTHREAD_SEMANTICS"
if test "${enable_libgcc+set}" != "set" && test "$GCC" = "yes"; then
enable_libgcc=yes
fi
;;
*dgux*)
CPPFLAGS="$CPPFLAGS -D_BSD_TIMEOFDAY_FLAVOR";;
*darwin*|*rhapsody*)
CPPFLAGS="$CPPFLAGS -traditional-cpp";;
*bsdi*)
BSD_MAKEFILE=yes;;
*beos*)
beos_threads=1
LIBS="$LIBS -lbe -lroot";;
*mips*)
CPPFLAGS="$CPPFLAGS -D_XPG_IV";;
esac
dnl Include Zend and TSRM configurations.
dnl -------------------------------------------------------------------------
+72 -72
View File
@@ -73,8 +73,8 @@
typedef unsigned char uchar;
#ifndef TRUE
#define TRUE 1
#define FALSE 0
#define TRUE 1
#define FALSE 0
#endif
#define EXIT_FAILURE 1
@@ -937,9 +937,9 @@ void add_assoc_image_info( pval *value, int sub_array, image_info_type *image_in
for(i=0; i<image_info->info_list[section_index].count; i++)
{
info_value = &image_info->info_list[section_index].list[i];
#ifdef EXIF_DEBUG
#ifdef EXIF_DEBUG
/* php_error(E_NOTICE,"adding info #%d: '%s:%s'", i, exif_get_sectionname(section_index), info_value->name);*/
#endif
#endif
if ( !(name = info_value->name)) {
sprintf(uname,"%d", unknown++);
name = uname;
@@ -1065,7 +1065,7 @@ void add_assoc_image_info( pval *value, int sub_array, image_info_type *image_in
We want to print out the marker contents as legible text;
we must guard against random junk and varying newline representations.
*/
static void exif_process_COM (image_info_type *image_info, uchar *value, int length)
static void exif_process_COM (image_info_type *image_info, char *value, int length)
{
exif_add_image_info( image_info, SECTION_COMMENT, "Comment", TAG_COMPUTED_VALUE, TAG_FMT_STRING, length-2, value+2);
}
@@ -1399,9 +1399,9 @@ static void exif_process_IFD_TAG(image_info_type *ImageInfo, char *dir_entry, ch
}
ImageInfo->sections_found |= FOUND_ANY_TAG;
#ifdef EXIF_DEBUG
#ifdef EXIF_DEBUG
php_error(E_NOTICE,"process tag(x%04x=%s,@x%04X+x%04X(=%d)): %s", tag, exif_get_tagname(tag,tagname), value_ptr-offset_base, byte_count, byte_count, format==TAG_FMT_STRING?(value_ptr?value_ptr:"<no data>"):exif_get_tagformat(format));
#endif
#endif
if (section_index==SECTION_THUMBNAIL) {
switch(tag) {
case TAG_STRIP_OFFSETS:
@@ -1565,9 +1565,9 @@ static void exif_process_IFD_in_JPEG(image_info_type *ImageInfo, char *DirStart,
int NumDirEntries;
int NextDirOffset;
#ifdef EXIF_DEBUG
#ifdef EXIF_DEBUG
php_error(E_NOTICE,"exif_process_IFD_in_JPEG(x%04X(=%d))", IFDlength, IFDlength);
#endif
#endif
ImageInfo->sections_found |= FOUND_IFD0;
@@ -1593,9 +1593,9 @@ static void exif_process_IFD_in_JPEG(image_info_type *ImageInfo, char *DirStart,
return;
}
/* That is the IFD for the first thumbnail */
#ifdef EXIF_DEBUG
#ifdef EXIF_DEBUG
php_error(E_NOTICE,"expect next IFD to be thumbnail");
#endif
#endif
exif_process_IFD_in_JPEG(ImageInfo, OffsetBase + NextDirOffset, OffsetBase, IFDlength, SECTION_THUMBNAIL);
}
}
@@ -1626,9 +1626,9 @@ static void exif_process_TIFF_in_JPEG(image_info_type *ImageInfo, char *CharBuf,
/* First directory starts at offset 8. Offsets starts at 0. */
exif_process_IFD_in_JPEG(ImageInfo, CharBuf+8, CharBuf, length/*-14*/, SECTION_IFD0);
#ifdef EXIF_DEBUG
#ifdef EXIF_DEBUG
php_error(E_NOTICE,"exif_process_TIFF_in_JPEG, done");
#endif
#endif
/* Compute the CCD width, in milimeters. */
if (ImageInfo->FocalplaneXRes != 0) {
@@ -1650,9 +1650,9 @@ static void exif_process_APP1(image_info_type *ImageInfo, char *CharBuf, unsigne
return;
}
exif_process_TIFF_in_JPEG(ImageInfo,CharBuf+8,length-8);
#ifdef EXIF_DEBUG
#ifdef EXIF_DEBUG
php_error(E_NOTICE,"process Exif done");
#endif
#endif
}
/* }}} */
@@ -1670,9 +1670,9 @@ static void exif_process_APP12(image_info_type *ImageInfo, char *buffer, unsigne
exif_add_image_info( ImageInfo, SECTION_APP12, "Info", TAG_NONE, TAG_FMT_STRING, l2, buffer+2+l1+1);
}
}
#ifdef EXIF_DEBUG
#ifdef EXIF_DEBUG
php_error(E_NOTICE,"process section APP12 with l1=%d, l2=%d done", l1, l2);
#endif
#endif
}
/* }}} */
@@ -1687,22 +1687,22 @@ static int exif_scan_JPEG_header(image_info_type *ImageInfo, FILE *infile)
int marker = 0;
int ll, lh, got;
uchar *Data;
#ifdef EXIF_DEBUG
#ifdef EXIF_DEBUG
size_t fpos;
#endif
#endif
#ifdef EXIF_DEBUG
#ifdef EXIF_DEBUG
fpos = ftell(infile);
php_error(E_NOTICE,"search section %d at 0x%04X", ImageInfo->sections_count, fpos);
#endif
#endif
for (a=0;a<7;a++) {
marker = fgetc(infile);
if (marker != 0xff) break;
}
#ifdef EXIF_DEBUG
#ifdef EXIF_DEBUG
fpos = ftell(infile);
#endif
#endif
if (marker == 0xff) {
/* 0xff is legal padding, but if we get that many, something's wrong. */
php_error(E_WARNING, "too many padding bytes!");
@@ -1737,9 +1737,9 @@ static int exif_scan_JPEG_header(image_info_type *ImageInfo, FILE *infile)
return FALSE;
}
#ifdef EXIF_DEBUG
#ifdef EXIF_DEBUG
php_error(E_NOTICE,"process section(x%02X=%s) @ x%04X + x%04X(=%d)", marker, exif_get_markername(marker), fpos, itemlen, itemlen);
#endif
#endif
switch(marker) {
case M_SOS: /* stop before hitting compressed data */
/* If reading entire image is requested, read the rest of the data. */
@@ -1793,9 +1793,9 @@ static int exif_scan_JPEG_header(image_info_type *ImageInfo, FILE *infile)
break;
case M_FPIX:
/*ImageInfo->sections_found |= FOUND_FPIX;*/
#ifdef EXIF_DEBUG
#ifdef EXIF_DEBUG
php_error(E_NOTICE,"Found Flash Pix Extension Data");
#endif
#endif
/*exif_process_TIFF_in_JPEG(ImageInfo,(char *)Data,itemlen);*/
break;
case M_APP12:
@@ -1823,9 +1823,9 @@ static int exif_scan_JPEG_header(image_info_type *ImageInfo, FILE *infile)
break;
}
}
#ifdef EXIF_DEBUG
#ifdef EXIF_DEBUG
php_error(E_NOTICE,"exif_scan_JPEG_header, done");
#endif
#endif
return TRUE;
}
/* }}} */
@@ -1838,9 +1838,9 @@ static int exif_process_IFD_in_TIFF(image_info_type *ImageInfo, FILE *infile, si
unsigned char *dir_entry;
size_t ifd_size, dir_size, entry_offset, next_offset, entry_length, entry_value;
int entry_tag , entry_type;
#ifdef EXIF_DEBUG
#ifdef EXIF_DEBUG
char tagname[64];
#endif
#endif
sn = ImageInfo->sections_count++;
if ( ImageInfo->FileSize >= dir_offset+2) {
@@ -1850,17 +1850,17 @@ static int exif_process_IFD_in_TIFF(image_info_type *ImageInfo, FILE *infile, si
fread(ImageInfo->sections[sn].Data, 1, 2, infile);
num_entries = php_ifd_get16u(ImageInfo->sections[sn].Data, ImageInfo->motorola_intel);
dir_size = 2/*num dir entries*/ +12/*length of entry*/*num_entries +4/* offset to next ifd (points to thumbnail or NULL)*/;
#ifdef EXIF_DEBUG
#ifdef EXIF_DEBUG
php_error(E_NOTICE,"Read from TIFF: filesize(x%04X), IFD dir(x%04X + x%04X), IFD entries(%d)", ImageInfo->FileSize, dir_offset, dir_size, num_entries);
#endif
#endif
if ( ImageInfo->FileSize >= dir_offset+dir_size) {
ImageInfo->sections[sn].Size = dir_size;
ImageInfo->sections[sn].Data = erealloc(ImageInfo->sections[sn].Data,ImageInfo->sections[sn].Size);
fread(ImageInfo->sections[sn].Data+2, 1, dir_size-2, infile);
next_offset = php_ifd_get32u(ImageInfo->sections[sn].Data + dir_size - 4, ImageInfo->motorola_intel);
#ifdef EXIF_DEBUG
#ifdef EXIF_DEBUG
php_error(E_NOTICE,"Read from TIFF done, next offset x%04X", next_offset);
#endif
#endif
/* now we have the directory we can look how long it should be */
ifd_size = dir_size;
for(i=0;i<num_entries;i++) {
@@ -1930,13 +1930,13 @@ static int exif_process_IFD_in_TIFF(image_info_type *ImageInfo, FILE *infile, si
php_error(E_ERROR,"Error in TIFF: filesize(x%04X) less than size of IFD(x%04X + x%04X)", ImageInfo->FileSize, dir_offset, ifd_size);
return FALSE;
}
#ifdef EXIF_DEBUG
#ifdef EXIF_DEBUG
php_error(E_NOTICE,"Read from TIFF: filesize(x%04X), IFD(x%04X + x%04X)", ImageInfo->FileSize, dir_offset, ifd_size);
#endif
#endif
fread(ImageInfo->sections[sn].Data+dir_size, 1, ifd_size-dir_size, infile);
#ifdef EXIF_DEBUG
#ifdef EXIF_DEBUG
php_error(E_NOTICE,"Read from TIFF, done");
#endif
#endif
}
/* now process the tags */
for(i=0;i<num_entries;i++) {
@@ -1964,27 +1964,27 @@ static int exif_process_IFD_in_TIFF(image_info_type *ImageInfo, FILE *infile, si
break;
}
entry_offset = php_ifd_get32u(dir_entry+8, ImageInfo->motorola_intel);
#ifdef EXIF_DEBUG
#ifdef EXIF_DEBUG
php_error(E_NOTICE,"Found other IFD: %s at x%04X", exif_get_tagname(entry_tag,tagname), entry_offset);
#endif
#endif
exif_process_IFD_in_TIFF(ImageInfo,infile,entry_offset,sub_section_index);
#ifdef EXIF_DEBUG
#ifdef EXIF_DEBUG
php_error(E_NOTICE,"TIFF subsection %s done", exif_get_sectionname(sub_section_index));
#endif
#endif
} else {
exif_process_IFD_TAG(ImageInfo,dir_entry,ImageInfo->sections[sn].Data-dir_offset,ifd_size,section_index,0);
exif_process_IFD_TAG(ImageInfo,(char*)dir_entry,(char*)(ImageInfo->sections[sn].Data-dir_offset),ifd_size,section_index,0);
}
}
if (next_offset && section_index != SECTION_THUMBNAIL) {
/* this should be a thumbnail IFD */
/* the thumbnail itself is stored at Tag=StripOffsets */
#ifdef EXIF_DEBUG
#ifdef EXIF_DEBUG
php_error(E_NOTICE,"Read next IFD (THUMBNAIL) at x%04X", next_offset);
#endif
#endif
exif_process_IFD_in_TIFF(ImageInfo,infile,next_offset,SECTION_THUMBNAIL);
#ifdef EXIF_DEBUG
#ifdef EXIF_DEBUG
php_error(E_NOTICE,"Read THUMBNAIL @0x%04X + 0x%04X", ImageInfo->ThumbnailOffset, ImageInfo->ThumbnailSize);
#endif
#endif
if (ImageInfo->ThumbnailOffset && ImageInfo->ThumbnailSize) {
ImageInfo->Thumbnail = emalloc(ImageInfo->ThumbnailSize);
if (!ImageInfo->Thumbnail) {
@@ -1994,9 +1994,9 @@ static int exif_process_IFD_in_TIFF(image_info_type *ImageInfo, FILE *infile, si
fread(ImageInfo->Thumbnail, 1, ImageInfo->ThumbnailSize, infile);
}
}
#ifdef EXIF_DEBUG
#ifdef EXIF_DEBUG
php_error(E_NOTICE,"Read next IFD (THUMBNAIL) done");
#endif
#endif
}
return TRUE;
} else {
@@ -2034,9 +2034,9 @@ static int exif_scan_FILE_header (image_info_type *ImageInfo, FILE *infile)
{
ImageInfo->FileType = IMAGE_FILETYPE_TIFF_II;
ImageInfo->motorola_intel = 0;
#ifdef EXIF_DEBUG
#ifdef EXIF_DEBUG
php_error(E_NOTICE,"File(%s) has TIFF/II format", ImageInfo->FileName);
#endif
#endif
ImageInfo->sections_found |= FOUND_IFD0;
return exif_process_IFD_in_TIFF(ImageInfo,infile,php_ifd_get32u(file_header+4,ImageInfo->motorola_intel),SECTION_IFD0);
}
@@ -2045,9 +2045,9 @@ static int exif_scan_FILE_header (image_info_type *ImageInfo, FILE *infile)
{
ImageInfo->FileType = IMAGE_FILETYPE_TIFF_MM;
ImageInfo->motorola_intel = 1;
#ifdef EXIF_DEBUG
#ifdef EXIF_DEBUG
php_error(E_NOTICE,"File(%s) has TIFF/MM format", ImageInfo->FileName);
#endif
#endif
ImageInfo->sections_found |= FOUND_IFD0;
return exif_process_IFD_in_TIFF(ImageInfo,infile,php_ifd_get32u(file_header+4,ImageInfo->motorola_intel),SECTION_IFD0);
}
@@ -2179,11 +2179,11 @@ PHP_FUNCTION(exif_read_data)
}
efree(sections_str);
/* now see what we need */
#ifdef EXIF_DEBUG
#ifdef EXIF_DEBUG
sections_str = exif_get_sectionlist(sections_needed);
php_error(E_NOTICE,"Sections needed: %s", sections_str[0] ? sections_str : "None");
efree(sections_str);
#endif
#endif
}
if(ac >= 3) {
convert_to_long_ex(p_sub_arrays);
@@ -2204,9 +2204,9 @@ PHP_FUNCTION(exif_read_data)
sections_str = exif_get_sectionlist(ImageInfo.sections_found);
#ifdef EXIF_DEBUG
#ifdef EXIF_DEBUG
php_error(E_NOTICE,"Sections found: %s", sections_str[0] ? sections_str : "None");
#endif
#endif
ImageInfo.sections_found |= FOUND_COMPUTED;/* do not inform about in debug*/
@@ -2217,9 +2217,9 @@ PHP_FUNCTION(exif_read_data)
RETURN_FALSE;
}
#ifdef EXIF_DEBUG
#ifdef EXIF_DEBUG
php_error(E_NOTICE,"Returning information");
#endif
#endif
/*************************************************************************************************/
/* generic created information must use motorola/intel organisation from the executing processor */
@@ -2286,9 +2286,9 @@ PHP_FUNCTION(exif_read_data)
}
efree(sections_str);
#ifdef EXIF_DEBUG
#ifdef EXIF_DEBUG
php_error(E_NOTICE,"adding image infos");
#endif
#endif
add_assoc_image_info( return_value, sub_arrays, &ImageInfo, SECTION_FILE);
add_assoc_image_info( return_value, 1, &ImageInfo, SECTION_COMPUTED);
@@ -2302,15 +2302,15 @@ PHP_FUNCTION(exif_read_data)
add_assoc_image_info( return_value, sub_arrays, &ImageInfo, SECTION_FPIX);
add_assoc_image_info( return_value, sub_arrays, &ImageInfo, SECTION_APP12);
#ifdef EXIF_DEBUG
#ifdef EXIF_DEBUG
php_error(E_NOTICE,"Discarding info");
#endif
#endif
php_exif_discard_imageinfo(&ImageInfo);
#ifdef EXIF_DEBUG
#ifdef EXIF_DEBUG
php_error(E_NOTICE,"read_exif_data done");
#endif
#endif
}
/* }}} */
@@ -2342,21 +2342,21 @@ PHP_FUNCTION(exif_thumbnail)
RETURN_FALSE;
}
#ifdef EXIF_DEBUG
#ifdef EXIF_DEBUG
php_error(E_NOTICE,"Returning thumbnail(%d)", ImageInfo.ThumbnailSize);
#endif
#endif
RETVAL_STRINGL(ImageInfo.Thumbnail, ImageInfo.ThumbnailSize, 1);
#ifdef EXIF_DEBUG
#ifdef EXIF_DEBUG
php_error(E_NOTICE,"Discarding info");
#endif
#endif
php_exif_discard_imageinfo(&ImageInfo);
#ifdef EXIF_DEBUG
#ifdef EXIF_DEBUG
php_error(E_NOTICE,"exif_thumbnail done");
#endif
#endif
}
/* }}} */
+17 -14
View File
@@ -155,16 +155,16 @@ struct PHPFBLink
#define FBSQL_LOCK_DEFERRED 0
#define FBSQL_LOCK_OPTIMISTIC 1
#define FBSQL_LOCK_PESSIMISTIC 2 // default
#define FBSQL_LOCK_PESSIMISTIC 2 /* default */
#define FBSQL_ISO_READ_UNCOMMITTED 0
#define FBSQL_ISO_READ_COMMITTED 1
#define FBSQL_ISO_REPEATABLE_READ 2
#define FBSQL_ISO_SERIALIZABLE 3 // default
#define FBSQL_ISO_SERIALIZABLE 3 /* default */
#define FBSQL_ISO_VERSIONED 4
#define FBSQL_LOB_DIRECT 0 // default
#define FBSQL_LOB_HANDLE 1 // default
#define FBSQL_LOB_DIRECT 0 /* default */
#define FBSQL_LOB_HANDLE 1 /* default */
/* {{{ fbsql_functions[]
@@ -230,7 +230,7 @@ function_entry fbsql_functions[] = {
PHP_FE(fbsql_warnings, NULL)
PHP_FE(fbsql_get_autostart_info, NULL)
// PHP_FE(fbsql_set_autostart_info, NULL)
/* PHP_FE(fbsql_set_autostart_info, NULL) */
/* Aliases: */
PHP_FALIAS(fbsql, fbsql_db_query, NULL)
@@ -962,10 +962,10 @@ static void php_fbsql_create_lob(INTERNAL_FUNCTION_PARAMETERS, int lob_type)
convert_to_string_ex(lob_data);
switch (lob_type) {
case 0 : // BLOB
case 0 : /* BLOB */
lobHandle = fbcdcWriteBLOB(phpLink->connection, Z_STRVAL_PP(lob_data), Z_STRLEN_PP(lob_data));
break;
case 1 : // CLOB
case 1 : /* CLOB */
lobHandle = fbcdcWriteCLOB(phpLink->connection, Z_STRVAL_PP(lob_data));
break;
}
@@ -2384,7 +2384,7 @@ void phpfbColumnAsString (PHPFBResult* result, int column, void* data , int* len
case FB_BLOB:
{
if (*((unsigned char*) data) == '\1')
{ // Direct
{ /* Direct */
*length = ((FBCBlobDirect *)data)->blobSize;
*value = estrndup((char *)((FBCBlobDirect *)data)->blobData, *length);
}
@@ -3473,13 +3473,16 @@ PHP_FUNCTION(fbsql_get_autostart_info)
for (i=0; i<fbaCount(asInfo->infoLines); i++) {
FBArray* infoLine = fbaObjectAtIndex(asInfo->infoLines, i);
// if (fbaCount(infoLine) == 2) {
// fbaObjectAtIndex(infoLine, 0);
// fbaObjectAtIndex(infoLine, 1);
// }
// else {
/*
if (fbaCount(infoLine) == 2) {
fbaObjectAtIndex(infoLine, 0);
fbaObjectAtIndex(infoLine, 1);
}
else {
*/
add_index_string(return_value, i, fbaObjectAtIndex(infoLine, 0), 1);
// }
/* }
*/
}
}
+6 -6
View File
@@ -99,7 +99,7 @@ PHP_FUNCTION(fbsql_password);
PHP_FUNCTION(fbsql_warnings);
PHP_FUNCTION(fbsql_get_autostart_info);
//PHP_FUNCTION(fbsql_set_autostart_info);
/* PHP_FUNCTION(fbsql_set_autostart_info); */
static void php_fbsql_fetch_hash(INTERNAL_FUNCTION_PARAMETERS, int result_type);
static void php_fbsql_do_connect(INTERNAL_FUNCTION_PARAMETERS, int persistent);
@@ -130,15 +130,15 @@ ZEND_END_MODULE_GLOBALS(fbsql)
# define FB_SQL_G(v) (fbsql_globals.v)
#endif
//#ifndef ZTS // No need for external definitions
//extern fbsql_module* phpfbModule;
//#endif
/*#ifndef ZTS /* No need for external definitions */
/*extern fbsql_module* phpfbModule; */
/*#endif */
#else // HAVE_FBSQL
#else /* HAVE_FBSQL */
#define fbsql_module_ptr NULL
#error not ok
#endif // HAVE_FBSQL
#endif /* HAVE_FBSQL */
#define phpext_fbsql_ptr fbsql_module_ptr
+10 -2
View File
@@ -2655,8 +2655,12 @@ PHP_FUNCTION(imagesy)
Give the bounding box of a text using fonts via freetype2 */
PHP_FUNCTION(imageftbbox)
{
#if HAVE_LIBGD20 && HAVE_LIBFREETYPE && HAVE_GD_STRINGFTEX
#if HAVE_LIBGD20 && HAVE_LIBFREETYPE
# if HAVE_GD_STRINGFTEX
php_imagettftext_common(INTERNAL_FUNCTION_PARAM_PASSTHRU, TTFTEXT_BBOX, 1);
# else
php_imagettftext_common(INTERNAL_FUNCTION_PARAM_PASSTHRU, TTFTEXT_BBOX, 0);
# endif
#else
php_error(E_WARNING, "%s(): No FreeType 2 support in this PHP build", get_active_function_name(TSRMLS_C));
RETURN_FALSE;
@@ -2668,8 +2672,12 @@ PHP_FUNCTION(imageftbbox)
Write text to the image using fonts via freetype2 */
PHP_FUNCTION(imagefttext)
{
#if HAVE_LIBGD20 && HAVE_LIBFREETYPE && HAVE_GD_STRINGFTEX
#if HAVE_LIBGD20 && HAVE_LIBFREETYPE
# if HAVE_GD_STRINGFTEX
php_imagettftext_common(INTERNAL_FUNCTION_PARAM_PASSTHRU, TTFTEXT_DRAW, 1);
# else
php_imagettftext_common(INTERNAL_FUNCTION_PARAM_PASSTHRU, TTFTEXT_DRAW, 0);
# endif
#else
php_error(E_WARNING, "%s(): No FreeType 2 support in this PHP build", get_active_function_name(TSRMLS_C));
RETURN_FALSE;
-168
View File
@@ -1,168 +0,0 @@
# Temporarily here -- later may go into some batch file
# which will set this as an environment variable
PROJECT_ROOT = ..\..
# Module details
MODULE_NAME = phpmysql
MODULE_DESC = "PHP MySQL Extension"
VMAJ = 0
VMIN = 60
VREV = 0
#include the common settings
include $(PROJECT_ROOT)/netware/common.mif
# MYSQL stuff
MYSQL_DIR = P:/APPS/script/sw/mysql
# Build type defaults to 'release'
ifndef BUILD
BUILD = release
endif
# Extensions of all input and output files
.SUFFIXES:
.SUFFIXES: .nlm .lib .obj .cpp .c .msg .mlc .mdb .xdc .d
# Source files
C_SRC = php_mysql.c \
start.c
CPP_SRC_NODIR = $(notdir $(CPP_SRC))
C_SRC_NODIR = $(notdir $(C_SRC))
SRC_DIR = $(dir $(CPP_SRC) $(C_SRC))
# Library files
LIBRARY = $(MYSQL_DIR)/lib/libmysqlclient.lib
# Destination directories and files
OBJ_DIR = $(BUILD)
FINAL_DIR = $(BUILD)
OBJECTS = $(addprefix $(OBJ_DIR)/,$(CPP_SRC_NODIR:.c=.obj) $(C_SRC_NODIR:.c=.obj))
DEPDS = $(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 -wchar_t on -bool on -processor Pentium -align 1
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 += -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$(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 -DDEBUGGING -DDKFBPON
C_FLAGS += -exc cw -DZEND_DEBUG=1
LD_FLAGS += -sym on -sym codeview4 -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 -opt intrinsics
C_FLAGS += -opt level=4 -DZEND_DEBUG=0
LD_FLAGS += -sym off
export MWLibraryFiles=$(SDK_DIR)/imports/libcpre.o;mwcrtl.lib
endif
# Dependencies
MODULE = LibC \
phplib
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
# Virtual paths
vpath %.cpp .
vpath %.c . ..\..\netware
vpath %.obj $(OBJ_DIR)
all: prebuild project
.PHONY: all
prebuild:
@if not exist $(OBJ_DIR) md $(OBJ_DIR)
project: $(BINARY)
@echo Build complete.
$(OBJ_DIR)/%.d: %.cpp
@echo Building Dependencies for $(<F)
@$(CC) -M $< $(C_FLAGS) -o $@
$(OBJ_DIR)/%.d: %.c
@echo Building Dependencies for $(<F)
@$(CC) -M $< $(C_FLAGS) -o $@
$(OBJ_DIR)/%.obj: %.cpp
@echo Compiling $?...
@$(CC) $< $(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 _NonAppStart >> $(basename $@).def
@echo Exit _NonAppStop >> $(basename $@).def
@echo Linking $@...
@echo $(LD_FLAGS) -commandfile $(basename $@).def > $(basename $@).link
@echo $(LIBRARY) $(OBJECTS) >> $(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
-8
View File
@@ -255,12 +255,8 @@ PS_READ_FUNC(files)
data->st_size = *vallen = sbuf.st_size;
*val = emalloc(sbuf.st_size);
#ifdef HAVE_PREAD
n = pread(data->fd, *val, sbuf.st_size, 0);
#else
lseek(data->fd, 0, SEEK_SET);
n = read(data->fd, *val, sbuf.st_size);
#endif
if (n != sbuf.st_size) {
efree(*val);
return FAILURE;
@@ -286,12 +282,8 @@ PS_WRITE_FUNC(files)
if (vallen < (int)data->st_size)
ftruncate(data->fd, 0);
#ifdef HAVE_PWRITE
n = pwrite(data->fd, val, vallen, 0);
#else
lseek(data->fd, 0, SEEK_SET);
n = write(data->fd, val, vallen);
#endif
if (n != vallen) {
php_error(E_WARNING, "write failed: %s (%d)", strerror(errno), errno);
-274
View File
@@ -1,274 +0,0 @@
/* config.nw.h. Configure file for NetWare platform */
/****
Need to carefully look into each constant and either define or undef it w.r.t. NetWare.
****/
/* Define if PHP to setup it's own SIGCHLD handler (not needed on NetWare) */
#define PHP_SIGCHILD 0
/* dns functions found in resolv.lib */
#define HAVE_LIBBIND 1
#define HAVE_GETSERVBYNAME 1
#define HAVE_GETSERVBYPORT 1
#define HAVE_GETPROTOBYNAME 1
#define HAVE_GETPROTOBYNUMBER 1
/* set to enable bcmath */
#define WITH_BCMATH 1
/* set to enable mysql */
#define HAVE_MYSQL 1
/* set to enable FTP support */
#define HAVE_FTP 1
/* set to enable bundled PCRE library */
#define HAVE_BUNDLED_PCRE 1
/* set to enable bundled expat library */
/* #define HAVE_LIBEXPAT 1 */ /* For now */
#define HAVE_WDDX 0
/* set to enable the crypt command */
/* #define HAVE_CRYPT 1 */
/* #define HAVE_CRYPT_H 1 */
/* set to enable force cgi redirect */
#define FORCE_CGI_REDIRECT 0
/* should be added to runtime config*/
#define PHP_URL_FOPEN 1
#define STDIN_FILENO 0
#define STDOUT_FILENO 1
#define STDERR_FILENO 2
/* ----------------------------------------------------------------
The following are defaults for run-time configuration
---------------------------------------------------------------*/
#define PHP_SAFE_MODE 0
#define MAGIC_QUOTES 0
/* This is the default configuration file to read */
#define CONFIGURATION_FILE_PATH "php.ini"
#define USE_CONFIG_FILE 1
#define PHP_INCLUDE_PATH NULL
/* Undefine if you want stricter XML/SGML compliance by default */
/* this disables "<?expression?>" and "<?=expression?>" */
#define DEFAULT_SHORT_OPEN_TAG "1"
/* ----------------------------------------------------------------
The following defines are for those modules which require
external libraries to compile. These will be removed from
here in a future beta, as these modules will be moved out to dll's
---------------------------------------------------------------*/
#define HAVE_ERRMSG_H 0 /*needed for mysql 3.21.17 and up*/
#undef HAVE_ADABAS
#undef HAVE_SOLID
/* ----------------------------------------------------------------
The following may or may not be (or need to be) ported to the
windows environment.
---------------------------------------------------------------*/
/* Define if you have the link function. */
#undef HAVE_LINK
/* Define if you have the symlink function. */
#undef HAVE_SYMLINK
/* Define if you have the usleep function. */
#undef HAVE_USLEEP
#define HAVE_GETCWD 1
/* #define HAVE_POSIX_READDIR_R 1 */ /* We will use readdir() from LibC */
#define NEED_ISBLANK 1
/* ----------------------------------------------------------------
The following should never need to be played with
Functions defined to 0 or remarked out are either already
handled by the standard VC libraries, or are no longer needed, or
simply will/can not be ported.
DONT TOUCH!!!!! Unless you realy know what your messing with!
---------------------------------------------------------------*/
#define DISCARD_PATH 0
#undef HAVE_SETITIMER
#undef HAVE_IODBC
#define HAVE_UODBC 1
#define HAVE_LIBDL 1
#define HAVE_SENDMAIL 1
#define HAVE_GETTIMEOFDAY 1
#define HAVE_PUTENV 1
#define HAVE_LIMITS_H 1
#define HAVE_TZSET 1
#define HAVE_TZNAME 1
/* Define if you have the flock function. */
#undef HAVE_FLOCK
/* Define if you have alloca, as a function or macro. */
/* Though we have alloca(), this seems to be causing some problem with the stack pointer -- hence not using it */
/* #define HAVE_ALLOCA 1 */
/* Define if you have <sys/time.h> */
#undef HAVE_SYS_TIME_H
/* Define if you have <signal.h> */
#define HAVE_SIGNAL_H 1
/* Define if your struct stat has st_blksize. */
#define HAVE_ST_BLKSIZE
/* Define if your struct stat has st_blocks. */
#define HAVE_ST_BLOCKS
/* Define if your struct stat has st_rdev. */
#define HAVE_ST_RDEV 1
/* Define if utime(file, NULL) sets file's timestamp to the present. */
#define HAVE_UTIME_NULL 1
/* Define if you have the vprintf function. */
#define HAVE_VPRINTF 1
/* Define if you have the ANSI C header files. */
#define STDC_HEADERS 1
/* Define both of these if you want the bundled REGEX library */
#define REGEX 1
#define HSREGEX 1
#define HAVE_PCRE 1
#define HAVE_LDAP 1
/* Define if you have the gcvt function. */
/* #define HAVE_GCVT 1 */
/* Define if you have the getlogin function. */
/* #define HAVE_GETLOGIN 1 */
/* Define if you have the gettimeofday function. */
#define HAVE_GETTIMEOFDAY 1
/* Define if you have the memcpy function. */
#define HAVE_MEMCPY 1
/* Define if you have the memmove function. */
#define HAVE_MEMMOVE 1
/* Define if you have the putenv function. */
/* #define HAVE_PUTENV 1 */ /* Why are such things defined in more than one place ? */
/* Define if you have the regcomp function. */
/* #define HAVE_REGCOMP 1 */
/* Define if you have the setlocale function. */
/* #define HAVE_SETLOCALE 1 */ /* LibC doesn't seem to be supporting fully -- hence commenting for now */
#define HAVE_LOCALECONV 1
#define HAVE_LOCALE_H 1
/* Define if you have the setvbuf function. */
#ifndef HAVE_LIBBIND
#define HAVE_SETVBUF 1
#endif
/* Define if you have the snprintf function. */
#define HAVE_SNPRINTF 1
#define HAVE_VSNPRINTF 1
/* Define if you have the strcasecmp function. */
#define HAVE_STRCASECMP 1
/* Define if you have the strdup function. */
#define HAVE_STRDUP 1
/* Define if you have the strerror function. */
#define HAVE_STRERROR 1
/* Define if you have the strstr function. */
#define HAVE_STRSTR 1
/* Define if you have the tempnam function. */
#define HAVE_TEMPNAM 1
/* Define if you have the utime function. */
#define HAVE_UTIME 1
/* Define if you have the <dirent.h> header file. */
#define HAVE_DIRENT_H
/* Define if you have the <fcntl.h> header file. */
#define HAVE_FCNTL_H 1
/* Define if you have the <grp.h> header file. */
#define HAVE_GRP_H 0
/* Define if you have the <pwd.h> header file. */
#define HAVE_PWD_H 1
/* Define if you have the <string.h> header file. */
#define HAVE_STRING_H 1
/* Define if you have the <sys/file.h> header file. */
#undef HAVE_SYS_FILE_H
/* Define if you have the <sys/socket.h> header file. */
#define HAVE_SYS_SOCKET_H 1 /* Added '1' for '#if' to work */
/* Define if you have the <sys/wait.h> header file. */
#undef HAVE_SYS_WAIT_H
/* Define if you have the <syslog.h> header file. */
/* #define HAVE_SYSLOG_H 1 */
/* Define if you have the <unistd.h> header file. */
#define HAVE_UNISTD_H 1 /* Added '1' for '#if' to work */
/* Define if you have the dl library (-ldl). */
#define HAVE_LIBDL 1
/* Define if you have the m library (-lm). */
#define HAVE_LIBM 1
/* Define if you have the cuserid function. */
#define HAVE_CUSERID 0
/* Define if you have the rint function. */
#undef HAVE_RINT
#define HAVE_STRFTIME 1
/* Default directory for loading extensions. */
#define PHP_EXTENSION_DIR "sys:/php/ext"
#define SIZEOF_INT 4
/* Define directory constants for php and pear */
/* Venkat (20/12/01) */
#define APACHE_MODULE_DIR "sys:/apache/modules"
#define PHP_BINDIR "sys:/php"
#define PHP_LIBDIR PHP_BINDIR
#define PHP_DATADIR PHP_BINDIR
#define PHP_SYSCONFDIR PHP_BINDIR
#define PHP_LOCALSTATEDIR PHP_BINDIR
#define PHP_CONFIG_FILE_PATH "sys:/php"
#define PEAR_INSTALLDIR "sys:/php/pear"
+4
View File
@@ -266,3 +266,7 @@
#define PHP_LOCALSTATEDIR "c:\\php4"
#define PHP_CONFIG_FILE_PATH "c:\\winnt"
#define PEAR_INSTALLDIR "c:\\php4\\pear"
/* Win32 supports strcoll */
#define HAVE_STRCOLL 1
+1 -1
View File
@@ -1,3 +1,3 @@
/* automatically generated by configure */
/* edit configure.in to change version number */
#define PHP_VERSION "4.2.3RC2"
#define PHP_VERSION "4.2.3"
-21
View File
@@ -1,21 +0,0 @@
@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
-18
View File
@@ -1,18 +0,0 @@
@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
-18
View File
@@ -1,18 +0,0 @@
@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
-73
View File
@@ -1,73 +0,0 @@
#
# 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
-1
View File
@@ -1 +0,0 @@
char* mktemp(char* templateStr);
-161
View File
@@ -1,161 +0,0 @@
# 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
-49
View File
@@ -1,49 +0,0 @@
/* 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
-138
View File
@@ -1,138 +0,0 @@
#ifndef __sys_stat_h__
#define __sys_stat_h__
/*============================================================================
= Novell Software Development Kit
=
= Copyright (C) 1999-2002 Novell, Inc. All Rights Reserved.
=
= This work is subject to U.S. and international copyright laws and treaties.
= Use and redistribution of this work is subject to the license agreement
= accompanying the software development kit (SDK) that contains this work.
= However, no part of this work may be revised and/or modified without the
= prior written consent of Novell, Inc. Any use or exploitation of this work
= without authorization could subject the perpetrator to criminal and civil
= liability.
=
= Source(s): ISO/IEC (POSIX) 9845:1996
=
= sys/stat.h
==============================================================================
*/
#include <time.h>
#include <stddef.h>
#include <sys/mode.h>
#include <sys/time.h>
#include <pshpack1.h>
#ifdef CLIB_STAT_PATCH /* Venkat (7/2/02) */
/***************** stat structure taken from CLib and modified ***************/
struct stat
{
long st_dev; /* volume number */ /* dev_t replaced by long : Venkat (19/3/02) */
MACHINE_WORD st_ino; /* directory entry number of the st_name */ /* ino_t replaced by MACHINE_WORD : Venkat (19/3/02) */
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 : Venkat (19/3/02) */
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
{
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.) */
#else
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.) */
#endif
#include <poppack.h>
#ifdef __cplusplus
extern "C"
{
#endif
int chmod ( const char *path, mode_t mode );
int fchmod( int fildes, mode_t mode );
int fstat ( int fildes, struct stat *buf );
int mkdir ( const char *pathname, mode_t mode );
int mkfifo( const char *pathname, mode_t mode );
int stat ( const char *path, struct stat *buf );
mode_t umask ( mode_t cmask );
#ifdef __cplusplus
}
#endif
#define stat64 stat /* same structure and function do both */
#define fstat64 fstat /* same function does both */
#endif
-108
View File
@@ -1,108 +0,0 @@
# 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"
-163
View File
@@ -1,163 +0,0 @@
# 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"
+5 -10
View File
@@ -354,27 +354,27 @@ SOURCE=..\main\win95nt.h
# Begin Source File
SOURCE=..\ext\pcre\pcrelib\chartables.c
# ADD CPP /D "STATIC"
# ADD CPP /D "STATIC" /D "SUPPORT_UTF8"
# End Source File
# Begin Source File
SOURCE=..\ext\pcre\pcrelib\get.c
# ADD CPP /D "STATIC"
# ADD CPP /D "STATIC" /D "SUPPORT_UTF8"
# End Source File
# Begin Source File
SOURCE=..\ext\pcre\pcrelib\maketables.c
# ADD CPP /D "STATIC"
# ADD CPP /D "STATIC" /D "SUPPORT_UTF8"
# End Source File
# Begin Source File
SOURCE=..\ext\pcre\pcrelib\pcre.c
# ADD CPP /D "STATIC"
# ADD CPP /D "STATIC" /D "SUPPORT_UTF8"
# End Source File
# Begin Source File
SOURCE=..\ext\pcre\pcrelib\study.c
# ADD CPP /D "STATIC"
# ADD CPP /D "STATIC" /D "SUPPORT_UTF8"
# End Source File
# End Group
# Begin Group "Header Files No. 3"
@@ -1326,15 +1326,10 @@ SOURCE=..\ext\com\COM.c
# Begin Source File
SOURCE=..\ext\com\conversion.c
# End Source File
# Begin Source File
SOURCE=..\ext\com\dispatch.c
# End Source File
# Begin Source File