Re: compiling with cmake and xlf
- From: nospam@xxxxxxxxxxxxx (Richard Maine)
- Date: Thu, 13 Oct 2011 10:44:01 -0700
Ron Shepard <ron-shepard@xxxxxxxxxxxxxxxxxx> wrote:
I do remember wrestling with extname in various ways. The problem
was that for some unfathomable reason, IBM chose *NOT* to add a
trailing underscore to external names by fortran, even though they
used underscores in the fortran libraries. This means that fortran
libraries are continually in conflict with various other C and POSIX
libraries (e.g. call exit(1) did not work correctly without this
option). So the programmer had to either change the source (e.g.
call exit_(1)) or use this option to avoid the problem.
Ouch. Maybe I was lucky, but I don't recall running into that one with
IBM. I did run into it on HP. It was quite a long time ago, sometime in
the early 80s. A library of mine was used by many apps at our site. This
was in f77 days, so names were limitted to 7 characters (a limit I stuck
to for portability) and there was nothing like modules to help manage
the namespace. Name conflicts were thus fairly common. I had the
misfortune of having written procedures with names fopen, fseek, fread,
fwrite, and others. I had selected those names at some earlier time
before I had any exposure to C or Unix. (It is bound to have been after
C and Unix existed, but it was before they were pervasive). As you might
imagine, the code did not work very well.
Unfortunately for my case, there wasn't any good solution. Those
procedures were part of the documented API for my library. So just
changing my own code wasn't going to solve things. Every app that used
my library (and there were lots of such apps) would have to make
The only saving grace was that we didn't have many HP workstations on
site (lots of printers and other HP products, but only a small handful
HP workstations as I recall - maybe 2). Most of the apps didn't need to
be ported to those workstations. So I just did the name changes in the
source code for those machines only and accepted the fact that any apps
ported to those machines would also need corresponding changes.
Richard Maine | Good judgment comes from experience;
email: last name at domain . net | experience comes from bad judgment.
domain: summertriangle | -- Mark Twain