IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 1533


Ignore:
Timestamp:
Aug 13, 2004, 1:47:10 PM (22 years ago)
Author:
desonia
Message:

changes to make it work on MAC OSX

Location:
trunk/psLib/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/src/Makefile.Globals

    r1525 r1533  
    55##  Assumptions:    Variable "prefix" already defined
    66##
    7 ##  $Revision: 1.17 $  $Name: not supported by cvs2svn $
    8 ##  $Date: 2004-08-13 01:14:26 $
     7##  $Revision: 1.18 $  $Name: not supported by cvs2svn $
     8##  $Date: 2004-08-13 23:47:10 $
    99##
    1010##  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    4040endif
    4141
     42ifndef sladir
     43        export sladir =  /usr/local/star
     44endif   
     45
    4246# Set initial value for CFLAGS which will include all OS common flags for GCC
    4347
     
    5054# Set initial value for LDFLAGS which will include all OS common flags for GCC and required libraries.
    5155
    52 EXTLIBS := -lcfitsio -lgsl -lgslcblas -lfftw3f -lsla
     56SLA_LINK := $(shell $(sladir)/bin/sla_link)
     57EXTLIBS := -lcfitsio -lgsl -lgslcblas -lfftw3f -L$(sladir)/lib $(SLA_LINK)
    5358LDFLAGS := -g2 -pipe $(EXTLIBS)
    5459
     
    6772
    6873ifneq "$(findstring arwin,$(OSTYPE))" ""
    69     CFLAGS += -Wno-long-double -DDARWIN -DFORTRAN_UNDERSCORE_PREFIX
     74    CFLAGS += -Wno-long-double -DDARWIN
    7075    CFLAGS_RELOC := $(CFLAGS)
    7176    LDFLAGS := $(LDFLAGS) -lmx
     
    7681    DOCS =
    7782    BUILD_DYNAMIC1 = libtool -dynamic
    78     BUILD_DYNAMIC2 = -lm -lmx -lgcc $(EXTLIBS) -o
     83    BUILD_DYNAMIC2 = -L/usr/local/star/lib -lm -lmx -lgcc $(EXTLIBS) -lg2c -o
    7984endif
    8085
  • trunk/psLib/src/astro/psTime.c

    r1407 r1533  
    1313 *  @author Ross Harman, MHPCC
    1414 *
    15  *  @version $Revision: 1.14 $ $Name: not supported by cvs2svn $
    16  *  @date $Date: 2004-08-07 00:06:06 $
     15 *  @version $Revision: 1.15 $ $Name: not supported by cvs2svn $
     16 *  @date $Date: 2004-08-13 23:47:10 $
    1717 *
    1818 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    221221    char *tempString = NULL;
    222222    struct tm *tmTime = NULL;
     223    time_t sec;
    223224
    224225    CHECK_NEGATIVE_TIME_STRUCT(time, NULL);
     
    230231    ms = time.tv_usec / 1000;
    231232
     233    sec = time.tv_sec;
    232234    // tmTime variable is statically allocated, no need to free
    233     tmTime = gmtime(&time.tv_sec);
     235    tmTime = gmtime(&sec);
    234236    if (!strftime(tempString, MAX_TIME_STRING_LENGTH, "%Y/%m/%d,%H:%M:%S", tmTime)) {
    235237        psError(__func__, " : Line %d - Failed strftime conversion", __LINE__);
     
    309311{
    310312    struct tm *tmTime = NULL;
     313    time_t sec;
    311314
    312315    CHECK_NEGATIVE_TIME_STRUCT(time, tmTime);
    313     tmTime = gmtime(&time.tv_sec);
     316    sec = time.tv_sec;
     317    tmTime = gmtime(&sec);
    314318
    315319    return tmTime;
  • trunk/psLib/src/astronomy/psTime.c

    r1407 r1533  
    1313 *  @author Ross Harman, MHPCC
    1414 *
    15  *  @version $Revision: 1.14 $ $Name: not supported by cvs2svn $
    16  *  @date $Date: 2004-08-07 00:06:06 $
     15 *  @version $Revision: 1.15 $ $Name: not supported by cvs2svn $
     16 *  @date $Date: 2004-08-13 23:47:10 $
    1717 *
    1818 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    221221    char *tempString = NULL;
    222222    struct tm *tmTime = NULL;
     223    time_t sec;
    223224
    224225    CHECK_NEGATIVE_TIME_STRUCT(time, NULL);
     
    230231    ms = time.tv_usec / 1000;
    231232
     233    sec = time.tv_sec;
    232234    // tmTime variable is statically allocated, no need to free
    233     tmTime = gmtime(&time.tv_sec);
     235    tmTime = gmtime(&sec);
    234236    if (!strftime(tempString, MAX_TIME_STRING_LENGTH, "%Y/%m/%d,%H:%M:%S", tmTime)) {
    235237        psError(__func__, " : Line %d - Failed strftime conversion", __LINE__);
     
    309311{
    310312    struct tm *tmTime = NULL;
     313    time_t sec;
    311314
    312315    CHECK_NEGATIVE_TIME_STRUCT(time, tmTime);
    313     tmTime = gmtime(&time.tv_sec);
     316    sec = time.tv_sec;
     317    tmTime = gmtime(&sec);
    314318
    315319    return tmTime;
Note: See TracChangeset for help on using the changeset viewer.