[gnu.g++.lib.bug] libg++ patches

ronald@UCDAVIS.EDU (06/04/89)

>>!   if (rep->len > 0)
>>! #if defined(i386)
>>!     memset(rep->s, 0, rep->sz * sizeof(short));
>>! #else
>>!     bzero(rep->s, rep->sz * sizeof(short));
>>! #endif
>
>This isn't the right way to do this, as i386 isn't the same thing as
>USG.  There are systems using the i386 processor which run BSD (at
>least Sequent) and many many systems running USG which are not
>i386-based.
>
>I don't know what #ifdefs should be used, since there doesn't seem to
>be a standard USG define.  Maybe one should just force users to
>explicitly specify USG in their Makefiles and use #ifdef USG in the
>g++-include files ?  That doesn't seem a very good alternative.
>
>Anyone got any ideas ?

That is exactly the problem with the include files.  I was a little leery
of doing it this way, but I expected other users to improve upon my donated
work.  I believe (but am not sure, therefore I didn't commit to anything)
Sequent defines the symbol 'sequent'.  It would be easy to change that line
to read:

	#if defined(i386) && !defined(sequent) ... etc.

should that assertion turn out to be true; and that is exactly what I expected
users to do with my patches.

The other alternative would be to provide two separate headers, one for
BSD and one for System V; but that will most probably be an unacceptable
solution.

--
Ronald Cole               | uucp:     cvms!ronald       voice: +1 916 895 8321
Senior Software Engineer  | internet: csusac!cvms!ronald@ucdavis.edu
CVM Systems               +----------------------------------------------------
	"No sex, please, we're software engineers." - Michael Swaine