[PATCH] Reorganize inclusions in regex and some synchronization [take 2]

Paolo Bonzini paolo.bonzini@polimi.it
Thu Feb 20 08:45:00 GMT 2003


> Don't send me patches for your version of the code.  The patch doesn't
> apply and even after correcting it the compilation fails.

Redone against current CVS.

This patch also fixes a few long standing problems with compiling regex 
outside of glibc:
- lack of a #define for __wcrtomb (to be used outside libc)
- a typo in the #define for __mempcpy
- two occurrences of a construct that are rejected by some compilers, notably 
SGI CC, which fail to compute correctly the type of a comma expression.

2002-02-20  Paolo Bonzini <bonzini@gnu.org>

	* posix/regcomp.c: remove inclusions from here...
	* posix/regexec.c: ... here...
	* posix/regex_internal.c: ... and here...
	* posix/regex_internal.h: and move them here
	* posix/regex.c: only include sys/types.h before regex.h.
	Include regex_internal.h here.  Include regex_internal.c
	before regcomp.c and regexec.c (might expose more
	opportunities to the C compiler).

	* posix/regcomp.c (parse_expression): fix construct
	rejected by SGI CC

	* posix/regex_internal.h [!_LIBC] (__mempcpy): fix typo
	[!_LIBC] (__wcrtomb): new definition
	[!_LIBC]: conditionalize enabling of I18N on HAVE_WCSCOLL and
	HAVE_LOCALE_H as well

Paolo
-------------- next part --------------
A non-text attachment was scrubbed...
Name: extract-regex-inclusions.patch
Type: text/x-diff
Size: 7898 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20030220/074a96a2/attachment.bin>


More information about the Libc-alpha mailing list