try 2 after conflict
This commit is contained in:
@@ -1,3 +1,9 @@
|
||||
19990619-14:35 CET Matteo Baccan
|
||||
* makefile.vc, source/hbpp/hbpp.c, source/hbpp/hbppint.c,
|
||||
source/rtl/environ.c, source/rtl/files.c, source/rtl/gt/gtwin.c,
|
||||
source/tools/hb_f.c
|
||||
Patches to allow for succesful compilation with MS Visual C++
|
||||
|
||||
19990619-14:00 Ryszard Glab <rglab@imid.med.pl>
|
||||
|
||||
* tests/working/testcgi.prg
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
|
||||
COMPILER_DIR=source\compiler
|
||||
RTL_DIR=source\rtl
|
||||
HBPP_DIR=source\hbpp
|
||||
TOOLS_DIR=source\tools
|
||||
VM_DIR=source\vm
|
||||
INCLUDE_DIR=include
|
||||
@@ -28,7 +29,8 @@ OBJ_DIR=obj
|
||||
|
||||
CC=cl
|
||||
CFLAGS=-w -I$(INCLUDE_DIR)
|
||||
CLIBFLAGS=$(CFLAGS) -c -Zi /TP
|
||||
CLIBFLAGS=$(CFLAGS) -c /TP
|
||||
CLIBFLAGSDEBUG=$(CFLAGS) -c -Zi /TP
|
||||
|
||||
#
|
||||
# Macros to access our library names
|
||||
@@ -123,10 +125,17 @@ $(HARBOUR_EXE) : \
|
||||
$(COMPILER_DIR)\harboury.c \
|
||||
$(COMPILER_DIR)\harbourl.c \
|
||||
$(COMPILER_DIR)\genobj32.c \
|
||||
$(COMPILER_DIR)\harbour.c
|
||||
$(CC) $(CFLAGS) $(COMPILER_DIR)\harboury.c $(COMPILER_DIR)\harbourl.c $(COMPILER_DIR)\harbour.obj -o $(BIN_DIR)\harbour
|
||||
$(COMPILER_DIR)\harbour.c \
|
||||
$(HBPP_DIR)\hbpp.c \
|
||||
$(HBPP_DIR)\hbppint.c \
|
||||
$(HBPP_DIR)\table.c
|
||||
$(CC) $(CFLAGS) $(COMPILER_DIR)\harboury.c $(COMPILER_DIR)\harbourl.c $(COMPILER_DIR)\harbour.c $(HBPP_DIR)\hbppint.c $(HBPP_DIR)\hbpp.c $(HBPP_DIR)\table.c -o $(BIN_DIR)\harbour
|
||||
-del harboury.obj
|
||||
-del harbourl.obj
|
||||
-del harbour.obj
|
||||
-del hbppint.obj
|
||||
-del hbpp.obj
|
||||
-del table.obj
|
||||
|
||||
#
|
||||
# Library depencies and build rules
|
||||
@@ -145,11 +154,11 @@ $(TERMINAL_LIB) : $(TERMINAL_LIB_OBJS)
|
||||
# Compiler source depencies and build rules
|
||||
#
|
||||
|
||||
#$(COMPILER_DIR)\harboury.c : $(COMPILER_DIR)\harbour.y
|
||||
# bison -d -v $(COMPILER_DIR)\harbour.y -o$(COMPILER_DIR)\harboury.c
|
||||
#
|
||||
#$(COMPILER_DIR)\harbourl.c : $(COMPILER_DIR)\harbour.l
|
||||
# flex -i -o$(COMPILER_DIR)\harbourl.c $(COMPILER_DIR)\harbour.l
|
||||
$(COMPILER_DIR)\harboury.c : $(COMPILER_DIR)\harbour.y
|
||||
bison -d -v $(COMPILER_DIR)\harbour.y -o$(COMPILER_DIR)\harboury.c
|
||||
|
||||
$(COMPILER_DIR)\harbourl.c : $(COMPILER_DIR)\harbour.l
|
||||
flex -i -o$(COMPILER_DIR)\harbourl.c $(COMPILER_DIR)\harbour.l
|
||||
|
||||
#
|
||||
# RTL source depencies below. Add as needed
|
||||
@@ -195,7 +204,7 @@ $(OBJ_DIR)\extend.obj : $(RTL_DIR)\extend.c
|
||||
$(CC) $(CLIBFLAGS) -Fo$@ $**
|
||||
|
||||
$(OBJ_DIR)\files.obj : $(RTL_DIR)\files.c
|
||||
$(CC) $(CLIBFLAGS) /TC -Fo$@ $**
|
||||
$(CC) $(CLIBFLAGS) -Fo$@ $**
|
||||
|
||||
$(OBJ_DIR)\gtapi.obj : $(RTL_DIR)\gtapi.c
|
||||
$(CC) $(CLIBFLAGS) -Fo$@ $**
|
||||
@@ -293,7 +302,7 @@ $(OBJ_DIR)\genobj.obj : $(TOOLS_DIR)\genobj.c
|
||||
$(CC) $(CLIBFLAGS) -Fo$@ $**
|
||||
|
||||
$(OBJ_DIR)\hb_f.obj : $(TOOLS_DIR)\hb_f.c
|
||||
$(CC) $(CLIBFLAGS) /TC -Fo$@ $**
|
||||
$(CC) $(CLIBFLAGS) -Fo$@ $**
|
||||
|
||||
$(OBJ_DIR)\io.obj : $(TOOLS_DIR)\io.c
|
||||
$(CC) $(CLIBFLAGS) -Fo$@ $**
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
#else
|
||||
#if defined(__IBMCPP__)
|
||||
#if (defined(_MSC_VER) || defined(__IBMCPP__))
|
||||
#include <memory.h>
|
||||
#else
|
||||
#include <mem.h>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#else
|
||||
#if defined(__IBMCPP__) || defined(__WATCOMC__)
|
||||
#if (defined(_MSC_VER) || defined(__IBMCPP__) || defined(__WATCOMC__))
|
||||
#include <memory.h>
|
||||
#include <stdlib.h>
|
||||
#else
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
#include <errorapi.h>
|
||||
#include <version.h>
|
||||
|
||||
#if defined(__TURBOC__) || defined(__BORLANDC__) || defined(__DJGPP__)
|
||||
#if defined(__TURBOC__) || defined(__BORLANDC__) || defined(__MSC__) || defined(_MSC_VER) || defined(__DJGPP__)
|
||||
#include <dos.h>
|
||||
#include <stdlib.h>
|
||||
#endif
|
||||
|
||||
@@ -35,19 +35,21 @@
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(__BORLANDC__) || defined(__IBMCPP__)
|
||||
#if defined(__BORLANDC__) || defined(__IBMCPP__) || defined(_MSC_VER)
|
||||
#include <sys\stat.h>
|
||||
#include <io.h>
|
||||
#include <fcntl.h>
|
||||
#include <share.h>
|
||||
#if defined(__IBMCPP__)
|
||||
#if defined(__IBMCPP__) || defined(_MSC_VER)
|
||||
#include <direct.h>
|
||||
#else
|
||||
#include <dir.h>
|
||||
#endif
|
||||
|
||||
#if !defined(HAVE_POSIX_IO)
|
||||
#define HAVE_POSIX_IO
|
||||
#if !defined(_MSC_VER)
|
||||
#if !defined(HAVE_POSIX_IO)
|
||||
#define HAVE_POSIX_IO
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -438,6 +440,9 @@ BYTEP hb_fsCurDir ( USHORT uiDrive )
|
||||
#else
|
||||
cwd_buff[0] = 0;
|
||||
last_error = FS_ERROR;
|
||||
#endif
|
||||
#if defined(_MSC_VER)
|
||||
BYTEP dmm = cwd_buff;
|
||||
#endif
|
||||
return (BYTEP)cwd_buff;
|
||||
}
|
||||
|
||||
@@ -142,7 +142,7 @@ void gtPuts(char x, char y, char attr, char *str, int len)
|
||||
DWORD i, dwlen;
|
||||
COORD coord;
|
||||
LPWORD pwattr;
|
||||
pwattr = malloc(strlen(str) * sizeof(*pwattr));
|
||||
pwattr = (LPWORD) malloc(strlen(str) * sizeof(*pwattr));
|
||||
if (!pwattr)
|
||||
{
|
||||
return;
|
||||
@@ -165,12 +165,12 @@ void gtGetText(char x1, char y1, char x2, char y2, char *dest)
|
||||
LPWORD pwattr;
|
||||
char y, *pstr;
|
||||
width = (x2 - x1 + 1);
|
||||
pwattr = malloc(width * sizeof(*pwattr));
|
||||
pwattr = (LPWORD) malloc(strlen(str) * sizeof(*pwattr));
|
||||
if (!pwattr)
|
||||
{
|
||||
return;
|
||||
}
|
||||
pstr = malloc(width);
|
||||
pstr = (char *)malloc(width);
|
||||
if (!pstr)
|
||||
{
|
||||
free(pwattr);
|
||||
@@ -201,12 +201,12 @@ void gtPutText(char x1, char y1, char x2, char y2, char *srce)
|
||||
LPWORD pwattr;
|
||||
char y, *pstr;
|
||||
width = (x2 - x1 + 1);
|
||||
pwattr = malloc(width * sizeof(*pwattr));
|
||||
pwattr = (LPWORD) malloc(strlen(str) * sizeof(*pwattr));
|
||||
if (!pwattr)
|
||||
{
|
||||
return;
|
||||
}
|
||||
pstr = malloc(width);
|
||||
pstr = (char *)malloc(width);
|
||||
if (!pstr)
|
||||
{
|
||||
free(pwattr);
|
||||
|
||||
@@ -50,7 +50,7 @@ HARBOUR HB_HB_FUSE( void )
|
||||
else
|
||||
open_flags = 0;
|
||||
|
||||
handles[area] = hb_fsOpen( hb_parc(1), open_flags );
|
||||
handles[area] = hb_fsOpen( (BYTEP) hb_parc(1), open_flags );
|
||||
offset[area] = 0;
|
||||
recno[area] = 1;
|
||||
b = ( char * )hb_xgrab( b_size );
|
||||
@@ -110,7 +110,7 @@ long hb_hbfskip( int recs )
|
||||
if ( recs > 0 ) {
|
||||
for (y = 0; y < recs; y++ ) {
|
||||
hb_fsSeek( handles[area], offset[area], SEEK_SET );
|
||||
read_len = hb_fsRead( handles[area], b, b_size );
|
||||
read_len = hb_fsRead( handles[area], (BYTEP) b, b_size );
|
||||
for (x = 0; x < read_len; x++ ) {
|
||||
if ( ((*(b + x) == 13) && (*(b + x + 1) == 10)) ||
|
||||
((*(b + x) == 10) && (*(b + x + 1) == 13)) ) {
|
||||
@@ -144,7 +144,7 @@ long hb_hbfskip( int recs )
|
||||
}
|
||||
|
||||
hb_fsSeek( handles[area], read_pos, SEEK_SET );
|
||||
read_len = hb_fsRead( handles[area], b, read_len );
|
||||
read_len = hb_fsRead( handles[area], (BYTEP) b, read_len );
|
||||
|
||||
for (x = read_len - 4; x >= 0; x-- ) {
|
||||
if ( ((*(b + x) == 13) && (*(b + x + 1) == 10)) ||
|
||||
@@ -174,7 +174,7 @@ HARBOUR HB_HB_FREADLN( void )
|
||||
long read;
|
||||
|
||||
hb_fsSeek( handles[area], offset[area], SEEK_SET );
|
||||
read = hb_fsRead( handles[area], b, b_size );
|
||||
read = hb_fsRead( handles[area], (BYTEP) b, b_size );
|
||||
|
||||
for ( x = 0; x < b_size; x++ ) {
|
||||
if ( ((*(b + x) == 13) && (*(b + x + 1) == 10)) ||
|
||||
@@ -242,7 +242,7 @@ HARBOUR HB_HB_FGOBOTTOM(void)
|
||||
do {
|
||||
|
||||
hb_fsSeek( handles[area], offset[area], SEEK_SET );
|
||||
len = hb_fsRead( handles[area], c, c_size );
|
||||
len = hb_fsRead( handles[area], (BYTEP) c, c_size );
|
||||
for ( x = 0; x < len; x++ ) {
|
||||
if ( ((*(c + x) == 13) && (*(c + x + 1) == 10)) ||
|
||||
((*(c + x) == 10) && (*(c + x + 1) == 13)) ||
|
||||
|
||||
Reference in New Issue
Block a user