recent cygwin breakage

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

 



Hi Junio,

Just a quick heads-up on a recent cygwin breakage.

I updated my (64-bit) cygwin installation yesterday and (along
with many other packages) I noticed a new version of gcc (and
presumably libc) was installed (gcc v4.8.3-5 x86-64).

Unfortunately, this caused new warning to be issued when compiling
git. In particular, warnings about the implicit declaration of the
memmem(), strlcpy() and strcasestr() functions. As an example:

    CC archive.o
archive.c: In function ‘format_subst’:
archive.c:44:3: warning: implicit declaration of function ‘memmem’ [-Wimplicit-function-declaration]
   b = memmem(src, len, "$Format:", 8);
   ^
archive.c:44:5: warning: assignment makes pointer from integer without a cast [enabled by default]
   b = memmem(src, len, "$Format:", 8);
     ^

I haven't spent too long on this, but it appears that the _XOPEN_SOURCE
setting now trumps _GNU_SOURCE and _BSD_SOURCE settings. (I am guessing
that /usr/lib/gcc/x86_64-pc-cygwin/4.8.3/include-fixed/sys/cdefs.h was
changed recently to reflect the new priority).

Anyway, based on that quick squint, I changed git-compat-util.h, thus:

    diff --git a/git-compat-util.h b/git-compat-util.h
    index 400e921..cef2691 100644
    --- a/git-compat-util.h
    +++ b/git-compat-util.h
    @@ -75,7 +75,8 @@
     # endif
     #elif !defined(__APPLE__) && !defined(__FreeBSD__) && !defined(__USLC__) && \
           !defined(_M_UNIX) && !defined(__sgi) && !defined(__DragonFly__) && \
    -      !defined(__TANDEM) && !defined(__QNX__) && !defined(__MirBSD__)
    +      !defined(__TANDEM) && !defined(__QNX__) && !defined(__MirBSD__) && \
    +      !defined(__CYGWIN__)
     #define _XOPEN_SOURCE 600 /* glibc2 and AIX 5.3L need 500, OpenBSD needs 600 for S_ISLNK() */
     #define _XOPEN_SOURCE_EXTENDED 1 /* AIX 5.3L needs this */
     #endif

... which fixed up the build for me.

However, I haven't run any tests yet. Also, I would need to check
this out on 32-bit cygwin (I haven't booted that laptop into Win XP
for quite some time!).

Hmm, I don't really know if this is an unintended side-effect of a
recent change to cygwin (or a bug), but I couldn't see any mention
of this on the cygwin mailing list. (I don't intend to report this
to that mailing list; I don't want to subscribe to (yet another)
busy list). :(

ATB,
Ramsay Jones

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]