[comp.windows.x] X11R2 on Sun 4/110

ndd@romeo.cs.duke.edu (Ned D. Danieley) (08/03/88)

I'm trying to install X11R2 on a 4/110, and I'm getting some strange
error messages from makedepend:

xpr.c, line 103: unknown directive == "#pragma unknown_control_flow(setjmp)"
xpr.c, line 105: unknown directive == "#pragma unknown_control_flow(on_fault)"

The name of the .c file varies, but the lines are always the same (2 per
file). Has anyone seen this? 

Ned Danieley (ndd@sunbar.mc.duke.edu)
Basic Arrhythmia Laboratory
Box 3140, Duke University Medical Center
Durham, NC  27710
(919) 684-6807 or 684-6942

guy@gorodish.Sun.COM (Guy Harris) (08/03/88)

> I'm trying to install X11R2 on a 4/110, and I'm getting some strange
> error messages from makedepend:
> 
> xpr.c, line 103: unknown directive == "#pragma unknown_control_flow(setjmp)"

Nothing strange about that at all; the Sun compiler implements the "#pragma"
directive that appears in recent ANSI C drafts, in order to permit code to
provide "hints" to the optimizer, such as "setjmp can return from another
galaxy, so don't assume you know what values are in the registers when it does
return."  This hint is, in fact, provided in <setjmp.h>.  "makedepend" doesn't
know about this directive, so it pukes.

The following change to "makedepend", which teaches it that "#pragma" exists
(but isn't interesting to it), seemed to work when I built X11R2:

------- def.h -------
*** /tmp/da2147	Tue Aug  2 21:03:05 1988
--- def.h	Sun Mar  6 16:22:44 1988
***************
*** 45,52 ****
  #define	UNDEF		6
  #define	INCLUDE		7
  #define	LINE		8
! #define	IFFALSE		9	/* pseudo value --- never matched */
! #define	INCLUDEDOT	10	/* pseudo value --- never matched */
  
  #ifdef DEBUG
  extern int	debug;
--- 45,53 ----
  #define	UNDEF		6
  #define	INCLUDE		7
  #define	LINE		8
! #define	PRAGMA		9
! #define	IFFALSE		10	/* pseudo value --- never matched */
! #define	INCLUDEDOT	11	/* pseudo value --- never matched */
  
  #ifdef DEBUG
  extern int	debug;

------- main.c -------
*** /tmp/da2150	Tue Aug  2 21:03:05 1988
--- main.c	Fri Jun 10 23:00:14 1988
***************
*** 69,74 ****
--- 69,75 ----
  	"undef",
  	"include",
  	"line",
+ 	"pragma",
  	NULL
  };
  

swick@ATHENA.MIT.EDU (Ralph R. Swick) (08/03/88)

makedepend doesn't currently understand the X3J11 #pragma directive.
I will send you a patch to make it ignore #pragma, which I assume
is coming from one of your system header files.