2011-02-22 13:11 UTC+0100 Viktor Szakats (harbour.01 syenar.hu)

* config/postinst.hbs
  * config/global.mk
  * config/bin.mk
  * config/darwin/gcc.mk
  * config/darwin/icc.mk
  * config/darwin/clang.mk
  * config/linux/gcc.mk
  * config/dyn.mk
  * config/os2/gcc.mk
    * Trying to cleanup the harbour dynlib name situation.
      Here's the plan (which is similar to what's used in contrib area):
         win, wce: harbour-21[-subtype][.dll/.lib]
         dos, os2: harbour[.dll|.???]
         darwin:
            libharbour.2.1.0.dylib
            libharbour.2.1.dylib -> (symlink) [compatibility level]
            libharbour.dylib -> (symlink)
         *nix:
            # libharbour.s?.2.1.0
            # libharbour.s?.2.1 -> (symlink) [soname]
            # libharbour.s? -> (symlink)
    ; It's possible it's broken now. Pls test linux/gcc and darwin.
      'install' was not tested.
    ; TODO: Clean variable usage, there is some redundancy, plus
            some places where current solution is not generic, f.e.
            using HB_VER_*, HB_DYNLIB_BASE vs. HB_DYNLIB_NAME, etc.

  * harbour/src/rtl/fscopy.c
    * Reverted 2011-02-22 12:27 UTC+0200 Mindaugas Kavaliauskas
      which made behavior inconsistent with rest of similar
      functions like FERASE(), FRENAME(), which also don't throw
      RTE if bad parameter is passed, but return FERROR()
      and failure instead.
      Also restored _SET_DEFAULT handling to not create a special case
      compared to __COPYFILE() behavior, ia. some features like
      FXO_SHARELOCK are still enabled while FXO_DEFAULT is not).
      Pls rewrite it using hb_fsOpen()/hb_fsCreate() if that behavior
      bothers you.
This commit is contained in:
Viktor Szakats
2011-02-22 12:13:08 +00:00
parent 899023ede0
commit 251a3a00ee
11 changed files with 142 additions and 69 deletions

View File

@@ -16,16 +16,56 @@
The license applies to all entries newer than 2009-04-28.
*/
2011-02-22 13:11 UTC+0100 Viktor Szakats (harbour.01 syenar.hu)
* config/postinst.hbs
* config/global.mk
* config/bin.mk
* config/darwin/gcc.mk
* config/darwin/icc.mk
* config/darwin/clang.mk
* config/linux/gcc.mk
* config/dyn.mk
* config/os2/gcc.mk
* Trying to cleanup the harbour dynlib name situation.
Here's the plan (which is similar to what's used in contrib area):
win, wce: harbour-21[-subtype][.dll/.lib]
dos, os2: harbour[.dll|.???]
darwin:
libharbour.2.1.0.dylib
libharbour.2.1.dylib -> (symlink) [compatibility level]
libharbour.dylib -> (symlink)
*nix:
# libharbour.s?.2.1.0
# libharbour.s?.2.1 -> (symlink) [soname]
# libharbour.s? -> (symlink)
; It's possible it's broken now. Pls test linux/gcc and darwin.
'install' was not tested.
; TODO: Clean variable usage, there is some redundancy, plus
some places where current solution is not generic, f.e.
using HB_VER_*, HB_DYNLIB_BASE vs. HB_DYNLIB_NAME, etc.
* harbour/src/rtl/fscopy.c
* Reverted 2011-02-22 12:27 UTC+0200 Mindaugas Kavaliauskas
which made behavior inconsistent with rest of similar
functions like FERASE(), FRENAME(), which also don't throw
RTE if bad parameter is passed, but return FERROR()
and failure instead.
Also restored _SET_DEFAULT handling to not create a special case
compared to __COPYFILE() behavior, ia. some features like
FXO_SHARELOCK are still enabled while FXO_DEFAULT is not).
Pls rewrite it using hb_fsOpen()/hb_fsCreate() if that behavior
bothers you.
2011-02-22 12:27 UTC+0200 Mindaugas Kavaliauskas (dbtopas/at/dbtopas.lt)
* harbour/src/rtl/fscopy.c
* added runtime error for HB_FCOPY() bad param types only
* made a function HB_FCOPY() a pure file system function
* made a function HB_FCOPY() a pure file system function
does not dependent on _SET_DEFAULT setting
; File open mode is not altered a avoid any influence on OS/2
behaviour if source and destination files are the same (see
ChangeLog entry at 2009-11-24 16:57). I guess, hb_fsExpOpen()
still can be changed to hb_fsOpen() with FO_EXCLUSIVE,
FO_CREAT, and FO_TRUNC but I'm unable to test it, so, I leave
; File open mode is not altered a avoid any influence on OS/2
behaviour if source and destination files are the same (see
ChangeLog entry at 2009-11-24 16:57). I guess, hb_fsExpOpen()
still can be changed to hb_fsOpen() with FO_EXCLUSIVE,
FO_CREAT, and FO_TRUNC but I'm unable to test it, so, I leave
current code.
2011-02-21 20:15 UTC+0100 Viktor Szakats (harbour.01 syenar.hu)

View File

@@ -45,8 +45,8 @@ ifeq ($(BUILD_SHARED),yes)
endif
endif
HB_LIBS_ST_RDD := $(HB_LIBS_TPL) $(HB_DYNLIB_NAME)
HB_LIBS_MT_RDD := $(HB_LIBS_TPL) $(HB_DYNLIB_NAME)
HB_LIBS_ST_RDD := $(HB_LIBS_TPL) $(HB_DYNLIB_BASE)
HB_LIBS_MT_RDD := $(HB_LIBS_TPL) $(HB_DYNLIB_BASE)
HB_LIBS_ST_NORDD := $(HB_LIBS_ST_RDD)
HB_LIBS_MT_NORDD := $(HB_LIBS_ST_RDD)

View File

@@ -61,6 +61,6 @@ DFLAGS += -dynamic -flat_namespace -undefined warning -multiply_defined suppress
DY_OUT := -o$(subst x,x, )
DLIBS := $(foreach lib,$(HB_USER_LIBS) $(SYSLIBS),-l$(lib))
DY_RULE = $(DY) $(DFLAGS) -install_name "$(LIB_PREF)$(DYNNAME2)$(DYN_EXT)" -compatibility_version $(HB_VER_MAJOR).$(HB_VER_MINOR) -current_version $(HB_VER_MAJOR).$(HB_VER_MINOR).$(HB_VER_RELEASE) $(HB_USER_DFLAGS) $(DY_OUT)$(DYN_DIR)/$@ $^ $(DLIBS) $(DYSTRIP) && $(LN) $(@F) $(DYN_FILE2) && $(LN) $(@F) $(DYN_DIR)/$(DYN_PREF)$(DYNNAME2).$(HB_VER_MAJOR)$(DYN_EXT)
DY_RULE = $(DY) $(DFLAGS) -install_name "$(LIB_PREF)$(DYNNAME2)$(DYN_EXT)" -compatibility_version $(HB_VER_MAJOR).$(HB_VER_MINOR) -current_version $(HB_VER_MAJOR).$(HB_VER_MINOR).$(HB_VER_RELEASE) $(HB_USER_DFLAGS) $(DY_OUT)$(DYN_DIR)/$@ $^ $(DLIBS) $(DYSTRIP) && $(LN) $(@F) $(DYN_FILE2) && $(LN) $(@F) $(DYN_DIR)/$(DYN_PREF)$(DYNNAME2).$(HB_VER_MAJOR).$(HB_VER_MINOR)$(DYN_EXT)
include $(TOP)$(ROOT)config/rules.mk

View File

@@ -65,6 +65,6 @@ DFLAGS += -dynamic -flat_namespace -undefined warning -multiply_defined suppress
DY_OUT := -o$(subst x,x, )
DLIBS := $(foreach lib,$(HB_USER_LIBS) $(SYSLIBS),-l$(lib))
DY_RULE = $(DY) $(DFLAGS) -install_name "$(LIB_PREF)$(DYNNAME2)$(DYN_EXT)" -compatibility_version $(HB_VER_MAJOR).$(HB_VER_MINOR) -current_version $(HB_VER_MAJOR).$(HB_VER_MINOR).$(HB_VER_RELEASE) $(HB_USER_DFLAGS) $(DY_OUT)$(DYN_DIR)/$@ $^ $(DLIBS) $(DYSTRIP) && $(LN) $(@F) $(DYN_FILE2) && $(LN) $(@F) $(DYN_DIR)/$(DYN_PREF)$(DYNNAME2).$(HB_VER_MAJOR)$(DYN_EXT)
DY_RULE = $(DY) $(DFLAGS) -install_name "$(LIB_PREF)$(DYNNAME2)$(DYN_EXT)" -compatibility_version $(HB_VER_MAJOR).$(HB_VER_MINOR) -current_version $(HB_VER_MAJOR).$(HB_VER_MINOR).$(HB_VER_RELEASE) $(HB_USER_DFLAGS) $(DY_OUT)$(DYN_DIR)/$@ $^ $(DLIBS) $(DYSTRIP) && $(LN) $(@F) $(DYN_FILE2) && $(LN) $(@F) $(DYN_DIR)/$(DYN_PREF)$(DYNNAME2).$(HB_VER_MAJOR).$(HB_VER_MINOR)$(DYN_EXT)
include $(TOP)$(ROOT)config/rules.mk

View File

@@ -58,7 +58,7 @@ define create_dynlib
$(foreach file,$^,$(dynlib_object))
$(DY) $(DFLAGS) -install_name "$(LIB_PREF)$(DYNNAME2)$(DYN_EXT)" -compatibility_version $(HB_VER_MAJOR).$(HB_VER_MINOR) -current_version $(HB_VER_MAJOR).$(HB_VER_MINOR).$(HB_VER_RELEASE) $(HB_USER_DFLAGS) $(DY_OUT)$(DYN_DIR)/$@ -filelist __dyn__.tmp $(DLIBS) $(DYSTRIP)
$(LN) $(@F) $(DYN_FILE2)
$(LN) $(@F) $(DYN_DIR)/$(DYN_PREF)$(DYNNAME2).$(HB_VER_MAJOR)$(DYN_EXT)
$(LN) $(@F) $(DYN_DIR)/$(DYN_PREF)$(DYNNAME2).$(HB_VER_MAJOR).$(HB_VER_MINOR)$(DYN_EXT)
endef
DY_RULE = $(create_dynlib)

View File

@@ -83,7 +83,7 @@ IMP_FILE :=
ifneq ($(HB_BUILD_DYN),no)
ifneq ($(DY_RULE),)
DYN_NAME := $(DYN_PREF)$(DYNNAME)$(DYN_EXT)
DYN_NAME := $(DYN_PREF)$(DYNNAME)$(DYN_EXT)$(HB_DYNLIB_PEXT)
DYN_FILE := $(DYN_DIR)/$(DYN_NAME)
DYN_NAME2 := $(DYN_PREF)$(DYNNAME2)$(DYN_EXT)
DYN_FILE2 := $(DYN_DIR)/$(DYN_NAME2)

View File

@@ -1747,57 +1747,84 @@ endif
ifeq ($(HB_INIT_DONE),)
ifneq ($(HB_BUILD_DYN),no)
ifeq ($(HB_PLATFORM_UNIX),)
HB_DYN_VER := $(HB_VER_MAJOR)$(HB_VER_MINOR)
else
HB_DYN_VER := $(HB_VER_MAJOR).$(HB_VER_MINOR).$(HB_VER_RELEASE)
endif
HB_DYNLIB_POSC :=
HB_DYNLIB_PEXC :=
ifeq ($(HB_PLATFORM),darwin)
DYNNAME_POST := .$(HB_DYN_VER)
ifneq ($(filter $(HB_PLATFORM),win wce),)
# harbour-xy[-subtype][.dll|.lib]
HB_DYNLIB_POST := -$(HB_VER_MAJOR)$(HB_VER_MINOR)
HB_DYNLIB_PEXT :=
ifeq ($(HB_PLATFORM),win)
ifeq ($(HB_COMPILER),bcc)
HB_DYNLIB_POST := $(HB_DYNLIB_POST)-bcc
else
ifeq ($(HB_CPU),x86_64)
HB_DYNLIB_POST := $(HB_DYNLIB_POST)-x64
else
ifeq ($(HB_CPU),ia64)
HB_DYNLIB_POST := $(HB_DYNLIB_POST)-ia64
endif
endif
endif
else
ifeq ($(HB_PLATFORM),wce)
HB_DYNLIB_POST := $(HB_DYNLIB_POST)-wce
ifeq ($(HB_CPU),arm)
HB_DYNLIB_POST := $(HB_DYNLIB_POST)-arm
else
ifeq ($(HB_CPU),x86)
HB_DYNLIB_POST := $(HB_DYNLIB_POST)-x86
else
ifeq ($(HB_CPU),mips)
HB_DYNLIB_POST := $(HB_DYNLIB_POST)-mips
else
ifeq ($(HB_CPU),sh)
HB_DYNLIB_POST := $(HB_DYNLIB_POST)-sh
endif
endif
endif
endif
endif
endif
else
ifneq ($(filter $(HB_PLATFORM),dos os2),)
DYNNAME_POST :=
# harbour[.dll|.???]
HB_DYNLIB_POST :=
HB_DYNLIB_PEXT :=
else
DYNNAME_POST := -$(HB_DYN_VER)
HB_DYN_VERCPT := $(HB_VER_MAJOR).$(HB_VER_MINOR)
HB_DYN_VER := $(HB_VER_MAJOR).$(HB_VER_MINOR).$(HB_VER_RELEASE)
ifeq ($(HB_PLATFORM),darwin)
# libharbour.2.1.0.dylib
# libharbour.2.1.dylib ->
# libharbour.dylib ->
HB_DYNLIB_POST := .$(HB_DYN_VER)
HB_DYNLIB_PEXT :=
HB_DYNLIB_POSC := .$(HB_DYN_VERCPT)
HB_DYNLIB_PEXC :=
else
# libharbour.s?.2.1.0
# libharbour.s?.2.1 ->
# libharbour.s? ->
HB_DYNLIB_POST :=
HB_DYNLIB_PEXT := .$(HB_DYN_VER)
HB_DYNLIB_POSC :=
HB_DYNLIB_PEXC := .$(HB_DYN_VERCPT)
endif
endif
endif
ifeq ($(HB_PLATFORM),win)
ifeq ($(HB_COMPILER),bcc)
DYNNAME_POST := $(DYNNAME_POST)-bcc
else
ifeq ($(HB_CPU),x86_64)
DYNNAME_POST := $(DYNNAME_POST)-x64
else
ifeq ($(HB_CPU),ia64)
DYNNAME_POST := $(DYNNAME_POST)-ia64
endif
endif
endif
else
ifeq ($(HB_PLATFORM),wce)
DYNNAME_POST := $(DYNNAME_POST)-wce
ifeq ($(HB_CPU),arm)
DYNNAME_POST := $(DYNNAME_POST)-arm
else
ifeq ($(HB_CPU),x86)
DYNNAME_POST := $(DYNNAME_POST)-x86
else
ifeq ($(HB_CPU),mips)
DYNNAME_POST := $(DYNNAME_POST)-mips
else
ifeq ($(HB_CPU),sh)
DYNNAME_POST := $(DYNNAME_POST)-sh
endif
endif
endif
endif
endif
endif
export HB_DYNLIB_POST
export HB_DYNLIB_PEXT
export HB_DYNLIB_POSC
export HB_DYNLIB_PEXC
HB_DYNLIB_BASE := harbour
HB_DYNLIB_NAME := $(HB_DYNLIB_BASE)$(DYNNAME_POST)
HB_DYNLIB_NAME := $(HB_DYNLIB_BASE)$(HB_DYNLIB_POST)
export HB_DYNLIB_BASE
export HB_DYNLIB_NAME
@@ -1808,7 +1835,7 @@ ifeq ($(HB_INIT_DONE),)
else
HB_DYNLIB_BASE_2ND := harbourst
endif
HB_DYNLIB_NAME_2ND := $(HB_DYNLIB_BASE_2ND)$(DYNNAME_POST)
HB_DYNLIB_NAME_2ND := $(HB_DYNLIB_BASE_2ND)$(HB_DYNLIB_POST)
export HB_DYNLIB_BASE_2ND
export HB_DYNLIB_NAME_2ND

View File

@@ -55,6 +55,6 @@ DFLAGS += -shared $(LIBPATHS)
DY_OUT := -o$(subst x,x, )
DLIBS := $(foreach lib,$(HB_USER_LIBS) $(SYSLIBS),-l$(lib))
DY_RULE = $(DY) $(DFLAGS) -Wl,-soname,$(LIB_PREF)$(DYNNAME2)$(DYN_EXT).$(HB_VER_MAJOR).$(HB_VER_MINOR) $(HB_USER_DFLAGS) $(DY_OUT)$(DYN_DIR)/$@ $^ $(DLIBS) $(DYSTRIP) && $(LN) $(@F) $(DYN_FILE2)
DY_RULE = $(DY) $(DFLAGS) -Wl,-soname,$(DYN_PREF)$(DYNNAME2)$(DYN_EXT).$(HB_VER_MAJOR).$(HB_VER_MINOR) $(HB_USER_DFLAGS) $(DY_OUT)$(DYN_DIR)/$@ $^ $(DLIBS) $(DYSTRIP) && $(LN) $(@F) $(DYN_FILE2) && $(LN) $(@F) $(DYN_DIR)/$(DYN_PREF)$(DYNNAME2)$(DYN_EXT).$(HB_VER_MAJOR).$(HB_VER_MINOR)
include $(TOP)$(ROOT)config/rules.mk

View File

@@ -130,7 +130,7 @@ endef
define create_dynlib
$(if $(wildcard __dyn__.tmp),@$(RM) __dyn__.tmp,)
$(if $(wildcard __dyn__.def),@$(RM) __dyn__.def,)
@$(ECHO) $(ECHOQUOTE)LIBRARY $(DYNNAME) INITINSTANCE TERMINSTANCE$(ECHOQUOTE) >> __dyn__.def
@$(ECHO) $(ECHOQUOTE)LIBRARY $(DYNNAME2) INITINSTANCE TERMINSTANCE$(ECHOQUOTE) >> __dyn__.def
@$(ECHO) $(ECHOQUOTE)PROTMODE$(ECHOQUOTE) >> __dyn__.def
@$(ECHO) $(ECHOQUOTE)CODE PRELOAD MOVEABLE DISCARDABLE$(ECHOQUOTE) >> __dyn__.def
@$(ECHO) $(ECHOQUOTE)DATA PRELOAD MOVEABLE MULTIPLE NONSHARED$(ECHOQUOTE) >> __dyn__.def

View File

@@ -35,7 +35,8 @@ PROCEDURE Main( ... )
LOCAL cSH_Script
LOCAL nAttr
LOCAL cDynVersioned
LOCAL cDynVersionFull
LOCAL cDynVersionComp
LOCAL cDynVersionless
IF Empty( GetEnvC( "HB_PLATFORM" ) ) .OR. ;
@@ -136,10 +137,12 @@ PROCEDURE Main( ... )
OutStd( "! Creating dynamic lib symlinks..." + hb_eol() )
cDynVersioned := GetEnvC( "HB_DYNLIB_PREF" ) + GetEnvC( "HB_DYNLIB_NAME" ) + GetEnvC( "HB_DYNLIB_EXT" )
cDynVersionless := GetEnvC( "HB_DYNLIB_PREF" ) + GetEnvC( "HB_DYNLIB_BASE" ) + GetEnvC( "HB_DYNLIB_EXT" )
cDynVersionFull := GetEnvC( "HB_DYNLIB_PREF" ) + GetEnvC( "HB_DYNLIB_BASE" ) + GetEnvC( "HB_DYNLIB_POST" ) + GetEnvC( "HB_DYNLIB_EXT" ) + GetEnvC( "HB_DYNLIB_PEXT" )
cDynVersionComp := GetEnvC( "HB_DYNLIB_PREF" ) + GetEnvC( "HB_DYNLIB_BASE" ) + GetEnvC( "HB_DYNLIB_POSC" ) + GetEnvC( "HB_DYNLIB_EXT" ) + GetEnvC( "HB_DYNLIB_PEXC" )
cDynVersionless := GetEnvC( "HB_DYNLIB_PREF" ) + GetEnvC( "HB_DYNLIB_BASE" ) + GetEnvC( "HB_DYNLIB_EXT" )
mk_hb_FLinkSym( cDynVersioned, PathSepToSelf( GetEnvC( "HB_INSTALL_DYN" ) ) + hb_ps() + cDynVersionless )
mk_hb_FLinkSym( cDynVersionFull, PathSepToSelf( GetEnvC( "HB_INSTALL_DYN" ) ) + hb_ps() + cDynVersionComp )
mk_hb_FLinkSym( cDynVersionFull, PathSepToSelf( GetEnvC( "HB_INSTALL_DYN" ) ) + hb_ps() + cDynVersionless )
DO CASE
CASE EndsWith( GetEnvC( "HB_INSTALL_DYN" ), "/usr/lib/harbour" ) .OR. ;
@@ -147,8 +150,9 @@ PROCEDURE Main( ... )
EndsWith( GetEnvC( "HB_INSTALL_DYN" ), "/usr/local/lib/harbour" ) .OR. ;
EndsWith( GetEnvC( "HB_INSTALL_DYN" ), "/usr/local/lib64/harbour" )
mk_hb_FLinkSym( "harbour" + hb_ps() + cDynVersioned, PathSepToSelf( GetEnvC( "HB_INSTALL_DYN" ) ) + hb_ps() + ".." + hb_ps() + cDynVersionless )
mk_hb_FLinkSym( "harbour" + hb_ps() + cDynVersioned, PathSepToSelf( GetEnvC( "HB_INSTALL_DYN" ) ) + hb_ps() + ".." + hb_ps() + cDynVersioned )
mk_hb_FLinkSym( "harbour" + hb_ps() + cDynVersionFull, PathSepToSelf( GetEnvC( "HB_INSTALL_DYN" ) ) + hb_ps() + ".." + hb_ps() + cDynVersionless )
mk_hb_FLinkSym( "harbour" + hb_ps() + cDynVersionFull, PathSepToSelf( GetEnvC( "HB_INSTALL_DYN" ) ) + hb_ps() + ".." + hb_ps() + cDynVersionComp )
mk_hb_FLinkSym( "harbour" + hb_ps() + cDynVersionFull, PathSepToSelf( GetEnvC( "HB_INSTALL_DYN" ) ) + hb_ps() + ".." + hb_ps() + cDynVersionFull )
CASE GetEnvC( "HB_INSTALL_DYN" ) == "/usr/local/harbour/lib"
/* TOFIX: Rewrite this in .prg */
@@ -464,10 +468,10 @@ STATIC FUNCTION mk_extern_core()
LOCAL aExtern
IF GetEnvC( "HB_REBUILD_EXTERN" ) == "yes" .AND. ;
! Empty( GetEnvC( "HB_DYNLIB_NAME" ) )
! Empty( GetEnvC( "HB_DYNLIB_BASE" ) )
/* TOFIX: Use list of libs instead of dynamic lib */
IF ( aExtern := __hb_extern_get_list( PathSepToSelf( GetEnvC( "HB_DYNLIB_DIR" ) ) + hb_ps() + GetEnvC( "HB_DYNLIB_PREF" ) + GetEnvC( "HB_DYNLIB_NAME" ) + GetEnvC( "HB_DYNLIB_EXT" ) ) ) != NIL
IF ( aExtern := __hb_extern_get_list( PathSepToSelf( GetEnvC( "HB_DYNLIB_DIR" ) ) + hb_ps() + GetEnvC( "HB_DYNLIB_PREF" ) + GetEnvC( "HB_DYNLIB_BASE" ) + GetEnvC( "HB_DYNLIB_POST" ) + GetEnvC( "HB_DYNLIB_EXT" ) + GetEnvC( "HB_DYNLIB_PEXT" ) ) ) != NIL
OutStd( "! Generating core extern headers..." + hb_eol() )

View File

@@ -51,7 +51,6 @@
*/
#include "hbapi.h"
#include "hbapierr.h"
#include "hbapifs.h"
#if defined( HB_OS_UNIX )
@@ -68,9 +67,9 @@ HB_BOOL hb_fsCopy( const char * pszSource, const char * pszDest )
HB_FHANDLE fhndSource;
HB_FHANDLE fhndDest;
if( ( fhndSource = hb_fsExtOpen( pszSource, NULL, FO_READ | FXO_SHARELOCK, NULL, NULL ) ) != FS_ERROR )
if( ( fhndSource = hb_fsExtOpen( pszSource, NULL, FO_READ | FXO_DEFAULTS | FXO_SHARELOCK, NULL, NULL ) ) != FS_ERROR )
{
if( ( fhndDest = hb_fsExtOpen( pszDest, NULL, FXO_TRUNCATE | FO_READWRITE | FO_EXCLUSIVE | FXO_SHARELOCK, NULL, NULL ) ) != FS_ERROR )
if( ( fhndDest = hb_fsExtOpen( pszDest, NULL, FXO_TRUNCATE | FO_READWRITE | FO_EXCLUSIVE | FXO_DEFAULTS | FXO_SHARELOCK, NULL, NULL ) ) != FS_ERROR )
{
#if defined( HB_OS_UNIX )
struct stat struFileInfo;
@@ -133,5 +132,8 @@ HB_FUNC( HB_FCOPY )
if( pszSource && pszDest )
hb_retni( hb_fsCopy( pszSource, pszDest ) ? 0 : F_ERROR );
else
hb_errRT_BASE( EG_ARG, 2010, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
{
hb_fsSetFError( 2 /* file not found */ );
hb_retni( F_ERROR );
}
}