IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 28235


Ignore:
Timestamp:
Jun 6, 2010, 2:46:21 PM (16 years ago)
Author:
eugene
Message:

move byte_swap test to ohana.h; add OFF_T_FMT; add required test for NAN and BYTE_SWAP validity

Location:
branches/eam_branches/Ohana.20100606/src/libohana
Files:
1 added
2 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/Ohana.20100606/src/libohana/Makefile

    r27435 r28235  
    11default: install
    22help:
    3         @echo "make options: install libohana clean dist"
     3        @echo "make options: install libohana clean dist test typetest"
    44
    55include ../../Makefile.System
     
    1919TFLAGS        = $(FULL_CFLAGS) $(FULL_CPPFLAGS) $(FULL_LDFLAGS) -lohana -ltap_ohana
    2020
    21 install: $(DESTLIB)/libohana.a $(DESTLIB)/libohana.$(DLLTYPE)
     21install: $(DESTLIB)/libohana.a $(DESTLIB)/libohana.$(DLLTYPE) typetest
    2222libohana: $(LIB)/libohana.$(ARCH).a $(LIB)/libohana.$(ARCH).$(DLLTYPE)
    2323
     
    4040$(SRC)/CommOps.$(ARCH).o         \
    4141$(SRC)/version.$(ARCH).o
     42
     43TYPETEST = \
     44$(TESTDIR)/typetest.$(ARCH)
     45
     46$(TYPETEST) : $(LIB)/libohana.$(ARCH).a
     47
     48typetest: $(TYPETEST)
     49        for i in $(TYPETEST); do $$i || exit 1; done
    4250
    4351TEST = \
  • branches/eam_branches/Ohana.20100606/src/libohana/include/ohana.h

    r27484 r28235  
    9494};
    9595
     96/* note: in the Ohana tree, the byte order is determined by the ARCH variable
     97   if you have a small endian machine that is not listed here, the test
     98   program 'typestest' should fail */
     99# ifndef BYTE_SWAP
     100# ifdef linux
     101# define BYTE_SWAP
     102# endif
     103
     104# ifdef lin64
     105# define BYTE_SWAP
     106# endif
     107
     108# ifdef sid
     109# define BYTE_SWAP
     110# endif
     111
     112# ifdef darwin_x86
     113# define BYTE_SWAP
     114# endif
     115
     116# ifdef dec
     117# define BYTE_SWAP
     118# endif
     119# else
     120# define NOT_BYTE_SWAP
     121# endif /* BYTE_SWAP */
     122
    96123# ifndef NAN
    97124# ifndef BYTE_SWAP
     
    103130    __attribute_used__ = { __nan_bytes };
    104131# define NAN    (__nan_union.__d)
     132# endif
     133
     134/* if your build crashes on OFF_T_MODE, you probably need to add your 64bit hardware to this list */
     135# ifdef _LARGEFILE_SOURCE
     136# define OFF_T_FMT "%jd"
     137# endif
     138# ifdef lin64
     139# define OFF_T_FMT "%jd"
     140# endif
     141# ifndef OFF_T_FMT
     142# define OFF_T_FMT "%ld"
     143# endif
     144
     145# ifndef isfinite
     146# define isfinite(A) (!isnan(A))
    105147# endif
    106148
Note: See TracChangeset for help on using the changeset viewer.