Update of /cvsroot/monetdb/pathfinder/NT
In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv3625/NT

Added Files:
      Tag: XQuery_0-16
        Makefile NOTES configure.py pf_config.h.in rules.msc 
Log Message:
allow compilation of pathfinder on Windows (32-bits) via the Intel Compiler.

some highlights:
- inline getopt implementation for win32 (BSD licences)
- avoid stroll(), win32 does not have it
- new win32-specific files (Makefile, configure.py, rules.msc, pf_config.h.in)

see NOTES. next week the story continues on 64-bits windows



--- NEW FILE: rules.msc ---
# The contents of this file are subject to the MonetDB Public License
# Version 1.1 (the "License"); you may not use this file except in
# compliance with the License. You may obtain a copy of the License at
# http://monetdb.cwi.nl/Legal/MonetDBLicense-1.1.html
#
# Software distributed under the License is distributed on an "AS IS"
# basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
# License for the specific language governing rights and limitations
# under the License.
#
# The Original Code is the MonetDB Database System.
#
# The Initial Developer of the Original Code is CWI.
# Portions created by CWI are Copyright (C) 1997-2006 CWI.
# All Rights Reserved.

!INCLUDE $(TOPDIR)\..\..\MonetDB\conf\rules.msc

MONET4=1
MONETDB4_INCS= -I$(TOPDIR)\..\..\MonetDB4\NT\include\plain 
-I$(TOPDIR)\..\..\MonetDB4\NT\include\contrib \
               -I$(TOPDIR)\..\..\MonetDB4\NT\include\mapi 
-I$(TOPDIR)\..\..\MonetDB4\NT\include\monet 
-I$(TOPDIR)\..\..\MonetDB4\NT\include
MONETDB4_LIBS=/libpath:$(TOPDIR)\..\..\MonetDB4\NT\lib 
/libpath:$(TOPDIR)\..\..\MonetDB4\NT\lib\MonetDB4 
MONETDB_INCS=-I$(TOPDIR)\..\..\MonetDB\NT\include 
-I$(TOPDIR)\..\..\MonetDB\NT\include\common 
-I$(TOPDIR)\..\..\MonetDB\NT\include\gdk
MONETDB_LIBS=/libpath:$(TOPDIR)\..\..\MonetDB\NT\lib
CLIENTS_INCS=-I$(TOPDIR)\..\..\clients\NT\include 
-I$(TOPDIR)\..\..\clients\NT\include\MonetDB\mapilib
CLIENTS_LIBS=/libpath:$(TOPDIR)\..\..\clients\NT\lib

# burg is part of the buildtools
BURG=burg

# This is the location of libxml2 and its dependencies (depends how it was 
compiled; sometimes iconv and zlib are needed)
LIBXML2 = C:\libxml2-2.6.27.win32
LIBXML2_ICONV = C:\iconv-1.9.2.win32
LIBXML2_ZLIB  = C:\zlib-1.2.3.win32
LIBXML2_CFLAGS = "-I$(LIBXML2)\include" "-I$(LIBXML2_ICONV)\include" 
"-I$(LIBXML2_ZLIB)\include"
LIBXML2_LIBS = "$(LIBXML2)\lib\libxml2.lib" "$(LIBXML2_ICONV)\lib\iconv.lib" 
"$(LIBXML2_ZLIB)\lib\zlib.lib"

CONFIG_H = pf_config.h

# not need to edit beyond here..

pkg = MonetDB
exec_prefix = $(prefix)

bindir = $(exec_prefix)\bin
sbindir = $(exec_prefix)\sbin
libexecdir = $(exec_prefix)\libexec
datadir = $(prefix)\share
sysconfdir = $(prefix)\etc
sharedstatedir = $(prefix)\com
localstatedir = $(prefix)\var
libdir = $(exec_prefix)\lib
infodir = $(prefix)\info
mandir = $(prefix)\man
includedir = $(prefix)\include
oldincludedir = \usr\include
pkgdatadir = $(datadir)\$(pkg)
pkglibdir = $(libdir)\$(pkg)
pkgincludedir = $(includedir)\$(pkg)

#-FI$(TOPDIR)\config.h 
LIBC_INCS = $(PTHREAD_INCS) $(LIBXML_INCS)
SOCKET_LIBS = wsock32.lib

COMPILE_MEL=1
COMPILE_MX=1
MEL="$(TOPDIR)\..\..\buildtools\mel\mel.exe"
MX="$(TOPDIR)\..\..\buildtools\Mx\Mx.exe"
CP=copy
MV=copy
DEL=del
!IFDEF HAVE_JAVA
CONFIGURE=$(PYTHON) "$(TOPDIR)\configure.py" -DHAVE_JAVA "$(TOPDIR)" "$(prefix)"
!ELSE
CONFIGURE=$(PYTHON) "$(TOPDIR)\configure.py" "$(TOPDIR)" "$(prefix)"
!ENDIF

# Use "nmake DEBUG=1" to get a debug build (assertions enabled);
# use "nmake NDEBUG=1" to get a release build (assertions disabled);
# use plain "nmake" to get the default.
!IFNDEF DEBUG
!IFDEF NDEBUG
CFLAGS = $(CFLAGS) -DNDEBUG
!ELSE
# default in case neither NDEBUG nor DEBUG are defined
CFLAGS = $(CFLAGS)
!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
# there's nothing special about PEAR on Windows
HAVE_PEAR = 1

{$(SRCDIR)}.mx.h:
        $(MX) $(MXFLAGS) -x h $<

.mx.h:
        $(MX) $(MXFLAGS) -x h $<

{$(SRCDIR)}.mx.c:
        $(MX) $(MXFLAGS) -x c $<

.mx.c:
        $(MX) $(MXFLAGS) -x c $<

{$(SRCDIR)}.mx.m:
        $(MX) $(MXFLAGS) -x m $<

.mx.m:
        $(MX) $(MXFLAGS) -x m $<

.m.mil: 
        $(MEL) $(INCLUDES) -mil $*.m > $@
        type $*.tmpmil >> $@
        if not exist .libs $(MKDIR) .libs
        $(INSTALL) $@ .libs\$@

.m.mil:
        $(MEL) $(INCLUDES) -mil $*.m > $@
        if not exist .libs $(MKDIR) .libs
        $(INSTALL) $@ .libs\$@

{$(SRCDIR)}.mx.tmpmil:
        $(MX) $(MXFLAGS) -l -x mil $<
        $(MV) $*.mil $*.tmpmil
        $(DEL) $*.mil

{$(SRCDIR)}.mx.mil:
        $(MX) $(MXFLAGS) -l -x mil $<

.mx.tmpmil:
        $(MX) $(MXFLAGS) -l -x mil $<
        $(MV) $*.mil $*.tmpmil
        $(DEL) $*.mil

.mx.mil:
        $(MX) $(MXFLAGS) -l -x mil $<

{$(SRCDIR)}.mx.y:
        $(MX) $(MXFLAGS) -x y $<

.mx.y:
        $(MX) $(MXFLAGS) -x y $<

{$(SRCDIR)}.mx.l:
        $(MX) $(MXFLAGS) -x l $<

.mx.l:
        $(MX) $(MXFLAGS) -x l $<

{$(SRCDIR)}.mx.yy:
        $(MX) $(MXFLAGS) -x Y $<

.mx.yy:
        $(MX) $(MXFLAGS) -x Y $<

{$(SRCDIR)}.mx.ll:
        $(MX) $(MXFLAGS) -x L $<

.mx.ll:
        $(MX) $(MXFLAGS) -x L $<

{$(SRCDIR)}.c.obj:
        $(CC) $(CFLAGS) $(INCLUDES) -c $<

.c.obj:
        $(CC) $(CFLAGS) $(INCLUDES) -c $<

{$(SRCDIR)}.brg.c:
        $(BURG) -c 1000 -d -I -p PF$* -o $@ < $<

.SUFFIXES: .m .mx .proto_h .mil .glue_c .brg
.PRECIOUS: .m 

--- NEW FILE: pf_config.h.in ---
/* -*-C-*- */

/*
 * The contents of this file are subject to the MonetDB Public License
 * Version 1.1 (the "License"); you may not use this file except in
 * compliance with the License. You may obtain a copy of the License at
 * http://monetdb.cwi.nl/Legal/MonetDBLicense-1.1.html
 *
 * Software distributed under the License is distributed on an "AS IS"
 * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
 * License for the specific language governing rights and limitations
 * under the License.
 *
 * The Original Code is the MonetDB Database System.
 *
 * The Initial Developer of the Original Code is CWI.
 * Portions created by CWI are Copyright (C) 1997-2006 CWI.
 * All Rights Reserved.
 */

/* Manual config.h. needed for win32 .  */

/* We use #if _MSC_VER >= 1300 to identify Visual Studio .NET 2003 in
 * which the value is actually 0x1310 (in Visual Studio 6 the value is
 * 1200; in Visual Studio 8 the value is 1400).
 */

#ifndef WIN32_LEAN_AND_MEAN
#define WIN32_LEAN_AND_MEAN 1
#endif

/* Visual Studio 8 has deprecated lots of stuff: suppress warnings */
#define _CRT_SECURE_NO_DEPRECATE 1

#if defined(_DEBUG) && defined(_CRTDBG_MAP_ALLOC)
/* In this case, malloc and friends are redefined in crtdbg.h to debug
   versions.  We need to include stdlib.h and malloc.h first or else
   we get conflicting declarations.
*/
#include <stdlib.h>
#include <malloc.h>
#include <crtdbg.h>
#endif

#include <process.h>
#include <windows.h>
#include <stddef.h>

#define NATIVE_WIN32

#define DIR_SEP '\\'
#define DIR_SEP_STR "\\"
#define PATH_SEP ';'
#define PATH_SEP_STR ";"
#define SO_EXT ".dll"
#define SO_PREFIX "lib"

#define isatty _isatty

/* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP
   systems. This function is required for `alloca.c' support on those systems.
   */
/* #undef CRAY_STACKSEG_END */

/* Define to 1 if using `alloca.c'. */
/* #undef C_ALLOCA */

/* Define to 1 if you have `alloca', as a function or macro. */
#define HAVE_ALLOCA 1

/* Define to 1 if you have <alloca.h> and it should be used (not on Ultrix).
   */
/* #undef HAVE_ALLOCA_H */

/* Is your compiler C99 compliant? */
/* #undef HAVE_C99 */

/* Define to 1 if you have the `ctime_r' function. */
/* #undef HAVE_CTIME_R */

/* Define if you have ctime_r(time_t*,char *buf,size_t s) */
/* #undef HAVE_CTIME_R3 */

/* Define to 1 if you have the declaration of `strdup', and to 0 if you don't.
   */
#define HAVE_DECL_STRDUP 1

/* Define to 1 if you have the declaration of `strtof', and to 0 if you don't.
   */
#define HAVE_DECL_STRTOF 0

/* Define to 1 if you have the declaration of `strtoll', and to 0 if you
   don't. */
/* #undef HAVE_DECL_STRTOLL */

/* Define to 1 if you have the declaration of `strtoull', and to 0 if you
   don't. */
/* #undef HAVE_DECL_STRTOULL */

/* Define to 1 if you have the <dirent.h> header file, and it defines `DIR'.
   */
/* #undef HAVE_DIRENT_H */

/* Define to 1 if you have the <dlfcn.h> header file. */
/* #undef HAVE_DLFCN_H */

/* Define to 1 if you don't have `vprintf' but do have `_doprnt.' */
/* #undef HAVE_DOPRNT */

/* Define to 1 if you have the `drand48' function. */
/* #undef HAVE_DRAND48 */

/* Define to 1 if you have the `fcntl' function. */
/* #undef HAVE_FCNTL */

/* Define to 1 if you have the <fcntl.h> header file. */
#define HAVE_FCNTL_H 1

/* Define to 1 if you have the `fpclass' function. */
#define HAVE_FPCLASS 1

/* Define to 1 if you have the `fpclassify' function. */
/* #undef HAVE_FPCLASSIFY */

/* Define to 1 if you have the `fstat' function. */
#define HAVE_FSTAT 1

/* Define to 1 if you have the `ftime' function. */
#define HAVE_FTIME 1

/* Define to 1 if you have the `getcwd' function. */
#define HAVE_GETCWD 1

/* Define to 1 if you have the `gethostname' function. */
#define HAVE_GETHOSTNAME 1

/* Define to 1 if you have the `getlogin' function. */
/* #undef HAVE_GETLOGIN */

/* Define to 1 if you have the `getopt' function. */
/* #undef HAVE_GETOPT */

/* Define to 1 if you have the <getopt.h> header file. */
/* #undef HAVE_GETOPT_H */

/* Define to 1 if you have the `getopt_long' function. */
/* #undef HAVE_GETOPT_LONG */

/* Define to 1 if you have the `getpagesize' function. */
/* #undef HAVE_GETPAGESIZE */

/* Define to 1 if you have the `getpwuid' function. */
/* #undef HAVE_GETPWUID */

/* Define to 1 if you have the `getrlimit' function. */
/* #undef HAVE_GETRLIMIT */

/* Define to 1 if you have the `gettimeofday' function. */
/* #undef HAVE_GETTIMEOFDAY */

/* Define to 1 if you have the `getuid' function. */
/* #undef HAVE_GETUID */

/* Define if you have the iconv function */
/* #undef HAVE_ICONV */

/* Define to 1 if you have the <iconv.h> header file. */
/* #undef HAVE_ICONV_H */

/* Define to 1 if you have the <ieeefp.h> header file. */
/* #undef HAVE_IEEEFP_H */

/* Define to 1 if you have the <inttypes.h> header file. */
/* #undef HAVE_INTTYPES_H */

/* Define to 1 if you have the `isinf' function. */
/* #undef HAVE_ISINF */

/* Define to 1 if you have the `kill' function. */
/* #undef HAVE_KILL */

/* Define to 1 if you have the <langinfo.h> header file. */
/* #undef HAVE_LANGINFO_H */

/* Define if you have the bz2 library */
/* #undef HAVE_LIBBZ2 */

/* Define if you have the cpc library */
/* #undef HAVE_LIBCPC */

/* Define to 1 if you have the <libcpc.h> header file. */
/* #undef HAVE_LIBCPC_H */

/* Define if you have the fl[ex] library */
/* #undef HAVE_LIBFL */

/* Define if you have the l[ex] library */
/* #undef HAVE_LIBL */

/* Define if you have the netcdf library */
/* #undef HAVE_LIBNETCDF */

/* Define if you have the pcl library */
/* #undef HAVE_LIBPCL */

/* Define if you have the pcre library */
/* #undef HAVE_LIBPCRE */

/* Define if you have the perfctr library */
/* #undef HAVE_LIBPERFCTR */

/* Define to 1 if you have the <libperfctr.h> header file. */
/* #undef HAVE_LIBPERFCTR_H */

/* Define if you have the perfmon library */
/* #undef HAVE_LIBPERFMON */

/* Define if you have the pfm library */
/* #undef HAVE_LIBPFM */

/* Define if you have the pperf library */
/* #undef HAVE_LIBPPERF */

/* Define to 1 if you have the <libpperf.h> header file. */
/* #undef HAVE_LIBPPERF_H */

/* Define if you have the pthread library */
#define HAVE_LIBPTHREAD 1

/* Define if you have the readline library */
/* #undef HAVE_LIBREADLINE */

/* Define if you have the z library */
/* #undef HAVE_LIBZ */

/* Define to 1 if you have the <limits.h> header file. */
#define HAVE_LIMITS_H 1

/* Define to 1 if you have the <locale.h> header file. */
#define HAVE_LOCALE_H 1

/* Define to 1 if you have the `localtime_r' function. */
/* #undef HAVE_LOCALTIME_R */

/* Define to 1 if you have the `lockf' function. */
/* #undef HAVE_LOCKF */

/* Define to 1 if the system has the type `long long'. */
#if _MSC_VER >= 1300
/* #define HAVE_LONG_LONG 1 */
/* Visual Studio .NET 2003 does have long long, but the printf %lld
 * format is interpreted the same as %ld, i.e. useless
 */
#else
/* #undef HAVE_LONG_LONG */
#endif

/* Define to 1 if you have the `madvise' function. */
/* #undef HAVE_MADVISE */

/* Define to 1 if you have the `mallinfo' function. */
/* #undef HAVE_MALLINFO */

/* Define to 1 if you have the <malloc.h> header file. */
#define HAVE_MALLOC_H 1

/* Define to 1 if you have the `mallopt' function. */
/* #undef HAVE_MALLOPT */

/* Define to 1 if you have the <memory.h> header file. */
#define HAVE_MEMORY_H 1

/* Define to 1 if you have the `mkdir' function. */
#define HAVE_MKDIR 1

/* Define to 1 if you have a working `mmap' system call. */
#define HAVE_MMAP 1

/* Define to 1 if you have the `mrand48' function. */
/* #undef HAVE_MRAND48 */

/* Define to 1 if you have the `nanosleep' function. */
/* #undef HAVE_NANOSLEEP */

/* Define to 1 if you have the <ndir.h> header file, and it defines `DIR'. */
/* #undef HAVE_NDIR_H */

/* Define to 1 if you have the <netdb.h> header file. */
/* #undef HAVE_NETDB_H */

/* Define to 1 if you have the `nl_langinfo' function. */
/* #undef HAVE_NL_LANGINFO */

/* Define if you have the OpenSSL library */
/* #undef HAVE_OPENSSL */

/* Define to 1 if you have the <perfmon.h> header file. */
/* #undef HAVE_PERFMON_H */

/* Define to 1 if you have the <perfmon/pfmlib.h> header file. */
/* #undef HAVE_PERFMON_PFMLIB_H */

/* Define to 1 if you have the `pipe' function. */
/* #undef HAVE_PIPE */
/* this might also work (untested):
#define HAVE_PIPE 1
#define pipe(p)         _pipe(p, 4096, O_BINARY)
*/

/* Define to 1 if you have the `posix_fadvise' function. */
/* #undef HAVE_POSIX_FADVISE */

/* Define to 1 if you have the `posix_madvise' function. */
/* #undef HAVE_POSIX_MADVISE */

/* Define to 1 if you have the <pthread.h> header file. */
#define HAVE_PTHREAD_H 1

/* Define if you have the pthread_kill_other_threads_np function */
/* #undef HAVE_PTHREAD_KILL_OTHER_THREADS_NP */

/* Define if you have the pthread_sigmask function */
/* #undef HAVE_PTHREAD_SIGMASK */

/* Define to 1 if the system has the type `ptrdiff_t'. */
#define HAVE_PTRDIFF_T 1

/* Define to 1 if you have the `putenv' function. */
#define HAVE_PUTENV 1

/* Define to 1 if you have the <pwd.h> header file. */
/* #undef HAVE_PWD_H */

/* Define to 1 if you have the `opendir' function. */
/* #undef HAVE_OPENDIR */

/* Define if the compiler supports the restrict keyword */
/* #undef HAVE_RESTRICT */

/* Define to 1 if you have the <rlimit.h> header file. */
/* #undef HAVE_RLIMIT_H */

/* Define to 1 if you have the `rmdir' function. */
#define HAVE_RMDIR 1

/* Define to 1 if you have the `select' function. */
#define HAVE_SELECT 1

/* Define to 1 if you have the <semaphore.h> header file. */
#define HAVE_SEMAPHORE_H 1

/* Define to 1 if you have the `setenv' function. */
/* #undef HAVE_SETENV */

/* Define to 1 if you have the `setlocale' function. */
#define HAVE_SETLOCALE 1

/* Define to 1 if you have the `shutdown' function. */
#define HAVE_SHUTDOWN 1

/* Define to 1 if you have the <signal.h> header file. */
#define HAVE_SIGNAL_H 1

/* Define to 1 if you have the `snprintf' function. */
#define HAVE_SNPRINTF 1
#ifndef snprintf
#define snprintf _snprintf
#endif

/* Define to 1 if the system has the type `socklen_t'. */
/* #undef HAVE_SOCKLEN_T */
#define socklen_t int

/* Define to 1 if the system has the type `ssize_t'. */
/* #undef HAVE_SSIZE_T */

/* Define to 1 if you have the <stdint.h> header file. */
/* #undef HAVE_STDINT_H */

/* Define to 1 if you have the <stdlib.h> header file. */
#define HAVE_STDLIB_H 1

/* Define to 1 if you have the `strcasecmp' function. */
#define HAVE_STRCASECMP 1
#ifndef strcasecmp
#define strcasecmp(x,y) _stricmp(x,y)
#endif

/* Define to 1 if you have the `strcspn' function. */
#define HAVE_STRCSPN 1

/* Define to 1 if you have the `strdup' function. */
#define HAVE_STRDUP 1

/* Define to 1 if you have the `strerror' function. */
#define HAVE_STRERROR 1

/* Define to 1 if you have the <strings.h> header file. */
/* #undef HAVE_STRINGS_H */

/* Define to 1 if you have the <string.h> header file. */
#define HAVE_STRING_H 1

/* Define to 1 if you have the `strncasecmp' function. */
#define HAVE_STRNCASECMP 1
#ifndef strncasecmp
#define strncasecmp(x,y,z) _strnicmp(x,y,z)
#endif

/* Define to 1 if you have the `strsignal' function. */
/* #undef HAVE_STRSIGNAL */

/* Define to 1 if you have the `strstr' function. */
#define HAVE_STRSTR 1

/* Define to 1 if you have the `strtod' function. */
#define HAVE_STRTOD 1

/* Define to 1 if you have the `strtof' function. */
/* #undef HAVE_STRTOF */

/* Define to 1 if you have the `strtol' function. */
#define HAVE_STRTOL 1

/* Define to 1 if you have the `strtoll' function. */
#if _MSC_VER >= 1300
#define HAVE_STRTOLL 1
#define strtoll _strtoi64
#define HAVE_DECL_STRTOLL 1
#else
/* #undef HAVE_STRTOLL */
#endif

/* Define to 1 if you have the `strtoull' function. */
#if _MSC_VER >= 1300
#define HAVE_STRTOULL
#define strtoull _strtoui64
#define HAVE_DECL_STRTOULL 1
#else
/* #undef HAVE_STRTOULL */
#endif

/* Define if you have struct mallinfo */
/* #undef HAVE_STRUCT_MALLINFO */

/* Define if your mallinfo struct has signed elements */
/* #undef HAVE_SIGNED_MALLINFO */

/* Define to 1 if `tm_zone' is member of `struct tm'. */
/* #undef HAVE_STRUCT_TM_TM_ZONE */

/* Define to 1 if you have the `sysconf' function. */
/* #undef HAVE_SYSCONF */

/* Define to 1 if you have the <sys/dir.h> header file, and it defines `DIR'.
   */
/* #undef HAVE_SYS_DIR_H */

/* Define to 1 if you have the <sys/file.h> header file. */
/* #undef HAVE_SYS_FILE_H */

/* Define to 1 if you have the <sys/mman.h> header file. */
/* #undef HAVE_SYS_MMAN_H */

/* Define to 1 if you have the <sys/ndir.h> header file, and it defines `DIR'.
   */
/* #undef HAVE_SYS_NDIR_H */

/* Define to 1 if you have the <sys/param.h> header file. */
/* #undef HAVE_SYS_PARAM_H */

/* Define to 1 if you have the <sys/resource.h> header file. */
/* #undef HAVE_SYS_RESOURCE_H */

/* Define to 1 if you have the <sys/socket.h> header file. */
/* #undef HAVE_SYS_SOCKET_H */

/* Define to 1 if you have the <sys/stat.h> header file. */
#define HAVE_SYS_STAT_H 1

/* Define to 1 if you have the <sys/times.h> header file. */
/* #undef HAVE_SYS_TIMES_H */

/* Define to 1 if you have the <sys/time.h> header file. */
/* #undef HAVE_SYS_TIME_H */

/* Define to 1 if you have the <sys/types.h> header file. */
#define HAVE_SYS_TYPES_H 1

/* Define to 1 if you have the <sys/un.h> header file. */
/* #undef HAVE_SYS_UN_H */

/* Define to 1 if you have the <sys/utime.h> header file. */
#define HAVE_SYS_UTIME_H 1

/* Define to 1 if you have <sys/wait.h> that is POSIX.1 compatible. */
/* #undef HAVE_SYS_WAIT_H */

/* Define to 1 if you have the <termios.h> header file. */
/* #undef HAVE_TERMIOS_H */

/* Define to 1 if you have the `times' function. */
/* #undef HAVE_TIMES */

/* Define to 1 if you have the <time.h> header file. */
#define HAVE_TIME_H 1

/* Define to 1 if your `struct tm' has `tm_zone'. Deprecated, use
   `HAVE_STRUCT_TM_TM_ZONE' instead. */
/* #undef HAVE_TM_ZONE */

/* Define to 1 if you don't have `tm_zone' but do have the external array
   `tzname'. */
#define HAVE_TZNAME 1

/* Define to 1 if you have the `uname' function. */
/* #undef HAVE_UNAME */

/* Define to 1 if you have the <unistd.h> header file. */
/* #undef HAVE_UNISTD_H */

/* Define to 1 if you have the <utime.h> header file. */
/* #undef HAVE_UTIME_H */

/* Define to 1 if `utime(file, NULL)' sets file's timestamp to the present. */
#define HAVE_UTIME_NULL 1

/* Define to 1 if you have the `vprintf' function. */
#define HAVE_VPRINTF 1

/* Define to 1 if you have the `vsnprintf' function. */
#define HAVE_VSNPRINTF 1
#ifndef vsnprintf
#define vsnprintf _vsnprintf
#endif

/* Define to 1 if you have the <winsock.h> header file. */
#define HAVE_WINSOCK_H 1

/* Define if you have _sys_siglist */
/* #undef HAVE__SYS_SIGLIST */

/* Define to 1 if the system has the type `__int64'. */
#define HAVE___INT64 1

/* Define if the compiler supports the __restrict__ keyword */
/* #undef HAVE___RESTRICT__ */

/* Host identifier */
#define HOST "i686-pc-win32"

/* Define as const if the declaration of iconv() needs const for 2nd argument.
   */
/* #undef ICONV_CONST */

#define VERSION "@VERSION@"

/* architecture-dependent files */
#define MONETDB_EXEC_PREFIX "${prefix}"

/* object code libraries */
#define MONETDB_LIBDIR "${exec_prefix}\\lib"

/* modifiable single-machine data */
#define MONETDB_LOCALSTATEDIR "${prefix}\\var"

/* architecture-independent files */
#define MONETDB_PREFIX "@QXprefix@"

/* read-only single-machine data */
#define MONETDB_SYSCONFDIR "${prefix}\\etc"

/* Define if the oid type should use 32 bits on a 64-bit architecture */
/* #undef MONET_OID32 */

/* Define if you do not want assertions */
/* #undef NDEBUG */

/* Define if you don't want to expand the bat type */
/* #undef NOEXPAND_BAT */

/* Define if you don't want to expand the bit type */
/* #undef NOEXPAND_BIT */

/* Define if you don't want to expand the bte type */
/* #undef NOEXPAND_BTE */

/* Define if you don't want to expand the chr type */
/* #undef NOEXPAND_CHR */

/* Define if you don't want to expand the dbl type */
/* #undef NOEXPAND_DBL */

/* Define if you don't want to expand the flt type */
/* #undef NOEXPAND_FLT */

/* Define if you don't want to expand the int type */
/* #undef NOEXPAND_INT */

/* Define if you don't want to expand the lng type */
/* #undef NOEXPAND_LNG */

/* Define if you don't want to expand the oid type */
/* #undef NOEXPAND_OID */

/* Define if you don't want to expand the ptr type */
/* #undef NOEXPAND_PTR */

/* Define if you don't want to expand the sht type */
/* #undef NOEXPAND_SHT */

/* Define if you don't want to expand the str type */
/* #undef NOEXPAND_STR */

/* Define if you don't want to expand the wrd type */
/* #undef NOEXPAND_WRD */

/* Define if OpenSSL should not use Kerberos 5 */
/* #undef OPENSSL_NO_KRB5 */

/* Name of package */
#define PACKAGE "MonetDB"

/* Define to the address where bug reports for this package should be sent. */
#define PACKAGE_BUGREPORT ""

/* Define to the full name of this package. */
#define PACKAGE_NAME ""

/* Define to the full name and version of this package. */
#define PACKAGE_STRING ""

/* Define to the one symbol short name of this package. */
#define PACKAGE_TARNAME ""

/* Define to the version of this package. */
#define PACKAGE_VERSION ""

/* Compiler flag */
/* #undef PROFILE */

/* Define as the return type of signal handlers (`int' or `void'). */
#define RETSIGTYPE void

/* Define to 1 if the `setpgrp' function takes no argument. */
/* #undef SETPGRP_VOID */

/* The size of a `char', as computed by sizeof. */
#define SIZEOF_CHAR 1

/* The size of a `int', as computed by sizeof. */
#define SIZEOF_INT 4

/* The size of a `long', as computed by sizeof. */
#define SIZEOF_LONG 4

/* The size of a `short', as computed by sizeof. */
#define SIZEOF_SHORT 2

#ifdef _WIN64
/* The size of a `ptrdiff_t', as computed by sizeof. */
#define SIZEOF_PTRDIFF_T 8

/* The size of a `size_t', as computed by sizeof. */
#define SIZEOF_SIZE_T 8

/* The size of a `void *', as computed by sizeof. */
#define SIZEOF_VOID_P 8
#else
/* The size of a `ptrdiff_t', as computed by sizeof. */
#define SIZEOF_PTRDIFF_T 4

/* The size of a `size_t', as computed by sizeof. */
#define SIZEOF_SIZE_T 4

/* The size of a `void *', as computed by sizeof. */
#define SIZEOF_VOID_P 4
#endif

/* The size of a `ssize_t', as computed by sizeof. */
#define SIZEOF_SSIZE_T SIZEOF_SIZE_T

/* The size of a `__int64', as computed by sizeof. */
#define SIZEOF___INT64 8

/* If using the C implementation of alloca, define if you know the
   direction of stack growth for your system; otherwise it will be
   automatically deduced at run-time.
        STACK_DIRECTION > 0 => grows toward higher addresses
        STACK_DIRECTION < 0 => grows toward lower addresses
        STACK_DIRECTION = 0 => direction of growth unknown */
/* #undef STACK_DIRECTION */

/* Define to 1 if the `S_IS*' macros in <sys/stat.h> do not work properly. */
/* #undef STAT_MACROS_BROKEN */

/* Define to 1 if you have the ANSI C header files. */
#define STDC_HEADERS 1

/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
/* #undef TIME_WITH_SYS_TIME */

/* Define to 1 if your <sys/time.h> declares `struct tm'. */
/* #undef TM_IN_SYS_TIME */

/* Define on MS Windows (also under Cygwin) */
#ifndef WIN32
#define WIN32 1
#endif

/* Define to 1 if your processor stores words with the most significant byte
   first (like Motorola and SPARC, unlike Intel and VAX). */
/* #undef WORDS_BIGENDIAN */

/* Number of bits in a file offset, on hosts where this is settable. */
#define _FILE_OFFSET_BITS 32

/* Define for large files, on AIX-style hosts. */
/* #undef _LARGE_FILES */

/* Compiler flag */
/* #undef _POSIX_C_SOURCE */

/* Compiler flag */
/* #undef _POSIX_SOURCE */

/* Compiler flag */
/* #undef _XOPEN_SOURCE */

/* Define to empty if `const' does not conform to ANSI C. */
/* #undef const */

/* Wrapper */
/* #undef iconv */

/* Wrapper */
/* #undef iconv_close */

/* Wrapper */
/* #undef iconv_open */

/* Define to `__inline__' or `__inline' if that's what the C compiler
   calls it, or to nothing if 'inline' is not supported under any name.  */
#ifndef inline
#define inline __inline
#endif

/* Define to `long' if <sys/types.h> does not define. */
/* #undef off_t */

/* Define to `int' if <sys/types.h> does not define. */
/* #undef pid_t */

/* Define to `unsigned' if <sys/types.h> does not define. */
/* #undef size_t */

#define HAVE_GLOBALMEMORYSTATUSEX 1 /* only on >= NT 5 */
#define HAVE_GLOBALMEMORYSTATUS 1

/* Intel compiler for windows does not know __attribute__() */
#define __attribute__(x)

/* no va_copy in win32 */
#define va_copy(x,y) ((x) = (y))

typedef unsigned char uint8_t;

#define MILPRINT_SUMMER_IS_DEFAULT 1
#define MONET4 1

#define HAVE_SOCKLEN_T 1

--- NEW FILE: Makefile ---
TOPDIR = .
SRCDIR = $(TOPDIR)\..
INSTALL = copy
MKDIR = mkdir
ECHO = echo
CD = cd

prefix = $(MAKEDIR)

!INCLUDE "$(TOPDIR)\rules.msc"

UNISTD_H = unistd.h

all: "$(SRCDIR)\Makefile.msc" all-msc $(UNISTD_H) RunMtest.bat 
        $(MAKE) /nologo /f "$(SRCDIR)\Makefile.msc" "prefix=$(prefix)" all

check: "$(SRCDIR)\Makefile.msc" RunMtest.bat
        $(MAKE) /nologo /i /f "$(SRCDIR)\Makefile.msc" "prefix=$(prefix)" check
        call RunMtest.bat

install: targetdirs pf_config.h all
        $(INSTALL) pf_config.h "$(includedir)"
        $(MAKE) /nologo /f "$(SRCDIR)\Makefile.msc" "prefix=$(prefix)" install

$(SRCDIR)\Makefile.msc: "$(SRCDIR)\Makefile.ag"
        $(CD) "$(SRCDIR)" && autogen.py

all-msc: pf_config.h 

pf_config.h: pf_config.h.in
        $(CONFIGURE) pf_config.h.in > pf_config.h

unistd.h:
        $(ECHO) #ifndef UNISTD_H > unistd.h
        $(ECHO) #define UNISTD_H >> unistd.h
        $(ECHO) #include "io.h" >> unistd.h
        $(ECHO) #define open _open >> unistd.h
        $(ECHO) #define read _read >> unistd.h
        $(ECHO) #define write _write >> unistd.h
        $(ECHO) #define close _close >> unistd.h
        $(ECHO) #define getpid _getpid >> unistd.h
        $(ECHO) #define umask _umask >> unistd.h
        $(ECHO) #endif >> unistd.h

RunMtest.bat: "$(SRCDIR)\RunMtest.bat.in"
        $(CONFIGURE) "$(SRCDIR)\RunMtest.bat.in" > RunMtest.bat

targetdirs:
        if not exist "$(bindir)"                $(MKDIR) "$(bindir)"
        if not exist "$(sbindir)"               $(MKDIR) "$(sbindir)"
        if not exist "$(libexecdir)"            $(MKDIR) "$(libexecdir)"
        if not exist "$(datadir)"               $(MKDIR) "$(datadir)"
        if not exist "$(sysconfdir)"            $(MKDIR) "$(sysconfdir)"
        if not exist "$(sharedstatedir)"        $(MKDIR) "$(sharedstatedir)"
        if not exist "$(localstatedir)"         $(MKDIR) "$(localstatedir)"
        if not exist "$(libdir)"                $(MKDIR) "$(libdir)"
        if not exist "$(infodir)"               $(MKDIR) "$(infodir)"
        if not exist "$(mandir)"                $(MKDIR) "$(mandir)"
        if not exist "$(includedir)"            $(MKDIR) "$(includedir)"
        if not exist "$(pkgdatadir)"            $(MKDIR) "$(pkgdatadir)"
        if not exist "$(pkglibdir)"             $(MKDIR) "$(pkglibdir)"
        if not exist "$(pkglibdir)\Tests"       $(MKDIR) "$(pkglibdir)\Tests"
        if not exist "$(pkgincludedir)"         $(MKDIR) "$(pkgincludedir)"

--- NEW FILE: NOTES ---
building pathfinder under native windows (32-bits)

compiling environment: 
- Microsoft Visual C++ 8 (Express Edition is a free download)
- Microsoft Platform SDK for Windows Server 2003 R2 (free download also)
- Intel C++ Compiler 9.1 (evaluation download)

then, set in your environment (Control Panel->System->Advanced->Environment):

CC="icl -Qc99 -GR- -Qsafeseh- -Gd"
CXX="icl -Qc99 -GR- -Qsafeseh- -Gd"

some notes on the flags:
- Qc99 ==> the coveted C-99 support, needed by pathfinder
- the latter three switches where added in reponse to crashes in pthreads
  -GR- disable  ==>  disable C++ RTTI
  -Qsafeseh-    ==>  disable structured exception handling
  -Gd           ==>  make __cdecl the staandard calling convention 

  crash would occur when connecting a MIL MapiClient. With these flags: no 
problem.

========== packages installed 
======================================================================

basics:
- python
  http://www.python.org/download/
  install in C:\python25

- pthreads
  http://sourceware.org/pthreads-win32/
  install in C:\pthreads

- libxml2
  http://xmlsoft.org
  edit LIBXML2 paths in pathfinder/NT/rules.msc!!

- UnxUtils
  ftp://garbo.uwasa.fi/win95/unix/UnxUtils.zip
  regrettably bison&flex are too old

- GnuWin32: install bison and flex packages
  http://sourceforge.net/project/showfiles.php?group_id=23617
  setup installer installs in C:\Program Files\GnuWin32\bin

HAVE_PHP=1 (optional)
- PHP
  http://www.php.net
  install binaries in c:\php-5
  also download sources, edit PHP paths in MonetDB/conf/rules.msc
  eliminate line "#include <arpa/inet.h>" from main/php_network.h (SIC!!)

HAVE_JAVA=1 (optional)
- ant
  http://ant.apache.org/bindownload.cgi
- JDK
  http://java.sun.com

mode of operation:

buildtools: nmake -f Makefile.msc 
Monet,Clients,MonetDB4,pathfinder: nmake -f Makefile.msc NEED_MX=1 HAVE_PHP=1 
HAVE_JAVA=1 install

========== example environment, starting from the Microsoft Visual C++ Command 
Window ===============

REM top dir under which src dirs 
{buildtools,MonetDB,Clients,MonetDB4,pathfinder}
SET HOME=C:\cygwin\home\chippie2 user

REM icl settings (copied from intel batch script)
SET ICPP_COMPILER91=C:\Program Files\Intel\Compiler\C++\9.1
SET INTEL_SHARED=C:\Program Files\Common Files\Intel\Shared Files
SET INTEL_LICENSE_FILE=C:\Program Files\Common Files\Intel\Licenses
SET PATH=%ICPP_COMPILER91%\Ia32\Bin;%INTEL_SHARED%\Ia32\Bin;%PATH%
SET LIB=%ICPP_COMPILER91%\Ia32\Lib;%LIB%
SET INCLUDE=%ICPP_COMPILER91%\Ia32\Include;;%INCLUDE%

REM pthreads and python (+scripts for autoconf)
SET PATH=C:\Pthreads\lib;%PATH
SET PATH=C:\Python25;C:\Python25\scripts;%PATH%

REM apache ant
SET PATH=C:\apache-ant-1.7.0\bin;%PATH%

REM burg weirdness: copying the burg.exe file elsewhere corrupted it! Use in 
place.
SET PATH=%HOME%\buildtools\burg;%PATH%

REM bison2.1 in GnuWin32; other UnxTools in wbin
SET PATH=C:\Program Files\GnuWin32\bin;C:\usr\local\wbin;%PATH%

REM libxml2
SET 
PATH=C:\libxml2-2.6.27.win32\bin;C:\iconv-1.9.2.win32\bin;C:\zlib-1.2.3.win32\bin;%PATH%

REM windows sdk (socket include files)
SET LIB=C:\Program Files\Microsoft Platform SDK for Windows Server 2003 
R2\Lib;%LIB%
SET INCLUDE=C:\Program Files\Microsoft Platform SDK for Windows Server 2003 
R2\Include;C:\Program Files\Microsoft Platform SDK for Windows Server 2003 
R2\Include\mfc;%INCLUDE%

cd %HOME%


--- NEW FILE: configure.py ---
#!/usr/bin/env python

# The contents of this file are subject to the MonetDB Public License
# Version 1.1 (the "License"); you may not use this file except in
# compliance with the License. You may obtain a copy of the License at
# http://monetdb.cwi.nl/Legal/MonetDBLicense-1.1.html
#
# Software distributed under the License is distributed on an "AS IS"
# basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
# License for the specific language governing rights and limitations
# under the License.
#
# The Original Code is the MonetDB Database System.
#
# The Initial Developer of the Original Code is CWI.
# Portions created by CWI are Copyright (C) 1997-2006 CWI.
# All Rights Reserved.

import sys
import fileinput
import os

if sys.argv[1] == '-DHAVE_JAVA':
    del sys.argv[1]
    have_java_false = '#'
else:
    have_java_false = ''

build=os.path.abspath(sys.argv[1]);
prefix=os.path.abspath(sys.argv[2]);

source=os.path.abspath(os.path.join(build,os.pardir))

subs = [
    ('@exec_prefix@',            prefix),
    ('@Xexec_prefix@',           prefix),
    ('@sysconfdir@',             r'${prefix}\etc'),
    ('@Xsysconfdir@',            r'${prefix}\etc'),
    ('@localstatedir@',          r'${prefix}\var'),
    ('@Xlocalstatedir@',         r'${prefix}\var'),
    ('@libdir@',                 r'${prefix}\lib'),
    ('@Xlibdir@',                r'${prefix}\lib'),
    ('@bindir@',                 r'${prefix}\bin'),
    ('@Xbindir@',                r'${prefix}\bin'),
    ('@mandir@',                 r'${prefix}\man'),
    ('@Xmandir@',                r'${prefix}\man'),
    ('@includedir@',             r'${prefix}\include'),
    ('@Xincludedir@',            r'${prefix}\include'),
    ('@datadir@',                r'${prefix}\share'),
    ('@Xdatadir@',               r'${prefix}\share'),
    ('@infodir@',                r'${prefix}\info'),
    ('@Xinfodir@',               r'${prefix}\info'),
    ('@libexecdir@',             r'${prefix}\libexec'),
    ('@Xlibexecdir@',            r'${prefix}\libexec'),
    ('@PACKAGE@',                r'MonetDB'),
    ('@VERSION@',                r'4.13.1'),
    ('@DIRSEP@',                 '\\'),
    ('@PATHSEP@',                ';'),
    ('@prefix@',                 prefix),
    ('@Xprefix@',                prefix),
    ('@MONETDB_BUILD@',          build),
    ('@XMONETDB_BUILD@',         build),
    ('@MONETDB_SOURCE@',         source),
    ('@XMONETDB_SOURCE@',        source),
    ('@NO_X_CFLAGS@',            ''),
    ('@PYTHON@',                 'python'),
    # for these, also see rules.msc
    ('@PHP_EXTENSIONDIR@',       r'lib\php4'),
    ('@XPHP_EXTENSIONDIR@',      r'lib\php4'),
    ('@PHP_PEARDIR@',            r'share\pear'),
    ('@XPHP_PEARDIR@',           r'share\pear'),
    # conditionals for Mtest.py (see comment over there)
    ('@CROSS_COMPILING_FALSE@',  '#'),
    ('@DOCTOOLS_FALSE@',         '#'),
    ('@HAVE_JAVA_FALSE@',        have_java_false),
    ('@HAVE_MONET5_FALSE@',      ''),
    ('@HAVE_MONET_FALSE@',       '#'),
    ('@HAVE_PCRE_FALSE@',        ''),
    ('@HAVE_PERL_FALSE@',        ''),
    ('@HAVE_PERL_DEVEL_FALSE@',  ''),
    ('@HAVE_PERL_SWIG_FALSE@',   ''),
    ('@HAVE_PHP_FALSE@',         ''),
    ('@HAVE_PEAR_FALSE@',        ''),
    ('@HAVE_PYTHON_FALSE@',      '#'),
    ('@HAVE_PYTHON_DEVEL_FALSE@','#'),
    ('@HAVE_PYTHON_SWIG_FALSE@', ''),
    ('@HAVE_SWIG_FALSE@',        ''),
    ('@LINK_STATIC_FALSE@',      ''),
    ('@NOT_WIN32_FALSE@',        ''),
    ('@PROFILING_FALSE@',        ''),
    # SQL:
    ('@MONET4_FALSE@',           '#'),
    ('@MONET5_FALSE@',           ''),
    ('@NATIVE_WIN32_FALSE@',     '#'),
]

for key, val in subs[:]:
    subs.insert(0, ('@Q'+key[1:], val.replace('\\', r'\\')))


def substitute(line):
    for (p,v) in subs:
        line = line.replace(p, v);
    return line

for line in fileinput.input(sys.argv[3:]):
    sys.stdout.write(substitute(line))


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Monetdb-pf-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-pf-checkins

Reply via email to