Description of problem: The changes to regex.h create undefined symbols for the buffer and allocated fields of regex_t structures in regexp,h when -D_USE_GNU is not in use. The __REPB_PREFIX macro results in a '__' prefix to the fields of the regex_t structure in such a case. Version-Release number of selected component (if applicable): glibc-headers-2.8-3 How reproducible: Always. Steps to Reproduce: 1. Complile the attached virtual.i preprocessed source from xview-3.2p1.4/clients/olvwm-4.1/virtual.c. This was generated with the command... gcc -m32 -O2 -fno-strength-reduce -fno-strict-aliasing -I/home/howarth/rhdev/BUILD/xview-3.2p1.4/build/include -I/tmp/xview-3.2p1.4-21.2.fc9-soft/usr/openwin/include -I/tmp/xview-3.2p1.4-21.2.fc9-soft/usr/openwin/include -I. -I/usr/include -Dlinux -D__i386__ -D_POSIX_C_SOURCE=199309L -D_POSIX_SOURCE -D_XOPEN_SOURCE -D_BSD_SOURCE -D_SVID_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DFUNCPROTO=15 -DNARROWPROTO -DOW_I18N_L3 -DIDENT -DXPM -DSHAPE -DXVIEW32 -DMAXPID=32768 -I/usr/include/X11 -DOPENWINHOME_DEFAULT=\"/usr/openwin\" -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i386 -mtune=generic -fasynchronous-unwind-tables -save-temps -c -o virtual.o virtual.c Actual results: I expected no errors in the compilation. Expected results: The following errors occurred... ./regexp.h: In function ‘compile’: ./regexp.h:132: error: ‘regex_t’ has no member named ‘buffer’ ./regexp.h:133: error: ‘regex_t’ has no member named ‘allocated’ ./regexp.h:133: error: ‘regex_t’ has no member named ‘buffer’ Additional info: I believe that the regexp.h header needs to be made aware of the usage of the __REPB_PREFIX macro in regex.h when the fields of a egex_t structure is declared. A fix that works here is... --- regexp.h 2008-05-14 10:17:11.000000000 -0400 +++ regexp.h.patched 2008-05-14 09:45:13.000000000 -0400 @@ -129,8 +129,13 @@ __expr_ptr = (regex_t *) expbuf; /* The remaining space in the buffer can be used for the compiled pattern. */ +#ifdef __USE_GNU __expr_ptr->buffer = expbuf + sizeof (regex_t); __expr_ptr->allocated = endbuf - (char *) __expr_ptr->buffer; +#else + __expr_ptr->__buffer = expbuf + sizeof (regex_t); + __expr_ptr->__allocated = endbuf - (char *) __expr_ptr->__buffer; +#endif while ((__ch = (GETC ())) != eof) { @@ -198,7 +203,11 @@ } /* Everything is ok. */ +#ifdef __USE_GNU RETURN ((char *) (__expr_ptr->buffer + __expr_ptr->used)); +#else + RETURN ((char *) (__expr_ptr->__buffer + __expr_ptr->used)); +#endif } #endif
Created attachment 305367 [details] preprocessed source from xview-3.2p1.4/clients/olvwm-4.1/virtual.c
Fixed in rawhide, will be eventually backported to F9 updates.
glibc-2.8-7 has been submitted as an update for Fedora 9
glibc-2.8-8 has been pushed to the Fedora 9 stable repository. If problems still persist, please make note of it in this bug report.