[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference smurf::dec_mls_plus

Title:dec_mls_plus
Moderator:SMURF::BAT
Created:Mon Nov 29 1993
Last Modified:Fri Jun 06 1997
Last Successful Update:Fri Jun 06 1997
Number of topics:534
Total number of notes:2544

500.0. "wchar_t Header file problems with DEC MLS+ 4.0" by SMURF::BAT (Segui la tua beatitudine) Thu May 08 1997 21:53

From:	US2RMC::"CWOLF@us.oracle.com" "CWOLF.US.ORACLE.COM"  8-MAY-1997 17:40:57.60
To:	smurf::bat, thomson@zk3.dec.com
CC:	NLIANG.US.oramail@us.oracle.com
Subj:	Header file problems with DEC MLS+ 4.0

Some .c files of Oracle do the following: 
 
#include /usr/include/stddef.h 
        : 
        : 
        : 
#include /usr/include/X11/Xlib.h 
        : 
        : 
        : 
 
when I compile it, I got this error: 
 
/usr/lib/cmplrs/cc/cfe: Error: /usr/include/X11/Xlib.h, line 96: redeclaration  
o 
f 'wchar_t'; previous declaration at line 93 in file '/usr/include/stddef.h'  
(3. 
1.2.3) 
 typedef unsigned long wchar_t; 
 ----------------------^ 
 
The Xlib.h from 3.2 looks like: 
#ifndef X_WCHAR 
#include <stddef.h> 
#else 
/* replace this with #include or typedef appropriate for your system */ 
#include <stddef.h> 
#endif 
 
The Xlib.h from 4.0 looks like: 
#ifndef X_WCHAR 
#include <stddef.h> 
#else 
/* replace this with #include or typedef appropriate for your system */ 
typedef unsigned long wchar_t; 
#endif 
 
 
For now we modified the 4.0 Xlib.h to look like the lines from the 3.2  
version.  Is there anyway to resolve this without changing system 
header files? 
 
Thanks, 
 
	-Chris 
 
+------------------------------------------------------------------------+ 
| ORACLE Corporation                                                     | 
|                                                  cwolf@us.oracle.com   | 
| Chris Wolf, Senior Software Engineer             Voice +1.415.506.2529 | 
| World Wide Government & Education                Fax   +1.415.506.7800 | 
| Products Division                                                      | 
+------------------------------------------------------------------------+

% ====== Internet headers and postmarks ======
% Received: from mail13.digital.com by us2rmc.zko.dec.com (5.65/rmc-22feb94) id AA12397; Thu, 8 May 97 17:30:00 -0400
% Received: from inet16.us.oracle.com by mail13.digital.com (8.7.5/UNX 1.5/1.0/WV) id RAA16967; Thu, 8 May 1997 17:24:04 -0400 (EDT)
% Received: from erseq6.us.oracle.com (erseq6.us.oracle.com [138.2.202.101]) by inet16.us.oracle.com (8.8.5/8.8.5) with SMTP id OAA29250; Thu, 8 May 1997 14:08:20 -0700 (PDT)
% Received:  by erseq6.us.oracle.com (8.6.13/37.7) id RAA08515; Thu, 8 May 1997 17:06:13 -0400
% Message-Id: <199705082106.RAA08515@erseq6.us.oracle.com>
% Date: 08 May 97 17:03:40 -0400
% From: "CWOLF.US.ORACLE.COM" <CWOLF@us.oracle.com>
% To: smurf::bat, thomson@zk3.dec.com
% Subject: Header file problems with DEC MLS+ 4.0
% Cc: NLIANG.US.oramail@us.oracle.com
% Mime-Version: 1.0
% X-Mailer: Oracle InterOffice (version 4.0.4.0.26)
% Content-Transfer-Encoding: 7bit
% Content-Type: text/plain; charset="US-ASCII"
    
T.RTitleUserPersonal
Name
DateLines
500.1dave's looking into itSMURF::BATSegui la tua beatitudineThu May 08 1997 21:5311
From:	SMURF::BAT          "Barbara A. Thomson ZKO3-2/X46 1-2955"  8-MAY-1997 17:52:03.11
To:	NM%US2RMC::"CWOLF@us.oracle.com"
CC:	NM%US2RMC::"nliang@us.oracle.com",BAT
Subj:	re: Header file problems with DEC MLS+ 4.0


	We just compared with the latest DU pool, and it looks the
	same.  While we do a cc -E, could you check to determine
	if any of the flags that might turn on X_NOT_STDC_ENV
	are getting turned on?  Those flags are in /usr/include/X11/Xosdefs.h
    
500.2chris' command lineSMURF::BATSegui la tua beatitudineTue May 13 1997 00:4855
From:	US2RMC::"CWOLF@us.oracle.com" "CWOLF.US.ORACLE.COM"  8-MAY-1997 19:42:25.99
To:	smurf::bat
CC:	
Subj:	Re: RE: Header file problems with DEC MLS+ 4.0



Barbara, 
 
Here is the command line we're using: 
 
cc -c  -O0  -oldc -Wf,-XNd15000,-XNp15000,-T100 -std1 -non_shared -DOSF1 
-DA_OSF -G8  -D_NO_PROTO -DuiXT -DX11R5 -DuiMOTIF -DuiMOTIF_1_2 -DuiXPM 
-DNO_XPM -DMM_EXT 
 
I couldn't reproduce the problem in a small test program. 
 
 
Thanks, 
 
	-Chris 
 
 
 
+------------------------------------------------------------------------+ 
| ORACLE Corporation                                                     | 
|                                                  cwolf@us.oracle.com   | 
| Chris Wolf, Senior Software Engineer             Voice +1.415.506.2529 | 
| World Wide Government & Education                Fax   +1.415.506.7800 | 
| Products Division                                                      | 
+------------------------------------------------------------------------+

--=_ORCL_19551620_0_11919705082014540
Content-Type:message/rfc822

Date: 08 May 97 18:01:22
From:"Barbara A. Thomson ZKO3-2/X46 1-2955 <bat@smurf.ENET.dec.com>" <bat@smurf.ENET.dec.com>
To:nliang@us.oracle.com,cwolf@us.oracle.com
Subject:RE: Header file problems with DEC MLS+ 4.0
Cc:nliang@us.oracle.com,bat@smurf.ENET.dec.com
MIME-Version: 1.0
Content-Transfer-Encoding:7bit
Content-Type:text/plain; charset="US-ASCII"


	BTW, X_NOT_STDC_ENV is not defined in the normal MLS+ on an
	Alpha environment.  In V3.1A there was no distinction,
	evidently there are platform distinctions in V4.0A (this
	is a base issue, not MLS+ issue).  

	We haven't found anything in our header files just now
	that would have turned it on... can you check yours?
	thanks

    
500.3input from dcj wasSMURF::BATSegui la tua beatitudineTue May 13 1997 19:2720
	Hi Chris,

	Some of those switches turn on things I don't have in
	my database. 

	I got some suggestions from Dave about how to find
	the definition that is turning on the other definition:

	1.	check all your files to see if you have
		a Mips or vax (watch capitalization) turned on

	2.	or send us the include files from the offending files
		and we'll search.

	Does this happen on a vanilla DU box?

	Thanks
	BAT
    
500.4dave hasn't heard of it -- it's only in X stuffSMURF::BATSegui la tua beatitudineMon May 19 1997 23:1825
From:	US2RMC::"CWOLF@us.oracle.com" "CWOLF.US.ORACLE.COM" 16-MAY-1997 21:08:13.56
To:	smurf::bat
CC:	NLIANG.US.oramail@us.oracle.com
Subj:	Re: RE: network operations can't be killed on MLS+ 4.0


    	[ excerpted ]

>P.S. Whatever happened re: the ifdef that is not supposed 
>to be there? 
 
Norman found the problem:   
 
At the bottom of the new (4.0) version of <X11/Xosdefs.h> is: 
 
#if defined(nec_ews_svr2) || defined(SX) || defined(PC_UX) 
#define X_NOT_POSIX 
#define X_NOT_STDC_ENV 
#endif 
 
 
The probelm is that Oracle also defines something called "SX".  What is 
"SX" for DEC?  My guess it's some funky OS type that doesn't mean anything 
to DEC, but rather is a newly supported OS for X11. 
    
500.5luck has nothing to do with itSMURF::BATSegui la tua beatitudineTue May 20 1997 16:3117
From:	ALPHA::wiele "John Wiele USG" 20-MAY-1997 10:32:56.85
To:	19.807::bat, alpha::wiele
CC:	wiele@DEC:.zko.alpha
Subj:	Re:  Notefile DEC_MLS_PLUS Note 500.4

Good deduction.  If you look in src/xc/config/cf/nec.cf, you will find
that SX is the OS definition for the NEC SX3 Architecture, whatever
that is.  Apparently it doesn't have a POSIX and ANSI C environment.
I guess that Oracle can change their variable, or they can edit
Xosdefs.h, or they can manipulate the #defines around an explicit
include of Xosdefs.h.

Good luck.

				-JW

    
500.6from chrisSMURF::BATSegui la tua beatitudineTue May 20 1997 20:1121
From:	US2RMC::"CWOLF@us.oracle.com" "CWOLF.US.ORACLE.COM" 20-MAY-1997 14:38:10.68
To:	smurf::bat
CC:	
Subj:	Re: luck has nothing to do with it IMO


Thanks for checking.  We won't change our definition of SX because it is 
at the top of a large hierarchy of nested include files.  I guess the thing 
to do which has the least impact, is to modify Xosdefs.h and add  
|| !defined(ORACLE) to qualify that conditional.  BTW, luck has nothing 
to do with what? 
 
	-Chris  
 
+------------------------------------------------------------------------+ 
| ORACLE Corporation                                                     | 
|                                                  cwolf@us.oracle.com   | 
| Chris Wolf, Senior Software Engineer             Voice +1.415.506.2529 | 
| World Wide Government & Education                Fax   +1.415.506.7800 | 
| Products Division                                                      | 
+------------------------------------------------------------------------+
500.7to chrisSMURF::BATSegui la tua beatitudineTue May 20 1997 20:1224
From:	SMURF::BAT          "Barbara A. Thomson ZKO3-2/X46 1-2955" 20-MAY-1997 15:43:13.93
To:	US2RMC::"CWOLF@us.oracle.com"
CC:	BAT
Subj:	Re: luck has nothing to do with it IMO


	luck has nothing to do with whether your choice works or not.

	two questions:

	1) re: modify Xosdefs.h and add || !defined(ORACLE) to qualify 
    	that conditional

	i presume you mean something like:

	#if defined(FOO) || defined(SX) && !defined(ORACLE) || defined(FUD)

	2) at any rate, changing Xosdefs.h shouldn't make any difference
	except during installs -- do you guys use the "subset" mechanism
	with setld to install Oracle?  if yes, you can modify the 
	.scp file to include a procedure to make sure that the above
	change is made to Xosdefs.h -- will this affect any people
	installing X apps on top?  wouldn't think so, but not sure.
    
500.8still no "miracle cure"SMURF::BATSegui la tua beatitudineTue May 20 1997 21:1427
From:	SMURF::BAT          "Barbara A. Thomson ZKO3-2/X46 1-2955" 20-MAY-1997 17:09:30.49
To:	US2RMC::"cwolf@us.oracle.com"
CC:	BAT
Subj:	DU documentation


	Do you get the regular digital unix documentation,
	either on the CD or however?

	I have been searching the notes files, and querying people
	here, but so far I haven't come up with a light bulb
	among them.

	I'm sending you the DU V4.0 (not V4.0A) release notes
	which has a section on the DEC C compiler.  
	
	If things are not working with -oldc then we should
	do those things first, and see if we can find the common
	thread/error in the header files.

	Kris says that the header files in MLS+ are supposedly
	identical (except in the security stuff) with the base OS.
	Unless of course we made a merge mistake.

	Later
	BAT
    
500.9what is the really right way to do this? argue namespace with X?SMURF::BATSegui la tua beatitudineWed May 21 1997 18:4326
    re: .7
    
From:	US2RMC::"CWOLF@us.oracle.com" "CWOLF.US.ORACLE.COM" 20-MAY-1997 18:27:08.36
To:	smurf::bat
CC:	ASCHEN.US.oramail@us.oracle.com, NLIANG.US.oramail@us.oracle.com
Subj:	Re: luck has nothing to do with it IMO

>i presume you mean something like: 
> 
>	#if defined(FOO) || defined(SX) && !defined(ORACLE) || defined(FUD) 
Yes, exactly. 
 
 
> 
>	2) at any rate, changing Xosdefs.h shouldn't make any difference 
>	except during installs -- do you guys use the "subset" mechanism 
>	with setld to install Oracle?  if yes, you can modify the  
>	.scp file to include a procedure to make sure that the above 
>	change is made to Xosdefs.h -- will this affect any people 
>	installing X apps on top?  wouldn't think so, but not sure. 
  
Very good point, although the customer can only relink (not recompile) 
Oracle products, they will run into trouble if SX is defined in the  
header files we send to the customer.  We'll check into it. 
 
	-Chris