SPARCworks c vs. f77 include problem

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

attached mail follows:



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

[5676 byte] By [CodeProf.com] at [2007-12-25 11:19:00]