2007-05-29 10:30 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)

* harbour/makefile.vc
    * synced with BETA branch
  * harbour/contrib/Makefile
    * disable BMDBFCDX for DOS builds due to long names which do not
      pass 8.3 convention
    * use OLE2 instead of OLE
  * harbour/contrib/ole2/w32ole.c
    * warning fixes
  * harbour/include/hbregex.h
    + added REGEX support for DJGPP build
  * harbour/source/rtl/net.c
    * warning cleanup
This commit is contained in:
Przemyslaw Czerpak
2007-05-29 08:32:47 +00:00
parent ed82d42ebb
commit 99aa308fdb
6 changed files with 78 additions and 64 deletions

View File

@@ -8,6 +8,20 @@
2002-12-01 13:30 UTC+0100 Foo Bar <foo.bar@foobar.org>
*/
2007-05-29 10:30 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/makefile.vc
* synced with BETA branch
* harbour/contrib/Makefile
* disable BMDBFCDX for DOS builds due to long names which do not
pass 8.3 convention
* use OLE2 instead of OLE
* harbour/contrib/ole2/w32ole.c
* warning fixes
* harbour/include/hbregex.h
+ added REGEX support for DJGPP build
* harbour/source/rtl/net.c
* warning cleanup
2007-05-28 20:05 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/contrib/Makefile
+ harbour/contrib/adordd/Makefile

View File

@@ -12,8 +12,14 @@ DIRS=\
libmisc \
libnf \
samples \
ifneq ($(HB_ARCHITECTURE),dos)
DIRS +=\
bmdbfcdx \
endif
ifeq ($(HB_ARCHITECTURE),w32)
@@ -31,7 +37,7 @@ ifeq ($(HB_COMPILER),rsxnt)
else
DIRS +=\
ole \
ole2 \
odbc \
adordd \

View File

@@ -1110,7 +1110,8 @@ HB_FUNC( __HB_OLE_EXIT )
if( pUnk )
{
pUnk->lpVtbl->QueryInterface( pUnk, (REFIID) &IID_IDispatch, (void **) &pDisp );
IDispatch ** pDispPtr = &pDisp;
pUnk->lpVtbl->QueryInterface( pUnk, (REFIID) &IID_IDispatch, (void **) pDispPtr );
}
// Intentionally fall through
@@ -1926,7 +1927,7 @@ HB_FUNC( __HB_OLE_EXIT )
}
else*/ if( hb_itemGetSymbol( hb_stackBaseItem() )->szName[0] == '_' && hb_itemGetSymbol( hb_stackBaseItem() )->szName[1] && hb_pcount() >= 1 )
{
bstrMessage = hb_oleAnsiToSysString( hb_itemGetSymbol( hb_stackBaseItem() )->szName + 1 );
bstrMessage = hb_oleAnsiToSysString( ( LPSTR ) hb_itemGetSymbol( hb_stackBaseItem() )->szName + 1 );
s_nOleError = pDisp->lpVtbl->GetIDsOfNames( pDisp, (REFIID) &IID_NULL, (wchar_t **) &bstrMessage, 1, LOCALE_SYSTEM_DEFAULT, &DispID );
SysFreeString( bstrMessage );
//TraceLog( NULL, "1. ID of: '%s' -> %i Result: %p\n", hb_itemGetSymbol( hb_stackBaseItem() )->szName + 1, DispID, s_nOleError );
@@ -1944,7 +1945,7 @@ HB_FUNC( __HB_OLE_EXIT )
if( FAILED( s_nOleError ) )
{
// Try again without removing the assign prefix (_).
bstrMessage = hb_oleAnsiToSysString( hb_itemGetSymbol( hb_stackBaseItem() )->szName );
bstrMessage = hb_oleAnsiToSysString( ( LPSTR ) hb_itemGetSymbol( hb_stackBaseItem() )->szName );
s_nOleError = pDisp->lpVtbl->GetIDsOfNames( pDisp, (REFIID) &IID_NULL, (wchar_t **) &bstrMessage, 1, 0, &DispID );
SysFreeString( bstrMessage );
//TraceLog( NULL, "2. ID of: '%s' -> %i Result: %p\n", hb_itemGetSymbol( hb_stackBaseItem() )->szName, DispID, s_nOleError );

View File

@@ -61,8 +61,9 @@
# if __BORLANDC__ >= 0x550 && !defined( HB_PCRE_REGEX_BCC )
# define HB_PCRE_REGEX_BCC
# endif
#elif defined( OS_UNIX_COMPATIBLE ) && !defined( __WATCOMC__ )
# if !defined( HB_POSIX_REGEX )
#elif ( defined( OS_UNIX_COMPATIBLE ) && !defined( __WATCOMC__ ) ) || \
defined( __DJGPP__ )
# if !defined( HB_POSIX_REGEX ) && !defined( HB_PCRE_REGEX )
# define HB_POSIX_REGEX
# endif
#endif
@@ -77,6 +78,7 @@
# include <pcre.h>
# include <pcreposix.h>
#elif defined( HB_POSIX_REGEX )
# include <sys/types.h>
# include <regex.h>
#else
# undef _HB_REGEX_INTERNAL_

View File

@@ -870,7 +870,7 @@ $(LDFLAGS)
$(**: = ^
)
$(STANDARD_STATIC_HBLIBS)
user32.lib winspool.lib
user32.lib winspool.lib wsock32.lib advapi32.lib
<<
#**********************************************************
#

View File

@@ -107,80 +107,71 @@
HB_FUNC( NETNAME )
{
BOOL fGetUser = hb_parni( 1 ) == 1;
#if defined(HB_OS_UNIX) || ( defined(HB_OS_OS2) && defined(__GNUC__) )
BOOL fGetUser = hb_parni( 1 ) == 1;
# if defined(__WATCOMC__)
char * pszValue = hb_getenv( fGetUser ? "USER" : "HOSTNAME" );
hb_retc_buffer( pszValue );
# else
if( fGetUser )
{
#if defined(__WATCOMC__)
char * pszValue = hb_getenv( fGetUser ? "USER" : "HOSTNAME" );
hb_retc_buffer( pszValue );
#else
if( fGetUser )
{
struct passwd * pwd;
pwd = getpwuid( getuid() );
if( pwd )
hb_retc( pwd->pw_name );
else
hb_retc_buffer( hb_getenv( "USER" ) );
}
struct passwd * pwd;
pwd = getpwuid( getuid() );
if( pwd )
hb_retc( pwd->pw_name );
else
{
char szValue[ MAXGETHOSTNAME + 1 ];
szValue[ 0 ] = '\0';
gethostname( szValue, MAXGETHOSTNAME );
hb_retc( szValue );
}
#endif
hb_retc_buffer( hb_getenv( "USER" ) );
}
else
{
char szValue[ MAXGETHOSTNAME + 1 ];
szValue[ 0 ] = '\0';
gethostname( szValue, MAXGETHOSTNAME );
hb_retc( szValue );
}
# endif
#elif defined(HB_OS_DOS)
#if defined(__DJGPP__) || defined(__RSX32__) || defined(__GNUC__)
# if defined(__DJGPP__) || defined(__RSX32__) || defined(__GNUC__)
char szValue[ MAXGETHOSTNAME + 1 ];
szValue[ 0 ] = '\0';
gethostname( szValue, MAXGETHOSTNAME );
hb_retc( szValue );
# else
union REGS regs;
char szValue[ 16 ];
szValue[ 0 ] = '\0';
regs.HB_XREGS.ax = 0x5E00;
{
char szValue[ MAXGETHOSTNAME + 1 ];
szValue[ 0 ] = '\0';
struct SREGS sregs;
gethostname( szValue, MAXGETHOSTNAME );
regs.HB_XREGS.dx = FP_OFF( szValue );
sregs.ds = FP_SEG( szValue );
hb_retc( szValue );
HB_DOS_INT86X( 0x21, &regs, &regs, &sregs );
}
#else
{
union REGS regs;
char szValue[ 16 ];
szValue[ 0 ] = '\0';
regs.HB_XREGS.ax = 0x5E00;
{
struct SREGS sregs;
regs.HB_XREGS.dx = FP_OFF( szValue );
sregs.ds = FP_SEG( szValue );
HB_DOS_INT86X( 0x21, &regs, &regs, &sregs );
}
hb_retc( regs.h.ch == 0 ? "" : szValue );
}
#endif
hb_retc( regs.h.ch == 0 ? "" : szValue );
# endif
#elif defined(HB_OS_WIN_32)
{
DWORD ulLen = MAX_COMPUTERNAME_LENGTH + 1;
char szValue[ MAX_COMPUTERNAME_LENGTH + 1 ];
szValue[ 0 ] = '\0';
BOOL fGetUser = hb_parni( 1 ) == 1;
DWORD ulLen = MAX_COMPUTERNAME_LENGTH + 1;
char szValue[ MAX_COMPUTERNAME_LENGTH + 1 ];
if( fGetUser )
GetUserName( szValue, &ulLen );
else
GetComputerName( szValue, &ulLen );
hb_retc( szValue );
}
szValue[ 0 ] = '\0';
if( fGetUser )
GetUserName( szValue, &ulLen );
else
GetComputerName( szValue, &ulLen );
hb_retc( szValue );
#else