2010-02-18 18:45 UTC+0100 Maurilio Longo (maurilio.longo@libero.it)

* src/vm/cmdarg.c
      ! fixed OS/2 was displaying the path of the first .exe with name equal
        to current process calling hb_DirBase() present in PATH, in my case
        it was founding d:\tcpip\bin\ftpd.exe instead of current ftpd.exe
        because c:\tcpip\bin was present in PATH before current dir.
   * src/rtl/hbsocket.c
      * OS/2 when building against latest TCP/IP stack has
        HB_HAS_INET_ATON, HB_HAS_INET_PTON and HB_HAS_INET_NTOP
This commit is contained in:
Maurilio Longo
2010-02-18 17:47:54 +00:00
parent f83c8f069e
commit df7e8e09a1
3 changed files with 39 additions and 1 deletions

View File

@@ -17,6 +17,16 @@
past entries belonging to author(s): Viktor Szakats.
*/
2010-02-18 18:45 UTC+0100 Maurilio Longo (maurilio.longo@libero.it)
* src/vm/cmdarg.c
! fixed OS/2 was displaying the path of the first .exe with name equal
to current process calling hb_DirBase() present in PATH, in my case
it was founding d:\tcpip\bin\ftpd.exe instead of current ftpd.exe
because c:\tcpip\bin was present in PATH before current dir.
* src/rtl/hbsocket.c
* OS/2 when building against latest TCP/IP stack has
HB_HAS_INET_ATON, HB_HAS_INET_PTON and HB_HAS_INET_NTOP
2010-02-18 16:59 UTC+0100 Viktor Szakats (harbour.01 syenar.hu)
* utils/hbmk2/hbmk2.prg
* config/wce/mingwarm.mk

View File

@@ -150,7 +150,11 @@
# define HB_HAS_INET_PTON
# define HB_HAS_INET_NTOP
# else
/* test shows that GCC 3.3.6 does not support inet_pton() and inet_ntop() */
# if ! defined( TCPV40HDRS )
# define HB_HAS_INET_ATON
# define HB_HAS_INET_PTON
# define HB_HAS_INET_NTOP
# endif
# endif
#elif defined( HB_OS_DOS )
# define HB_HAS_INET_ATON
@@ -179,8 +183,10 @@
# include <types.h>
# include <nerrno.h>
# endif
# include <sys/socket.h>
# include <sys/select.h>
# include <sys/ioctl.h>
# include <arpa/inet.h>
# endif
# if !( defined( HB_OS_DOS ) && defined( __WATCOMC__ ) )
# include <sys/time.h>

View File

@@ -50,6 +50,10 @@
*
*/
#define INCL_DOSPROCESS
#define INCL_DOSERRORS
#define INCL_DOSMODULEMGR
#include "hbapi.h"
#include "hbapiitm.h"
#include "hbapifs.h"
@@ -58,6 +62,10 @@
#include "hbstack.h"
#include "hbverbld.h"
#if defined( HB_OS_OS2 )
#include <os2.h>
#endif
/* Command line argument management */
static int s_argc = 0;
static char ** s_argv = NULL;
@@ -146,6 +154,20 @@ void hb_cmdargUpdate( void )
HB_TCHAR_GETFROM( s_szAppName, s_lpAppName, HB_SIZEOFARRAY( s_lpAppName ) );
s_argv[ 0 ] = s_szAppName;
}
#elif defined( HB_OS_OS2 )
PPIB ppib = NULL;
APIRET ulrc;
ulrc = DosGetInfoBlocks( NULL, &ppib );
if ( ulrc == NO_ERROR ) {
ulrc = DosQueryModuleName( ppib->pib_hmte,
HB_SIZEOFARRAY( s_szAppName ),
s_szAppName );
if ( ulrc == NO_ERROR ) {
s_argv[ 0 ] = s_szAppName;
}
}
#else
/* NOTE: try to create absolute path from s_argv[ 0 ] if necessary */
{