Index: /trunk/psLib/src/Makefile.Globals
===================================================================
--- /trunk/psLib/src/Makefile.Globals	(revision 1532)
+++ /trunk/psLib/src/Makefile.Globals	(revision 1533)
@@ -5,6 +5,6 @@
 ##  Assumptions:    Variable "prefix" already defined
 ##
-##  $Revision: 1.17 $  $Name: not supported by cvs2svn $
-##  $Date: 2004-08-13 01:14:26 $
+##  $Revision: 1.18 $  $Name: not supported by cvs2svn $
+##  $Date: 2004-08-13 23:47:10 $
 ##
 ##  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -40,4 +40,8 @@
 endif
 
+ifndef sladir
+	export sladir =  /usr/local/star
+endif	
+
 # Set initial value for CFLAGS which will include all OS common flags for GCC
 
@@ -50,5 +54,6 @@
 # Set initial value for LDFLAGS which will include all OS common flags for GCC and required libraries.
 
-EXTLIBS := -lcfitsio -lgsl -lgslcblas -lfftw3f -lsla
+SLA_LINK := $(shell $(sladir)/bin/sla_link)
+EXTLIBS := -lcfitsio -lgsl -lgslcblas -lfftw3f -L$(sladir)/lib $(SLA_LINK) 
 LDFLAGS := -g2 -pipe $(EXTLIBS) 
 
@@ -67,5 +72,5 @@
 
 ifneq "$(findstring arwin,$(OSTYPE))" ""
-    CFLAGS += -Wno-long-double -DDARWIN -DFORTRAN_UNDERSCORE_PREFIX
+    CFLAGS += -Wno-long-double -DDARWIN 
     CFLAGS_RELOC := $(CFLAGS)
     LDFLAGS := $(LDFLAGS) -lmx
@@ -76,5 +81,5 @@
     DOCS =
     BUILD_DYNAMIC1 = libtool -dynamic
-    BUILD_DYNAMIC2 = -lm -lmx -lgcc $(EXTLIBS) -o
+    BUILD_DYNAMIC2 = -L/usr/local/star/lib -lm -lmx -lgcc $(EXTLIBS) -lg2c -o
 endif
 
Index: /trunk/psLib/src/astro/psTime.c
===================================================================
--- /trunk/psLib/src/astro/psTime.c	(revision 1532)
+++ /trunk/psLib/src/astro/psTime.c	(revision 1533)
@@ -13,6 +13,6 @@
  *  @author Ross Harman, MHPCC
  *
- *  @version $Revision: 1.14 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2004-08-07 00:06:06 $
+ *  @version $Revision: 1.15 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2004-08-13 23:47:10 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -221,4 +221,5 @@
     char *tempString = NULL;
     struct tm *tmTime = NULL;
+    time_t sec;
 
     CHECK_NEGATIVE_TIME_STRUCT(time, NULL);
@@ -230,6 +231,7 @@
     ms = time.tv_usec / 1000;
 
+    sec = time.tv_sec;
     // tmTime variable is statically allocated, no need to free
-    tmTime = gmtime(&time.tv_sec);
+    tmTime = gmtime(&sec);
     if (!strftime(tempString, MAX_TIME_STRING_LENGTH, "%Y/%m/%d,%H:%M:%S", tmTime)) {
         psError(__func__, " : Line %d - Failed strftime conversion", __LINE__);
@@ -309,7 +311,9 @@
 {
     struct tm *tmTime = NULL;
+    time_t sec;
 
     CHECK_NEGATIVE_TIME_STRUCT(time, tmTime);
-    tmTime = gmtime(&time.tv_sec);
+    sec = time.tv_sec;
+    tmTime = gmtime(&sec);
 
     return tmTime;
Index: /trunk/psLib/src/astronomy/psTime.c
===================================================================
--- /trunk/psLib/src/astronomy/psTime.c	(revision 1532)
+++ /trunk/psLib/src/astronomy/psTime.c	(revision 1533)
@@ -13,6 +13,6 @@
  *  @author Ross Harman, MHPCC
  *
- *  @version $Revision: 1.14 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2004-08-07 00:06:06 $
+ *  @version $Revision: 1.15 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2004-08-13 23:47:10 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -221,4 +221,5 @@
     char *tempString = NULL;
     struct tm *tmTime = NULL;
+    time_t sec;
 
     CHECK_NEGATIVE_TIME_STRUCT(time, NULL);
@@ -230,6 +231,7 @@
     ms = time.tv_usec / 1000;
 
+    sec = time.tv_sec;
     // tmTime variable is statically allocated, no need to free
-    tmTime = gmtime(&time.tv_sec);
+    tmTime = gmtime(&sec);
     if (!strftime(tempString, MAX_TIME_STRING_LENGTH, "%Y/%m/%d,%H:%M:%S", tmTime)) {
         psError(__func__, " : Line %d - Failed strftime conversion", __LINE__);
@@ -309,7 +311,9 @@
 {
     struct tm *tmTime = NULL;
+    time_t sec;
 
     CHECK_NEGATIVE_TIME_STRUCT(time, tmTime);
-    tmTime = gmtime(&time.tv_sec);
+    sec = time.tv_sec;
+    tmTime = gmtime(&sec);
 
     return tmTime;
