From: Jan Kratochvil <jan.kratochvil@redhat.com>
To: Joel Brobecker <brobecker@adacore.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [RFA/Python] Fix procfs.c build failure on 32bit solaris (_FILE_OFFSET_BITS)
Date: Tue, 23 Nov 2010 03:25:00 -0000 [thread overview]
Message-ID: <20101123032531.GA21016@host0.dyn.jankratochvil.net> (raw)
In-Reply-To: <1290474834-1945-1-git-send-email-brobecker@adacore.com>
On Tue, 23 Nov 2010 02:13:54 +0100, Joel Brobecker wrote:
> +#ifdef _FILE_OFFSET_BITS
> +#define OLD_FILE_OFFSET_BITS _FILE_OFFSET_BITS
> #undef _FILE_OFFSET_BITS
> +#endif
>
> #if HAVE_LIBPYTHON2_4
> #include "python2.4/Python.h"
> @@ -62,6 +69,13 @@ typedef int Py_ssize_t;
> #error "Unable to find usable Python.h"
> #endif
>
> +/* Restore the original _FILE_OFFSET_BITS value if applicable. */
> +#ifdef OLD_FILE_OFFSET_BITS
> +#undef _FILE_OFFSET_BITS
> +#define _FILE_OFFSET_BITS OLD_FILE_OFFSET_BITS
> +#undef OLD_FILE_OFFSET_BITS
> +#endif
> +
Without any comments on the Solaris specifics such saving of macro content
cannot work. cpp macros expand only during their final use, not as right hand
side of a #define line.
_FILE_OFFSET_BITS will have content `OLD_FILE_OFFSET_BITS' at the end, if it
had any content in the beginning.
Regards,
Jan
next prev parent reply other threads:[~2010-11-23 3:25 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-11-23 1:14 Joel Brobecker
2010-11-23 3:25 ` Jan Kratochvil [this message]
2010-11-23 12:42 ` Pedro Alves
2010-11-23 15:22 ` Tom Tromey
2010-11-23 16:29 ` Pedro Alves
2010-11-23 17:23 ` Phil Muldoon
2010-11-23 17:47 ` Pedro Alves
2010-11-24 17:20 ` Joel Brobecker
2010-11-25 13:12 ` Pedro Alves
2010-11-24 18:25 ` Tom Tromey
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=20101123032531.GA21016@host0.dyn.jankratochvil.net \
--to=jan.kratochvil@redhat.com \
--cc=brobecker@adacore.com \
--cc=gdb-patches@sourceware.org \
/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