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: ushort definition

On 09/01/2017 23:30, Hans-Bernhard Bröker wrote:
Am 09.01.2017 um 20:46 schrieb Marco Atzeri:
On 09/01/2017 19:01, Hans-Bernhard Bröker wrote:

the "#define ushort unsigned short" is in the

It seems jasper configuration had not defined __MISC_VISIBLE,
while gdal does.

Neither is supposed to #define __MISC_VISIBLE itself.  cscope finds:

$ cscope -dL1 __MISC_VISIBLE
/usr/include/sys/features.h __MISC_VISIBLE 276 #define __MISC_VISIBLE 1
/usr/include/sys/features.h __MISC_VISIBLE 278 #define __MISC_VISIBLE 0

So let's look at a bit of context:

$ sed -n -e '270,280p' /usr/include/sys/features.h
#define __LARGEFILE_VISIBLE     1
#define __LARGEFILE_VISIBLE     0

#define __MISC_VISIBLE          1
#define __MISC_VISIBLE          0

I.e. if jasper didn't have __MISC_VISIBLE on, it must have overridden
the default feature test state of _DEFAULT_SOURCE.

I will bet on a "-std=C99" somewhere

The lesson to be had from all this: #defining types is just wrong. Don't
do it.  typedef exists to be used.

Thanks again

Problem reports:
Unsubscribe info:

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