From 3db8ee700c8d19db131040af6c35ca72c64d3d16 Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Tue, 22 Feb 2011 17:09:50 +0000 Subject: [PATCH] 2011-02-22 18:06 UTC+0100 Viktor Szakats (harbour.01 syenar.hu) * src/rtl/fscopy.c * Restored open mode. Still waiting for proper fix. * Upped buffer to 65536. * config/qnx/gcc.mk * config/bsd/gcc.mk * config/bsd/clang.mk * config/darwin/gcc.mk * config/darwin/icc.mk * config/darwin/clang.mk * config/linux/gcc.mk * config/linux/clang.mk * config/dyn.mk * config/cygwin/gcc.mk * config/symbian/gcc.mk * Renamed DYN_FILE2/DYN_NAME2 to DYN_FILE/NAME_NVR. (NVR for 'versionless') --- harbour/ChangeLog | 19 +++++++++++++++++++ harbour/config/bsd/clang.mk | 2 +- harbour/config/bsd/gcc.mk | 2 +- harbour/config/cygwin/gcc.mk | 2 +- harbour/config/darwin/clang.mk | 2 +- harbour/config/darwin/gcc.mk | 2 +- harbour/config/darwin/icc.mk | 2 +- harbour/config/dyn.mk | 6 +++--- harbour/config/linux/clang.mk | 2 +- harbour/config/linux/gcc.mk | 2 +- harbour/config/qnx/gcc.mk | 2 +- harbour/config/symbian/gcc.mk | 2 +- harbour/src/rtl/fscopy.c | 6 +++--- 13 files changed, 35 insertions(+), 16 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 0eb1628a32..34208e63de 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -16,6 +16,25 @@ The license applies to all entries newer than 2009-04-28. */ +2011-02-22 18:06 UTC+0100 Viktor Szakats (harbour.01 syenar.hu) + * src/rtl/fscopy.c + * Restored open mode. Still waiting for proper fix. + * Upped buffer to 65536. + + * config/qnx/gcc.mk + * config/bsd/gcc.mk + * config/bsd/clang.mk + * config/darwin/gcc.mk + * config/darwin/icc.mk + * config/darwin/clang.mk + * config/linux/gcc.mk + * config/linux/clang.mk + * config/dyn.mk + * config/cygwin/gcc.mk + * config/symbian/gcc.mk + * Renamed DYN_FILE2/DYN_NAME2 to DYN_FILE/NAME_NVR. + (NVR for 'versionless') + 2011-02-22 16:25 UTC+0100 Viktor Szakats (harbour.01 syenar.hu) * config/linux/gcc.mk * Using central macros for dynlib versions. diff --git a/harbour/config/bsd/clang.mk b/harbour/config/bsd/clang.mk index 40960d1f32..579ffc733d 100644 --- a/harbour/config/bsd/clang.mk +++ b/harbour/config/bsd/clang.mk @@ -60,6 +60,6 @@ DFLAGS += -shared $(LIBPATHS) DY_OUT := -o$(subst x,x, ) DLIBS := $(foreach lib,$(HB_USER_LIBS) $(SYSLIBS),-l$(lib)) -DY_RULE = $(DY) $(DFLAGS) $(HB_USER_DFLAGS) $(DY_OUT)$(DYN_DIR)/$@ $^ $(DLIBS) $(DYSTRIP) && $(LN) $(@F) $(DYN_FILE2) +DY_RULE = $(DY) $(DFLAGS) $(HB_USER_DFLAGS) $(DY_OUT)$(DYN_DIR)/$@ $^ $(DLIBS) $(DYSTRIP) && $(LN) $(@F) $(DYN_FILE_NVR) include $(TOP)$(ROOT)config/rules.mk diff --git a/harbour/config/bsd/gcc.mk b/harbour/config/bsd/gcc.mk index 6c5abca009..59aa7f9624 100644 --- a/harbour/config/bsd/gcc.mk +++ b/harbour/config/bsd/gcc.mk @@ -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) $(HB_USER_DFLAGS) $(DY_OUT)$(DYN_DIR)/$@ $^ $(DLIBS) $(DYSTRIP) && $(LN) $(@F) $(DYN_FILE2) +DY_RULE = $(DY) $(DFLAGS) $(HB_USER_DFLAGS) $(DY_OUT)$(DYN_DIR)/$@ $^ $(DLIBS) $(DYSTRIP) && $(LN) $(@F) $(DYN_FILE_NVR) include $(TOP)$(ROOT)config/rules.mk diff --git a/harbour/config/cygwin/gcc.mk b/harbour/config/cygwin/gcc.mk index 32fabcaa01..f0b63cdfb4 100644 --- a/harbour/config/cygwin/gcc.mk +++ b/harbour/config/cygwin/gcc.mk @@ -91,7 +91,7 @@ endef define create_dynlib $(if $(wildcard __dyn__.tmp),@$(RM) __dyn__.tmp,) $(foreach file,$^,$(dynlib_object)) - $(DY) $(DFLAGS) $(DY_OUT)$(DYN_DIR)/$@ __dyn__.tmp $(HB_USER_DFLAGS) $(DLIBS) -Wl,--output-def,$(DYN_DIR)/$(basename $@).def,--out-implib,$(IMP_FILE) $(DYSTRIP) && $(LN) $(@F) $(DYN_FILE2) + $(DY) $(DFLAGS) $(DY_OUT)$(DYN_DIR)/$@ __dyn__.tmp $(HB_USER_DFLAGS) $(DLIBS) -Wl,--output-def,$(DYN_DIR)/$(basename $@).def,--out-implib,$(IMP_FILE) $(DYSTRIP) && $(LN) $(@F) $(DYN_FILE_NVR) endef DY_RULE = $(create_dynlib) diff --git a/harbour/config/darwin/clang.mk b/harbour/config/darwin/clang.mk index 638660074a..61989efde2 100644 --- a/harbour/config/darwin/clang.mk +++ b/harbour/config/darwin/clang.mk @@ -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 "$(DYN_PREF)$(DYNNAME)$(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)$(DYNNAME).$(HB_VER_MAJOR).$(HB_VER_MINOR)$(DYN_EXT) +DY_RULE = $(DY) $(DFLAGS) -install_name "$(DYN_PREF)$(DYNNAME)$(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_FILE_NVR) && $(LN) $(@F) $(DYN_DIR)/$(DYN_PREF)$(DYNNAME).$(HB_VER_MAJOR).$(HB_VER_MINOR)$(DYN_EXT) include $(TOP)$(ROOT)config/rules.mk diff --git a/harbour/config/darwin/gcc.mk b/harbour/config/darwin/gcc.mk index 62e99a97f6..993f8b37c6 100644 --- a/harbour/config/darwin/gcc.mk +++ b/harbour/config/darwin/gcc.mk @@ -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 "$(DYN_PREF)$(DYNNAME)$(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)$(DYNNAME).$(HB_VER_MAJOR).$(HB_VER_MINOR)$(DYN_EXT) +DY_RULE = $(DY) $(DFLAGS) -install_name "$(DYN_PREF)$(DYNNAME)$(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_FILE_NVR) && $(LN) $(@F) $(DYN_DIR)/$(DYN_PREF)$(DYNNAME).$(HB_VER_MAJOR).$(HB_VER_MINOR)$(DYN_EXT) include $(TOP)$(ROOT)config/rules.mk diff --git a/harbour/config/darwin/icc.mk b/harbour/config/darwin/icc.mk index 654e89506c..0f83894363 100644 --- a/harbour/config/darwin/icc.mk +++ b/harbour/config/darwin/icc.mk @@ -57,7 +57,7 @@ define create_dynlib $(if $(wildcard __dyn__.tmp),@$(RM) __dyn__.tmp,) $(foreach file,$^,$(dynlib_object)) $(DY) $(DFLAGS) -install_name "$(DYN_PREF)$(DYNNAME)$(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_FILE_NVR) $(LN) $(@F) $(DYN_DIR)/$(DYN_PREF)$(DYNNAME).$(HB_VER_MAJOR).$(HB_VER_MINOR)$(DYN_EXT) endef diff --git a/harbour/config/dyn.mk b/harbour/config/dyn.mk index 5fe515dc1e..a12824d2ca 100644 --- a/harbour/config/dyn.mk +++ b/harbour/config/dyn.mk @@ -86,10 +86,10 @@ ifneq ($(DY_RULE),) DYN_NAME := $(DYN_PREF)$(DYNNAME)$(HB_DYNLIB_POST)$(DYN_EXT)$(HB_DYNLIB_PEXT) DYN_FILE := $(DYN_DIR)/$(DYN_NAME) # for *nix links -DYN_NAME2 := $(DYN_PREF)$(DYNNAME)$(DYN_EXT) +DYN_NAME_NVR := $(DYN_PREF)$(DYNNAME)$(DYN_EXT) DYN_NAME_CPT := $(DYN_PREF)$(DYNNAME)$(HB_DYNLIB_POSC)$(DYN_EXT)$(HB_DYNLIB_PEXC) -DYN_FILE2 := $(DYN_DIR)/$(DYN_NAME2) -DYN_FILE_CPT := $(DYN_DIR)/$(DYN_NAME3) +DYN_FILE_NVR := $(DYN_DIR)/$(DYN_NAME_NVR) +DYN_FILE_CPT := $(DYN_DIR)/$(DYN_NAME_CPT) ifneq ($(IMP_DIR),) IMP_NAME := $(LIB_PREF)$(DYNNAME)$(HB_DYNLIB_POST)$(LIB_EXT)$(HB_DYNLIB_PEXT) diff --git a/harbour/config/linux/clang.mk b/harbour/config/linux/clang.mk index 40960d1f32..579ffc733d 100644 --- a/harbour/config/linux/clang.mk +++ b/harbour/config/linux/clang.mk @@ -60,6 +60,6 @@ DFLAGS += -shared $(LIBPATHS) DY_OUT := -o$(subst x,x, ) DLIBS := $(foreach lib,$(HB_USER_LIBS) $(SYSLIBS),-l$(lib)) -DY_RULE = $(DY) $(DFLAGS) $(HB_USER_DFLAGS) $(DY_OUT)$(DYN_DIR)/$@ $^ $(DLIBS) $(DYSTRIP) && $(LN) $(@F) $(DYN_FILE2) +DY_RULE = $(DY) $(DFLAGS) $(HB_USER_DFLAGS) $(DY_OUT)$(DYN_DIR)/$@ $^ $(DLIBS) $(DYSTRIP) && $(LN) $(@F) $(DYN_FILE_NVR) include $(TOP)$(ROOT)config/rules.mk diff --git a/harbour/config/linux/gcc.mk b/harbour/config/linux/gcc.mk index f41b7e9987..95c9e98f61 100644 --- a/harbour/config/linux/gcc.mk +++ b/harbour/config/linux/gcc.mk @@ -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,$(DYN_PREF)$(DYNNAME)$(DYN_EXT)$(HB_DYNLIB_PEXC) $(HB_USER_DFLAGS) $(DY_OUT)$(DYN_DIR)/$@ $^ $(DLIBS) $(DYSTRIP) && $(LN) $(@F) $(DYN_FILE2) && $(LN) $(@F) $(DYN_DIR)/$(DYN_PREF)$(DYNNAME)$(DYN_EXT)$(HB_DYNLIB_PEXC) +DY_RULE = $(DY) $(DFLAGS) -Wl,-soname,$(DYN_PREF)$(DYNNAME)$(DYN_EXT)$(HB_DYNLIB_PEXC) $(HB_USER_DFLAGS) $(DY_OUT)$(DYN_DIR)/$@ $^ $(DLIBS) $(DYSTRIP) && $(LN) $(@F) $(DYN_FILE_NVR) && $(LN) $(@F) $(DYN_DIR)/$(DYN_PREF)$(DYNNAME)$(DYN_EXT)$(HB_DYNLIB_PEXC) include $(TOP)$(ROOT)config/rules.mk diff --git a/harbour/config/qnx/gcc.mk b/harbour/config/qnx/gcc.mk index c2d10a2e65..7b9112b0a3 100644 --- a/harbour/config/qnx/gcc.mk +++ b/harbour/config/qnx/gcc.mk @@ -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) $(HB_USER_DFLAGS) $(DY_OUT)$(DYN_DIR)/$@ $^ $(DLIBS) $(DYSTRIP) && $(LN) $(@F) $(DYN_FILE2) +DY_RULE = $(DY) $(DFLAGS) $(HB_USER_DFLAGS) $(DY_OUT)$(DYN_DIR)/$@ $^ $(DLIBS) $(DYSTRIP) && $(LN) $(@F) $(DYN_FILE_NVR) include $(TOP)$(ROOT)config/rules.mk diff --git a/harbour/config/symbian/gcc.mk b/harbour/config/symbian/gcc.mk index 93bde570cb..50978a8853 100644 --- a/harbour/config/symbian/gcc.mk +++ b/harbour/config/symbian/gcc.mk @@ -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) $(HB_USER_DFLAGS) $(DY_OUT)$(DYN_DIR)/$@ $^ $(DLIBS) $(DYSTRIP) && $(LN) $(@F) $(DYN_FILE2) +DY_RULE = $(DY) $(DFLAGS) $(HB_USER_DFLAGS) $(DY_OUT)$(DYN_DIR)/$@ $^ $(DLIBS) $(DYSTRIP) && $(LN) $(@F) $(DYN_FILE_NVR) include $(TOP)$(ROOT)config/rules.mk diff --git a/harbour/src/rtl/fscopy.c b/harbour/src/rtl/fscopy.c index 14d7658aed..2c828462fd 100644 --- a/harbour/src/rtl/fscopy.c +++ b/harbour/src/rtl/fscopy.c @@ -58,7 +58,7 @@ #include #endif -#define HB_FSCOPY_BUFFERSIZE 16384 +#define HB_FSCOPY_BUFFERSIZE 65536 HB_BOOL hb_fsCopy( const char * pszSource, const char * pszDest ) { @@ -67,9 +67,9 @@ HB_BOOL hb_fsCopy( const char * pszSource, const char * pszDest ) HB_FHANDLE fhndSource; HB_FHANDLE fhndDest; - if( ( fhndSource = hb_fsOpen( pszSource, FO_READ ) ) != FS_ERROR ) + if( ( fhndSource = hb_fsExtOpen( pszSource, NULL, FO_READ | FXO_DEFAULTS | FXO_SHARELOCK, NULL, NULL ) ) != FS_ERROR ) { - if( ( fhndDest = hb_fsCreate( pszDest, FC_NORMAL ) ) != 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;