Subject: SAOImage V1.07 on Solaris 2.3

From: [email-masked] (jthimer)
Date: Sat, 4 Jun 94 19:43:27 -0400

Mike,

Hi.

I've been running SAOImage for quite some time, but only recently decided to
put it on my SS10 running Solaris 2.3 at home.  I decided not to use gcc_2.5.8
but rather Sun's own compiler (2.0.1 -- I'll have 3.0.1 only by month's end).
I did the pull from noao.

I've seen no mention of the following in any of the README files, and haven't
been in alt.sci.astro or seen anything in the wgas exploder for a long time, 
so I thought I'd mention them to you so you can pass the info along to your
customers.

Taking Sun's advice (since these entry points will be toasted soon), I did
not include and of the BSD stuph (includes or libraries).  This left for an
upset linker that couldn't find bzero, bcopy, etc.

What I did, was just add:

#ifdef __STDC__ 
#define bcmp(a, b, len)         memcmp((a), (b), (len))
#define bcopy(from, to, len)    memmove((to), (from), (len))
#define bzero(ptr, len)         memset((ptr), 0, (len))
#endif

to the end of "hfiles/define.h".  I suppose, the "__STDC__" part could just
as easily be "SYSV" or "POSIX_SOURCE" or "ANSI_C", but STDC works just as well.
Putting this in the define.h, also took care of about half the *.c that needed
these BSD macros ... I added "define.h" to the rest of the source files that
needed it, and to image.c and border.c in btnlib.

Additionally, Solaris 2.3 required the libraries -lsocket -lnsl -lw -ldl which
I just added to the ADFLAGS macro in makefile.sun.

With this, the make works fine and the program runs great. 

Clear skies -- JTH

James Thomas Himer
[email-masked]

Senior Application/Project Analyst - UNIX
Geoscience Apps./Imperial Oil Ltd. - Resources Div.
& c/o Dept. Physics/Astronomy - U.Calgary
& member ANSI X3J3 Technical Committee \parallel subgroup
Ph.: (403) 237-4215  FAX: (403) 237-2907