cvs: /php3/functions interbase.c
| From: | Nicolas Moreau | Date: | Wed, 01 Mar 2000 10:38:44 +0000 |
| Subject: | cvs: /php3/functions interbase.c | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-16191@lists.php.net to get a copy of this message | ||
moreaun Wed Mar 1 02:38:44 2000 EDT
Modified files:
/php3/functions interbase.c
Log:
Modify:
-> Now supports Win32 DLL creation
Issues:
->blob_import function not included in Win32 version
Index: php3/functions/interbase.c
diff -u php3/functions/interbase.c:1.25 php3/functions/interbase.c:1.26
--- php3/functions/interbase.c:1.25 Fri Feb 25 00:07:28 2000
+++ php3/functions/interbase.c Wed Mar 1 02:38:44 2000
@@ -28,7 +28,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: interbase.c,v 1.25 2000/02/25 08:07:28 jah Exp $ */
+/* $Id: interbase.c,v 1.26 2000/03/01 10:38:44 moreaun Exp $ */
/* TODO: Arrays, roles?
A lot... */
@@ -43,9 +43,20 @@
- safe rinit/rfinish: check for NULL so
rfinish could be called repeatedly
emalloc & co. replaced with malloc & co.
+ 2000-2-20: Nicolas Moreau <nicolas@enttec.com>
+ - Modify to compile and create a Windows DLL
*/
+#ifndef MSVC5
#include "config.h"
+#endif
+
+
+#if MSVC5
+#include <windows.h>
+#endif
+
+
#include "php.h"
#include "internal_functions.h"
#include "php3_interbase.h"
@@ -91,7 +102,11 @@
PHP_FE(ibase_blob_open, NULL)
PHP_FE(ibase_blob_get, NULL)
PHP_FE(ibase_blob_echo, NULL)
- PHP_FE(ibase_blob_import, NULL)
+#ifndef MSVC5
+
+ PHP_FE(ibase_blob_import, NULL)
+
+#endif
PHP_FE(ibase_errmsg, NULL)
@@ -109,10 +124,10 @@
php3_info_ibase,
STANDARD_MODULE_PROPERTIES
};
-
-#if defined(COMPILE_DL)
-php3_module_entry *get_module() { return &ibase_module_entry; }
+#if COMPILE_DL
+#include "dl/phpdl.h"
+DLEXPORT php3_module_entry *get_module() { return &ibase_module_entry; }
#define DL_MALLOC(size) malloc(size)
#define DL_STRDUP(str) strdup(str)
@@ -514,7 +529,7 @@
php3_printf(
"<table>"
- "<tr><td>Revision:</td><td>$Revision: 1.25
$</td></tr>\n"
+ "<tr><td>Revision:</td><td>$Revision: 1.26
$</td></tr>\n"
#ifdef COMPILE_DL
"<tr><td>Dynamic
module:</td><td>Yes</td></tr>\n"
#endif
@@ -1079,7 +1094,7 @@
convert_to_string(b_var);
-#if HAVE_STRFTIME /*FIXME: HAVE_STRPTIME ?*/
+#if HAVE_STRPTIME /*FIXME: HAVE_STRPTIME ?*/
strptime(b_var->value.str.val, IBASE_GLOBAL(php3_ibase_module).timeformat, &t);
#else
@@ -1239,7 +1254,7 @@
/* {{{ proto int ibase_trans([int trans_args [, int link_identifier]])
- Start transaction */
+ Start transaction */
PHP_FUNCTION(ibase_trans)
{
pval **args;
@@ -1984,7 +1999,7 @@
/* {{{ proto int ibase_timefmt(string format)
- Sets the format of datetime columns returned from queries */
+ Sets the format of datetime columns returned from queries. Still nonfunctional */
PHP_FUNCTION(ibase_timefmt)
{
pval *fmt;
@@ -2525,12 +2540,16 @@
RETURN_TRUE;
}
/* }}} */
+#ifndef MSVC5
+
extern int le_fp,le_pp;
extern int wsa_fp; /*to handle reading and writing to windows sockets*/
/* {{{ proto string ibase_blob_import([link_identifier,] file_id)
Create blob, copy file in it, and close it */
+
+
PHP_FUNCTION(ibase_blob_import)
{
pval *link_arg, *file_arg;
@@ -2617,7 +2636,7 @@
RETVAL_STRINGL((char *)&ib_blob, sizeof(ibase_blob_handle), 1);
}
/* }}} */
-
+#endif
#endif