On Sun, 16 Sep 2018 10:39:20 -0700, Charles Mills wrote:

>Otherwise I guess you need the classic solution with some character legal in C 
>macro names:
>
>#ifdef __MVS__
>       #define MACRONAME __macroname__
>#else
>       #define MACRONAME @macroname@
>#endif
>
>Looks to me like @ is legal in symbol names, but I could easily be wrong.
> 
Doesn't seem that way:
556 $ gcc --version
gcc (Debian 4.9.2-10+deb8u1) 4.9.2
Copyright (C) 2014 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

557 $ make foo
cc     foo.c   -o foo
foo.c:2:19: error: stray ‘@’ in program
 #define MACRONAME @macroname@
                   ^
foo.c:4:5: note: in expansion of macro ‘MACRONAME’
 int MACRONAME;
     ^
foo.c:2:29: error: stray ‘@’ in program
 #define MACRONAME @macroname@
                             ^
foo.c:4:5: note: in expansion of macro ‘MACRONAME’
 int MACRONAME;
     ^

However, in an arbitrary "makefile.in":
# $LynxId: makefile.in,v 1.118 2011/06/12 18:36:28 tom Exp $
##makefile for lynx

SHELL           = @CONFIG_SHELL@
CDPATH          = .

.SUFFIXES:
@SET_MAKE@
prefix          = @prefix@
exec_prefix     = @exec_prefix@
top_srcdir      = @top_srcdir@
srcdir          = @srcdir@
builddir        = .
VPATH           = $(srcdir)

These "@...@" are replaced when GNU configure filters makefile.in to makefile.

Did the OP bypass a configure step?
(I'd hate do do all that from JCL.)

Mr. Natural sez, Use the right tool for the job.

-- gil

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to