This is the mail archive of the cygwin mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [ANNOUNCEMENT] NEW: libtool-2.2.2-2 / Updated: libltdl7-2.2.2-2

Charles Wilson wrote:
Yaakov (Cygwin Ports) wrote:
./.libs/lt-foo.c:263: warning: string length `4368' is greater than the
length `4095' ISO C99 compilers are required to support

This one can be fixed by splitting the string into two pieces. I'm working on a patch for that.

./.libs/lt-foo.c: In function `main':
./.libs/lt-foo.c:288: warning: implicit declaration of function `_setmode'

This one is already fixed in current git.

./.libs/lt-foo.c: In function `chase_symlinks':
./.libs/lt-foo.c:577: warning: implicit declaration of function `realpath'
./.libs/lt-foo.c:577: warning: assignment makes pointer from integer
without a cast

These two are the same issue... (1) realpath() is invoked in a section of code that is #ifdef __CYGWIN__ (2) the wrapper source code unconditionally #includes stdlib.h (3) cygwin's stdlib.h declares realpath.

...but it does so inside a #ifndef __STRICT_ANSI__ block. And -std=c99 turns on __STRICT_ANSI__, while -std=gnu99 does not.

Posix says that realpath() will be declared if #include <stdlib.h>
Ansi says nothing about realpath(), so STRICT_ANSI requires that realpath is NOT declared when #include <stdlib.h>

I guess the cwrapper should add a section like this, for __CYGWIN__

#if defined __CYGWIN__
# if defined __STRICT_ANSI__
char *realpath (const char *, char *);
# endif

NOTE: usually you *want* the cwrapper to be compiled with the same CFLAGS that your target application needs. OTOH, if you explicitly set your compatibility flags (-c99, _POSIX_C_SOURCE=200112L, -ansi, etc) "too low" it is possible something's going to break.

Or some pathological project could put '-Dprintf=exit' into CFLAGS. You can't guard against everything.

But we ought to be compatible with c99.


-- Unsubscribe info: Problem reports: Documentation: FAQ:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]