bug-gnulib
[Top][All Lists]
Advanced

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

m4-1.4.11: build failure on DragonFly


From: Eric Blake
Subject: m4-1.4.11: build failure on DragonFly
Date: Mon, 21 Apr 2008 06:52:47 -0600
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.12) Gecko/20080213 Thunderbird/2.0.0.12 Mnenhy/0.7.5.666

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

According to Thomas Klausner on 4/21/2008 4:46 AM:
| Hi!
|
| I don't have a DragonFly box myself, but apparently m4-1.4.11 doesn't
| compile on it.

Thanks for the report.  Adding bug-gnulib, since this patch should be
applied there to affect multiple projects.

|
| One of the main DragonFly developers provided a patch, see
| http://leaf.dragonflybsd.org/mailarchive/users/2008-04/msg00044.html
|
| The patch is a patch against pkgsrc, I'll attach the resulting "real"
| patch against m4 to this mail.

It looks like the patch does two things - use the underlying __sreadahead
to implement freadahead (hmm, do any other platforms provide this
functionality already, and does DragonFly's implementation meet the
contract that we defined for our invention of freadahead?).

It also disables the fseeko replacement on DragonFly - why?  The fseeko
replacement is used if the system fseeko is deemed to be buggy at
configure time; is the configure test guessing wrong, or is this patch
actually introducing a regression by overriding the correct configure test?

- --
Don't work too hard, make some time for fun as well!

Eric Blake             address@hidden
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkgMjh4ACgkQ84KuGfSFAYASJwCfQ0friHYjtAKv5UEHH1f2ZAzp
TRYAoJNnXpU44QpMuXOAEK0I5Tzb5Qdl
=5Uuk
-----END PGP SIGNATURE-----
Index: distinfo
===================================================================
RCS file: /archive/NetBSD-CVS/pkgsrc/devel/m4/distinfo,v
retrieving revision 1.22
diff -u -r1.22 distinfo
--- distinfo    13 Apr 2008 00:51:59 -0000      1.22
+++ distinfo    15 Apr 2008 03:28:34 -0000
@@ -4,3 +4,4 @@
 RMD160 (m4-1.4.11.tar.gz) = 3689d9681cf9d2effbf87a3202cea68a75ebcec2
 Size (m4-1.4.11.tar.gz) = 1168840 bytes
 SHA1 (patch-aa) = 31aed81ffd1ea40d688ff89786fa72d95a13d422
+MD5 (patch-ab) = 5090ca54f4a35aeaa2db5ddd65493615
Index: patches/patch-ab
===================================================================
RCS file: patches/patch-ab
diff -N patches/patch-ab
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-ab    15 Apr 2008 03:30:33 -0000
@@ -0,0 +1,51 @@
+--- lib/freadahead.c.orig      2008-03-10 19:11:22 -0700
++++ lib/freadahead.c   2008-04-14 17:38:46 -0700
+@@ -78,6 +78,8 @@
+        + (fp->_Mode & 0x4000 /* _MBYTE */
+           ? (fp->_Back + sizeof (fp->_Back)) - fp->_Rback
+           : 0);
++#elif defined __DragonFly__       /* DragonFly */
++  return __sreadahead(fp);
+ #else
+  #error "Please port gnulib freadahead.c to your platform! Look at the 
definition of fflush, fread, ungetc on your system, then report this to 
bug-gnulib."
+ #endif
+Only in /usr/obj/pkgsrc/devel/m4/work/m4-1.4.11/lib: freadahead.o
+diff -u -r ./freading.c /usr/obj/pkgsrc/devel/m4/work/m4-1.4.11/lib/freading.c
+--- lib/freading.c.orig        2007-11-10 15:24:02 -0800
++++ lib/freading.c     2008-04-14 17:41:47 -0700
+@@ -42,6 +42,8 @@
+ #elif defined __QNX__               /* QNX */
+   return ((fp->_Mode & 0x2 /* _MOPENW */) == 0
+         || (fp->_Mode & 0x1000 /* _MREAD */) != 0);
++#elif defined __DragonFly__       /* DragonFly */
++  return ((((struct __FILE_public *)fp)->_flags & __SRD) != 0);
+ #else
+  #error "Please port gnulib freading.c to your platform!"
+ #endif
+--- lib/fseeko.c.orig  2007-12-17 21:18:34 -0800
++++ lib/fseeko.c       2008-04-14 20:27:44 -0700
+@@ -23,6 +23,18 @@
+ /* Get off_t and lseek.  */
+ #include <unistd.h>
+ 
++#ifdef __DragonFly__
++
++#undef fseeko
++
++int
++rpl_fseeko (FILE *fp, off_t offset, int whence)
++{
++      return(fseeko(fp, offset, whence));
++}
++
++#else
++
+ #undef fseeko
+ #if !HAVE_FSEEKO
+ # undef fseek
+@@ -121,3 +133,5 @@
+   else
+     return fseeko (fp, offset, whence);
+ }
++
++#endif

--- lib/freadahead.c.orig       2008-03-10 19:11:22 -0700
+++ lib/freadahead.c    2008-04-14 17:38:46 -0700
@@ -78,6 +78,8 @@
         + (fp->_Mode & 0x4000 /* _MBYTE */
            ? (fp->_Back + sizeof (fp->_Back)) - fp->_Rback
            : 0);
+#elif defined __DragonFly__        /* DragonFly */
+  return __sreadahead(fp);
 #else
  #error "Please port gnulib freadahead.c to your platform! Look at the 
definition of fflush, fread, ungetc on your system, then report this to 
bug-gnulib."
 #endif
Only in /usr/obj/pkgsrc/devel/m4/work/m4-1.4.11/lib: freadahead.o
diff -u -r ./freading.c /usr/obj/pkgsrc/devel/m4/work/m4-1.4.11/lib/freading.c
--- lib/freading.c.orig 2007-11-10 15:24:02 -0800
+++ lib/freading.c      2008-04-14 17:41:47 -0700
@@ -42,6 +42,8 @@
 #elif defined __QNX__               /* QNX */
   return ((fp->_Mode & 0x2 /* _MOPENW */) == 0
          || (fp->_Mode & 0x1000 /* _MREAD */) != 0);
+#elif defined __DragonFly__        /* DragonFly */
+  return ((((struct __FILE_public *)fp)->_flags & __SRD) != 0);
 #else
  #error "Please port gnulib freading.c to your platform!"
 #endif
--- lib/fseeko.c.orig   2007-12-17 21:18:34 -0800
+++ lib/fseeko.c        2008-04-14 20:27:44 -0700
@@ -23,6 +23,18 @@
 /* Get off_t and lseek.  */
 #include <unistd.h>
 
+#ifdef __DragonFly__
+
+#undef fseeko
+
+int
+rpl_fseeko (FILE *fp, off_t offset, int whence)
+{
+       return(fseeko(fp, offset, whence));
+}
+
+#else
+
 #undef fseeko
 #if !HAVE_FSEEKO
 # undef fseek
@@ -121,3 +133,5 @@
   else
     return fseeko (fp, offset, whence);
 }
+
+#endif


reply via email to

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