SUMMARY: SPARCworks c vs. f77 include problem

Marc S. Gibian (gibian@stars1.hanscom.af.mil)
Mon, 15 Sep 1997 14:07:25 -0400

--Boundary_(ID_m0E83PfwYeAxgjyCYVKVbQ)
Content-type: text/plain; charset=us-ascii
Content-transfer-encoding: 7bit
Content-MD5: sQ653pinRgkezRYid395vg==
X-Sun-Data-type: text

I had asked where OS constants such as those found in /usr/include/*.h files
might be found in a f77 format. The answer is nowhere. The most recommended
action was to edit the .h files in /usr/include needed to add #ifndef <f77-name>
to limit what f77 compiles see. I dislike this approach a great deal since it
requires modification to system distribution files on each machine I administer.
An alternative was to write a script that extracts the needed constants from the
relvent .h files and generate a f77 appropriate include file. This is what I
have implemented. Finally, I got one flame for sending this to this list, even
though the most recommended course of action is clearly a system administration
issue (whether implemented or not) regarding how developer systems are
configured.

My thanks to:

poffen@San-Jose.ate.slb.com (Russ Poffenberger)
Jim Harmon <jharmon@telecnnct.com>
foster@bial1.ucsd.edu
Rich Kulawiec <rsk@itw.com>

Finally, I wish Sun would REALLY support their languages rather than foist c/c++
on their development community. While I wouldn't suggest that everyone run out
and start developing in f77, there is a lot of legacy code out there that really
needs to interface cleanly with the OS.

-Marc

Marc S. Gibian
Telos Comsys phone: (617) 377-6350
PRISM/TFS email: gibian@stars1.hanscom.af.mil
or is it: gibian@hanscom.af.mil
well, maybe: gibianm@hanscom.af.mil
and if all else fails: marc.gibian@acm.org

--Boundary_(ID_m0E83PfwYeAxgjyCYVKVbQ)
Content-type: MESSAGE/RFC822
Content-description: Mailbox
Content-MD5: Bm1q6iUqT1288wWKT+mXpA==
X-Sun-Data-type: mail-message

Return-path: <sun-managers-relay@ra.mcs.anl.gov>
Received: from stars1.hanscom.af.mil by drizzle.tfs.com (SMI-8.6/SMI-SVR4)
id OAA18015; Thu, 11 Sep 1997 14:44:18 -0400
Received: from smtpgw.hanscom.af.mil by stars1.hanscom.af.mil
(SMI-8.6/SMI-SVR4) id OAA19684; Thu, 11 Sep 1997 14:39:02 -0400
Received: from ra.mcs.anl.gov by smtpgw.hanscom.af.mil (SMI-8.6/SMI-SVR4)
id OAA20602; Thu, 11 Sep 1997 14:40:19 -0400
Received: from localhost (daemon@localhost) by ra.mcs.anl.gov (8.8.3/8.8.3)
with SMTP id MAA07023; Thu, 11 Sep 1997 12:01:20 -0500 (CDT)
Received: by ra.mcs.anl.gov (bulk_mailer v1.5); Thu, 11 Sep 1997 12:01:01 -0500
Received: (from daemon@localhost) by ra.mcs.anl.gov (8.8.3/8.8.3)
id LAA06870 for sun-managers-outbound; Thu, 11 Sep 1997 11:11:25 -0500 (CDT)
Received: (from listserv@localhost) by ra.mcs.anl.gov (8.8.3/8.8.3)
id LAA06863 for smmsgs-out; Thu, 11 Sep 1997 11:11:20 -0500 (CDT)
Received: from antares.mcs.anl.gov (mcs.anl.gov [140.221.9.6])
by ra.mcs.anl.gov (8.8.3/8.8.3) with SMTP id LAA06856 for
<sun-managers@ra.mcs.anl.gov>; Thu, 11 Sep 1997 11:10:46 -0500 (CDT)
Received: from smtpgw.hanscom.af.mil (smtpgw.hanscom.af.mil [129.53.1.252])
by antares.mcs.anl.gov (8.6.10/8.6.10) with ESMTP id LAA29441 for
<sun-managers@ra.mcs.anl.gov>; Thu, 11 Sep 1997 11:12:34 -0500
Received: from stars1.hanscom.af.mil by smtpgw.hanscom.af.mil
(SMI-8.6/SMI-SVR4) id MAA08151; Thu, 11 Sep 1997 12:02:38 -0400
Received: from drizzle.tfs.com by stars1.hanscom.af.mil (SMI-8.6/SMI-SVR4)
id MAA16336; Thu, 11 Sep 1997 12:01:16 -0400
Received: from hail.tfs.com by drizzle.tfs.com (SMI-8.6/SMI-SVR4)
id MAA17415; Thu, 11 Sep 1997 12:06:30 -0400
Received: by hail.tfs.com (SMI-8.6/SMI-SVR4) id MAA23450; Thu,
11 Sep 1997 12:05:15 -0400
Date: Thu, 11 Sep 1997 12:05:15 -0400
From: gibian@stars1.hanscom.af.mil (Marc S. Gibian)
Subject: SPARCworks c vs. f77 include problem
Sender: sun-managers-relay@ra.mcs.anl.gov
To: sun-managers@ra.mcs.anl.gov
Reply-to: gibian@stars1.hanscom.af.mil (Marc S. Gibian)
Message-id: <199709111605.MAA23450@hail.tfs.com>
MIME-version: 1.0
Content-type: text/plain; charset=us-ascii
Content-transfer-encoding: 7bit
Content-MD5: H3dyGlsTq3SdTl+9RUgsBQ==
Precedence: bulk
Content-length: 1223
>From gibian@stars1.hanscom.af.mil Thu Sep 11 14:44:20 1997
Followup-to: gibian@stars1.hanscom.af.mil (Marc S. Gibian)
Status: RO

As the system admin for my customer's development team, I have been asked for a
solution to the following problem...

The software contains both c and f77 code. There are some very important
constants that in the c code are derived from values in /usr/include/dirent.h
and /usr/include/limits.h for MAXNAMLEN and PATH_MAX respectively. The f77 code
also uses the same constants, but can not include these two .h files to obtain
the base MAXNAMLEN and PATH_MAX values due to the fact that these .h files
contain c specific statements as well as the needed preprocessor statements that
both compilers will digest successfully.

Does anyone know of f77 equivalents to the named c constants? I would hate to
have to cobble together a script to generate the needed f77 file from these c
files myself, which is the only option I see that ensures that both the c and
f77 versions stay synchronized?

TIA,
Marc

Marc S. Gibian
Telos Comsys phone: (617) 377-6350
PRISM/TFS email: gibian@stars1.hanscom.af.mil
or is it: gibian@hanscom.af.mil
well, maybe: gibianm@hanscom.af.mil
and if all else fails: marc.gibian@acm.org

--Boundary_(ID_m0E83PfwYeAxgjyCYVKVbQ)--