bug-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ftruncate issue


From: Derek Robert Price
Subject: Re: ftruncate issue
Date: Mon, 12 Aug 2002 16:30:18 -0400
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.0) Gecko/20020606

Andrey Aristarkhov wrote:

Hi!

I suppose there must be #ifndef HAVE_FTRUNCATE ... #endif added to
lib/ftruncate.c  file to turn-off ftruncate emulation if this function
is defined in lib C. Current version of ftrucate.c causes unpredictable
linker behavior if ftruncate is used within some cvs code.

Here is a patch code:

Actually, ftruncate() needed to be added to the `AC_REPLACE_FUNC' macro in `configure.in'. I've attached two patches. `ftruncate.diff' is the one that counts, `ftruncate.supplement.diff' should be run if you don't have up to date autotools installed.

I've already committed the change, but please let me know if that fixes things.

Derek

--
               *8^)

Email: address@hidden

Get CVS support at http://ximbiot.com


Index: configure.in
===================================================================
RCS file: /cvs/ccvs/configure.in,v
retrieving revision 1.149
diff -u -r1.149 configure.in
--- configure.in        8 May 2002 17:48:46 -0000       1.149
+++ configure.in        12 Aug 2002 20:10:25 -0000
@@ -158,6 +158,7 @@
 
 AC_REPLACE_FUNCS(\
        dup2 \
+       ftruncate \
        gethostname \
        memmove \
        mkdir \
@@ -173,7 +174,6 @@
        fchmod \
        fsync \
        ftime \
-       ftruncate \
        getgroups \
        getopt \
        getpagesize \
Index: lib/Makefile.am
===================================================================
RCS file: /cvs/ccvs/lib/Makefile.am,v
retrieving revision 1.8
diff -u -r1.8 Makefile.am
--- lib/Makefile.am     30 Apr 2002 20:56:05 -0000      1.8
+++ lib/Makefile.am     12 Aug 2002 20:10:25 -0000
@@ -40,7 +40,6 @@
 # matching?)
 libcvs_a_SOURCES = \
        argmatch.c \
-       ftruncate.c \
        getdate.y \
        getline.c \
        getopt.c \
@@ -67,6 +66,7 @@
 ##     fncase.c
 ##     fnmatch.c
 ##     fnmatch.h
+##     ftruncate.c
 ##     gethostname.c
 ##     memmove.c
 ##     mkdir.c
Index: aclocal.m4
===================================================================
RCS file: /cvs/ccvs/aclocal.m4,v
retrieving revision 1.17
diff -u -r1.17 aclocal.m4
--- aclocal.m4  30 Apr 2002 21:01:07 -0000      1.17
+++ aclocal.m4  12 Aug 2002 20:10:02 -0000
@@ -1128,7 +1128,14 @@
 fi
 ])
 
-#serial 1
+# isc-posix.m4 serial 1 (gettext-0.10.40)
+dnl Copyright (C) 1995-2002 Free Software Foundation, Inc.
+dnl This file is free software, distributed under the terms of the GNU
+dnl General Public License.  As a special exception to the GNU General
+dnl Public License, this file may be distributed as part of a program
+dnl that contains a configuration script generated by Autoconf, under
+dnl the same distribution terms as the rest of that program.
+
 # This test replaces the one in autoconf.
 # Currently this macro should have the same name as the autoconf macro
 # because gettext's gettext.m4 (distributed in the automake package)
Index: configure
===================================================================
RCS file: /cvs/ccvs/configure,v
retrieving revision 1.146
diff -u -r1.146 configure
--- configure   8 May 2002 17:48:46 -0000       1.146
+++ configure   12 Aug 2002 20:10:23 -0000
@@ -5125,8 +5125,10 @@
 
 
 
+
 for ac_func in \
        dup2 \
+       ftruncate \
        gethostname \
        memmove \
        mkdir \
@@ -5245,13 +5247,11 @@
 
 
 
-
 for ac_func in \
        fchdir \
        fchmod \
        fsync \
        ftime \
-       ftruncate \
        getgroups \
        getopt \
        getpagesize \
Index: doc/stamp-vti
===================================================================
RCS file: /cvs/ccvs/doc/stamp-vti,v
retrieving revision 1.9
diff -u -r1.9 stamp-vti
--- doc/stamp-vti       6 Aug 2002 22:02:15 -0000       1.9
+++ doc/stamp-vti       12 Aug 2002 20:10:25 -0000
@@ -1,4 +1,4 @@
address@hidden UPDATED 4 August 2002
address@hidden UPDATED 5 August 2002
 @set UPDATED-MONTH August 2002
 @set EDITION 1.11.2.1
 @set VERSION 1.11.2.1
Index: doc/version.texi
===================================================================
RCS file: /cvs/ccvs/doc/version.texi,v
retrieving revision 1.10
diff -u -r1.10 version.texi
--- doc/version.texi    6 Aug 2002 22:02:15 -0000       1.10
+++ doc/version.texi    12 Aug 2002 20:10:25 -0000
@@ -1,4 +1,4 @@
address@hidden UPDATED 4 August 2002
address@hidden UPDATED 5 August 2002
 @set UPDATED-MONTH August 2002
 @set EDITION 1.11.2.1
 @set VERSION 1.11.2.1
Index: lib/Makefile.in
===================================================================
RCS file: /cvs/ccvs/lib/Makefile.in,v
retrieving revision 1.58
diff -u -r1.58 Makefile.in
--- lib/Makefile.in     8 May 2002 17:47:52 -0000       1.58
+++ lib/Makefile.in     12 Aug 2002 20:10:26 -0000
@@ -126,7 +126,6 @@
 # matching?)
 libcvs_a_SOURCES = \
        argmatch.c \
-       ftruncate.c \
        getdate.y \
        getline.c \
        getopt.c \
@@ -165,11 +164,11 @@
 
 libcvs_a_AR = $(AR) cru
 libcvs_a_DEPENDENCIES = @LIBOBJS@
-am_libcvs_a_OBJECTS = argmatch.$(OBJEXT) ftruncate.$(OBJEXT) \
-       getdate.$(OBJEXT) getline.$(OBJEXT) getopt.$(OBJEXT) \
-       getopt1.$(OBJEXT) md5.$(OBJEXT) regex.$(OBJEXT) \
-       savecwd.$(OBJEXT) sighandle.$(OBJEXT) stripslash.$(OBJEXT) \
-       xgetwd.$(OBJEXT) yesno.$(OBJEXT)
+am_libcvs_a_OBJECTS = argmatch.$(OBJEXT) getdate.$(OBJEXT) \
+       getline.$(OBJEXT) getopt.$(OBJEXT) getopt1.$(OBJEXT) \
+       md5.$(OBJEXT) regex.$(OBJEXT) savecwd.$(OBJEXT) \
+       sighandle.$(OBJEXT) stripslash.$(OBJEXT) xgetwd.$(OBJEXT) \
+       yesno.$(OBJEXT)
 libcvs_a_OBJECTS = $(am_libcvs_a_OBJECTS)
 
 DEFS = @DEFS@
@@ -181,12 +180,12 @@
 am__depfiles_maybe = depfiles
 @address@hidden = $(DEPDIR)/dup2.Po $(DEPDIR)/fncase.Po \
 @AMDEP_TRUE@   $(DEPDIR)/fnmatch.Po $(DEPDIR)/fnmatch.h.in \
address@hidden@ $(DEPDIR)/gethostname.Po $(DEPDIR)/memmove.Po \
address@hidden@ $(DEPDIR)/mkdir.Po $(DEPDIR)/rename.Po \
address@hidden@ $(DEPDIR)/strerror.Po $(DEPDIR)/strstr.Po \
address@hidden@ $(DEPDIR)/strtoul.Po $(DEPDIR)/valloc.Po \
address@hidden@ $(DEPDIR)/waitpid.Po ./$(DEPDIR)/argmatch.Po \
address@hidden@ ./$(DEPDIR)/ftruncate.Po ./$(DEPDIR)/getdate.Po \
address@hidden@ $(DEPDIR)/ftruncate.Po $(DEPDIR)/gethostname.Po \
address@hidden@ $(DEPDIR)/memmove.Po $(DEPDIR)/mkdir.Po \
address@hidden@ $(DEPDIR)/rename.Po $(DEPDIR)/strerror.Po \
address@hidden@ $(DEPDIR)/strstr.Po $(DEPDIR)/strtoul.Po \
address@hidden@ $(DEPDIR)/valloc.Po $(DEPDIR)/waitpid.Po \
address@hidden@ ./$(DEPDIR)/argmatch.Po ./$(DEPDIR)/getdate.Po \
 @AMDEP_TRUE@   ./$(DEPDIR)/getline.Po ./$(DEPDIR)/getopt.Po \
 @AMDEP_TRUE@   ./$(DEPDIR)/getopt1.Po ./$(DEPDIR)/md5.Po \
 @AMDEP_TRUE@   ./$(DEPDIR)/regex.Po ./$(DEPDIR)/savecwd.Po \
@@ -200,9 +199,9 @@
 YACCCOMPILE = $(YACC) $(YFLAGS) $(AM_YFLAGS)
 DIST_SOURCES = $(libcvs_a_SOURCES)
 DIST_COMMON = ChangeLog Makefile.am Makefile.in dup2.c fncase.c \
-       fnmatch.c fnmatch.h.in getdate.c gethostname.c memmove.c \
-       mkdir.c rename.c strerror.c strstr.c strtoul.c valloc.c \
-       waitpid.c
+       fnmatch.c fnmatch.h.in ftruncate.c getdate.c gethostname.c \
+       memmove.c mkdir.c rename.c strerror.c strstr.c strtoul.c \
+       valloc.c waitpid.c
 SOURCES = $(libcvs_a_SOURCES)
 
 all: all-am
@@ -234,6 +233,7 @@
 @AMDEP_TRUE@@am__include@ @address@hidden(DEPDIR)/address@hidden@
 @AMDEP_TRUE@@am__include@ @address@hidden(DEPDIR)/address@hidden@
 @AMDEP_TRUE@@am__include@ @address@hidden(DEPDIR)/address@hidden@
address@hidden@@am__include@ @address@hidden(DEPDIR)/address@hidden@
 @AMDEP_TRUE@@am__include@ @address@hidden(DEPDIR)/address@hidden@
 @AMDEP_TRUE@@am__include@ @address@hidden(DEPDIR)/address@hidden@
 @AMDEP_TRUE@@am__include@ @address@hidden(DEPDIR)/address@hidden@
@@ -244,7 +244,6 @@
 @AMDEP_TRUE@@am__include@ @address@hidden(DEPDIR)/address@hidden@
 @AMDEP_TRUE@@am__include@ @address@hidden(DEPDIR)/address@hidden@
 @AMDEP_TRUE@@am__include@ @address@hidden/$(DEPDIR)/address@hidden@
address@hidden@@am__include@ @address@hidden/$(DEPDIR)/address@hidden@
 @AMDEP_TRUE@@am__include@ @address@hidden/$(DEPDIR)/address@hidden@
 @AMDEP_TRUE@@am__include@ @address@hidden/$(DEPDIR)/address@hidden@
 @AMDEP_TRUE@@am__include@ @address@hidden/$(DEPDIR)/address@hidden@

reply via email to

[Prev in Thread] Current Thread [Next in Thread]