diff --git a/harbour/ChangeLog b/harbour/ChangeLog
index 17fe315e40..b6b365c7ee 100644
--- a/harbour/ChangeLog
+++ b/harbour/ChangeLog
@@ -17,6 +17,20 @@
past entries belonging to author(s): Viktor Szakats.
*/
+2009-08-18 19:44 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
+ * harbour/contrib/hbodbc/odbc.c
+ * harbour/contrib/rddsql/sddodbc/odbcdd.c
+ * synced workarounds for missing in some header files SQL* definitions
+
+ * harbour/config/globsh.mk
+ * harbour/config/instsh.mk
+ ! eliminated COMMAND.COM commands used for DOS shell - I've just tested
+ that they do not work with pure MS-DOS 6.2 without using $(CMDPREF)
+ though they works with FreeDOS. Anyhow we can safely eliminate them
+ using dj-*.exe tools directly without any if ... command.com testing.
+ It also resolve the problem with IF EXIST
\NUL which is always
+ true in some environment, i.e. Novel-NetWare drives.
+
2009-08-17 19:05 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
* config/dirsh.mk
+ Added '@' prefixes for nt and os2 shells.
diff --git a/harbour/config/globsh.mk b/harbour/config/globsh.mk
index 1db4cdab46..ef53d0b0b4 100644
--- a/harbour/config/globsh.mk
+++ b/harbour/config/globsh.mk
@@ -110,21 +110,21 @@ ifeq ($(HB_SHELL),dos)
MK := $(subst \,/,$(MAKE))
RM := del
-RDP := $(TOOL_DIR)dj-rm -f -r
+RDP := $(TOOL_DIR)dj-rm -fr
CP := $(TOOL_DIR)dj-cp -f
MD := mkdir
MDP := $(TOOL_DIR)dj-mkdir -p
dirbase::
- -@if not exist $(OBJ_DIR_OS)\nul $(MDP) $(OBJ_DIR_OS)
- $(if $(LIB_FILE),-@if not exist $(LIB_DIR_OS)\nul $(MDP) $(LIB_DIR_OS),)
- $(if $(BIN_FILE),-@if not exist $(BIN_DIR_OS)\nul $(MDP) $(BIN_DIR_OS),)
+ -@$(MDP) $(OBJ_DIR_OS)
+ $(if $(LIB_FILE),-@$(MDP) $(LIB_DIR_OS),)
+ $(if $(BIN_FILE),-@$(MDP) $(BIN_DIR_OS),)
clean::
-@$(RDP) $(PKG_DIR_OS) $(OBJ_DIR_OS) $(LIB_FILE_OS) $(BIN_FILE_OS)
- $(if $(LIB_FILE),-@if exist $(basename $(LIB_FILE_OS)).bak $(RM) $(basename $(LIB_FILE_OS)).bak,)
- $(if $(LIB_FILE),-@if not exist $(LIB_DIR_OS)\*.* $(RDP) $(LIB_DIR_OS),)
- $(if $(BIN_FILE),-@if exist $(basename $(BIN_FILE_OS)).tds $(RM) $(basename $(BIN_FILE_OS)).tds,)
- $(if $(BIN_FILE),-@if not exist $(BIN_DIR_OS)\*.* $(RDP) $(BIN_DIR_OS),)
+ $(if $(LIB_FILE),-@$(RDP) $(basename $(LIB_FILE_OS)).bak,)
+ $(if $(LIB_FILE),$(if $(wildcard $(LIB_DIR_OS)/*.*),,-@$(RDP) $(LIB_DIR_OS)),)
+ $(if $(BIN_FILE),-@$(RDP) $(basename $(BIN_FILE_OS)).tds ,)
+ $(if $(BIN_FILE),$(if $(wildcard $(BIN_DIR_OS)/*.*),,-@$(RDP) $(BIN_DIR_OS)),)
endif
diff --git a/harbour/config/instsh.mk b/harbour/config/instsh.mk
index 1ce2102ff9..22ea2dd662 100644
--- a/harbour/config/instsh.mk
+++ b/harbour/config/instsh.mk
@@ -75,7 +75,7 @@ endif
ifeq ($(HB_SHELL),dos)
define inst_file_all
- -@if not exist $(INSTALL_DIR_OS)\nul $(MDP) $(INSTALL_DIR_OS)
+ -@$(MDP) $(INSTALL_DIR_OS)
$(foreach file,$(INSTALL_FILES_OS),$(inst_file))
endef
diff --git a/harbour/contrib/hbodbc/odbc.c b/harbour/contrib/hbodbc/odbc.c
index 83c9790ec1..5e670b6d61 100644
--- a/harbour/contrib/hbodbc/odbc.c
+++ b/harbour/contrib/hbodbc/odbc.c
@@ -79,37 +79,26 @@
#include "hbapi.h"
+#include
+#include
+#include
+
#if !defined( HB_OS_WIN )
# define HB_TCHAR_CONVTO( s ) ( ( char * ) ( s ) )
# define HB_TCHAR_CONVFROM( s ) ( ( char * ) ( s ) )
# define HB_TCHAR_CONVNFROM( s, l ) ( ( char * ) ( s ) )
# define HB_TCHAR_FREE( s ) HB_SYMBOL_UNUSED( s )
+# if !defined( SQLLEN ) && !defined( SQLTCHAR )
+ typedef unsigned char SQLTCHAR;
+# endif
+# if !defined( SQLLEN )
+# define SQLLEN SQLINTEGER
+# endif
+# if !defined( SQLULEN )
+# define SQLULEN SQLUINTEGER
+# endif
#endif
-#if defined( HB_OS_LINUX ) && defined( __WATCOMC__ )
-#include "/usr/include/sql.h"
-#include "/usr/include/sqlext.h"
-#include "/usr/include/sqltypes.h"
-#else
-#include
-#include
-#include
-#endif
-
-#ifndef SQLLEN
- #ifdef HB_OS_WIN_64
- typedef INT64 SQLLEN;
- #else
- #define SQLLEN SQLINTEGER
- #endif
-#endif
-#ifndef SQLULEN
- #ifdef HB_OS_WIN_64
- typedef UINT64 SQLULEN;
- #else
- #define SQLULEN SQLUINTEGER
- #endif
-#endif
#ifndef SQL_NO_DATA
#define SQL_NO_DATA SQL_NO_DATA_FOUND
#endif
diff --git a/harbour/contrib/rddsql/sddodbc/odbcdd.c b/harbour/contrib/rddsql/sddodbc/odbcdd.c
index a9153daefc..7360b4b4a5 100644
--- a/harbour/contrib/rddsql/sddodbc/odbcdd.c
+++ b/harbour/contrib/rddsql/sddodbc/odbcdd.c
@@ -64,6 +64,15 @@
# define HB_TCHAR_CONVTO( s ) ( ( char * ) ( s ) )
# define HB_TCHAR_CONVFROM( s ) ( ( char * ) ( s ) )
# define HB_TCHAR_FREE( s ) HB_SYMBOL_UNUSED( s )
+# if !defined( SQLLEN ) && !defined( SQLTCHAR )
+ typedef unsigned char SQLTCHAR;
+# endif
+# if !defined( SQLLEN )
+# define SQLLEN SQLINTEGER
+# endif
+# if !defined( SQLULEN )
+# define SQLULEN SQLUINTEGER
+# endif
#endif
static HB_ERRCODE odbcConnect( SQLDDCONNECTION* pConnection, PHB_ITEM pItem );