diff --git a/harbour/ChangeLog b/harbour/ChangeLog index bd3e83ab7f..4704655339 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -1,3 +1,15 @@ +20000415-15:07 GMT+1 Victor Szakats + + * source/rtl/net.c + + NETNAME() now works with BCC16 (and any other real mode DOS compiler for + that matter). + - Commented out for DJGPP. I leave this for someone who has the nerve + to tweak it for PM. + + * bin/bld.bat + * bin/bld.cmd + ! Fix for bcc16 HB_GT_LIB selection. + 20000415-13:01 GMT+1 Victor Szakats * bin/bld.bat diff --git a/harbour/bin/bld.bat b/harbour/bin/bld.bat index e95a68e867..d3b68e9f82 100644 --- a/harbour/bin/bld.bat +++ b/harbour/bin/bld.bat @@ -115,7 +115,7 @@ rem if "%HB_GT_LIB%" == "" set HB_GT_LIB= echo debug.lib >> build.tmp echo vm.lib >> build.tmp echo rtl.lib >> build.tmp - echo gtdos.lib >> build.tmp + echo %HB_GT_LIB%.lib >> build.tmp echo lang.lib >> build.tmp echo rdd.lib >> build.tmp echo macro.lib >> build.tmp diff --git a/harbour/bin/bld.cmd b/harbour/bin/bld.cmd index ad74094c88..5db1b9e24b 100644 --- a/harbour/bin/bld.cmd +++ b/harbour/bin/bld.cmd @@ -115,7 +115,7 @@ rem if "%HB_GT_LIB%" == "" set HB_GT_LIB= echo debug.lib >> build.tmp echo vm.lib >> build.tmp echo rtl.lib >> build.tmp - echo gtdos.lib >> build.tmp + echo %HB_GT_LIB%.lib >> build.tmp echo lang.lib >> build.tmp echo rdd.lib >> build.tmp echo macro.lib >> build.tmp diff --git a/harbour/source/rtl/net.c b/harbour/source/rtl/net.c index d994f08cca..5465b2f6ef 100644 --- a/harbour/source/rtl/net.c +++ b/harbour/source/rtl/net.c @@ -38,26 +38,36 @@ #include "hbapi.h" /* TODO: Implement NETNAME() for other platforms */ + /* NOTE: Clipper will only return a maximum of 15 bytes from this function. + And it will be padded with spaces. Harbour does the same in the + DOS platform. [vszakats] */ HB_FUNC( NETNAME ) { #if defined(HB_OS_DOS) - - #define LP_SEG( lp ) ( ( unsigned )( ( unsigned )( lp ) >> 16 ) ) - #define LP_OFF( lp ) ( ( unsigned )( lp ) ) - { char szValue[ 16 ]; union REGS regs; - struct SREGS sregs; regs.x.ax = 0x5E00; - regs.x.dx = LP_OFF( szValue ); - sregs.ds = LP_SEG( szValue ); - HB_DOS_INT86X( 0x21, ®s, ®s, &sregs ); + #if defined(__DJGPP__) + { + /* TODO: Add support for protected mode */ + szValue[ 0 ] = '\0'; + } + #else + { + struct SREGS sregs; + + regs.x.dx = FP_OFF( szValue ); + sregs.ds = FP_SEG( szValue ); + + HB_DOS_INT86X( 0x21, ®s, ®s, &sregs ); + } + #endif hb_retc( regs.h.ch == 0 ? "" : szValue ); }