2008-07-01 16:28 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)

* harbour/harbour-ce-spec
  * harbour/harbour-w32-spec
    * define whole contrib library list for new contrib/Makefile
    + added header files to respect differences between platform
      native and Windows only headers

  * harbour/harbour.spec
    * define whole contrib library list for new contrib/Makefile
    * divided libraries which needs external references into
      separated packages
    ! removed unnecessary dependences in binaries rebuild in shared
      mode

  * harbour/contrib/hbodbc/odbc.c
    * pacified warnings
    % minor optimization

  * harbour/contrib/hbcurl/hbcurl.c
  * harbour/contrib/hbfbird/firebird.c
  * harbour/source/vm/extrap.c
    * casting to pacify warnings

  * harbour/contrib/gtwvg/gtwvg.c
    ! fixed pointer comparison - C uses different precedence for !
      operator then Clipper/xbase

  * harbour/source/rtl/hbinet.c
    ! fixed GPF HB_INET[GS]ET{SND,RCV}BUFSIZE() when wrong
      socket parameter is passed. Please remember that after
      RT error the control is returned to application.
    % removed any hardcoded limits for size of data passed in
      single read/write call during normal stream operations
    - removed iSndBufSize/iRcvBufSize
This commit is contained in:
Przemyslaw Czerpak
2008-07-01 14:28:30 +00:00
parent b68b12a17d
commit 014b39ca7b
10 changed files with 234 additions and 134 deletions

View File

@@ -8,6 +8,41 @@
2008-12-31 13:59 UTC+0100 Foo Bar <foo.bar@foobar.org>
*/
2008-07-01 16:28 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/harbour-ce-spec
* harbour/harbour-w32-spec
* define whole contrib library list for new contrib/Makefile
+ added header files to respect differences between platform
native and Windows only headers
* harbour/harbour.spec
* define whole contrib library list for new contrib/Makefile
* divided libraries which needs external references into
separated packages
! removed unnecessary dependences in binaries rebuild in shared
mode
* harbour/contrib/hbodbc/odbc.c
* pacified warnings
% minor optimization
* harbour/contrib/hbcurl/hbcurl.c
* harbour/contrib/hbfbird/firebird.c
* harbour/source/vm/extrap.c
* casting to pacify warnings
* harbour/contrib/gtwvg/gtwvg.c
! fixed pointer comparison - C uses different precedence for !
operator then Clipper/xbase
* harbour/source/rtl/hbinet.c
! fixed GPF HB_INET[GS]ET{SND,RCV}BUFSIZE() when wrong
socket parameter is passed. Please remember that after
RT error the control is returned to application.
% removed any hardcoded limits for size of data passed in
single read/write call during normal stream operations
- removed iSndBufSize/iRcvBufSize
2008-06-30 19:20 UTC+0200 Viktor Szakats (harbour.01 syenar hu)
* contrib/hbapollo/Makefile
* contrib/hbcurl/Makefile

View File

@@ -186,7 +186,7 @@ static void hb_gt_wvt_FreeAll( void )
int iPos;
for ( iPos = 1; iPos < WVT_MAX_WINDOWS; iPos++ )
{
if( !s_wvtWindows[ iPos ] == NULL )
if( s_wvtWindows[ iPos ] != NULL )
{
PHB_GTWVT pWVT;

View File

@@ -201,7 +201,7 @@ size_t hb_curl_read_file_callback( void * buffer, size_t size, size_t nmemb, voi
hb_curl->ul_handle = hb_fsOpen( hb_curl->ul_name, FO_READ );
if( hb_curl->ul_handle == FS_ERROR )
return -1;
return ( size_t ) -1;
}
ret = ( size_t ) hb_fsReadLarge( hb_curl->ul_handle, ( BYTE * ) buffer, size * nmemb );
@@ -209,7 +209,7 @@ size_t hb_curl_read_file_callback( void * buffer, size_t size, size_t nmemb, voi
return hb_fsError() ? CURL_READFUNC_ABORT : ret;
}
return -1;
return ( size_t ) -1;
}
size_t hb_curl_read_buff_callback( void * buffer, size_t size, size_t nmemb, void * Cargo )
@@ -231,7 +231,7 @@ size_t hb_curl_read_buff_callback( void * buffer, size_t size, size_t nmemb, voi
return nTodo;
}
return -1;
return ( size_t ) -1;
}
size_t hb_curl_write_file_callback( void * buffer, size_t size, size_t nmemb, void * Cargo )
@@ -245,13 +245,13 @@ size_t hb_curl_write_file_callback( void * buffer, size_t size, size_t nmemb, vo
hb_curl->dl_handle = hb_fsCreate( hb_curl->dl_name, FC_NORMAL );
if( hb_curl->dl_handle == FS_ERROR )
return -1;
return ( size_t ) -1;
}
return hb_fsWriteLarge( hb_curl->dl_handle, ( BYTE * ) buffer, size * nmemb );
}
return -1;
return ( size_t ) -1;
}
#define HB_CURL_DL_BUFF_SIZE_INIT ( CURL_MAX_WRITE_SIZE * 2 )
@@ -279,7 +279,7 @@ size_t hb_curl_write_buff_callback( void * buffer, size_t size, size_t nmemb, vo
return nTodo;
}
return -1;
return ( size_t ) -1;
}
int hb_curl_progress_callback( void * Cargo, double dltotal, double dlnow, double ultotal, double ulnow )

View File

@@ -475,14 +475,14 @@ HB_FUNC( FBGETDATA )
case SQL_TIMESTAMP:
isc_decode_timestamp ( ( ISC_TIMESTAMP * ) var->sqldata, &times );
snprintf( date_s, sizeof( date_s ), "%04d-%02d-%02d %02d:%02d:%02d.%04lu",
snprintf( date_s, sizeof( date_s ), "%04d-%02d-%02d %02d:%02d:%02d.%04d",
times.tm_year + 1900,
times.tm_mon + 1,
times.tm_mday,
times.tm_hour,
times.tm_min,
times.tm_sec,
( ( ISC_TIMESTAMP * ) var->sqldata )->timestamp_time % 10000 );
( int ) ( ( ( ISC_TIMESTAMP * ) var->sqldata )->timestamp_time % 10000 ) );
snprintf( data, sizeof( data ), "%*s ", 24, date_s );
hb_retc( data );
@@ -498,10 +498,11 @@ HB_FUNC( FBGETDATA )
case SQL_TYPE_TIME:
isc_decode_sql_time ( ( ISC_TIME * ) var->sqldata, &times );
snprintf( date_s, sizeof( date_s ), "%02d:%02d:%02d.%04lu",
snprintf( date_s, sizeof( date_s ), "%02d:%02d:%02d.%04d",
times.tm_hour,
times.tm_min,
times.tm_sec, ( *( ( ISC_TIME * ) var->sqldata ) ) % 10000 );
times.tm_sec,
( int ) ( ( *( ( ISC_TIME * ) var->sqldata ) ) % 10000 ) );
snprintf( data, sizeof( data ), "%*s ", 13, date_s );
hb_retc( data );

View File

@@ -245,11 +245,16 @@ HB_FUNC( SQLGETDATA ) /* HB_SQLGETDATA( hStmt, nField, nType, nLen, @cBuffer ) -
WORD wType, wResult;
int iReallocs = 0;
lLen = ( SDWORD )( hb_parnl( 4 ) ? hb_parnl( 4 ) : 64 );
wType = hb_parni( 3 );
if( !wType )
wType = ( WORD ) SQL_BINARY;
lLen = ( SQLLEN ) hb_parnl( 4 );
if( !lLen )
lLen = 64;
bBuffer = hb_xgrab( (ULONG) lLen + 1 );
bOut = NULL;
lInitBuff = lLen;
wType = hb_parni( 3 ) ? hb_parni( 3 ) : SQL_BINARY;
lBuffLen = 0;
wResult = ! SQL_NO_DATA;
while( wResult != SQL_NO_DATA )

View File

@@ -114,10 +114,10 @@ export PATH="$CCPATH$PATH"
export HB_MT=no
export HB_GT_LIB=gtwvt
export HB_BIN_INSTALL=%{_bindir}
export HB_INC_INSTALL=%{_includedir}/harbour
export HB_INC_INSTALL=%{_includedir}/%{name}
export HB_LIB_INSTALL=%{_libdir}/%{name}
export HB_GTALLEG=%{?_with_allegro:yes}
export HB_CONTRIBLIBS="%{?_with_odbc:hbodbc} %{?_with_ads:rddads} %{?_with_gd:hbgd} %{?_with_pgsql:hbpgsql} %{?_with_mysql:hbmysql}"
export HB_CONTRIBLIBS="hbct hbmzip hbtip xhb hbbtree hbmisc hbvpdf hbgt hbbmcdx hbclipsm gtwvg hbw32 rddado %{!?_without_nf:hbnf} %{?_with_odbc:hbodbc} %{?_with_curl:hbcurl} %{?_with_ads:rddads} %{?_with_gd:hbgd} %{?_with_pgsql:hbpgsql} %{?_with_mysql:hbmysql}"
make -r
@@ -145,10 +145,10 @@ export HB_COMPILER=cemgw
export HB_MT=no
export HB_GT_LIB=gtwvt
export HB_BIN_INSTALL=%{_bindir}
export HB_INC_INSTALL=%{_includedir}/harbour
export HB_INC_INSTALL=%{_includedir}/%{name}
export HB_LIB_INSTALL=%{_libdir}/%{name}
export HB_GTALLEG=%{?_with_allegro:yes}
export HB_CONTRIBLIBS="%{?_with_odbc:hbodbc} %{?_with_ads:rddads} %{?_with_gd:hbgd} %{?_with_pgsql:hbpgsql} %{?_with_mysql:hbmysql}"
export HB_CONTRIBLIBS="hbct hbmzip hbtip xhb hbbtree hbmisc hbvpdf hbgt hbbmcdx hbclipsm gtwvg hbw32 rddado %{!?_without_nf:hbnf} %{?_with_odbc:hbodbc} %{?_with_curl:hbcurl} %{?_with_ads:rddads} %{?_with_gd:hbgd} %{?_with_pgsql:hbpgsql} %{?_with_mysql:hbmysql}"
export _DEFAULT_BIN_DIR=$HB_BIN_INSTALL
export _DEFAULT_INC_DIR=$HB_INC_INSTALL
@@ -159,6 +159,7 @@ export HB_LIB_INSTALL=$RPM_BUILD_ROOT/$HB_LIB_INSTALL
export HB_TOOLS_PREF=%{hb_pref}
mkdir -p $HB_BIN_INSTALL
mkdir -p $HB_INC_INSTALL
mkdir -p $HB_LIB_INSTALL
make -r -i install
@@ -173,7 +174,6 @@ ${CCPREFIX}strip --strip-debug $HB_LIB_INSTALL/*
# remove unused files
rm -fR ${HB_BIN_INSTALL}/{harbour,hbpp,hbdoc,hbdot,hbmake,hbrun,hbtest,hbverfix,hbpptest}.exe
rm -fR $HB_INC_INSTALL
# Create a README file for people using this RPM.
cat > doc/%{readme} <<EOF
@@ -301,6 +301,8 @@ rm -fR $RPM_BUILD_ROOT
%{_bindir}/%{hb_pref}mk
%defattr(644,root,root,755)
%dir %{_includedir}/%{name}
%{_includedir}/%{name}/*
%dir %{_libdir}/%{name}
%{_libdir}/%{name}/libhbcpage.a
%{_libdir}/%{name}/libhbcommon.a

View File

@@ -114,10 +114,10 @@ export PATH="$CCPATH$PATH"
export HB_MT=no
export HB_GT_LIB=gtwin
export HB_BIN_INSTALL=%{_bindir}
export HB_INC_INSTALL=%{_includedir}/harbour
export HB_INC_INSTALL=%{_includedir}/%{name}
export HB_LIB_INSTALL=%{_libdir}/%{name}
export HB_GTALLEG=%{?_with_allegro:yes}
export HB_CONTRIBLIBS="%{?_with_odbc:hbodbc} %{?_with_ads:rddads} %{?_with_gd:hbgd} %{?_with_pgsql:hbpgsql} %{?_with_mysql:hbmysql}"
export HB_CONTRIBLIBS="hbct hbmzip hbtip xhb hbbtree hbmisc hbvpdf hbgt hbbmcdx hbclipsm gtwvg hbw32 rddado %{!?_without_nf:hbnf} %{?_with_odbc:hbodbc} %{?_with_curl:hbcurl} %{?_with_ads:rddads} %{?_with_gd:hbgd} %{?_with_pgsql:hbpgsql} %{?_with_mysql:hbmysql}"
make -r
@@ -145,10 +145,10 @@ export HB_COMPILER=mingw32
export HB_MT=no
export HB_GT_LIB=gtwin
export HB_BIN_INSTALL=%{_bindir}
export HB_INC_INSTALL=%{_includedir}/harbour
export HB_INC_INSTALL=%{_includedir}/%{name}
export HB_LIB_INSTALL=%{_libdir}/%{name}
export HB_GTALLEG=%{?_with_allegro:yes}
export HB_CONTRIBLIBS="%{?_with_odbc:hbodbc} %{?_with_ads:rddads} %{?_with_gd:hbgd} %{?_with_pgsql:hbpgsql} %{?_with_mysql:hbmysql}"
export HB_CONTRIBLIBS="hbct hbmzip hbtip xhb hbbtree hbmisc hbvpdf hbgt hbbmcdx hbclipsm gtwvg hbw32 rddado %{!?_without_nf:hbnf} %{?_with_odbc:hbodbc} %{?_with_curl:hbcurl} %{?_with_ads:rddads} %{?_with_gd:hbgd} %{?_with_pgsql:hbpgsql} %{?_with_mysql:hbmysql}"
export _DEFAULT_BIN_DIR=$HB_BIN_INSTALL
export _DEFAULT_INC_DIR=$HB_INC_INSTALL
@@ -159,6 +159,7 @@ export HB_LIB_INSTALL=$RPM_BUILD_ROOT/$HB_LIB_INSTALL
export HB_TOOLS_PREF=%{hb_pref}
mkdir -p $HB_BIN_INSTALL
mkdir -p $HB_INC_INSTALL
mkdir -p $HB_LIB_INSTALL
make -r -i install
@@ -173,7 +174,6 @@ ${CCPREFIX}strip --strip-debug $HB_LIB_INSTALL/*
# remove unused files
rm -fR ${HB_BIN_INSTALL}/{harbour,hbpp,hbdoc,hbdot,hbmake,hbrun,hbtest,hbverfix,hbpptest}.exe
rm -fR $HB_INC_INSTALL
# Create a README file for people using this RPM.
cat > doc/%{readme} <<EOF
@@ -301,6 +301,8 @@ rm -fR $RPM_BUILD_ROOT
%{_bindir}/%{hb_pref}mk
%defattr(644,root,root,755)
%dir %{_includedir}/%{name}
%{_includedir}/%{name}/*
%dir %{_libdir}/%{name}
%{_libdir}/%{name}/libhbcpage.a
%{_libdir}/%{name}/libhbcommon.a

View File

@@ -15,11 +15,11 @@
# --with static - link all binaries with static libs
# --with mysql - build mysql lib
# --with pgsql - build pgsql lib
# --with pgsql4 - build pgsql4 lib
# --with gd - build gd lib
# --with allegro - build GTALLEG - Allegro based GT driver
# --with ads - build ADS RDD
# --with odbc - build odbc lib
# --with curl - build CURL lib
# --without nf - do not build nanforum lib
# --without gpllib - do not build libs which needs GPL 3-rd party code
# --without x11 - do not build GTXWC
@@ -78,9 +78,8 @@
%define hb_ldir export HB_LIB_INSTALL=%{_libdir}/%{name}
%define hb_opt export HB_GTALLEG=%{?_with_allegro:yes}
%define hb_cmrc export HB_COMMERCE=%{?_without_gpllib:yes}
%define hb_ctrb export HB_CONTRIBLIBS="%{?_with_odbc:hbodbc} %{?_with_ads:rddads} %{?_with_gd:hbgd} %{?_with_pgsql:hbpgsql} %{?_with_mysql:hbmysql}"
%define hb_ctrb export HB_CONTRIBLIBS="hbct hbmzip hbtip xhb hbbtree hbmisc hbvpdf hbgt hbbmcdx hbclipsm %{!?_without_nf:hbnf} %{?_with_odbc:hbodbc} %{?_with_curl:hbcurl} %{?_with_ads:rddads} %{?_with_gd:hbgd} %{?_with_pgsql:hbpgsql} %{?_with_mysql:hbmysql}"
%define hb_env %{hb_arch} ; %{hb_cc} ; %{hb_cflag} ; %{hb_lflag} ; %{hb_mt} ; %{hb_gt} ; %{hb_defgt} ; %{hb_gpm} ; %{hb_sln} ; %{hb_x11} ; %{hb_bdir} ; %{hb_idir} ; %{hb_ldir} ; %{hb_opt} ; %{hb_ctrb} ; %{hb_cmrc}
%define hb_host www.harbour-project.org
%define readme README.RPM
######################################################################
@@ -243,6 +242,95 @@ A(z) %{dname} egy Clipper kompatibilis ford
Ez a csomag kiegészítõ (contrib) könyvtárakat biztosít
statikus szerkesztéshez.
## odbc library
%{?_with_odbc:%package odbc}
%{?_with_odbc:Summary: ODBC libarary for %{dname} compiler}
%{?_with_odbc:Summary(pl): Bilioteka ODBC dla kompilatora %{dname}}
%{?_with_odbc:Group: Development/Languages}
%{?_with_odbc:Requires: %{name} = %{?epoch:%{epoch}:}%{version}-%{release}}
%{?_with_odbc:%description odbc}
%{?_with_odbc:%{dname} is a Clipper compatible compiler.}
%{?_with_odbc:This package provides %{dname} ODBC library for program linking.}
%{?_with_odbc:%description -l pl odbc}
%{?_with_odbc:%{dname} to kompatybilny z jêzykiem CA-Clipper kompilator.}
%{?_with_odbc:Ten pakiet udostêpnia statyczn± biliotekê ODBC dla kompilatora %{dname}.}
## CURL library
%{?_with_curl:%package curl}
%{?_with_curl:Summary: CURL libarary for %{dname} compiler}
%{?_with_curl:Summary(pl): Bilioteka CURL dla kompilatora %{dname}}
%{?_with_curl:Group: Development/Languages}
%{?_with_curl:Requires: %{name} = %{?epoch:%{epoch}:}%{version}-%{release}}
%{?_with_curl:%description curl}
%{?_with_curl:%{dname} is a Clipper compatible compiler.}
%{?_with_curl:This package provides %{dname} CURL library for program linking.}
%{?_with_curl:%description -l pl curl}
%{?_with_curl:%{dname} to kompatybilny z jêzykiem CA-Clipper kompilator.}
%{?_with_curl:Ten pakiet udostêpnia statyczn± biliotekê CURL dla kompilatora %{dname}.}
## ADS RDD
%{?_with_ads:%package ads}
%{?_with_ads:Summary: ADS RDDs for %{dname} compiler}
%{?_with_ads:Summary(pl): Bilioteka sterowników (RDDs) ADS dla kompilatora %{dname}}
%{?_with_ads:Group: Development/Languages}
%{?_with_ads:Requires: %{name} = %{?epoch:%{epoch}:}%{version}-%{release}}
%{?_with_ads:%description ads}
%{?_with_ads:%{dname} is a Clipper compatible compiler.}
%{?_with_ads:This package provides %{dname} ADS RDDs for program linking.}
%{?_with_ads:%description -l pl ads}
%{?_with_ads:%{dname} to kompatybilny z jêzykiem CA-Clipper kompilator.}
%{?_with_ads:Ten pakiet udostêpnia sterowniki (RDD) ADS dla kompilatora %{dname}.}
## mysql library
%{?_with_mysql:%package mysql}
%{?_with_mysql:Summary: MYSQL libarary for %{dname} compiler}
%{?_with_mysql:Summary(pl): Bilioteka MYSQL dla kompilatora %{dname}}
%{?_with_mysql:Group: Development/Languages}
%{?_with_mysql:Requires: %{name} = %{?epoch:%{epoch}:}%{version}-%{release}}
%{?_with_mysql:%description mysql}
%{?_with_mysql:%{dname} is a Clipper compatible compiler.}
%{?_with_mysql:This package provides %{dname} MYSQL library for program linking.}
%{?_with_mysql:%description -l pl mysql}
%{?_with_mysql:%{dname} to kompatybilny z jêzykiem CA-Clipper kompilator.}
%{?_with_mysql:Ten pakiet udostêpnia statyczn± biliotekê MYSQL dla kompilatora %{dname}.}
## pgsql library
%{?_with_pgsql:%package pgsql}
%{?_with_pgsql:Summary: PGSQL libarary for %{dname} compiler}
%{?_with_pgsql:Summary(pl): Bilioteka PGSQL dla kompilatora %{dname}}
%{?_with_pgsql:Group: Development/Languages}
%{?_with_pgsql:Requires: %{name} = %{?epoch:%{epoch}:}%{version}-%{release}}
%{?_with_pgsql:%description pgsql}
%{?_with_pgsql:%{dname} is a Clipper compatible compiler.}
%{?_with_pgsql:This package provides %{dname} PGSQL library for program linking.}
%{?_with_pgsql:%description -l pl pgsql}
%{?_with_pgsql:%{dname} to kompatybilny z jêzykiem CA-Clipper kompilator.}
%{?_with_pgsql:Ten pakiet udostêpnia statyczn± biliotekê PGSQL dla kompilatora %{dname}.}
## gd library
%{?_with_gd:%package gd}
%{?_with_gd:Summary: GD libarary for %{dname} compiler}
%{?_with_gd:Summary(pl): Bilioteka GD dla kompilatora %{dname}}
%{?_with_gd:Group: Development/Languages}
%{?_with_gd:Requires: %{name} = %{?epoch:%{epoch}:}%{version}-%{release}}
%{?_with_gd:%description gd}
%{?_with_gd:%{dname} is a Clipper compatible compiler.}
%{?_with_gd:This package provides %{dname} GD library for program linking.}
%{?_with_gd:%description -l pl gd}
%{?_with_gd:%{dname} to kompatybilny z jêzykiem CA-Clipper kompilator.}
%{?_with_gd:Ten pakiet udostêpnia statyczn± biliotekê GD dla kompilatora %{dname}.}
######################################################################
## Preperation.
@@ -264,10 +352,6 @@ case "`uname -m`" in
;;
esac
[ "%{?_with_odbc:1}" ] || rm -fR contrib/hbodbc
[ "%{?_with_ads:1}" ] || rm -fR contrib/rddads
[ "%{?_without_nf:1}" ] && rm -fR contrib/hbnf
make -r
######################################################################
@@ -298,10 +382,7 @@ mkdir -p $HB_LIB_INSTALL
make -r -i install
[ "%{?_with_odbc:1}" ] || rm -f $HB_LIB_INSTALL/libhbodbc.a
[ "%{?_with_allegro:1}" ] || rm -f $HB_LIB_INSTALL/libgtalleg.a
[ "%{?_with_ads:1}" ] || rm -f $HB_LIB_INSTALL/librddads.a
[ "%{?_without_nf:1}" ] && rm -f $HB_LIB_INSTALL/libhbnf.a
[ "%{?_without_gtsln:1}" ] && rm -f $HB_LIB_INSTALL/libgtsln.a
# Keep the size of the binaries to a minimim.
@@ -325,7 +406,7 @@ EOF
if [ "%{!?_with_static:1}" ]
then
unset HB_GTALLEG
export L_USR="${CC_L_USR} -L${HB_LIB_INSTALL} -l%{name} -lncurses %{!?_without_gtsln:-lslang} %{!?_without_gpm:-lgpm} %{!?_without_x11:-L/usr/X11R6/%{_lib} -lX11} %{?_with_pgsql4:/usr/lib/libpq.so.4} %{?_with_pgsql:-lpq} %{?_with_gd:-lgd}"
export L_USR="${CC_L_USR} -L${HB_LIB_INSTALL} -l%{name} -lncurses %{!?_without_gtsln:-lslang} %{!?_without_gpm:-lgpm} %{!?_without_x11:-L/usr/X11R6/%{_lib} -lX11}"
export PRG_USR="\"-D_DEFAULT_INC_DIR='${_DEFAULT_INC_DIR}'\" ${PRG_USR}"
for utl in hbmake hbrun hbdot hbdoc
@@ -536,12 +617,6 @@ rm -rf $RPM_BUILD_ROOT
%defattr(644,root,root,755)
%dir %{_libdir}/%{name}
%{!?_without_nf: %{_libdir}/%{name}/libhbnf.a}
%{?_with_ads: %{_libdir}/%{name}/librddads.a}
%{?_with_odbc: %{_libdir}/%{name}/libhbodbc.a}
%{?_with_mysql: %{_libdir}/%{name}/libhbmysql.a}
%{?_with_pgsql: %{_libdir}/%{name}/libhbpgsql.a}
%{?_with_pgsql4: %{_libdir}/%{name}/libhbpgsql.a}
%{?_with_gd: %{_libdir}/%{name}/libhbgd.a}
%{_libdir}/%{name}/libhbbtree.a
%{_libdir}/%{name}/libhbmisc.a
%{_libdir}/%{name}/libhbmzip.a
@@ -559,6 +634,36 @@ rm -rf $RPM_BUILD_ROOT
%{_libdir}/%{name}/*.so
%{_libdir}/*.so
%{?_with_odbc:%files odbc}
%{?_with_odbc:%defattr(644,root,root,755)}
%{?_with_odbc:%dir %{_libdir}/%{name}}
%{?_with_odbc:%{_libdir}/%{name}/libhbodbc.a}
%{?_with_curl:%files curl}
%{?_with_curl:%defattr(644,root,root,755)}
%{?_with_curl:%dir %{_libdir}/%{name}}
%{?_with_curl:%{_libdir}/%{name}/libhbcurl.a}
%{?_with_ads:%files ads}
%{?_with_ads:%defattr(644,root,root,755)}
%{?_with_ads:%dir %{_libdir}/%{name}}
%{?_with_ads:%{_libdir}/%{name}/librddads.a}
%{?_with_mysql:%files mysql}
%{?_with_mysql:%defattr(644,root,root,755)}
%{?_with_mysql:%dir %{_libdir}/%{name}}
%{?_with_mysql:%{_libdir}/%{name}/libhbmysql.a}
%{?_with_pgsql:%files pgsql}
%{?_with_pgsql:%defattr(644,root,root,755)}
%{?_with_pgsql:%dir %{_libdir}/%{name}}
%{?_with_pgsql:%{_libdir}/%{name}/libhbpgsql.a}
%{?_with_gd:%files gd}
%{?_with_gd:%defattr(644,root,root,755)}
%{?_with_gd:%dir %{_libdir}/%{name}}
%{?_with_gd:%{_libdir}/%{name}/libhbgd.a}
######################################################################
## Spec file Changelog.
######################################################################

View File

@@ -120,8 +120,6 @@
int timeout;
int timelimit;
PHB_ITEM caPeriodic;
int iSndBufSize;
int iRcvBufSize;
} HB_SOCKET_STRUCT;
#define HB_PARSOCKET( n ) ( ( HB_SOCKET_STRUCT * ) hb_parptrGC( hb_inetSocketFinalize, n ) )
@@ -470,32 +468,6 @@ static int hb_socketConnect( HB_SOCKET_STRUCT *Socket )
{
HB_SOCKET_SET_ERROR2( Socket, -1, "Timeout" );
}
/*
* Read real buffer sizes from socket
*/
{
int value;
socklen_t len = sizeof(value);
if( getsockopt( Socket->com, SOL_SOCKET, SO_SNDBUF, (char *) &value, &len ) != SOCKET_ERROR )
{
Socket->iSndBufSize = value;
if( getsockopt( Socket->com, SOL_SOCKET, SO_RCVBUF, (char *) &value, &len ) != SOCKET_ERROR )
{
Socket->iRcvBufSize = value;
}
else
{
Socket->iRcvBufSize = 1400;
}
}
else
{
Socket->iSndBufSize = 1400;
Socket->iRcvBufSize = 1400;
}
}
}
}
@@ -807,64 +779,63 @@ HB_FUNC( HB_INETCLEARPERIODCALLBACK )
HB_FUNC( HB_INETGETSNDBUFSIZE )
{
HB_SOCKET_STRUCT *Socket = HB_PARSOCKET( 1 );
int value;
socklen_t len = sizeof( value );
if( Socket == NULL )
{
hb_errRT_BASE_SubstR( EG_ARG, 3012, NULL, "HB_INETGETSNDBUFSIZE", HB_ERR_ARGS_BASEPARAMS );
else
{
int value;
socklen_t len = sizeof( value );
getsockopt( Socket->com, SOL_SOCKET, SO_SNDBUF, ( void *) &value, &len );
hb_retni( value );
}
getsockopt( Socket->com, SOL_SOCKET, SO_SNDBUF, (char *) &value, &len );
Socket->iSndBufSize = value;
hb_retni( value );
}
HB_FUNC( HB_INETGETRCVBUFSIZE )
{
HB_SOCKET_STRUCT *Socket = HB_PARSOCKET( 1 );
int value;
socklen_t len = sizeof( value );
if( Socket == NULL )
hb_errRT_BASE_SubstR( EG_ARG, 3012, NULL, "HB_INETGETRCVBUFSIZE", HB_ERR_ARGS_BASEPARAMS );
getsockopt( Socket->com, SOL_SOCKET, SO_RCVBUF, (char *) &value, &len );
Socket->iRcvBufSize = value;
hb_retni( value );
else
{
int value;
socklen_t len = sizeof( value );
getsockopt( Socket->com, SOL_SOCKET, SO_RCVBUF, ( void * ) &value, &len );
hb_retni( value );
}
}
HB_FUNC( HB_INETSETSNDBUFSIZE )
{
HB_SOCKET_STRUCT *Socket = HB_PARSOCKET( 1 );
int value;
if( Socket == NULL )
hb_errRT_BASE_SubstR( EG_ARG, 3012, NULL, "HB_INETSETSNDBUFSIZE", HB_ERR_ARGS_BASEPARAMS );
value = hb_parni( 2 );
setsockopt( Socket->com, SOL_SOCKET, SO_SNDBUF, (char *) &value, sizeof( value ) );
Socket->iSndBufSize = value;
hb_retni( value );
else
{
int value = hb_parni( 2 );
setsockopt( Socket->com, SOL_SOCKET, SO_SNDBUF, ( void * ) &value, sizeof( value ) );
hb_retni( value );
}
}
HB_FUNC( HB_INETSETRCVBUFSIZE )
{
HB_SOCKET_STRUCT *Socket = HB_PARSOCKET( 1 );
int value;
if( Socket == NULL )
hb_errRT_BASE_SubstR( EG_ARG, 3012, NULL, "HB_INETSETRCVBUFSIZE", HB_ERR_ARGS_BASEPARAMS );
value = hb_parni( 2 );
setsockopt( Socket->com, SOL_SOCKET, SO_RCVBUF, (char *) &value, sizeof( value ) );
Socket->iRcvBufSize = value;
hb_retni( value );
else
{
int value = hb_parni( 2 );
setsockopt( Socket->com, SOL_SOCKET, SO_RCVBUF, ( void * ) &value, sizeof( value ) );
hb_retni( value );
}
}
/********************************************************************
* TCP receive and send functions
***/
@@ -873,8 +844,8 @@ static void s_inetRecvInternal( int iMode )
{
HB_SOCKET_STRUCT *Socket = HB_PARSOCKET( 1 );
PHB_ITEM pBuffer = hb_param( 2, HB_IT_STRING );
char *Buffer;
int iLen, iMaxLen, iReceived, iBufferLen;
char *buffer;
int iLen, iMaxLen, iReceived;
int iTimeElapsed;
if( Socket == NULL || pBuffer == NULL || !ISBYREF( 2 ) )
@@ -884,7 +855,7 @@ static void s_inetRecvInternal( int iMode )
}
pBuffer = hb_itemUnShare( pBuffer );
Buffer = hb_itemGetCPtr( pBuffer );
buffer = hb_itemGetCPtr( pBuffer );
iLen = hb_itemGetCLen( pBuffer );
if( ISNIL( 3 ) )
@@ -904,19 +875,9 @@ static void s_inetRecvInternal( int iMode )
do
{
if( iMode == 1 )
{
iBufferLen = ( Socket->iRcvBufSize > iMaxLen - iReceived ) ? iMaxLen - iReceived : Socket->iRcvBufSize;
}
else
{
iBufferLen = iMaxLen;
}
if( hb_selectReadSocket( Socket ) )
{
iLen = recv( Socket->com, Buffer + iReceived, iBufferLen, MSG_NOSIGNAL );
iLen = recv( Socket->com, buffer + iReceived, iMaxLen - iReceived, MSG_NOSIGNAL );
if( iLen > 0 )
iReceived += iLen;
@@ -1094,7 +1055,8 @@ static void s_inetRecvPattern( char *szPattern )
{
HB_SOCKET_SET_ERROR2( Socket, -2, "Connection closed" );
}
else if( iLen == -2 ) {
else if( iLen == -2 )
{
HB_SOCKET_SET_ERROR2( Socket, -1, "Timeout" );
}
else
@@ -1382,7 +1344,7 @@ static void s_inetSendInternal( int iMode )
HB_SOCKET_STRUCT *Socket = HB_PARSOCKET( 1 );
PHB_ITEM pBuffer = hb_param( 2, HB_IT_STRING );
char *Buffer;
int iLen, iSent, iSend, iBufferLen;
int iLen, iSent, iSend;
if( Socket == NULL || pBuffer == NULL )
{
@@ -1398,25 +1360,16 @@ static void s_inetSendInternal( int iMode )
if( iLen < iSend )
iSend = iLen;
}
iSent = 0;
HB_SOCKET_ZERO_ERROR( Socket );
iSent = 0;
iLen = 0;
while( iSent < iSend )
{
if( iMode == 1 )
{
iBufferLen = Socket->iSndBufSize > iSend - iSent ? iSend - iSent : Socket->iSndBufSize;
}
else
{
iBufferLen = iSend;
}
iLen = 0;
if( hb_selectWriteSocket( Socket ) )
iLen = send( Socket->com, Buffer + iSent, iBufferLen, MSG_NOSIGNAL );
iLen = send( Socket->com, Buffer + iSent, iSend - iSent, MSG_NOSIGNAL );
if( iLen > 0 )
{
@@ -1438,14 +1391,7 @@ static void s_inetSendInternal( int iMode )
Socket->count = iSent;
if( iLen > 0 )
{
hb_retni( iSent );
}
else
{
hb_retni( -1 );
}
hb_retni( iLen > 0 ? iSent : -1 );
}
HB_FUNC( HB_INETSEND )

View File

@@ -119,11 +119,15 @@ LONG WINAPI hb_win32ExceptionHandler( struct _EXCEPTION_POINTERS * pExceptionInf
" CS:EIP:%04X:%08X SS:ESP:%04X:%08X\n"
" DS:%04X ES:%04X FS:%04X GS:%04X\n"
" Flags:%08X\n",
dwExceptCode, pExceptionRecord->ExceptionAddress,
pCtx->Eax, pCtx->Ebx, pCtx->Ecx, pCtx->Edx, pCtx->Esi, pCtx->Edi, pCtx->Ebp,
pCtx->SegCs, pCtx->Eip, pCtx->SegSs, pCtx->Esp, pCtx->SegDs, pCtx->SegEs, pCtx->SegFs, pCtx->SegGs,
pCtx->EFlags );
( UINT32 ) dwExceptCode, ( UINT32 ) pExceptionRecord->ExceptionAddress,
( UINT32 ) pCtx->Eax, ( UINT32 ) pCtx->Ebx, ( UINT32 ) pCtx->Ecx,
( UINT32 ) pCtx->Edx, ( UINT32 ) pCtx->Esi, ( UINT32 ) pCtx->Edi,
( UINT32 ) pCtx->Ebp,
( UINT32 ) pCtx->SegCs, ( UINT32 ) pCtx->Eip, ( UINT32 ) pCtx->SegSs,
( UINT32 ) pCtx->Esp, ( UINT32 ) pCtx->SegDs, ( UINT32 ) pCtx->SegEs,
( UINT32 ) pCtx->SegFs, ( UINT32 ) pCtx->SegGs,
( UINT32 ) pCtx->EFlags );
hb_strncat( errmsg, " CS:EIP:", errmsglen );
pc = ( void * ) pCtx->Eip;
for( i = 0; i < 16; i++ )