win32 libio/gen-param fix

Mumit Khan khan@xraylith.wisc.EDU
Wed Feb 10 08:00:00 GMT 1999


Jeffrey A Law <law@hurl.cygnus.com> writes:
> Wouldn't it be a little better to strip out the problem symbols after the
> if/fi block which appears in your patch, but but before the one that
> actually looks for _*vt...?

Yes, it certainly would. Thanks for catching that. This one defers
deleting named/unique section name until the very end, by which time
it's been encased into .data$<_vt$7filebuf>, and so the regexp pattern
is a bit different.

Wed Feb 10 09:25:48 1999  Mumit Khan  <khan@xraylith.wisc.edu>

	* gen-params (VTABLE_LABEL_PREFIX): Handle windows32. 

Index: gen-params
===================================================================
RCS file: /mounts/sda7/src/gnu/CVSROOT/egcs-dev/libio/gen-params,v
retrieving revision 1.1.1.1
diff -u -3 -p -r1.1.1.1 gen-params
--- gen-params	1999/02/07 23:35:54	1.1.1.1
+++ gen-params	1999/02/10 15:25:11
@@ -124,9 +124,13 @@ if test -z "${NAMES_HAVE_UNDERSCORE}" -o
 	>>dummy.out
       # Now we get rid of the <>, and any other junk on the nm output line.
       # (We get rid of <filebuf> in case nm included debugging output for
-      # class filebuf itself.)  Finally, we select the first line of
-      # the result, and hope that's what we wanted!
-      vtab_name=`${SED} -n -e '/<filebuf>/d' -e 's/^.*<\(.*\)>.*$/\1/p' \
+      # class filebuf itself.)  On windows32, we also need to delete the 
+      # unique sections (.data$_vt$*), otherwise we get the wrong result.
+      # Finally, we select the first line of the result, and hope that's 
+      # what we wanted!
+      vtab_name=`${SED} -n -e '/<filebuf>/d' \
+        -e '/\.data[$_.]<_vt\$7filebuf>/d' \
+        -e 's/^.*<\(.*\)>.*$/\1/p' \
         <dummy.out | ${SED} -n -e '1p'`
       case "${vtab_name}" in
         *7filebuf) echo "#define ${macro_prefix}VTABLE_LABEL_HAS_LENGTH 1" ;;


More information about the Gcc-patches mailing list