Changeset: eebc7c34298c for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=eebc7c34298c Modified Files: .hgignore NT/rules.msc clients/odbc/winsetup/setup.rc Branch: default Log Message:
Merge with Mar2011 branch. diffs (truncated from 318 to 300 lines): diff --git a/.hgignore b/.hgignore --- a/.hgignore +++ b/.hgignore @@ -74,3 +74,19 @@ *.pyo *.rej *.orig + +# build results on Windows +NT/.monetdb +NT/buildtools +NT/clients +NT/common +NT/gdk +NT/geom +NT/inttypes.h +NT/java +NT/monetdb5 +NT/monetdb_config.h +NT/sql +NT/testing +NT/tools +NT/unistd.h diff --git a/NT/rules.msc b/NT/rules.msc --- a/NT/rules.msc +++ b/NT/rules.msc @@ -73,15 +73,6 @@ ODBC_LIBS = odbccp32.lib user32.lib -!IFNDEF PHP_INSTDIR -PHP_INSTDIR = C:\php-525 -!ENDIF -!IFNDEF PHP_SRCDIR -PHP_SRCDIR = $(PHP_INSTDIR)\php-5.2.5 -!ENDIF -# for these, also see winconfig.py -PHP_EXTENSIONDIR = lib\php5 - !IFNDEF PYTHONBASE PYTHONBASE=C:\Python27 !ENDIF @@ -352,7 +343,6 @@ "LIBZLIB=$(LIBZLIB)" \ "PACKAGE=$(pkg)" \ "PERL_LIBDIR=$(PERL_LIBDIR)" \ - "PHP_EXTENSIONDIR=$(PHP_EXTENSIONDIR)" \ "PROFILING_FALSE=$(PROFILING_FALSE)" \ "PYTHON=$(PYTHON)" \ "PYTHON_LIBDIR=$(PYTHON_LIBDIR)" \ @@ -405,9 +395,6 @@ !ENDIF !ENDIF -PHP_INCS = "-I$(PHP_SRCDIR)" "-I$(PHP_SRCDIR)\main" "-I$(PHP_SRCDIR)\TSRM" "-I$(PHP_SRCDIR)\Zend" -DPHP_WIN32 -DZEND_WIN32 -DZEND_DEBUG=0 -DZTS=1 -PHP_LIBS = "$(PHP_INSTDIR)\php5embed.lib" - CONFIG_H = monetdb_config.h {$(SRCDIR)}.mx.h: diff --git a/buildtools/doc/windowsbuild.rst b/buildtools/doc/windowsbuild.rst --- a/buildtools/doc/windowsbuild.rst +++ b/buildtools/doc/windowsbuild.rst @@ -535,30 +535,15 @@ PHP --- -PHP__ is only needed to create an interface that can be used from a -PHP program to communicate with a MonetDB server. +There is a PHP__ interface that can be used from a PHP program to +communicate with a MonetDB server. This interface is written +completely in PHP, so there is no compilation involved. This means +that no installation of PHP is required for building, but only for +testing. -Download the Windows installer and source -package of PHP 5 from http://www.php.net/. -Install the binary package and extract the sources somewhere (e.g. as -a subfolder of the binary installation). - -In order to get MonetDB to compile with these sources a few changes -had to be made to the sources: - -- In the file ``Zend\zend.h``, move the line - :: - - #include <stdio.h> - - down until just *after* the block where ``zend_config.h`` is - included. -- In the file ``main\php_network.h``, delete the line - :: - - #include "arpa/inet.h" - -We have no support yet for Windows64. +Download the Windows installer and source package of PHP 5 from +http://www.php.net/. Install the binary package and extract the +sources somewhere (e.g. as a subfolder of the binary installation). __ http://www.php.net/ @@ -787,8 +772,6 @@ parameter may contain something like:: bits=32 - PHP_SRCDIR=C:\Program Files\PHP\php-5.3.3 - PHP_INSTDIR=C:\Program Files\PHP LIBPERL=C:\Perl LIBPCRE=C:\Program Files\PCRE LIBICONV=C:\iconv-1.11.win32 diff --git a/clients/odbc/driver/SQLConnect.c b/clients/odbc/driver/SQLConnect.c --- a/clients/odbc/driver/SQLConnect.c +++ b/clients/odbc/driver/SQLConnect.c @@ -70,8 +70,7 @@ char uid[32]; char pwd[32]; char buf[256]; - char db[1024]; - char lang[32]; + char db[32]; char *s; int n; Mapi mid; @@ -124,12 +123,6 @@ strncpy(pwd, (char *) szPWD, nPWDLength); pwd[nPWDLength] = 0; } - if (dsn && *dsn) - n = SQLGetPrivateProfileString(dsn, "language", "sql", lang, sizeof(lang), "odbc.ini"); - else - n = 0; - if (n == 0) - strncpy(lang, "sql", sizeof(lang)); if (schema == NULL || *schema == 0) { if (dsn && *dsn) { @@ -166,7 +159,7 @@ /* connect to a server on host via port */ /* FIXME: use dbname/catalog from ODBC connect string/options here */ - mid = mapi_connect(host, port, uid, pwd, lang, schema); + mid = mapi_connect(host, port, uid, pwd, "sql", schema); if (mid == NULL || mapi_error(mid)) { /* Client unable to establish connection */ addDbcError(dbc, "08001", NULL, 0); diff --git a/clients/odbc/winsetup/resource.h b/clients/odbc/winsetup/resource.h --- a/clients/odbc/winsetup/resource.h +++ b/clients/odbc/winsetup/resource.h @@ -19,7 +19,7 @@ //{{NO_DEPENDENCIES}} // Microsoft Visual C++ generated include file. -// Used by setup.rc +// Used by odbcconfig.rc // #define IDD_SETUP_DIALOG 106 #define IDC_EDIT_DSN 2000 @@ -30,7 +30,6 @@ #define IDC_EDIT_PORT 2004 #define IDC_BUTTON_CANCEL 2006 #define IDC_EDIT_DATABASE 2007 -#define IDC_EDIT_LANGUAGE 2008 // Next default values for new objects // @@ -38,7 +37,7 @@ #ifndef APSTUDIO_READONLY_SYMBOLS #define _APS_NEXT_RESOURCE_VALUE 2004 #define _APS_NEXT_COMMAND_VALUE 32771 -#define _APS_NEXT_CONTROL_VALUE 2009 +#define _APS_NEXT_CONTROL_VALUE 2008 #define _APS_NEXT_SYMED_VALUE 2000 #endif #endif diff --git a/clients/odbc/winsetup/setup.c b/clients/odbc/winsetup/setup.c --- a/clients/odbc/winsetup/setup.c +++ b/clients/odbc/winsetup/setup.c @@ -101,7 +101,6 @@ char *host; char *port; char *database; - char *language; HWND parent; WORD request; }; @@ -150,7 +149,6 @@ SetDlgItemText(hwndDlg, IDC_EDIT_HOST, datap->host ? datap->host : ""); SetDlgItemText(hwndDlg, IDC_EDIT_PORT, datap->port ? datap->port : ""); SetDlgItemText(hwndDlg, IDC_EDIT_DATABASE, datap->database ? datap->database : ""); - SetDlgItemText(hwndDlg, IDC_EDIT_LANGUAGE, datap->language ? datap->language : "sql"); if (datap->request == ODBC_ADD_DSN && datap->dsn && *datap->dsn) EnableWindow(GetDlgItem(hwndDlg, IDC_EDIT_DSN), FALSE); return TRUE; @@ -192,10 +190,6 @@ if (datap->database) free(datap->database); datap->database = strdup(buf); - GetDlgItemText(hwndDlg, IDC_EDIT_LANGUAGE, buf, sizeof(buf)); - if (datap->language) - free(datap->language); - datap->language = strdup(buf); /* fall through */ case IDCANCEL: EndDialog(hwndDlg, LOWORD(wParam)); @@ -239,7 +233,6 @@ data.host = NULL; data.port = NULL; data.database = NULL; - data.language = NULL; data.parent = parent; data.request = request; @@ -265,8 +258,6 @@ data.port = strdup(value); else if (strncasecmp("database=", attributes, value - attributes) == 0) data.database = strdup(value); - else if (strncasecmp("language=", attributes, value - attributes) == 0) - data.language = strdup(value); attributes = value + strlen(value) + 1; } @@ -286,16 +277,14 @@ MergeFromProfileString(data.dsn, &data.host, "host", "localhost"); MergeFromProfileString(data.dsn, &data.port, "port", "50000"); MergeFromProfileString(data.dsn, &data.database, "database", ""); - MergeFromProfileString(data.dsn, &data.language, "language", ""); - ODBCLOG("ConfigDSN values: dsn=%s uid=%s pwd=%s host=%s port=%s database=%s language=%s\n", + ODBCLOG("ConfigDSN values: dsn=%s uid=%s pwd=%s host=%s port=%s database=%s\n", data.dsn ? data.dsn : "(null)", data.uid ? data.uid : "(null)", data.pwd ? data.pwd : "(null)", data.host ? data.host : "(null)", data.port ? data.port : "(null)", - data.database ? data.database : "(null)", - data.language ? data.language : "(null)"); + data.database ? data.database : "(null)"); /* we're optimistic: default return value */ rc = TRUE; @@ -381,21 +370,19 @@ goto finish; } } - ODBCLOG("ConfigDSN writing values: dsn=%s uid=%s pwd=%s host=%s port=%s database=%s language=%s\n", + ODBCLOG("ConfigDSN writing values: dsn=%s uid=%s pwd=%s host=%s port=%s database=%s\n", data.dsn ? data.dsn : "(null)", data.uid ? data.uid : "(null)", data.pwd ? data.pwd : "(null)", data.host ? data.host : "(null)", data.port ? data.port : "(null)", - data.database ? data.database : "(null)", - data.language ? data.language : "(null)"); + data.database ? data.database : "(null)"); if (!SQLWritePrivateProfileString(data.dsn, "uid", data.uid, "odbc.ini") || !SQLWritePrivateProfileString(data.dsn, "pwd", data.pwd, "odbc.ini") || !SQLWritePrivateProfileString(data.dsn, "host", data.host, "odbc.ini") || !SQLWritePrivateProfileString(data.dsn, "port", data.port, "odbc.ini") || - !SQLWritePrivateProfileString(data.dsn, "database", data.database, "odbc.ini") || - !SQLWritePrivateProfileString(data.dsn, "language", data.language, "odbc.ini")) { + !SQLWritePrivateProfileString(data.dsn, "database", data.database, "odbc.ini")) { rc = FALSE; if (parent) MessageBox(parent, @@ -420,8 +407,6 @@ free(data.port); if (data.database) free(data.database); - if (data.language) - free(data.language); ODBCLOG("ConfigDSN returning %s\n", rc ? "TRUE" : "FALSE"); return rc; } diff --git a/clients/odbc/winsetup/setup.rc b/clients/odbc/winsetup/setup.rc --- a/clients/odbc/winsetup/setup.rc +++ b/clients/odbc/winsetup/setup.rc @@ -100,8 +100,8 @@ // Dialog // -IDD_SETUP_DIALOG DIALOGEX 0, 0, 210, 178 -STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_CAPTION +IDD_SETUP_DIALOG DIALOGEX 0, 0, 210, 163 +STYLE DS_MODALFRAME | WS_CAPTION CAPTION "MonetDB Data Source Configuration" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN @@ -111,8 +111,8 @@ EDITTEXT IDC_EDIT_HOST,75,88,128,14,ES_AUTOHSCROLL EDITTEXT IDC_EDIT_PORT,75,104,128,14,ES_AUTOHSCROLL | ES_NUMBER EDITTEXT IDC_EDIT_DATABASE,75,120,128,14,ES_AUTOHSCROLL - DEFPUSHBUTTON "OK",IDOK,7,156,50,14 - PUSHBUTTON "Cancel",IDCANCEL,153,156,50,14 + DEFPUSHBUTTON "OK",IDOK,7,141,50,14 + PUSHBUTTON "Cancel",IDCANCEL,153,141,50,14 LTEXT "Data Source Name",IDC_STATIC,7,42,63,8 LTEXT "User Name",IDC_STATIC,7,58,36,8 LTEXT "Password",IDC_STATIC,7,74,32,8 _______________________________________________ Checkin-list mailing list Checkin-list@monetdb.org http://mail.monetdb.org/mailman/listinfo/checkin-list