From: Paolo Bonzini <paolo.bonzini@lu.unisi.ch>
To: libc-hacker@sourceware.org
Subject: [regex] Provide a default definition of SIZE_MAX
Date: Tue, 06 Dec 2005 08:50:00 -0000 [thread overview]
Message-ID: <4395513E.7030502@lu.unisi.ch> (raw)
[-- Attachment #1: Type: text/plain, Size: 308 bytes --]
regex is currently using SIZE_MAX. However, first of all this is
relying on stdint.h being included implicitly (via other headers)
because that's where SIZE_MAX is defined. Second, regex cannot rely on
C99 headers. This patch fixes this problem by providing a default
definition of this macro.
Paolo
[-- Attachment #2: undefined-size-max.patch --]
[-- Type: text/plain, Size: 470 bytes --]
2005-12-06 Paolo Bonzini <bonzini@gnu.org>
* posix/regex_internal.h (SIZE_MAX): Provide a default definition.
--- regex_internal.h.old 2005-12-06 09:47:00.000000000 +0100
+++ regex_internal.h 2005-12-06 09:46:37.000000000 +0100
@@ -120,6 +120,10 @@
# define __attribute(arg)
#endif
+#ifndef SIZE_MAX
+#define SIZE_MAX ((size_t)-1)
+#endif
+
extern const char __re_error_msgid[] attribute_hidden;
extern const size_t __re_error_msgid_idx[] attribute_hidden;
next reply other threads:[~2005-12-06 8:50 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-12-06 8:50 Paolo Bonzini [this message]
2005-12-11 5:59 ` Ulrich Drepper
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=4395513E.7030502@lu.unisi.ch \
--to=paolo.bonzini@lu.unisi.ch \
--cc=libc-hacker@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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).