[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Patch: Borland C++ Builder 6.0 Compile Errors
From: |
Conrad T. Pino |
Subject: |
Patch: Borland C++ Builder 6.0 Compile Errors |
Date: |
Mon, 29 Aug 2005 03:12:07 -0700 |
This patch depends upon another patch regarding:
Windows Platform SDK - IPv6 - Borland C++ Builder 6.0 - Windows 2000
and fixes all Borland C++ Builder 6.0 compile errors.
Index: include/cc++/file.h
===================================================================
RCS file: /cvsroot/gnutelephony/testing/commoncpp2/include/cc++/file.h,v
retrieving revision 1.1.1.1
diff -u -p -r1.1.1.1 file.h
--- include/cc++/file.h 23 Apr 2005 22:08:07 -0000 1.1.1.1
+++ include/cc++/file.h 29 Aug 2005 10:02:45 -0000
@@ -60,17 +60,22 @@
#endif
#ifndef WIN32
-#ifdef __BORLANDC__
-#include <stdio.h>
-#include <sys/types.h>
-#else
-#include <cstdio>
-#endif
-#include <dirent.h>
-#include <sys/stat.h>
-#include <sys/mman.h>
-#else
-#include <direct.h>
+# ifdef __BORLANDC__
+# include <stdio.h>
+# include <sys/types.h>
+# else
+# include <cstdio>
+# endif
+# include <dirent.h>
+# include <sys/stat.h>
+# include <sys/mman.h>
+#else
+# if __BORLANDC__ >= 0x0560
+# include <dirent.h>
+# include <sys/stat.h>
+# else
+# include <direct.h>
+# endif
#endif
#ifdef HAVE_SHL_LOAD
@@ -93,7 +98,7 @@ typedef unsigned long pos_t;
#define caddr_t char *
typedef size_t ccxx_size_t;
#else
-#ifndef __BORLANDC__
+#if !defined(__BORLANDC__) || __BORLANDC__ >= 0x0560
typedef LONG off_t;
#endif
typedef void* caddr_t;
Index: include/cc++/thread.h
===================================================================
RCS file: /cvsroot/gnutelephony/testing/commoncpp2/include/cc++/thread.h,v
retrieving revision 1.2
diff -u -p -r1.2 thread.h
--- include/cc++/thread.h 18 Jun 2005 16:05:37 -0000 1.2
+++ include/cc++/thread.h 29 Aug 2005 10:02:46 -0000
@@ -43,14 +43,12 @@
#ifndef CCXX_THREAD_H_
#define CCXX_THREAD_H_
+#include <cc++/config.h>
+
#ifndef WIN32
#define CCXX_POSIX
#endif // !WIN32
-#ifndef CCXX_CONFIG_H_
-#include <cc++/config.h>
-#endif
-
#include <ctime>
#ifndef WIN32
@@ -90,6 +88,10 @@ typedef DWORD timeout_t;
#ifdef CCXX_NAMESPACES
namespace ost {
+# if __BORLANDC__ >= 0x0560
+using std::time_t;
+using std::tm;
+# endif
#endif
#ifdef HAVE_GCC_CXX_BITS_ATOMIC
Index: src/keydata.cpp
===================================================================
RCS file: /cvsroot/gnutelephony/testing/commoncpp2/src/keydata.cpp,v
retrieving revision 1.1.1.1
diff -u -p -r1.1.1.1 keydata.cpp
--- src/keydata.cpp 23 Apr 2005 22:08:21 -0000 1.1.1.1
+++ src/keydata.cpp 29 Aug 2005 10:02:46 -0000
@@ -313,6 +313,9 @@ void Keydata::loadPrefix(const char *pre
char seek[33];
const char *prefix = NULL;
const char *ext;
+#ifdef WIN32
+ const char *ccp;
+#endif
char *cp;
bool etcpath = false, etctest = false;
#ifndef WIN32
@@ -333,19 +336,19 @@ void Keydata::loadPrefix(const char *pre
if(!regprefix)
regprefix="";
- cp = (char *)keypath;
- if(*cp == '~')
+ ccp = keypath;
+ if(*ccp == '~')
{
- ++cp;
- if(*cp == '/')
- ++cp;
- snprintf(path, sizeof(path), CAPE_REGISTRY_USERSETTINGS
"/%s%s/", regprefix, cp);
+ ++ccp;
+ if(*ccp == '/')
+ ++ccp;
+ snprintf(path, sizeof(path), CAPE_REGISTRY_USERSETTINGS
"/%s%s/", regprefix, ccp);
}
else
{
- if(*cp == '/')
- ++cp;
- snprintf(path, sizeof(path), CAPE_REGISTRY_APPLICATIONS
"/%s%s/", regprefix, cp);
+ if(*ccp == '/')
+ ++ccp;
+ snprintf(path, sizeof(path), CAPE_REGISTRY_APPLICATIONS
"/%s%s/", regprefix, ccp);
}
cp = path;
@@ -390,11 +393,11 @@ void Keydata::loadPrefix(const char *pre
// windows will not support subdir .ini tree; now if not in
// registry, then assume unavailable
- cp = strchr(keypath + 3, '/');
- if(cp)
- cp = strchr(cp, '/');
+ ccp = strchr(keypath + 3, '/');
+ if(ccp)
+ ccp = strchr(ccp, '/');
- if(cp)
+ if(ccp)
return;
if(*keypath == '~')
Index: src/missing.cpp
===================================================================
RCS file: /cvsroot/gnutelephony/testing/commoncpp2/src/missing.cpp,v
retrieving revision 1.2
diff -u -p -r1.2 missing.cpp
--- src/missing.cpp 3 Jul 2005 13:06:24 -0000 1.2
+++ src/missing.cpp 29 Aug 2005 10:02:46 -0000
@@ -105,8 +105,13 @@ int gettimeofday(struct timeval *tv_, vo
struct __timeb64 tb;
_ftime64(&tb);
#else
+# ifndef __BORLANDC__
struct _timeb tb;
_ftime(&tb);
+# else
+ struct timeb tb;
+ ftime(&tb);
+# endif
#endif
tv_->tv_sec = (long)tb.time;
tv_->tv_usec = tb.millitm * 1000;
Index: w32/Makefile.bcc
===================================================================
RCS file: /cvsroot/gnutelephony/testing/commoncpp2/w32/Makefile.bcc,v
retrieving revision 1.1.1.1
diff -u -p -r1.1.1.1 Makefile.bcc
--- w32/Makefile.bcc 23 Apr 2005 22:08:34 -0000 1.1.1.1
+++ w32/Makefile.bcc 29 Aug 2005 10:02:46 -0000
@@ -3,9 +3,17 @@
# #
# (c) 2004 by Darko Miletic #
# e-mail: address@hidden #
+# #
+# Modified 24-Aug-2005 by Conrad T. Pino #
+# e-mail: address@hidden #
+# Compile with Borland C++ Builder 6.0 #
#######################################################
.autodepend
+!ifndef CC
+CC=bcc32
+!endif
+
ILINK32=ilink32
!ifndef BMODE
@@ -38,13 +46,16 @@ DBG=D
.c.obj:
@$(CC) $(CPPFLAGS) -I$(INCDIR) /c -o$@ $<
-
-LIBNAME=ccgnu2$(DBG).dll
-LIBNAME2=ccext2$(DBG).dll
+
+LIBBASE1=ccgnu2$(DBG)
+LIBBASE2=ccext2$(DBG)
+
+LIBNAME1=$(LIBBASE1).dll
+LIBNAME2=$(LIBBASE2).dll
INCDIR=..\w32;..\include
LIBDIR=.\$(OUTDIR)
SRC=..\src
-OBJ=..\src\obj
+OBJ=.\$(OUTDIR)\obj
BIN=.\$(OUTDIR)
#RESFILE=CCXX2.res
SYSDEFINES=
@@ -52,21 +63,23 @@ SYSDEFINES=
################################
# Target
################################
-PROJECT=$(BIN)\$(LIBNAME)
-PROJECT2=$(BIN)\$(LIBNAME2)
-OBJFILES=$(OBJ)\dir.obj \
+PROJECT1=$(BIN)\$(LIBNAME1)
+PROJECT2=$(BIN)\$(LIBNAME2)
+
+OBJFILES1=$(OBJ)\dir.obj \
$(OBJ)\dso.obj \
$(OBJ)\event.obj \
$(OBJ)\exception.obj \
$(OBJ)\file.obj \
$(OBJ)\friends.obj \
+ $(OBJ)\in6addr.obj \
$(OBJ)\inaddr.obj \
$(OBJ)\keydata.obj \
$(OBJ)\mempager.obj \
$(OBJ)\missing.obj \
$(OBJ)\mutex.obj \
+ $(OBJ)\nat.obj \
$(OBJ)\peer.obj \
- $(OBJ)\port.obj \
$(OBJ)\process.obj \
$(OBJ)\semaphore.obj \
$(OBJ)\simplesocket.obj \
@@ -82,7 +95,6 @@ OBJFILES2=$(OBJ)\buffer.obj \
$(OBJ)\date.obj \
$(OBJ)\digest.obj \
$(OBJ)\engine.obj \
- $(OBJ)\fifo.obj \
$(OBJ)\getopt.obj \
$(OBJ)\getopt1.obj \
$(OBJ)\md5.obj \
@@ -100,50 +112,56 @@ LIBFILES=ws2_32.lib
DEFFILE=
BCC32STARTUP=c0d32.obj
BCC32RTLIB=cw32mt.lib
-ALLOBJS=$(BCC32STARTUP) $(OBJFILES)
+ALLOBJS1=$(BCC32STARTUP) $(OBJFILES1)
ALLOBJS2=$(BCC32STARTUP) $(OBJFILES2)
ALLLIBS=$(LIBFILES) import32.lib $(BCC32RTLIB)
-ALLLIBS2=$(LIBFILES) ccgnu2$(DBG).lib import32.lib $(BCC32RTLIB)
+ALLLIBS1=$(ALLLIBS)
+ALLLIBS2=$(ALLLIBS) $(LIBBASE1).lib
-all: dirs $(RESFILE) $(PROJECT) $(PROJECT2) cleanobj
+all: dirs $(RESFILE) $(PROJECT1) $(PROJECT2) cleanrel
cleanobj::
address@hidden Deleting intermediate files for project
address@hidden exist $(OBJ)\*.obj del $(OBJ)\*.obj
+
+cleanrel::
!if $(BMODE) == RELEASE
+ address@hidden Deleting symbol files for project
address@hidden exist $(BIN)\*.tds del $(BIN)\*.tds
address@hidden exist $(BIN)\*.map del $(BIN)\*.map
!endif
cleantgt::
address@hidden Deleting output files for project
- address@hidden exist $(PROJECT) del $(PROJECT)
- address@hidden exist $(PROJECT2) del $(PROJECT2)
- address@hidden exist $(BIN)\*.lib del $(BIN)\*.lib
+ address@hidden exist $(BIN)\$(LIBBASE1).* del $(BIN)\$(LIBBASE1).*
+ address@hidden exist $(BIN)\$(LIBBASE2).* del $(BIN)\$(LIBBASE2).*
clean: cleanobj cleantgt
+ address@hidden Deleting output directory
+ address@hidden exist $(OBJ) rd $(OBJ)
+ address@hidden exist $(BIN) rd $(BIN)
dirs::
address@hidden Creating output directory
- address@hidden $(OBJ)
- address@hidden $(BIN)
+ address@hidden not exist $(BIN) md $(BIN)
+ address@hidden not exist $(OBJ) md $(OBJ)
##################################
# Output
##################################
-$(PROJECT):: $(OBJFILES)
+$(PROJECT1):: $(OBJFILES1)
$(ILINK32) @&&|
- $(LINKFLAGS) $(ALLOBJS)
+ $(LINKFLAGS) $(ALLOBJS1)
$<,$*
- $(ALLLIBS)
+ $(ALLLIBS1)
$(DEFFILE)
$(RESFILE)
|
-$(PROJECT2):: $(OBJFILES2)
+$(PROJECT2):: $(PROJECT) $(OBJFILES2)
$(ILINK32) @&&|
- $(LINKFLAGS) $(ALLOBJS2)
+ $(LINKFLAGS) $(ALLOBJS2)
$<,$*
$(ALLLIBS2)
$(DEFFILE)
@@ -158,13 +176,14 @@ $(OBJ)\event.obj: $(SRC)\event.cpp
$(OBJ)\exception.obj: $(SRC)\exception.cpp
$(OBJ)\file.obj: $(SRC)\file.cpp
$(OBJ)\friends.obj: $(SRC)\friends.cpp
+$(OBJ)\in6addr.obj: $(SRC)\in6addr.cpp
$(OBJ)\inaddr.obj: $(SRC)\inaddr.cpp
$(OBJ)\keydata.obj: $(SRC)\keydata.cpp
$(OBJ)\mempager.obj: $(SRC)\mempager.cpp
$(OBJ)\missing.obj: $(SRC)\missing.cpp
$(OBJ)\mutex.obj: $(SRC)\mutex.cpp
+$(OBJ)\nat.obj: $(SRC)\nat.cpp
$(OBJ)\peer.obj: $(SRC)\peer.cpp
-$(OBJ)\port.obj: $(SRC)\port.cpp
$(OBJ)\process.obj: $(SRC)\process.cpp
$(OBJ)\semaphore.obj: $(SRC)\semaphore.cpp
$(OBJ)\simplesocket.obj: $(SRC)\simplesocket.cpp
@@ -180,7 +199,6 @@ $(OBJ)\cmdoptns.obj: $(SRC)\cmdoptns.cpp
$(OBJ)\date.obj: $(SRC)\date.cpp
$(OBJ)\digest.obj: $(SRC)\digest.cpp
$(OBJ)\engine.obj: $(SRC)\engine.cpp
-$(OBJ)\fifo.obj: $(SRC)\fifo.cpp
$(OBJ)\getopt.obj: $(SRC)\getopt.c
$(OBJ)\getopt1.obj: $(SRC)\getopt1.c
$(OBJ)\md5.obj: $(SRC)\md5.cpp
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Patch: Borland C++ Builder 6.0 Compile Errors,
Conrad T. Pino <=