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

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

That expectation would only be justified if you added the option `-dD'
to your command.

`-C' only preserves comments, but not the #define in the source.

Thanks Hans,
I was missing that.

FWIW, in cases like this, at least for 'automake' equipped projects, I would probably just 'make cscope' and then used the '1' query to find all definitions of 'ushort' visible to the source. Letting automake build the database makes sure all the include paths are in. But then again, I'm evidently biased, having been cscope's maintainer for quite a while now ;-)

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.

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

Problem reports:
Unsubscribe info:

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