2010-07-17 16:28 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)

* contrib/hbodbc/todbc.prg
  * contrib/hbodbc/odbcold.c
  * contrib/hbodbc/odbc.c
    - Deleted SQLEXTENDEDFETCH() wrapper. The original ODBC
      function was in compatibility status since ODBC 3.0 and
      it was causing permanent build problems in Harbour, due
      to disagreement in parameter widths/types on different
      platforms and compiler headers (f.e. on Linux AMD64 C++
      mode, POCC and XCC).
      INCOMPATIBILITY: This compatibility function was deleted,
                       use SQLFETCHSCROLL() instead.
    * Replaced SQLEXTENDEDFETCH() with SQLFETCHSCROLL() in TODBC
      code as recommended by MS.
    ! Added cast to silence msvc C mode warning.

  * config/vxworks/gcc.mk
    ! Fixed vxworks/gcc HB_BUILD_SHARED=yes link mode.
This commit is contained in:
Viktor Szakats
2010-07-17 14:30:38 +00:00
parent 3a97d58533
commit 35fac2ada1
5 changed files with 24 additions and 38 deletions

View File

@@ -16,6 +16,25 @@
The license applies to all entries newer than 2009-04-28.
*/
2010-07-17 16:28 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
* contrib/hbodbc/todbc.prg
* contrib/hbodbc/odbcold.c
* contrib/hbodbc/odbc.c
- Deleted SQLEXTENDEDFETCH() wrapper. The original ODBC
function was in compatibility status since ODBC 3.0 and
it was causing permanent build problems in Harbour, due
to disagreement in parameter widths/types on different
platforms and compiler headers (f.e. on Linux AMD64 C++
mode, POCC and XCC).
INCOMPATIBILITY: This compatibility function was deleted,
use SQLFETCHSCROLL() instead.
* Replaced SQLEXTENDEDFETCH() with SQLFETCHSCROLL() in TODBC
code as recommended by MS.
! Added cast to silence msvc C mode warning.
* config/vxworks/gcc.mk
! Fixed vxworks/gcc HB_BUILD_SHARED=yes link mode.
2010-07-17 15:20 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
* include/hbdefs.h
* src/rtl/hbsocket.c
@@ -219,7 +238,7 @@
code, but it's possible some build options are needed which
I missed all along.
GPF is inside pthread_mutex_lock().
- HB_SHARED_MODE=yes needs further tweaking.
- HB_SHARED_MODE=yes needs further tweaking. [DONE]
- GNU Make 3.80 is shipped with the VxWorks package, and it
fails with strange error which is not suprise how buggy
make was in 2002, the first usable version is 3.81 on

View File

@@ -55,8 +55,7 @@ DLIBPATHS := $(foreach dir,$(LIB_DIR) $(SYSLIBPATHS_DYN),-L$(dir))
LDLIBS := $(foreach lib,$(HB_USER_LIBS) $(LIBS) $(SYSLIBS_BIN),-l$(lib))
ifeq ($(HB_BUILD_SHARED),yes)
# TOFIX: no entry point
LDFLAGS += -shared
LDFLAGS += -non-static
endif
LDFLAGS += $(LDLIBPATHS)

View File

@@ -58,7 +58,6 @@
* Copyright 1999 Felipe G. Coury <fcoury@creation.com.br>
* SQLNUMRESULTCOLS()
* SQLDESCRIBECOL()
* SQLEXTENDEDFETCH()
*
* Copyright 1996 Marcelo Lombardo <lombardo@uol.com.br>
* SQLGETINFO()
@@ -381,34 +380,6 @@ HB_FUNC( SQLCOLATTRIBUTE ) /* hStmt, nCol, nField, @cName, nLen, @nBufferLen, @n
hb_retni( result );
}
HB_FUNC( SQLEXTENDEDFETCH ) /* hStmt, nOrientation, nOffset, @nRows, @nRowStatus --> nRetCode */
{
SQLUSMALLINT siRowStatus = ( SQLUSMALLINT ) hb_parni( 5 );
#if defined( __POCC__ ) || defined( __XCC__ )
SQLROWSETSIZE uiRowCountPtr = ( SQLROWSETSIZE ) hb_parnl( 4 );
SQLRETURN result = SQLExtendedFetch( ( SQLHSTMT ) hb_parptr( 1 ),
( SQLUSMALLINT ) hb_parni( 2 ),
( SQLROWOFFSET ) hb_parnl( 3 ),
( SQLROWSETSIZE * ) &uiRowCountPtr,
( SQLUSMALLINT * ) &siRowStatus );
#else
SQLULEN uiRowCountPtr = ( SQLULEN ) hb_parnint( 4 );
SQLRETURN result = SQLExtendedFetch( ( SQLHSTMT ) hb_parptr( 1 ),
( SQLUSMALLINT ) hb_parni( 2 ),
( SQLLEN ) hb_parnint( 3 ),
( SQLULEN * ) &uiRowCountPtr,
( SQLUSMALLINT * ) &siRowStatus );
#endif
if( result == SQL_SUCCESS || result == SQL_SUCCESS_WITH_INFO )
{
hb_stornint( uiRowCountPtr, 4 );
hb_storni( ( int ) siRowStatus, 5 );
}
hb_retni( result );
}
HB_FUNC( SQLFETCHSCROLL )
{
#if ODBCVER >= 0x0300
@@ -610,7 +581,7 @@ HB_FUNC( SQLMORERESULTS ) /* hEnv, hDbc */
HB_FUNC( SQLBINDPARAMETER ) /* nStatementHandle, nParameterNumber, nParameterType, ColumnSize, DecimalDigits, @ParamValue, @ParamLength --> nRetCode */
{
SQLLEN lLen = hb_parnint( 7 );
SQLLEN lLen = ( SQLLEN ) hb_parnint( 7 );
hb_retni( SQLBindParameter( ( SQLHSTMT ) hb_parptr( 1 ),
( SQLUSMALLINT ) hb_parni( 2 ),
( SQLSMALLINT ) SQL_PARAM_OUTPUT,

View File

@@ -68,7 +68,6 @@ HB_FUNC_EXTERN( SQLFREESTMT ) ; HB_FUNC( SQLFREESTM ) { HB_FUNC_E
HB_FUNC_EXTERN( SQLEXECDIRECT ) ; HB_FUNC( SQLEXECDIR ) { HB_FUNC_EXEC( SQLEXECDIRECT ); }
HB_FUNC_EXTERN( SQLNUMRESULTCOLS ) ; HB_FUNC( SQLNUMRES ) { HB_FUNC_EXEC( SQLNUMRESULTCOLS ); }
HB_FUNC_EXTERN( SQLDESCRIBECOL ) ; HB_FUNC( SQLDESCRIB ) { HB_FUNC_EXEC( SQLDESCRIBECOL ); }
HB_FUNC_EXTERN( SQLEXTENDEDFETCH ) ; HB_FUNC( SQLEXTENDE ) { HB_FUNC_EXEC( SQLEXTENDEDFETCH ); }
HB_FUNC_EXTERN( SQLFETCHSCROLL ) ; HB_FUNC( SQLFETCHSC ) { HB_FUNC_EXEC( SQLFETCHSCROLL ); }
HB_FUNC_EXTERN( SQLROWCOUNT ) ; HB_FUNC( SQLROWCOUN ) { HB_FUNC_EXEC( SQLROWCOUNT ); }
HB_FUNC_EXTERN( SQLSETCONNECTATTR ) ; HB_FUNC( SQLSETCONNECTOPTION ) { HB_FUNC_EXEC( SQLSETCONNECTATTR ); }

View File

@@ -470,7 +470,6 @@ METHOD FieldByName( cField ) CLASS TODBC
METHOD Fetch( nFetchType, nOffset ) CLASS TODBC
LOCAL nRows
LOCAL nResult
LOCAL nPos := NIL
@@ -533,9 +532,8 @@ METHOD Fetch( nFetchType, nOffset ) CLASS TODBC
nResult := SQL_ERROR
ENDSWITCH
ELSE // apearently we don't have
// nResult := SQLFetch( ::hStmt /*, nFetchType, nOffSet */)
nResult := SQLExtendedFetch( ::hStmt, nFetchType, nOffSet, @nRows, 0 )
ELSE
nResult := SQLFetchScroll( ::hStmt, nFetchType, nOffSet )
ENDIF
IF nResult == SQL_SUCCESS .OR. nResult == SQL_SUCCESS_WITH_INFO