Subject | Re: Interserver Win32 Development |
---|---|
Author | ft@cluedup.com |
Post date | 2001-04-16T20:07:59Z |
Makefile and patches below. Can you post the makefile you use with
cygwin.
Fred
cygwin.
Fred
--- In IB-Java@y..., "Ken Richard" <kenr@a...> wrote:
> The builds works pretty well on win32 once you have the cygwins
stuff
> installed. It does take some experimentation with the flags, but
nothing
> too bad. You may want to post your patches here so we can all
enjoy them.
>
### interserver.exe makefile for Win32 alpha version
# written by fredt@... 23 March 2001
# based on makefile.32 issued by borland
# this make file is an attempt to compile and build Interserver with
the free Borland bcc55 command line compiler and tools
#
### Software Requirements:
#
# Win32 platform; free bcc55
# Set path to the bcc55 bin directory
# type make -f makefile.w32 interserver.exe
# type make -f makefile.w32 clean to delete all the results
### Sources
#
# interserver *.cpp sources were written for compilation with MS VC++
v 5.00 compiler
# minor changes to source were required
#
# isconfig.exe utility *.pas sources require Delphi (not tested)
#
### Summary:
#
# 24 March: compiles and links but interserver.exe behaves strangely
#
#
#
BORLAND_DIR = \borland\bcc55
IBSERVER_DIR = \progra~1\firebird
.path.obj=obj
.path.res=obj
# TRACEON defined to generate debug.log
VENDOR_CPPFLAGS= -Q -DTRACEON -w- -a8 -tWM -n$(.path.obj) -
I$(BORLAND_DIR)\include;$(IBSERVER_DIR)\include
# todo: we need to incorporate this in future
!if $(VERSION) == PROD
VERSION_CFLAGS= -DFLINTSTONE
LINK_OPTS=
!else
VERSION_CFLAGS= -v
LINK_OPTS= -WM
!endif
CPPFLAGS= $(VERSION_CFLAGS) $(VENDOR_CPPFLAGS) -DWIN32 -DWIN_NT -
DARCH_32 -D_WINDOWS
VERSION_RC= version_95.rc
VERSION_RES= version_95.res
#.rc.res:
# brc32 -r -w32 -fo$@ $<
.SUFFIXES: .c .e
.e.c:
$(EXPAND_DBNAME) $<
$(GPRE) $(GPRE_FLAGS) $<
$(COMPRESS_DBNAME) $<
touch $*.c
.dtm.dfm:
$(CONVERT) $<
.SUFFIXES: .bin .obj .cpp
.cpp.obj:
bcc32 -c @&&?
$(CPPFLAGS)
$(VERSION_FLAG) $<
?
clean::
del /Q $(.path.obj)\*.*
!message Clean ended
IS_FILES= cdr.cpp error.cpp ib_array.cpp ib_blob.cpp
ib_buffer.cpp ib_catalog.cpp \
ib_connection.cpp ib_connectionconfiguration.cpp
ib_charactersets.cpp \
ib_connectioninformation.cpp ib_databuffer.cpp \
ib_information.cpp ib_inputbuffer.cpp ib_ldbytes.cpp
ib_ldstring.cpp \
ib_resultset.cpp ib_sqlexception.cpp ib_statement.cpp
ib_status.cpp \
ib_transaction.cpp ib_transactionconfiguration.cpp \
ib_transactioninformation.cpp ib_types.cpp
interserver.cpp interservice.cpp\
jibsnet.cpp jibsremote.cpp nettcp.cpp property.cpp
VersionInformation.cpp\
session.cpp vector.cpp window.cpp \
communicationsqlexception.cpp
IS_OBJS= $(IS_FILES:.cpp=.obj)
interserver.exe: $(.path.obj)\interserver.rsp $(.path.res)
\interserver.res
ilink32 /Gn /aa /L$(BORLAND_DIR)\lib obj\c0w32.obj @$(.path.obj)
\interserver.rsp, $(.path.obj)\interserver.exe, ,import32 cw32
$(IBSERVER_DIR)\lib\gds32 , ,obj\interserver.res
$(.path.res)\interserver.res: property.rc version_95.rc
brc32 -i$(BORLAND_DIR)\include -dBORLAND_RESOURCE_COMPILER -
r -w32 -fo$(.path.res)\interserver.res property.rc
$(.path.obj)\interserver.rsp: $(IS_OBJS)
del /Q $<
&echo $** + >> $<
isconfig32.res: isconfig32.rc
brc32 -r -w32 -foisconfig32.res isconfig32.rc
isconfig.res: isconfig.rc
brc32 -r -w32 -foisconfig.res isconfig.rc
version_w32.res: version_95.rc
brc32 -DBORLAND_RESOURCE_COMPILER -DISCONFIG -r -w32 -
foversion_w32.res version_95.rc
isconfig.exe: main.dfm isconfig.res isconfig32.res version_w32.res
bcc32 $(CC_FLAGS) isconfig.dpr -E$(.path.obj)
touch $(.path.obj)\isconfig.exe
cvs -z3 diff CDR.cpp CDR.h Error.cpp IB_Defines.h interserver.cpp
JIBSNet.cpp NetTCP.cpp (in directory C:\CVS\interclient\20
\dev\interserver\)
Index: CDR.cpp
===================================================================
RCS file: /cvsroot/firebird/interclient/20/dev/interserver/CDR.cpp,v
retrieving revision 1.1.1.1
diff -r1.1.1.1 CDR.cpp
115c115,125
< assert ((next - messageCertificate) < UINT_MAX);
---
> // fredt@... temporary check
> #ifdef TRACEON
> debugTraceAPointer ("next ", next);
> debugTraceAPointer ("messageCertificate ", messageCertificate);
> #endif
> // fredt@...
> // removed ambiguous comparison of signed and unsigned ( UNIT_MAX
is often an unsigned type )
> // aborts program on first call with next = 16 and
messageCertificate = 0 (bcc32 v.5.5)
> // assert ((next - messageCertificate) < UINT_MAX);
> // fredt@... end
>
Index: CDR.h
===================================================================
RCS file: /cvsroot/firebird/interclient/20/dev/interserver/CDR.h,v
retrieving revision 1.1.1.1
diff -r1.1.1.1 CDR.h
26a27,28
> //fredt@... added function
> void debugTraceAPointer (char* where, void* what);
89c91,96
< #elif defined (_MSC_VER) && _MSC_VER >= 900
---
> //fredt@...
> // brought this in line with other header files to work with bcc32
5.2; was VC++ specific
> //#elif defined (_MSC_VER) && _MSC_VER >= 900
> #elif (defined(_MSC_VER) && defined(_WIN32)) || \
> (defined(__BORLANDC__) && (defined(__WIN32__) || defined
(__OS2__)))
> //end fredt@...
Index: Error.cpp
===================================================================
RCS file: /cvsroot/firebird/interclient/20/dev/interserver/Error.cpp,v
retrieving revision 1.1.1.1
diff -r1.1.1.1 Error.cpp
181,182c181,186
< extern int sys_nerr; /* # of error message strings in sys
table */
< extern char *sys_errlist[]; /* the system error message table */
---
> //fredt@...
> // commented out as declarations exist in stdlib.h (bcc32 v.5.5)
> // better include with ifdef for the platforms that need it
> //extern int sys_nerr; /* # of error message strings in sys
table */
> //extern char *sys_errlist[]; /* the system error message table */
> //fredt@... end
Index: IB_Defines.h
===================================================================
RCS
file: /cvsroot/firebird/interclient/20/dev/interserver/IB_Defines.h,v
retrieving revision 1.2
diff -r1.2 IB_Defines.h
115a116,117
> //fredt@... added function
> void debugTraceAPointer (char* where, void* what);
Index: interserver.cpp
===================================================================
RCS
file: /cvsroot/firebird/interclient/20/dev/interserver/interserver.cpp
,v
retrieving revision 1.1.1.1
diff -r1.1.1.1 interserver.cpp
96a97,107
> //fredt@... added debug function
> void debugTraceAPointer (char* where, void* what)
> {
> if (!traceStream__)
> traceStream__ = fopen ("debug.log", "w");
> if (traceStream__) {
> fprintf (traceStream__, "%s %p\n", where, what);
> fflush (traceStream__);
> }
> }
> //fredt@... end
Index: JIBSNet.cpp
===================================================================
RCS
file: /cvsroot/firebird/interclient/20/dev/interserver/JIBSNet.cpp,v
retrieving revision 1.1.1.1
diff -r1.1.1.1 JIBSNet.cpp
259c259,262
< if (!cdr_.buffer) // !!!what is this about?
---
> // fredt@... changed non ANSI compare
> // if (!cdr_.buffer) // !!!what is this about?
>
> if (cdr_.buffer == NULL)
260a264
> //fredt@... end
Index: NetTCP.cpp
===================================================================
RCS
file: /cvsroot/firebird/interclient/20/dev/interserver/NetTCP.cpp,v
retrieving revision 1.3
diff -r1.3 NetTCP.cpp
144a145
> // fredt@... changed socklen_t type to int
148c149
< #define socklen_t size_t //problem on rhlinux 7, socklen_t is
uint, size_t is int
---
> #define socklen_t int //problem on rhlinux 7, socklen_t is uint,
size_t is int
*****CVS exited normally with code 1*****