This is the mail archive of the libstdc++@sourceware.cygnus.com mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

scribbles trying to build the current tree under solaris


Some notes:

* assumes that libio.h is available from /usr/include, since it
does -nostdinc++ when compiling things like src/complexf.cc
made symlink in the build directory for now:
    ln -s /nfs/lisa/homer/brendan/H-solaris2.5/include/g++-2/libio.h .

* CXXFLAGS in src/Makefile.am doesn't offer any default debugging or
optimization for the build; math's does set CFLAGS up with `-g -O2'

* misc-inst.cc should also be done like string was, otherwise linking in
misc-inst.o will drag in floods of stuff, instead of the individual things
that were desired.

* std_fstream.h assumes libio's in use; a little tweaking helps try to make it 
work ok on other systems (like solaris), first by changing file_type to be
FILE instead of _IO_FILE in both os_raw.h and std_fstream.h.  However,
std_fstream.h is implemented on the basis of what libio provides in _IO_FILE.
There are some ways to adjust that further to work with FILE (including use
_IONBF instead of _IO_UNBUFFERED), but there's one clincher so far.  In the
standard's definition of basic_filebuf::basic_filebuf(const char*, openmode),
it uses that `const char*'.  However, under Solaris the fields in its FILE
struct that're appropriate (_ptr and _base) are in fact `unsigned const char*'.
Trying to do an assignment like
	_M_in_cur = _M_file->_ptr;
causes headaches cuz we're changing it from unsigned (_ptr) to signed
(_M_in_cur).  Thoughts?

* configured --disable-shared, then when it installed the resulting
libstdc++.a file was an archive of the .lo files, not the .o files.
Autoconf bug that I seem to remember coming up a while ago, but apparently
didn't get fixed.

* in src/locale.cc, the non-linux definitions for _S_toupper, _S_tolower, and
_S_table aren't usable anymore (we used to quietly accept the warnings about a 
temporary, now they're hard errors).  Presumably those need to be extern
anyway (generated as part of the build), not defined here, since there are no
global versions we can refer to.  I think the initialization of these three
members should be completely `#ifdef __linux__', and do nothing.  The
definitions for other platforms would be provided elsewhere.  (It occurred to
me that we could supply __ctype_toupper and the rest for those other
platforms, pointing at the "real" one for that OS or the one we generate, but
it seems to me that we should be distinctive and not create that kind of
ambiguity---not knowing if the linux-defined `__ctype_toupper' is just Linux,
or for general cases.


Hack:
	1999-01-05  Brendan Kehoe  <brendan@cygnus.com>
	* src/locale.cc (ctype<wchar_t>::_S_{toupper,tolower,table}):
	Don't try to provide non-linux versions, since it's impossible to
	initialize their const references with the integer 0, no matter
	how we try to cast it.

Bad, std_fstream.h uses libio stuff all over the place:
	1999-01-05  Brendan Kehoe  <brendan@cygnus.com>
	* bits/os_raw.h (std::file_type): For non-linux hosts, fall back
	to the common FILE type in the typedef.
	* bits/std_fstream.h (basic_filebuf::file_type): Likewise.



-- 
Brendan Kehoe                                               brendan@cygnus.com
Cygnus Solutions, Sunnyvale, CA                                +1 408 542 9600

Web page: http://www.zen.org/~brendan/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]