[16417] in Hotline Meeting

home help back first fref pref prev next nref lref last post

I need some help with X11R5 and rsaix

daemon@ATHENA.MIT.EDU (troxel@mtl.mit.edu)
Sun Jun 13 17:05:12 1993

Reply-To: troxel@mtl.mit.edu
Date: Sun, 13 Jun 93 17:05:05 -0400
From: troxel@mtl.mit.edu
To: hotline@Athena.MIT.EDU, lavin@Athena.MIT.EDU

The rsaix compiler complains about redefining index and rindex
which are redefined (defined) in the athena inc;lude files.
Here is the error comment from rsaix

-----
augmented-troxel% make
        xlc -qro -D_ALL_SOURCE    -I/usr/athena/include   -Dibm -DSYSV  -DAPPCLA
SS=\"Fsmd\"  -DXFILESEARCHPATH=\"/mit/6.111/lib/%T/%N\"  -c dialogs.c
"/usr/athena/include/X11/Xos.h", line 60.0: 1506-213 (S) Macro name index cannot
 be redefined.
"/usr/athena/include/X11/Xos.h", line 61.0: 1506-213 (S) Macro name rindex canno
t be redefined.
The error code from the last failed command is 1.

Make Quitting.
augmented-troxel% make
        xlc -qro -D_ALL_SOURCE    -I/usr/athena/include   -Dibm -DSYSV  -DAPPCLA
SS=\"Fsmd\"  -DXFILESEARCHPATH=\"/mit/6.111/lib/%T/%N\"  -c dialogs.c
"/usr/athena/include/X11/Xos.h", line 60.0: 1506-213 (S) Macro name index cannot
 be redefined.
"/usr/athena/include/X11/Xos.h", line 61.0: 1506-213 (S) Macro name rindex canno
t be redefined.
The error code from the last failed command is 1.

Make Quitting.
----
Here is the fron of /usr/athena/include/X11/Xos.h
(with X11R5 attached)
/*
 * Just about everyone needs the strings routines.  We provide both forms here,
 * index/rindex and strchr/strrchr, so any systems that don't provide them all
 * need to have #defines here.
 */

#ifndef X_NOT_STDC_ENV
#include <string.h>
#define index strchr
#define rindex strrchr
#else
#ifdef SYSV
#include <string.h>
#define index strchr
#define rindex strrchr
#else
----
Can you either fix the include file, tell me how to get around it, or
tell me what I am doing wrong??? 

I am usually at MIT on Mon, Wed, and Thurs, this summer and would be
glad to talk to anyone if that would be helpful.

I don't understand why rsaix is so fussy. Why shouldn't one be
able to redefine macros if one wants to.


home help back first fref pref prev next nref lref last post