Re: sharutils-4.14 compilation issue

Eric Blake <[email protected]>
Newsgroups gmane.comp.gnu.utils.bugs
Organization Red Hat, Inc.
Message-ID <[email protected]>
On 04/25/2014 08:30 AM, Nelson H. F. Beebe wrote:
> On several platforms, compilation of sharutils-4.14 fails like this:
> 
>     /usr/local/bin/gcc-4.5 -std=c99 \
> 	-DLOCALEDIR=\"/usr/local/share/locale\" -DHAVE_CONFIG_H -I. -I.. \
> 	-I../libopts -I. -I.. -I../lib -I../lib -I../intl -D_REENTRANT \
> 	-I/usr/local/include -Wno-format-contains-nul -g -O2 \
> 	-Wno-format-contains-nul -MT scribble.o -MD -MP -MF .deps/scribble.Tpo \
> 	-c -o scribble.o scribble.c
>     In file included from ../lib/stdlib.h:96:0,
> 		     from scribble.c:3:
>     ../lib/unistd.h:121:3: error: #error "Please include config.h first."

Here's the patch I had to apply to package sharutils for cygwin:

--- origsrc/sharutils-4.14/src/scribble.c	2013-05-19 08:49:05.000000000
-0600
+++ src/sharutils-4.14/src/scribble.c	2014-04-16 09:08:54.492563800 -0600
@@ -1,4 +1,4 @@
-
+#include <config.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include "scribble.h"
--- origsrc/sharutils-4.14/src/shar.c	2013-10-12 16:18:28.000000000 -0600
+++ src/sharutils-4.14/src/shar.c	2014-04-16 09:03:17.826856400 -0600
@@ -1107,7 +1107,7 @@ emit_char_ct_validation (
   sprintf (command, cct_cmd, quoted_name);

   {
-    FILE * pfp = popen (command, "r");
+    FILE * pfp = popen (command, "rb");
     if (pfp == NULL)
       die (SHAR_EXIT_FAILED, _("Could not popen command"), command);



-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc (application/pgp-signature, 604 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
Comment: Public key at http://people.redhat.com/eblake/eblake.gpg
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQEcBAEBCAAGBQJTWnMFAAoJEKeha0olJ0Nq46kIAKEJmE/IF3ncfrePxzCxuxx9
xHqTQHLOQxdmW2ov2XN4TYF1WUqrkfedrd/rgH81EyDhwyY/CHhR1YPcr68Vp+ys
0sZuOQm5XFXPm0nJlrkEjNhQIb5ynSQ6FRP5n5AbCLxoAVjFddYC8ou59dtdDndU
mKkVeIbI7jbqKjDtDKWiLAUljwYMtHdD7jnGOy/nkxZ8xyYFTlWlDQQxzlutkIXN
DG3W2pI82Hm1iu+fFv42mpdnhOSXtNOSgGuUUNfoF49Qjr4aNUbeX4nj2lSUpl0Q
qctQUZBw7jVm3M6RnzqhGI/QmPJfQh7akXsDCHikuqoeKqMqVPWIzvFwriIhlGk=
=u3gV
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.