From: Eric Blake <eblake@redhat.com>
To: cygwin@cygwin.com
Subject: Re: ssize_t
Date: Thu, 22 Dec 2016 20:14:00 -0000 [thread overview]
Message-ID: <3cd8f4f9-2d22-6018-9f84-6a1312042997@redhat.com> (raw)
In-Reply-To: <deac8be3-fa7b-1716-0f2b-6974b183ba26@gmail.com>
[-- Attachment #1.1: Type: text/plain, Size: 877 bytes --]
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
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 604 bytes --]
next prev parent reply other threads:[~2016-12-22 20:14 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-22 19:40 ssize_t Marco Atzeri
2016-12-22 20:14 ` Eric Blake [this message]
2016-12-22 20:19 ` ssize_t Eric Blake
2016-12-22 22:25 ` ssize_t Marco Atzeri
2016-12-22 20:51 ` ssize_t Hans-Bernhard Bröker
2016-12-22 21:11 ` ssize_t Eric Blake
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3cd8f4f9-2d22-6018-9f84-6a1312042997@redhat.com \
--to=eblake@redhat.com \
--cc=cygwin@cygwin.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).