[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Cvs-cvs] ccvs/lib ChangeLog Makefile.am Makefile.gnulib ...
From: |
Derek Robert Price |
Subject: |
[Cvs-cvs] ccvs/lib ChangeLog Makefile.am Makefile.gnulib ... |
Date: |
Thu, 23 Aug 2007 21:35:22 +0000 |
CVSROOT: /cvsroot/cvs
Module name: ccvs
Changes by: Derek Robert Price <dprice> 07/08/23 21:35:22
Modified files:
lib : ChangeLog Makefile.am Makefile.gnulib
Makefile.in fseeko.c ftello.c
Added files:
lib : lseek.c
Log message:
* Makefile.am: Import automated changes from...
* Makefile.gnulib: ...here.
* fseeko.c, ftello.c: Update from GNULIB.
* lseek.c: New file from GNULIB.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/ccvs/lib/ChangeLog?cvsroot=cvs&r1=1.551&r2=1.552
http://cvs.savannah.gnu.org/viewcvs/ccvs/lib/Makefile.am?cvsroot=cvs&r1=1.125&r2=1.126
http://cvs.savannah.gnu.org/viewcvs/ccvs/lib/Makefile.gnulib?cvsroot=cvs&r1=1.88&r2=1.89
http://cvs.savannah.gnu.org/viewcvs/ccvs/lib/Makefile.in?cvsroot=cvs&r1=1.228&r2=1.229
http://cvs.savannah.gnu.org/viewcvs/ccvs/lib/fseeko.c?cvsroot=cvs&r1=1.2&r2=1.3
http://cvs.savannah.gnu.org/viewcvs/ccvs/lib/ftello.c?cvsroot=cvs&r1=1.3&r2=1.4
http://cvs.savannah.gnu.org/viewcvs/ccvs/lib/lseek.c?cvsroot=cvs&rev=1.1
Patches:
Index: ChangeLog
===================================================================
RCS file: /cvsroot/cvs/ccvs/lib/ChangeLog,v
retrieving revision 1.551
retrieving revision 1.552
diff -u -b -r1.551 -r1.552
--- ChangeLog 22 Aug 2007 13:46:07 -0000 1.551
+++ ChangeLog 23 Aug 2007 21:35:21 -0000 1.552
@@ -1,3 +1,10 @@
+2007-08-23 Derek Price <address@hidden>
+
+ * Makefile.am: Import automated changes from...
+ * Makefile.gnulib: ...here.
+ * fseeko.c, ftello.c: Update from GNULIB.
+ * lseek.c: New file from GNULIB.
+
2007-08-22 Derek Price <address@hidden>
* Makefile.am (xreadlink): Remove module config per...
Index: Makefile.am
===================================================================
RCS file: /cvsroot/cvs/ccvs/lib/Makefile.am,v
retrieving revision 1.125
retrieving revision 1.126
diff -u -b -r1.125 -r1.126
--- Makefile.am 22 Aug 2007 13:46:07 -0000 1.125
+++ Makefile.am 23 Aug 2007 21:35:22 -0000 1.126
@@ -438,6 +438,24 @@
## end gnulib module fpending
+## begin gnulib module fseeko
+
+
+EXTRA_DIST += fseeko.c
+
+EXTRA_libcvs_a_SOURCES += fseeko.c
+
+## end gnulib module fseeko
+
+## begin gnulib module ftello
+
+
+EXTRA_DIST += ftello.c
+
+EXTRA_libcvs_a_SOURCES += ftello.c
+
+## end gnulib module ftello
+
## begin gnulib module ftruncate
@@ -774,6 +792,15 @@
## end gnulib module localcharset
+## begin gnulib module lseek
+
+
+EXTRA_DIST += lseek.c
+
+EXTRA_libcvs_a_SOURCES += lseek.c
+
+## end gnulib module lseek
+
## begin gnulib module lstat
Index: Makefile.gnulib
===================================================================
RCS file: /cvsroot/cvs/ccvs/lib/Makefile.gnulib,v
retrieving revision 1.88
retrieving revision 1.89
diff -u -b -r1.88 -r1.89
--- Makefile.gnulib 22 Aug 2007 13:46:07 -0000 1.88
+++ Makefile.gnulib 23 Aug 2007 21:35:22 -0000 1.89
@@ -9,7 +9,7 @@
# the same distribution terms as the rest of that program.
#
# Generated by gnulib-tool.
-# Reproduce by: gnulib-tool --import --dir=. --lib=libcvs --source-base=lib
--m4-base=m4 --doc-base=doc --aux-dir=build-aux --no-libtool --macro-prefix=gl
atexit base64 canon-host canonicalize closeout crypto/md5 dirname dup2 error
exit exitfail extensions fnmatch fnmatch-posix ftruncate getdate gethostname
getline getlogin_r getndelim2 getnline getopt getpagesize getpass-gnu gettext
gettime gettimeofday glob inttypes lstat malloc mbsstr memmove minmax mkdir
mkstemp mktime mreadlink-with-size nanosleep pathmax quotearg readlink realloc
regex rename save-cwd setenv stat-macros stdbool stdint strcase strdup strerror
strftime strtoul strtoumax time_r timespec tzset unlocked-io vasnprintf
vasprintf xalloc-die xgethostname xsize yesno
+# Reproduce by: gnulib-tool --import --dir=. --lib=libcvs --source-base=lib
--m4-base=m4 --doc-base=doc --aux-dir=build-aux --no-libtool --macro-prefix=gl
atexit base64 canon-host canonicalize closeout crypto/md5 dirname dup2 error
exit exitfail extensions fnmatch fnmatch-posix fseeko ftello ftruncate getdate
gethostname getline getlogin_r getndelim2 getnline getopt getpagesize
getpass-gnu gettext gettime gettimeofday glob inttypes lstat malloc mbsstr
memmove minmax mkdir mkstemp mktime mreadlink-with-size nanosleep pathmax
quotearg readlink realloc regex rename save-cwd setenv stat-macros stdbool
stdint strcase strdup strerror strftime strtoul strtoumax time_r timespec tzset
unlocked-io vasnprintf vasprintf xalloc-die xgethostname xsize yesno
AUTOMAKE_OPTIONS = 1.5 gnits subdir-objects
@@ -402,6 +402,24 @@
## end gnulib module fpending
+## begin gnulib module fseeko
+
+
+EXTRA_DIST += fseeko.c
+
+EXTRA_libcvs_a_SOURCES += fseeko.c
+
+## end gnulib module fseeko
+
+## begin gnulib module ftello
+
+
+EXTRA_DIST += ftello.c
+
+EXTRA_libcvs_a_SOURCES += ftello.c
+
+## end gnulib module ftello
+
## begin gnulib module ftruncate
@@ -718,6 +736,15 @@
## end gnulib module localcharset
+## begin gnulib module lseek
+
+
+EXTRA_DIST += lseek.c
+
+EXTRA_libcvs_a_SOURCES += lseek.c
+
+## end gnulib module lseek
+
## begin gnulib module lstat
Index: Makefile.in
===================================================================
RCS file: /cvsroot/cvs/ccvs/lib/Makefile.in,v
retrieving revision 1.228
retrieving revision 1.229
diff -u -b -r1.228 -r1.229
--- Makefile.in 22 Aug 2007 13:46:07 -0000 1.228
+++ Makefile.in 23 Aug 2007 21:35:22 -0000 1.229
@@ -53,8 +53,8 @@
check_PROGRAMS = getdate$(EXEEXT)
subdir = lib
DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
- ChangeLog alloca.c fncase.c fseeko.c ftello.c getdate.c \
- sunos57-select.c waitpid.c
+ ChangeLog alloca.c fncase.c getdate.c sunos57-select.c \
+ waitpid.c
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/acx_extract_cpp_defn.m4 \
$(top_srcdir)/m4/acx_with_external_zlib.m4 \
@@ -80,6 +80,7 @@
$(top_srcdir)/m4/fcntl-safer.m4 $(top_srcdir)/m4/fcntl_h.m4 \
$(top_srcdir)/m4/filenamecat.m4 $(top_srcdir)/m4/float_h.m4 \
$(top_srcdir)/m4/fnmatch.m4 $(top_srcdir)/m4/fpending.m4 \
+ $(top_srcdir)/m4/fseeko.m4 $(top_srcdir)/m4/ftello.m4 \
$(top_srcdir)/m4/ftruncate.m4 $(top_srcdir)/m4/getaddrinfo.m4 \
$(top_srcdir)/m4/getcwd-abort-bug.m4 \
$(top_srcdir)/m4/getcwd-path-max.m4 $(top_srcdir)/m4/getcwd.m4 \
@@ -99,33 +100,34 @@
$(top_srcdir)/m4/lchown.m4 $(top_srcdir)/m4/lib-ld.m4 \
$(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \
$(top_srcdir)/m4/localcharset.m4 $(top_srcdir)/m4/longlong.m4 \
- $(top_srcdir)/m4/lstat.m4 $(top_srcdir)/m4/malloca.m4 \
- $(top_srcdir)/m4/mbchar.m4 $(top_srcdir)/m4/mbiter.m4 \
- $(top_srcdir)/m4/mbrtowc.m4 $(top_srcdir)/m4/mbslen.m4 \
- $(top_srcdir)/m4/mbsstr.m4 $(top_srcdir)/m4/mbstate_t.m4 \
- $(top_srcdir)/m4/md5.m4 $(top_srcdir)/m4/memchr.m4 \
- $(top_srcdir)/m4/memmove.m4 $(top_srcdir)/m4/mempcpy.m4 \
- $(top_srcdir)/m4/memrchr.m4 $(top_srcdir)/m4/minmax.m4 \
- $(top_srcdir)/m4/mkdir-slash.m4 $(top_srcdir)/m4/mkstemp.m4 \
- $(top_srcdir)/m4/mktime.m4 $(top_srcdir)/m4/nanosleep.m4 \
- $(top_srcdir)/m4/netinet_in_h.m4 $(top_srcdir)/m4/nls.m4 \
- $(top_srcdir)/m4/openat.m4 $(top_srcdir)/m4/pathmax.m4 \
- $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \
- $(top_srcdir)/m4/quotearg.m4 $(top_srcdir)/m4/readlink.m4 \
- $(top_srcdir)/m4/regex.m4 $(top_srcdir)/m4/rename.m4 \
- $(top_srcdir)/m4/rpmatch.m4 $(top_srcdir)/m4/save-cwd.m4 \
- $(top_srcdir)/m4/setenv.m4 $(top_srcdir)/m4/size_max.m4 \
- $(top_srcdir)/m4/snprintf.m4 $(top_srcdir)/m4/socklen.m4 \
- $(top_srcdir)/m4/sockpfaf.m4 $(top_srcdir)/m4/ssize_t.m4 \
- $(top_srcdir)/m4/stdbool.m4 $(top_srcdir)/m4/stdint.m4 \
- $(top_srcdir)/m4/stdint_h.m4 $(top_srcdir)/m4/stdio_h.m4 \
- $(top_srcdir)/m4/stdlib_h.m4 $(top_srcdir)/m4/strcase.m4 \
- $(top_srcdir)/m4/strdup.m4 $(top_srcdir)/m4/strerror.m4 \
- $(top_srcdir)/m4/strftime.m4 $(top_srcdir)/m4/string_h.m4 \
- $(top_srcdir)/m4/strndup.m4 $(top_srcdir)/m4/strnlen.m4 \
- $(top_srcdir)/m4/strtoimax.m4 $(top_srcdir)/m4/strtol.m4 \
- $(top_srcdir)/m4/strtoll.m4 $(top_srcdir)/m4/strtoul.m4 \
- $(top_srcdir)/m4/strtoull.m4 $(top_srcdir)/m4/strtoumax.m4 \
+ $(top_srcdir)/m4/lseek.m4 $(top_srcdir)/m4/lstat.m4 \
+ $(top_srcdir)/m4/malloca.m4 $(top_srcdir)/m4/mbchar.m4 \
+ $(top_srcdir)/m4/mbiter.m4 $(top_srcdir)/m4/mbrtowc.m4 \
+ $(top_srcdir)/m4/mbslen.m4 $(top_srcdir)/m4/mbsstr.m4 \
+ $(top_srcdir)/m4/mbstate_t.m4 $(top_srcdir)/m4/md5.m4 \
+ $(top_srcdir)/m4/memchr.m4 $(top_srcdir)/m4/memmove.m4 \
+ $(top_srcdir)/m4/mempcpy.m4 $(top_srcdir)/m4/memrchr.m4 \
+ $(top_srcdir)/m4/minmax.m4 $(top_srcdir)/m4/mkdir-slash.m4 \
+ $(top_srcdir)/m4/mkstemp.m4 $(top_srcdir)/m4/mktime.m4 \
+ $(top_srcdir)/m4/nanosleep.m4 $(top_srcdir)/m4/netinet_in_h.m4 \
+ $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/openat.m4 \
+ $(top_srcdir)/m4/pathmax.m4 $(top_srcdir)/m4/po.m4 \
+ $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/m4/quotearg.m4 \
+ $(top_srcdir)/m4/readlink.m4 $(top_srcdir)/m4/regex.m4 \
+ $(top_srcdir)/m4/rename.m4 $(top_srcdir)/m4/rpmatch.m4 \
+ $(top_srcdir)/m4/save-cwd.m4 $(top_srcdir)/m4/setenv.m4 \
+ $(top_srcdir)/m4/size_max.m4 $(top_srcdir)/m4/snprintf.m4 \
+ $(top_srcdir)/m4/socklen.m4 $(top_srcdir)/m4/sockpfaf.m4 \
+ $(top_srcdir)/m4/ssize_t.m4 $(top_srcdir)/m4/stdbool.m4 \
+ $(top_srcdir)/m4/stdint.m4 $(top_srcdir)/m4/stdint_h.m4 \
+ $(top_srcdir)/m4/stdio_h.m4 $(top_srcdir)/m4/stdlib_h.m4 \
+ $(top_srcdir)/m4/strcase.m4 $(top_srcdir)/m4/strdup.m4 \
+ $(top_srcdir)/m4/strerror.m4 $(top_srcdir)/m4/strftime.m4 \
+ $(top_srcdir)/m4/string_h.m4 $(top_srcdir)/m4/strndup.m4 \
+ $(top_srcdir)/m4/strnlen.m4 $(top_srcdir)/m4/strtoimax.m4 \
+ $(top_srcdir)/m4/strtol.m4 $(top_srcdir)/m4/strtoll.m4 \
+ $(top_srcdir)/m4/strtoul.m4 $(top_srcdir)/m4/strtoull.m4 \
+ $(top_srcdir)/m4/strtoumax.m4 \
$(top_srcdir)/m4/sunos57-select.m4 \
$(top_srcdir)/m4/sys_socket_h.m4 \
$(top_srcdir)/m4/sys_stat_h.m4 $(top_srcdir)/m4/sys_time_h.m4 \
@@ -575,33 +577,34 @@
dirent_.h fchdir.c fcntl_.h creat-safer.c fcntl--.h \
fcntl-safer.h open-safer.c filenamecat.c filenamecat.h \
float_.h fnmatch.c fnmatch_.h fnmatch_loop.c __fpending.c \
- __fpending.h ftruncate.c gai_strerror.c getaddrinfo.c \
- getaddrinfo.h getcwd.c getdate.c getdate.h getdelim.c \
- getdelim.h gethostname.c getline.c getline.h getlogin_r.c \
- getndelim2.c getndelim2.h getopt.c getopt1.c getopt_.h \
- getopt_int.h getpagesize.h getpass.c getpass.h \
+ __fpending.h fseeko.c ftello.c ftruncate.c gai_strerror.c \
+ getaddrinfo.c getaddrinfo.h getcwd.c getdate.c getdate.h \
+ getdelim.c getdelim.h gethostname.c getline.c getline.h \
+ getlogin_r.c getndelim2.c getndelim2.h getopt.c getopt1.c \
+ getopt_.h getopt_int.h getpagesize.h getpass.c getpass.h \
$(top_srcdir)/build-aux/config.rpath gettime.c gettimeofday.c \
glob-libc.h glob.c glob_.h \
$(top_srcdir)/build-aux/config.rpath inet_ntop.c inet_ntop.h \
intprops.h inttypes_.h lchown.c \
$(top_srcdir)/build-aux/link-warning.h config.charset \
- ref-add.sin ref-del.sin lstat.c lstat.h malloc.c malloca.h \
- malloca.valgrind mbchar.h memchr.c memmove.c mempcpy.c \
- memrchr.c mkdir.c mkstemp.c mktime.c mreadlink.h nanosleep.c \
- netinet_in_.h at-func.c fchmodat.c fchownat.c fstatat.c \
- mkdirat.c openat-priv.h openat-proc.c openat.c openat.h \
- pathmax.h quotearg.c quotearg.h readlink.c realloc.c regcomp.c \
- regex.c regex.h regex_internal.c regex_internal.h regexec.c \
- rename.c rpmatch.c same-inode.h save-cwd.c save-cwd.h setenv.c \
- setenv.h unsetenv.c snprintf.c stat-macros.h stdbool_.h \
- stdint_.h stdio_.h stdlib_.h strcasecmp.c strncasecmp.c \
- strdup.c streq.h strerror.c strftime.c strftime.h string_.h \
- strndup.c strnlen.c strtoimax.c strtol.c strtoll.c strtoul.c \
- strtoull.c strtoumax.c sys_socket_.h sys_stat_.h sys_time_.h \
- tempname.c tempname.h time_.h time_r.c timespec.h unistd_.h \
- dup-safer.c fd-safer.c pipe-safer.c unistd--.h unistd-safer.h \
- unitypes.h localcharset.h uniwidth.h uniwidth/cjk.h \
- unlocked-io.h asnprintf.c float+.h printf-args.c printf-args.h \
+ ref-add.sin ref-del.sin lseek.c lstat.c lstat.h malloc.c \
+ malloca.h malloca.valgrind mbchar.h memchr.c memmove.c \
+ mempcpy.c memrchr.c mkdir.c mkstemp.c mktime.c mreadlink.h \
+ nanosleep.c netinet_in_.h at-func.c fchmodat.c fchownat.c \
+ fstatat.c mkdirat.c openat-priv.h openat-proc.c openat.c \
+ openat.h pathmax.h quotearg.c quotearg.h readlink.c realloc.c \
+ regcomp.c regex.c regex.h regex_internal.c regex_internal.h \
+ regexec.c rename.c rpmatch.c same-inode.h save-cwd.c \
+ save-cwd.h setenv.c setenv.h unsetenv.c snprintf.c \
+ stat-macros.h stdbool_.h stdint_.h stdio_.h stdlib_.h \
+ strcasecmp.c strncasecmp.c strdup.c streq.h strerror.c \
+ strftime.c strftime.h string_.h strndup.c strnlen.c \
+ strtoimax.c strtol.c strtoll.c strtoul.c strtoull.c \
+ strtoumax.c sys_socket_.h sys_stat_.h sys_time_.h tempname.c \
+ tempname.h time_.h time_r.c timespec.h unistd_.h dup-safer.c \
+ fd-safer.c pipe-safer.c unistd--.h unistd-safer.h unitypes.h \
+ localcharset.h uniwidth.h uniwidth/cjk.h unlocked-io.h \
+ asnprintf.c float+.h printf-args.c printf-args.h \
printf-parse.c printf-parse.h vasnprintf.c vasnprintf.h \
asprintf.c vasprintf.c wchar_.h wctype_.h wcwidth.c xalloc.h \
xmalloc.c xgetcwd.c xgetcwd.h yesno.c yesno.h
@@ -610,21 +613,21 @@
close-stream.c closeout.c md5.c cycle-check.c dirfd.c \
basename.c dirname.c stripslash.c dup2.c exitfail.c fchdir.c \
creat-safer.c open-safer.c filenamecat.c fnmatch.c \
- fnmatch_loop.c __fpending.c ftruncate.c gai_strerror.c \
- getaddrinfo.c getcwd.c getdelim.c gethostname.c getline.c \
- getlogin_r.c getndelim2.c getopt.c getopt1.c getpass.c \
- gettime.c gettimeofday.c glob.c inet_ntop.c lchown.c lstat.c \
- malloc.c memchr.c memmove.c mempcpy.c memrchr.c mkdir.c \
- mkstemp.c mktime.c nanosleep.c at-func.c fchmodat.c fchownat.c \
- fstatat.c mkdirat.c openat-proc.c openat.c quotearg.c \
- readlink.c realloc.c regcomp.c regex.c regex_internal.c \
- regexec.c rename.c rpmatch.c save-cwd.c setenv.c unsetenv.c \
- snprintf.c strcasecmp.c strncasecmp.c strdup.c strerror.c \
- strftime.c strndup.c strnlen.c strtoimax.c strtol.c strtoll.c \
- strtoul.c strtoull.c strtoumax.c tempname.c time_r.c \
- dup-safer.c fd-safer.c pipe-safer.c asnprintf.c printf-args.c \
- printf-parse.c vasnprintf.c asprintf.c vasprintf.c wcwidth.c \
- xmalloc.c xgetcwd.c yesno.c
+ fnmatch_loop.c __fpending.c fseeko.c ftello.c ftruncate.c \
+ gai_strerror.c getaddrinfo.c getcwd.c getdelim.c gethostname.c \
+ getline.c getlogin_r.c getndelim2.c getopt.c getopt1.c \
+ getpass.c gettime.c gettimeofday.c glob.c inet_ntop.c lchown.c \
+ lseek.c lstat.c malloc.c memchr.c memmove.c mempcpy.c \
+ memrchr.c mkdir.c mkstemp.c mktime.c nanosleep.c at-func.c \
+ fchmodat.c fchownat.c fstatat.c mkdirat.c openat-proc.c \
+ openat.c quotearg.c readlink.c realloc.c regcomp.c regex.c \
+ regex_internal.c regexec.c rename.c rpmatch.c save-cwd.c \
+ setenv.c unsetenv.c snprintf.c strcasecmp.c strncasecmp.c \
+ strdup.c strerror.c strftime.c strndup.c strnlen.c strtoimax.c \
+ strtol.c strtoll.c strtoul.c strtoull.c strtoumax.c tempname.c \
+ time_r.c dup-safer.c fd-safer.c pipe-safer.c asnprintf.c \
+ printf-args.c printf-parse.c vasnprintf.c asprintf.c \
+ vasprintf.c wcwidth.c xmalloc.c xgetcwd.c yesno.c
# Use this preprocessor expression to decide whether #include_next works.
# Do not rely on a 'configure'-time test for this, since the expression
@@ -705,8 +708,6 @@
@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@
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@
@@ -739,7 +740,9 @@
@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@
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@
@@ -763,6 +766,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@
Index: fseeko.c
===================================================================
RCS file: /cvsroot/cvs/ccvs/lib/fseeko.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- fseeko.c 14 Dec 2003 17:04:38 -0000 1.2
+++ fseeko.c 23 Aug 2007 21:35:22 -0000 1.3
@@ -1,5 +1,5 @@
-/* fseeko.c -- an implementation of fseek() with an off_t argument.
- Copyright (C) 2003, Free Software Foundation, Inc.
+/* An fseeko() function that, together with fflush(), is POSIX compliant.
+ Copyright (C) 2007 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -9,40 +9,108 @@
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details. */
+ GNU General Public License for more details.
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
+ You should have received a copy of the GNU General Public License along
+ with this program; if not, write to the Free Software Foundation,
+ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+
+#include <config.h>
+/* Specification. */
#include <stdio.h>
-#include <sys/types.h>
-#ifdef HAVE_LIMITS_H
-#include <limits.h>
-#endif
-#ifndef LONG_MAX
-#define LONG_MAX ((long) ((unsigned long) ~0 >> 1))
-#endif
-#ifndef LONG_MIN
-#define LONG_MIN (-1 - LONG_MAX)
-#endif
+/* Get off_t and lseek. */
+#include <unistd.h>
-/*
- * A replacement/substitute for fseeko, for hosts that don't have it.
- */
+#undef fseeko
+#if !HAVE_FSEEKO
+# undef fseek
+# define fseeko fseek
+#endif
int
-fseeko (FILE *stream, off_t offset, int whence)
+rpl_fseeko (FILE *fp, off_t offset, int whence)
{
- while (offset != (long) offset)
- {
- long pos = (offset < 0) ? LONG_MIN : LONG_MAX;
+#if LSEEK_PIPE_BROKEN
+ /* mingw gives bogus answers rather than failure on non-seekable files. */
+ if (lseek (fileno (fp), 0, SEEK_CUR) == -1)
+ return EOF;
+#endif
- if (fseek (stream, pos, whence) != 0)
+ /* These tests are based on fpurge.c. */
+#if defined _IO_ferror_unlocked /* GNU libc, BeOS */
+ if (fp->_IO_read_end == fp->_IO_read_ptr
+ && fp->_IO_write_ptr == fp->_IO_write_base
+ && fp->_IO_save_base == NULL)
+#elif defined __sferror /* FreeBSD, NetBSD, OpenBSD, MacOS X,
Cygwin */
+# if defined __NetBSD__ || defined __OpenBSD__ /* NetBSD, OpenBSD */
+ /* See
<http://cvsweb.netbsd.org/bsdweb.cgi/src/lib/libc/stdio/fileext.h?rev=HEAD&content-type=text/x-cvsweb-markup>
+ and
<http://www.openbsd.org/cgi-bin/cvsweb/src/lib/libc/stdio/fileext.h?rev=HEAD&content-type=text/x-cvsweb-markup>
*/
+# define fp_ub ((struct { struct __sbuf _ub; } *) fp->_ext._base)->_ub
+# else /* FreeBSD, MacOS X, Cygwin */
+# define fp_ub fp->_ub
+# endif
+# if defined __SL64 && defined __SCLE /* Cygwin */
+ if ((fp->_flags & __SL64) == 0)
+ {
+ /* Cygwin 1.5.0 through 1.5.24 failed to open stdin in 64-bit
+ mode; but has an fseeko that requires 64-bit mode. */
+ FILE *tmp = fopen ("/dev/null", "r");
+ if (!tmp)
return -1;
- offset -= pos;
- whence = SEEK_CUR;
+ fp->_flags |= __SL64;
+ fp->_seek64 = tmp->_seek64;
+ fclose (tmp);
+ }
+# endif
+ if (fp->_p == fp->_bf._base
+ && fp->_r == 0
+ && fp->_w == ((fp->_flags & (__SLBF | __SNBF | __SRD)) == 0 /* fully
buffered and not currently reading? */
+ ? fp->_bf._size
+ : 0)
+ && fp_ub._base == NULL)
+#elif defined _IOERR /* AIX, HP-UX, IRIX, OSF/1, Solaris, mingw
*/
+# if defined __sun && defined _LP64 /* Solaris/{SPARC,AMD64} 64-bit */
+# define fp_ ((struct { unsigned char *_ptr; \
+ unsigned char *_base; \
+ unsigned char *_end; \
+ long _cnt; \
+ int _file; \
+ unsigned int _flag; \
+ } *) fp)
+ if (fp_->_ptr == fp_->_base
+ && (fp_->_ptr == NULL || fp_->_cnt == 0))
+# else
+ if (fp->_ptr == fp->_base
+ && (fp->_ptr == NULL || fp->_cnt == 0))
+# endif
+#elif defined __UCLIBC__ /* uClibc */
+ if (((fp->__modeflags & __FLAG_WRITING) == 0
+ || fp->__bufpos == fp->__bufstart)
+ && ((fp->__modeflags & (__FLAG_READONLY | __FLAG_READING)) == 0
+ || fp->__bufpos == fp->__bufread))
+#else
+ #error "Please port gnulib fseeko.c to your platform! Look at the code in
fpurge.c, then report this to bug-gnulib."
+#endif
+ {
+ off_t pos = lseek (fileno (fp), offset, whence);
+ if (pos == -1)
+ {
+#if defined __sferror /* FreeBSD, NetBSD, OpenBSD, MacOS X,
Cygwin */
+ fp->_flags &= ~__SOFF;
+#endif
+ return -1;
+ }
+ else
+ {
+#if defined __sferror /* FreeBSD, NetBSD, OpenBSD, MacOS X,
Cygwin */
+ fp->_offset = pos;
+ fp->_flags |= __SOFF;
+#endif
+ return 0;
+ }
}
- return fseek (stream, (long) offset, whence);
+ else
+ return fseeko (fp, offset, whence);
}
Index: ftello.c
===================================================================
RCS file: /cvsroot/cvs/ccvs/lib/ftello.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -b -r1.3 -r1.4
--- ftello.c 14 Dec 2003 17:04:38 -0000 1.3
+++ ftello.c 23 Aug 2007 21:35:22 -0000 1.4
@@ -1,5 +1,5 @@
-/* ftello.c -- an implementation of ftell() that returns an off_t
- Copyright (C) 2003, Free Software Foundation, Inc.
+/* An ftello() function that works around platform bugs.
+ Copyright (C) 2007 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -9,20 +9,47 @@
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details. */
+ GNU General Public License for more details.
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
+ You should have received a copy of the GNU General Public License along
+ with this program; if not, write to the Free Software Foundation,
+ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+
+#include <config.h>
+/* Specification. */
#include <stdio.h>
-#include <sys/types.h>
+
+/* Get lseek. */
+#include <unistd.h>
+
+#undef ftello
+#if !HAVE_FTELLO
+# undef ftell
+# define ftello ftell
+#endif
off_t
-ftello (FILE *stream)
+rpl_ftello (FILE *fp)
{
- long pos;
- pos = ftell (stream);
+#if LSEEK_PIPE_BROKEN
+ /* mingw gives bogus answers rather than failure on non-seekable files. */
+ if (lseek (fileno (fp), 0, SEEK_CUR) == -1)
+ return -1;
+#endif
- return (off_t) pos;
+#if defined __SL64 && defined __SCLE /* Cygwin */
+ if ((fp->_flags & __SL64) == 0)
+ {
+ /* Cygwin 1.5.0 through 1.5.24 failed to open stdin in 64-bit
+ mode; but has an ftello that requires 64-bit mode. */
+ FILE *tmp = fopen ("/dev/null", "r");
+ if (!tmp)
+ return -1;
+ fp->_flags |= __SL64;
+ fp->_seek64 = tmp->_seek64;
+ fclose (tmp);
+ }
+#endif
+ return ftello (fp);
}
Index: lseek.c
===================================================================
RCS file: lseek.c
diff -N lseek.c
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lseek.c 23 Aug 2007 21:35:22 -0000 1.1
@@ -0,0 +1,62 @@
+/* An lseek() function that detects pipes.
+ Copyright (C) 2007 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License along
+ with this program; if not, write to the Free Software Foundation,
+ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+
+#include <config.h>
+
+/* Specification. */
+#include <unistd.h>
+
+#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+/* Windows platforms. */
+/* Get GetFileType. */
+# include <windows.h>
+#else
+# include <sys/stat.h>
+#endif
+#include <errno.h>
+
+#undef lseek
+
+off_t
+rpl_lseek (int fd, off_t offset, int whence)
+{
+#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+ /* mingw lseek mistakenly succeeds on pipes, sockets, and terminals. */
+ HANDLE h = (HANDLE) _get_osfhandle (fd);
+ if (h == INVALID_HANDLE_VALUE)
+ {
+ errno = EBADF;
+ return -1;
+ }
+ if (GetFileType (h) != FILE_TYPE_DISK)
+ {
+ errno = ESPIPE;
+ return -1;
+ }
+#else
+ /* BeOS lseek mistakenly succeeds on pipes... */
+ struct stat statbuf;
+ if (fstat (fd, &statbuf) < 0)
+ return -1;
+ if (!S_ISREG (statbuf.st_mode))
+ {
+ errno = ESPIPE;
+ return -1;
+ }
+#endif
+ return lseek (fd, offset, whence);
+}