From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fee84,fbbfd638fdf3c1ea X-Google-Attributes: gidfee84,public X-Google-ArrivalTime: 1995-03-10 13:59:59 PST Path: bga.com!news.sprintlink.net!pipex!sunic!sunic.sunet.se!news.chalmers.se!ae.chalmers.se!tl From: tl@ae.chalmers.se (Torbj|rn Lindgren) Newsgroups: comp.unix.osf.osf1 Subject: Re: compiling tex under osf v3.0 Date: 10 Mar 1995 14:03:55 GMT Organization: Dept. of Applied Electronics, Chalmers Univ. of Technology Message-ID: <3jpm8b$j1@nyheter.chalmers.se> References: NNTP-Posting-Host: ernst2.ae.chalmers.se In article , Allan Gottlieb wrote: >I brought over the source distribution of tex from ftp.shsu.edu. It >would not compile with either the Digital cc or gcc. The complaint is >about inconsistencies in the include files (usr/include). I realize >this is not enough details for a but report but that is not my >intention. I have not looked at it closely enough to ask for help in >fixing the problem. I just want to know if anyone has compiled >web2d-6.1 with either compiler and if source changes were needed. *WHAT* inconsistencies? If you had posted the exakt error message it would be much easier to diagnose!!! I compiled it under DEC OSF/1 2.0 (not 3.0), and the only problem I had was the one that is mentioned in 'web2c-6.1/kpathsea/INSTALL'... Try defining NO_FOIL_X_WCHAR_T, it should be defined on all machines that doesn't have a broken X and/or compiler! Here are the relevant part of the INSTALL file. `wchar_t' --------- The upshot of all the following is that if you get error messages regarding `wchar_t', try defining `NO_FOIL_X_WCHAR_T'. This is reported to be necessary on Linux. `wchar_t' has caused infinite trouble. None of my code ever uses `wchar_t'; all I want to do is include X header files and various system header files, compiling with GCC. This seems an impossible task. The X11R5 `' and GCC's `' have conflicting definitions for wchar_t. The particulars: `' from MIT X11R5 defines `wchar_t' if `X_WCHAR' is defined, which is defined if `X_NOT_STDC_ENV' is defined, and we define *that* if `STDC_HEADERS' is not defined (`configure' decides if STDC_HEADERS gets defined). But when compiling with gcc on SunOS 4.1.x, `STDC_HEADERS' is not defined (`string.h' doesn't declare the `mem'* functions), so we do get X's `wchar_t'--and we also get gcc's `wchar_t' from its `'. Result: conflicting definitions. On the other hand, SunOS 4.1.1 with some other X configurations actually needs GCC to define `wchar_t', and fails otherwise. My current theory is to define `wchar_t' to a nonsense symbol before the X include files are read; that way its definition (if any) will be ignored by other system include files. Going along with that, define `X_WCHAR' to tell X not to use `', that we've already included, but instead to make its own definition. But this is not the end of the story. The X11 include files distributed with DG/UX 5.4.2 for the Aviion have been modified to include `<_int_wchar_t.h>' if `X_WCHAR', so our `#define' will not have any typedef to change--but the uses of `wchar_t' in the X include files will be changed to reference this undefined symbol. So there's nothing to foil in this case; I don't know how to detect this automatically, so it's up to you to define `NO_FOIL_X_WCHAR_T' yourself.