ssize_t

Eric Blake eblake@redhat.com
Thu Dec 22 20:14:00 GMT 2016


On 12/22/2016 01:39 PM, Marco Atzeri wrote:
> Hi guys,
> 
> building latest Imagemagick, the test for ssize_t is now failing with a
> puzzling
> 
>  $ gcc  ssize_t.c -o ssize_t
> ssize_t.c: In function ‘main’:
> ssize_t.c:115:22: error: expected expression before ‘)’ token
>  if (sizeof ((ssize_t)))
>                       ^
> 
> any clue what to look for ?

That's probably SUPPOSED to happen.

Autoconf tests for type names by comparing:

sizeof(TYPE) /* should compile */

with

sizeof((TYPE)) /* should not compile */

If 'TYPE' is instead a constant, then both forms will compile.  So it
allows you to probe whether an unknown string (in this case 'ssize_t')
is a type name or some other macro that expands into a constant.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 604 bytes
Desc: OpenPGP digital signature
URL: <http://cygwin.com/pipermail/cygwin/attachments/20161222/84647448/attachment.sig>


More information about the Cygwin mailing list