diff -Nru libgetdata-0.7.0/aclocal.m4 libgetdata-0.7.1/aclocal.m4 --- libgetdata-0.7.0/aclocal.m4 2010-11-23 00:33:30.000000000 +0000 +++ libgetdata-0.7.1/aclocal.m4 2010-12-06 23:08:39.000000000 +0000 @@ -13,8 +13,8 @@ m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl -m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.65],, -[m4_warning([this file was generated for autoconf 2.65. +m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.68],, +[m4_warning([this file was generated for autoconf 2.68. You have another version of autoconf. It may work, but is not guaranteed to. If you have problems, you may need to regenerate the build system entirely. To do so, use the procedure documented by the package, typically `autoreconf'.])]) diff -Nru libgetdata-0.7.0/bindings/cxx/Makefile.in libgetdata-0.7.1/bindings/cxx/Makefile.in --- libgetdata-0.7.0/bindings/cxx/Makefile.in 2010-11-23 00:33:32.000000000 +0000 +++ libgetdata-0.7.1/bindings/cxx/Makefile.in 2010-12-06 23:08:41.000000000 +0000 @@ -179,6 +179,7 @@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DIFF = @DIFF@ +DLLTOOL = @DLLTOOL@ DL_LIBRARY_PATH = @DL_LIBRARY_PATH@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ @@ -224,6 +225,7 @@ LZMA_CPPFLAGS = @LZMA_CPPFLAGS@ LZMA_LDFLAGS = @LZMA_LDFLAGS@ MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ @@ -258,6 +260,7 @@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ absolute_docdir = @absolute_docdir@ +ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ @@ -294,7 +297,6 @@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ diff -Nru libgetdata-0.7.0/bindings/cxx/test/big_test.cpp libgetdata-0.7.1/bindings/cxx/test/big_test.cpp --- libgetdata-0.7.0/bindings/cxx/test/big_test.cpp 2010-11-02 18:42:27.000000000 +0000 +++ libgetdata-0.7.1/bindings/cxx/test/big_test.cpp 2010-11-27 06:14:20.000000000 +0000 @@ -255,6 +255,7 @@ CHECK_INT2(16,2,ent->FragmentIndex(),0); CHECK_INT2(16,3,ent->SamplesPerFrame(),8); CHECK_INT2(16,4,ent->RawType(),Int8); + delete ent; // 18: Dirfile::Entry / LincomEntry check cq[0] = 1.1; @@ -274,6 +275,7 @@ CHECK_INT2(18,7,ent->ComplexScalars(),1); CHECK_COMPLEX_ARRAY(18,3,ent->CScale(i),cq[i * 2]); CHECK_COMPLEX_ARRAY(18,3,ent->COffset(i),cq[i * 2 + 1]); + delete ent; // 20: Dirfile::Entry / PolynomEntry check ent = d->Entry("polynom"); @@ -284,6 +286,7 @@ CHECK_STRING2(20,4,ent->Input(),"data"); CHECK_INT2(20,7,ent->ComplexScalars(),1); CHECK_COMPLEX_ARRAY(20,6,ent->CCoefficient(i),cq[i]); + delete ent; // 21: Dirfile::Entry / LinterpEntry check ent = d->Entry("linterp"); @@ -292,6 +295,7 @@ CHECK_INT2(21,2,ent->FragmentIndex(),0); CHECK_STRING2(21,3,ent->Input(),"data"); CHECK_STRING2(21,4,ent->Table(),"/look/up/file"); + delete ent; // 22: Dirfile::Entry / BitEntry check ent = d->Entry("bit"); @@ -301,6 +305,7 @@ CHECK_STRING2(22,3,ent->Input(),"data"); CHECK_INT2(22,4,ent->NumBits(),4); CHECK_INT2(22,5,ent->FirstBit(),3); + delete ent; // 23: Dirfile::Entry / SBitEntry check ent = d->Entry("sbit"); @@ -310,6 +315,7 @@ CHECK_STRING2(23,3,ent->Input(),"data"); CHECK_INT2(23,4,ent->NumBits(),6); CHECK_INT2(23,5,ent->FirstBit(),5); + delete ent; // 24: Dirfile::Entry / MultiplyEntry check ent = d->Entry("mult"); @@ -318,6 +324,7 @@ CHECK_INT2(24,2,ent->FragmentIndex(),0); CHECK_STRING2(24,3,ent->Input(0),"data"); CHECK_STRING2(24,4,ent->Input(1),"sbit"); + delete ent; // 25: Dirfile::Entry / PhaseEntry check ent = d->Entry("phase"); @@ -326,6 +333,7 @@ CHECK_INT2(25,2,ent->FragmentIndex(),0); CHECK_STRING2(25,3,ent->Input(),"data"); CHECK_INT2(25,4,ent->Shift(),11); + delete ent; // 26: Dirfile::Entry / ConstEntry check ent = d->Entry("const"); @@ -333,12 +341,14 @@ CHECK_INT2(26,1,ent->Type(),ConstEntryType); CHECK_INT2(26,2,ent->FragmentIndex(),0); CHECK_INT2(26,3,ent->ConstType(),Float64); + delete ent; // 134: Dirfile::Entry / StringEntry check ent = d->Entry("string"); CHECK_OK(134); CHECK_INT2(134,1,ent->Type(),StringEntryType); CHECK_INT2(134,2,ent->FragmentIndex(),0); + delete ent; // 27: Dirfile::FragmentIndex check n = d->FragmentIndex("data"); @@ -359,6 +369,7 @@ CHECK_INT2(28,2,ent->FragmentIndex(),0); CHECK_INT2(28,3,ent->SamplesPerFrame(),3); CHECK_INT2(28,4,ent->RawType(),Float64); + delete ent; // 29: Dirfile::Add / LincomEntry check q[0] = 9.9; @@ -387,6 +398,7 @@ CHECK_INT2(29,6,ent->ComplexScalars(),0); CHECK_DOUBLE_ARRAY(29,7,2,ent->Scale(i),q[i * 2]); CHECK_DOUBLE_ARRAY(29,8,2,ent->Offset(i),q[i * 2 + 1]); + delete ent; // 30: Dirfile::Add / LincomEntry check cq[0] = complex(1.1, 1.2); @@ -416,6 +428,7 @@ CHECK_INT2(30,6,ent->ComplexScalars(),1); CHECK_COMPLEX_ARRAY(30,2,ent->CScale(i),cq[i * 2]); CHECK_COMPLEX_ARRAY(30,2,ent->COffset(i),cq[i * 2 + 1]); + delete ent; // 31: Dirfile::Add / PolynomEntry check q[0] = 3.9; @@ -441,6 +454,7 @@ CHECK_STRING2(31,4,ent->Input(),"in1"); CHECK_INT2(31,5,ent->ComplexScalars(),0); CHECK_DOUBLE_ARRAY(31,6,4,ent->Coefficient(i),q[i]); + delete ent; // 32: Dirfile::Add / PolynomEntry check cq[0] = complex(3.1, 7); @@ -467,6 +481,7 @@ CHECK_STRING2(32,4,ent->Input(),"in2"); CHECK_INT2(32,7,ent->ComplexScalars(),1); CHECK_COMPLEX_ARRAY(32,4,ent->CCoefficient(i),cq[i]); + delete ent; // 33: Dirfile::Add / LinterpEntry check nent.SetName("new6"); @@ -482,6 +497,7 @@ CHECK_INT2(33,2,ent->FragmentIndex(),0); CHECK_STRING2(33,3,ent->Input(),"in"); CHECK_STRING2(33,4,ent->Table(),"./some/table"); + delete ent; // 34: Dirfile::Add / BitEntry check bent.SetName("new7"); @@ -499,6 +515,7 @@ CHECK_STRING2(34,3,ent->Input(),"in1"); CHECK_INT2(34,4,ent->NumBits(),12); CHECK_INT2(34,5,ent->FirstBit(),13); + delete ent; // 35: Dirfile::Add / SBitEntry check sent.SetName("new8"); @@ -516,6 +533,7 @@ CHECK_STRING2(35,3,ent->Input(),"in2"); CHECK_INT2(35,4,ent->NumBits(),15); CHECK_INT2(35,5,ent->FirstBit(),14); + delete ent; // 36: Dirfile::Add / MultiplyEntry check ment.SetName("new9"); @@ -531,6 +549,7 @@ CHECK_INT2(36,2,ent->FragmentIndex(),0); CHECK_STRING2(36,3,ent->Input(0),"in1"); CHECK_STRING2(36,4,ent->Input(1),"in2"); + delete ent; // 37: Dirfile::Add / PhaseEntry check pent.SetName("new10"); @@ -546,6 +565,7 @@ CHECK_INT2(37,2,ent->FragmentIndex(),0); CHECK_STRING2(37,3,ent->Input(),"in1"); CHECK_INT2(37,4,ent->Shift(),22); + delete ent; // 38: Dirfile::Add / ConstEntry check cent.SetName("new11"); @@ -559,11 +579,13 @@ CHECK_INT2(38,1,ent->Type(),ConstEntryType); CHECK_INT2(38,2,ent->FragmentIndex(),0); CHECK_INT2(38,3,ent->ConstType(),Float64); + delete ent; // 39: Fragment check frag = d->Fragment(0); CHECK_OK(39); CHECK_STRING(39,frag->Name(),__TEST__ "dirfile/format"); + delete frag; // 40: Dirfile::NFragments check n = d->NFragments(); @@ -649,6 +671,7 @@ CHECK_INT2(126,6,ent->ComplexScalars(),0); CHECK_DOUBLE_ARRAY(126,7,2,ent->Scale(i),q[i * 2]); CHECK_DOUBLE_ARRAY(126,8,2,ent->Offset(i),q[i * 2 + 1]); + delete ent; // 56: Dirfile::GetString check n = d->GetString("string", GD_MAX_LINE_LENGTH, buf); @@ -666,6 +689,7 @@ CHECK_OK2(57,2); CHECK_INT2(57,1,ent->Type(),StringEntryType); CHECK_INT2(57,2,ent->FragmentIndex(),0); + delete ent; n = d->GetString("new12", GD_MAX_LINE_LENGTH, buf); CHECK_OK2(57,3); @@ -748,6 +772,7 @@ CHECK_INT2(67,2,ent->FragmentIndex(),0); CHECK_INT2(67,3,ent->SamplesPerFrame(),4); CHECK_INT2(67,4,ent->RawType(),Int32); + delete ent; // 68: LincomEntry check lep = reinterpret_cast(d->Entry("new2")); @@ -779,6 +804,7 @@ CHECK_INT2(68,7,ent->ComplexScalars(),0); CHECK_DOUBLE_ARRAY(68,8,3,ent->Scale(i),q[i * 2]); CHECK_DOUBLE_ARRAY(68,9,3,ent->Offset(i),q[i * 2 + 1]); + delete ent; // 70: PolynomEntry check yep = reinterpret_cast(d->Entry("new4")); @@ -804,6 +830,7 @@ CHECK_STRING2(70,4,ent->Input(),"in4"); CHECK_INT2(70,5,ent->ComplexScalars(),0); CHECK_DOUBLE_ARRAY(70,6,5,ent->Coefficient(i),q[i]); + delete ent; // 72: LinterpEntry check nep = reinterpret_cast(d->Entry("new6")); @@ -820,6 +847,7 @@ CHECK_INT2(72,2,ent->FragmentIndex(),0); CHECK_STRING2(72,3,ent->Input(),"in3"); CHECK_STRING2(72,4,ent->Table(),"./other/table"); + delete ent; // 73: BitEntry check bep = reinterpret_cast(d->Entry("new7")); @@ -839,6 +867,7 @@ CHECK_STRING2(73,3,ent->Input(),"in3"); CHECK_INT2(73,4,ent->NumBits(),2); CHECK_INT2(73,5,ent->FirstBit(),3); + delete ent; // 74: SBitEntry check sep = reinterpret_cast(d->Entry("new8")); @@ -858,6 +887,7 @@ CHECK_STRING2(74,3,ent->Input(),"in4"); CHECK_INT2(74,4,ent->NumBits(),22); CHECK_INT2(74,5,ent->FirstBit(),1); + delete ent; // 75: MultiplyEntry check mep = reinterpret_cast(d->Entry("new9")); @@ -874,6 +904,7 @@ CHECK_INT2(75,2,ent->FragmentIndex(),0); CHECK_STRING2(75,3,ent->Input(0),"in4"); CHECK_STRING2(75,4,ent->Input(1),"in5"); + delete ent; // 76: PhsaeEntry check pep = reinterpret_cast(d->Entry("new10")); @@ -890,6 +921,7 @@ CHECK_INT2(76,2,ent->FragmentIndex(),0); CHECK_STRING2(76,3,ent->Input(),"in2"); CHECK_INT2(76,4,ent->Shift(),8); + delete ent; // 77: ConstEntry check cep = reinterpret_cast(d->Entry("new11")); @@ -903,6 +935,7 @@ CHECK_INT2(77,1,ent->Type(),ConstEntryType); CHECK_INT2(77,2,ent->FragmentIndex(),0); CHECK_INT2(77,3,ent->ConstType(),Float32); + delete ent; // 78: Fragment::Encoding check frag = d->Fragment(0); @@ -911,6 +944,7 @@ // 79: Fragment::Endianness check CHECK_INT(79,frag->Endianness(),GD_LITTLE_ENDIAN | GD_NOT_ARM_ENDIAN); + delete frag; // 80: Dirfile::Name check str = d->Name(); @@ -925,6 +959,7 @@ // 82: Fragment::SetProtection check frag->SetProtection(GD_PROTECT_DATA); CHECK_OK(82); + delete frag; // 83: Fragment::Protection check frag = d->Fragment(1); @@ -935,6 +970,7 @@ str = rep->FileName(); CHECK_OK(84); CHECK_STRING(84,str,__TEST__ "dirfile/new1"); + delete rep; // 85: Dirfile::Reference check rep = d->Reference("new1"); @@ -956,6 +992,7 @@ frag->SetEndianness(GD_BIG_ENDIAN,0); CHECK_OK(88); CHECK_INT(88,frag->Endianness(),GD_BIG_ENDIAN); + delete frag; // 89: Dirfile::AlterSpec check d->AlterSpec("new10 PHASE in1 3"); @@ -967,6 +1004,7 @@ CHECK_INT2(89,2,ent->FragmentIndex(),0); CHECK_STRING2(89,3,ent->Input(),"in1"); CHECK_INT2(89,4,ent->Shift(),3); + delete ent; // 90: Dirfile::Delete check d->Delete("new10", 0); @@ -974,6 +1012,7 @@ ent = d->Entry("new10"); CHECK_ERROR2(90,2,GD_E_BAD_CODE); + delete ent; // 91: Dirfile::MAlterSpec check d->MAlterSpec("mnew1 LINCOM 2 in4 1 2 in5 3 4", "data", 0); @@ -989,6 +1028,7 @@ CHECK_INT2(91,6,ent->ComplexScalars(),0); CHECK_DOUBLE_ARRAY(91,7,2,ent->Scale(i),i * 2 + 1); CHECK_DOUBLE_ARRAY(91,8,2,ent->Offset(i),i * 2 + 2); + delete ent; // 92: Entry::Move check ent = d->Entry("new9"); @@ -1000,9 +1040,11 @@ // 93: Entry::Rename check ent->Rename("newer",0); CHECK_OK2(93,1); + delete ent; ent = d->Entry("new9"); CHECK_ERROR2(93,2,GD_E_BAD_CODE); + delete ent; ent = d->Entry("newer"); CHECK_OK2(93,3); @@ -1010,6 +1052,7 @@ CHECK_INT2(93,2,ent->FragmentIndex(),1); CHECK_STRING2(93,3,ent->Input(0),"in4"); CHECK_STRING2(93,4,ent->Input(1),"in5"); + delete ent; // 94: Dirfile::UnInclude check d->UnInclude(1,0); @@ -1017,6 +1060,7 @@ ent = d->Entry("newer"); CHECK_ERROR2(94,2,GD_E_BAD_CODE); + delete ent; // 95: Fragment::FrameOffset check frag = d->Fragment(0); @@ -1039,7 +1083,7 @@ CHECK_INT(99,n,-1); // 101: Dirfile::FrameNum check - d->Reference("data"); + delete d->Reference("data"); dp = d->FrameNum("data", 33.3, 6); CHECK_OK(101); CHECK_DOUBLE(101,dp,37.0375); @@ -1061,6 +1105,7 @@ CHECK_INT2(143,2,ent->FragmentIndex(),0); CHECK_STRING2(143,3,ent->Input(0),"mult"); CHECK_STRING2(143,4,ent->Input(1),"bit"); + delete ent; // 145: Dirfile::Entry / RecipEntry check ent = d->Entry("recip"); @@ -1070,6 +1115,7 @@ CHECK_STRING2(145,3,ent->Input(0),"div"); CHECK_INT2(145,4,ent->ComplexScalars(),1); CHECK_COMPLEX2(145,5,ent->CDividend(),complex(6.5,4.3)); + delete ent; // 146: Dirfile::Add / DivideEntry check dent.SetName("new14"); @@ -1085,6 +1131,7 @@ CHECK_INT2(146,2,ent->FragmentIndex(),0); CHECK_STRING2(146,3,ent->Input(0),"in1"); CHECK_STRING2(146,4,ent->Input(1),"in2"); + delete ent; // 147: Dirfile::Add / RecipEntry check oent.SetName("new15"); @@ -1100,6 +1147,7 @@ CHECK_STRING2(147,3,ent->Input(0),"in3"); CHECK_INT2(147,4,ent->ComplexScalars(),0); CHECK_DOUBLE2(147,5,ent->Dividend(),31.9); + delete ent; // 148: Dirfile::Add / RecipEntry check oent.Dissociate(); @@ -1116,6 +1164,7 @@ CHECK_STRING2(148,3,ent->Input(0),"in2"); CHECK_INT2(148,4,ent->ComplexScalars(),1); CHECK_COMPLEX2(148,5,ent->CDividend(),complex(33.3,44.4)); + delete ent; // 152: DivideEntry check dep = reinterpret_cast(d->Entry("new14")); @@ -1132,6 +1181,7 @@ CHECK_INT2(152,2,ent->FragmentIndex(),0); CHECK_STRING2(152,3,ent->Input(0),"in4"); CHECK_STRING2(152,4,ent->Input(1),"in5"); + delete ent; // 153: RecipEntry check oep = reinterpret_cast(d->Entry("new15")); @@ -1148,10 +1198,12 @@ CHECK_STRING2(148,3,ent->Input(0),"in1"); CHECK_INT2(148,4,ent->ComplexScalars(),1); CHECK_COMPLEX2(148,5,ent->CDividend(),complex(1.01,9.33)); + delete ent; // 155: Fragment::ReWrite check frag->ReWrite(); CHECK_OK(155); + delete frag; // 156: Invalid Dirfile check Dirfile *id = new Dirfile(); @@ -1224,6 +1276,7 @@ CHECK_INT2(178,1,ent->Type(),ConstEntryType); CHECK_INT2(178,2,ent->FragmentIndex(),0); CHECK_INT2(178,3,ent->ConstType(),Float64); + delete ent; // 179 gd_add_carray aent.SetName("new17"); @@ -1239,6 +1292,7 @@ CHECK_INT2(179,2,ent->FragmentIndex(),0); CHECK_INT2(179,3,ent->ConstType(),Float64); CHECK_INT2(179,4,ent->ArrayLen(),4); + delete ent; // 181 gd_alter_carray aep = reinterpret_cast(d->Entry("new17")); @@ -1255,6 +1309,7 @@ CHECK_INT2(181,2,ent->FragmentIndex(),0); CHECK_INT2(181,3,ent->ConstType(),Float32); CHECK_INT2(181,4,ent->ArrayLen(),12); + delete ent; diff -Nru libgetdata-0.7.0/bindings/cxx/test/Makefile.in libgetdata-0.7.1/bindings/cxx/test/Makefile.in --- libgetdata-0.7.0/bindings/cxx/test/Makefile.in 2010-11-23 00:33:32.000000000 +0000 +++ libgetdata-0.7.1/bindings/cxx/test/Makefile.in 2010-12-06 23:08:41.000000000 +0000 @@ -102,6 +102,7 @@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DIFF = @DIFF@ +DLLTOOL = @DLLTOOL@ DL_LIBRARY_PATH = @DL_LIBRARY_PATH@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ @@ -147,6 +148,7 @@ LZMA_CPPFLAGS = @LZMA_CPPFLAGS@ LZMA_LDFLAGS = @LZMA_LDFLAGS@ MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ @@ -181,6 +183,7 @@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ absolute_docdir = @absolute_docdir@ +ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ @@ -217,7 +220,6 @@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ diff -Nru libgetdata-0.7.0/bindings/f77/fgetdata.c libgetdata-0.7.1/bindings/f77/fgetdata.c --- libgetdata-0.7.0/bindings/f77/fgetdata.c 2010-11-07 00:24:31.000000000 +0000 +++ libgetdata-0.7.1/bindings/f77/fgetdata.c 2010-11-27 21:59:54.000000000 +0000 @@ -21,6 +21,14 @@ #include "fgetdata.h" +#ifdef GD_NO_C99_API +# define crealp creal +# define cimagp creal +#else +# define crealp(x) creal(*x) +# define cimagp(x) cimag(*x) +#endif + #include #include #include @@ -34,9 +42,10 @@ /* initialise the f77dirfiles array */ static void _GDF_InitDirfiles(void) { - dtracevoid(); int i; + dtracevoid(); + for (i = 1; i < GDF_N_DIRFILES; ++i) f77dirfiles[i] = NULL; @@ -51,9 +60,10 @@ /* make a C string */ static char* _GDF_CString(char* out, const char* in, int l) { - dtrace("%p, %p, %i", out, in, l); int i; + dtrace("%p, %p, %i", out, in, l); + for (i = 0; i < l; ++i) out[i] = in[i]; out[l] = '\0'; @@ -115,9 +125,11 @@ /* create a Fortran space padded string */ static int _GDF_FString(char* dest, int *dlen, const char* src) { + int i, slen; + dtrace("%p, %i, \"%s\"", dest, *dlen, src); - int i; - int slen = strlen(src); + + slen = strlen(src); if (src == NULL) { *dlen = 0; @@ -190,12 +202,10 @@ void F77_FUNC(gdflsh, GDFLSH) (const int* dirfile, const char* field_code, const int* field_code_l) { - char* out; - if (field_code_l == 0) gd_flush(_GDF_GetDirfile(*dirfile), NULL); else { - out = (char *)malloc(*field_code_l + 1); + char *out = (char *)malloc(*field_code_l + 1); gd_flush(_GDF_GetDirfile(*dirfile), _GDF_CString(out, field_code, *field_code_l)); free(out); @@ -210,6 +220,7 @@ void* data_out) { char* out = (char *)malloc(*field_code_l + 1); + *n_read = gd_getdata(_GDF_GetDirfile(*dirfile), _GDF_CString(out, field_code, *field_code_l), *first_frame, *first_sample, *num_frames, *num_samples, (gd_type_t)*return_type, data_out); @@ -219,13 +230,15 @@ /* Return the maximum field name length */ void F77_FUNC(gdfdnx, GDFDNX) (int* max, const int* dirfile) { + const char **fl; size_t len = 0; DIRFILE* D = _GDF_GetDirfile(*dirfile); unsigned int i, nfields = gd_nfields(D); + if (D->error) return; - const char** fl = gd_field_list(D); + fl = gd_field_list(D); for (i = 0; i < nfields; ++i) if (strlen(fl[i]) > len) @@ -238,20 +251,22 @@ void F77_FUNC(gdmfnx, GDMFNX) (int* max, const int* dirfile, const char* parent, const int* parent_l) { + const char **fl; + unsigned int i, nfields; size_t len = 0; DIRFILE* D = _GDF_GetDirfile(*dirfile); - char* pa = (char *)malloc(*parent_l + 1); + _GDF_CString(pa, parent, *parent_l); - unsigned int i, nfields = gd_nmfields(D, pa); + nfields = gd_nmfields(D, pa); if (D->error) { free(pa); return; } - const char** fl = gd_mfield_list(D, pa); + fl = gd_mfield_list(D, pa); for (i = 0; i < nfields; ++i) if (strlen(fl[i]) > len) @@ -284,12 +299,13 @@ const char* parent, const int* parent_l, const int* field_num) { const char** fl; + unsigned int nfields; DIRFILE* D = _GDF_GetDirfile(*dirfile); - char* pa = (char *)malloc(*parent_l + 1); + _GDF_CString(pa, parent, *parent_l); - unsigned int nfields = gd_nmfields(D, pa); + nfields = gd_nmfields(D, pa); if (D->error) { free(pa); return; @@ -387,9 +403,11 @@ void F77_FUNC(gdenty, GDENTY) (int* type, const int* dirfile, const char* field_code, const int* field_code_l) { + char *fc; + dtrace("%p, %i, %p, %i", type, *dirfile, field_code, *field_code_l); - char* fc = (char *)malloc(*field_code_l + 1); + fc = (char *)malloc(*field_code_l + 1); *type = (int)gd_entry_type(_GDF_GetDirfile(*dirfile), _GDF_CString(fc, field_code, *field_code_l)); @@ -403,11 +421,13 @@ void F77_FUNC(gdgerw, GDGERW) (int* spf, int* dtype, int* fragment_index, const int* dirfile, const char* field_code, const int* field_code_l) { + char *out; + gd_entry_t E; + dtrace("%p, %p, %p, %i, %p, %i", spf, dtype, fragment_index, *dirfile, field_code, *field_code_l); - char* out = (char *)malloc(*field_code_l + 1); - gd_entry_t E; + out = (char *)malloc(*field_code_l + 1); if (gd_entry(_GDF_GetDirfile(*dirfile), _GDF_CString(out, field_code, *field_code_l), &E) || E.field_type != GD_RAW_ENTRY) @@ -432,13 +452,15 @@ int* fragment_index, const int* dirfile, const char* field_code, const int* field_code_l) { + char *out; + gd_entry_t E; + dtrace("%p, %p, %p, %p, %p, %p, %p, %p, %p, %p, %p, %p, %p, %p, %i, %p, %i", nfields, infield1, infield1_l, m1, b1, infield2, infield2_l, m2, b2, infield3, infield3_l, m3, b3, fragment_index, *dirfile, field_code, *field_code_l); - char* out = (char *)malloc(*field_code_l + 1); - gd_entry_t E; + out = (char *)malloc(*field_code_l + 1); if (gd_entry(_GDF_GetDirfile(*dirfile), _GDF_CString(out, field_code, *field_code_l), &E) || E.field_type != GD_LINCOM_ENTRY) @@ -477,13 +499,15 @@ int* fragment_index, const int* dirfile, const char* field_code, const int* field_code_l) { + char *fc; + gd_entry_t E; + dtrace("%p, %p, %p, %p, %p, %p, %p, %p, %p, %p, %p, %p, %p, %p, %i, %p, %i", nfields, infield1, infield1_l, m1, b1, infield2, infield2_l, m2, b2, infield3, infield3_l, m3, b3, fragment_index, *dirfile, field_code, *field_code_l); - char* fc = (char *)malloc(*field_code_l + 1); - gd_entry_t E; + fc = (char *)malloc(*field_code_l + 1); if (gd_entry(_GDF_GetDirfile(*dirfile), _GDF_CString(fc, field_code, *field_code_l), &E)) @@ -524,12 +548,14 @@ int* fragment_index, const int* dirfile, const char* field_code, const int* field_code_l) { + char *out; + gd_entry_t E; + dtrace("%p, %p, %i, %p, %p, %p, %p, %p, %p, %p, %i, %p, %i", poly_ord, infield, *infield_l, a0, a1, a2, a3, a4, a5, fragment_index, *dirfile, field_code, *field_code_l); - char* out = (char *)malloc(*field_code_l + 1); - gd_entry_t E; + out = (char *)malloc(*field_code_l + 1); if (gd_entry(_GDF_GetDirfile(*dirfile), _GDF_CString(out, field_code, *field_code_l), &E) || E.field_type != GD_POLYNOM_ENTRY) @@ -566,12 +592,14 @@ int* fragment_index, const int* dirfile, const char* field_code, const int* field_code_l) { + char *out; + gd_entry_t E; + dtrace("%p, %p, %i, %p, %p, %p, %p, %p, %p, %p, %i, %p, %i", poly_ord, infield, *infield_l, a0, a1, a2, a3, a4, a5, fragment_index, *dirfile, field_code, *field_code_l); - char* out = (char *)malloc(*field_code_l + 1); - gd_entry_t E; + out = (char *)malloc(*field_code_l + 1); if (gd_entry(_GDF_GetDirfile(*dirfile), _GDF_CString(out, field_code, *field_code_l), &E) || E.field_type != GD_POLYNOM_ENTRY) @@ -608,11 +636,13 @@ int* table_l, int* fragment_index, const int* dirfile, const char* field_code, const int* field_code_l) { + char *out; + gd_entry_t E; + dtrace("%p, %i, %p, %i, %p, %i, %p, %i", in_field, *in_field_l, table, *table_l, fragment_index, *dirfile, field_code, *field_code_l); - char* out = (char *)malloc(*field_code_l + 1); - gd_entry_t E; + out = (char *)malloc(*field_code_l + 1); if (gd_entry(_GDF_GetDirfile(*dirfile), _GDF_CString(out, field_code, *field_code_l), &E) || E.field_type != GD_LINTERP_ENTRY) @@ -633,11 +663,13 @@ int* numbits, int* fragment_index, const int* dirfile, const char* field_code, const int* field_code_l) { + char *out; + gd_entry_t E; + dtrace("%p, %i, %p, %p, %p, %i, %p, %i", in_field, *in_field_l, bitnum, numbits, fragment_index, *dirfile, field_code, *field_code_l); - char* out = (char *)malloc(*field_code_l + 1); - gd_entry_t E; + out = (char *)malloc(*field_code_l + 1); if (gd_entry(_GDF_GetDirfile(*dirfile), _GDF_CString(out, field_code, *field_code_l), &E) || E.field_type != GD_BIT_ENTRY) @@ -659,11 +691,13 @@ int* numbits, int* fragment_index, const int* dirfile, const char* field_code, const int* field_code_l) { + char *out; + gd_entry_t E; + dtrace("%p, %i, %p, %p, %p, %i, %p, %i", in_field, *in_field_l, bitnum, numbits, fragment_index, *dirfile, field_code, *field_code_l); - char* out = (char *)malloc(*field_code_l + 1); - gd_entry_t E; + out = (char *)malloc(*field_code_l + 1); if (gd_entry(_GDF_GetDirfile(*dirfile), _GDF_CString(out, field_code, *field_code_l), &E) || E.field_type != GD_SBIT_ENTRY) @@ -685,12 +719,14 @@ char* in_field2, int* in_field2_l, int* fragment_index, const int* dirfile, const char* field_code, const int* field_code_l) { + char *out; + gd_entry_t E; + dtrace("%p, %i, %p, %i, %p, %i, %p, %i", in_field1, *in_field1_l, in_field2, *in_field2_l, fragment_index, *dirfile, field_code, *field_code_l); - char* out = (char *)malloc(*field_code_l + 1); - gd_entry_t E; + out = (char *)malloc(*field_code_l + 1); if (gd_entry(_GDF_GetDirfile(*dirfile), _GDF_CString(out, field_code, *field_code_l), &E) || E.field_type != GD_MULTIPLY_ENTRY) @@ -711,12 +747,14 @@ char* in_field2, int* in_field2_l, int* fragment_index, const int* dirfile, const char* field_code, const int* field_code_l) { + char *out; + gd_entry_t E; + dtrace("%p, %i, %p, %i, %p, %i, %p, %i", in_field1, *in_field1_l, in_field2, *in_field2_l, fragment_index, *dirfile, field_code, *field_code_l); - char* out = (char *)malloc(*field_code_l + 1); - gd_entry_t E; + out = (char *)malloc(*field_code_l + 1); if (gd_entry(_GDF_GetDirfile(*dirfile), _GDF_CString(out, field_code, *field_code_l), &E) || E.field_type != GD_DIVIDE_ENTRY) @@ -738,11 +776,13 @@ double* dividend, int* fragment_index, const int* dirfile, const char* field_code, const int* field_code_l) { + char *out; + gd_entry_t E; + dtrace("%p, %i, %p, %p, %i, %p, %i", in_field, *in_field_l, dividend, fragment_index, *dirfile, field_code, *field_code_l); - char* out = (char *)malloc(*field_code_l + 1); - gd_entry_t E; + out = (char *)malloc(*field_code_l + 1); if (gd_entry(_GDF_GetDirfile(*dirfile), _GDF_CString(out, field_code, *field_code_l), &E) || E.field_type != GD_RECIP_ENTRY) @@ -763,11 +803,13 @@ GD_DCOMPLEXP(cdividend), int* fragment_index, const int* dirfile, const char* field_code, const int* field_code_l) { + char *out; + gd_entry_t E; + dtrace("%p, %i, %p, %p, %i, %p, %i", in_field, *in_field_l, cdividend, fragment_index, *dirfile, field_code, *field_code_l); - char* out = (char *)malloc(*field_code_l + 1); - gd_entry_t E; + out = (char *)malloc(*field_code_l + 1); if (gd_entry(_GDF_GetDirfile(*dirfile), _GDF_CString(out, field_code, *field_code_l), &E) || E.field_type != GD_RECIP_ENTRY) @@ -789,11 +831,13 @@ int* fragment_index, const int* dirfile, const char* field_code, const int* field_code_l) { + char *out; + gd_entry_t E; + dtrace("%p, %i, %p, %p, %i, %p, %i", in_field, *in_field_l, shift, fragment_index, *dirfile, field_code, *field_code_l); - char* out = (char *)malloc(*field_code_l + 1); - gd_entry_t E; + out = (char *)malloc(*field_code_l + 1); if (gd_entry(_GDF_GetDirfile(*dirfile), _GDF_CString(out, field_code, *field_code_l), &E) || E.field_type != GD_PHASE_ENTRY) @@ -813,11 +857,13 @@ void F77_FUNC(gdgeco, GDGECO) (int* data_type, int* fragment_index, const int* dirfile, const char* field_code, const int* field_code_l) { + char *out; + gd_entry_t E; + dtrace("%p, %p, %i, %p, %i", data_type, fragment_index, *dirfile, field_code, *field_code_l); - char* out = (char *)malloc(*field_code_l + 1); - gd_entry_t E; + out = (char *)malloc(*field_code_l + 1); if (gd_entry(_GDF_GetDirfile(*dirfile), _GDF_CString(out, field_code, *field_code_l), &E) || E.field_type != GD_CONST_ENTRY) @@ -837,11 +883,13 @@ int* fragment_index, const int* dirfile, const char* field_code, const int* field_code_l) { + char *out; + gd_entry_t E; + dtrace("%p, %p, %p, %i, %p, %i", data_type, array_len, fragment_index, *dirfile, field_code, *field_code_l); - char* out = (char *)malloc(*field_code_l + 1); - gd_entry_t E; + out = (char *)malloc(*field_code_l + 1); if (gd_entry(_GDF_GetDirfile(*dirfile), _GDF_CString(out, field_code, *field_code_l), &E) || E.field_type != GD_CARRAY_ENTRY) @@ -1120,12 +1168,14 @@ const int* field_code_l, const char* in_field1, const int* in_field1_l, const char* in_field2, const int* in_field2_l, const int* fragment_index) { + char *fc, *in1, *in2; + dtrace("%i, %p, %i, %p, %i, %p, %i, %i", *dirfile, field_code, *field_code_l, in_field1, *in_field1_l, in_field2, *in_field2_l, *fragment_index); - char* fc = (char *)malloc(*field_code_l + 1); - char* in1 = (char *)malloc(*in_field1_l + 1); - char* in2 = (char *)malloc(*in_field2_l + 1); + fc = (char *)malloc(*field_code_l + 1); + in1 = (char *)malloc(*in_field1_l + 1); + in2 = (char *)malloc(*in_field2_l + 1); gd_add_divide(_GDF_GetDirfile(*dirfile), _GDF_CString(fc, field_code, *field_code_l), _GDF_CString(in1, in_field1, *in_field1_l), @@ -1143,11 +1193,13 @@ const int* field_code_l, const char* in_field, const int* in_field_l, const double* dividend, const int* fragment_index) { + char *fc, *in; + dtrace("%i, %p, %i, %p, %i, %g, %i", *dirfile, field_code, *field_code_l, in_field, *in_field_l, *dividend, *fragment_index); - char* fc = (char *)malloc(*field_code_l + 1); - char* in = (char *)malloc(*in_field_l + 1); + fc = (char *)malloc(*field_code_l + 1); + in = (char *)malloc(*in_field_l + 1); gd_add_recip(_GDF_GetDirfile(*dirfile), _GDF_CString(fc, field_code, *field_code_l), _GDF_CString(in, in_field, *in_field_l), *dividend, @@ -1163,12 +1215,14 @@ const int* field_code_l, const char* in_field, const int* in_field_l, const GD_DCOMPLEXP(cdividend), const int* fragment_index) { + char *fc, *in; + dtrace("%i, %p, %i, %p, %i, %g;%g, %i", *dirfile, field_code, *field_code_l, - in_field, *in_field_l, creal(*cdividend), cimag(*cdividend), + in_field, *in_field_l, crealp(cdividend), cimagp(cdividend), *fragment_index); - char* fc = (char *)malloc(*field_code_l + 1); - char* in = (char *)malloc(*in_field_l + 1); + fc = (char *)malloc(*field_code_l + 1); + in = (char *)malloc(*in_field_l + 1); #ifdef GD_NO_C99_API gd_add_crecip89(_GDF_GetDirfile(*dirfile), _GDF_CString(fc, field_code, @@ -1278,11 +1332,15 @@ void F77_FUNC(gdvecn, GDVECN) (char* name, int* name_l, const int* dirfile, const int* field_num) { + const char** fl; + DIRFILE *D; + unsigned int nfields; + dtrace("%p, %p, %i, %i", name, name_l, *dirfile, *field_num); - const char** fl; - DIRFILE* D = _GDF_GetDirfile(*dirfile); - unsigned int nfields = gd_nvectors(D); + D = _GDF_GetDirfile(*dirfile); + nfields = gd_nvectors(D); + if (D->error) return; @@ -1301,12 +1359,13 @@ const int* field_num) { const char** fl; + unsigned int nfields; DIRFILE* D = _GDF_GetDirfile(*dirfile); - char* pa = (char *)malloc(*parent_l + 1); + _GDF_CString(pa, parent, *parent_l); - unsigned int nfields = gd_nmfields_by_type(D, pa, (gd_entype_t)*type); + nfields = gd_nmfields_by_type(D, pa, (gd_entype_t)*type); if (D->error) { free(pa); return; @@ -1326,12 +1385,13 @@ const char* parent, const int* parent_l, const int* field_num) { const char** fl; + unsigned int nfields; DIRFILE* D = _GDF_GetDirfile(*dirfile); - char* pa = (char *)malloc(*parent_l + 1); + _GDF_CString(pa, parent, *parent_l); - unsigned int nfields = gd_nmvectors(D, pa); + nfields = gd_nmvectors(D, pa); if (D->error) { free(pa); return; @@ -1613,14 +1673,16 @@ const char* in_field1, const int* in_field1_l, const char* in_field2, const int* in_field2_l) { + char *pa, *fc, *in1, *in2; + dtrace("%i, %p, %i, %p, %i, %p, %i, %p, %i", *dirfile, parent, *parent_l, field_code, *field_code_l, in_field1, *in_field1_l, in_field2, *in_field2_l); - char* pa = (char *)malloc(*parent_l + 1); - char* fc = (char *)malloc(*field_code_l + 1); - char* in1 = (char *)malloc(*in_field1_l + 1); - char* in2 = (char *)malloc(*in_field2_l + 1); + pa = (char *)malloc(*parent_l + 1); + fc = (char *)malloc(*field_code_l + 1); + in1 = (char *)malloc(*in_field1_l + 1); + in2 = (char *)malloc(*in_field2_l + 1); gd_madd_divide(_GDF_GetDirfile(*dirfile), _GDF_CString(pa, parent, *parent_l), _GDF_CString(fc, field_code, *field_code_l), @@ -1640,12 +1702,14 @@ const int* parent_l, const char* field_code, const int* field_code_l, const char* in_field, const int* in_field_l, const double* dividend) { + char *pa, *fc, *in1; + dtrace("%i, %p, %i, %p, %i, %p, %i, %g", *dirfile, parent, *parent_l, field_code, *field_code_l, in_field, *in_field_l, *dividend); - char* pa = (char *)malloc(*parent_l + 1); - char* fc = (char *)malloc(*field_code_l + 1); - char* in1 = (char *)malloc(*in_field_l + 1); + pa = (char *)malloc(*parent_l + 1); + fc = (char *)malloc(*field_code_l + 1); + in1 = (char *)malloc(*in_field_l + 1); gd_madd_recip(_GDF_GetDirfile(*dirfile), _GDF_CString(pa, parent, *parent_l), _GDF_CString(fc, field_code, *field_code_l), @@ -1663,13 +1727,15 @@ const char* in_field, const int* in_field_l, const GD_DCOMPLEXP(cdividend)) { + char *pa, *fc, *in1; + dtrace("%i, %p, %i, %p, %i, %p, %i, %g;%g", *dirfile, parent, *parent_l, - field_code, *field_code_l, in_field, *in_field_l, creal(*cdividend), - cimag(*cdividend)); + field_code, *field_code_l, in_field, *in_field_l, crealp(cdividend), + cimagp(cdividend)); - char* pa = (char *)malloc(*parent_l + 1); - char* fc = (char *)malloc(*field_code_l + 1); - char* in1 = (char *)malloc(*in_field_l + 1); + pa = (char *)malloc(*parent_l + 1); + fc = (char *)malloc(*field_code_l + 1); + in1 = (char *)malloc(*in_field_l + 1); #ifdef GD_NO_C99_API gd_madd_crecip89(_GDF_GetDirfile(*dirfile), _GDF_CString(pa, parent, @@ -1741,11 +1807,13 @@ const int *field_code_l, const int *const_type, int *array_len, const int *data_type, const void *value, const int *fragment_index) { + char *fc; + dtrace("%i, %p, %i, %x, %i, %x, %p, %i", *dirfile, field_code, *field_code_l, *const_type, *array_len, *data_type, value, *fragment_index); - char *fc = (char *)malloc(*field_code_l + 1); + fc = (char *)malloc(*field_code_l + 1); gd_add_carray(_GDF_GetDirfile(*dirfile), _GDF_CString(fc, field_code, *field_code_l), (gd_type_t)*const_type, *array_len, @@ -1761,11 +1829,13 @@ const int *const_type, const int *array_len, const int *data_type, const void *value) { + char *pa, *fc; + dtrace("%i, %p, %i, %p, %i, %x, %i, %x, %p", *dirfile, parent, *parent_l, field_code, *field_code_l, *const_type, *array_len, *data_type, value); - char *pa = (char *)malloc(*parent_l + 1); - char *fc = (char *)malloc(*field_code_l + 1); + pa = (char *)malloc(*parent_l + 1); + fc = (char *)malloc(*field_code_l + 1); gd_madd_carray(_GDF_GetDirfile(*dirfile), _GDF_CString(pa, parent, *parent_l), _GDF_CString(fc, field_code, *field_code_l), @@ -1839,13 +1909,16 @@ void F77_FUNC(gdgtco, GDGTCO) (const int *dirfile, const char *field_code, const int *field_code_l, const int *return_type, void *data_out) { + char *fc; + dtrace("%i, %p, %i, %i, %p", *dirfile, field_code, *field_code_l, *return_type, data_out); - char *fc = (char *)malloc(*field_code_l + 1); + fc = (char *)malloc(*field_code_l + 1); gd_get_constant(_GDF_GetDirfile(*dirfile), _GDF_CString(fc, field_code, *field_code_l), (gd_type_t)*return_type, data_out); free(fc); + dreturnvoid(); } @@ -1853,13 +1926,16 @@ void F77_FUNC(gdgtca, GDGTCA) (const int *dirfile, const char *field_code, const int *field_code_l, const int *return_type, void *data_out) { + char *fc; + dtrace("%i, %p, %i, %x, %p", *dirfile, field_code, *field_code_l, *return_type, data_out); - char *fc = (char *)malloc(*field_code_l + 1); + fc = (char *)malloc(*field_code_l + 1); gd_get_carray(_GDF_GetDirfile(*dirfile), _GDF_CString(fc, field_code, *field_code_l), (gd_type_t)*return_type, data_out); free(fc); + dreturnvoid(); } @@ -1868,14 +1944,17 @@ const int *field_code_l, const int *start, const int *n, const int *return_type, void *data_out) { + char *fc; + dtrace("%i, %p, %i, %i, %i, %x, %p", *dirfile, field_code, *field_code_l, *start, *n, *return_type, data_out); - char *fc = (char *)malloc(*field_code_l + 1); + fc = (char *)malloc(*field_code_l + 1); gd_get_carray_slice(_GDF_GetDirfile(*dirfile), _GDF_CString(fc, field_code, *field_code_l), *start - 1, (size_t)*n, (gd_type_t)*return_type, data_out); free(fc); + dreturnvoid(); } @@ -1883,11 +1962,15 @@ void F77_FUNC(gdcaln, GDCALN) (int *len, const int *dirfile, const char *field_code, const int *field_code_l) { + char *fc; + dtrace("%p, %i, %p, %i", len, *dirfile, field_code, *field_code_l); - char *fc = (char *)malloc(*field_code_l + 1); + + fc = (char *)malloc(*field_code_l + 1); *len = gd_carray_len(_GDF_GetDirfile(*dirfile), _GDF_CString(fc, field_code, *field_code_l)); free(fc); + dreturnvoid(); } @@ -1912,12 +1995,16 @@ void F77_FUNC(gdptco, GDPTCO) (const int *dirfile, const char *field_code, const int *field_code_l, const int *data_type, const void *data_in) { + char *fc; + dtrace("%i, %p, %i, %x, %p", *dirfile, field_code, *field_code_l, *data_type, data_in); - char *fc = (char *)malloc(*field_code_l + 1); + + fc = (char *)malloc(*field_code_l + 1); gd_put_constant(_GDF_GetDirfile(*dirfile), _GDF_CString(fc, field_code, *field_code_l), (gd_type_t)*data_type, data_in); free(fc); + dreturnvoid(); } @@ -1925,12 +2012,16 @@ void F77_FUNC(gdptca, GDPTCA) (const int *dirfile, const char *field_code, const int *field_code_l, const int *data_type, const void *data_in) { + char *fc; + dtrace("%i, %p, %i, %x, %p", *dirfile, field_code, *field_code_l, *data_type, data_in); - char *fc = (char *)malloc(*field_code_l + 1); + + fc = (char *)malloc(*field_code_l + 1); gd_put_carray(_GDF_GetDirfile(*dirfile), _GDF_CString(fc, field_code, *field_code_l), (gd_type_t)*data_type, data_in); free(fc); + dreturnvoid(); } @@ -1939,12 +2030,16 @@ const int *field_code_l, const int *start, const int *n, const int *data_type, const void *data_in) { + char *fc; + dtrace("%i, %p, %i, %i, %i, %x, %p", *dirfile, field_code, *field_code_l, *start, *n, *data_type, data_in); - char *fc = (char *)malloc(*field_code_l + 1); + + fc = (char *)malloc(*field_code_l + 1); gd_put_carray_slice(_GDF_GetDirfile(*dirfile), _GDF_CString(fc, field_code, *field_code_l), *start - 1, (size_t)*n, (gd_type_t)*data_type, data_in); free(fc); + dreturnvoid(); } @@ -2009,10 +2104,12 @@ void F77_FUNC(gdcopn, GDCOPN) (int* dirfile, const char* dirfilename, const int* dirfilename_l, const int* flags, const void* callback) { + char *out; + dtrace("%p, %p, %i, %x, %p", dirfile, dirfilename, *dirfilename_l, *flags, callback); - char* out = (char *)malloc(*dirfilename_l + 1); + out = (char *)malloc(*dirfilename_l + 1); *dirfile = _GDF_SetDirfile(gd_cbopen(_GDF_CString(out, dirfilename, *dirfilename_l), *flags, (callback == 0) ? NULL : _GDF_Callback, @@ -2081,10 +2178,12 @@ void F77_FUNC(gdalca, GDALCA) (const int* dirfile, const char* field_code, const int* field_code_l, const int* const_type, const int *array_len) { + char *fc; + dtrace("%i, %p, %i, %x, %i", *dirfile, field_code, *field_code_l, *const_type, *array_len); - char* fc = (char *)malloc(*field_code_l + 1); + fc = (char *)malloc(*field_code_l + 1); gd_alter_carray(_GDF_GetDirfile(*dirfile), _GDF_CString(fc, field_code, *field_code_l), (gd_type_t)*const_type, (size_t)*array_len); @@ -2284,12 +2383,14 @@ const int* field_code_l, const char* in_field1, const int* in_field1_l, const char* in_field2, const int* in_field2_l) { + char *fc, *in1, *in2; + dtrace("%i %p %i %p %i %p %i", *dirfile, field_code, *field_code_l, in_field1, *in_field1_l, in_field2, *in_field2_l); - char* fc = (char *)malloc(*field_code_l + 1); - char* in1 = (char *)malloc(*in_field1_l + 1); - char* in2 = (char *)malloc(*in_field2_l + 1); + fc = (char *)malloc(*field_code_l + 1); + in1 = (char *)malloc(*in_field1_l + 1); + in2 = (char *)malloc(*in_field2_l + 1); gd_alter_divide(_GDF_GetDirfile(*dirfile), _GDF_CString(fc, field_code, *field_code_l), _GDF_CString(in1, in_field1, *in_field1_l), @@ -2307,11 +2408,13 @@ const int* field_code_l, const char* in_field1, const int* in_field1_l, const double* dividend) { + char *fc, *in1; + dtrace("%i, %p, %i, %p, %i, %g", *dirfile, field_code, *field_code_l, in_field1, *in_field1_l, *dividend); - char* fc = (char *)malloc(*field_code_l + 1); - char* in1 = (char *)malloc(*in_field1_l + 1); + fc = (char *)malloc(*field_code_l + 1); + in1 = (char *)malloc(*in_field1_l + 1); gd_alter_recip(_GDF_GetDirfile(*dirfile), _GDF_CString(fc, field_code, *field_code_l), _GDF_CString(in1, in_field1, *in_field1_l), @@ -2327,11 +2430,13 @@ const int* field_code_l, const char* in_field1, const int* in_field1_l, const GD_DCOMPLEXP(cdividend)) { + char *fc, *in1; + dtrace("%i, %p, %i, %p, %i, %g;%g", *dirfile, field_code, *field_code_l, - in_field1, *in_field1_l, creal(*cdividend), cimag(*cdividend)); + in_field1, *in_field1_l, crealp(cdividend), cimagp(cdividend)); - char* fc = (char *)malloc(*field_code_l + 1); - char* in1 = (char *)malloc(*in_field1_l + 1); + fc = (char *)malloc(*field_code_l + 1); + in1 = (char *)malloc(*in_field1_l + 1); #ifdef GD_NO_C99_API gd_alter_crecip89(_GDF_GetDirfile(*dirfile), _GDF_CString(fc, field_code, @@ -2582,11 +2687,14 @@ void F77_FUNC(gdcscl, GDCSCL) (int *comp_scal, const int *dirfile, const char *field_code, const int *field_code_l) { + char *fc; + gd_entry_t E; + DIRFILE *D; + dtrace("%p, %i, %p, %i", comp_scal, *dirfile, field_code, *field_code_l); - char *fc = (char *)malloc(*field_code_l + 1); - gd_entry_t E; - DIRFILE *D = _GDF_GetDirfile(*dirfile); + fc = (char *)malloc(*field_code_l + 1); + D = _GDF_GetDirfile(*dirfile); *comp_scal = 0; @@ -2631,9 +2739,11 @@ const char *field_code, const int *field_code_l, const double *value, const int *start, const int *end) { + char *fc; + dtrace("%p, %i, %p, %i, %g, %i, %i", framenum, *dirfile, field_code, *field_code_l, *value, *start, *end); - char *fc = (char *)malloc(*field_code_l + 1); + fc = (char *)malloc(*field_code_l + 1); *framenum = gd_framenum_subset(_GDF_GetDirfile(*dirfile), _GDF_CString(fc, field_code, *field_code_l), *value, *start, *end); @@ -2648,13 +2758,16 @@ const int* dirfile, const char* field_code, const int *field_code_l, const int* index) { + char *fc; + int ok = 0; + gd_entry_t E; + DIRFILE *D; + dtrace("%p, %p, %p, %i, %p, %i, %i", scalar, scalar_l, scalar_index, *dirfile, field_code, *field_code_l, *index); - char *fc = (char *)malloc(*field_code_l + 1); - gd_entry_t E; - DIRFILE *D = _GDF_GetDirfile(*dirfile); - int ok = 0; + fc = (char *)malloc(*field_code_l + 1); + D = _GDF_GetDirfile(*dirfile); gd_entry(D, _GDF_CString(fc, field_code, *field_code_l), &E); @@ -2714,12 +2827,16 @@ const int *field_code_l, const int *index, const char *scalar, const int *scalar_l, int *scalar_index, int *recode) { + int ok = 1; + char *fc; + gd_entry_t E; + DIRFILE *D; + dtrace("%i, %p, %i, %i, %p, %i, %i, %i", *dirfile, field_code, *field_code_l, *index, scalar, *scalar_l, *scalar_index, *recode); - char *fc = (char *)malloc(*field_code_l + 1); - gd_entry_t E; - DIRFILE *D = _GDF_GetDirfile(*dirfile); + fc = (char *)malloc(*field_code_l + 1); + D = _GDF_GetDirfile(*dirfile); if (*index < 1) { dreturnvoid(); @@ -2728,7 +2845,6 @@ gd_entry(D, _GDF_CString(fc, field_code, *field_code_l), &E); - int ok = 1; switch (E.field_type) { case GD_NO_ENTRY: case GD_LINTERP_ENTRY: @@ -2776,6 +2892,8 @@ gd_alter_entry(D, fc, &E, *recode); + gd_free_entry_strings(&E); + free(fc); dreturnvoid(); } diff -Nru libgetdata-0.7.0/bindings/f77/Makefile.in libgetdata-0.7.1/bindings/f77/Makefile.in --- libgetdata-0.7.0/bindings/f77/Makefile.in 2010-11-23 00:33:32.000000000 +0000 +++ libgetdata-0.7.1/bindings/f77/Makefile.in 2010-12-06 23:08:41.000000000 +0000 @@ -181,6 +181,7 @@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DIFF = @DIFF@ +DLLTOOL = @DLLTOOL@ DL_LIBRARY_PATH = @DL_LIBRARY_PATH@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ @@ -226,6 +227,7 @@ LZMA_CPPFLAGS = @LZMA_CPPFLAGS@ LZMA_LDFLAGS = @LZMA_LDFLAGS@ MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ @@ -260,6 +262,7 @@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ absolute_docdir = @absolute_docdir@ +ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ @@ -296,7 +299,6 @@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ diff -Nru libgetdata-0.7.0/bindings/f77/test/Makefile.in libgetdata-0.7.1/bindings/f77/test/Makefile.in --- libgetdata-0.7.0/bindings/f77/test/Makefile.in 2010-11-23 00:33:32.000000000 +0000 +++ libgetdata-0.7.1/bindings/f77/test/Makefile.in 2010-12-06 23:08:41.000000000 +0000 @@ -114,6 +114,7 @@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DIFF = @DIFF@ +DLLTOOL = @DLLTOOL@ DL_LIBRARY_PATH = @DL_LIBRARY_PATH@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ @@ -159,6 +160,7 @@ LZMA_CPPFLAGS = @LZMA_CPPFLAGS@ LZMA_LDFLAGS = @LZMA_LDFLAGS@ MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ @@ -193,6 +195,7 @@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ absolute_docdir = @absolute_docdir@ +ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ @@ -229,7 +232,6 @@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ diff -Nru libgetdata-0.7.0/bindings/idl/Makefile.in libgetdata-0.7.1/bindings/idl/Makefile.in --- libgetdata-0.7.0/bindings/idl/Makefile.in 2010-11-23 00:33:32.000000000 +0000 +++ libgetdata-0.7.1/bindings/idl/Makefile.in 2010-12-06 23:08:41.000000000 +0000 @@ -170,6 +170,7 @@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DIFF = @DIFF@ +DLLTOOL = @DLLTOOL@ DL_LIBRARY_PATH = @DL_LIBRARY_PATH@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ @@ -215,6 +216,7 @@ LZMA_CPPFLAGS = @LZMA_CPPFLAGS@ LZMA_LDFLAGS = @LZMA_LDFLAGS@ MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ @@ -249,6 +251,7 @@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ absolute_docdir = @absolute_docdir@ +ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ @@ -285,7 +288,6 @@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ diff -Nru libgetdata-0.7.0/bindings/idl/test/Makefile.in libgetdata-0.7.1/bindings/idl/test/Makefile.in --- libgetdata-0.7.0/bindings/idl/test/Makefile.in 2010-11-23 00:33:32.000000000 +0000 +++ libgetdata-0.7.1/bindings/idl/test/Makefile.in 2010-12-06 23:08:41.000000000 +0000 @@ -80,6 +80,7 @@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DIFF = @DIFF@ +DLLTOOL = @DLLTOOL@ DL_LIBRARY_PATH = @DL_LIBRARY_PATH@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ @@ -125,6 +126,7 @@ LZMA_CPPFLAGS = @LZMA_CPPFLAGS@ LZMA_LDFLAGS = @LZMA_LDFLAGS@ MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ @@ -159,6 +161,7 @@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ absolute_docdir = @absolute_docdir@ +ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ @@ -195,7 +198,6 @@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ diff -Nru libgetdata-0.7.0/bindings/Makefile.in libgetdata-0.7.1/bindings/Makefile.in --- libgetdata-0.7.0/bindings/Makefile.in 2010-11-23 00:33:32.000000000 +0000 +++ libgetdata-0.7.1/bindings/Makefile.in 2010-12-06 23:08:40.000000000 +0000 @@ -139,6 +139,7 @@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DIFF = @DIFF@ +DLLTOOL = @DLLTOOL@ DL_LIBRARY_PATH = @DL_LIBRARY_PATH@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ @@ -184,6 +185,7 @@ LZMA_CPPFLAGS = @LZMA_CPPFLAGS@ LZMA_LDFLAGS = @LZMA_LDFLAGS@ MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ @@ -218,6 +220,7 @@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ absolute_docdir = @absolute_docdir@ +ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ @@ -254,7 +257,6 @@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ diff -Nru libgetdata-0.7.0/bindings/python/Makefile.in libgetdata-0.7.1/bindings/python/Makefile.in --- libgetdata-0.7.0/bindings/python/Makefile.in 2010-11-23 00:33:32.000000000 +0000 +++ libgetdata-0.7.1/bindings/python/Makefile.in 2010-12-06 23:08:41.000000000 +0000 @@ -169,6 +169,7 @@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DIFF = @DIFF@ +DLLTOOL = @DLLTOOL@ DL_LIBRARY_PATH = @DL_LIBRARY_PATH@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ @@ -214,6 +215,7 @@ LZMA_CPPFLAGS = @LZMA_CPPFLAGS@ LZMA_LDFLAGS = @LZMA_LDFLAGS@ MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ @@ -248,6 +250,7 @@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ absolute_docdir = @absolute_docdir@ +ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ @@ -284,7 +287,6 @@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ diff -Nru libgetdata-0.7.0/bindings/python/pygetdata.c libgetdata-0.7.1/bindings/python/pygetdata.c --- libgetdata-0.7.0/bindings/python/pygetdata.c 2010-11-07 00:14:36.000000000 +0000 +++ libgetdata-0.7.1/bindings/python/pygetdata.c 2010-11-24 21:10:18.000000000 +0000 @@ -167,13 +167,13 @@ gd_type_t gdpy_convert_from_pylist(PyObject* value, void *data, gd_type_t type, size_t ns) { - dtrace("%p, %p, %02x, %zi", value, data, type, ns); - size_t i; + union gdpy_quadruple_value tmp; + + dtrace("%p, %p, %02x, %zi", value, data, type, ns); /* use the first element to determine the data type */ - int data_type = gdpy_convert_from_pyobj(PyList_GetItem(value, 0), - (union gdpy_quadruple_value*)data, type); + int data_type = gdpy_convert_from_pyobj(PyList_GetItem(value, 0), &tmp, type); if (data_type == -1) { dreturn("%02x", GD_UNKNOWN); @@ -183,32 +183,38 @@ switch(data_type) { case GDPY_INT_AS_LONG: type = GD_INT32; + *(int32_t*)data = tmp.s; for (i = 1; i < ns; ++i) ((int32_t*)data)[i] = PyInt_AsLong(PyList_GetItem(value, i)); break; case GDPY_LONG_AS_ULL: type = GD_UINT64; + *(uint64_t*)data = tmp.u; for (i = 1; i < ns; ++i) ((uint64_t*)data)[i] = PyLong_AsUnsignedLongLong(PyList_GetItem(value, i)); break; case GDPY_LONG_AS_SLL: type = GD_INT64; + *(int64_t*)data = tmp.s; for (i = 1; i < ns; ++i) ((int64_t*)data)[i] = PyLong_AsLongLong(PyList_GetItem(value, i)); break; case GDPY_LONG_AS_DOUBLE: type = GD_FLOAT64; + *(double*)data = tmp.f; for (i = 1; i < ns; ++i) ((double*)data)[i] = PyLong_AsDouble(PyList_GetItem(value, i)); break; case GDPY_FLOAT_AS_DOUBLE: type = GD_FLOAT64; + *(double*)data = tmp.f; for (i = 1; i < ns; ++i) ((double*)data)[i] = PyFloat_AsDouble(PyList_GetItem(value, i)); break; case GDPY_COMPLEX_AS_COMPLEX: type = GD_COMPLEX128; + *(complex double*)data = tmp.c; for (i = 1; i < ns; ++i) ((double complex*)data)[i] = gdpy_as_complex(PyList_GetItem(value, i)); break; diff -Nru libgetdata-0.7.0/bindings/python/test/Makefile.in libgetdata-0.7.1/bindings/python/test/Makefile.in --- libgetdata-0.7.0/bindings/python/test/Makefile.in 2010-11-23 00:33:32.000000000 +0000 +++ libgetdata-0.7.1/bindings/python/test/Makefile.in 2010-12-06 23:08:41.000000000 +0000 @@ -80,6 +80,7 @@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DIFF = @DIFF@ +DLLTOOL = @DLLTOOL@ DL_LIBRARY_PATH = @DL_LIBRARY_PATH@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ @@ -125,6 +126,7 @@ LZMA_CPPFLAGS = @LZMA_CPPFLAGS@ LZMA_LDFLAGS = @LZMA_LDFLAGS@ MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ @@ -159,6 +161,7 @@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ absolute_docdir = @absolute_docdir@ +ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ @@ -195,7 +198,6 @@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ diff -Nru libgetdata-0.7.0/ChangeLog libgetdata-0.7.1/ChangeLog --- libgetdata-0.7.0/ChangeLog 2010-11-17 15:24:12.000000000 +0000 +++ libgetdata-0.7.1/ChangeLog 2010-11-30 03:50:59.000000000 +0000 @@ -1,3 +1,92 @@ +2010-11-30 D. V. Wiebe svn:488 + GetData-0.7.1rc1: + + * src/del.c (gd_delete): Fix order of tests to avoid accessing out-of-bounds + memory. + * src/parse.c (_GD_ParseDirective): Don't update the version list if + _GD_Include failed. + * src/common.c (_GD_GetRepr): Don't attempt to find a representation suffix + on field codes which are too short to contain them. + * src/add.c (_GD_Add): Zero memory allocated for a CARRAY or CONST so + behaviour is deterministic when creating these fields via gd_[m]add(). + +2010-11-28 D. V. Wiebe svn:487 + * src/ test/ bindings/: Separate declarations from statements; + + * src/common.c (_GD_SetTablePath): Don't use fixed length buffers. + +2010-11-27 D. V. Wiebe svn:486 + * bindings/cxx/test/big_test.cpp: Delete stuff. + +2010-11-27 D. V. Wiebe svn:485 + * test/alter_polynom_coeff.c test/include_ignore.c test/alter_entry.c + test/entry_linterp.c test/entry_multiply.c test/move_data_enc_ar.c + test/gzip_move_from.c test/include_ref.c test/global_name.c + test/entry_phase.c test/move_data_foffs.c test/entry_raw_scalar.c + test/alter_entry_scalar3.c test/move_data_endian.c test/move.c + test/entry_raw.c test/move_data_nop.c test/alter_entry_scalar4.c + test/entry_polynom_scalar.c test/move_index.c test/header_complex.c + test/alter_entry_recode.c test/entry_bit_scalar.c test/entry_scalar_repr.c + test/entry_polynom.c test/file.c test/entry_lincom.c test/name_move.c + test/fragment_name.c test/move_data_enc_ra.c test/move_protect.c + test/alter_entry_scalar2n.c test/move_subdir.c test/entry_lincom_scalar.c + test/entry_phase_scalar.c test/alter_crecip89.c test/bzip_move_from.c + test/move_meta.c test/name.c test/entry_bit.c test/alter_entry_scalar2a.c + test/alter_linterp.c test/global_ref_set.c test/global_ref.c + test/include_auto.c: Free strings. + + * test/trunc_rofs.c test/open_notdirfile.c test/open_nonexistent.c: Close + dirfiles. + + * src/entry.c (_GD_FreeE): Free LUT. + * src/open.c (_GD_CreateDirfile): Close DIR after truncation. + * src/close.c (_GD_FreeD): Free dot list. + * src/getdata.c (_GD_DoRaw) src/putdata.c (_GD_DoRawOut): Free databuffer on + error. + * src/lzma.c (_GD_LzmaSize) src/bzip.c (_GD_Bzip2Size): Close file. + * src/move.c (_GD_MogrifyFile): Free new_filebase if necessary. + * src/parse.c (_GD_ParseFieldSpec): Free entry on duplicate field name. + * src/mod.c (_GD_Change): Transfer the old file structure to the new entry + in the case of RAW fields. Don't forget to free the old CONST storage, if + necessary. + * src/include.c (gd_include): Always free ref_name. + + * src/raw.c (_GD_RawTemp): Call the right close function on error. + + * src/mod.c (gd_alter_crecip89): For some reason, intialise scalar_ind[0]. + + * src/parse.c (_GD_ParseFragment _GD_ParseFieldSpec): Handle GD_IGNORE_DUPS + inside _GD_ParseFieldSpec, which eliminates the spurious error message if + GD_VERBOSE is given. + +2010-11-26 D. V. Wiebe svn:484 + * test/ascii_get_get.c: Added. + + * src/ascii.c (_GD_AsciiRead): Update fp as necessary so we don't get lost. + + * bindings/python/pygetdata.c (gdpy_convert_from_pylist): Don't type-pun + the return array into a gdpy_quadruple_value. + + * src/open.c (gd_cbopen): Don't allocate error string buffers. + * src/errors.c (_GD_SetError): Use strdup to copy error strings. + + * bindings/f77/fgetdata.c (GDASCA): Clean-up. + * src/del.c (gd_delete): Alloc the correct del_list for metafields. + * src/common.c (_GD_GetLine): Deallocate the line before returning NULL. + * src/entry.c (_GD_FreeE): Free p.meta_entry when appropriate. + + * src/nan.h: Added. + * src/internal.h: Removed NAN code. + * util/dirfile2ascii.c: Add missing -u option. Allow cart-before-horse + arguments (ie. "dirfile2ascii -e field dirfile"). Handle running past the + end-of-field nicelier (added -z option). Complain on no dirfile. + +2010-11-22 D. V. Wiebe svn:480 + GetData 0.7.0 released. + +2010-11-20 D. V. Wiebe svn:478 + * bindings/idl/getdata.c: Properly terminate IDL keyword lists. + 2010-11-17 D. V. Wiebe svn:476 * bindings/python/pydirfile.c (gdpy_dirfile_init) bindings/cxx/getdata/dirfile.h: Open dirfiles read-only by default (for diff -Nru libgetdata-0.7.0/configure libgetdata-0.7.1/configure --- libgetdata-0.7.0/configure 2010-11-23 00:33:35.000000000 +0000 +++ libgetdata-0.7.1/configure 2010-12-06 23:08:44.000000000 +0000 @@ -1,13 +1,13 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.65 for GetData 0.7.0. +# Generated by GNU Autoconf 2.68 for GetData 0.7.1. # # Report bugs to . # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software +# Foundation, Inc. # # # This configure script is free software; the Free Software Foundation @@ -91,6 +91,7 @@ IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. +as_myself= case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -173,7 +174,15 @@ as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 -test \$(( 1 + 1 )) = 2 || exit 1" +test \$(( 1 + 1 )) = 2 || exit 1 + + test -n \"\${ZSH_VERSION+set}\${BASH_VERSION+set}\" || ( + ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' + ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO + ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO + PATH=/empty FPATH=/empty; export PATH FPATH + test \"X\`printf %s \$ECHO\`\" = \"X\$ECHO\" \\ + || test \"X\`print -r -- \$ECHO\`\" = \"X\$ECHO\" ) || exit 1" if (eval "$as_required") 2>/dev/null; then : as_have_required=yes else @@ -216,11 +225,18 @@ # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also # works around shells that cannot unset nonexistent variables. + # Preserve -v and -x to the replacement shell. BASH_ENV=/dev/null ENV=/dev/null (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV export CONFIG_SHELL - exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} + case $- in # (((( + *v*x* | *x*v* ) as_opts=-vx ;; + *v* ) as_opts=-v ;; + *x* ) as_opts=-x ;; + * ) as_opts= ;; + esac + exec "$CONFIG_SHELL" $as_opts "$as_myself" ${1+"$@"} fi if test x$as_have_required = xno; then : @@ -319,7 +335,7 @@ test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir" + } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p @@ -359,19 +375,19 @@ fi # as_fn_arith -# as_fn_error ERROR [LINENO LOG_FD] -# --------------------------------- +# as_fn_error STATUS ERROR [LINENO LOG_FD] +# ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the -# script with status $?, using 1 if that was 0. +# script with STATUS, using 1 if that was 0. as_fn_error () { - as_status=$?; test $as_status -eq 0 && as_status=1 - if test "$3"; then - as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3 + as_status=$1; test $as_status -eq 0 && as_status=1 + if test "$4"; then + as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi - $as_echo "$as_me: error: $1" >&2 + $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error @@ -528,161 +544,14 @@ # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" - - -# Check that we are running under the correct shell. SHELL=${CONFIG_SHELL-/bin/sh} -case X$lt_ECHO in -X*--fallback-echo) - # Remove one level of quotation (which was required for Make). - ECHO=`echo "$lt_ECHO" | sed 's,\\\\\$\\$0,'$0','` - ;; -esac - -ECHO=${lt_ECHO-echo} -if test "X$1" = X--no-reexec; then - # Discard the --no-reexec flag, and continue. - shift -elif test "X$1" = X--fallback-echo; then - # Avoid inline document here, it may be left over - : -elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' ; then - # Yippee, $ECHO works! - : -else - # Restart under the correct shell. - exec $SHELL "$0" --no-reexec ${1+"$@"} -fi - -if test "X$1" = X--fallback-echo; then - # used as fallback echo - shift - cat <<_LT_EOF -$* -_LT_EOF - exit 0 -fi - -# The HP-UX ksh and POSIX shell print the target directory to stdout -# if CDPATH is set. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - -if test -z "$lt_ECHO"; then - if test "X${echo_test_string+set}" != Xset; then - # find a string as large as possible, as long as the shell can cope with it - for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do - # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... - if { echo_test_string=`eval $cmd`; } 2>/dev/null && - { test "X$echo_test_string" = "X$echo_test_string"; } 2>/dev/null - then - break - fi - done - fi - - if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' && - echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - : - else - # The Solaris, AIX, and Digital Unix default echo programs unquote - # backslashes. This makes it impossible to quote backslashes using - # echo "$something" | sed 's/\\/\\\\/g' - # - # So, first we look for a working echo in the user's PATH. - - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - for dir in $PATH /usr/ucb; do - IFS="$lt_save_ifs" - if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && - test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && - echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - ECHO="$dir/echo" - break - fi - done - IFS="$lt_save_ifs" - - if test "X$ECHO" = Xecho; then - # We didn't find a better echo, so look for alternatives. - if test "X`{ print -r '\t'; } 2>/dev/null`" = 'X\t' && - echo_testing_string=`{ print -r "$echo_test_string"; } 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - # This shell has a builtin print -r that does the trick. - ECHO='print -r' - elif { test -f /bin/ksh || test -f /bin/ksh$ac_exeext; } && - test "X$CONFIG_SHELL" != X/bin/ksh; then - # If we have ksh, try running configure again with it. - ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} - export ORIGINAL_CONFIG_SHELL - CONFIG_SHELL=/bin/ksh - export CONFIG_SHELL - exec $CONFIG_SHELL "$0" --no-reexec ${1+"$@"} - else - # Try using printf. - ECHO='printf %s\n' - if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' && - echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - # Cool, printf works - : - elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` && - test "X$echo_testing_string" = 'X\t' && - echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL - export CONFIG_SHELL - SHELL="$CONFIG_SHELL" - export SHELL - ECHO="$CONFIG_SHELL $0 --fallback-echo" - elif echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` && - test "X$echo_testing_string" = 'X\t' && - echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - ECHO="$CONFIG_SHELL $0 --fallback-echo" - else - # maybe with a smaller string... - prev=: - - for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do - if { test "X$echo_test_string" = "X`eval $cmd`"; } 2>/dev/null - then - break - fi - prev="$cmd" - done - - if test "$prev" != 'sed 50q "$0"'; then - echo_test_string=`eval $prev` - export echo_test_string - exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "$0" ${1+"$@"} - else - # Oops. We lost completely, so just stick with echo. - ECHO=echo - fi - fi - fi - fi - fi -fi - -# Copy echo and quote the copy suitably for passing to libtool from -# the Makefile, instead of quoting the original, which is used later. -lt_ECHO=$ECHO -if test "X$lt_ECHO" = "X$CONFIG_SHELL $0 --fallback-echo"; then - lt_ECHO="$CONFIG_SHELL \\\$\$0 --fallback-echo" -fi - - - test -n "$DJDIR" || exec 7<&0 &1 # Name of the host. -# hostname on some systems (SVR3.2, Linux) returns a bogus exit status, +# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` @@ -701,8 +570,8 @@ # Identity of this package. PACKAGE_NAME='GetData' PACKAGE_TARNAME='getdata' -PACKAGE_VERSION='0.7.0' -PACKAGE_STRING='GetData 0.7.0' +PACKAGE_VERSION='0.7.1' +PACKAGE_STRING='GetData 0.7.1' PACKAGE_BUGREPORT='getdata-devel@lists.sourceforge.net' PACKAGE_URL='' @@ -847,9 +716,11 @@ LIPO NMEDIT DSYMUTIL -lt_ECHO +MANIFEST_TOOL RANLIB +ac_ct_AR AR +DLLTOOL OBJDUMP NM ac_ct_DUMPBIN @@ -989,6 +860,7 @@ with_pic enable_fast_install with_gnu_ld +with_sysroot enable_libtool_lock with_python with_idl @@ -1078,8 +950,9 @@ fi case $ac_option in - *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; - *) ac_optarg=yes ;; + *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; + *=) ac_optarg= ;; + *) ac_optarg=yes ;; esac # Accept the important Cygnus configure options, so we can diagnose typos. @@ -1124,7 +997,7 @@ ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error "invalid feature name: $ac_useropt" + as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in @@ -1150,7 +1023,7 @@ ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error "invalid feature name: $ac_useropt" + as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in @@ -1354,7 +1227,7 @@ ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error "invalid package name: $ac_useropt" + as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in @@ -1370,7 +1243,7 @@ ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error "invalid package name: $ac_useropt" + as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in @@ -1400,8 +1273,8 @@ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; - -*) as_fn_error "unrecognized option: \`$ac_option' -Try \`$0 --help' for more information." + -*) as_fn_error $? "unrecognized option: \`$ac_option' +Try \`$0 --help' for more information" ;; *=*) @@ -1409,7 +1282,7 @@ # Reject names that are not valid shell variable names. case $ac_envvar in #( '' | [0-9]* | *[!_$as_cr_alnum]* ) - as_fn_error "invalid variable name: \`$ac_envvar'" ;; + as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; esac eval $ac_envvar=\$ac_optarg export $ac_envvar ;; @@ -1419,7 +1292,7 @@ $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 - : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} + : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" ;; esac @@ -1427,13 +1300,13 @@ if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` - as_fn_error "missing argument to $ac_option" + as_fn_error $? "missing argument to $ac_option" fi if test -n "$ac_unrecognized_opts"; then case $enable_option_checking in no) ;; - fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;; + fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; esac fi @@ -1456,7 +1329,7 @@ [\\/$]* | ?:[\\/]* ) continue;; NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac - as_fn_error "expected an absolute directory name for --$ac_var: $ac_val" + as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" done # There might be people who depend on the old broken behavior: `$host' @@ -1470,8 +1343,8 @@ if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe - $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. - If a cross compiler is detected then cross compile mode will be used." >&2 + $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host. + If a cross compiler is detected then cross compile mode will be used" >&2 elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi @@ -1486,9 +1359,9 @@ ac_pwd=`pwd` && test -n "$ac_pwd" && ac_ls_di=`ls -di .` && ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || - as_fn_error "working directory cannot be determined" + as_fn_error $? "working directory cannot be determined" test "X$ac_ls_di" = "X$ac_pwd_ls_di" || - as_fn_error "pwd does not report name of working directory" + as_fn_error $? "pwd does not report name of working directory" # Find the source files, if location was not specified. @@ -1527,11 +1400,11 @@ fi if test ! -r "$srcdir/$ac_unique_file"; then test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." - as_fn_error "cannot find sources ($ac_unique_file) in $srcdir" + as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" fi ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" ac_abs_confdir=`( - cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg" + cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" pwd)` # When building in place, set srcdir=. if test "$ac_abs_confdir" = "$ac_pwd"; then @@ -1557,7 +1430,7 @@ # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures GetData 0.7.0 to adapt to many kinds of systems. +\`configure' configures GetData 0.7.1 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1571,7 +1444,7 @@ --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit - -q, --quiet, --silent do not print \`checking...' messages + -q, --quiet, --silent do not print \`checking ...' messages --cache-file=FILE cache test results in FILE [disabled] -C, --config-cache alias for \`--cache-file=config.cache' -n, --no-create do not create output files @@ -1627,7 +1500,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of GetData 0.7.0:";; + short | recursive ) echo "Configuration of GetData 0.7.1:";; esac cat <<\_ACEOF @@ -1668,6 +1541,8 @@ --with-pic try to use only PIC/non-PIC objects [default=use both] --with-gnu-ld assume the C compiler uses GNU ld [default=no] + --with-sysroot=DIR Search for dependent libraries within DIR + (or the compiler's sysroot if not specified). --with-python=PATH use the Python interpreter located in PATH [[autodetect]] --with-idl=PATH use the IDL interpreter located in PATH @@ -1771,10 +1646,10 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -GetData configure 0.7.0 -generated by GNU Autoconf 2.65 +GetData configure 0.7.1 +generated by GNU Autoconf 2.68 -Copyright (C) 2009 Free Software Foundation, Inc. +Copyright (C) 2010 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF @@ -1818,7 +1693,7 @@ ac_retval=1 fi - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_compile @@ -1844,7 +1719,7 @@ mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } >/dev/null && { + test $ac_status = 0; } > conftest.i && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then : @@ -1855,7 +1730,7 @@ ac_retval=1 fi - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_cpp @@ -1897,7 +1772,7 @@ ac_retval=$ac_status fi rm -rf conftest.dSYM conftest_ipa8_conftest.oo - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_run @@ -1935,7 +1810,7 @@ ac_retval=1 fi - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_cxx_try_compile @@ -1973,7 +1848,7 @@ ac_retval=1 fi - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_f77_try_compile @@ -2011,7 +1886,7 @@ ac_retval=1 fi - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_fc_try_compile @@ -2057,7 +1932,7 @@ # interfere with the next link command; also delete a directory that is # left behind by Apple's compiler. We do this before executing the actions. rm -rf conftest.dSYM conftest_ipa8_conftest.oo - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_link @@ -2071,7 +1946,7 @@ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } -if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -2089,7 +1964,7 @@ eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_header_compile @@ -2101,7 +1976,7 @@ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } -if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -2156,7 +2031,7 @@ eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_func @@ -2181,7 +2056,7 @@ mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } >/dev/null && { + test $ac_status = 0; } > conftest.i && { test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || test ! -s conftest.err }; then : @@ -2192,7 +2067,7 @@ ac_retval=1 fi - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_cxx_try_cpp @@ -2238,7 +2113,7 @@ # interfere with the next link command; also delete a directory that is # left behind by Apple's compiler. We do this before executing the actions. rm -rf conftest.dSYM conftest_ipa8_conftest.oo - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_cxx_try_link @@ -2284,7 +2159,7 @@ # interfere with the next link command; also delete a directory that is # left behind by Apple's compiler. We do this before executing the actions. rm -rf conftest.dSYM conftest_ipa8_conftest.oo - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_f77_try_link @@ -2330,7 +2205,7 @@ # interfere with the next link command; also delete a directory that is # left behind by Apple's compiler. We do this before executing the actions. rm -rf conftest.dSYM conftest_ipa8_conftest.oo - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_fc_try_link @@ -2343,10 +2218,10 @@ ac_fn_c_check_header_mongrel () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : + if eval \${$3+:} false; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } -if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 fi eval ac_res=\$$3 @@ -2382,7 +2257,7 @@ else ac_header_preproc=no fi -rm -f conftest.err conftest.$ac_ext +rm -f conftest.err conftest.i conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 $as_echo "$ac_header_preproc" >&6; } @@ -2405,17 +2280,15 @@ $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} -( cat <<\_ASBOX -## -------------------------------------------------- ## +( $as_echo "## -------------------------------------------------- ## ## Report this to getdata-devel@lists.sourceforge.net ## -## -------------------------------------------------- ## -_ASBOX +## -------------------------------------------------- ##" ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } -if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else eval "$3=\$ac_header_compiler" @@ -2424,19 +2297,22 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } fi - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_header_mongrel -# ac_fn_c_check_decl LINENO SYMBOL VAR -# ------------------------------------ -# Tests whether SYMBOL is declared, setting cache variable VAR accordingly. +# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES +# --------------------------------------------- +# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR +# accordingly. ac_fn_c_check_decl () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $2 is declared" >&5 -$as_echo_n "checking whether $2 is declared... " >&6; } -if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : + as_decl_name=`echo $2|sed 's/ *(.*//'` + as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'` + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5 +$as_echo_n "checking whether $as_decl_name is declared... " >&6; } +if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -2453,8 +2329,12 @@ int main () { -#ifndef $2 - (void) $2; +#ifndef $as_decl_name +#ifdef __cplusplus + (void) $as_decl_use; +#else + (void) $as_decl_name; +#endif #endif ; @@ -2471,7 +2351,7 @@ eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_decl @@ -2484,7 +2364,7 @@ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } -if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else eval "$3=no" @@ -2541,7 +2421,7 @@ eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_type @@ -2766,7 +2646,7 @@ rm -f conftest.val fi - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_compute_int @@ -2780,7 +2660,7 @@ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint$2_t" >&5 $as_echo_n "checking for uint$2_t... " >&6; } -if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else eval "$3=no" @@ -2818,8 +2698,7 @@ esac fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - eval as_val=\$$3 - if test "x$as_val" = x""no; then : + if eval test \"x\$"$3"\" = x"no"; then : else break @@ -2829,7 +2708,7 @@ eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_find_uintX_t @@ -2842,7 +2721,7 @@ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int$2_t" >&5 $as_echo_n "checking for int$2_t... " >&6; } -if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else eval "$3=no" @@ -2853,6 +2732,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default + enum { N = $2 / 2 - 1 }; #ifdef F77_DUMMY_MAIN # ifdef __cplusplus @@ -2864,8 +2744,7 @@ int main () { -static int test_array [1 - 2 * !(enum { N = $2 / 2 - 1 }; - 0 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1))]; +static int test_array [1 - 2 * !(0 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1))]; test_array [0] = 0 ; @@ -2876,6 +2755,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default + enum { N = $2 / 2 - 1 }; #ifdef F77_DUMMY_MAIN # ifdef __cplusplus @@ -2887,8 +2767,7 @@ int main () { -static int test_array [1 - 2 * !(enum { N = $2 / 2 - 1 }; - ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1) +static int test_array [1 - 2 * !(($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1) < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 2))]; test_array [0] = 0 @@ -2909,8 +2788,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - eval as_val=\$$3 - if test "x$as_val" = x""no; then : + if eval test \"x\$"$3"\" = x"no"; then : else break @@ -2920,15 +2798,15 @@ eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_find_intX_t cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by GetData $as_me 0.7.0, which was -generated by GNU Autoconf 2.65. Invocation command line was +It was created by GetData $as_me 0.7.1, which was +generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -3038,11 +2916,9 @@ { echo - cat <<\_ASBOX -## ---------------- ## + $as_echo "## ---------------- ## ## Cache variables. ## -## ---------------- ## -_ASBOX +## ---------------- ##" echo # The following way of writing the cache mishandles newlines in values, ( @@ -3076,11 +2952,9 @@ ) echo - cat <<\_ASBOX -## ----------------- ## + $as_echo "## ----------------- ## ## Output variables. ## -## ----------------- ## -_ASBOX +## ----------------- ##" echo for ac_var in $ac_subst_vars do @@ -3093,11 +2967,9 @@ echo if test -n "$ac_subst_files"; then - cat <<\_ASBOX -## ------------------- ## + $as_echo "## ------------------- ## ## File substitutions. ## -## ------------------- ## -_ASBOX +## ------------------- ##" echo for ac_var in $ac_subst_files do @@ -3111,11 +2983,9 @@ fi if test -s confdefs.h; then - cat <<\_ASBOX -## ----------- ## + $as_echo "## ----------- ## ## confdefs.h. ## -## ----------- ## -_ASBOX +## ----------- ##" echo cat confdefs.h echo @@ -3170,7 +3040,12 @@ ac_site_file1=NONE ac_site_file2=NONE if test -n "$CONFIG_SITE"; then - ac_site_file1=$CONFIG_SITE + # We do not want a PATH search for config.site. + case $CONFIG_SITE in #(( + -*) ac_site_file1=./$CONFIG_SITE;; + */*) ac_site_file1=$CONFIG_SITE;; + *) ac_site_file1=./$CONFIG_SITE;; + esac elif test "x$prefix" != xNONE; then ac_site_file1=$prefix/share/config.site ac_site_file2=$prefix/etc/config.site @@ -3185,7 +3060,11 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 $as_echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 - . "$ac_site_file" + . "$ac_site_file" \ + || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "failed to load site script $ac_site_file +See \`config.log' for more details" "$LINENO" 5; } fi done @@ -3261,7 +3140,7 @@ $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} - as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 + as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 fi ## -------------------- ## ## Main body of script. ## @@ -3282,7 +3161,7 @@ $as_echo "#define GETDATA_MINOR 7" >>confdefs.h -$as_echo "#define GETDATA_REVISION 0" >>confdefs.h +$as_echo "#define GETDATA_REVISION 1" >>confdefs.h $as_echo "#define GETDATA_VERSION_SUFFIX \"\"" >>confdefs.h @@ -3297,7 +3176,7 @@ GETDATA_IFACE_VERSION=4 -GETDATA_IMPL_REVISION=0 +GETDATA_IMPL_REVISION=1 GETDATA_IFACE_AGE=0 @@ -3305,7 +3184,7 @@ GETDATAXX_VERSION=2:0:0 -FGETDATA_VERSION=2:0:0 +FGETDATA_VERSION=2:1:0 F95GETDATA_VERSION=2:0:0 @@ -3326,16 +3205,22 @@ ac_aux_dir= for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do - for ac_t in install-sh install.sh shtool; do - if test -f "$ac_dir/$ac_t"; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/$ac_t -c" - break 2 - fi - done + if test -f "$ac_dir/install-sh"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install-sh -c" + break + elif test -f "$ac_dir/install.sh"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install.sh -c" + break + elif test -f "$ac_dir/shtool"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/shtool install -c" + break + fi done if test -z "$ac_aux_dir"; then - as_fn_error "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5 + as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5 fi # These three variables are undocumented and unsupported, @@ -3349,27 +3234,27 @@ # Make sure we can run config.sub. $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || - as_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 + as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 $as_echo_n "checking build system type... " >&6; } -if test "${ac_cv_build+set}" = set; then : +if ${ac_cv_build+:} false; then : $as_echo_n "(cached) " >&6 else ac_build_alias=$build_alias test "x$ac_build_alias" = x && ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` test "x$ac_build_alias" = x && - as_fn_error "cannot guess build type; you must specify one" "$LINENO" 5 + as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || - as_fn_error "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 + as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 $as_echo "$ac_cv_build" >&6; } case $ac_cv_build in *-*-*) ;; -*) as_fn_error "invalid value of canonical build" "$LINENO" 5;; +*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; esac build=$ac_cv_build ac_save_IFS=$IFS; IFS='-' @@ -3387,14 +3272,14 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 $as_echo_n "checking host system type... " >&6; } -if test "${ac_cv_host+set}" = set; then : +if ${ac_cv_host+:} false; then : $as_echo_n "(cached) " >&6 else if test "x$host_alias" = x; then ac_cv_host=$ac_cv_build else ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || - as_fn_error "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 + as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 fi fi @@ -3402,7 +3287,7 @@ $as_echo "$ac_cv_host" >&6; } case $ac_cv_host in *-*-*) ;; -*) as_fn_error "invalid value of canonical host" "$LINENO" 5;; +*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; esac host=$ac_cv_host ac_save_IFS=$IFS; IFS='-' @@ -3698,7 +3583,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 $as_echo_n "checking for a BSD-compatible install... " >&6; } if test -z "$INSTALL"; then -if test "${ac_cv_path_install+set}" = set; then : +if ${ac_cv_path_install+:} false; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -3785,11 +3670,11 @@ ' case `pwd` in *[\\\"\#\$\&\'\`$am_lf]*) - as_fn_error "unsafe absolute working directory name" "$LINENO" 5;; + as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;; esac case $srcdir in *[\\\"\#\$\&\'\`$am_lf\ \ ]*) - as_fn_error "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;; + as_fn_error $? "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;; esac # Do `set' in a subshell so we don't clobber the current shell's @@ -3811,7 +3696,7 @@ # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". - as_fn_error "ls -t appears to fail. Make sure there is not a broken + as_fn_error $? "ls -t appears to fail. Make sure there is not a broken alias in your environment" "$LINENO" 5 fi @@ -3821,7 +3706,7 @@ # Ok. : else - as_fn_error "newly created file is older than distributed files! + as_fn_error $? "newly created file is older than distributed files! Check your system clock" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 @@ -3875,7 +3760,7 @@ set dummy ${ac_tool_prefix}strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_STRIP+set}" = set; then : +if ${ac_cv_prog_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$STRIP"; then @@ -3915,7 +3800,7 @@ set dummy strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then : +if ${ac_cv_prog_ac_ct_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_STRIP"; then @@ -3968,7 +3853,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; } if test -z "$MKDIR_P"; then - if test "${ac_cv_path_mkdir+set}" = set; then : + if ${ac_cv_path_mkdir+:} false; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -4019,7 +3904,7 @@ set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_AWK+set}" = set; then : +if ${ac_cv_prog_AWK+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$AWK"; then @@ -4059,7 +3944,7 @@ $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } set x ${MAKE-make} ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` -if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then : $as_echo_n "(cached) " >&6 else cat >conftest.make <<\_ACEOF @@ -4067,7 +3952,7 @@ all: @echo '@@@%%%=$(MAKE)=@@@%%%' _ACEOF -# GNU make sometimes prints "make[1]: Entering...", which would confuse us. +# GNU make sometimes prints "make[1]: Entering ...", which would confuse us. case `${MAKE-make} -f conftest.make 2>/dev/null` in *@@@%%%=?*=@@@%%%*) eval ac_cv_prog_make_${ac_make}_set=yes;; @@ -4101,7 +3986,7 @@ am__isrc=' -I$(srcdir)' # test to see if srcdir already configured if test -f $srcdir/config.status; then - as_fn_error "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 + as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 fi fi @@ -4117,7 +4002,7 @@ # Define the identity of the package. PACKAGE='getdata' - VERSION='0.7.0' + VERSION='0.7.1' cat >>confdefs.h <<_ACEOF @@ -4170,7 +4055,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 $as_echo_n "checking for grep that handles long lines and -e... " >&6; } -if test "${ac_cv_path_GREP+set}" = set; then : +if ${ac_cv_path_GREP+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$GREP"; then @@ -4219,7 +4104,7 @@ done IFS=$as_save_IFS if test -z "$ac_cv_path_GREP"; then - as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_GREP=$GREP @@ -4237,7 +4122,7 @@ set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_AWK+set}" = set; then : +if ${ac_cv_prog_AWK+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$AWK"; then @@ -4275,7 +4160,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5 $as_echo_n "checking for a sed that does not truncate output... " >&6; } -if test "${ac_cv_path_SED+set}" = set; then : +if ${ac_cv_path_SED+:} false; then : $as_echo_n "(cached) " >&6 else ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ @@ -4330,7 +4215,7 @@ done IFS=$as_save_IFS if test -z "$ac_cv_path_SED"; then - as_fn_error "no acceptable sed could be found in \$PATH" "$LINENO" 5 + as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5 fi else ac_cv_path_SED=$SED @@ -4381,7 +4266,7 @@ set dummy ${ac_tool_prefix}gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then : +if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then @@ -4421,7 +4306,7 @@ set dummy gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : +if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then @@ -4474,7 +4359,7 @@ set dummy ${ac_tool_prefix}cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then : +if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then @@ -4514,7 +4399,7 @@ set dummy cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then : +if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then @@ -4573,7 +4458,7 @@ set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then : +if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then @@ -4617,7 +4502,7 @@ set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : +if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then @@ -4671,8 +4556,8 @@ test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "no acceptable C compiler found in \$PATH -See \`config.log' for more details." "$LINENO" 5; } +as_fn_error $? "no acceptable C compiler found in \$PATH +See \`config.log' for more details" "$LINENO" 5; } # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 @@ -4786,9 +4671,8 @@ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ as_fn_set_status 77 -as_fn_error "C compiler cannot create executables -See \`config.log' for more details." "$LINENO" 5; }; } +as_fn_error 77 "C compiler cannot create executables +See \`config.log' for more details" "$LINENO" 5; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } @@ -4830,8 +4714,8 @@ else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "cannot compute suffix of executables: cannot compile and link -See \`config.log' for more details." "$LINENO" 5; } +as_fn_error $? "cannot compute suffix of executables: cannot compile and link +See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest conftest$ac_cv_exeext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 @@ -4888,9 +4772,9 @@ else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "cannot run C compiled programs. +as_fn_error $? "cannot run C compiled programs. If you meant to cross compile, use \`--host'. -See \`config.log' for more details." "$LINENO" 5; } +See \`config.log' for more details" "$LINENO" 5; } fi fi fi @@ -4901,7 +4785,7 @@ ac_clean_files=$ac_clean_files_save { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 $as_echo_n "checking for suffix of object files... " >&6; } -if test "${ac_cv_objext+set}" = set; then : +if ${ac_cv_objext+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -4941,8 +4825,8 @@ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "cannot compute suffix of object files: cannot compile -See \`config.log' for more details." "$LINENO" 5; } +as_fn_error $? "cannot compute suffix of object files: cannot compile +See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi @@ -4952,7 +4836,7 @@ ac_objext=$OBJEXT { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } -if test "${ac_cv_c_compiler_gnu+set}" = set; then : +if ${ac_cv_c_compiler_gnu+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -4989,7 +4873,7 @@ ac_save_CFLAGS=$CFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 $as_echo_n "checking whether $CC accepts -g... " >&6; } -if test "${ac_cv_prog_cc_g+set}" = set; then : +if ${ac_cv_prog_cc_g+:} false; then : $as_echo_n "(cached) " >&6 else ac_save_c_werror_flag=$ac_c_werror_flag @@ -5067,7 +4951,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } -if test "${ac_cv_prog_cc_c89+set}" = set; then : +if ${ac_cv_prog_cc_c89+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no @@ -5228,7 +5112,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 $as_echo_n "checking dependency style of $depcc... " >&6; } -if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then : +if ${am_cv_CC_dependencies_compiler_type+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then @@ -5360,7 +5244,7 @@ fi set dummy $CC; ac_cc=`$as_echo "$2" | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'` -if { as_var=ac_cv_prog_cc_${ac_cc}_c_o; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval \${ac_cv_prog_cc_${ac_cc}_c_o+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -5466,7 +5350,7 @@ if test "x$disable_c99" != "xyes"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C99" >&5 $as_echo_n "checking for $CC option to accept ISO C99... " >&6; } -if test "${ac_cv_prog_cc_c99+set}" = set; then : +if ${ac_cv_prog_cc_c99+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c99=no @@ -5666,7 +5550,7 @@ CPP= fi if test -z "$CPP"; then - if test "${ac_cv_prog_CPP+set}" = set; then : + if ${ac_cv_prog_CPP+:} false; then : $as_echo_n "(cached) " >&6 else # Double quotes because CPP needs to be expanded @@ -5696,7 +5580,7 @@ # Broken: fails on valid input. continue fi -rm -f conftest.err conftest.$ac_ext +rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. @@ -5712,11 +5596,11 @@ ac_preproc_ok=: break fi -rm -f conftest.err conftest.$ac_ext +rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.err conftest.$ac_ext +rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : break fi @@ -5755,7 +5639,7 @@ # Broken: fails on valid input. continue fi -rm -f conftest.err conftest.$ac_ext +rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. @@ -5771,18 +5655,18 @@ ac_preproc_ok=: break fi -rm -f conftest.err conftest.$ac_ext +rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.err conftest.$ac_ext +rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "C preprocessor \"$CPP\" fails sanity check -See \`config.log' for more details." "$LINENO" 5; } +as_fn_error $? "C preprocessor \"$CPP\" fails sanity check +See \`config.log' for more details" "$LINENO" 5; } fi ac_ext=c @@ -5794,7 +5678,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 $as_echo_n "checking for egrep... " >&6; } -if test "${ac_cv_path_EGREP+set}" = set; then : +if ${ac_cv_path_EGREP+:} false; then : $as_echo_n "(cached) " >&6 else if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 @@ -5846,7 +5730,7 @@ done IFS=$as_save_IFS if test -z "$ac_cv_path_EGREP"; then - as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_EGREP=$EGREP @@ -5861,7 +5745,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 $as_echo_n "checking for ANSI C header files... " >&6; } -if test "${ac_cv_header_stdc+set}" = set; then : +if ${ac_cv_header_stdc+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -5991,7 +5875,7 @@ set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CXX+set}" = set; then : +if ${ac_cv_prog_CXX+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CXX"; then @@ -6035,7 +5919,7 @@ set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then : +if ${ac_cv_prog_ac_ct_CXX+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CXX"; then @@ -6113,7 +5997,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5 $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; } -if test "${ac_cv_cxx_compiler_gnu+set}" = set; then : +if ${ac_cv_cxx_compiler_gnu+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -6150,7 +6034,7 @@ ac_save_CXXFLAGS=$CXXFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5 $as_echo_n "checking whether $CXX accepts -g... " >&6; } -if test "${ac_cv_prog_cxx_g+set}" = set; then : +if ${ac_cv_prog_cxx_g+:} false; then : $as_echo_n "(cached) " >&6 else ac_save_cxx_werror_flag=$ac_cxx_werror_flag @@ -6236,7 +6120,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 $as_echo_n "checking dependency style of $depcc... " >&6; } -if test "${am_cv_CXX_dependencies_compiler_type+set}" = set; then : +if ${am_cv_CXX_dependencies_compiler_type+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then @@ -6366,7 +6250,7 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX understands -c and -o together" >&5 $as_echo_n "checking whether $CXX understands -c and -o together... " >&6; } -if test "${ac_cv_prog_cxx_c_o+set}" = set; then : +if ${ac_cv_prog_cxx_c_o+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -6434,13 +6318,13 @@ ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_f77_compiler_gnu if test -n "$ac_tool_prefix"; then - for ac_prog in g77 xlf f77 frt pgf77 cf77 fort77 fl32 af77 xlf90 f90 pgf90 pghpf epcf90 gfortran g95 xlf95 f95 fort ifort ifc efc pgf95 lf95 ftn + for ac_prog in g77 xlf f77 frt pgf77 cf77 fort77 fl32 af77 xlf90 f90 pgf90 pghpf epcf90 gfortran g95 xlf95 f95 fort ifort ifc efc pgfortran pgf95 lf95 ftn do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_F77+set}" = set; then : +if ${ac_cv_prog_F77+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$F77"; then @@ -6478,13 +6362,13 @@ fi if test -z "$F77"; then ac_ct_F77=$F77 - for ac_prog in g77 xlf f77 frt pgf77 cf77 fort77 fl32 af77 xlf90 f90 pgf90 pghpf epcf90 gfortran g95 xlf95 f95 fort ifort ifc efc pgf95 lf95 ftn + for ac_prog in g77 xlf f77 frt pgf77 cf77 fort77 fl32 af77 xlf90 f90 pgf90 pghpf epcf90 gfortran g95 xlf95 f95 fort ifort ifc efc pgfortran pgf95 lf95 ftn do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_F77+set}" = set; then : +if ${ac_cv_prog_ac_ct_F77+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_F77"; then @@ -6566,7 +6450,7 @@ ac_ext=F { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU Fortran 77 compiler" >&5 $as_echo_n "checking whether we are using the GNU Fortran 77 compiler... " >&6; } -if test "${ac_cv_f77_compiler_gnu+set}" = set; then : +if ${ac_cv_f77_compiler_gnu+:} false; then : $as_echo_n "(cached) " >&6 else cat > conftest.$ac_ext <<_ACEOF @@ -6594,7 +6478,7 @@ FFLAGS= { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $F77 accepts -g" >&5 $as_echo_n "checking whether $F77 accepts -g... " >&6; } -if test "${ac_cv_prog_f77_g+set}" = set; then : +if ${ac_cv_prog_f77_g+:} false; then : $as_echo_n "(cached) " >&6 else FFLAGS=-g @@ -6646,7 +6530,7 @@ ac_compiler_gnu=$ac_cv_f77_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $F77 understands -c and -o together" >&5 $as_echo_n "checking whether $F77 understands -c and -o together... " >&6; } -if test "${ac_cv_prog_f77_c_o+set}" = set; then : +if ${ac_cv_prog_f77_c_o+:} false; then : $as_echo_n "(cached) " >&6 else cat > conftest.$ac_ext <<_ACEOF @@ -6709,13 +6593,13 @@ ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_fc_compiler_gnu if test -n "$ac_tool_prefix"; then - for ac_prog in gfortran g95 xlf95 f95 fort ifort ifc efc pgf95 lf95 ftn xlf90 f90 pgf90 pghpf epcf90 g77 xlf f77 frt pgf77 cf77 fort77 fl32 af77 + for ac_prog in gfortran g95 xlf95 f95 fort ifort ifc efc pgfortran pgf95 lf95 ftn xlf90 f90 pgf90 pghpf epcf90 g77 xlf f77 frt pgf77 cf77 fort77 fl32 af77 do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_FC+set}" = set; then : +if ${ac_cv_prog_FC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$FC"; then @@ -6753,13 +6637,13 @@ fi if test -z "$FC"; then ac_ct_FC=$FC - for ac_prog in gfortran g95 xlf95 f95 fort ifort ifc efc pgf95 lf95 ftn xlf90 f90 pgf90 pghpf epcf90 g77 xlf f77 frt pgf77 cf77 fort77 fl32 af77 + for ac_prog in gfortran g95 xlf95 f95 fort ifort ifc efc pgfortran pgf95 lf95 ftn xlf90 f90 pgf90 pghpf epcf90 g77 xlf f77 frt pgf77 cf77 fort77 fl32 af77 do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_FC+set}" = set; then : +if ${ac_cv_prog_ac_ct_FC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_FC"; then @@ -6841,7 +6725,7 @@ ac_ext=F { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU Fortran compiler" >&5 $as_echo_n "checking whether we are using the GNU Fortran compiler... " >&6; } -if test "${ac_cv_fc_compiler_gnu+set}" = set; then : +if ${ac_cv_fc_compiler_gnu+:} false; then : $as_echo_n "(cached) " >&6 else cat > conftest.$ac_ext <<_ACEOF @@ -6869,7 +6753,7 @@ FCFLAGS= { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $FC accepts -g" >&5 $as_echo_n "checking whether $FC accepts -g... " >&6; } -if test "${ac_cv_prog_fc_g+set}" = set; then : +if ${ac_cv_prog_fc_g+:} false; then : $as_echo_n "(cached) " >&6 else FCFLAGS=-g @@ -6916,7 +6800,7 @@ ac_compiler_gnu=$ac_cv_fc_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $FC understands -c and -o together" >&5 $as_echo_n "checking whether $FC understands -c and -o together... " >&6; } -if test "${ac_cv_prog_fc_c_o+set}" = set; then : +if ${ac_cv_prog_fc_c_o+:} false; then : $as_echo_n "(cached) " >&6 else cat > conftest.$ac_ext <<_ACEOF @@ -7011,7 +6895,7 @@ set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_BUILDCC+set}" = set; then : +if ${ac_cv_prog_BUILDCC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$BUILDCC"; then @@ -7056,7 +6940,7 @@ set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_BUILDCC+set}" = set; then : +if ${ac_cv_prog_BUILDCC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$BUILDCC"; then @@ -7116,7 +7000,7 @@ set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CXX+set}" = set; then : +if ${ac_cv_prog_CXX+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CXX"; then @@ -7160,7 +7044,7 @@ set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then : +if ${ac_cv_prog_ac_ct_CXX+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CXX"; then @@ -7238,7 +7122,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5 $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; } -if test "${ac_cv_cxx_compiler_gnu+set}" = set; then : +if ${ac_cv_cxx_compiler_gnu+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -7275,7 +7159,7 @@ ac_save_CXXFLAGS=$CXXFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5 $as_echo_n "checking whether $CXX accepts -g... " >&6; } -if test "${ac_cv_prog_cxx_g+set}" = set; then : +if ${ac_cv_prog_cxx_g+:} false; then : $as_echo_n "(cached) " >&6 else ac_save_cxx_werror_flag=$ac_cxx_werror_flag @@ -7361,7 +7245,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 $as_echo_n "checking dependency style of $depcc... " >&6; } -if test "${am_cv_CXX_dependencies_compiler_type+set}" = set; then : +if ${am_cv_CXX_dependencies_compiler_type+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then @@ -7491,7 +7375,7 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX understands -c and -o together" >&5 $as_echo_n "checking whether $CXX understands -c and -o together... " >&6; } -if test "${ac_cv_prog_cxx_c_o+set}" = set; then : +if ${ac_cv_prog_cxx_c_o+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -7557,13 +7441,13 @@ ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_f77_compiler_gnu if test -n "$ac_tool_prefix"; then - for ac_prog in g77 xlf f77 frt pgf77 cf77 fort77 fl32 af77 xlf90 f90 pgf90 pghpf epcf90 gfortran g95 xlf95 f95 fort ifort ifc efc pgf95 lf95 ftn + for ac_prog in g77 xlf f77 frt pgf77 cf77 fort77 fl32 af77 xlf90 f90 pgf90 pghpf epcf90 gfortran g95 xlf95 f95 fort ifort ifc efc pgfortran pgf95 lf95 ftn do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_F77+set}" = set; then : +if ${ac_cv_prog_F77+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$F77"; then @@ -7601,13 +7485,13 @@ fi if test -z "$F77"; then ac_ct_F77=$F77 - for ac_prog in g77 xlf f77 frt pgf77 cf77 fort77 fl32 af77 xlf90 f90 pgf90 pghpf epcf90 gfortran g95 xlf95 f95 fort ifort ifc efc pgf95 lf95 ftn + for ac_prog in g77 xlf f77 frt pgf77 cf77 fort77 fl32 af77 xlf90 f90 pgf90 pghpf epcf90 gfortran g95 xlf95 f95 fort ifort ifc efc pgfortran pgf95 lf95 ftn do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_F77+set}" = set; then : +if ${ac_cv_prog_ac_ct_F77+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_F77"; then @@ -7689,7 +7573,7 @@ ac_ext=F { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU Fortran 77 compiler" >&5 $as_echo_n "checking whether we are using the GNU Fortran 77 compiler... " >&6; } -if test "${ac_cv_f77_compiler_gnu+set}" = set; then : +if ${ac_cv_f77_compiler_gnu+:} false; then : $as_echo_n "(cached) " >&6 else cat > conftest.$ac_ext <<_ACEOF @@ -7717,7 +7601,7 @@ FFLAGS= { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $F77 accepts -g" >&5 $as_echo_n "checking whether $F77 accepts -g... " >&6; } -if test "${ac_cv_prog_f77_g+set}" = set; then : +if ${ac_cv_prog_f77_g+:} false; then : $as_echo_n "(cached) " >&6 else FFLAGS=-g @@ -7769,7 +7653,7 @@ ac_compiler_gnu=$ac_cv_f77_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $F77 understands -c and -o together" >&5 $as_echo_n "checking whether $F77 understands -c and -o together... " >&6; } -if test "${ac_cv_prog_f77_c_o+set}" = set; then : +if ${ac_cv_prog_f77_c_o+:} false; then : $as_echo_n "(cached) " >&6 else cat > conftest.$ac_ext <<_ACEOF @@ -7830,13 +7714,13 @@ ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_fc_compiler_gnu if test -n "$ac_tool_prefix"; then - for ac_prog in gfortran g95 xlf95 f95 fort ifort ifc efc pgf95 lf95 ftn xlf90 f90 pgf90 pghpf epcf90 g77 xlf f77 frt pgf77 cf77 fort77 fl32 af77 + for ac_prog in gfortran g95 xlf95 f95 fort ifort ifc efc pgfortran pgf95 lf95 ftn xlf90 f90 pgf90 pghpf epcf90 g77 xlf f77 frt pgf77 cf77 fort77 fl32 af77 do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_FC+set}" = set; then : +if ${ac_cv_prog_FC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$FC"; then @@ -7874,13 +7758,13 @@ fi if test -z "$FC"; then ac_ct_FC=$FC - for ac_prog in gfortran g95 xlf95 f95 fort ifort ifc efc pgf95 lf95 ftn xlf90 f90 pgf90 pghpf epcf90 g77 xlf f77 frt pgf77 cf77 fort77 fl32 af77 + for ac_prog in gfortran g95 xlf95 f95 fort ifort ifc efc pgfortran pgf95 lf95 ftn xlf90 f90 pgf90 pghpf epcf90 g77 xlf f77 frt pgf77 cf77 fort77 fl32 af77 do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_FC+set}" = set; then : +if ${ac_cv_prog_ac_ct_FC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_FC"; then @@ -7962,7 +7846,7 @@ ac_ext=F { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU Fortran compiler" >&5 $as_echo_n "checking whether we are using the GNU Fortran compiler... " >&6; } -if test "${ac_cv_fc_compiler_gnu+set}" = set; then : +if ${ac_cv_fc_compiler_gnu+:} false; then : $as_echo_n "(cached) " >&6 else cat > conftest.$ac_ext <<_ACEOF @@ -7990,7 +7874,7 @@ FCFLAGS= { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $FC accepts -g" >&5 $as_echo_n "checking whether $FC accepts -g... " >&6; } -if test "${ac_cv_prog_fc_g+set}" = set; then : +if ${ac_cv_prog_fc_g+:} false; then : $as_echo_n "(cached) " >&6 else FCFLAGS=-g @@ -8037,7 +7921,7 @@ ac_compiler_gnu=$ac_cv_fc_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $FC understands -c and -o together" >&5 $as_echo_n "checking whether $FC understands -c and -o together... " >&6; } -if test "${ac_cv_prog_fc_c_o+set}" = set; then : +if ${ac_cv_prog_fc_c_o+:} false; then : $as_echo_n "(cached) " >&6 else cat > conftest.$ac_ext <<_ACEOF @@ -8129,8 +8013,8 @@ -macro_version='2.2.6b' -macro_revision='1.3017' +macro_version='2.4' +macro_revision='1.3293' @@ -8146,9 +8030,78 @@ ltmain="$ac_aux_dir/ltmain.sh" +# Backslashify metacharacters that are still active within +# double-quoted strings. +sed_quote_subst='s/\(["`$\\]\)/\\\1/g' + +# Same as above, but do not quote variable references. +double_quote_subst='s/\(["`\\]\)/\\\1/g' + +# Sed substitution to delay expansion of an escaped shell variable in a +# double_quote_subst'ed string. +delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' + +# Sed substitution to delay expansion of an escaped single quote. +delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' + +# Sed substitution to avoid accidental globbing in evaled expressions +no_glob_subst='s/\*/\\\*/g' + +ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' +ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO +ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5 +$as_echo_n "checking how to print strings... " >&6; } +# Test print first, because it will be a builtin if present. +if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ + test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then + ECHO='print -r --' +elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then + ECHO='printf %s\n' +else + # Use this function as a fallback that always works. + func_fallback_echo () + { + eval 'cat <<_LTECHO_EOF +$1 +_LTECHO_EOF' + } + ECHO='func_fallback_echo' +fi + +# func_echo_all arg... +# Invoke $ECHO with all args, space-separated. +func_echo_all () +{ + $ECHO "" +} + +case "$ECHO" in + printf*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: printf" >&5 +$as_echo "printf" >&6; } ;; + print*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: print -r" >&5 +$as_echo "print -r" >&6; } ;; + *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: cat" >&5 +$as_echo "cat" >&6; } ;; +esac + + + + + + + + + + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5 $as_echo_n "checking for a sed that does not truncate output... " >&6; } -if test "${ac_cv_path_SED+set}" = set; then : +if ${ac_cv_path_SED+:} false; then : $as_echo_n "(cached) " >&6 else ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ @@ -8203,7 +8156,7 @@ done IFS=$as_save_IFS if test -z "$ac_cv_path_SED"; then - as_fn_error "no acceptable sed could be found in \$PATH" "$LINENO" 5 + as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5 fi else ac_cv_path_SED=$SED @@ -8230,7 +8183,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5 $as_echo_n "checking for fgrep... " >&6; } -if test "${ac_cv_path_FGREP+set}" = set; then : +if ${ac_cv_path_FGREP+:} false; then : $as_echo_n "(cached) " >&6 else if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1 @@ -8282,7 +8235,7 @@ done IFS=$as_save_IFS if test -z "$ac_cv_path_FGREP"; then - as_fn_error "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_FGREP=$FGREP @@ -8361,7 +8314,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 $as_echo_n "checking for non-GNU ld... " >&6; } fi -if test "${lt_cv_path_LD+set}" = set; then : +if ${lt_cv_path_LD+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$LD"; then @@ -8398,10 +8351,10 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi -test -z "$LD" && as_fn_error "no acceptable ld found in \$PATH" "$LINENO" 5 +test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } -if test "${lt_cv_prog_gnu_ld+set}" = set; then : +if ${lt_cv_prog_gnu_ld+:} false; then : $as_echo_n "(cached) " >&6 else # I'd rather use --version here, but apparently some GNU lds only accept -v. @@ -8428,7 +8381,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5 $as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; } -if test "${lt_cv_path_NM+set}" = set; then : +if ${lt_cv_path_NM+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$NM"; then @@ -8481,14 +8434,17 @@ NM="$lt_cv_path_NM" else # Didn't find any BSD compatible name lister, look for dumpbin. - if test -n "$ac_tool_prefix"; then - for ac_prog in "dumpbin -symbols" "link -dump -symbols" + if test -n "$DUMPBIN"; then : + # Let the user override the test. + else + if test -n "$ac_tool_prefix"; then + for ac_prog in dumpbin "link -dump" do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_DUMPBIN+set}" = set; then : +if ${ac_cv_prog_DUMPBIN+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$DUMPBIN"; then @@ -8526,13 +8482,13 @@ fi if test -z "$DUMPBIN"; then ac_ct_DUMPBIN=$DUMPBIN - for ac_prog in "dumpbin -symbols" "link -dump -symbols" + for ac_prog in dumpbin "link -dump" do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_DUMPBIN+set}" = set; then : +if ${ac_cv_prog_ac_ct_DUMPBIN+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_DUMPBIN"; then @@ -8581,6 +8537,15 @@ fi fi + case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in + *COFF*) + DUMPBIN="$DUMPBIN -symbols" + ;; + *) + DUMPBIN=: + ;; + esac + fi if test "$DUMPBIN" != ":"; then NM="$DUMPBIN" @@ -8595,18 +8560,18 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5 $as_echo_n "checking the name lister ($NM) interface... " >&6; } -if test "${lt_cv_nm_interface+set}" = set; then : +if ${lt_cv_nm_interface+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_nm_interface="BSD nm" echo "int some_variable = 0;" > conftest.$ac_ext - (eval echo "\"\$as_me:8603: $ac_compile\"" >&5) + (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&5) (eval "$ac_compile" 2>conftest.err) cat conftest.err >&5 - (eval echo "\"\$as_me:8606: $NM \\\"conftest.$ac_objext\\\"\"" >&5) + (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&5) (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) cat conftest.err >&5 - (eval echo "\"\$as_me:8609: output\"" >&5) + (eval echo "\"\$as_me:$LINENO: output\"" >&5) cat conftest.out >&5 if $GREP 'External.*some_variable' conftest.out > /dev/null; then lt_cv_nm_interface="MS dumpbin" @@ -8619,7 +8584,7 @@ # find the maximum length of command line arguments { $as_echo "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5 $as_echo_n "checking the maximum length of command line arguments... " >&6; } -if test "${lt_cv_sys_max_cmd_len+set}" = set; then : +if ${lt_cv_sys_max_cmd_len+:} false; then : $as_echo_n "(cached) " >&6 else i=0 @@ -8652,6 +8617,11 @@ lt_cv_sys_max_cmd_len=8192; ;; + mint*) + # On MiNT this can take a long time and run out of memory. + lt_cv_sys_max_cmd_len=8192; + ;; + amigaos*) # On AmigaOS with pdksh, this test takes hours, literally. # So we just punt and use a minimum line length of 8192. @@ -8716,8 +8686,8 @@ # If test is not a shell built-in, we'll probably end up computing a # maximum length that is only half of the actual maximum length, but # we can't tell. - while { test "X"`$SHELL $0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \ - = "XX$teststring$teststring"; } >/dev/null 2>&1 && + while { test "X"`func_fallback_echo "$teststring$teststring" 2>/dev/null` \ + = "X$teststring$teststring"; } >/dev/null 2>&1 && test $i != 17 # 1/2 MB should be enough do i=`expr $i + 1` @@ -8759,8 +8729,8 @@ # Try some XSI features xsi_shell=no ( _lt_dummy="a/b/c" - test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \ - = c,a/b,, \ + test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \ + = c,a/b,b/c, \ && eval 'test $(( 1 + 1 )) -eq 2 \ && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ && xsi_shell=yes @@ -8809,9 +8779,83 @@ +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5 +$as_echo_n "checking how to convert $build file names to $host format... " >&6; } +if ${lt_cv_to_host_file_cmd+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $host in + *-*-mingw* ) + case $build in + *-*-mingw* ) # actually msys + lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 + ;; + *-*-cygwin* ) + lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 + ;; + * ) # otherwise, assume *nix + lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 + ;; + esac + ;; + *-*-cygwin* ) + case $build in + *-*-mingw* ) # actually msys + lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin + ;; + *-*-cygwin* ) + lt_cv_to_host_file_cmd=func_convert_file_noop + ;; + * ) # otherwise, assume *nix + lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin + ;; + esac + ;; + * ) # unhandled hosts (and "normal" native builds) + lt_cv_to_host_file_cmd=func_convert_file_noop + ;; +esac + +fi + +to_host_file_cmd=$lt_cv_to_host_file_cmd +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5 +$as_echo "$lt_cv_to_host_file_cmd" >&6; } + + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5 +$as_echo_n "checking how to convert $build file names to toolchain format... " >&6; } +if ${lt_cv_to_tool_file_cmd+:} false; then : + $as_echo_n "(cached) " >&6 +else + #assume ordinary cross tools, or native build. +lt_cv_to_tool_file_cmd=func_convert_file_noop +case $host in + *-*-mingw* ) + case $build in + *-*-mingw* ) # actually msys + lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 + ;; + esac + ;; +esac + +fi + +to_tool_file_cmd=$lt_cv_to_tool_file_cmd +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5 +$as_echo "$lt_cv_to_tool_file_cmd" >&6; } + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5 $as_echo_n "checking for $LD option to reload object files... " >&6; } -if test "${lt_cv_ld_reload_flag+set}" = set; then : +if ${lt_cv_ld_reload_flag+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_ld_reload_flag='-r' @@ -8825,6 +8869,11 @@ esac reload_cmds='$LD$reload_flag -o $output$reload_objs' case $host_os in + cygwin* | mingw* | pw32* | cegcc*) + if test "$GCC" != yes; then + reload_cmds=false + fi + ;; darwin*) if test "$GCC" = yes; then reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' @@ -8847,7 +8896,7 @@ set dummy ${ac_tool_prefix}objdump; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_OBJDUMP+set}" = set; then : +if ${ac_cv_prog_OBJDUMP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$OBJDUMP"; then @@ -8887,7 +8936,7 @@ set dummy objdump; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_OBJDUMP+set}" = set; then : +if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OBJDUMP"; then @@ -8946,7 +8995,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5 $as_echo_n "checking how to recognize dependent libraries... " >&6; } -if test "${lt_cv_deplibs_check_method+set}" = set; then : +if ${lt_cv_deplibs_check_method+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_file_magic_cmd='$MAGIC_CMD' @@ -8988,16 +9037,18 @@ # Base MSYS/MinGW do not provide the 'file' command needed by # func_win32_libid shell function, so use a weaker test based on 'objdump', # unless we find 'file', for example because we are cross-compiling. - if ( file / ) >/dev/null 2>&1; then + # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin. + if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' else - lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' + # Keep this pattern in sync with the one in func_win32_libid. + lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' lt_cv_file_magic_cmd='$OBJDUMP -f' fi ;; -cegcc) +cegcc*) # use the weaker test based on 'objdump'. See mingw*. lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' lt_cv_file_magic_cmd='$OBJDUMP -f' @@ -9027,6 +9078,10 @@ lt_cv_deplibs_check_method=pass_all ;; +haiku*) + lt_cv_deplibs_check_method=pass_all + ;; + hpux10.20* | hpux11*) lt_cv_file_magic_cmd=/usr/bin/file case $host_cpu in @@ -9035,11 +9090,11 @@ lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so ;; hppa*64*) - lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]' + lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]' lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl ;; *) - lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library' + lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9]\.[0-9]) shared library' lt_cv_file_magic_test_file=/usr/lib/libc.sl ;; esac @@ -9061,7 +9116,7 @@ ;; # This must be Linux ELF. -linux* | k*bsd*-gnu) +linux* | k*bsd*-gnu | kopensolaris*-gnu) lt_cv_deplibs_check_method=pass_all ;; @@ -9142,6 +9197,21 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5 $as_echo "$lt_cv_deplibs_check_method" >&6; } + +file_magic_glob= +want_nocaseglob=no +if test "$build" = "$host"; then + case $host_os in + mingw* | pw32*) + if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then + want_nocaseglob=yes + else + file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[\1]\/[\1]\/g;/g"` + fi + ;; + esac +fi + file_magic_cmd=$lt_cv_file_magic_cmd deplibs_check_method=$lt_cv_deplibs_check_method test -z "$deplibs_check_method" && deplibs_check_method=unknown @@ -9157,16 +9227,26 @@ + + + + + + + + + + if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. -set dummy ${ac_tool_prefix}ar; ac_word=$2 + # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. +set dummy ${ac_tool_prefix}dlltool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_AR+set}" = set; then : +if ${ac_cv_prog_DLLTOOL+:} false; then : $as_echo_n "(cached) " >&6 else - if test -n "$AR"; then - ac_cv_prog_AR="$AR" # Let the user override the test. + if test -n "$DLLTOOL"; then + ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH @@ -9175,7 +9255,7 @@ test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_AR="${ac_tool_prefix}ar" + ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi @@ -9185,10 +9265,10 @@ fi fi -AR=$ac_cv_prog_AR -if test -n "$AR"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 -$as_echo "$AR" >&6; } +DLLTOOL=$ac_cv_prog_DLLTOOL +if test -n "$DLLTOOL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 +$as_echo "$DLLTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } @@ -9196,17 +9276,17 @@ fi -if test -z "$ac_cv_prog_AR"; then - ac_ct_AR=$AR - # Extract the first word of "ar", so it can be a program name with args. -set dummy ar; ac_word=$2 +if test -z "$ac_cv_prog_DLLTOOL"; then + ac_ct_DLLTOOL=$DLLTOOL + # Extract the first word of "dlltool", so it can be a program name with args. +set dummy dlltool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_AR+set}" = set; then : +if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then : $as_echo_n "(cached) " >&6 else - if test -n "$ac_ct_AR"; then - ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. + if test -n "$ac_ct_DLLTOOL"; then + ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH @@ -9215,7 +9295,7 @@ test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_AR="ar" + ac_cv_prog_ac_ct_DLLTOOL="dlltool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi @@ -9225,17 +9305,17 @@ fi fi -ac_ct_AR=$ac_cv_prog_ac_ct_AR -if test -n "$ac_ct_AR"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 -$as_echo "$ac_ct_AR" >&6; } +ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL +if test -n "$ac_ct_DLLTOOL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 +$as_echo "$ac_ct_DLLTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi - if test "x$ac_ct_AR" = x; then - AR="false" + if test "x$ac_ct_DLLTOOL" = x; then + DLLTOOL="false" else case $cross_compiling:$ac_tool_warned in yes:) @@ -9243,14 +9323,16 @@ $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac - AR=$ac_ct_AR + DLLTOOL=$ac_ct_DLLTOOL fi else - AR="$ac_cv_prog_AR" + DLLTOOL="$ac_cv_prog_DLLTOOL" fi -test -z "$AR" && AR=ar -test -z "$AR_FLAGS" && AR_FLAGS=cru +test -z "$DLLTOOL" && DLLTOOL=dlltool + + + @@ -9258,20 +9340,56 @@ +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5 +$as_echo_n "checking how to associate runtime and link libraries... " >&6; } +if ${lt_cv_sharedlib_from_linklib_cmd+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_sharedlib_from_linklib_cmd='unknown' + +case $host_os in +cygwin* | mingw* | pw32* | cegcc*) + # two different shell functions defined in ltmain.sh + # decide which to use based on capabilities of $DLLTOOL + case `$DLLTOOL --help 2>&1` in + *--identify-strict*) + lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib + ;; + *) + lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback + ;; + esac + ;; +*) + # fallback: assume linklib IS sharedlib + lt_cv_sharedlib_from_linklib_cmd="$ECHO" + ;; +esac + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5 +$as_echo "$lt_cv_sharedlib_from_linklib_cmd" >&6; } +sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd +test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO + + + if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. -set dummy ${ac_tool_prefix}strip; ac_word=$2 + for ac_prog in ar + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_STRIP+set}" = set; then : +if ${ac_cv_prog_AR+:} false; then : $as_echo_n "(cached) " >&6 else - if test -n "$STRIP"; then - ac_cv_prog_STRIP="$STRIP" # Let the user override the test. + if test -n "$AR"; then + ac_cv_prog_AR="$AR" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH @@ -9280,7 +9398,7 @@ test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_STRIP="${ac_tool_prefix}strip" + ac_cv_prog_AR="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi @@ -9290,29 +9408,198 @@ fi fi -STRIP=$ac_cv_prog_STRIP -if test -n "$STRIP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 -$as_echo "$STRIP" >&6; } +AR=$ac_cv_prog_AR +if test -n "$AR"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 +$as_echo "$AR" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi + test -n "$AR" && break + done fi -if test -z "$ac_cv_prog_STRIP"; then - ac_ct_STRIP=$STRIP - # Extract the first word of "strip", so it can be a program name with args. -set dummy strip; ac_word=$2 +if test -z "$AR"; then + ac_ct_AR=$AR + for ac_prog in ar +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then : +if ${ac_cv_prog_ac_ct_AR+:} false; then : $as_echo_n "(cached) " >&6 else - if test -n "$ac_ct_STRIP"; then - ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. -else + if test -n "$ac_ct_AR"; then + ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_AR="$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_AR=$ac_cv_prog_ac_ct_AR +if test -n "$ac_ct_AR"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 +$as_echo "$ac_ct_AR" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$ac_ct_AR" && break +done + + if test "x$ac_ct_AR" = x; then + AR="false" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + AR=$ac_ct_AR + fi +fi + +: ${AR=ar} +: ${AR_FLAGS=cru} + + + + + + + + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5 +$as_echo_n "checking for archiver @FILE support... " >&6; } +if ${lt_cv_ar_at_file+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_ar_at_file=no + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + echo conftest.$ac_objext > conftest.lst + lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5' + { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 + (eval $lt_ar_try) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + if test "$ac_status" -eq 0; then + # Ensure the archiver fails upon bogus file names. + rm -f conftest.$ac_objext libconftest.a + { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 + (eval $lt_ar_try) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + if test "$ac_status" -ne 0; then + lt_cv_ar_at_file=@ + fi + fi + rm -f conftest.* libconftest.a + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5 +$as_echo "$lt_cv_ar_at_file" >&6; } + +if test "x$lt_cv_ar_at_file" = xno; then + archiver_list_spec= +else + archiver_list_spec=$lt_cv_ar_at_file +fi + + + + + + + +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. +set dummy ${ac_tool_prefix}strip; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_STRIP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$STRIP"; then + ac_cv_prog_STRIP="$STRIP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_STRIP="${ac_tool_prefix}strip" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +STRIP=$ac_cv_prog_STRIP +if test -n "$STRIP"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 +$as_echo "$STRIP" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_STRIP"; then + ac_ct_STRIP=$STRIP + # Extract the first word of "strip", so it can be a program name with args. +set dummy strip; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_STRIP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_STRIP"; then + ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. +else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do @@ -9366,7 +9653,7 @@ set dummy ${ac_tool_prefix}ranlib; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_RANLIB+set}" = set; then : +if ${ac_cv_prog_RANLIB+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$RANLIB"; then @@ -9406,7 +9693,7 @@ set dummy ranlib; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then : +if ${ac_cv_prog_ac_ct_RANLIB+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_RANLIB"; then @@ -9477,6 +9764,18 @@ old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" fi +case $host_os in + darwin*) + lock_old_archive_extraction=yes ;; + *) + lock_old_archive_extraction=no ;; +esac + + + + + + @@ -9523,7 +9822,7 @@ # Check for command to grab the raw symbol name followed by C symbol from nm. { $as_echo "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5 $as_echo_n "checking command to parse $NM output from $compiler object... " >&6; } -if test "${lt_cv_sys_global_symbol_pipe+set}" = set; then : +if ${lt_cv_sys_global_symbol_pipe+:} false; then : $as_echo_n "(cached) " >&6 else @@ -9584,8 +9883,8 @@ lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" # Transform an extracted symbol line into symbol name and symbol address -lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'" -lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"lib\2\", (void *) \&\2},/p'" +lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'" +lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"lib\2\", (void *) \&\2},/p'" # Handle CRLF in mingw tool chain opt_cr= @@ -9621,6 +9920,7 @@ else lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" fi + lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" # Check to see that the pipe works correctly. pipe_works=no @@ -9646,8 +9946,8 @@ test $ac_status = 0; }; then # Now try to grab the symbols. nlist=conftest.nm - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist\""; } >&5 - (eval $NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) 2>&5 + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist\""; } >&5 + (eval $NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s "$nlist"; then @@ -9662,6 +9962,18 @@ if $GREP ' nm_test_var$' "$nlist" >/dev/null; then if $GREP ' nm_test_func$' "$nlist" >/dev/null; then cat <<_LT_EOF > conftest.$ac_ext +/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ +#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) +/* DATA imports from DLLs on WIN32 con't be const, because runtime + relocations are performed -- see ld's documentation on pseudo-relocs. */ +# define LT_DLSYM_CONST +#elif defined(__osf__) +/* This system does not cope well with relocations in const data. */ +# define LT_DLSYM_CONST +#else +# define LT_DLSYM_CONST const +#endif + #ifdef __cplusplus extern "C" { #endif @@ -9673,7 +9985,7 @@ cat <<_LT_EOF >> conftest.$ac_ext /* The mapping between symbol names and symbols. */ -const struct { +LT_DLSYM_CONST struct { const char *name; void *address; } @@ -9699,8 +10011,8 @@ _LT_EOF # Now try linking the two files. mv conftest.$ac_objext conftstm.$ac_objext - lt_save_LIBS="$LIBS" - lt_save_CFLAGS="$CFLAGS" + lt_globsym_save_LIBS=$LIBS + lt_globsym_save_CFLAGS=$CFLAGS LIBS="conftstm.$ac_objext" CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 @@ -9710,8 +10022,8 @@ test $ac_status = 0; } && test -s conftest${ac_exeext}; then pipe_works=yes fi - LIBS="$lt_save_LIBS" - CFLAGS="$lt_save_CFLAGS" + LIBS=$lt_globsym_save_LIBS + CFLAGS=$lt_globsym_save_CFLAGS else echo "cannot find nm_test_func in $nlist" >&5 fi @@ -9748,6 +10060,17 @@ $as_echo "ok" >&6; } fi +# Response file support. +if test "$lt_cv_nm_interface" = "MS dumpbin"; then + nm_file_list_spec='@' +elif $NM --help 2>/dev/null | grep '[@]FILE' >/dev/null; then + nm_file_list_spec='@' +fi + + + + + @@ -9769,6 +10092,44 @@ + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5 +$as_echo_n "checking for sysroot... " >&6; } + +# Check whether --with-sysroot was given. +if test "${with_sysroot+set}" = set; then : + withval=$with_sysroot; +else + with_sysroot=no +fi + + +lt_sysroot= +case ${with_sysroot} in #( + yes) + if test "$GCC" = yes; then + lt_sysroot=`$CC --print-sysroot 2>/dev/null` + fi + ;; #( + /*) + lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` + ;; #( + no|'') + ;; #( + *) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_sysroot}" >&5 +$as_echo "${with_sysroot}" >&6; } + as_fn_error $? "The sysroot must be an absolute path." "$LINENO" 5 + ;; +esac + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5 +$as_echo "${lt_sysroot:-no}" >&6; } + + + + + # Check whether --enable-libtool-lock was given. if test "${enable_libtool_lock+set}" = set; then : enableval=$enable_libtool_lock; @@ -9800,7 +10161,7 @@ ;; *-*-irix6*) # Find out which ABI we are using. - echo '#line 9803 "configure"' > conftest.$ac_ext + echo '#line '$LINENO' "configure"' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -9894,7 +10255,7 @@ CFLAGS="$CFLAGS -belf" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5 $as_echo_n "checking whether the C compiler needs -belf... " >&6; } -if test "${lt_cv_cc_needs_belf+set}" = set; then : +if ${lt_cv_cc_needs_belf+:} false; then : $as_echo_n "(cached) " >&6 else ac_ext=c @@ -9962,6 +10323,123 @@ need_locks="$enable_libtool_lock" +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args. +set dummy ${ac_tool_prefix}mt; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_MANIFEST_TOOL+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$MANIFEST_TOOL"; then + ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL +if test -n "$MANIFEST_TOOL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5 +$as_echo "$MANIFEST_TOOL" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_MANIFEST_TOOL"; then + ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL + # Extract the first word of "mt", so it can be a program name with args. +set dummy mt; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_MANIFEST_TOOL+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_MANIFEST_TOOL"; then + ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_MANIFEST_TOOL="mt" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL +if test -n "$ac_ct_MANIFEST_TOOL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5 +$as_echo "$ac_ct_MANIFEST_TOOL" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_MANIFEST_TOOL" = x; then + MANIFEST_TOOL=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL + fi +else + MANIFEST_TOOL="$ac_cv_prog_MANIFEST_TOOL" +fi + +test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5 +$as_echo_n "checking if $MANIFEST_TOOL is a manifest tool... " >&6; } +if ${lt_cv_path_mainfest_tool+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_path_mainfest_tool=no + echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5 + $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out + cat conftest.err >&5 + if $GREP 'Manifest Tool' conftest.out > /dev/null; then + lt_cv_path_mainfest_tool=yes + fi + rm -f conftest* +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5 +$as_echo "$lt_cv_path_mainfest_tool" >&6; } +if test "x$lt_cv_path_mainfest_tool" != xyes; then + MANIFEST_TOOL=: +fi + + + + + case $host_os in rhapsody* | darwin*) @@ -9970,7 +10448,7 @@ set dummy ${ac_tool_prefix}dsymutil; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_DSYMUTIL+set}" = set; then : +if ${ac_cv_prog_DSYMUTIL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$DSYMUTIL"; then @@ -10010,7 +10488,7 @@ set dummy dsymutil; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_DSYMUTIL+set}" = set; then : +if ${ac_cv_prog_ac_ct_DSYMUTIL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_DSYMUTIL"; then @@ -10062,7 +10540,7 @@ set dummy ${ac_tool_prefix}nmedit; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_NMEDIT+set}" = set; then : +if ${ac_cv_prog_NMEDIT+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$NMEDIT"; then @@ -10102,7 +10580,7 @@ set dummy nmedit; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_NMEDIT+set}" = set; then : +if ${ac_cv_prog_ac_ct_NMEDIT+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_NMEDIT"; then @@ -10154,7 +10632,7 @@ set dummy ${ac_tool_prefix}lipo; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_LIPO+set}" = set; then : +if ${ac_cv_prog_LIPO+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$LIPO"; then @@ -10194,7 +10672,7 @@ set dummy lipo; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_LIPO+set}" = set; then : +if ${ac_cv_prog_ac_ct_LIPO+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_LIPO"; then @@ -10246,7 +10724,7 @@ set dummy ${ac_tool_prefix}otool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_OTOOL+set}" = set; then : +if ${ac_cv_prog_OTOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$OTOOL"; then @@ -10286,7 +10764,7 @@ set dummy otool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_OTOOL+set}" = set; then : +if ${ac_cv_prog_ac_ct_OTOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OTOOL"; then @@ -10338,7 +10816,7 @@ set dummy ${ac_tool_prefix}otool64; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_OTOOL64+set}" = set; then : +if ${ac_cv_prog_OTOOL64+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$OTOOL64"; then @@ -10378,7 +10856,7 @@ set dummy otool64; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_OTOOL64+set}" = set; then : +if ${ac_cv_prog_ac_ct_OTOOL64+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OTOOL64"; then @@ -10453,7 +10931,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5 $as_echo_n "checking for -single_module linker flag... " >&6; } -if test "${lt_cv_apple_cc_single_mod+set}" = set; then : +if ${lt_cv_apple_cc_single_mod+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_apple_cc_single_mod=no @@ -10482,7 +10960,7 @@ $as_echo "$lt_cv_apple_cc_single_mod" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5 $as_echo_n "checking for -exported_symbols_list linker flag... " >&6; } -if test "${lt_cv_ld_exported_symbols_list+set}" = set; then : +if ${lt_cv_ld_exported_symbols_list+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_ld_exported_symbols_list=no @@ -10512,1029 +10990,115 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5 $as_echo "$lt_cv_ld_exported_symbols_list" >&6; } - case $host_os in - rhapsody* | darwin1.[012]) - _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; - darwin1.*) - _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; - darwin*) # darwin 5.x on - # if running on 10.5 or later, the deployment target defaults - # to the OS version, if on x86, and 10.4, the deployment - # target defaults to 10.4. Don't you love it? - case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in - 10.0,*86*-darwin8*|10.0,*-darwin[91]*) - _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; - 10.[012]*) - _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; - 10.*) - _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; - esac - ;; - esac - if test "$lt_cv_apple_cc_single_mod" = "yes"; then - _lt_dar_single_mod='$single_module' - fi - if test "$lt_cv_ld_exported_symbols_list" = "yes"; then - _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' - else - _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' - fi - if test "$DSYMUTIL" != ":"; then - _lt_dsymutil='~$DSYMUTIL $lib || :' - else - _lt_dsymutil= - fi - ;; - esac - -# On IRIX 5.3, sys/types and inttypes.h are conflicting. -for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ - inttypes.h stdint.h unistd.h -do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default -" -eval as_val=\$$as_ac_Header - if test "x$as_val" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - -fi - -done - - -for ac_header in dlfcn.h -do : - ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default -" -if test "x$ac_cv_header_dlfcn_h" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_DLFCN_H 1 -_ACEOF - -fi - -done - - - -ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu -if test -z "$CXX"; then - if test -n "$CCC"; then - CXX=$CCC - else - if test -n "$ac_tool_prefix"; then - for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC - do - # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. -set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CXX+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$CXX"; then - ac_cv_prog_CXX="$CXX" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -CXX=$ac_cv_prog_CXX -if test -n "$CXX"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5 -$as_echo "$CXX" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$CXX" && break - done -fi -if test -z "$CXX"; then - ac_ct_CXX=$CXX - for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_CXX"; then - ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_CXX="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_CXX=$ac_cv_prog_ac_ct_CXX -if test -n "$ac_ct_CXX"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5 -$as_echo "$ac_ct_CXX" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$ac_ct_CXX" && break -done - - if test "x$ac_ct_CXX" = x; then - CXX="g++" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - CXX=$ac_ct_CXX - fi -fi - - fi -fi -# Provide some information about the compiler. -$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5 -set X $ac_compile -ac_compiler=$2 -for ac_option in --version -v -V -qversion; do - { { ac_try="$ac_compiler $ac_option >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_compiler $ac_option >&5") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - sed '10a\ -... rest of stderr output deleted ... - 10q' conftest.err >conftest.er1 - cat conftest.er1 >&5 - fi - rm -f conftest.er1 conftest.err - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } -done - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5 -$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; } -if test "${ac_cv_cxx_compiler_gnu+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ -#ifndef __GNUC__ - choke me -#endif - - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : - ac_compiler_gnu=yes -else - ac_compiler_gnu=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -ac_cv_cxx_compiler_gnu=$ac_compiler_gnu - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5 -$as_echo "$ac_cv_cxx_compiler_gnu" >&6; } -if test $ac_compiler_gnu = yes; then - GXX=yes -else - GXX= -fi -ac_test_CXXFLAGS=${CXXFLAGS+set} -ac_save_CXXFLAGS=$CXXFLAGS -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5 -$as_echo_n "checking whether $CXX accepts -g... " >&6; } -if test "${ac_cv_prog_cxx_g+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_save_cxx_werror_flag=$ac_cxx_werror_flag - ac_cxx_werror_flag=yes - ac_cv_prog_cxx_g=no - CXXFLAGS="-g" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : - ac_cv_prog_cxx_g=yes -else - CXXFLAGS="" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : - -else - ac_cxx_werror_flag=$ac_save_cxx_werror_flag - CXXFLAGS="-g" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : - ac_cv_prog_cxx_g=yes -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - ac_cxx_werror_flag=$ac_save_cxx_werror_flag -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5 -$as_echo "$ac_cv_prog_cxx_g" >&6; } -if test "$ac_test_CXXFLAGS" = set; then - CXXFLAGS=$ac_save_CXXFLAGS -elif test $ac_cv_prog_cxx_g = yes; then - if test "$GXX" = yes; then - CXXFLAGS="-g -O2" - else - CXXFLAGS="-g" - fi -else - if test "$GXX" = yes; then - CXXFLAGS="-O2" - else - CXXFLAGS= - fi -fi -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -depcc="$CXX" am_compiler_list= - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 -$as_echo_n "checking dependency style of $depcc... " >&6; } -if test "${am_cv_CXX_dependencies_compiler_type+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then - # We make a subdir and do the tests there. Otherwise we can end up - # making bogus files that we don't know about and never remove. For - # instance it was reported that on HP-UX the gcc test will end up - # making a dummy file named `D' -- because `-MD' means `put the output - # in D'. - mkdir conftest.dir - # Copy depcomp to subdir because otherwise we won't find it if we're - # using a relative directory. - cp "$am_depcomp" conftest.dir - cd conftest.dir - # We will build objects and dependencies in a subdirectory because - # it helps to detect inapplicable dependency modes. For instance - # both Tru64's cc and ICC support -MD to output dependencies as a - # side effect of compilation, but ICC will put the dependencies in - # the current directory while Tru64 will put them in the object - # directory. - mkdir sub - - am_cv_CXX_dependencies_compiler_type=none - if test "$am_compiler_list" = ""; then - am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` - fi - am__universal=false - case " $depcc " in #( - *\ -arch\ *\ -arch\ *) am__universal=true ;; - esac - - for depmode in $am_compiler_list; do - # Setup a source with many dependencies, because some compilers - # like to wrap large dependency lists on column 80 (with \), and - # we should not choose a depcomp mode which is confused by this. - # - # We need to recreate these files for each test, as the compiler may - # overwrite some of them when testing with obscure command lines. - # This happens at least with the AIX C compiler. - : > sub/conftest.c - for i in 1 2 3 4 5 6; do - echo '#include "conftst'$i'.h"' >> sub/conftest.c - # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with - # Solaris 8's {/usr,}/bin/sh. - touch sub/conftst$i.h - done - echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf - - # We check with `-c' and `-o' for the sake of the "dashmstdout" - # mode. It turns out that the SunPro C++ compiler does not properly - # handle `-M -o', and we need to detect this. Also, some Intel - # versions had trouble with output in subdirs - am__obj=sub/conftest.${OBJEXT-o} - am__minus_obj="-o $am__obj" - case $depmode in - gcc) - # This depmode causes a compiler race in universal mode. - test "$am__universal" = false || continue - ;; - nosideeffect) - # after this tag, mechanisms are not by side-effect, so they'll - # only be used when explicitly requested - if test "x$enable_dependency_tracking" = xyes; then - continue - else - break - fi - ;; - msvisualcpp | msvcmsys) - # This compiler won't grok `-c -o', but also, the minuso test has - # not run yet. These depmodes are late enough in the game, and - # so weak that their functioning should not be impacted. - am__obj=conftest.${OBJEXT-o} - am__minus_obj= - ;; - none) break ;; - esac - if depmode=$depmode \ - source=sub/conftest.c object=$am__obj \ - depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ - $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ - >/dev/null 2>conftest.err && - grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && - grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && - grep $am__obj sub/conftest.Po > /dev/null 2>&1 && - ${MAKE-make} -s -f confmf > /dev/null 2>&1; then - # icc doesn't choke on unknown options, it will just issue warnings - # or remarks (even with -Werror). So we grep stderr for any message - # that says an option was ignored or not supported. - # When given -MP, icc 7.0 and 7.1 complain thusly: - # icc: Command line warning: ignoring option '-M'; no argument required - # The diagnosis changed in icc 8.0: - # icc: Command line remark: option '-MP' not supported - if (grep 'ignoring option' conftest.err || - grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else - am_cv_CXX_dependencies_compiler_type=$depmode - break - fi - fi - done - - cd .. - rm -rf conftest.dir -else - am_cv_CXX_dependencies_compiler_type=none -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CXX_dependencies_compiler_type" >&5 -$as_echo "$am_cv_CXX_dependencies_compiler_type" >&6; } -CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type - - if - test "x$enable_dependency_tracking" != xno \ - && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then - am__fastdepCXX_TRUE= - am__fastdepCXX_FALSE='#' -else - am__fastdepCXX_TRUE='#' - am__fastdepCXX_FALSE= -fi - - -if test -n "$CXX" && ( test "X$CXX" != "Xno" && - ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || - (test "X$CXX" != "Xg++"))) ; then - ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5 -$as_echo_n "checking how to run the C++ preprocessor... " >&6; } -if test -z "$CXXCPP"; then - if test "${ac_cv_prog_CXXCPP+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - # Double quotes because CXXCPP needs to be expanded - for CXXCPP in "$CXX -E" "/lib/cpp" - do - ac_preproc_ok=false -for ac_cxx_preproc_warn_flag in '' yes -do - # Use a header file that comes with gcc, so configuring glibc - # with a fresh cross-compiler works. - # Prefer to if __STDC__ is defined, since - # exists even on freestanding compilers. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#ifdef __STDC__ -# include -#else -# include -#endif - Syntax error -_ACEOF -if ac_fn_cxx_try_cpp "$LINENO"; then : - -else - # Broken: fails on valid input. -continue -fi -rm -f conftest.err conftest.$ac_ext - - # OK, works on sane cases. Now check whether nonexistent headers - # can be detected and how. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -_ACEOF -if ac_fn_cxx_try_cpp "$LINENO"; then : - # Broken: success on invalid input. -continue -else - # Passes both tests. -ac_preproc_ok=: -break -fi -rm -f conftest.err conftest.$ac_ext - -done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.err conftest.$ac_ext -if $ac_preproc_ok; then : - break -fi - - done - ac_cv_prog_CXXCPP=$CXXCPP - -fi - CXXCPP=$ac_cv_prog_CXXCPP -else - ac_cv_prog_CXXCPP=$CXXCPP -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5 -$as_echo "$CXXCPP" >&6; } -ac_preproc_ok=false -for ac_cxx_preproc_warn_flag in '' yes -do - # Use a header file that comes with gcc, so configuring glibc - # with a fresh cross-compiler works. - # Prefer to if __STDC__ is defined, since - # exists even on freestanding compilers. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#ifdef __STDC__ -# include -#else -# include -#endif - Syntax error -_ACEOF -if ac_fn_cxx_try_cpp "$LINENO"; then : - -else - # Broken: fails on valid input. -continue -fi -rm -f conftest.err conftest.$ac_ext - - # OK, works on sane cases. Now check whether nonexistent headers - # can be detected and how. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -_ACEOF -if ac_fn_cxx_try_cpp "$LINENO"; then : - # Broken: success on invalid input. -continue -else - # Passes both tests. -ac_preproc_ok=: -break -fi -rm -f conftest.err conftest.$ac_ext - -done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.err conftest.$ac_ext -if $ac_preproc_ok; then : - -else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -_lt_caught_CXX_error=yes; } -fi - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -else - _lt_caught_CXX_error=yes -fi - - - - - -ac_ext=f -ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' -ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_f77_compiler_gnu -if test -n "$ac_tool_prefix"; then - for ac_prog in g77 xlf f77 frt pgf77 cf77 fort77 fl32 af77 xlf90 f90 pgf90 pghpf epcf90 gfortran g95 xlf95 f95 fort ifort ifc efc pgf95 lf95 ftn - do - # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. -set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_F77+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$F77"; then - ac_cv_prog_F77="$F77" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_F77="$ac_tool_prefix$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -F77=$ac_cv_prog_F77 -if test -n "$F77"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $F77" >&5 -$as_echo "$F77" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$F77" && break - done -fi -if test -z "$F77"; then - ac_ct_F77=$F77 - for ac_prog in g77 xlf f77 frt pgf77 cf77 fort77 fl32 af77 xlf90 f90 pgf90 pghpf epcf90 gfortran g95 xlf95 f95 fort ifort ifc efc pgf95 lf95 ftn -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_F77+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_F77"; then - ac_cv_prog_ac_ct_F77="$ac_ct_F77" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_F77="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_F77=$ac_cv_prog_ac_ct_F77 -if test -n "$ac_ct_F77"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_F77" >&5 -$as_echo "$ac_ct_F77" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$ac_ct_F77" && break -done - - if test "x$ac_ct_F77" = x; then - F77="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - F77=$ac_ct_F77 - fi -fi - - -# Provide some information about the compiler. -$as_echo "$as_me:${as_lineno-$LINENO}: checking for Fortran 77 compiler version" >&5 -set X $ac_compile -ac_compiler=$2 -for ac_option in --version -v -V -qversion; do - { { ac_try="$ac_compiler $ac_option >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_compiler $ac_option >&5") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - sed '10a\ -... rest of stderr output deleted ... - 10q' conftest.err >conftest.er1 - cat conftest.er1 >&5 - fi - rm -f conftest.er1 conftest.err - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } -done -rm -f a.out - -# If we don't use `.F' as extension, the preprocessor is not run on the -# input file. (Note that this only needs to work for GNU compilers.) -ac_save_ext=$ac_ext -ac_ext=F -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU Fortran 77 compiler" >&5 -$as_echo_n "checking whether we are using the GNU Fortran 77 compiler... " >&6; } -if test "${ac_cv_f77_compiler_gnu+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - cat > conftest.$ac_ext <<_ACEOF - program main -#ifndef __GNUC__ - choke me -#endif - - end -_ACEOF -if ac_fn_f77_try_compile "$LINENO"; then : - ac_compiler_gnu=yes -else - ac_compiler_gnu=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -ac_cv_f77_compiler_gnu=$ac_compiler_gnu - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_f77_compiler_gnu" >&5 -$as_echo "$ac_cv_f77_compiler_gnu" >&6; } -ac_ext=$ac_save_ext -ac_test_FFLAGS=${FFLAGS+set} -ac_save_FFLAGS=$FFLAGS -FFLAGS= -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $F77 accepts -g" >&5 -$as_echo_n "checking whether $F77 accepts -g... " >&6; } -if test "${ac_cv_prog_f77_g+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - FFLAGS=-g -cat > conftest.$ac_ext <<_ACEOF - program main - - end -_ACEOF -if ac_fn_f77_try_compile "$LINENO"; then : - ac_cv_prog_f77_g=yes -else - ac_cv_prog_f77_g=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_f77_g" >&5 -$as_echo "$ac_cv_prog_f77_g" >&6; } -if test "$ac_test_FFLAGS" = set; then - FFLAGS=$ac_save_FFLAGS -elif test $ac_cv_prog_f77_g = yes; then - if test "x$ac_cv_f77_compiler_gnu" = xyes; then - FFLAGS="-g -O2" - else - FFLAGS="-g" - fi -else - if test "x$ac_cv_f77_compiler_gnu" = xyes; then - FFLAGS="-O2" - else - FFLAGS= - fi -fi - -if test $ac_compiler_gnu = yes; then - G77=yes -else - G77= -fi -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -if test -z "$F77" || test "X$F77" = "Xno"; then - _lt_disable_F77=yes -fi - - - - - -ac_ext=${ac_fc_srcext-f} -ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' -ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_fc_compiler_gnu -if test -n "$ac_tool_prefix"; then - for ac_prog in gfortran g95 xlf95 f95 fort ifort ifc efc pgf95 lf95 ftn xlf90 f90 pgf90 pghpf epcf90 g77 xlf f77 frt pgf77 cf77 fort77 fl32 af77 - do - # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. -set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_FC+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$FC"; then - ac_cv_prog_FC="$FC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_FC="$ac_tool_prefix$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -FC=$ac_cv_prog_FC -if test -n "$FC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FC" >&5 -$as_echo "$FC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$FC" && break - done -fi -if test -z "$FC"; then - ac_ct_FC=$FC - for ac_prog in gfortran g95 xlf95 f95 fort ifort ifc efc pgf95 lf95 ftn xlf90 f90 pgf90 pghpf epcf90 g77 xlf f77 frt pgf77 cf77 fort77 fl32 af77 -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_FC+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_FC"; then - ac_cv_prog_ac_ct_FC="$ac_ct_FC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_FC="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_FC=$ac_cv_prog_ac_ct_FC -if test -n "$ac_ct_FC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_FC" >&5 -$as_echo "$ac_ct_FC" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5 +$as_echo_n "checking for -force_load linker flag... " >&6; } +if ${lt_cv_ld_force_load+:} false; then : + $as_echo_n "(cached) " >&6 else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi + lt_cv_ld_force_load=no + cat > conftest.c << _LT_EOF +int forced_loaded() { return 2;} +_LT_EOF + echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&5 + $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5 + echo "$AR cru libconftest.a conftest.o" >&5 + $AR cru libconftest.a conftest.o 2>&5 + echo "$RANLIB libconftest.a" >&5 + $RANLIB libconftest.a 2>&5 + cat > conftest.c << _LT_EOF +int main() { return 0;} +_LT_EOF + echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&5 + $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err + _lt_result=$? + if test -f conftest && test ! -s conftest.err && test $_lt_result = 0 && $GREP forced_load conftest 2>&1 >/dev/null; then + lt_cv_ld_force_load=yes + else + cat conftest.err >&5 + fi + rm -f conftest.err libconftest.a conftest conftest.c + rm -rf conftest.dSYM +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5 +$as_echo "$lt_cv_ld_force_load" >&6; } + case $host_os in + rhapsody* | darwin1.[012]) + _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; + darwin1.*) + _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; + darwin*) # darwin 5.x on + # if running on 10.5 or later, the deployment target defaults + # to the OS version, if on x86, and 10.4, the deployment + # target defaults to 10.4. Don't you love it? + case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in + 10.0,*86*-darwin8*|10.0,*-darwin[91]*) + _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; + 10.[012]*) + _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; + 10.*) + _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; + esac + ;; + esac + if test "$lt_cv_apple_cc_single_mod" = "yes"; then + _lt_dar_single_mod='$single_module' + fi + if test "$lt_cv_ld_exported_symbols_list" = "yes"; then + _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' + else + _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' + fi + if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then + _lt_dsymutil='~$DSYMUTIL $lib || :' + else + _lt_dsymutil= + fi + ;; + esac - test -n "$ac_ct_FC" && break -done +# On IRIX 5.3, sys/types and inttypes.h are conflicting. +for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ + inttypes.h stdint.h unistd.h +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default +" +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF - if test "x$ac_ct_FC" = x; then - FC="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - FC=$ac_ct_FC - fi fi - -# Provide some information about the compiler. -$as_echo "$as_me:${as_lineno-$LINENO}: checking for Fortran compiler version" >&5 -set X $ac_compile -ac_compiler=$2 -for ac_option in --version -v -V -qversion; do - { { ac_try="$ac_compiler $ac_option >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_compiler $ac_option >&5") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - sed '10a\ -... rest of stderr output deleted ... - 10q' conftest.err >conftest.er1 - cat conftest.er1 >&5 - fi - rm -f conftest.er1 conftest.err - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } done -rm -f a.out -# If we don't use `.F' as extension, the preprocessor is not run on the -# input file. (Note that this only needs to work for GNU compilers.) -ac_save_ext=$ac_ext -ac_ext=F -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU Fortran compiler" >&5 -$as_echo_n "checking whether we are using the GNU Fortran compiler... " >&6; } -if test "${ac_cv_fc_compiler_gnu+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - cat > conftest.$ac_ext <<_ACEOF - program main -#ifndef __GNUC__ - choke me -#endif - end +for ac_header in dlfcn.h +do : + ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default +" +if test "x$ac_cv_header_dlfcn_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_DLFCN_H 1 _ACEOF -if ac_fn_fc_try_compile "$LINENO"; then : - ac_compiler_gnu=yes -else - ac_compiler_gnu=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -ac_cv_fc_compiler_gnu=$ac_compiler_gnu fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_fc_compiler_gnu" >&5 -$as_echo "$ac_cv_fc_compiler_gnu" >&6; } -ac_ext=$ac_save_ext -ac_test_FCFLAGS=${FCFLAGS+set} -ac_save_FCFLAGS=$FCFLAGS -FCFLAGS= -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $FC accepts -g" >&5 -$as_echo_n "checking whether $FC accepts -g... " >&6; } -if test "${ac_cv_prog_fc_g+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - FCFLAGS=-g -cat > conftest.$ac_ext <<_ACEOF - program main - end -_ACEOF -if ac_fn_fc_try_compile "$LINENO"; then : - ac_cv_prog_fc_g=yes -else - ac_cv_prog_fc_g=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +done -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_fc_g" >&5 -$as_echo "$ac_cv_prog_fc_g" >&6; } -if test "$ac_test_FCFLAGS" = set; then - FCFLAGS=$ac_save_FCFLAGS -elif test $ac_cv_prog_fc_g = yes; then - if test "x$ac_cv_fc_compiler_gnu" = xyes; then - FCFLAGS="-g -O2" - else - FCFLAGS="-g" - fi -else - if test "x$ac_cv_fc_compiler_gnu" = xyes; then - FCFLAGS="-O2" - else - FCFLAGS= - fi -fi -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu -if test -z "$FC" || test "X$FC" = "Xno"; then - _lt_disable_FC=yes -fi + +func_stripname_cnf () +{ + case ${2} in + .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; + *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; + esac +} # func_stripname_cnf + + @@ -11690,6 +11254,7 @@ + test -z "$LN_S" && LN_S="ln -s" @@ -11711,7 +11276,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5 $as_echo_n "checking for objdir... " >&6; } -if test "${lt_cv_objdir+set}" = set; then : +if ${lt_cv_objdir+:} false; then : $as_echo_n "(cached) " >&6 else rm -f .libs 2>/dev/null @@ -11739,19 +11304,6 @@ - - - - - - - - - - - - - case $host_os in aix3*) # AIX sometimes has problems with the GCC collect2 program. For some @@ -11764,23 +11316,6 @@ ;; esac -# Sed substitution that helps us do robust quoting. It backslashifies -# metacharacters that are still active within double-quoted strings. -sed_quote_subst='s/\(["`$\\]\)/\\\1/g' - -# Same as above, but do not quote variable references. -double_quote_subst='s/\(["`\\]\)/\\\1/g' - -# Sed substitution to delay expansion of an escaped shell variable in a -# double_quote_subst'ed string. -delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' - -# Sed substitution to delay expansion of an escaped single quote. -delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' - -# Sed substitution to avoid accidental globbing in evaled expressions -no_glob_subst='s/\*/\\\*/g' - # Global variables: ofile=libtool can_build_shared=yes @@ -11809,7 +11344,7 @@ *) break;; esac done -cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` +cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` # Only perform the check for file, if the check method requires it @@ -11819,7 +11354,7 @@ if test "$file_magic_cmd" = '$MAGIC_CMD'; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5 $as_echo_n "checking for ${ac_tool_prefix}file... " >&6; } -if test "${lt_cv_path_MAGIC_CMD+set}" = set; then : +if ${lt_cv_path_MAGIC_CMD+:} false; then : $as_echo_n "(cached) " >&6 else case $MAGIC_CMD in @@ -11885,7 +11420,7 @@ if test -n "$ac_tool_prefix"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for file" >&5 $as_echo_n "checking for file... " >&6; } -if test "${lt_cv_path_MAGIC_CMD+set}" = set; then : +if ${lt_cv_path_MAGIC_CMD+:} false; then : $as_echo_n "(cached) " >&6 else case $MAGIC_CMD in @@ -12018,11 +11553,16 @@ lt_prog_compiler_no_builtin_flag= if test "$GCC" = yes; then - lt_prog_compiler_no_builtin_flag=' -fno-builtin' + case $cc_basename in + nvcc*) + lt_prog_compiler_no_builtin_flag=' -Xcompiler -fno-builtin' ;; + *) + lt_prog_compiler_no_builtin_flag=' -fno-builtin' ;; + esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 $as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; } -if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then : +if ${lt_cv_prog_compiler_rtti_exceptions+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_rtti_exceptions=no @@ -12038,15 +11578,15 @@ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:12041: $lt_compile\"" >&5) + (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:12045: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. - $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp + $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_rtti_exceptions=yes @@ -12075,8 +11615,6 @@ lt_prog_compiler_pic= lt_prog_compiler_static= -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 -$as_echo_n "checking for $compiler option to produce PIC... " >&6; } if test "$GCC" = yes; then lt_prog_compiler_wl='-Wl,' @@ -12124,6 +11662,12 @@ lt_prog_compiler_pic='-fno-common' ;; + haiku*) + # PIC is the default for Haiku. + # The "-static" flag exists, but is broken. + lt_prog_compiler_static= + ;; + hpux*) # PIC is the default for 64-bit PA HP-UX, but not for 32-bit # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag @@ -12166,6 +11710,13 @@ lt_prog_compiler_pic='-fPIC' ;; esac + + case $cc_basename in + nvcc*) # Cuda Compiler Driver 2.2 + lt_prog_compiler_wl='-Xlinker ' + lt_prog_compiler_pic='-Xcompiler -fPIC' + ;; + esac else # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in @@ -12207,7 +11758,7 @@ lt_prog_compiler_static='-non_shared' ;; - linux* | k*bsd*-gnu) + linux* | k*bsd*-gnu | kopensolaris*-gnu) case $cc_basename in # old Intel for x86_64 which still supported -KPIC. ecc*) @@ -12228,7 +11779,13 @@ lt_prog_compiler_pic='--shared' lt_prog_compiler_static='--static' ;; - pgcc* | pgf77* | pgf90* | pgf95*) + nagfor*) + # NAG Fortran compiler + lt_prog_compiler_wl='-Wl,-Wl,,' + lt_prog_compiler_pic='-PIC' + lt_prog_compiler_static='-Bstatic' + ;; + pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) lt_prog_compiler_wl='-Wl,' @@ -12240,25 +11797,25 @@ # All Alpha code is PIC. lt_prog_compiler_static='-non_shared' ;; - xl*) - # IBM XL C 8.0/Fortran 10.1 on PPC + xl* | bgxl* | bgf* | mpixl*) + # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-qpic' lt_prog_compiler_static='-qstaticlink' ;; *) case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) - # Sun C 5.9 + *Sun\ F* | *Sun*Fortran*) + # Sun Fortran 8.3 passes all unrecognized flags to the linker lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' - lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_wl='' ;; - *Sun\ F*) - # Sun Fortran 8.3 passes all unrecognized flags to the linker + *Sun\ C*) + # Sun C 5.9 lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' - lt_prog_compiler_wl='' + lt_prog_compiler_wl='-Wl,' ;; esac ;; @@ -12290,7 +11847,7 @@ lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' case $cc_basename in - f77* | f90* | f95*) + f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) lt_prog_compiler_wl='-Qoption ld ';; *) lt_prog_compiler_wl='-Wl,';; @@ -12347,13 +11904,17 @@ lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC" ;; esac -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_prog_compiler_pic" >&5 -$as_echo "$lt_prog_compiler_pic" >&6; } - - - - +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 +$as_echo_n "checking for $compiler option to produce PIC... " >&6; } +if ${lt_cv_prog_compiler_pic+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler_pic=$lt_prog_compiler_pic +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5 +$as_echo "$lt_cv_prog_compiler_pic" >&6; } +lt_prog_compiler_pic=$lt_cv_prog_compiler_pic # # Check to make sure the PIC flag actually works. @@ -12361,7 +11922,7 @@ if test -n "$lt_prog_compiler_pic"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 $as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; } -if test "${lt_cv_prog_compiler_pic_works+set}" = set; then : +if ${lt_cv_prog_compiler_pic_works+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_pic_works=no @@ -12377,15 +11938,15 @@ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:12380: $lt_compile\"" >&5) + (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:12384: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. - $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp + $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_pic_works=yes @@ -12414,13 +11975,18 @@ + + + + + # # Check to make sure the static flag actually works. # wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 $as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } -if test "${lt_cv_prog_compiler_static_works+set}" = set; then : +if ${lt_cv_prog_compiler_static_works+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_static_works=no @@ -12433,7 +11999,7 @@ if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&5 - $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp + $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_static_works=yes @@ -12463,7 +12029,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } -if test "${lt_cv_prog_compiler_c_o+set}" = set; then : +if ${lt_cv_prog_compiler_c_o+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o=no @@ -12482,16 +12048,16 @@ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:12485: $lt_compile\"" >&5) + (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:12489: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings - $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp + $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o=yes @@ -12518,7 +12084,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } -if test "${lt_cv_prog_compiler_c_o+set}" = set; then : +if ${lt_cv_prog_compiler_c_o+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o=no @@ -12537,16 +12103,16 @@ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:12540: $lt_compile\"" >&5) + (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:12544: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings - $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp + $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o=yes @@ -12659,7 +12225,33 @@ esac ld_shlibs=yes + + # On some targets, GNU ld is compatible enough with the native linker + # that we're better off using the native interface for both. + lt_use_gnu_ld_interface=no if test "$with_gnu_ld" = yes; then + case $host_os in + aix*) + # The AIX port of GNU ld has always aspired to compatibility + # with the native linker. However, as the warning in the GNU ld + # block says, versions before 2.19.5* couldn't really create working + # shared libraries, regardless of the interface used. + case `$LD -v 2>&1` in + *\ \(GNU\ Binutils\)\ 2.19.5*) ;; + *\ \(GNU\ Binutils\)\ 2.[2-9]*) ;; + *\ \(GNU\ Binutils\)\ [3-9]*) ;; + *) + lt_use_gnu_ld_interface=yes + ;; + esac + ;; + *) + lt_use_gnu_ld_interface=yes + ;; + esac + fi + + if test "$lt_use_gnu_ld_interface" = yes; then # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='${wl}' @@ -12677,6 +12269,7 @@ fi supports_anon_versioning=no case `$LD -v 2>&1` in + *GNU\ gold*) supports_anon_versioning=yes ;; *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... @@ -12692,11 +12285,12 @@ ld_shlibs=no cat <<_LT_EOF 1>&2 -*** Warning: the GNU linker, at least up to release 2.9.1, is reported +*** Warning: the GNU linker, at least up to release 2.19, is reported *** to be unable to reliably create shared libraries on AIX. *** Therefore, libtool is disabling shared libraries support. If you -*** really care for shared libraries, you may want to modify your PATH -*** so that a non-GNU linker is found, and then restart. +*** really care for shared libraries, you may want to install binutils +*** 2.20 or above, or modify your PATH so that a non-GNU linker is found. +*** You will then need to restart the configuration process. _LT_EOF fi @@ -12732,10 +12326,12 @@ # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless, # as there is no search path for DLLs. hardcode_libdir_flag_spec='-L$libdir' + export_dynamic_flag_spec='${wl}--export-all-symbols' allow_undefined_flag=unsupported always_export_symbols=no enable_shared_with_static_runtimes=yes - export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' + export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols' + exclude_expsyms='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname' if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' @@ -12753,6 +12349,11 @@ fi ;; + haiku*) + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + link_all_deplibs=yes + ;; + interix[3-9]*) hardcode_direct=no hardcode_shlibpath_var=no @@ -12768,7 +12369,7 @@ archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; - gnu* | linux* | tpf* | k*bsd*-gnu) + gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) tmp_diet=no if test "$host_os" = linux-dietlibc; then case $cc_basename in @@ -12778,15 +12379,16 @@ if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ && test "$tmp_diet" = no then - tmp_addflag= + tmp_addflag=' $pic_flag' tmp_sharedflag='-shared' case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler - whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' + whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag' ;; - pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers - whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' + pgf77* | pgf90* | pgf95* | pgfortran*) + # Portland Group f77 and f90 compilers + whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag -Mnomain' ;; ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 tmp_addflag=' -i_dynamic' ;; @@ -12797,13 +12399,17 @@ lf95*) # Lahey Fortran 8.1 whole_archive_flag_spec= tmp_sharedflag='--shared' ;; - xl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below) + xl[cC]* | bgxl[cC]* | mpixl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below) tmp_sharedflag='-qmkshrobj' tmp_addflag= ;; + nvcc*) # Cuda Compiler Driver 2.2 + whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' + compiler_needs_object=yes + ;; esac case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 - whole_archive_flag_spec='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' + whole_archive_flag_spec='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' compiler_needs_object=yes tmp_sharedflag='-G' ;; *Sun\ F*) # Sun Fortran 8.3 @@ -12819,17 +12425,17 @@ fi case $cc_basename in - xlf*) + xlf* | bgf* | bgxlf* | mpixlf*) # IBM XL Fortran 10.1 on PPC cannot create shared libs itself whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive' hardcode_libdir_flag_spec= hardcode_libdir_flag_spec_ld='-rpath $libdir' - archive_cmds='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib' + archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' if test "x$supports_anon_versioning" = xyes; then archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ - $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' + $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' fi ;; esac @@ -12843,8 +12449,8 @@ archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' fi ;; @@ -12862,8 +12468,8 @@ _LT_EOF elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi @@ -12909,8 +12515,8 @@ *) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi @@ -12950,8 +12556,10 @@ else # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm + # Also, AIX nm treats weak defined symbols like other global + # defined symbols, whereas GNU nm marks them as "W". if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then - export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' + export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' else export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' fi @@ -13038,7 +12646,13 @@ allow_undefined_flag='-berok' # Determine the default libpath from the value encoded in an # empty executable. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + if test "${lt_cv_aix_libpath+set}" = set; then + aix_libpath=$lt_cv_aix_libpath +else + if ${lt_cv_aix_libpath_+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -13051,25 +12665,32 @@ _ACEOF if ac_fn_c_try_link "$LINENO"; then : -lt_aix_libpath_sed=' - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\(.*\)$/\1/ - p - } - }' -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -# Check for a 64-bit object if we didn't find anything. -if test -z "$aix_libpath"; then - aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -fi + lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\([^ ]*\) *$/\1/ + p + } + }' + lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + # Check for a 64-bit object if we didn't find anything. + if test -z "$lt_cv_aix_libpath_"; then + lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext -if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + if test -z "$lt_cv_aix_libpath_"; then + lt_cv_aix_libpath_="/usr/lib:/lib" + fi + +fi + + aix_libpath=$lt_cv_aix_libpath_ +fi hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" - archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" + archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib' @@ -13078,7 +12699,13 @@ else # Determine the default libpath from the value encoded in an # empty executable. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + if test "${lt_cv_aix_libpath+set}" = set; then + aix_libpath=$lt_cv_aix_libpath +else + if ${lt_cv_aix_libpath_+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -13091,30 +12718,42 @@ _ACEOF if ac_fn_c_try_link "$LINENO"; then : -lt_aix_libpath_sed=' - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\(.*\)$/\1/ - p - } - }' -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -# Check for a 64-bit object if we didn't find anything. -if test -z "$aix_libpath"; then - aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -fi + lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\([^ ]*\) *$/\1/ + p + } + }' + lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + # Check for a 64-bit object if we didn't find anything. + if test -z "$lt_cv_aix_libpath_"; then + lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext -if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + if test -z "$lt_cv_aix_libpath_"; then + lt_cv_aix_libpath_="/usr/lib:/lib" + fi + +fi + + aix_libpath=$lt_cv_aix_libpath_ +fi hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. no_undefined_flag=' ${wl}-bernotok' allow_undefined_flag=' ${wl}-berok' - # Exported symbols can be pulled into shared objects from archives - whole_archive_flag_spec='$convenience' + if test "$with_gnu_ld" = yes; then + # We only use this code for GNU lds that support --whole-archive. + whole_archive_flag_spec='${wl}--whole-archive$convenience ${wl}--no-whole-archive' + else + # Exported symbols can be pulled into shared objects from archives + whole_archive_flag_spec='$convenience' + fi archive_cmds_need_lc=yes # This is similar to how AIX traditionally builds its shared libraries. archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' @@ -13146,20 +12785,63 @@ # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. - hardcode_libdir_flag_spec=' ' - allow_undefined_flag=unsupported - # Tell ltmain to make .lib files, not .a files. - libext=lib - # Tell ltmain to make .dll files, not .so files. - shrext_cmds=".dll" - # FIXME: Setting linknames here is a bad hack. - archive_cmds='$CC -o $lib $libobjs $compiler_flags `$ECHO "X$deplibs" | $Xsed -e '\''s/ -lc$//'\''` -link -dll~linknames=' - # The linker will automatically build a .lib file if we build a DLL. - old_archive_from_new_cmds='true' - # FIXME: Should let the user specify the lib program. - old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' - fix_srcfile_path='`cygpath -w "$srcfile"`' - enable_shared_with_static_runtimes=yes + case $cc_basename in + cl*) + # Native MSVC + hardcode_libdir_flag_spec=' ' + allow_undefined_flag=unsupported + always_export_symbols=yes + file_list_spec='@' + # Tell ltmain to make .lib files, not .a files. + libext=lib + # Tell ltmain to make .dll files, not .so files. + shrext_cmds=".dll" + # FIXME: Setting linknames here is a bad hack. + archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' + archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; + else + sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; + fi~ + $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ + linknames=' + # The linker will not automatically build a static lib if we build a DLL. + # _LT_TAGVAR(old_archive_from_new_cmds, )='true' + enable_shared_with_static_runtimes=yes + export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' + # Don't use ranlib + old_postinstall_cmds='chmod 644 $oldlib' + postlink_cmds='lt_outputfile="@OUTPUT@"~ + lt_tool_outputfile="@TOOL_OUTPUT@"~ + case $lt_outputfile in + *.exe|*.EXE) ;; + *) + lt_outputfile="$lt_outputfile.exe" + lt_tool_outputfile="$lt_tool_outputfile.exe" + ;; + esac~ + if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then + $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; + $RM "$lt_outputfile.manifest"; + fi' + ;; + *) + # Assume MSVC wrapper + hardcode_libdir_flag_spec=' ' + allow_undefined_flag=unsupported + # Tell ltmain to make .lib files, not .a files. + libext=lib + # Tell ltmain to make .dll files, not .so files. + shrext_cmds=".dll" + # FIXME: Setting linknames here is a bad hack. + archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' + # The linker will automatically build a .lib file if we build a DLL. + old_archive_from_new_cmds='true' + # FIXME: Should let the user specify the lib program. + old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' + enable_shared_with_static_runtimes=yes + ;; + esac ;; darwin* | rhapsody*) @@ -13169,7 +12851,11 @@ hardcode_direct=no hardcode_automatic=yes hardcode_shlibpath_var=unsupported - whole_archive_flag_spec='' + if test "$lt_cv_ld_force_load" = "yes"; then + whole_archive_flag_spec='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' + else + whole_archive_flag_spec='' + fi link_all_deplibs=yes allow_undefined_flag="$_lt_dar_allow_undefined" case $cc_basename in @@ -13177,7 +12863,7 @@ *) _lt_dar_can_shared=$GCC ;; esac if test "$_lt_dar_can_shared" = "yes"; then - output_verbose_link_cmd=echo + output_verbose_link_cmd=func_echo_all archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" @@ -13220,7 +12906,7 @@ # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | dragonfly*) - archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' + archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no @@ -13228,7 +12914,7 @@ hpux9*) if test "$GCC" = yes; then - archive_cmds='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + archive_cmds='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' fi @@ -13243,8 +12929,8 @@ ;; hpux10*) - if test "$GCC" = yes -a "$with_gnu_ld" = no; then - archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + if test "$GCC" = yes && test "$with_gnu_ld" = no; then + archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi @@ -13262,16 +12948,16 @@ ;; hpux11*) - if test "$GCC" = yes -a "$with_gnu_ld" = no; then + if test "$GCC" = yes && test "$with_gnu_ld" = no; then case $host_cpu in hppa*64*) archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) - archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) - archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else @@ -13283,7 +12969,46 @@ archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) - archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + + # Older versions of the 11.00 compiler do not understand -b yet + # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC understands -b" >&5 +$as_echo_n "checking if $CC understands -b... " >&6; } +if ${lt_cv_prog_compiler__b+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler__b=no + save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS -b" + echo "$lt_simple_link_test_code" > conftest.$ac_ext + if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then + # The linker can only warn and ignore the option if not recognized + # So say no if there are warnings + if test -s conftest.err; then + # Append any errors to the config.log. + cat conftest.err 1>&5 + $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if diff conftest.exp conftest.er2 >/dev/null; then + lt_cv_prog_compiler__b=yes + fi + else + lt_cv_prog_compiler__b=yes + fi + fi + $RM -r conftest* + LDFLAGS="$save_LDFLAGS" + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler__b" >&5 +$as_echo "$lt_cv_prog_compiler__b" >&6; } + +if test x"$lt_cv_prog_compiler__b" = xyes; then + archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' +else + archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' +fi + ;; esac fi @@ -13311,26 +13036,39 @@ irix5* | irix6* | nonstopux*) if test "$GCC" = yes; then - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' # Try to use the -exported_symbol ld option, if it does not # work, assume that -exports_file does not work either and # implicitly export all symbols. - save_LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + # This should be the same for all languages, so no per-tag cache variable. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5 +$as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; } +if ${lt_cv_irix_exported_symbol+:} false; then : + $as_echo_n "(cached) " >&6 +else + save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -int foo(void) {} +int foo (void) { return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' - + lt_cv_irix_exported_symbol=yes +else + lt_cv_irix_exported_symbol=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext - LDFLAGS="$save_LDFLAGS" + LDFLAGS="$save_LDFLAGS" +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5 +$as_echo "$lt_cv_irix_exported_symbol" >&6; } + if test "$lt_cv_irix_exported_symbol" = yes; then + archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' + fi else - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' + archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' fi archive_cmds_need_lc='no' hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' @@ -13392,17 +13130,17 @@ hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes allow_undefined_flag=unsupported - archive_cmds='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$ECHO DATA >> $output_objdir/$libname.def~$ECHO " SINGLE NONSHARED" >> $output_objdir/$libname.def~$ECHO EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' + archive_cmds='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' ;; osf3*) if test "$GCC" = yes; then allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' - archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else allow_undefined_flag=' -expect_unresolved \*' - archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' + archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' fi archive_cmds_need_lc='no' hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' @@ -13412,13 +13150,13 @@ osf4* | osf5*) # as osf3* with the addition of -msym flag if test "$GCC" = yes; then allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' - archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + archive_cmds='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' else allow_undefined_flag=' -expect_unresolved \*' - archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' + archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ - $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' + $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' # Both c and cxx compiler support -rpath directly hardcode_libdir_flag_spec='-rpath $libdir' @@ -13431,9 +13169,9 @@ no_undefined_flag=' -z defs' if test "$GCC" = yes; then wlarc='${wl}' - archive_cmds='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_cmds='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' + $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' else case `$CC -V 2>&1` in *"Compilers 5.0"*) @@ -13621,44 +13359,50 @@ # to ld, don't add -lc before -lgcc. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5 $as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } - $RM conftest* - echo "$lt_simple_compile_test_code" > conftest.$ac_ext +if ${lt_cv_archive_cmds_need_lc+:} false; then : + $as_echo_n "(cached) " >&6 +else + $RM conftest* + echo "$lt_simple_compile_test_code" > conftest.$ac_ext - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } 2>conftest.err; then - soname=conftest - lib=conftest - libobjs=conftest.$ac_objext - deplibs= - wl=$lt_prog_compiler_wl - pic_flag=$lt_prog_compiler_pic - compiler_flags=-v - linker_flags=-v - verstring= - output_objdir=. - libname=conftest - lt_save_allow_undefined_flag=$allow_undefined_flag - allow_undefined_flag= - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5 + soname=conftest + lib=conftest + libobjs=conftest.$ac_objext + deplibs= + wl=$lt_prog_compiler_wl + pic_flag=$lt_prog_compiler_pic + compiler_flags=-v + linker_flags=-v + verstring= + output_objdir=. + libname=conftest + lt_save_allow_undefined_flag=$allow_undefined_flag + allow_undefined_flag= + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5 (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } - then - archive_cmds_need_lc=no - else - archive_cmds_need_lc=yes - fi - allow_undefined_flag=$lt_save_allow_undefined_flag - else - cat conftest.err 1>&5 - fi - $RM conftest* - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $archive_cmds_need_lc" >&5 -$as_echo "$archive_cmds_need_lc" >&6; } + then + lt_cv_archive_cmds_need_lc=no + else + lt_cv_archive_cmds_need_lc=yes + fi + allow_undefined_flag=$lt_save_allow_undefined_flag + else + cat conftest.err 1>&5 + fi + $RM conftest* + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc" >&5 +$as_echo "$lt_cv_archive_cmds_need_lc" >&6; } + archive_cmds_need_lc=$lt_cv_archive_cmds_need_lc ;; esac fi @@ -13829,16 +13573,23 @@ darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; *) lt_awk_arg="/^libraries:/" ;; esac - lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"` - if $ECHO "$lt_search_path_spec" | $GREP ';' >/dev/null ; then + case $host_os in + mingw* | cegcc*) lt_sed_strip_eq="s,=\([A-Za-z]:\),\1,g" ;; + *) lt_sed_strip_eq="s,=/,/,g" ;; + esac + lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` + case $lt_search_path_spec in + *\;*) # if the path contains ";" then we assume it to be the separator # otherwise default to the standard path separator (i.e. ":") - it is # assumed that no part of a normal pathname contains ";" but that should # okay in the real world where ";" in dirpaths is itself problematic. - lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e 's/;/ /g'` - else - lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` - fi + lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` + ;; + *) + lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` + ;; + esac # Ok, now we have the path, separated by spaces, we can step through it # and add multilib dir if necessary. lt_tmp_lt_search_path_spec= @@ -13851,7 +13602,7 @@ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" fi done - lt_search_path_spec=`$ECHO $lt_tmp_lt_search_path_spec | awk ' + lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' BEGIN {RS=" "; FS="/|\n";} { lt_foo=""; lt_count=0; @@ -13871,7 +13622,13 @@ if (lt_foo != "") { lt_freq[lt_foo]++; } if (lt_freq[lt_foo] == 1) { print lt_foo; } }'` - sys_lib_search_path_spec=`$ECHO $lt_search_path_spec` + # AWK program above erroneously prepends '/' to C:/dos/paths + # for these hosts. + case $host_os in + mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ + $SED 's,/\([A-Za-z]:\),\1,g'` ;; + esac + sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` else sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" fi @@ -13959,7 +13716,7 @@ m68k) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. - finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$ECHO "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' + finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; esac ;; @@ -13990,8 +13747,9 @@ need_version=no need_lib_prefix=no - case $GCC,$host_os in - yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*) + case $GCC,$cc_basename in + yes,*) + # gcc library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ @@ -14012,36 +13770,83 @@ cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" + + sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api" ;; mingw* | cegcc*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` - if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then - # It is most probably a Windows format PATH printed by - # mingw gcc, but we are running on Cygwin. Gcc prints its search - # path with ; separators, and with drive letters. We can handle the - # drive letters (cygwin fileutils understands them), so leave them, - # especially as we might pass files found there to a mingw objdump, - # which wouldn't understand a cygwinified path. Ahh. - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` - else - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` - fi ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; esac + dynamic_linker='Win32 ld.exe' + ;; + + *,cl*) + # Native MSVC + libname_spec='$name' + soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + library_names_spec='${libname}.dll.lib' + + case $build_os in + mingw*) + sys_lib_search_path_spec= + lt_save_ifs=$IFS + IFS=';' + for lt_path in $LIB + do + IFS=$lt_save_ifs + # Let DOS variable expansion print the short 8.3 style file name. + lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` + sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" + done + IFS=$lt_save_ifs + # Convert to MSYS style. + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'` + ;; + cygwin*) + # Convert to unix form, then to dos form, then back to unix form + # but this time dos style (no spaces!) so that the unix form looks + # like /cygdrive/c/PROGRA~1:/cygdr... + sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` + sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` + sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + ;; + *) + sys_lib_search_path_spec="$LIB" + if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then + # It is most probably a Windows format PATH. + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` + else + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + fi + # FIXME: find the short name or the path components, as spaces are + # common. (e.g. "Program Files" -> "PROGRA~1") + ;; + esac + + # DLL is installed to $(libdir)/../bin by postinstall_cmds + postinstall_cmds='base_file=`basename \${file}`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ + dldir=$destdir/`dirname \$dlpath`~ + test -d \$dldir || mkdir -p \$dldir~ + $install_prog $dir/$dlname \$dldir/$dlname' + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ + dlpath=$dir/\$dldll~ + $RM \$dlpath' + shlibpath_overrides_runpath=yes + dynamic_linker='Win32 link.exe' ;; *) + # Assume MSVC wrapper library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' + dynamic_linker='Win32 ld.exe' ;; esac - dynamic_linker='Win32 ld.exe' # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; @@ -14128,6 +13933,19 @@ hardcode_into_libs=yes ;; +haiku*) + version_type=linux + need_lib_prefix=no + need_version=no + dynamic_linker="$host_os runtime_loader" + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LIBRARY_PATH + shlibpath_overrides_runpath=yes + sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' + hardcode_into_libs=yes + ;; + hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. @@ -14170,8 +13988,10 @@ soname_spec='${libname}${release}${shared_ext}$major' ;; esac - # HP-UX runs *really* slowly unless shared libraries are mode 555. + # HP-UX runs *really* slowly unless shared libraries are mode 555, ... postinstall_cmds='chmod 555 $lib' + # or fails outright, so override atomically: + install_override_mode=555 ;; interix[3-9]*) @@ -14229,7 +14049,7 @@ ;; # This must be Linux ELF. -linux* | k*bsd*-gnu) +linux* | k*bsd*-gnu | kopensolaris*-gnu) version_type=linux need_lib_prefix=no need_version=no @@ -14238,12 +14058,17 @@ finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no + # Some binutils ld are patched to set DT_RUNPATH - save_LDFLAGS=$LDFLAGS - save_libdir=$libdir - eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \ - LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\"" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + if ${lt_cv_shlibpath_overrides_runpath+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_shlibpath_overrides_runpath=no + save_LDFLAGS=$LDFLAGS + save_libdir=$libdir + eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \ + LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\"" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -14256,13 +14081,17 @@ _ACEOF if ac_fn_c_try_link "$LINENO"; then : if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then : - shlibpath_overrides_runpath=yes + lt_cv_shlibpath_overrides_runpath=yes fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext - LDFLAGS=$save_LDFLAGS - libdir=$save_libdir + LDFLAGS=$save_LDFLAGS + libdir=$save_libdir + +fi + + shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install @@ -14271,7 +14100,7 @@ # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then - lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` + lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi @@ -14574,6 +14403,11 @@ + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5 $as_echo_n "checking how to hardcode library paths into programs... " >&6; } hardcode_action= @@ -14646,7 +14480,7 @@ # if libdl is installed we need to link against it { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 $as_echo_n "checking for dlopen in -ldl... " >&6; } -if test "${ac_cv_lib_dl_dlopen+set}" = set; then : +if ${ac_cv_lib_dl_dlopen+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -14680,7 +14514,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 $as_echo "$ac_cv_lib_dl_dlopen" >&6; } -if test "x$ac_cv_lib_dl_dlopen" = x""yes; then : +if test "x$ac_cv_lib_dl_dlopen" = xyes; then : lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" else @@ -14694,12 +14528,12 @@ *) ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load" -if test "x$ac_cv_func_shl_load" = x""yes; then : +if test "x$ac_cv_func_shl_load" = xyes; then : lt_cv_dlopen="shl_load" else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5 $as_echo_n "checking for shl_load in -ldld... " >&6; } -if test "${ac_cv_lib_dld_shl_load+set}" = set; then : +if ${ac_cv_lib_dld_shl_load+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -14733,16 +14567,16 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5 $as_echo "$ac_cv_lib_dld_shl_load" >&6; } -if test "x$ac_cv_lib_dld_shl_load" = x""yes; then : +if test "x$ac_cv_lib_dld_shl_load" = xyes; then : lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld" else ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen" -if test "x$ac_cv_func_dlopen" = x""yes; then : +if test "x$ac_cv_func_dlopen" = xyes; then : lt_cv_dlopen="dlopen" else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 $as_echo_n "checking for dlopen in -ldl... " >&6; } -if test "${ac_cv_lib_dl_dlopen+set}" = set; then : +if ${ac_cv_lib_dl_dlopen+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -14776,12 +14610,12 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 $as_echo "$ac_cv_lib_dl_dlopen" >&6; } -if test "x$ac_cv_lib_dl_dlopen" = x""yes; then : +if test "x$ac_cv_lib_dl_dlopen" = xyes; then : lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5 $as_echo_n "checking for dlopen in -lsvld... " >&6; } -if test "${ac_cv_lib_svld_dlopen+set}" = set; then : +if ${ac_cv_lib_svld_dlopen+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -14815,12 +14649,12 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5 $as_echo "$ac_cv_lib_svld_dlopen" >&6; } -if test "x$ac_cv_lib_svld_dlopen" = x""yes; then : +if test "x$ac_cv_lib_svld_dlopen" = xyes; then : lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld" else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5 $as_echo_n "checking for dld_link in -ldld... " >&6; } -if test "${ac_cv_lib_dld_dld_link+set}" = set; then : +if ${ac_cv_lib_dld_dld_link+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -14854,7 +14688,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5 $as_echo "$ac_cv_lib_dld_dld_link" >&6; } -if test "x$ac_cv_lib_dld_dld_link" = x""yes; then : +if test "x$ac_cv_lib_dld_dld_link" = xyes; then : lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld" fi @@ -14895,7 +14729,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5 $as_echo_n "checking whether a program can dlopen itself... " >&6; } -if test "${lt_cv_dlopen_self+set}" = set; then : +if ${lt_cv_dlopen_self+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : @@ -14904,7 +14738,7 @@ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 14907 "configure" +#line $LINENO "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -14945,7 +14779,13 @@ # endif #endif -void fnord() { int i=42;} +/* When -fvisbility=hidden is used, assume the code has been annotated + correspondingly for the symbols needed. */ +#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) +int fnord () __attribute__((visibility("default"))); +#endif + +int fnord () { return 42; } int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); @@ -14954,7 +14794,11 @@ if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; - else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; + else + { + if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; + else puts (dlerror ()); + } /* dlclose (self); */ } else @@ -14991,7 +14835,7 @@ wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5 $as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; } -if test "${lt_cv_dlopen_self_static+set}" = set; then : +if ${lt_cv_dlopen_self_static+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : @@ -15000,7 +14844,7 @@ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 15003 "configure" +#line $LINENO "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -15041,7 +14885,13 @@ # endif #endif -void fnord() { int i=42;} +/* When -fvisbility=hidden is used, assume the code has been annotated + correspondingly for the symbols needed. */ +#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) +int fnord () __attribute__((visibility("default"))); +#endif + +int fnord () { return 42; } int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); @@ -15050,7 +14900,11 @@ if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; - else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; + else + { + if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; + else puts (dlerror ()); + } /* dlclose (self); */ } else @@ -15164,49 +15018,188 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5 $as_echo "$can_build_shared" >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5 -$as_echo_n "checking whether to build shared libraries... " >&6; } - test "$can_build_shared" = "no" && enable_shared=no + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5 +$as_echo_n "checking whether to build shared libraries... " >&6; } + test "$can_build_shared" = "no" && enable_shared=no + + # On AIX, shared libraries and static libraries use the same namespace, and + # are all built from PIC. + case $host_os in + aix3*) + test "$enable_shared" = yes && enable_static=no + if test -n "$RANLIB"; then + archive_cmds="$archive_cmds~\$RANLIB \$lib" + postinstall_cmds='$RANLIB $lib' + fi + ;; + + aix[4-9]*) + if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then + test "$enable_shared" = yes && enable_static=no + fi + ;; + esac + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5 +$as_echo "$enable_shared" >&6; } + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5 +$as_echo_n "checking whether to build static libraries... " >&6; } + # Make sure either enable_shared or enable_static is yes. + test "$enable_shared" = yes || enable_static=yes + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5 +$as_echo "$enable_static" >&6; } + + + + +fi +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +CC="$lt_save_CC" + + if test -n "$CXX" && ( test "X$CXX" != "Xno" && + ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || + (test "X$CXX" != "Xg++"))) ; then + ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5 +$as_echo_n "checking how to run the C++ preprocessor... " >&6; } +if test -z "$CXXCPP"; then + if ${ac_cv_prog_CXXCPP+:} false; then : + $as_echo_n "(cached) " >&6 +else + # Double quotes because CXXCPP needs to be expanded + for CXXCPP in "$CXX -E" "/lib/cpp" + do + ac_preproc_ok=false +for ac_cxx_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifdef __STDC__ +# include +#else +# include +#endif + Syntax error +_ACEOF +if ac_fn_cxx_try_cpp "$LINENO"; then : + +else + # Broken: fails on valid input. +continue +fi +rm -f conftest.err conftest.i conftest.$ac_ext - # On AIX, shared libraries and static libraries use the same namespace, and - # are all built from PIC. - case $host_os in - aix3*) - test "$enable_shared" = yes && enable_static=no - if test -n "$RANLIB"; then - archive_cmds="$archive_cmds~\$RANLIB \$lib" - postinstall_cmds='$RANLIB $lib' - fi - ;; + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +_ACEOF +if ac_fn_cxx_try_cpp "$LINENO"; then : + # Broken: success on invalid input. +continue +else + # Passes both tests. +ac_preproc_ok=: +break +fi +rm -f conftest.err conftest.i conftest.$ac_ext - aix[4-9]*) - if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then - test "$enable_shared" = yes && enable_static=no - fi - ;; - esac - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5 -$as_echo "$enable_shared" >&6; } +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.i conftest.err conftest.$ac_ext +if $ac_preproc_ok; then : + break +fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5 -$as_echo_n "checking whether to build static libraries... " >&6; } - # Make sure either enable_shared or enable_static is yes. - test "$enable_shared" = yes || enable_static=yes - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5 -$as_echo "$enable_static" >&6; } + done + ac_cv_prog_CXXCPP=$CXXCPP + +fi + CXXCPP=$ac_cv_prog_CXXCPP +else + ac_cv_prog_CXXCPP=$CXXCPP +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5 +$as_echo "$CXXCPP" >&6; } +ac_preproc_ok=false +for ac_cxx_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifdef __STDC__ +# include +#else +# include +#endif + Syntax error +_ACEOF +if ac_fn_cxx_try_cpp "$LINENO"; then : +else + # Broken: fails on valid input. +continue +fi +rm -f conftest.err conftest.i conftest.$ac_ext + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +_ACEOF +if ac_fn_cxx_try_cpp "$LINENO"; then : + # Broken: success on invalid input. +continue +else + # Passes both tests. +ac_preproc_ok=: +break +fi +rm -f conftest.err conftest.i conftest.$ac_ext +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.i conftest.err conftest.$ac_ext +if $ac_preproc_ok; then : +else + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check +See \`config.log' for more details" "$LINENO" 5; } fi + ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu -CC="$lt_save_CC" - +else + _lt_caught_CXX_error=yes +fi ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' @@ -15233,6 +15226,8 @@ module_expsym_cmds_CXX= link_all_deplibs_CXX=unknown old_archive_cmds_CXX=$old_archive_cmds +reload_flag_CXX=$reload_flag +reload_cmds_CXX=$reload_cmds no_undefined_flag_CXX= whole_archive_flag_spec_CXX= enable_shared_with_static_runtimes_CXX=no @@ -15288,6 +15283,7 @@ # Allow CC to be a program name with arguments. lt_save_CC=$CC + lt_save_CFLAGS=$CFLAGS lt_save_LD=$LD lt_save_GCC=$GCC GCC=$GXX @@ -15305,6 +15301,7 @@ fi test -z "${LDCXX+set}" || LD=$LDCXX CC=${CXX-"c++"} + CFLAGS=$CXXFLAGS compiler=$CC compiler_CXX=$CC for cc_temp in $compiler""; do @@ -15315,7 +15312,7 @@ *) break;; esac done -cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` +cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` if test -n "$compiler"; then @@ -15378,7 +15375,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 $as_echo_n "checking for non-GNU ld... " >&6; } fi -if test "${lt_cv_path_LD+set}" = set; then : +if ${lt_cv_path_LD+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$LD"; then @@ -15415,10 +15412,10 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi -test -z "$LD" && as_fn_error "no acceptable ld found in \$PATH" "$LINENO" 5 +test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } -if test "${lt_cv_prog_gnu_ld+set}" = set; then : +if ${lt_cv_prog_gnu_ld+:} false; then : $as_echo_n "(cached) " >&6 else # I'd rather use --version here, but apparently some GNU lds only accept -v. @@ -15444,8 +15441,8 @@ # Check if GNU C++ uses GNU ld as the underlying linker, since the # archiving commands below assume that GNU ld is being used. if test "$with_gnu_ld" = yes; then - archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + archive_cmds_CXX='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_CXX='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' export_dynamic_flag_spec_CXX='${wl}--export-dynamic' @@ -15477,7 +15474,7 @@ # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else GXX=no @@ -15587,7 +15584,13 @@ allow_undefined_flag_CXX='-berok' # Determine the default libpath from the value encoded in an empty # executable. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + if test "${lt_cv_aix_libpath+set}" = set; then + aix_libpath=$lt_cv_aix_libpath +else + if ${lt_cv_aix_libpath__CXX+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -15600,26 +15603,33 @@ _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : -lt_aix_libpath_sed=' - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\(.*\)$/\1/ - p - } - }' -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -# Check for a 64-bit object if we didn't find anything. -if test -z "$aix_libpath"; then - aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -fi + lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\([^ ]*\) *$/\1/ + p + } + }' + lt_cv_aix_libpath__CXX=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + # Check for a 64-bit object if we didn't find anything. + if test -z "$lt_cv_aix_libpath__CXX"; then + lt_cv_aix_libpath__CXX=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext -if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + if test -z "$lt_cv_aix_libpath__CXX"; then + lt_cv_aix_libpath__CXX="/usr/lib:/lib" + fi + +fi + + aix_libpath=$lt_cv_aix_libpath__CXX +fi hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath" - archive_expsym_cmds_CXX='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" + archive_expsym_cmds_CXX='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then hardcode_libdir_flag_spec_CXX='${wl}-R $libdir:/usr/lib:/lib' @@ -15628,7 +15638,13 @@ else # Determine the default libpath from the value encoded in an # empty executable. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + if test "${lt_cv_aix_libpath+set}" = set; then + aix_libpath=$lt_cv_aix_libpath +else + if ${lt_cv_aix_libpath__CXX+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -15641,30 +15657,42 @@ _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : -lt_aix_libpath_sed=' - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\(.*\)$/\1/ - p - } - }' -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -# Check for a 64-bit object if we didn't find anything. -if test -z "$aix_libpath"; then - aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -fi + lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\([^ ]*\) *$/\1/ + p + } + }' + lt_cv_aix_libpath__CXX=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + # Check for a 64-bit object if we didn't find anything. + if test -z "$lt_cv_aix_libpath__CXX"; then + lt_cv_aix_libpath__CXX=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext -if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + if test -z "$lt_cv_aix_libpath__CXX"; then + lt_cv_aix_libpath__CXX="/usr/lib:/lib" + fi + +fi + + aix_libpath=$lt_cv_aix_libpath__CXX +fi hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. no_undefined_flag_CXX=' ${wl}-bernotok' allow_undefined_flag_CXX=' ${wl}-berok' - # Exported symbols can be pulled into shared objects from archives - whole_archive_flag_spec_CXX='$convenience' + if test "$with_gnu_ld" = yes; then + # We only use this code for GNU lds that support --whole-archive. + whole_archive_flag_spec_CXX='${wl}--whole-archive$convenience ${wl}--no-whole-archive' + else + # Exported symbols can be pulled into shared objects from archives + whole_archive_flag_spec_CXX='$convenience' + fi archive_cmds_need_lc_CXX=yes # This is similar to how AIX traditionally builds its shared # libraries. @@ -15694,28 +15722,75 @@ ;; cygwin* | mingw* | pw32* | cegcc*) - # _LT_TAGVAR(hardcode_libdir_flag_spec, CXX) is actually meaningless, - # as there is no search path for DLLs. - hardcode_libdir_flag_spec_CXX='-L$libdir' - allow_undefined_flag_CXX=unsupported - always_export_symbols_CXX=no - enable_shared_with_static_runtimes_CXX=yes - - if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then - archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - # If the export-symbols file already is a .def file (1st line - # is EXPORTS), use it as is; otherwise, prepend... - archive_expsym_cmds_CXX='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then - cp $export_symbols $output_objdir/$soname.def; - else - echo EXPORTS > $output_objdir/$soname.def; - cat $export_symbols >> $output_objdir/$soname.def; - fi~ - $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - else - ld_shlibs_CXX=no - fi - ;; + case $GXX,$cc_basename in + ,cl* | no,cl*) + # Native MSVC + # hardcode_libdir_flag_spec is actually meaningless, as there is + # no search path for DLLs. + hardcode_libdir_flag_spec_CXX=' ' + allow_undefined_flag_CXX=unsupported + always_export_symbols_CXX=yes + file_list_spec_CXX='@' + # Tell ltmain to make .lib files, not .a files. + libext=lib + # Tell ltmain to make .dll files, not .so files. + shrext_cmds=".dll" + # FIXME: Setting linknames here is a bad hack. + archive_cmds_CXX='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' + archive_expsym_cmds_CXX='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; + else + $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; + fi~ + $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ + linknames=' + # The linker will not automatically build a static lib if we build a DLL. + # _LT_TAGVAR(old_archive_from_new_cmds, CXX)='true' + enable_shared_with_static_runtimes_CXX=yes + # Don't use ranlib + old_postinstall_cmds_CXX='chmod 644 $oldlib' + postlink_cmds_CXX='lt_outputfile="@OUTPUT@"~ + lt_tool_outputfile="@TOOL_OUTPUT@"~ + case $lt_outputfile in + *.exe|*.EXE) ;; + *) + lt_outputfile="$lt_outputfile.exe" + lt_tool_outputfile="$lt_tool_outputfile.exe" + ;; + esac~ + func_to_tool_file "$lt_outputfile"~ + if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then + $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; + $RM "$lt_outputfile.manifest"; + fi' + ;; + *) + # g++ + # _LT_TAGVAR(hardcode_libdir_flag_spec, CXX) is actually meaningless, + # as there is no search path for DLLs. + hardcode_libdir_flag_spec_CXX='-L$libdir' + export_dynamic_flag_spec_CXX='${wl}--export-all-symbols' + allow_undefined_flag_CXX=unsupported + always_export_symbols_CXX=no + enable_shared_with_static_runtimes_CXX=yes + + if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then + archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + # If the export-symbols file already is a .def file (1st line + # is EXPORTS), use it as is; otherwise, prepend... + archive_expsym_cmds_CXX='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + cp $export_symbols $output_objdir/$soname.def; + else + echo EXPORTS > $output_objdir/$soname.def; + cat $export_symbols >> $output_objdir/$soname.def; + fi~ + $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + else + ld_shlibs_CXX=no + fi + ;; + esac + ;; darwin* | rhapsody*) @@ -15723,7 +15798,11 @@ hardcode_direct_CXX=no hardcode_automatic_CXX=yes hardcode_shlibpath_var_CXX=unsupported - whole_archive_flag_spec_CXX='' + if test "$lt_cv_ld_force_load" = "yes"; then + whole_archive_flag_spec_CXX='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' + else + whole_archive_flag_spec_CXX='' + fi link_all_deplibs_CXX=yes allow_undefined_flag_CXX="$_lt_dar_allow_undefined" case $cc_basename in @@ -15731,7 +15810,7 @@ *) _lt_dar_can_shared=$GCC ;; esac if test "$_lt_dar_can_shared" = "yes"; then - output_verbose_link_cmd=echo + output_verbose_link_cmd=func_echo_all archive_cmds_CXX="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" module_cmds_CXX="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" @@ -15784,6 +15863,11 @@ gnu*) ;; + haiku*) + archive_cmds_CXX='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + link_all_deplibs_CXX=yes + ;; + hpux9*) hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir' hardcode_libdir_separator_CXX=: @@ -15808,11 +15892,11 @@ # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. - output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' + output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test "$GXX" = yes; then - archive_cmds_CXX='$RM $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + archive_cmds_CXX='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else # FIXME: insert proper C++ library support ld_shlibs_CXX=no @@ -15873,7 +15957,7 @@ # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. - output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' + output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test "$GXX" = yes; then @@ -15883,10 +15967,10 @@ archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) - archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + archive_cmds_CXX='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) - archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + archive_cmds_CXX='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac fi @@ -15916,7 +16000,7 @@ case $cc_basename in CC*) # SGI C++ - archive_cmds_CXX='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' + archive_cmds_CXX='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' # Archives containing C++ object files must be created using # "CC -ar", where "CC" is the IRIX C++ compiler. This is @@ -15927,9 +16011,9 @@ *) if test "$GXX" = yes; then if test "$with_gnu_ld" = no; then - archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else - archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` -o $lib' + archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` -o $lib' fi fi link_all_deplibs_CXX=yes @@ -15940,7 +16024,7 @@ inherit_rpath_CXX=yes ;; - linux* | k*bsd*-gnu) + linux* | k*bsd*-gnu | kopensolaris*-gnu) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler @@ -15958,7 +16042,7 @@ # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. - output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' + output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' export_dynamic_flag_spec_CXX='${wl}--export-dynamic' @@ -15995,26 +16079,26 @@ pgCC* | pgcpp*) # Portland Group C++ compiler case `$CC -V` in - *pgCC\ [1-5]* | *pgcpp\ [1-5]*) + *pgCC\ [1-5].* | *pgcpp\ [1-5].*) prelink_cmds_CXX='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ - compile_command="$compile_command `find $tpldir -name \*.o | $NL2SP`"' + compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' old_archive_cmds_CXX='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ - $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | $NL2SP`~ + $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ $RANLIB $oldlib' archive_cmds_CXX='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ - $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' + $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' archive_expsym_cmds_CXX='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ - $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' + $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' ;; - *) # Version 6 will use weak symbols + *) # Version 6 and above use weak symbols archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' ;; @@ -16022,7 +16106,7 @@ hardcode_libdir_flag_spec_CXX='${wl}--rpath ${wl}$libdir' export_dynamic_flag_spec_CXX='${wl}--export-dynamic' - whole_archive_flag_spec_CXX='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' + whole_archive_flag_spec_CXX='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' ;; cxx*) # Compaq C++ @@ -16041,9 +16125,9 @@ # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. - output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' + output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed' ;; - xl*) + xl* | mpixl* | bgxl*) # IBM XL 8.0 on PPC, with GNU ld hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' export_dynamic_flag_spec_CXX='${wl}--export-dynamic' @@ -16063,13 +16147,13 @@ archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' archive_expsym_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols' hardcode_libdir_flag_spec_CXX='-R$libdir' - whole_archive_flag_spec_CXX='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' + whole_archive_flag_spec_CXX='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' compiler_needs_object_CXX=yes # Not sure whether something based on # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 # would be better. - output_verbose_link_cmd='echo' + output_verbose_link_cmd='func_echo_all' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is @@ -16138,7 +16222,7 @@ export_dynamic_flag_spec_CXX='${wl}-E' whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' fi - output_verbose_link_cmd=echo + output_verbose_link_cmd=func_echo_all else ld_shlibs_CXX=no fi @@ -16173,15 +16257,15 @@ case $host in osf3*) allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' - archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && $ECHO "X${wl}-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' + archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && func_echo_all "${wl}-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' ;; *) allow_undefined_flag_CXX=' -expect_unresolved \*' - archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' + archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds_CXX='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ echo "-hidden">> $lib.exp~ - $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~ + $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~ $RM $lib.exp' hardcode_libdir_flag_spec_CXX='-rpath $libdir' ;; @@ -16197,17 +16281,17 @@ # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. - output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' + output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test "$GXX" = yes && test "$with_gnu_ld" = no; then allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' case $host in osf3*) - archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' ;; *) - archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + archive_cmds_CXX='$CC -shared $pic_flag -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' ;; esac @@ -16217,7 +16301,7 @@ # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else # FIXME: insert proper C++ library support @@ -16253,7 +16337,7 @@ solaris*) case $cc_basename in - CC*) + CC* | sunCC*) # Sun C++ 4.2, 5.x and Centerline C++ archive_cmds_need_lc_CXX=yes no_undefined_flag_CXX=' -zdefs' @@ -16274,7 +16358,7 @@ esac link_all_deplibs_CXX=yes - output_verbose_link_cmd='echo' + output_verbose_link_cmd='func_echo_all' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is @@ -16294,14 +16378,14 @@ if test "$GXX" = yes && test "$with_gnu_ld" = no; then no_undefined_flag_CXX=' ${wl}-z ${wl}defs' if $CC --version | $GREP -v '^2\.7' > /dev/null; then - archive_cmds_CXX='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' + archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' + $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else # g++ 2.7 appears to require `-G' NOT `-shared' on this # platform. @@ -16312,7 +16396,7 @@ # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. - output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' + output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' fi hardcode_libdir_flag_spec_CXX='${wl}-R $wl$libdir' @@ -16366,6 +16450,10 @@ CC*) archive_cmds_CXX='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + old_archive_cmds_CXX='$CC -Tprelink_objects $oldobjs~ + '"$old_archive_cmds_CXX" + reload_cmds_CXX='$CC -Tprelink_objects $reload_objs~ + '"$reload_cmds_CXX" ;; *) archive_cmds_CXX='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' @@ -16427,6 +16515,13 @@ }; _LT_EOF + +_lt_libdeps_save_CFLAGS=$CFLAGS +case "$CC $CFLAGS " in #( +*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; +*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; +esac + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -16440,7 +16535,7 @@ pre_test_object_deps_done=no for p in `eval "$output_verbose_link_cmd"`; do - case $p in + case ${prev}${p} in -L* | -R* | -l*) # Some compilers place space between "-{L,R}" and the path. @@ -16449,13 +16544,22 @@ test $p = "-R"; then prev=$p continue - else - prev= fi + # Expand the sysroot to ease extracting the directories later. + if test -z "$prev"; then + case $p in + -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; + -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; + -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; + esac + fi + case $p in + =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; + esac if test "$pre_test_object_deps_done" = no; then - case $p in - -L* | -R*) + case ${prev} in + -L | -R) # Internal compiler library paths should come after those # provided the user. The postdeps already come after the # user supplied libs so there is no need to process them. @@ -16475,8 +16579,10 @@ postdeps_CXX="${postdeps_CXX} ${prev}${p}" fi fi + prev= ;; + *.lto.$objext) ;; # Ignore GCC LTO objects *.$objext) # This assumes that the test object file only shows up # once in the compiler output. @@ -16512,6 +16618,7 @@ fi $RM -f confest.$objext +CFLAGS=$_lt_libdeps_save_CFLAGS # PORTME: override above test on systems where it is broken case $host_os in @@ -16547,7 +16654,7 @@ solaris*) case $cc_basename in - CC*) + CC* | sunCC*) # The more standards-conforming stlport4 library is # incompatible with the Cstd library. Avoid specifying # it if it's in CXXFLAGS. Ignore libCrun as @@ -16612,8 +16719,6 @@ lt_prog_compiler_pic_CXX= lt_prog_compiler_static_CXX= -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 -$as_echo_n "checking for $compiler option to produce PIC... " >&6; } # C++ specific cases for pic, static, wl, etc. if test "$GXX" = yes; then @@ -16663,6 +16768,11 @@ # DJGPP does not support shared libraries at all lt_prog_compiler_pic_CXX= ;; + haiku*) + # PIC is the default for Haiku. + # The "-static" flag exists, but is broken. + lt_prog_compiler_static_CXX= + ;; interix[3-9]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. @@ -16712,6 +16822,11 @@ ;; esac ;; + mingw* | cygwin* | os2* | pw32* | cegcc*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + lt_prog_compiler_pic_CXX='-DDLL_EXPORT' + ;; dgux*) case $cc_basename in ec++*) @@ -16768,7 +16883,7 @@ ;; esac ;; - linux* | k*bsd*-gnu) + linux* | k*bsd*-gnu | kopensolaris*-gnu) case $cc_basename in KCC*) # KAI C++ Compiler @@ -16801,8 +16916,8 @@ lt_prog_compiler_pic_CXX= lt_prog_compiler_static_CXX='-non_shared' ;; - xlc* | xlC*) - # IBM XL 8.0 on PPC + xlc* | xlC* | bgxl[cC]* | mpixl[cC]*) + # IBM XL 8.0, 9.0 on PPC and BlueGene lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_pic_CXX='-qpic' lt_prog_compiler_static_CXX='-qstaticlink' @@ -16864,7 +16979,7 @@ ;; solaris*) case $cc_basename in - CC*) + CC* | sunCC*) # Sun C++ 4.2, 5.x and Centerline C++ lt_prog_compiler_pic_CXX='-KPIC' lt_prog_compiler_static_CXX='-Bstatic' @@ -16929,10 +17044,17 @@ lt_prog_compiler_pic_CXX="$lt_prog_compiler_pic_CXX -DPIC" ;; esac -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_prog_compiler_pic_CXX" >&5 -$as_echo "$lt_prog_compiler_pic_CXX" >&6; } - +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 +$as_echo_n "checking for $compiler option to produce PIC... " >&6; } +if ${lt_cv_prog_compiler_pic_CXX+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler_pic_CXX=$lt_prog_compiler_pic_CXX +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_CXX" >&5 +$as_echo "$lt_cv_prog_compiler_pic_CXX" >&6; } +lt_prog_compiler_pic_CXX=$lt_cv_prog_compiler_pic_CXX # # Check to make sure the PIC flag actually works. @@ -16940,7 +17062,7 @@ if test -n "$lt_prog_compiler_pic_CXX"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works" >&5 $as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works... " >&6; } -if test "${lt_cv_prog_compiler_pic_works_CXX+set}" = set; then : +if ${lt_cv_prog_compiler_pic_works_CXX+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_pic_works_CXX=no @@ -16956,15 +17078,15 @@ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:16959: $lt_compile\"" >&5) + (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:16963: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. - $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp + $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_pic_works_CXX=yes @@ -16990,13 +17112,15 @@ + + # # Check to make sure the static flag actually works. # wl=$lt_prog_compiler_wl_CXX eval lt_tmp_static_flag=\"$lt_prog_compiler_static_CXX\" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 $as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } -if test "${lt_cv_prog_compiler_static_works_CXX+set}" = set; then : +if ${lt_cv_prog_compiler_static_works_CXX+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_static_works_CXX=no @@ -17009,7 +17133,7 @@ if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&5 - $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp + $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_static_works_CXX=yes @@ -17036,7 +17160,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } -if test "${lt_cv_prog_compiler_c_o_CXX+set}" = set; then : +if ${lt_cv_prog_compiler_c_o_CXX+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o_CXX=no @@ -17055,16 +17179,16 @@ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:17058: $lt_compile\"" >&5) + (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:17062: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings - $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp + $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o_CXX=yes @@ -17088,7 +17212,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } -if test "${lt_cv_prog_compiler_c_o_CXX+set}" = set; then : +if ${lt_cv_prog_compiler_c_o_CXX+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o_CXX=no @@ -17107,16 +17231,16 @@ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:17110: $lt_compile\"" >&5) + (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:17114: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings - $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp + $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o_CXX=yes @@ -17167,27 +17291,35 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + exclude_expsyms_CXX='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' case $host_os in aix[4-9]*) # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm + # Also, AIX nm treats weak defined symbols like other global defined + # symbols, whereas GNU nm marks them as "W". if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then - export_symbols_cmds_CXX='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' + export_symbols_cmds_CXX='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' else export_symbols_cmds_CXX='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' fi ;; pw32*) export_symbols_cmds_CXX="$ltdll_cmds" - ;; + ;; cygwin* | mingw* | cegcc*) - export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;/^.*[ ]__nm__/s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols' - ;; + case $cc_basename in + cl*) ;; + *) + export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols' + exclude_expsyms_CXX='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname' + ;; + esac + ;; *) export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - ;; + ;; esac - exclude_expsyms_CXX='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_CXX" >&5 $as_echo "$ld_shlibs_CXX" >&6; } @@ -17219,44 +17351,50 @@ # to ld, don't add -lc before -lgcc. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5 $as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } - $RM conftest* - echo "$lt_simple_compile_test_code" > conftest.$ac_ext +if ${lt_cv_archive_cmds_need_lc_CXX+:} false; then : + $as_echo_n "(cached) " >&6 +else + $RM conftest* + echo "$lt_simple_compile_test_code" > conftest.$ac_ext - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } 2>conftest.err; then - soname=conftest - lib=conftest - libobjs=conftest.$ac_objext - deplibs= - wl=$lt_prog_compiler_wl_CXX - pic_flag=$lt_prog_compiler_pic_CXX - compiler_flags=-v - linker_flags=-v - verstring= - output_objdir=. - libname=conftest - lt_save_allow_undefined_flag=$allow_undefined_flag_CXX - allow_undefined_flag_CXX= - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds_CXX 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5 + soname=conftest + lib=conftest + libobjs=conftest.$ac_objext + deplibs= + wl=$lt_prog_compiler_wl_CXX + pic_flag=$lt_prog_compiler_pic_CXX + compiler_flags=-v + linker_flags=-v + verstring= + output_objdir=. + libname=conftest + lt_save_allow_undefined_flag=$allow_undefined_flag_CXX + allow_undefined_flag_CXX= + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds_CXX 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5 (eval $archive_cmds_CXX 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } - then - archive_cmds_need_lc_CXX=no - else - archive_cmds_need_lc_CXX=yes - fi - allow_undefined_flag_CXX=$lt_save_allow_undefined_flag - else - cat conftest.err 1>&5 - fi - $RM conftest* - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $archive_cmds_need_lc_CXX" >&5 -$as_echo "$archive_cmds_need_lc_CXX" >&6; } + then + lt_cv_archive_cmds_need_lc_CXX=no + else + lt_cv_archive_cmds_need_lc_CXX=yes + fi + allow_undefined_flag_CXX=$lt_save_allow_undefined_flag + else + cat conftest.err 1>&5 + fi + $RM conftest* + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc_CXX" >&5 +$as_echo "$lt_cv_archive_cmds_need_lc_CXX" >&6; } + archive_cmds_need_lc_CXX=$lt_cv_archive_cmds_need_lc_CXX ;; esac fi @@ -17413,7 +17551,7 @@ m68k) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. - finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$ECHO "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' + finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; esac ;; @@ -17444,8 +17582,9 @@ need_version=no need_lib_prefix=no - case $GCC,$host_os in - yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*) + case $GCC,$cc_basename in + yes,*) + # gcc library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ @@ -17466,36 +17605,82 @@ cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" + ;; mingw* | cegcc*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` - if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then - # It is most probably a Windows format PATH printed by - # mingw gcc, but we are running on Cygwin. Gcc prints its search - # path with ; separators, and with drive letters. We can handle the - # drive letters (cygwin fileutils understands them), so leave them, - # especially as we might pass files found there to a mingw objdump, - # which wouldn't understand a cygwinified path. Ahh. - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` - else - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` - fi ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; esac + dynamic_linker='Win32 ld.exe' + ;; + + *,cl*) + # Native MSVC + libname_spec='$name' + soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + library_names_spec='${libname}.dll.lib' + + case $build_os in + mingw*) + sys_lib_search_path_spec= + lt_save_ifs=$IFS + IFS=';' + for lt_path in $LIB + do + IFS=$lt_save_ifs + # Let DOS variable expansion print the short 8.3 style file name. + lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` + sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" + done + IFS=$lt_save_ifs + # Convert to MSYS style. + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'` + ;; + cygwin*) + # Convert to unix form, then to dos form, then back to unix form + # but this time dos style (no spaces!) so that the unix form looks + # like /cygdrive/c/PROGRA~1:/cygdr... + sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` + sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` + sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + ;; + *) + sys_lib_search_path_spec="$LIB" + if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then + # It is most probably a Windows format PATH. + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` + else + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + fi + # FIXME: find the short name or the path components, as spaces are + # common. (e.g. "Program Files" -> "PROGRA~1") + ;; + esac + + # DLL is installed to $(libdir)/../bin by postinstall_cmds + postinstall_cmds='base_file=`basename \${file}`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ + dldir=$destdir/`dirname \$dlpath`~ + test -d \$dldir || mkdir -p \$dldir~ + $install_prog $dir/$dlname \$dldir/$dlname' + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ + dlpath=$dir/\$dldll~ + $RM \$dlpath' + shlibpath_overrides_runpath=yes + dynamic_linker='Win32 link.exe' ;; *) + # Assume MSVC wrapper library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' + dynamic_linker='Win32 ld.exe' ;; esac - dynamic_linker='Win32 ld.exe' # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; @@ -17581,6 +17766,19 @@ hardcode_into_libs=yes ;; +haiku*) + version_type=linux + need_lib_prefix=no + need_version=no + dynamic_linker="$host_os runtime_loader" + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LIBRARY_PATH + shlibpath_overrides_runpath=yes + sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' + hardcode_into_libs=yes + ;; + hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. @@ -17623,8 +17821,10 @@ soname_spec='${libname}${release}${shared_ext}$major' ;; esac - # HP-UX runs *really* slowly unless shared libraries are mode 555. + # HP-UX runs *really* slowly unless shared libraries are mode 555, ... postinstall_cmds='chmod 555 $lib' + # or fails outright, so override atomically: + install_override_mode=555 ;; interix[3-9]*) @@ -17682,7 +17882,7 @@ ;; # This must be Linux ELF. -linux* | k*bsd*-gnu) +linux* | k*bsd*-gnu | kopensolaris*-gnu) version_type=linux need_lib_prefix=no need_version=no @@ -17691,12 +17891,17 @@ finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no + # Some binutils ld are patched to set DT_RUNPATH - save_LDFLAGS=$LDFLAGS - save_libdir=$libdir - eval "libdir=/foo; wl=\"$lt_prog_compiler_wl_CXX\"; \ - LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec_CXX\"" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + if ${lt_cv_shlibpath_overrides_runpath+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_shlibpath_overrides_runpath=no + save_LDFLAGS=$LDFLAGS + save_libdir=$libdir + eval "libdir=/foo; wl=\"$lt_prog_compiler_wl_CXX\"; \ + LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec_CXX\"" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -17709,13 +17914,17 @@ _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then : - shlibpath_overrides_runpath=yes + lt_cv_shlibpath_overrides_runpath=yes fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext - LDFLAGS=$save_LDFLAGS - libdir=$save_libdir + LDFLAGS=$save_LDFLAGS + libdir=$save_libdir + +fi + + shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install @@ -17724,7 +17933,7 @@ # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then - lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` + lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi @@ -17976,6 +18185,8 @@ + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5 $as_echo_n "checking how to hardcode library paths into programs... " >&6; } hardcode_action_CXX= @@ -18023,6 +18234,7 @@ fi # test -n "$compiler" CC=$lt_save_CC + CFLAGS=$lt_save_CFLAGS LDCXX=$LD LD=$lt_save_LD GCC=$lt_save_GCC @@ -18046,6 +18258,9 @@ ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_f77_compiler_gnu +if test -z "$F77" || test "X$F77" = "Xno"; then + _lt_disable_F77=yes +fi archive_cmds_need_lc_F77=no allow_undefined_flag_F77= @@ -18064,6 +18279,8 @@ module_expsym_cmds_F77= link_all_deplibs_F77=unknown old_archive_cmds_F77=$old_archive_cmds +reload_flag_F77=$reload_flag +reload_cmds_F77=$reload_cmds no_undefined_flag_F77= whole_archive_flag_spec_F77= enable_shared_with_static_runtimes_F77=no @@ -18127,7 +18344,9 @@ # Allow CC to be a program name with arguments. lt_save_CC="$CC" lt_save_GCC=$GCC + lt_save_CFLAGS=$CFLAGS CC=${F77-"f77"} + CFLAGS=$FFLAGS compiler=$CC compiler_F77=$CC for cc_temp in $compiler""; do @@ -18138,7 +18357,7 @@ *) break;; esac done -cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` +cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` GCC=$G77 if test -n "$compiler"; then @@ -18188,8 +18407,6 @@ lt_prog_compiler_pic_F77= lt_prog_compiler_static_F77= -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 -$as_echo_n "checking for $compiler option to produce PIC... " >&6; } if test "$GCC" = yes; then lt_prog_compiler_wl_F77='-Wl,' @@ -18237,6 +18454,12 @@ lt_prog_compiler_pic_F77='-fno-common' ;; + haiku*) + # PIC is the default for Haiku. + # The "-static" flag exists, but is broken. + lt_prog_compiler_static_F77= + ;; + hpux*) # PIC is the default for 64-bit PA HP-UX, but not for 32-bit # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag @@ -18279,6 +18502,13 @@ lt_prog_compiler_pic_F77='-fPIC' ;; esac + + case $cc_basename in + nvcc*) # Cuda Compiler Driver 2.2 + lt_prog_compiler_wl_F77='-Xlinker ' + lt_prog_compiler_pic_F77='-Xcompiler -fPIC' + ;; + esac else # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in @@ -18320,7 +18550,7 @@ lt_prog_compiler_static_F77='-non_shared' ;; - linux* | k*bsd*-gnu) + linux* | k*bsd*-gnu | kopensolaris*-gnu) case $cc_basename in # old Intel for x86_64 which still supported -KPIC. ecc*) @@ -18341,7 +18571,13 @@ lt_prog_compiler_pic_F77='--shared' lt_prog_compiler_static_F77='--static' ;; - pgcc* | pgf77* | pgf90* | pgf95*) + nagfor*) + # NAG Fortran compiler + lt_prog_compiler_wl_F77='-Wl,-Wl,,' + lt_prog_compiler_pic_F77='-PIC' + lt_prog_compiler_static_F77='-Bstatic' + ;; + pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) lt_prog_compiler_wl_F77='-Wl,' @@ -18353,25 +18589,25 @@ # All Alpha code is PIC. lt_prog_compiler_static_F77='-non_shared' ;; - xl*) - # IBM XL C 8.0/Fortran 10.1 on PPC + xl* | bgxl* | bgf* | mpixl*) + # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene lt_prog_compiler_wl_F77='-Wl,' lt_prog_compiler_pic_F77='-qpic' lt_prog_compiler_static_F77='-qstaticlink' ;; *) case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) - # Sun C 5.9 + *Sun\ F* | *Sun*Fortran*) + # Sun Fortran 8.3 passes all unrecognized flags to the linker lt_prog_compiler_pic_F77='-KPIC' lt_prog_compiler_static_F77='-Bstatic' - lt_prog_compiler_wl_F77='-Wl,' + lt_prog_compiler_wl_F77='' ;; - *Sun\ F*) - # Sun Fortran 8.3 passes all unrecognized flags to the linker + *Sun\ C*) + # Sun C 5.9 lt_prog_compiler_pic_F77='-KPIC' lt_prog_compiler_static_F77='-Bstatic' - lt_prog_compiler_wl_F77='' + lt_prog_compiler_wl_F77='-Wl,' ;; esac ;; @@ -18403,7 +18639,7 @@ lt_prog_compiler_pic_F77='-KPIC' lt_prog_compiler_static_F77='-Bstatic' case $cc_basename in - f77* | f90* | f95*) + f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) lt_prog_compiler_wl_F77='-Qoption ld ';; *) lt_prog_compiler_wl_F77='-Wl,';; @@ -18460,10 +18696,17 @@ lt_prog_compiler_pic_F77="$lt_prog_compiler_pic_F77" ;; esac -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_prog_compiler_pic_F77" >&5 -$as_echo "$lt_prog_compiler_pic_F77" >&6; } - +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 +$as_echo_n "checking for $compiler option to produce PIC... " >&6; } +if ${lt_cv_prog_compiler_pic_F77+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler_pic_F77=$lt_prog_compiler_pic_F77 +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_F77" >&5 +$as_echo "$lt_cv_prog_compiler_pic_F77" >&6; } +lt_prog_compiler_pic_F77=$lt_cv_prog_compiler_pic_F77 # # Check to make sure the PIC flag actually works. @@ -18471,7 +18714,7 @@ if test -n "$lt_prog_compiler_pic_F77"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic_F77 works" >&5 $as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic_F77 works... " >&6; } -if test "${lt_cv_prog_compiler_pic_works_F77+set}" = set; then : +if ${lt_cv_prog_compiler_pic_works_F77+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_pic_works_F77=no @@ -18487,15 +18730,15 @@ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:18490: $lt_compile\"" >&5) + (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:18494: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. - $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp + $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_pic_works_F77=yes @@ -18521,13 +18764,15 @@ + + # # Check to make sure the static flag actually works. # wl=$lt_prog_compiler_wl_F77 eval lt_tmp_static_flag=\"$lt_prog_compiler_static_F77\" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 $as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } -if test "${lt_cv_prog_compiler_static_works_F77+set}" = set; then : +if ${lt_cv_prog_compiler_static_works_F77+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_static_works_F77=no @@ -18540,7 +18785,7 @@ if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&5 - $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp + $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_static_works_F77=yes @@ -18567,7 +18812,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } -if test "${lt_cv_prog_compiler_c_o_F77+set}" = set; then : +if ${lt_cv_prog_compiler_c_o_F77+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o_F77=no @@ -18586,16 +18831,16 @@ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:18589: $lt_compile\"" >&5) + (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:18593: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings - $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp + $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o_F77=yes @@ -18619,7 +18864,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } -if test "${lt_cv_prog_compiler_c_o_F77+set}" = set; then : +if ${lt_cv_prog_compiler_c_o_F77+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o_F77=no @@ -18638,16 +18883,16 @@ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:18641: $lt_compile\"" >&5) + (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:18645: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings - $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp + $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o_F77=yes @@ -18757,7 +19002,33 @@ esac ld_shlibs_F77=yes + + # On some targets, GNU ld is compatible enough with the native linker + # that we're better off using the native interface for both. + lt_use_gnu_ld_interface=no if test "$with_gnu_ld" = yes; then + case $host_os in + aix*) + # The AIX port of GNU ld has always aspired to compatibility + # with the native linker. However, as the warning in the GNU ld + # block says, versions before 2.19.5* couldn't really create working + # shared libraries, regardless of the interface used. + case `$LD -v 2>&1` in + *\ \(GNU\ Binutils\)\ 2.19.5*) ;; + *\ \(GNU\ Binutils\)\ 2.[2-9]*) ;; + *\ \(GNU\ Binutils\)\ [3-9]*) ;; + *) + lt_use_gnu_ld_interface=yes + ;; + esac + ;; + *) + lt_use_gnu_ld_interface=yes + ;; + esac + fi + + if test "$lt_use_gnu_ld_interface" = yes; then # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='${wl}' @@ -18775,6 +19046,7 @@ fi supports_anon_versioning=no case `$LD -v 2>&1` in + *GNU\ gold*) supports_anon_versioning=yes ;; *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... @@ -18790,11 +19062,12 @@ ld_shlibs_F77=no cat <<_LT_EOF 1>&2 -*** Warning: the GNU linker, at least up to release 2.9.1, is reported +*** Warning: the GNU linker, at least up to release 2.19, is reported *** to be unable to reliably create shared libraries on AIX. *** Therefore, libtool is disabling shared libraries support. If you -*** really care for shared libraries, you may want to modify your PATH -*** so that a non-GNU linker is found, and then restart. +*** really care for shared libraries, you may want to install binutils +*** 2.20 or above, or modify your PATH so that a non-GNU linker is found. +*** You will then need to restart the configuration process. _LT_EOF fi @@ -18830,10 +19103,12 @@ # _LT_TAGVAR(hardcode_libdir_flag_spec, F77) is actually meaningless, # as there is no search path for DLLs. hardcode_libdir_flag_spec_F77='-L$libdir' + export_dynamic_flag_spec_F77='${wl}--export-all-symbols' allow_undefined_flag_F77=unsupported always_export_symbols_F77=no enable_shared_with_static_runtimes_F77=yes - export_symbols_cmds_F77='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' + export_symbols_cmds_F77='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols' + exclude_expsyms_F77='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname' if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' @@ -18851,6 +19126,11 @@ fi ;; + haiku*) + archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + link_all_deplibs_F77=yes + ;; + interix[3-9]*) hardcode_direct_F77=no hardcode_shlibpath_var_F77=no @@ -18866,7 +19146,7 @@ archive_expsym_cmds_F77='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; - gnu* | linux* | tpf* | k*bsd*-gnu) + gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) tmp_diet=no if test "$host_os" = linux-dietlibc; then case $cc_basename in @@ -18876,15 +19156,16 @@ if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ && test "$tmp_diet" = no then - tmp_addflag= + tmp_addflag=' $pic_flag' tmp_sharedflag='-shared' case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler - whole_archive_flag_spec_F77='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' + whole_archive_flag_spec_F77='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag' ;; - pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers - whole_archive_flag_spec_F77='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' + pgf77* | pgf90* | pgf95* | pgfortran*) + # Portland Group f77 and f90 compilers + whole_archive_flag_spec_F77='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag -Mnomain' ;; ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 tmp_addflag=' -i_dynamic' ;; @@ -18895,13 +19176,17 @@ lf95*) # Lahey Fortran 8.1 whole_archive_flag_spec_F77= tmp_sharedflag='--shared' ;; - xl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below) + xl[cC]* | bgxl[cC]* | mpixl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below) tmp_sharedflag='-qmkshrobj' tmp_addflag= ;; + nvcc*) # Cuda Compiler Driver 2.2 + whole_archive_flag_spec_F77='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' + compiler_needs_object_F77=yes + ;; esac case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 - whole_archive_flag_spec_F77='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' + whole_archive_flag_spec_F77='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' compiler_needs_object_F77=yes tmp_sharedflag='-G' ;; *Sun\ F*) # Sun Fortran 8.3 @@ -18917,17 +19202,17 @@ fi case $cc_basename in - xlf*) + xlf* | bgf* | bgxlf* | mpixlf*) # IBM XL Fortran 10.1 on PPC cannot create shared libs itself whole_archive_flag_spec_F77='--whole-archive$convenience --no-whole-archive' hardcode_libdir_flag_spec_F77= hardcode_libdir_flag_spec_ld_F77='-rpath $libdir' - archive_cmds_F77='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib' + archive_cmds_F77='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' if test "x$supports_anon_versioning" = xyes; then archive_expsym_cmds_F77='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ - $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' + $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' fi ;; esac @@ -18941,8 +19226,8 @@ archive_cmds_F77='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else - archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + archive_cmds_F77='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_F77='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' fi ;; @@ -18960,8 +19245,8 @@ _LT_EOF elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + archive_cmds_F77='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_F77='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs_F77=no fi @@ -19007,8 +19292,8 @@ *) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + archive_cmds_F77='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_F77='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs_F77=no fi @@ -19048,8 +19333,10 @@ else # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm + # Also, AIX nm treats weak defined symbols like other global + # defined symbols, whereas GNU nm marks them as "W". if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then - export_symbols_cmds_F77='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' + export_symbols_cmds_F77='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' else export_symbols_cmds_F77='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' fi @@ -19136,32 +19423,45 @@ allow_undefined_flag_F77='-berok' # Determine the default libpath from the value encoded in an # empty executable. - cat > conftest.$ac_ext <<_ACEOF + if test "${lt_cv_aix_libpath+set}" = set; then + aix_libpath=$lt_cv_aix_libpath +else + if ${lt_cv_aix_libpath__F77+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat > conftest.$ac_ext <<_ACEOF program main end _ACEOF if ac_fn_f77_try_link "$LINENO"; then : -lt_aix_libpath_sed=' - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\(.*\)$/\1/ - p - } - }' -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -# Check for a 64-bit object if we didn't find anything. -if test -z "$aix_libpath"; then - aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -fi + lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\([^ ]*\) *$/\1/ + p + } + }' + lt_cv_aix_libpath__F77=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + # Check for a 64-bit object if we didn't find anything. + if test -z "$lt_cv_aix_libpath__F77"; then + lt_cv_aix_libpath__F77=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext -if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + if test -z "$lt_cv_aix_libpath__F77"; then + lt_cv_aix_libpath__F77="/usr/lib:/lib" + fi + +fi + + aix_libpath=$lt_cv_aix_libpath__F77 +fi hardcode_libdir_flag_spec_F77='${wl}-blibpath:$libdir:'"$aix_libpath" - archive_expsym_cmds_F77='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" + archive_expsym_cmds_F77='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then hardcode_libdir_flag_spec_F77='${wl}-R $libdir:/usr/lib:/lib' @@ -19170,37 +19470,55 @@ else # Determine the default libpath from the value encoded in an # empty executable. - cat > conftest.$ac_ext <<_ACEOF + if test "${lt_cv_aix_libpath+set}" = set; then + aix_libpath=$lt_cv_aix_libpath +else + if ${lt_cv_aix_libpath__F77+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat > conftest.$ac_ext <<_ACEOF program main end _ACEOF if ac_fn_f77_try_link "$LINENO"; then : -lt_aix_libpath_sed=' - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\(.*\)$/\1/ - p - } - }' -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -# Check for a 64-bit object if we didn't find anything. -if test -z "$aix_libpath"; then - aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -fi + lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\([^ ]*\) *$/\1/ + p + } + }' + lt_cv_aix_libpath__F77=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + # Check for a 64-bit object if we didn't find anything. + if test -z "$lt_cv_aix_libpath__F77"; then + lt_cv_aix_libpath__F77=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext -if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + if test -z "$lt_cv_aix_libpath__F77"; then + lt_cv_aix_libpath__F77="/usr/lib:/lib" + fi + +fi + + aix_libpath=$lt_cv_aix_libpath__F77 +fi hardcode_libdir_flag_spec_F77='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. no_undefined_flag_F77=' ${wl}-bernotok' allow_undefined_flag_F77=' ${wl}-berok' - # Exported symbols can be pulled into shared objects from archives - whole_archive_flag_spec_F77='$convenience' + if test "$with_gnu_ld" = yes; then + # We only use this code for GNU lds that support --whole-archive. + whole_archive_flag_spec_F77='${wl}--whole-archive$convenience ${wl}--no-whole-archive' + else + # Exported symbols can be pulled into shared objects from archives + whole_archive_flag_spec_F77='$convenience' + fi archive_cmds_need_lc_F77=yes # This is similar to how AIX traditionally builds its shared libraries. archive_expsym_cmds_F77="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' @@ -19232,20 +19550,63 @@ # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. - hardcode_libdir_flag_spec_F77=' ' - allow_undefined_flag_F77=unsupported - # Tell ltmain to make .lib files, not .a files. - libext=lib - # Tell ltmain to make .dll files, not .so files. - shrext_cmds=".dll" - # FIXME: Setting linknames here is a bad hack. - archive_cmds_F77='$CC -o $lib $libobjs $compiler_flags `$ECHO "X$deplibs" | $Xsed -e '\''s/ -lc$//'\''` -link -dll~linknames=' - # The linker will automatically build a .lib file if we build a DLL. - old_archive_from_new_cmds_F77='true' - # FIXME: Should let the user specify the lib program. - old_archive_cmds_F77='lib -OUT:$oldlib$oldobjs$old_deplibs' - fix_srcfile_path_F77='`cygpath -w "$srcfile"`' - enable_shared_with_static_runtimes_F77=yes + case $cc_basename in + cl*) + # Native MSVC + hardcode_libdir_flag_spec_F77=' ' + allow_undefined_flag_F77=unsupported + always_export_symbols_F77=yes + file_list_spec_F77='@' + # Tell ltmain to make .lib files, not .a files. + libext=lib + # Tell ltmain to make .dll files, not .so files. + shrext_cmds=".dll" + # FIXME: Setting linknames here is a bad hack. + archive_cmds_F77='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' + archive_expsym_cmds_F77='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; + else + sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; + fi~ + $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ + linknames=' + # The linker will not automatically build a static lib if we build a DLL. + # _LT_TAGVAR(old_archive_from_new_cmds, F77)='true' + enable_shared_with_static_runtimes_F77=yes + export_symbols_cmds_F77='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' + # Don't use ranlib + old_postinstall_cmds_F77='chmod 644 $oldlib' + postlink_cmds_F77='lt_outputfile="@OUTPUT@"~ + lt_tool_outputfile="@TOOL_OUTPUT@"~ + case $lt_outputfile in + *.exe|*.EXE) ;; + *) + lt_outputfile="$lt_outputfile.exe" + lt_tool_outputfile="$lt_tool_outputfile.exe" + ;; + esac~ + if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then + $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; + $RM "$lt_outputfile.manifest"; + fi' + ;; + *) + # Assume MSVC wrapper + hardcode_libdir_flag_spec_F77=' ' + allow_undefined_flag_F77=unsupported + # Tell ltmain to make .lib files, not .a files. + libext=lib + # Tell ltmain to make .dll files, not .so files. + shrext_cmds=".dll" + # FIXME: Setting linknames here is a bad hack. + archive_cmds_F77='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' + # The linker will automatically build a .lib file if we build a DLL. + old_archive_from_new_cmds_F77='true' + # FIXME: Should let the user specify the lib program. + old_archive_cmds_F77='lib -OUT:$oldlib$oldobjs$old_deplibs' + enable_shared_with_static_runtimes_F77=yes + ;; + esac ;; darwin* | rhapsody*) @@ -19255,7 +19616,11 @@ hardcode_direct_F77=no hardcode_automatic_F77=yes hardcode_shlibpath_var_F77=unsupported - whole_archive_flag_spec_F77='' + if test "$lt_cv_ld_force_load" = "yes"; then + whole_archive_flag_spec_F77='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' + else + whole_archive_flag_spec_F77='' + fi link_all_deplibs_F77=yes allow_undefined_flag_F77="$_lt_dar_allow_undefined" case $cc_basename in @@ -19263,7 +19628,7 @@ *) _lt_dar_can_shared=$GCC ;; esac if test "$_lt_dar_can_shared" = "yes"; then - output_verbose_link_cmd=echo + output_verbose_link_cmd=func_echo_all archive_cmds_F77="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" module_cmds_F77="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" archive_expsym_cmds_F77="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" @@ -19306,7 +19671,7 @@ # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | dragonfly*) - archive_cmds_F77='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' + archive_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec_F77='-R$libdir' hardcode_direct_F77=yes hardcode_shlibpath_var_F77=no @@ -19314,7 +19679,7 @@ hpux9*) if test "$GCC" = yes; then - archive_cmds_F77='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + archive_cmds_F77='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else archive_cmds_F77='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' fi @@ -19329,8 +19694,8 @@ ;; hpux10*) - if test "$GCC" = yes -a "$with_gnu_ld" = no; then - archive_cmds_F77='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + if test "$GCC" = yes && test "$with_gnu_ld" = no; then + archive_cmds_F77='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds_F77='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi @@ -19348,16 +19713,16 @@ ;; hpux11*) - if test "$GCC" = yes -a "$with_gnu_ld" = no; then + if test "$GCC" = yes && test "$with_gnu_ld" = no; then case $host_cpu in hppa*64*) archive_cmds_F77='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) - archive_cmds_F77='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + archive_cmds_F77='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) - archive_cmds_F77='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + archive_cmds_F77='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else @@ -19369,7 +19734,7 @@ archive_cmds_F77='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) - archive_cmds_F77='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + archive_cmds_F77='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac fi @@ -19397,25 +19762,40 @@ irix5* | irix6* | nonstopux*) if test "$GCC" = yes; then - archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + archive_cmds_F77='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' # Try to use the -exported_symbol ld option, if it does not # work, assume that -exports_file does not work either and # implicitly export all symbols. - save_LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" - cat > conftest.$ac_ext <<_ACEOF -int foo(void) {} + # This should be the same for all languages, so no per-tag cache variable. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5 +$as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; } +if ${lt_cv_irix_exported_symbol+:} false; then : + $as_echo_n "(cached) " >&6 +else + save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" + cat > conftest.$ac_ext <<_ACEOF + + subroutine foo + end _ACEOF if ac_fn_f77_try_link "$LINENO"; then : - archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' - + lt_cv_irix_exported_symbol=yes +else + lt_cv_irix_exported_symbol=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext - LDFLAGS="$save_LDFLAGS" + LDFLAGS="$save_LDFLAGS" +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5 +$as_echo "$lt_cv_irix_exported_symbol" >&6; } + if test "$lt_cv_irix_exported_symbol" = yes; then + archive_expsym_cmds_F77='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' + fi else - archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' - archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' + archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' + archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' fi archive_cmds_need_lc_F77='no' hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' @@ -19477,17 +19857,17 @@ hardcode_libdir_flag_spec_F77='-L$libdir' hardcode_minus_L_F77=yes allow_undefined_flag_F77=unsupported - archive_cmds_F77='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$ECHO DATA >> $output_objdir/$libname.def~$ECHO " SINGLE NONSHARED" >> $output_objdir/$libname.def~$ECHO EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' + archive_cmds_F77='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' old_archive_from_new_cmds_F77='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' ;; osf3*) if test "$GCC" = yes; then allow_undefined_flag_F77=' ${wl}-expect_unresolved ${wl}\*' - archive_cmds_F77='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + archive_cmds_F77='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else allow_undefined_flag_F77=' -expect_unresolved \*' - archive_cmds_F77='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' + archive_cmds_F77='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' fi archive_cmds_need_lc_F77='no' hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' @@ -19497,13 +19877,13 @@ osf4* | osf5*) # as osf3* with the addition of -msym flag if test "$GCC" = yes; then allow_undefined_flag_F77=' ${wl}-expect_unresolved ${wl}\*' - archive_cmds_F77='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + archive_cmds_F77='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' else allow_undefined_flag_F77=' -expect_unresolved \*' - archive_cmds_F77='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' + archive_cmds_F77='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds_F77='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ - $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' + $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' # Both c and cxx compiler support -rpath directly hardcode_libdir_flag_spec_F77='-rpath $libdir' @@ -19516,9 +19896,9 @@ no_undefined_flag_F77=' -z defs' if test "$GCC" = yes; then wlarc='${wl}' - archive_cmds_F77='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_cmds_F77='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_F77='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' + $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' else case `$CC -V 2>&1` in *"Compilers 5.0"*) @@ -19697,44 +20077,50 @@ # to ld, don't add -lc before -lgcc. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5 $as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } - $RM conftest* - echo "$lt_simple_compile_test_code" > conftest.$ac_ext +if ${lt_cv_archive_cmds_need_lc_F77+:} false; then : + $as_echo_n "(cached) " >&6 +else + $RM conftest* + echo "$lt_simple_compile_test_code" > conftest.$ac_ext - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } 2>conftest.err; then - soname=conftest - lib=conftest - libobjs=conftest.$ac_objext - deplibs= - wl=$lt_prog_compiler_wl_F77 - pic_flag=$lt_prog_compiler_pic_F77 - compiler_flags=-v - linker_flags=-v - verstring= - output_objdir=. - libname=conftest - lt_save_allow_undefined_flag=$allow_undefined_flag_F77 - allow_undefined_flag_F77= - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds_F77 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5 + soname=conftest + lib=conftest + libobjs=conftest.$ac_objext + deplibs= + wl=$lt_prog_compiler_wl_F77 + pic_flag=$lt_prog_compiler_pic_F77 + compiler_flags=-v + linker_flags=-v + verstring= + output_objdir=. + libname=conftest + lt_save_allow_undefined_flag=$allow_undefined_flag_F77 + allow_undefined_flag_F77= + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds_F77 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5 (eval $archive_cmds_F77 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } - then - archive_cmds_need_lc_F77=no - else - archive_cmds_need_lc_F77=yes - fi - allow_undefined_flag_F77=$lt_save_allow_undefined_flag - else - cat conftest.err 1>&5 - fi - $RM conftest* - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $archive_cmds_need_lc_F77" >&5 -$as_echo "$archive_cmds_need_lc_F77" >&6; } + then + lt_cv_archive_cmds_need_lc_F77=no + else + lt_cv_archive_cmds_need_lc_F77=yes + fi + allow_undefined_flag_F77=$lt_save_allow_undefined_flag + else + cat conftest.err 1>&5 + fi + $RM conftest* + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc_F77" >&5 +$as_echo "$lt_cv_archive_cmds_need_lc_F77" >&6; } + archive_cmds_need_lc_F77=$lt_cv_archive_cmds_need_lc_F77 ;; esac fi @@ -19891,7 +20277,7 @@ m68k) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. - finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$ECHO "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' + finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; esac ;; @@ -19922,8 +20308,9 @@ need_version=no need_lib_prefix=no - case $GCC,$host_os in - yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*) + case $GCC,$cc_basename in + yes,*) + # gcc library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ @@ -19944,36 +20331,82 @@ cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" + ;; mingw* | cegcc*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` - if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then - # It is most probably a Windows format PATH printed by - # mingw gcc, but we are running on Cygwin. Gcc prints its search - # path with ; separators, and with drive letters. We can handle the - # drive letters (cygwin fileutils understands them), so leave them, - # especially as we might pass files found there to a mingw objdump, - # which wouldn't understand a cygwinified path. Ahh. - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` - else - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` - fi ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; esac + dynamic_linker='Win32 ld.exe' + ;; + + *,cl*) + # Native MSVC + libname_spec='$name' + soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + library_names_spec='${libname}.dll.lib' + + case $build_os in + mingw*) + sys_lib_search_path_spec= + lt_save_ifs=$IFS + IFS=';' + for lt_path in $LIB + do + IFS=$lt_save_ifs + # Let DOS variable expansion print the short 8.3 style file name. + lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` + sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" + done + IFS=$lt_save_ifs + # Convert to MSYS style. + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'` + ;; + cygwin*) + # Convert to unix form, then to dos form, then back to unix form + # but this time dos style (no spaces!) so that the unix form looks + # like /cygdrive/c/PROGRA~1:/cygdr... + sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` + sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` + sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + ;; + *) + sys_lib_search_path_spec="$LIB" + if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then + # It is most probably a Windows format PATH. + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` + else + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + fi + # FIXME: find the short name or the path components, as spaces are + # common. (e.g. "Program Files" -> "PROGRA~1") + ;; + esac + + # DLL is installed to $(libdir)/../bin by postinstall_cmds + postinstall_cmds='base_file=`basename \${file}`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ + dldir=$destdir/`dirname \$dlpath`~ + test -d \$dldir || mkdir -p \$dldir~ + $install_prog $dir/$dlname \$dldir/$dlname' + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ + dlpath=$dir/\$dldll~ + $RM \$dlpath' + shlibpath_overrides_runpath=yes + dynamic_linker='Win32 link.exe' ;; *) + # Assume MSVC wrapper library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' + dynamic_linker='Win32 ld.exe' ;; esac - dynamic_linker='Win32 ld.exe' # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; @@ -20059,6 +20492,19 @@ hardcode_into_libs=yes ;; +haiku*) + version_type=linux + need_lib_prefix=no + need_version=no + dynamic_linker="$host_os runtime_loader" + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LIBRARY_PATH + shlibpath_overrides_runpath=yes + sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' + hardcode_into_libs=yes + ;; + hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. @@ -20101,8 +20547,10 @@ soname_spec='${libname}${release}${shared_ext}$major' ;; esac - # HP-UX runs *really* slowly unless shared libraries are mode 555. + # HP-UX runs *really* slowly unless shared libraries are mode 555, ... postinstall_cmds='chmod 555 $lib' + # or fails outright, so override atomically: + install_override_mode=555 ;; interix[3-9]*) @@ -20160,7 +20608,7 @@ ;; # This must be Linux ELF. -linux* | k*bsd*-gnu) +linux* | k*bsd*-gnu | kopensolaris*-gnu) version_type=linux need_lib_prefix=no need_version=no @@ -20169,25 +20617,34 @@ finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no + # Some binutils ld are patched to set DT_RUNPATH - save_LDFLAGS=$LDFLAGS - save_libdir=$libdir - eval "libdir=/foo; wl=\"$lt_prog_compiler_wl_F77\"; \ - LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec_F77\"" - cat > conftest.$ac_ext <<_ACEOF + if ${lt_cv_shlibpath_overrides_runpath+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_shlibpath_overrides_runpath=no + save_LDFLAGS=$LDFLAGS + save_libdir=$libdir + eval "libdir=/foo; wl=\"$lt_prog_compiler_wl_F77\"; \ + LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec_F77\"" + cat > conftest.$ac_ext <<_ACEOF program main end _ACEOF if ac_fn_f77_try_link "$LINENO"; then : if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then : - shlibpath_overrides_runpath=yes + lt_cv_shlibpath_overrides_runpath=yes fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext - LDFLAGS=$save_LDFLAGS - libdir=$save_libdir + LDFLAGS=$save_LDFLAGS + libdir=$save_libdir + +fi + + shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install @@ -20196,7 +20653,7 @@ # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then - lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` + lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi @@ -20448,6 +20905,8 @@ + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5 $as_echo_n "checking how to hardcode library paths into programs... " >&6; } hardcode_action_F77= @@ -20496,6 +20955,7 @@ GCC=$lt_save_GCC CC="$lt_save_CC" + CFLAGS="$lt_save_CFLAGS" fi # test "$_lt_disable_F77" != yes ac_ext=c @@ -20512,6 +20972,10 @@ ac_compiler_gnu=$ac_cv_fc_compiler_gnu +if test -z "$FC" || test "X$FC" = "Xno"; then + _lt_disable_FC=yes +fi + archive_cmds_need_lc_FC=no allow_undefined_flag_FC= always_export_symbols_FC=no @@ -20529,6 +20993,8 @@ module_expsym_cmds_FC= link_all_deplibs_FC=unknown old_archive_cmds_FC=$old_archive_cmds +reload_flag_FC=$reload_flag +reload_cmds_FC=$reload_cmds no_undefined_flag_FC= whole_archive_flag_spec_FC= enable_shared_with_static_runtimes_FC=no @@ -20592,7 +21058,9 @@ # Allow CC to be a program name with arguments. lt_save_CC="$CC" lt_save_GCC=$GCC + lt_save_CFLAGS=$CFLAGS CC=${FC-"f95"} + CFLAGS=$FCFLAGS compiler=$CC GCC=$ac_cv_fc_compiler_gnu @@ -20605,7 +21073,7 @@ *) break;; esac done -cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` +cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` if test -n "$compiler"; then @@ -20667,6 +21135,13 @@ end _LT_EOF + +_lt_libdeps_save_CFLAGS=$CFLAGS +case "$CC $CFLAGS " in #( +*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; +*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; +esac + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -20680,7 +21155,7 @@ pre_test_object_deps_done=no for p in `eval "$output_verbose_link_cmd"`; do - case $p in + case ${prev}${p} in -L* | -R* | -l*) # Some compilers place space between "-{L,R}" and the path. @@ -20689,13 +21164,22 @@ test $p = "-R"; then prev=$p continue - else - prev= fi + # Expand the sysroot to ease extracting the directories later. + if test -z "$prev"; then + case $p in + -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; + -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; + -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; + esac + fi + case $p in + =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; + esac if test "$pre_test_object_deps_done" = no; then - case $p in - -L* | -R*) + case ${prev} in + -L | -R) # Internal compiler library paths should come after those # provided the user. The postdeps already come after the # user supplied libs so there is no need to process them. @@ -20715,8 +21199,10 @@ postdeps_FC="${postdeps_FC} ${prev}${p}" fi fi + prev= ;; + *.lto.$objext) ;; # Ignore GCC LTO objects *.$objext) # This assumes that the test object file only shows up # once in the compiler output. @@ -20752,6 +21238,7 @@ fi $RM -f confest.$objext +CFLAGS=$_lt_libdeps_save_CFLAGS # PORTME: override above test on systems where it is broken @@ -20780,8 +21267,6 @@ lt_prog_compiler_pic_FC= lt_prog_compiler_static_FC= -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 -$as_echo_n "checking for $compiler option to produce PIC... " >&6; } if test "$GCC" = yes; then lt_prog_compiler_wl_FC='-Wl,' @@ -20829,6 +21314,12 @@ lt_prog_compiler_pic_FC='-fno-common' ;; + haiku*) + # PIC is the default for Haiku. + # The "-static" flag exists, but is broken. + lt_prog_compiler_static_FC= + ;; + hpux*) # PIC is the default for 64-bit PA HP-UX, but not for 32-bit # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag @@ -20871,6 +21362,13 @@ lt_prog_compiler_pic_FC='-fPIC' ;; esac + + case $cc_basename in + nvcc*) # Cuda Compiler Driver 2.2 + lt_prog_compiler_wl_FC='-Xlinker ' + lt_prog_compiler_pic_FC='-Xcompiler -fPIC' + ;; + esac else # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in @@ -20912,7 +21410,7 @@ lt_prog_compiler_static_FC='-non_shared' ;; - linux* | k*bsd*-gnu) + linux* | k*bsd*-gnu | kopensolaris*-gnu) case $cc_basename in # old Intel for x86_64 which still supported -KPIC. ecc*) @@ -20933,7 +21431,13 @@ lt_prog_compiler_pic_FC='--shared' lt_prog_compiler_static_FC='--static' ;; - pgcc* | pgf77* | pgf90* | pgf95*) + nagfor*) + # NAG Fortran compiler + lt_prog_compiler_wl_FC='-Wl,-Wl,,' + lt_prog_compiler_pic_FC='-PIC' + lt_prog_compiler_static_FC='-Bstatic' + ;; + pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) lt_prog_compiler_wl_FC='-Wl,' @@ -20945,25 +21449,25 @@ # All Alpha code is PIC. lt_prog_compiler_static_FC='-non_shared' ;; - xl*) - # IBM XL C 8.0/Fortran 10.1 on PPC + xl* | bgxl* | bgf* | mpixl*) + # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene lt_prog_compiler_wl_FC='-Wl,' lt_prog_compiler_pic_FC='-qpic' lt_prog_compiler_static_FC='-qstaticlink' ;; *) case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) - # Sun C 5.9 + *Sun\ F* | *Sun*Fortran*) + # Sun Fortran 8.3 passes all unrecognized flags to the linker lt_prog_compiler_pic_FC='-KPIC' lt_prog_compiler_static_FC='-Bstatic' - lt_prog_compiler_wl_FC='-Wl,' + lt_prog_compiler_wl_FC='' ;; - *Sun\ F*) - # Sun Fortran 8.3 passes all unrecognized flags to the linker + *Sun\ C*) + # Sun C 5.9 lt_prog_compiler_pic_FC='-KPIC' lt_prog_compiler_static_FC='-Bstatic' - lt_prog_compiler_wl_FC='' + lt_prog_compiler_wl_FC='-Wl,' ;; esac ;; @@ -20995,7 +21499,7 @@ lt_prog_compiler_pic_FC='-KPIC' lt_prog_compiler_static_FC='-Bstatic' case $cc_basename in - f77* | f90* | f95*) + f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) lt_prog_compiler_wl_FC='-Qoption ld ';; *) lt_prog_compiler_wl_FC='-Wl,';; @@ -21052,10 +21556,17 @@ lt_prog_compiler_pic_FC="$lt_prog_compiler_pic_FC" ;; esac -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_prog_compiler_pic_FC" >&5 -$as_echo "$lt_prog_compiler_pic_FC" >&6; } - +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 +$as_echo_n "checking for $compiler option to produce PIC... " >&6; } +if ${lt_cv_prog_compiler_pic_FC+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler_pic_FC=$lt_prog_compiler_pic_FC +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_FC" >&5 +$as_echo "$lt_cv_prog_compiler_pic_FC" >&6; } +lt_prog_compiler_pic_FC=$lt_cv_prog_compiler_pic_FC # # Check to make sure the PIC flag actually works. @@ -21063,7 +21574,7 @@ if test -n "$lt_prog_compiler_pic_FC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic_FC works" >&5 $as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic_FC works... " >&6; } -if test "${lt_cv_prog_compiler_pic_works_FC+set}" = set; then : +if ${lt_cv_prog_compiler_pic_works_FC+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_pic_works_FC=no @@ -21079,15 +21590,15 @@ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:21082: $lt_compile\"" >&5) + (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:21086: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. - $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp + $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_pic_works_FC=yes @@ -21113,13 +21624,15 @@ + + # # Check to make sure the static flag actually works. # wl=$lt_prog_compiler_wl_FC eval lt_tmp_static_flag=\"$lt_prog_compiler_static_FC\" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 $as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } -if test "${lt_cv_prog_compiler_static_works_FC+set}" = set; then : +if ${lt_cv_prog_compiler_static_works_FC+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_static_works_FC=no @@ -21132,7 +21645,7 @@ if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&5 - $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp + $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_static_works_FC=yes @@ -21159,7 +21672,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } -if test "${lt_cv_prog_compiler_c_o_FC+set}" = set; then : +if ${lt_cv_prog_compiler_c_o_FC+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o_FC=no @@ -21178,16 +21691,16 @@ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:21181: $lt_compile\"" >&5) + (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:21185: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings - $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp + $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o_FC=yes @@ -21211,7 +21724,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } -if test "${lt_cv_prog_compiler_c_o_FC+set}" = set; then : +if ${lt_cv_prog_compiler_c_o_FC+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o_FC=no @@ -21230,16 +21743,16 @@ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:21233: $lt_compile\"" >&5) + (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:21237: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings - $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp + $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o_FC=yes @@ -21349,7 +21862,33 @@ esac ld_shlibs_FC=yes + + # On some targets, GNU ld is compatible enough with the native linker + # that we're better off using the native interface for both. + lt_use_gnu_ld_interface=no if test "$with_gnu_ld" = yes; then + case $host_os in + aix*) + # The AIX port of GNU ld has always aspired to compatibility + # with the native linker. However, as the warning in the GNU ld + # block says, versions before 2.19.5* couldn't really create working + # shared libraries, regardless of the interface used. + case `$LD -v 2>&1` in + *\ \(GNU\ Binutils\)\ 2.19.5*) ;; + *\ \(GNU\ Binutils\)\ 2.[2-9]*) ;; + *\ \(GNU\ Binutils\)\ [3-9]*) ;; + *) + lt_use_gnu_ld_interface=yes + ;; + esac + ;; + *) + lt_use_gnu_ld_interface=yes + ;; + esac + fi + + if test "$lt_use_gnu_ld_interface" = yes; then # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='${wl}' @@ -21367,6 +21906,7 @@ fi supports_anon_versioning=no case `$LD -v 2>&1` in + *GNU\ gold*) supports_anon_versioning=yes ;; *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... @@ -21382,11 +21922,12 @@ ld_shlibs_FC=no cat <<_LT_EOF 1>&2 -*** Warning: the GNU linker, at least up to release 2.9.1, is reported +*** Warning: the GNU linker, at least up to release 2.19, is reported *** to be unable to reliably create shared libraries on AIX. *** Therefore, libtool is disabling shared libraries support. If you -*** really care for shared libraries, you may want to modify your PATH -*** so that a non-GNU linker is found, and then restart. +*** really care for shared libraries, you may want to install binutils +*** 2.20 or above, or modify your PATH so that a non-GNU linker is found. +*** You will then need to restart the configuration process. _LT_EOF fi @@ -21422,10 +21963,12 @@ # _LT_TAGVAR(hardcode_libdir_flag_spec, FC) is actually meaningless, # as there is no search path for DLLs. hardcode_libdir_flag_spec_FC='-L$libdir' + export_dynamic_flag_spec_FC='${wl}--export-all-symbols' allow_undefined_flag_FC=unsupported always_export_symbols_FC=no enable_shared_with_static_runtimes_FC=yes - export_symbols_cmds_FC='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' + export_symbols_cmds_FC='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols' + exclude_expsyms_FC='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname' if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then archive_cmds_FC='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' @@ -21443,6 +21986,11 @@ fi ;; + haiku*) + archive_cmds_FC='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + link_all_deplibs_FC=yes + ;; + interix[3-9]*) hardcode_direct_FC=no hardcode_shlibpath_var_FC=no @@ -21458,7 +22006,7 @@ archive_expsym_cmds_FC='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; - gnu* | linux* | tpf* | k*bsd*-gnu) + gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) tmp_diet=no if test "$host_os" = linux-dietlibc; then case $cc_basename in @@ -21468,15 +22016,16 @@ if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ && test "$tmp_diet" = no then - tmp_addflag= + tmp_addflag=' $pic_flag' tmp_sharedflag='-shared' case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler - whole_archive_flag_spec_FC='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' + whole_archive_flag_spec_FC='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag' ;; - pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers - whole_archive_flag_spec_FC='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' + pgf77* | pgf90* | pgf95* | pgfortran*) + # Portland Group f77 and f90 compilers + whole_archive_flag_spec_FC='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag -Mnomain' ;; ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 tmp_addflag=' -i_dynamic' ;; @@ -21487,13 +22036,17 @@ lf95*) # Lahey Fortran 8.1 whole_archive_flag_spec_FC= tmp_sharedflag='--shared' ;; - xl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below) + xl[cC]* | bgxl[cC]* | mpixl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below) tmp_sharedflag='-qmkshrobj' tmp_addflag= ;; + nvcc*) # Cuda Compiler Driver 2.2 + whole_archive_flag_spec_FC='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' + compiler_needs_object_FC=yes + ;; esac case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 - whole_archive_flag_spec_FC='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' + whole_archive_flag_spec_FC='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' compiler_needs_object_FC=yes tmp_sharedflag='-G' ;; *Sun\ F*) # Sun Fortran 8.3 @@ -21509,17 +22062,17 @@ fi case $cc_basename in - xlf*) + xlf* | bgf* | bgxlf* | mpixlf*) # IBM XL Fortran 10.1 on PPC cannot create shared libs itself whole_archive_flag_spec_FC='--whole-archive$convenience --no-whole-archive' hardcode_libdir_flag_spec_FC= hardcode_libdir_flag_spec_ld_FC='-rpath $libdir' - archive_cmds_FC='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib' + archive_cmds_FC='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' if test "x$supports_anon_versioning" = xyes; then archive_expsym_cmds_FC='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ - $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' + $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' fi ;; esac @@ -21533,8 +22086,8 @@ archive_cmds_FC='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else - archive_cmds_FC='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds_FC='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + archive_cmds_FC='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_FC='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' fi ;; @@ -21552,8 +22105,8 @@ _LT_EOF elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - archive_cmds_FC='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds_FC='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + archive_cmds_FC='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_FC='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs_FC=no fi @@ -21599,8 +22152,8 @@ *) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - archive_cmds_FC='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds_FC='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + archive_cmds_FC='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_FC='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs_FC=no fi @@ -21640,8 +22193,10 @@ else # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm + # Also, AIX nm treats weak defined symbols like other global + # defined symbols, whereas GNU nm marks them as "W". if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then - export_symbols_cmds_FC='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' + export_symbols_cmds_FC='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' else export_symbols_cmds_FC='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' fi @@ -21728,32 +22283,45 @@ allow_undefined_flag_FC='-berok' # Determine the default libpath from the value encoded in an # empty executable. - cat > conftest.$ac_ext <<_ACEOF + if test "${lt_cv_aix_libpath+set}" = set; then + aix_libpath=$lt_cv_aix_libpath +else + if ${lt_cv_aix_libpath__FC+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat > conftest.$ac_ext <<_ACEOF program main end _ACEOF if ac_fn_fc_try_link "$LINENO"; then : -lt_aix_libpath_sed=' - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\(.*\)$/\1/ - p - } - }' -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -# Check for a 64-bit object if we didn't find anything. -if test -z "$aix_libpath"; then - aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -fi + lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\([^ ]*\) *$/\1/ + p + } + }' + lt_cv_aix_libpath__FC=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + # Check for a 64-bit object if we didn't find anything. + if test -z "$lt_cv_aix_libpath__FC"; then + lt_cv_aix_libpath__FC=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext -if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + if test -z "$lt_cv_aix_libpath__FC"; then + lt_cv_aix_libpath__FC="/usr/lib:/lib" + fi + +fi + + aix_libpath=$lt_cv_aix_libpath__FC +fi hardcode_libdir_flag_spec_FC='${wl}-blibpath:$libdir:'"$aix_libpath" - archive_expsym_cmds_FC='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" + archive_expsym_cmds_FC='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then hardcode_libdir_flag_spec_FC='${wl}-R $libdir:/usr/lib:/lib' @@ -21762,37 +22330,55 @@ else # Determine the default libpath from the value encoded in an # empty executable. - cat > conftest.$ac_ext <<_ACEOF + if test "${lt_cv_aix_libpath+set}" = set; then + aix_libpath=$lt_cv_aix_libpath +else + if ${lt_cv_aix_libpath__FC+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat > conftest.$ac_ext <<_ACEOF program main end _ACEOF if ac_fn_fc_try_link "$LINENO"; then : -lt_aix_libpath_sed=' - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\(.*\)$/\1/ - p - } - }' -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -# Check for a 64-bit object if we didn't find anything. -if test -z "$aix_libpath"; then - aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\([^ ]*\) *$/\1/ + p + } + }' + lt_cv_aix_libpath__FC=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + # Check for a 64-bit object if we didn't find anything. + if test -z "$lt_cv_aix_libpath__FC"; then + lt_cv_aix_libpath__FC=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + fi +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + if test -z "$lt_cv_aix_libpath__FC"; then + lt_cv_aix_libpath__FC="/usr/lib:/lib" + fi + fi + + aix_libpath=$lt_cv_aix_libpath__FC fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec_FC='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. no_undefined_flag_FC=' ${wl}-bernotok' allow_undefined_flag_FC=' ${wl}-berok' - # Exported symbols can be pulled into shared objects from archives - whole_archive_flag_spec_FC='$convenience' + if test "$with_gnu_ld" = yes; then + # We only use this code for GNU lds that support --whole-archive. + whole_archive_flag_spec_FC='${wl}--whole-archive$convenience ${wl}--no-whole-archive' + else + # Exported symbols can be pulled into shared objects from archives + whole_archive_flag_spec_FC='$convenience' + fi archive_cmds_need_lc_FC=yes # This is similar to how AIX traditionally builds its shared libraries. archive_expsym_cmds_FC="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' @@ -21824,20 +22410,63 @@ # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. - hardcode_libdir_flag_spec_FC=' ' - allow_undefined_flag_FC=unsupported - # Tell ltmain to make .lib files, not .a files. - libext=lib - # Tell ltmain to make .dll files, not .so files. - shrext_cmds=".dll" - # FIXME: Setting linknames here is a bad hack. - archive_cmds_FC='$CC -o $lib $libobjs $compiler_flags `$ECHO "X$deplibs" | $Xsed -e '\''s/ -lc$//'\''` -link -dll~linknames=' - # The linker will automatically build a .lib file if we build a DLL. - old_archive_from_new_cmds_FC='true' - # FIXME: Should let the user specify the lib program. - old_archive_cmds_FC='lib -OUT:$oldlib$oldobjs$old_deplibs' - fix_srcfile_path_FC='`cygpath -w "$srcfile"`' - enable_shared_with_static_runtimes_FC=yes + case $cc_basename in + cl*) + # Native MSVC + hardcode_libdir_flag_spec_FC=' ' + allow_undefined_flag_FC=unsupported + always_export_symbols_FC=yes + file_list_spec_FC='@' + # Tell ltmain to make .lib files, not .a files. + libext=lib + # Tell ltmain to make .dll files, not .so files. + shrext_cmds=".dll" + # FIXME: Setting linknames here is a bad hack. + archive_cmds_FC='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' + archive_expsym_cmds_FC='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; + else + sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; + fi~ + $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ + linknames=' + # The linker will not automatically build a static lib if we build a DLL. + # _LT_TAGVAR(old_archive_from_new_cmds, FC)='true' + enable_shared_with_static_runtimes_FC=yes + export_symbols_cmds_FC='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' + # Don't use ranlib + old_postinstall_cmds_FC='chmod 644 $oldlib' + postlink_cmds_FC='lt_outputfile="@OUTPUT@"~ + lt_tool_outputfile="@TOOL_OUTPUT@"~ + case $lt_outputfile in + *.exe|*.EXE) ;; + *) + lt_outputfile="$lt_outputfile.exe" + lt_tool_outputfile="$lt_tool_outputfile.exe" + ;; + esac~ + if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then + $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; + $RM "$lt_outputfile.manifest"; + fi' + ;; + *) + # Assume MSVC wrapper + hardcode_libdir_flag_spec_FC=' ' + allow_undefined_flag_FC=unsupported + # Tell ltmain to make .lib files, not .a files. + libext=lib + # Tell ltmain to make .dll files, not .so files. + shrext_cmds=".dll" + # FIXME: Setting linknames here is a bad hack. + archive_cmds_FC='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' + # The linker will automatically build a .lib file if we build a DLL. + old_archive_from_new_cmds_FC='true' + # FIXME: Should let the user specify the lib program. + old_archive_cmds_FC='lib -OUT:$oldlib$oldobjs$old_deplibs' + enable_shared_with_static_runtimes_FC=yes + ;; + esac ;; darwin* | rhapsody*) @@ -21847,7 +22476,11 @@ hardcode_direct_FC=no hardcode_automatic_FC=yes hardcode_shlibpath_var_FC=unsupported - whole_archive_flag_spec_FC='' + if test "$lt_cv_ld_force_load" = "yes"; then + whole_archive_flag_spec_FC='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' + else + whole_archive_flag_spec_FC='' + fi link_all_deplibs_FC=yes allow_undefined_flag_FC="$_lt_dar_allow_undefined" case $cc_basename in @@ -21855,7 +22488,7 @@ *) _lt_dar_can_shared=$GCC ;; esac if test "$_lt_dar_can_shared" = "yes"; then - output_verbose_link_cmd=echo + output_verbose_link_cmd=func_echo_all archive_cmds_FC="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" module_cmds_FC="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" archive_expsym_cmds_FC="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" @@ -21898,7 +22531,7 @@ # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | dragonfly*) - archive_cmds_FC='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' + archive_cmds_FC='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec_FC='-R$libdir' hardcode_direct_FC=yes hardcode_shlibpath_var_FC=no @@ -21906,7 +22539,7 @@ hpux9*) if test "$GCC" = yes; then - archive_cmds_FC='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + archive_cmds_FC='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else archive_cmds_FC='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' fi @@ -21921,8 +22554,8 @@ ;; hpux10*) - if test "$GCC" = yes -a "$with_gnu_ld" = no; then - archive_cmds_FC='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + if test "$GCC" = yes && test "$with_gnu_ld" = no; then + archive_cmds_FC='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds_FC='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi @@ -21940,16 +22573,16 @@ ;; hpux11*) - if test "$GCC" = yes -a "$with_gnu_ld" = no; then + if test "$GCC" = yes && test "$with_gnu_ld" = no; then case $host_cpu in hppa*64*) archive_cmds_FC='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) - archive_cmds_FC='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + archive_cmds_FC='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) - archive_cmds_FC='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + archive_cmds_FC='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else @@ -21961,7 +22594,7 @@ archive_cmds_FC='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) - archive_cmds_FC='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + archive_cmds_FC='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac fi @@ -21989,25 +22622,40 @@ irix5* | irix6* | nonstopux*) if test "$GCC" = yes; then - archive_cmds_FC='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + archive_cmds_FC='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' # Try to use the -exported_symbol ld option, if it does not # work, assume that -exports_file does not work either and # implicitly export all symbols. - save_LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" - cat > conftest.$ac_ext <<_ACEOF -int foo(void) {} + # This should be the same for all languages, so no per-tag cache variable. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5 +$as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; } +if ${lt_cv_irix_exported_symbol+:} false; then : + $as_echo_n "(cached) " >&6 +else + save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" + cat > conftest.$ac_ext <<_ACEOF + + subroutine foo + end _ACEOF if ac_fn_fc_try_link "$LINENO"; then : - archive_expsym_cmds_FC='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' - + lt_cv_irix_exported_symbol=yes +else + lt_cv_irix_exported_symbol=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext - LDFLAGS="$save_LDFLAGS" + LDFLAGS="$save_LDFLAGS" +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5 +$as_echo "$lt_cv_irix_exported_symbol" >&6; } + if test "$lt_cv_irix_exported_symbol" = yes; then + archive_expsym_cmds_FC='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' + fi else - archive_cmds_FC='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' - archive_expsym_cmds_FC='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' + archive_cmds_FC='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' + archive_expsym_cmds_FC='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' fi archive_cmds_need_lc_FC='no' hardcode_libdir_flag_spec_FC='${wl}-rpath ${wl}$libdir' @@ -22069,17 +22717,17 @@ hardcode_libdir_flag_spec_FC='-L$libdir' hardcode_minus_L_FC=yes allow_undefined_flag_FC=unsupported - archive_cmds_FC='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$ECHO DATA >> $output_objdir/$libname.def~$ECHO " SINGLE NONSHARED" >> $output_objdir/$libname.def~$ECHO EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' + archive_cmds_FC='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' old_archive_from_new_cmds_FC='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' ;; osf3*) if test "$GCC" = yes; then allow_undefined_flag_FC=' ${wl}-expect_unresolved ${wl}\*' - archive_cmds_FC='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + archive_cmds_FC='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else allow_undefined_flag_FC=' -expect_unresolved \*' - archive_cmds_FC='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' + archive_cmds_FC='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' fi archive_cmds_need_lc_FC='no' hardcode_libdir_flag_spec_FC='${wl}-rpath ${wl}$libdir' @@ -22089,13 +22737,13 @@ osf4* | osf5*) # as osf3* with the addition of -msym flag if test "$GCC" = yes; then allow_undefined_flag_FC=' ${wl}-expect_unresolved ${wl}\*' - archive_cmds_FC='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + archive_cmds_FC='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec_FC='${wl}-rpath ${wl}$libdir' else allow_undefined_flag_FC=' -expect_unresolved \*' - archive_cmds_FC='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' + archive_cmds_FC='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds_FC='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ - $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' + $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' # Both c and cxx compiler support -rpath directly hardcode_libdir_flag_spec_FC='-rpath $libdir' @@ -22108,9 +22756,9 @@ no_undefined_flag_FC=' -z defs' if test "$GCC" = yes; then wlarc='${wl}' - archive_cmds_FC='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_cmds_FC='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_FC='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' + $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' else case `$CC -V 2>&1` in *"Compilers 5.0"*) @@ -22289,44 +22937,50 @@ # to ld, don't add -lc before -lgcc. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5 $as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } - $RM conftest* - echo "$lt_simple_compile_test_code" > conftest.$ac_ext +if ${lt_cv_archive_cmds_need_lc_FC+:} false; then : + $as_echo_n "(cached) " >&6 +else + $RM conftest* + echo "$lt_simple_compile_test_code" > conftest.$ac_ext - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } 2>conftest.err; then - soname=conftest - lib=conftest - libobjs=conftest.$ac_objext - deplibs= - wl=$lt_prog_compiler_wl_FC - pic_flag=$lt_prog_compiler_pic_FC - compiler_flags=-v - linker_flags=-v - verstring= - output_objdir=. - libname=conftest - lt_save_allow_undefined_flag=$allow_undefined_flag_FC - allow_undefined_flag_FC= - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds_FC 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5 + soname=conftest + lib=conftest + libobjs=conftest.$ac_objext + deplibs= + wl=$lt_prog_compiler_wl_FC + pic_flag=$lt_prog_compiler_pic_FC + compiler_flags=-v + linker_flags=-v + verstring= + output_objdir=. + libname=conftest + lt_save_allow_undefined_flag=$allow_undefined_flag_FC + allow_undefined_flag_FC= + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds_FC 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5 (eval $archive_cmds_FC 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } - then - archive_cmds_need_lc_FC=no - else - archive_cmds_need_lc_FC=yes - fi - allow_undefined_flag_FC=$lt_save_allow_undefined_flag - else - cat conftest.err 1>&5 - fi - $RM conftest* - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $archive_cmds_need_lc_FC" >&5 -$as_echo "$archive_cmds_need_lc_FC" >&6; } + then + lt_cv_archive_cmds_need_lc_FC=no + else + lt_cv_archive_cmds_need_lc_FC=yes + fi + allow_undefined_flag_FC=$lt_save_allow_undefined_flag + else + cat conftest.err 1>&5 + fi + $RM conftest* + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc_FC" >&5 +$as_echo "$lt_cv_archive_cmds_need_lc_FC" >&6; } + archive_cmds_need_lc_FC=$lt_cv_archive_cmds_need_lc_FC ;; esac fi @@ -22483,7 +23137,7 @@ m68k) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. - finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$ECHO "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' + finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; esac ;; @@ -22514,8 +23168,9 @@ need_version=no need_lib_prefix=no - case $GCC,$host_os in - yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*) + case $GCC,$cc_basename in + yes,*) + # gcc library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ @@ -22536,36 +23191,82 @@ cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" + ;; mingw* | cegcc*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` - if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then - # It is most probably a Windows format PATH printed by - # mingw gcc, but we are running on Cygwin. Gcc prints its search - # path with ; separators, and with drive letters. We can handle the - # drive letters (cygwin fileutils understands them), so leave them, - # especially as we might pass files found there to a mingw objdump, - # which wouldn't understand a cygwinified path. Ahh. - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` - else - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` - fi ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; esac + dynamic_linker='Win32 ld.exe' + ;; + + *,cl*) + # Native MSVC + libname_spec='$name' + soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + library_names_spec='${libname}.dll.lib' + + case $build_os in + mingw*) + sys_lib_search_path_spec= + lt_save_ifs=$IFS + IFS=';' + for lt_path in $LIB + do + IFS=$lt_save_ifs + # Let DOS variable expansion print the short 8.3 style file name. + lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` + sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" + done + IFS=$lt_save_ifs + # Convert to MSYS style. + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'` + ;; + cygwin*) + # Convert to unix form, then to dos form, then back to unix form + # but this time dos style (no spaces!) so that the unix form looks + # like /cygdrive/c/PROGRA~1:/cygdr... + sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` + sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` + sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + ;; + *) + sys_lib_search_path_spec="$LIB" + if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then + # It is most probably a Windows format PATH. + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` + else + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + fi + # FIXME: find the short name or the path components, as spaces are + # common. (e.g. "Program Files" -> "PROGRA~1") + ;; + esac + + # DLL is installed to $(libdir)/../bin by postinstall_cmds + postinstall_cmds='base_file=`basename \${file}`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ + dldir=$destdir/`dirname \$dlpath`~ + test -d \$dldir || mkdir -p \$dldir~ + $install_prog $dir/$dlname \$dldir/$dlname' + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ + dlpath=$dir/\$dldll~ + $RM \$dlpath' + shlibpath_overrides_runpath=yes + dynamic_linker='Win32 link.exe' ;; *) + # Assume MSVC wrapper library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' + dynamic_linker='Win32 ld.exe' ;; esac - dynamic_linker='Win32 ld.exe' # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; @@ -22651,6 +23352,19 @@ hardcode_into_libs=yes ;; +haiku*) + version_type=linux + need_lib_prefix=no + need_version=no + dynamic_linker="$host_os runtime_loader" + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LIBRARY_PATH + shlibpath_overrides_runpath=yes + sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' + hardcode_into_libs=yes + ;; + hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. @@ -22693,8 +23407,10 @@ soname_spec='${libname}${release}${shared_ext}$major' ;; esac - # HP-UX runs *really* slowly unless shared libraries are mode 555. + # HP-UX runs *really* slowly unless shared libraries are mode 555, ... postinstall_cmds='chmod 555 $lib' + # or fails outright, so override atomically: + install_override_mode=555 ;; interix[3-9]*) @@ -22752,7 +23468,7 @@ ;; # This must be Linux ELF. -linux* | k*bsd*-gnu) +linux* | k*bsd*-gnu | kopensolaris*-gnu) version_type=linux need_lib_prefix=no need_version=no @@ -22761,25 +23477,34 @@ finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no + # Some binutils ld are patched to set DT_RUNPATH - save_LDFLAGS=$LDFLAGS - save_libdir=$libdir - eval "libdir=/foo; wl=\"$lt_prog_compiler_wl_FC\"; \ - LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec_FC\"" - cat > conftest.$ac_ext <<_ACEOF + if ${lt_cv_shlibpath_overrides_runpath+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_shlibpath_overrides_runpath=no + save_LDFLAGS=$LDFLAGS + save_libdir=$libdir + eval "libdir=/foo; wl=\"$lt_prog_compiler_wl_FC\"; \ + LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec_FC\"" + cat > conftest.$ac_ext <<_ACEOF program main end _ACEOF if ac_fn_fc_try_link "$LINENO"; then : if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then : - shlibpath_overrides_runpath=yes + lt_cv_shlibpath_overrides_runpath=yes fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext - LDFLAGS=$save_LDFLAGS - libdir=$save_libdir + LDFLAGS=$save_LDFLAGS + libdir=$save_libdir + +fi + + shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install @@ -22788,7 +23513,7 @@ # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then - lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` + lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi @@ -23040,6 +23765,8 @@ + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5 $as_echo_n "checking how to hardcode library paths into programs... " >&6; } hardcode_action_FC= @@ -23087,7 +23814,8 @@ fi # test -n "$compiler" GCC=$lt_save_GCC - CC="$lt_save_CC" + CC=$lt_save_CC + CFLAGS=$lt_save_CFLAGS fi # test "$_lt_disable_FC" != yes ac_ext=c @@ -23124,16 +23852,15 @@ : ${CONFIG_LT=./config.lt} { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_LT" >&5 $as_echo "$as_me: creating $CONFIG_LT" >&6;} -cat >"$CONFIG_LT" <<_LTEOF +as_write_fail=0 +cat >"$CONFIG_LT" <<_ASEOF || as_write_fail=1 #! $SHELL # Generated by $as_me. # Run this file to recreate a libtool stub with the current configuration. - -lt_cl_silent=false SHELL=\${CONFIG_SHELL-$SHELL} -_LTEOF - -cat >>"$CONFIG_LT" <<\_LTEOF +export SHELL +_ASEOF +cat >>"$CONFIG_LT" <<\_ASEOF || as_write_fail=1 ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## @@ -23213,6 +23940,7 @@ IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. +as_myself= case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -23258,20 +23986,19 @@ (unset CDPATH) >/dev/null 2>&1 && unset CDPATH - -# as_fn_error ERROR [LINENO LOG_FD] -# --------------------------------- +# as_fn_error STATUS ERROR [LINENO LOG_FD] +# ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the -# script with status $?, using 1 if that was 0. +# script with STATUS, using 1 if that was 0. as_fn_error () { - as_status=$?; test $as_status -eq 0 && as_status=1 - if test "$3"; then - as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3 + as_status=$1; test $as_status -eq 0 && as_status=1 + if test "$4"; then + as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi - $as_echo "$as_me: error: $1" >&2 + $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error @@ -23467,7 +24194,7 @@ test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir" "$LINENO" 5 + } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p @@ -23508,8 +24235,15 @@ as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" - exec 6>&1 +## --------------------------------- ## +## Main body of "$CONFIG_LT" script. ## +## --------------------------------- ## +_ASEOF +test $as_write_fail = 0 && chmod +x "$CONFIG_LT" + +cat >>"$CONFIG_LT" <<\_LTEOF +lt_cl_silent=false exec 5>>config.log { echo @@ -23533,10 +24267,10 @@ Report bugs to ." lt_cl_version="\ -GetData config.lt 0.7.0 -configured by $0, generated by GNU Autoconf 2.65. +GetData config.lt 0.7.1 +configured by $0, generated by GNU Autoconf 2.68. -Copyright (C) 2008 Free Software Foundation, Inc. +Copyright (C) 2010 Free Software Foundation, Inc. This config.lt script is free software; the Free Software Foundation gives unlimited permision to copy, distribute and modify it." @@ -23552,10 +24286,10 @@ --quiet | --q* | --silent | --s* | -q ) lt_cl_silent=: ;; - -*) as_fn_error "unrecognized option: $1 + -*) as_fn_error $? "unrecognized option: $1 Try \`$0 --help' for more information." "$LINENO" 5 ;; - *) as_fn_error "unrecognized argument: $1 + *) as_fn_error $? "unrecognized argument: $1 Try \`$0 --help' for more information." "$LINENO" 5 ;; esac shift @@ -23576,278 +24310,306 @@ sed_quote_subst='$sed_quote_subst' double_quote_subst='$double_quote_subst' delay_variable_subst='$delay_variable_subst' -macro_version='`$ECHO "X$macro_version" | $Xsed -e "$delay_single_quote_subst"`' -macro_revision='`$ECHO "X$macro_revision" | $Xsed -e "$delay_single_quote_subst"`' -enable_shared='`$ECHO "X$enable_shared" | $Xsed -e "$delay_single_quote_subst"`' -enable_static='`$ECHO "X$enable_static" | $Xsed -e "$delay_single_quote_subst"`' -pic_mode='`$ECHO "X$pic_mode" | $Xsed -e "$delay_single_quote_subst"`' -enable_fast_install='`$ECHO "X$enable_fast_install" | $Xsed -e "$delay_single_quote_subst"`' -host_alias='`$ECHO "X$host_alias" | $Xsed -e "$delay_single_quote_subst"`' -host='`$ECHO "X$host" | $Xsed -e "$delay_single_quote_subst"`' -host_os='`$ECHO "X$host_os" | $Xsed -e "$delay_single_quote_subst"`' -build_alias='`$ECHO "X$build_alias" | $Xsed -e "$delay_single_quote_subst"`' -build='`$ECHO "X$build" | $Xsed -e "$delay_single_quote_subst"`' -build_os='`$ECHO "X$build_os" | $Xsed -e "$delay_single_quote_subst"`' -SED='`$ECHO "X$SED" | $Xsed -e "$delay_single_quote_subst"`' -Xsed='`$ECHO "X$Xsed" | $Xsed -e "$delay_single_quote_subst"`' -GREP='`$ECHO "X$GREP" | $Xsed -e "$delay_single_quote_subst"`' -EGREP='`$ECHO "X$EGREP" | $Xsed -e "$delay_single_quote_subst"`' -FGREP='`$ECHO "X$FGREP" | $Xsed -e "$delay_single_quote_subst"`' -LD='`$ECHO "X$LD" | $Xsed -e "$delay_single_quote_subst"`' -NM='`$ECHO "X$NM" | $Xsed -e "$delay_single_quote_subst"`' -LN_S='`$ECHO "X$LN_S" | $Xsed -e "$delay_single_quote_subst"`' -max_cmd_len='`$ECHO "X$max_cmd_len" | $Xsed -e "$delay_single_quote_subst"`' -ac_objext='`$ECHO "X$ac_objext" | $Xsed -e "$delay_single_quote_subst"`' -exeext='`$ECHO "X$exeext" | $Xsed -e "$delay_single_quote_subst"`' -lt_unset='`$ECHO "X$lt_unset" | $Xsed -e "$delay_single_quote_subst"`' -lt_SP2NL='`$ECHO "X$lt_SP2NL" | $Xsed -e "$delay_single_quote_subst"`' -lt_NL2SP='`$ECHO "X$lt_NL2SP" | $Xsed -e "$delay_single_quote_subst"`' -reload_flag='`$ECHO "X$reload_flag" | $Xsed -e "$delay_single_quote_subst"`' -reload_cmds='`$ECHO "X$reload_cmds" | $Xsed -e "$delay_single_quote_subst"`' -OBJDUMP='`$ECHO "X$OBJDUMP" | $Xsed -e "$delay_single_quote_subst"`' -deplibs_check_method='`$ECHO "X$deplibs_check_method" | $Xsed -e "$delay_single_quote_subst"`' -file_magic_cmd='`$ECHO "X$file_magic_cmd" | $Xsed -e "$delay_single_quote_subst"`' -AR='`$ECHO "X$AR" | $Xsed -e "$delay_single_quote_subst"`' -AR_FLAGS='`$ECHO "X$AR_FLAGS" | $Xsed -e "$delay_single_quote_subst"`' -STRIP='`$ECHO "X$STRIP" | $Xsed -e "$delay_single_quote_subst"`' -RANLIB='`$ECHO "X$RANLIB" | $Xsed -e "$delay_single_quote_subst"`' -old_postinstall_cmds='`$ECHO "X$old_postinstall_cmds" | $Xsed -e "$delay_single_quote_subst"`' -old_postuninstall_cmds='`$ECHO "X$old_postuninstall_cmds" | $Xsed -e "$delay_single_quote_subst"`' -old_archive_cmds='`$ECHO "X$old_archive_cmds" | $Xsed -e "$delay_single_quote_subst"`' -CC='`$ECHO "X$CC" | $Xsed -e "$delay_single_quote_subst"`' -CFLAGS='`$ECHO "X$CFLAGS" | $Xsed -e "$delay_single_quote_subst"`' -compiler='`$ECHO "X$compiler" | $Xsed -e "$delay_single_quote_subst"`' -GCC='`$ECHO "X$GCC" | $Xsed -e "$delay_single_quote_subst"`' -lt_cv_sys_global_symbol_pipe='`$ECHO "X$lt_cv_sys_global_symbol_pipe" | $Xsed -e "$delay_single_quote_subst"`' -lt_cv_sys_global_symbol_to_cdecl='`$ECHO "X$lt_cv_sys_global_symbol_to_cdecl" | $Xsed -e "$delay_single_quote_subst"`' -lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "X$lt_cv_sys_global_symbol_to_c_name_address" | $Xsed -e "$delay_single_quote_subst"`' -lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "X$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $Xsed -e "$delay_single_quote_subst"`' -objdir='`$ECHO "X$objdir" | $Xsed -e "$delay_single_quote_subst"`' -SHELL='`$ECHO "X$SHELL" | $Xsed -e "$delay_single_quote_subst"`' -ECHO='`$ECHO "X$ECHO" | $Xsed -e "$delay_single_quote_subst"`' -MAGIC_CMD='`$ECHO "X$MAGIC_CMD" | $Xsed -e "$delay_single_quote_subst"`' -lt_prog_compiler_no_builtin_flag='`$ECHO "X$lt_prog_compiler_no_builtin_flag" | $Xsed -e "$delay_single_quote_subst"`' -lt_prog_compiler_wl='`$ECHO "X$lt_prog_compiler_wl" | $Xsed -e "$delay_single_quote_subst"`' -lt_prog_compiler_pic='`$ECHO "X$lt_prog_compiler_pic" | $Xsed -e "$delay_single_quote_subst"`' -lt_prog_compiler_static='`$ECHO "X$lt_prog_compiler_static" | $Xsed -e "$delay_single_quote_subst"`' -lt_cv_prog_compiler_c_o='`$ECHO "X$lt_cv_prog_compiler_c_o" | $Xsed -e "$delay_single_quote_subst"`' -need_locks='`$ECHO "X$need_locks" | $Xsed -e "$delay_single_quote_subst"`' -DSYMUTIL='`$ECHO "X$DSYMUTIL" | $Xsed -e "$delay_single_quote_subst"`' -NMEDIT='`$ECHO "X$NMEDIT" | $Xsed -e "$delay_single_quote_subst"`' -LIPO='`$ECHO "X$LIPO" | $Xsed -e "$delay_single_quote_subst"`' -OTOOL='`$ECHO "X$OTOOL" | $Xsed -e "$delay_single_quote_subst"`' -OTOOL64='`$ECHO "X$OTOOL64" | $Xsed -e "$delay_single_quote_subst"`' -libext='`$ECHO "X$libext" | $Xsed -e "$delay_single_quote_subst"`' -shrext_cmds='`$ECHO "X$shrext_cmds" | $Xsed -e "$delay_single_quote_subst"`' -extract_expsyms_cmds='`$ECHO "X$extract_expsyms_cmds" | $Xsed -e "$delay_single_quote_subst"`' -archive_cmds_need_lc='`$ECHO "X$archive_cmds_need_lc" | $Xsed -e "$delay_single_quote_subst"`' -enable_shared_with_static_runtimes='`$ECHO "X$enable_shared_with_static_runtimes" | $Xsed -e "$delay_single_quote_subst"`' -export_dynamic_flag_spec='`$ECHO "X$export_dynamic_flag_spec" | $Xsed -e "$delay_single_quote_subst"`' -whole_archive_flag_spec='`$ECHO "X$whole_archive_flag_spec" | $Xsed -e "$delay_single_quote_subst"`' -compiler_needs_object='`$ECHO "X$compiler_needs_object" | $Xsed -e "$delay_single_quote_subst"`' -old_archive_from_new_cmds='`$ECHO "X$old_archive_from_new_cmds" | $Xsed -e "$delay_single_quote_subst"`' -old_archive_from_expsyms_cmds='`$ECHO "X$old_archive_from_expsyms_cmds" | $Xsed -e "$delay_single_quote_subst"`' -archive_cmds='`$ECHO "X$archive_cmds" | $Xsed -e "$delay_single_quote_subst"`' -archive_expsym_cmds='`$ECHO "X$archive_expsym_cmds" | $Xsed -e "$delay_single_quote_subst"`' -module_cmds='`$ECHO "X$module_cmds" | $Xsed -e "$delay_single_quote_subst"`' -module_expsym_cmds='`$ECHO "X$module_expsym_cmds" | $Xsed -e "$delay_single_quote_subst"`' -with_gnu_ld='`$ECHO "X$with_gnu_ld" | $Xsed -e "$delay_single_quote_subst"`' -allow_undefined_flag='`$ECHO "X$allow_undefined_flag" | $Xsed -e "$delay_single_quote_subst"`' -no_undefined_flag='`$ECHO "X$no_undefined_flag" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_libdir_flag_spec='`$ECHO "X$hardcode_libdir_flag_spec" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_libdir_flag_spec_ld='`$ECHO "X$hardcode_libdir_flag_spec_ld" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_libdir_separator='`$ECHO "X$hardcode_libdir_separator" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_direct='`$ECHO "X$hardcode_direct" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_direct_absolute='`$ECHO "X$hardcode_direct_absolute" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_minus_L='`$ECHO "X$hardcode_minus_L" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_shlibpath_var='`$ECHO "X$hardcode_shlibpath_var" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_automatic='`$ECHO "X$hardcode_automatic" | $Xsed -e "$delay_single_quote_subst"`' -inherit_rpath='`$ECHO "X$inherit_rpath" | $Xsed -e "$delay_single_quote_subst"`' -link_all_deplibs='`$ECHO "X$link_all_deplibs" | $Xsed -e "$delay_single_quote_subst"`' -fix_srcfile_path='`$ECHO "X$fix_srcfile_path" | $Xsed -e "$delay_single_quote_subst"`' -always_export_symbols='`$ECHO "X$always_export_symbols" | $Xsed -e "$delay_single_quote_subst"`' -export_symbols_cmds='`$ECHO "X$export_symbols_cmds" | $Xsed -e "$delay_single_quote_subst"`' -exclude_expsyms='`$ECHO "X$exclude_expsyms" | $Xsed -e "$delay_single_quote_subst"`' -include_expsyms='`$ECHO "X$include_expsyms" | $Xsed -e "$delay_single_quote_subst"`' -prelink_cmds='`$ECHO "X$prelink_cmds" | $Xsed -e "$delay_single_quote_subst"`' -file_list_spec='`$ECHO "X$file_list_spec" | $Xsed -e "$delay_single_quote_subst"`' -variables_saved_for_relink='`$ECHO "X$variables_saved_for_relink" | $Xsed -e "$delay_single_quote_subst"`' -need_lib_prefix='`$ECHO "X$need_lib_prefix" | $Xsed -e "$delay_single_quote_subst"`' -need_version='`$ECHO "X$need_version" | $Xsed -e "$delay_single_quote_subst"`' -version_type='`$ECHO "X$version_type" | $Xsed -e "$delay_single_quote_subst"`' -runpath_var='`$ECHO "X$runpath_var" | $Xsed -e "$delay_single_quote_subst"`' -shlibpath_var='`$ECHO "X$shlibpath_var" | $Xsed -e "$delay_single_quote_subst"`' -shlibpath_overrides_runpath='`$ECHO "X$shlibpath_overrides_runpath" | $Xsed -e "$delay_single_quote_subst"`' -libname_spec='`$ECHO "X$libname_spec" | $Xsed -e "$delay_single_quote_subst"`' -library_names_spec='`$ECHO "X$library_names_spec" | $Xsed -e "$delay_single_quote_subst"`' -soname_spec='`$ECHO "X$soname_spec" | $Xsed -e "$delay_single_quote_subst"`' -postinstall_cmds='`$ECHO "X$postinstall_cmds" | $Xsed -e "$delay_single_quote_subst"`' -postuninstall_cmds='`$ECHO "X$postuninstall_cmds" | $Xsed -e "$delay_single_quote_subst"`' -finish_cmds='`$ECHO "X$finish_cmds" | $Xsed -e "$delay_single_quote_subst"`' -finish_eval='`$ECHO "X$finish_eval" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_into_libs='`$ECHO "X$hardcode_into_libs" | $Xsed -e "$delay_single_quote_subst"`' -sys_lib_search_path_spec='`$ECHO "X$sys_lib_search_path_spec" | $Xsed -e "$delay_single_quote_subst"`' -sys_lib_dlsearch_path_spec='`$ECHO "X$sys_lib_dlsearch_path_spec" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_action='`$ECHO "X$hardcode_action" | $Xsed -e "$delay_single_quote_subst"`' -enable_dlopen='`$ECHO "X$enable_dlopen" | $Xsed -e "$delay_single_quote_subst"`' -enable_dlopen_self='`$ECHO "X$enable_dlopen_self" | $Xsed -e "$delay_single_quote_subst"`' -enable_dlopen_self_static='`$ECHO "X$enable_dlopen_self_static" | $Xsed -e "$delay_single_quote_subst"`' -old_striplib='`$ECHO "X$old_striplib" | $Xsed -e "$delay_single_quote_subst"`' -striplib='`$ECHO "X$striplib" | $Xsed -e "$delay_single_quote_subst"`' -compiler_lib_search_dirs='`$ECHO "X$compiler_lib_search_dirs" | $Xsed -e "$delay_single_quote_subst"`' -predep_objects='`$ECHO "X$predep_objects" | $Xsed -e "$delay_single_quote_subst"`' -postdep_objects='`$ECHO "X$postdep_objects" | $Xsed -e "$delay_single_quote_subst"`' -predeps='`$ECHO "X$predeps" | $Xsed -e "$delay_single_quote_subst"`' -postdeps='`$ECHO "X$postdeps" | $Xsed -e "$delay_single_quote_subst"`' -compiler_lib_search_path='`$ECHO "X$compiler_lib_search_path" | $Xsed -e "$delay_single_quote_subst"`' -LD_CXX='`$ECHO "X$LD_CXX" | $Xsed -e "$delay_single_quote_subst"`' -LD_F77='`$ECHO "X$LD_F77" | $Xsed -e "$delay_single_quote_subst"`' -LD_FC='`$ECHO "X$LD_FC" | $Xsed -e "$delay_single_quote_subst"`' -old_archive_cmds_CXX='`$ECHO "X$old_archive_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`' -old_archive_cmds_F77='`$ECHO "X$old_archive_cmds_F77" | $Xsed -e "$delay_single_quote_subst"`' -old_archive_cmds_FC='`$ECHO "X$old_archive_cmds_FC" | $Xsed -e "$delay_single_quote_subst"`' -compiler_CXX='`$ECHO "X$compiler_CXX" | $Xsed -e "$delay_single_quote_subst"`' -compiler_F77='`$ECHO "X$compiler_F77" | $Xsed -e "$delay_single_quote_subst"`' -compiler_FC='`$ECHO "X$compiler_FC" | $Xsed -e "$delay_single_quote_subst"`' -GCC_CXX='`$ECHO "X$GCC_CXX" | $Xsed -e "$delay_single_quote_subst"`' -GCC_F77='`$ECHO "X$GCC_F77" | $Xsed -e "$delay_single_quote_subst"`' -GCC_FC='`$ECHO "X$GCC_FC" | $Xsed -e "$delay_single_quote_subst"`' -lt_prog_compiler_no_builtin_flag_CXX='`$ECHO "X$lt_prog_compiler_no_builtin_flag_CXX" | $Xsed -e "$delay_single_quote_subst"`' -lt_prog_compiler_no_builtin_flag_F77='`$ECHO "X$lt_prog_compiler_no_builtin_flag_F77" | $Xsed -e "$delay_single_quote_subst"`' -lt_prog_compiler_no_builtin_flag_FC='`$ECHO "X$lt_prog_compiler_no_builtin_flag_FC" | $Xsed -e "$delay_single_quote_subst"`' -lt_prog_compiler_wl_CXX='`$ECHO "X$lt_prog_compiler_wl_CXX" | $Xsed -e "$delay_single_quote_subst"`' -lt_prog_compiler_wl_F77='`$ECHO "X$lt_prog_compiler_wl_F77" | $Xsed -e "$delay_single_quote_subst"`' -lt_prog_compiler_wl_FC='`$ECHO "X$lt_prog_compiler_wl_FC" | $Xsed -e "$delay_single_quote_subst"`' -lt_prog_compiler_pic_CXX='`$ECHO "X$lt_prog_compiler_pic_CXX" | $Xsed -e "$delay_single_quote_subst"`' -lt_prog_compiler_pic_F77='`$ECHO "X$lt_prog_compiler_pic_F77" | $Xsed -e "$delay_single_quote_subst"`' -lt_prog_compiler_pic_FC='`$ECHO "X$lt_prog_compiler_pic_FC" | $Xsed -e "$delay_single_quote_subst"`' -lt_prog_compiler_static_CXX='`$ECHO "X$lt_prog_compiler_static_CXX" | $Xsed -e "$delay_single_quote_subst"`' -lt_prog_compiler_static_F77='`$ECHO "X$lt_prog_compiler_static_F77" | $Xsed -e "$delay_single_quote_subst"`' -lt_prog_compiler_static_FC='`$ECHO "X$lt_prog_compiler_static_FC" | $Xsed -e "$delay_single_quote_subst"`' -lt_cv_prog_compiler_c_o_CXX='`$ECHO "X$lt_cv_prog_compiler_c_o_CXX" | $Xsed -e "$delay_single_quote_subst"`' -lt_cv_prog_compiler_c_o_F77='`$ECHO "X$lt_cv_prog_compiler_c_o_F77" | $Xsed -e "$delay_single_quote_subst"`' -lt_cv_prog_compiler_c_o_FC='`$ECHO "X$lt_cv_prog_compiler_c_o_FC" | $Xsed -e "$delay_single_quote_subst"`' -archive_cmds_need_lc_CXX='`$ECHO "X$archive_cmds_need_lc_CXX" | $Xsed -e "$delay_single_quote_subst"`' -archive_cmds_need_lc_F77='`$ECHO "X$archive_cmds_need_lc_F77" | $Xsed -e "$delay_single_quote_subst"`' -archive_cmds_need_lc_FC='`$ECHO "X$archive_cmds_need_lc_FC" | $Xsed -e "$delay_single_quote_subst"`' -enable_shared_with_static_runtimes_CXX='`$ECHO "X$enable_shared_with_static_runtimes_CXX" | $Xsed -e "$delay_single_quote_subst"`' -enable_shared_with_static_runtimes_F77='`$ECHO "X$enable_shared_with_static_runtimes_F77" | $Xsed -e "$delay_single_quote_subst"`' -enable_shared_with_static_runtimes_FC='`$ECHO "X$enable_shared_with_static_runtimes_FC" | $Xsed -e "$delay_single_quote_subst"`' -export_dynamic_flag_spec_CXX='`$ECHO "X$export_dynamic_flag_spec_CXX" | $Xsed -e "$delay_single_quote_subst"`' -export_dynamic_flag_spec_F77='`$ECHO "X$export_dynamic_flag_spec_F77" | $Xsed -e "$delay_single_quote_subst"`' -export_dynamic_flag_spec_FC='`$ECHO "X$export_dynamic_flag_spec_FC" | $Xsed -e "$delay_single_quote_subst"`' -whole_archive_flag_spec_CXX='`$ECHO "X$whole_archive_flag_spec_CXX" | $Xsed -e "$delay_single_quote_subst"`' -whole_archive_flag_spec_F77='`$ECHO "X$whole_archive_flag_spec_F77" | $Xsed -e "$delay_single_quote_subst"`' -whole_archive_flag_spec_FC='`$ECHO "X$whole_archive_flag_spec_FC" | $Xsed -e "$delay_single_quote_subst"`' -compiler_needs_object_CXX='`$ECHO "X$compiler_needs_object_CXX" | $Xsed -e "$delay_single_quote_subst"`' -compiler_needs_object_F77='`$ECHO "X$compiler_needs_object_F77" | $Xsed -e "$delay_single_quote_subst"`' -compiler_needs_object_FC='`$ECHO "X$compiler_needs_object_FC" | $Xsed -e "$delay_single_quote_subst"`' -old_archive_from_new_cmds_CXX='`$ECHO "X$old_archive_from_new_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`' -old_archive_from_new_cmds_F77='`$ECHO "X$old_archive_from_new_cmds_F77" | $Xsed -e "$delay_single_quote_subst"`' -old_archive_from_new_cmds_FC='`$ECHO "X$old_archive_from_new_cmds_FC" | $Xsed -e "$delay_single_quote_subst"`' -old_archive_from_expsyms_cmds_CXX='`$ECHO "X$old_archive_from_expsyms_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`' -old_archive_from_expsyms_cmds_F77='`$ECHO "X$old_archive_from_expsyms_cmds_F77" | $Xsed -e "$delay_single_quote_subst"`' -old_archive_from_expsyms_cmds_FC='`$ECHO "X$old_archive_from_expsyms_cmds_FC" | $Xsed -e "$delay_single_quote_subst"`' -archive_cmds_CXX='`$ECHO "X$archive_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`' -archive_cmds_F77='`$ECHO "X$archive_cmds_F77" | $Xsed -e "$delay_single_quote_subst"`' -archive_cmds_FC='`$ECHO "X$archive_cmds_FC" | $Xsed -e "$delay_single_quote_subst"`' -archive_expsym_cmds_CXX='`$ECHO "X$archive_expsym_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`' -archive_expsym_cmds_F77='`$ECHO "X$archive_expsym_cmds_F77" | $Xsed -e "$delay_single_quote_subst"`' -archive_expsym_cmds_FC='`$ECHO "X$archive_expsym_cmds_FC" | $Xsed -e "$delay_single_quote_subst"`' -module_cmds_CXX='`$ECHO "X$module_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`' -module_cmds_F77='`$ECHO "X$module_cmds_F77" | $Xsed -e "$delay_single_quote_subst"`' -module_cmds_FC='`$ECHO "X$module_cmds_FC" | $Xsed -e "$delay_single_quote_subst"`' -module_expsym_cmds_CXX='`$ECHO "X$module_expsym_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`' -module_expsym_cmds_F77='`$ECHO "X$module_expsym_cmds_F77" | $Xsed -e "$delay_single_quote_subst"`' -module_expsym_cmds_FC='`$ECHO "X$module_expsym_cmds_FC" | $Xsed -e "$delay_single_quote_subst"`' -with_gnu_ld_CXX='`$ECHO "X$with_gnu_ld_CXX" | $Xsed -e "$delay_single_quote_subst"`' -with_gnu_ld_F77='`$ECHO "X$with_gnu_ld_F77" | $Xsed -e "$delay_single_quote_subst"`' -with_gnu_ld_FC='`$ECHO "X$with_gnu_ld_FC" | $Xsed -e "$delay_single_quote_subst"`' -allow_undefined_flag_CXX='`$ECHO "X$allow_undefined_flag_CXX" | $Xsed -e "$delay_single_quote_subst"`' -allow_undefined_flag_F77='`$ECHO "X$allow_undefined_flag_F77" | $Xsed -e "$delay_single_quote_subst"`' -allow_undefined_flag_FC='`$ECHO "X$allow_undefined_flag_FC" | $Xsed -e "$delay_single_quote_subst"`' -no_undefined_flag_CXX='`$ECHO "X$no_undefined_flag_CXX" | $Xsed -e "$delay_single_quote_subst"`' -no_undefined_flag_F77='`$ECHO "X$no_undefined_flag_F77" | $Xsed -e "$delay_single_quote_subst"`' -no_undefined_flag_FC='`$ECHO "X$no_undefined_flag_FC" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_libdir_flag_spec_CXX='`$ECHO "X$hardcode_libdir_flag_spec_CXX" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_libdir_flag_spec_F77='`$ECHO "X$hardcode_libdir_flag_spec_F77" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_libdir_flag_spec_FC='`$ECHO "X$hardcode_libdir_flag_spec_FC" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_libdir_flag_spec_ld_CXX='`$ECHO "X$hardcode_libdir_flag_spec_ld_CXX" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_libdir_flag_spec_ld_F77='`$ECHO "X$hardcode_libdir_flag_spec_ld_F77" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_libdir_flag_spec_ld_FC='`$ECHO "X$hardcode_libdir_flag_spec_ld_FC" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_libdir_separator_CXX='`$ECHO "X$hardcode_libdir_separator_CXX" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_libdir_separator_F77='`$ECHO "X$hardcode_libdir_separator_F77" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_libdir_separator_FC='`$ECHO "X$hardcode_libdir_separator_FC" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_direct_CXX='`$ECHO "X$hardcode_direct_CXX" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_direct_F77='`$ECHO "X$hardcode_direct_F77" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_direct_FC='`$ECHO "X$hardcode_direct_FC" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_direct_absolute_CXX='`$ECHO "X$hardcode_direct_absolute_CXX" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_direct_absolute_F77='`$ECHO "X$hardcode_direct_absolute_F77" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_direct_absolute_FC='`$ECHO "X$hardcode_direct_absolute_FC" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_minus_L_CXX='`$ECHO "X$hardcode_minus_L_CXX" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_minus_L_F77='`$ECHO "X$hardcode_minus_L_F77" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_minus_L_FC='`$ECHO "X$hardcode_minus_L_FC" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_shlibpath_var_CXX='`$ECHO "X$hardcode_shlibpath_var_CXX" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_shlibpath_var_F77='`$ECHO "X$hardcode_shlibpath_var_F77" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_shlibpath_var_FC='`$ECHO "X$hardcode_shlibpath_var_FC" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_automatic_CXX='`$ECHO "X$hardcode_automatic_CXX" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_automatic_F77='`$ECHO "X$hardcode_automatic_F77" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_automatic_FC='`$ECHO "X$hardcode_automatic_FC" | $Xsed -e "$delay_single_quote_subst"`' -inherit_rpath_CXX='`$ECHO "X$inherit_rpath_CXX" | $Xsed -e "$delay_single_quote_subst"`' -inherit_rpath_F77='`$ECHO "X$inherit_rpath_F77" | $Xsed -e "$delay_single_quote_subst"`' -inherit_rpath_FC='`$ECHO "X$inherit_rpath_FC" | $Xsed -e "$delay_single_quote_subst"`' -link_all_deplibs_CXX='`$ECHO "X$link_all_deplibs_CXX" | $Xsed -e "$delay_single_quote_subst"`' -link_all_deplibs_F77='`$ECHO "X$link_all_deplibs_F77" | $Xsed -e "$delay_single_quote_subst"`' -link_all_deplibs_FC='`$ECHO "X$link_all_deplibs_FC" | $Xsed -e "$delay_single_quote_subst"`' -fix_srcfile_path_CXX='`$ECHO "X$fix_srcfile_path_CXX" | $Xsed -e "$delay_single_quote_subst"`' -fix_srcfile_path_F77='`$ECHO "X$fix_srcfile_path_F77" | $Xsed -e "$delay_single_quote_subst"`' -fix_srcfile_path_FC='`$ECHO "X$fix_srcfile_path_FC" | $Xsed -e "$delay_single_quote_subst"`' -always_export_symbols_CXX='`$ECHO "X$always_export_symbols_CXX" | $Xsed -e "$delay_single_quote_subst"`' -always_export_symbols_F77='`$ECHO "X$always_export_symbols_F77" | $Xsed -e "$delay_single_quote_subst"`' -always_export_symbols_FC='`$ECHO "X$always_export_symbols_FC" | $Xsed -e "$delay_single_quote_subst"`' -export_symbols_cmds_CXX='`$ECHO "X$export_symbols_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`' -export_symbols_cmds_F77='`$ECHO "X$export_symbols_cmds_F77" | $Xsed -e "$delay_single_quote_subst"`' -export_symbols_cmds_FC='`$ECHO "X$export_symbols_cmds_FC" | $Xsed -e "$delay_single_quote_subst"`' -exclude_expsyms_CXX='`$ECHO "X$exclude_expsyms_CXX" | $Xsed -e "$delay_single_quote_subst"`' -exclude_expsyms_F77='`$ECHO "X$exclude_expsyms_F77" | $Xsed -e "$delay_single_quote_subst"`' -exclude_expsyms_FC='`$ECHO "X$exclude_expsyms_FC" | $Xsed -e "$delay_single_quote_subst"`' -include_expsyms_CXX='`$ECHO "X$include_expsyms_CXX" | $Xsed -e "$delay_single_quote_subst"`' -include_expsyms_F77='`$ECHO "X$include_expsyms_F77" | $Xsed -e "$delay_single_quote_subst"`' -include_expsyms_FC='`$ECHO "X$include_expsyms_FC" | $Xsed -e "$delay_single_quote_subst"`' -prelink_cmds_CXX='`$ECHO "X$prelink_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`' -prelink_cmds_F77='`$ECHO "X$prelink_cmds_F77" | $Xsed -e "$delay_single_quote_subst"`' -prelink_cmds_FC='`$ECHO "X$prelink_cmds_FC" | $Xsed -e "$delay_single_quote_subst"`' -file_list_spec_CXX='`$ECHO "X$file_list_spec_CXX" | $Xsed -e "$delay_single_quote_subst"`' -file_list_spec_F77='`$ECHO "X$file_list_spec_F77" | $Xsed -e "$delay_single_quote_subst"`' -file_list_spec_FC='`$ECHO "X$file_list_spec_FC" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_action_CXX='`$ECHO "X$hardcode_action_CXX" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_action_F77='`$ECHO "X$hardcode_action_F77" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_action_FC='`$ECHO "X$hardcode_action_FC" | $Xsed -e "$delay_single_quote_subst"`' -compiler_lib_search_dirs_CXX='`$ECHO "X$compiler_lib_search_dirs_CXX" | $Xsed -e "$delay_single_quote_subst"`' -compiler_lib_search_dirs_F77='`$ECHO "X$compiler_lib_search_dirs_F77" | $Xsed -e "$delay_single_quote_subst"`' -compiler_lib_search_dirs_FC='`$ECHO "X$compiler_lib_search_dirs_FC" | $Xsed -e "$delay_single_quote_subst"`' -predep_objects_CXX='`$ECHO "X$predep_objects_CXX" | $Xsed -e "$delay_single_quote_subst"`' -predep_objects_F77='`$ECHO "X$predep_objects_F77" | $Xsed -e "$delay_single_quote_subst"`' -predep_objects_FC='`$ECHO "X$predep_objects_FC" | $Xsed -e "$delay_single_quote_subst"`' -postdep_objects_CXX='`$ECHO "X$postdep_objects_CXX" | $Xsed -e "$delay_single_quote_subst"`' -postdep_objects_F77='`$ECHO "X$postdep_objects_F77" | $Xsed -e "$delay_single_quote_subst"`' -postdep_objects_FC='`$ECHO "X$postdep_objects_FC" | $Xsed -e "$delay_single_quote_subst"`' -predeps_CXX='`$ECHO "X$predeps_CXX" | $Xsed -e "$delay_single_quote_subst"`' -predeps_F77='`$ECHO "X$predeps_F77" | $Xsed -e "$delay_single_quote_subst"`' -predeps_FC='`$ECHO "X$predeps_FC" | $Xsed -e "$delay_single_quote_subst"`' -postdeps_CXX='`$ECHO "X$postdeps_CXX" | $Xsed -e "$delay_single_quote_subst"`' -postdeps_F77='`$ECHO "X$postdeps_F77" | $Xsed -e "$delay_single_quote_subst"`' -postdeps_FC='`$ECHO "X$postdeps_FC" | $Xsed -e "$delay_single_quote_subst"`' -compiler_lib_search_path_CXX='`$ECHO "X$compiler_lib_search_path_CXX" | $Xsed -e "$delay_single_quote_subst"`' -compiler_lib_search_path_F77='`$ECHO "X$compiler_lib_search_path_F77" | $Xsed -e "$delay_single_quote_subst"`' -compiler_lib_search_path_FC='`$ECHO "X$compiler_lib_search_path_FC" | $Xsed -e "$delay_single_quote_subst"`' +macro_version='`$ECHO "$macro_version" | $SED "$delay_single_quote_subst"`' +macro_revision='`$ECHO "$macro_revision" | $SED "$delay_single_quote_subst"`' +enable_shared='`$ECHO "$enable_shared" | $SED "$delay_single_quote_subst"`' +enable_static='`$ECHO "$enable_static" | $SED "$delay_single_quote_subst"`' +pic_mode='`$ECHO "$pic_mode" | $SED "$delay_single_quote_subst"`' +enable_fast_install='`$ECHO "$enable_fast_install" | $SED "$delay_single_quote_subst"`' +SHELL='`$ECHO "$SHELL" | $SED "$delay_single_quote_subst"`' +ECHO='`$ECHO "$ECHO" | $SED "$delay_single_quote_subst"`' +host_alias='`$ECHO "$host_alias" | $SED "$delay_single_quote_subst"`' +host='`$ECHO "$host" | $SED "$delay_single_quote_subst"`' +host_os='`$ECHO "$host_os" | $SED "$delay_single_quote_subst"`' +build_alias='`$ECHO "$build_alias" | $SED "$delay_single_quote_subst"`' +build='`$ECHO "$build" | $SED "$delay_single_quote_subst"`' +build_os='`$ECHO "$build_os" | $SED "$delay_single_quote_subst"`' +SED='`$ECHO "$SED" | $SED "$delay_single_quote_subst"`' +Xsed='`$ECHO "$Xsed" | $SED "$delay_single_quote_subst"`' +GREP='`$ECHO "$GREP" | $SED "$delay_single_quote_subst"`' +EGREP='`$ECHO "$EGREP" | $SED "$delay_single_quote_subst"`' +FGREP='`$ECHO "$FGREP" | $SED "$delay_single_quote_subst"`' +LD='`$ECHO "$LD" | $SED "$delay_single_quote_subst"`' +NM='`$ECHO "$NM" | $SED "$delay_single_quote_subst"`' +LN_S='`$ECHO "$LN_S" | $SED "$delay_single_quote_subst"`' +max_cmd_len='`$ECHO "$max_cmd_len" | $SED "$delay_single_quote_subst"`' +ac_objext='`$ECHO "$ac_objext" | $SED "$delay_single_quote_subst"`' +exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`' +lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`' +lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`' +lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`' +lt_cv_to_host_file_cmd='`$ECHO "$lt_cv_to_host_file_cmd" | $SED "$delay_single_quote_subst"`' +lt_cv_to_tool_file_cmd='`$ECHO "$lt_cv_to_tool_file_cmd" | $SED "$delay_single_quote_subst"`' +reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`' +reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`' +OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$delay_single_quote_subst"`' +deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`' +file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`' +file_magic_glob='`$ECHO "$file_magic_glob" | $SED "$delay_single_quote_subst"`' +want_nocaseglob='`$ECHO "$want_nocaseglob" | $SED "$delay_single_quote_subst"`' +DLLTOOL='`$ECHO "$DLLTOOL" | $SED "$delay_single_quote_subst"`' +sharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`' +AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`' +AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`' +archiver_list_spec='`$ECHO "$archiver_list_spec" | $SED "$delay_single_quote_subst"`' +STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`' +RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`' +old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`' +old_postuninstall_cmds='`$ECHO "$old_postuninstall_cmds" | $SED "$delay_single_quote_subst"`' +old_archive_cmds='`$ECHO "$old_archive_cmds" | $SED "$delay_single_quote_subst"`' +lock_old_archive_extraction='`$ECHO "$lock_old_archive_extraction" | $SED "$delay_single_quote_subst"`' +CC='`$ECHO "$CC" | $SED "$delay_single_quote_subst"`' +CFLAGS='`$ECHO "$CFLAGS" | $SED "$delay_single_quote_subst"`' +compiler='`$ECHO "$compiler" | $SED "$delay_single_quote_subst"`' +GCC='`$ECHO "$GCC" | $SED "$delay_single_quote_subst"`' +lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$delay_single_quote_subst"`' +lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`' +lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`' +lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $SED "$delay_single_quote_subst"`' +nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`' +lt_sysroot='`$ECHO "$lt_sysroot" | $SED "$delay_single_quote_subst"`' +objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`' +MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`' +lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`' +lt_prog_compiler_pic='`$ECHO "$lt_prog_compiler_pic" | $SED "$delay_single_quote_subst"`' +lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`' +lt_prog_compiler_static='`$ECHO "$lt_prog_compiler_static" | $SED "$delay_single_quote_subst"`' +lt_cv_prog_compiler_c_o='`$ECHO "$lt_cv_prog_compiler_c_o" | $SED "$delay_single_quote_subst"`' +need_locks='`$ECHO "$need_locks" | $SED "$delay_single_quote_subst"`' +MANIFEST_TOOL='`$ECHO "$MANIFEST_TOOL" | $SED "$delay_single_quote_subst"`' +DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`' +NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`' +LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`' +OTOOL='`$ECHO "$OTOOL" | $SED "$delay_single_quote_subst"`' +OTOOL64='`$ECHO "$OTOOL64" | $SED "$delay_single_quote_subst"`' +libext='`$ECHO "$libext" | $SED "$delay_single_quote_subst"`' +shrext_cmds='`$ECHO "$shrext_cmds" | $SED "$delay_single_quote_subst"`' +extract_expsyms_cmds='`$ECHO "$extract_expsyms_cmds" | $SED "$delay_single_quote_subst"`' +archive_cmds_need_lc='`$ECHO "$archive_cmds_need_lc" | $SED "$delay_single_quote_subst"`' +enable_shared_with_static_runtimes='`$ECHO "$enable_shared_with_static_runtimes" | $SED "$delay_single_quote_subst"`' +export_dynamic_flag_spec='`$ECHO "$export_dynamic_flag_spec" | $SED "$delay_single_quote_subst"`' +whole_archive_flag_spec='`$ECHO "$whole_archive_flag_spec" | $SED "$delay_single_quote_subst"`' +compiler_needs_object='`$ECHO "$compiler_needs_object" | $SED "$delay_single_quote_subst"`' +old_archive_from_new_cmds='`$ECHO "$old_archive_from_new_cmds" | $SED "$delay_single_quote_subst"`' +old_archive_from_expsyms_cmds='`$ECHO "$old_archive_from_expsyms_cmds" | $SED "$delay_single_quote_subst"`' +archive_cmds='`$ECHO "$archive_cmds" | $SED "$delay_single_quote_subst"`' +archive_expsym_cmds='`$ECHO "$archive_expsym_cmds" | $SED "$delay_single_quote_subst"`' +module_cmds='`$ECHO "$module_cmds" | $SED "$delay_single_quote_subst"`' +module_expsym_cmds='`$ECHO "$module_expsym_cmds" | $SED "$delay_single_quote_subst"`' +with_gnu_ld='`$ECHO "$with_gnu_ld" | $SED "$delay_single_quote_subst"`' +allow_undefined_flag='`$ECHO "$allow_undefined_flag" | $SED "$delay_single_quote_subst"`' +no_undefined_flag='`$ECHO "$no_undefined_flag" | $SED "$delay_single_quote_subst"`' +hardcode_libdir_flag_spec='`$ECHO "$hardcode_libdir_flag_spec" | $SED "$delay_single_quote_subst"`' +hardcode_libdir_flag_spec_ld='`$ECHO "$hardcode_libdir_flag_spec_ld" | $SED "$delay_single_quote_subst"`' +hardcode_libdir_separator='`$ECHO "$hardcode_libdir_separator" | $SED "$delay_single_quote_subst"`' +hardcode_direct='`$ECHO "$hardcode_direct" | $SED "$delay_single_quote_subst"`' +hardcode_direct_absolute='`$ECHO "$hardcode_direct_absolute" | $SED "$delay_single_quote_subst"`' +hardcode_minus_L='`$ECHO "$hardcode_minus_L" | $SED "$delay_single_quote_subst"`' +hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_quote_subst"`' +hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`' +inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`' +link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`' +always_export_symbols='`$ECHO "$always_export_symbols" | $SED "$delay_single_quote_subst"`' +export_symbols_cmds='`$ECHO "$export_symbols_cmds" | $SED "$delay_single_quote_subst"`' +exclude_expsyms='`$ECHO "$exclude_expsyms" | $SED "$delay_single_quote_subst"`' +include_expsyms='`$ECHO "$include_expsyms" | $SED "$delay_single_quote_subst"`' +prelink_cmds='`$ECHO "$prelink_cmds" | $SED "$delay_single_quote_subst"`' +postlink_cmds='`$ECHO "$postlink_cmds" | $SED "$delay_single_quote_subst"`' +file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`' +variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`' +need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`' +need_version='`$ECHO "$need_version" | $SED "$delay_single_quote_subst"`' +version_type='`$ECHO "$version_type" | $SED "$delay_single_quote_subst"`' +runpath_var='`$ECHO "$runpath_var" | $SED "$delay_single_quote_subst"`' +shlibpath_var='`$ECHO "$shlibpath_var" | $SED "$delay_single_quote_subst"`' +shlibpath_overrides_runpath='`$ECHO "$shlibpath_overrides_runpath" | $SED "$delay_single_quote_subst"`' +libname_spec='`$ECHO "$libname_spec" | $SED "$delay_single_quote_subst"`' +library_names_spec='`$ECHO "$library_names_spec" | $SED "$delay_single_quote_subst"`' +soname_spec='`$ECHO "$soname_spec" | $SED "$delay_single_quote_subst"`' +install_override_mode='`$ECHO "$install_override_mode" | $SED "$delay_single_quote_subst"`' +postinstall_cmds='`$ECHO "$postinstall_cmds" | $SED "$delay_single_quote_subst"`' +postuninstall_cmds='`$ECHO "$postuninstall_cmds" | $SED "$delay_single_quote_subst"`' +finish_cmds='`$ECHO "$finish_cmds" | $SED "$delay_single_quote_subst"`' +finish_eval='`$ECHO "$finish_eval" | $SED "$delay_single_quote_subst"`' +hardcode_into_libs='`$ECHO "$hardcode_into_libs" | $SED "$delay_single_quote_subst"`' +sys_lib_search_path_spec='`$ECHO "$sys_lib_search_path_spec" | $SED "$delay_single_quote_subst"`' +sys_lib_dlsearch_path_spec='`$ECHO "$sys_lib_dlsearch_path_spec" | $SED "$delay_single_quote_subst"`' +hardcode_action='`$ECHO "$hardcode_action" | $SED "$delay_single_quote_subst"`' +enable_dlopen='`$ECHO "$enable_dlopen" | $SED "$delay_single_quote_subst"`' +enable_dlopen_self='`$ECHO "$enable_dlopen_self" | $SED "$delay_single_quote_subst"`' +enable_dlopen_self_static='`$ECHO "$enable_dlopen_self_static" | $SED "$delay_single_quote_subst"`' +old_striplib='`$ECHO "$old_striplib" | $SED "$delay_single_quote_subst"`' +striplib='`$ECHO "$striplib" | $SED "$delay_single_quote_subst"`' +compiler_lib_search_dirs='`$ECHO "$compiler_lib_search_dirs" | $SED "$delay_single_quote_subst"`' +predep_objects='`$ECHO "$predep_objects" | $SED "$delay_single_quote_subst"`' +postdep_objects='`$ECHO "$postdep_objects" | $SED "$delay_single_quote_subst"`' +predeps='`$ECHO "$predeps" | $SED "$delay_single_quote_subst"`' +postdeps='`$ECHO "$postdeps" | $SED "$delay_single_quote_subst"`' +compiler_lib_search_path='`$ECHO "$compiler_lib_search_path" | $SED "$delay_single_quote_subst"`' +LD_CXX='`$ECHO "$LD_CXX" | $SED "$delay_single_quote_subst"`' +LD_F77='`$ECHO "$LD_F77" | $SED "$delay_single_quote_subst"`' +LD_FC='`$ECHO "$LD_FC" | $SED "$delay_single_quote_subst"`' +reload_flag_CXX='`$ECHO "$reload_flag_CXX" | $SED "$delay_single_quote_subst"`' +reload_flag_F77='`$ECHO "$reload_flag_F77" | $SED "$delay_single_quote_subst"`' +reload_flag_FC='`$ECHO "$reload_flag_FC" | $SED "$delay_single_quote_subst"`' +reload_cmds_CXX='`$ECHO "$reload_cmds_CXX" | $SED "$delay_single_quote_subst"`' +reload_cmds_F77='`$ECHO "$reload_cmds_F77" | $SED "$delay_single_quote_subst"`' +reload_cmds_FC='`$ECHO "$reload_cmds_FC" | $SED "$delay_single_quote_subst"`' +old_archive_cmds_CXX='`$ECHO "$old_archive_cmds_CXX" | $SED "$delay_single_quote_subst"`' +old_archive_cmds_F77='`$ECHO "$old_archive_cmds_F77" | $SED "$delay_single_quote_subst"`' +old_archive_cmds_FC='`$ECHO "$old_archive_cmds_FC" | $SED "$delay_single_quote_subst"`' +compiler_CXX='`$ECHO "$compiler_CXX" | $SED "$delay_single_quote_subst"`' +compiler_F77='`$ECHO "$compiler_F77" | $SED "$delay_single_quote_subst"`' +compiler_FC='`$ECHO "$compiler_FC" | $SED "$delay_single_quote_subst"`' +GCC_CXX='`$ECHO "$GCC_CXX" | $SED "$delay_single_quote_subst"`' +GCC_F77='`$ECHO "$GCC_F77" | $SED "$delay_single_quote_subst"`' +GCC_FC='`$ECHO "$GCC_FC" | $SED "$delay_single_quote_subst"`' +lt_prog_compiler_no_builtin_flag_CXX='`$ECHO "$lt_prog_compiler_no_builtin_flag_CXX" | $SED "$delay_single_quote_subst"`' +lt_prog_compiler_no_builtin_flag_F77='`$ECHO "$lt_prog_compiler_no_builtin_flag_F77" | $SED "$delay_single_quote_subst"`' +lt_prog_compiler_no_builtin_flag_FC='`$ECHO "$lt_prog_compiler_no_builtin_flag_FC" | $SED "$delay_single_quote_subst"`' +lt_prog_compiler_pic_CXX='`$ECHO "$lt_prog_compiler_pic_CXX" | $SED "$delay_single_quote_subst"`' +lt_prog_compiler_pic_F77='`$ECHO "$lt_prog_compiler_pic_F77" | $SED "$delay_single_quote_subst"`' +lt_prog_compiler_pic_FC='`$ECHO "$lt_prog_compiler_pic_FC" | $SED "$delay_single_quote_subst"`' +lt_prog_compiler_wl_CXX='`$ECHO "$lt_prog_compiler_wl_CXX" | $SED "$delay_single_quote_subst"`' +lt_prog_compiler_wl_F77='`$ECHO "$lt_prog_compiler_wl_F77" | $SED "$delay_single_quote_subst"`' +lt_prog_compiler_wl_FC='`$ECHO "$lt_prog_compiler_wl_FC" | $SED "$delay_single_quote_subst"`' +lt_prog_compiler_static_CXX='`$ECHO "$lt_prog_compiler_static_CXX" | $SED "$delay_single_quote_subst"`' +lt_prog_compiler_static_F77='`$ECHO "$lt_prog_compiler_static_F77" | $SED "$delay_single_quote_subst"`' +lt_prog_compiler_static_FC='`$ECHO "$lt_prog_compiler_static_FC" | $SED "$delay_single_quote_subst"`' +lt_cv_prog_compiler_c_o_CXX='`$ECHO "$lt_cv_prog_compiler_c_o_CXX" | $SED "$delay_single_quote_subst"`' +lt_cv_prog_compiler_c_o_F77='`$ECHO "$lt_cv_prog_compiler_c_o_F77" | $SED "$delay_single_quote_subst"`' +lt_cv_prog_compiler_c_o_FC='`$ECHO "$lt_cv_prog_compiler_c_o_FC" | $SED "$delay_single_quote_subst"`' +archive_cmds_need_lc_CXX='`$ECHO "$archive_cmds_need_lc_CXX" | $SED "$delay_single_quote_subst"`' +archive_cmds_need_lc_F77='`$ECHO "$archive_cmds_need_lc_F77" | $SED "$delay_single_quote_subst"`' +archive_cmds_need_lc_FC='`$ECHO "$archive_cmds_need_lc_FC" | $SED "$delay_single_quote_subst"`' +enable_shared_with_static_runtimes_CXX='`$ECHO "$enable_shared_with_static_runtimes_CXX" | $SED "$delay_single_quote_subst"`' +enable_shared_with_static_runtimes_F77='`$ECHO "$enable_shared_with_static_runtimes_F77" | $SED "$delay_single_quote_subst"`' +enable_shared_with_static_runtimes_FC='`$ECHO "$enable_shared_with_static_runtimes_FC" | $SED "$delay_single_quote_subst"`' +export_dynamic_flag_spec_CXX='`$ECHO "$export_dynamic_flag_spec_CXX" | $SED "$delay_single_quote_subst"`' +export_dynamic_flag_spec_F77='`$ECHO "$export_dynamic_flag_spec_F77" | $SED "$delay_single_quote_subst"`' +export_dynamic_flag_spec_FC='`$ECHO "$export_dynamic_flag_spec_FC" | $SED "$delay_single_quote_subst"`' +whole_archive_flag_spec_CXX='`$ECHO "$whole_archive_flag_spec_CXX" | $SED "$delay_single_quote_subst"`' +whole_archive_flag_spec_F77='`$ECHO "$whole_archive_flag_spec_F77" | $SED "$delay_single_quote_subst"`' +whole_archive_flag_spec_FC='`$ECHO "$whole_archive_flag_spec_FC" | $SED "$delay_single_quote_subst"`' +compiler_needs_object_CXX='`$ECHO "$compiler_needs_object_CXX" | $SED "$delay_single_quote_subst"`' +compiler_needs_object_F77='`$ECHO "$compiler_needs_object_F77" | $SED "$delay_single_quote_subst"`' +compiler_needs_object_FC='`$ECHO "$compiler_needs_object_FC" | $SED "$delay_single_quote_subst"`' +old_archive_from_new_cmds_CXX='`$ECHO "$old_archive_from_new_cmds_CXX" | $SED "$delay_single_quote_subst"`' +old_archive_from_new_cmds_F77='`$ECHO "$old_archive_from_new_cmds_F77" | $SED "$delay_single_quote_subst"`' +old_archive_from_new_cmds_FC='`$ECHO "$old_archive_from_new_cmds_FC" | $SED "$delay_single_quote_subst"`' +old_archive_from_expsyms_cmds_CXX='`$ECHO "$old_archive_from_expsyms_cmds_CXX" | $SED "$delay_single_quote_subst"`' +old_archive_from_expsyms_cmds_F77='`$ECHO "$old_archive_from_expsyms_cmds_F77" | $SED "$delay_single_quote_subst"`' +old_archive_from_expsyms_cmds_FC='`$ECHO "$old_archive_from_expsyms_cmds_FC" | $SED "$delay_single_quote_subst"`' +archive_cmds_CXX='`$ECHO "$archive_cmds_CXX" | $SED "$delay_single_quote_subst"`' +archive_cmds_F77='`$ECHO "$archive_cmds_F77" | $SED "$delay_single_quote_subst"`' +archive_cmds_FC='`$ECHO "$archive_cmds_FC" | $SED "$delay_single_quote_subst"`' +archive_expsym_cmds_CXX='`$ECHO "$archive_expsym_cmds_CXX" | $SED "$delay_single_quote_subst"`' +archive_expsym_cmds_F77='`$ECHO "$archive_expsym_cmds_F77" | $SED "$delay_single_quote_subst"`' +archive_expsym_cmds_FC='`$ECHO "$archive_expsym_cmds_FC" | $SED "$delay_single_quote_subst"`' +module_cmds_CXX='`$ECHO "$module_cmds_CXX" | $SED "$delay_single_quote_subst"`' +module_cmds_F77='`$ECHO "$module_cmds_F77" | $SED "$delay_single_quote_subst"`' +module_cmds_FC='`$ECHO "$module_cmds_FC" | $SED "$delay_single_quote_subst"`' +module_expsym_cmds_CXX='`$ECHO "$module_expsym_cmds_CXX" | $SED "$delay_single_quote_subst"`' +module_expsym_cmds_F77='`$ECHO "$module_expsym_cmds_F77" | $SED "$delay_single_quote_subst"`' +module_expsym_cmds_FC='`$ECHO "$module_expsym_cmds_FC" | $SED "$delay_single_quote_subst"`' +with_gnu_ld_CXX='`$ECHO "$with_gnu_ld_CXX" | $SED "$delay_single_quote_subst"`' +with_gnu_ld_F77='`$ECHO "$with_gnu_ld_F77" | $SED "$delay_single_quote_subst"`' +with_gnu_ld_FC='`$ECHO "$with_gnu_ld_FC" | $SED "$delay_single_quote_subst"`' +allow_undefined_flag_CXX='`$ECHO "$allow_undefined_flag_CXX" | $SED "$delay_single_quote_subst"`' +allow_undefined_flag_F77='`$ECHO "$allow_undefined_flag_F77" | $SED "$delay_single_quote_subst"`' +allow_undefined_flag_FC='`$ECHO "$allow_undefined_flag_FC" | $SED "$delay_single_quote_subst"`' +no_undefined_flag_CXX='`$ECHO "$no_undefined_flag_CXX" | $SED "$delay_single_quote_subst"`' +no_undefined_flag_F77='`$ECHO "$no_undefined_flag_F77" | $SED "$delay_single_quote_subst"`' +no_undefined_flag_FC='`$ECHO "$no_undefined_flag_FC" | $SED "$delay_single_quote_subst"`' +hardcode_libdir_flag_spec_CXX='`$ECHO "$hardcode_libdir_flag_spec_CXX" | $SED "$delay_single_quote_subst"`' +hardcode_libdir_flag_spec_F77='`$ECHO "$hardcode_libdir_flag_spec_F77" | $SED "$delay_single_quote_subst"`' +hardcode_libdir_flag_spec_FC='`$ECHO "$hardcode_libdir_flag_spec_FC" | $SED "$delay_single_quote_subst"`' +hardcode_libdir_flag_spec_ld_CXX='`$ECHO "$hardcode_libdir_flag_spec_ld_CXX" | $SED "$delay_single_quote_subst"`' +hardcode_libdir_flag_spec_ld_F77='`$ECHO "$hardcode_libdir_flag_spec_ld_F77" | $SED "$delay_single_quote_subst"`' +hardcode_libdir_flag_spec_ld_FC='`$ECHO "$hardcode_libdir_flag_spec_ld_FC" | $SED "$delay_single_quote_subst"`' +hardcode_libdir_separator_CXX='`$ECHO "$hardcode_libdir_separator_CXX" | $SED "$delay_single_quote_subst"`' +hardcode_libdir_separator_F77='`$ECHO "$hardcode_libdir_separator_F77" | $SED "$delay_single_quote_subst"`' +hardcode_libdir_separator_FC='`$ECHO "$hardcode_libdir_separator_FC" | $SED "$delay_single_quote_subst"`' +hardcode_direct_CXX='`$ECHO "$hardcode_direct_CXX" | $SED "$delay_single_quote_subst"`' +hardcode_direct_F77='`$ECHO "$hardcode_direct_F77" | $SED "$delay_single_quote_subst"`' +hardcode_direct_FC='`$ECHO "$hardcode_direct_FC" | $SED "$delay_single_quote_subst"`' +hardcode_direct_absolute_CXX='`$ECHO "$hardcode_direct_absolute_CXX" | $SED "$delay_single_quote_subst"`' +hardcode_direct_absolute_F77='`$ECHO "$hardcode_direct_absolute_F77" | $SED "$delay_single_quote_subst"`' +hardcode_direct_absolute_FC='`$ECHO "$hardcode_direct_absolute_FC" | $SED "$delay_single_quote_subst"`' +hardcode_minus_L_CXX='`$ECHO "$hardcode_minus_L_CXX" | $SED "$delay_single_quote_subst"`' +hardcode_minus_L_F77='`$ECHO "$hardcode_minus_L_F77" | $SED "$delay_single_quote_subst"`' +hardcode_minus_L_FC='`$ECHO "$hardcode_minus_L_FC" | $SED "$delay_single_quote_subst"`' +hardcode_shlibpath_var_CXX='`$ECHO "$hardcode_shlibpath_var_CXX" | $SED "$delay_single_quote_subst"`' +hardcode_shlibpath_var_F77='`$ECHO "$hardcode_shlibpath_var_F77" | $SED "$delay_single_quote_subst"`' +hardcode_shlibpath_var_FC='`$ECHO "$hardcode_shlibpath_var_FC" | $SED "$delay_single_quote_subst"`' +hardcode_automatic_CXX='`$ECHO "$hardcode_automatic_CXX" | $SED "$delay_single_quote_subst"`' +hardcode_automatic_F77='`$ECHO "$hardcode_automatic_F77" | $SED "$delay_single_quote_subst"`' +hardcode_automatic_FC='`$ECHO "$hardcode_automatic_FC" | $SED "$delay_single_quote_subst"`' +inherit_rpath_CXX='`$ECHO "$inherit_rpath_CXX" | $SED "$delay_single_quote_subst"`' +inherit_rpath_F77='`$ECHO "$inherit_rpath_F77" | $SED "$delay_single_quote_subst"`' +inherit_rpath_FC='`$ECHO "$inherit_rpath_FC" | $SED "$delay_single_quote_subst"`' +link_all_deplibs_CXX='`$ECHO "$link_all_deplibs_CXX" | $SED "$delay_single_quote_subst"`' +link_all_deplibs_F77='`$ECHO "$link_all_deplibs_F77" | $SED "$delay_single_quote_subst"`' +link_all_deplibs_FC='`$ECHO "$link_all_deplibs_FC" | $SED "$delay_single_quote_subst"`' +always_export_symbols_CXX='`$ECHO "$always_export_symbols_CXX" | $SED "$delay_single_quote_subst"`' +always_export_symbols_F77='`$ECHO "$always_export_symbols_F77" | $SED "$delay_single_quote_subst"`' +always_export_symbols_FC='`$ECHO "$always_export_symbols_FC" | $SED "$delay_single_quote_subst"`' +export_symbols_cmds_CXX='`$ECHO "$export_symbols_cmds_CXX" | $SED "$delay_single_quote_subst"`' +export_symbols_cmds_F77='`$ECHO "$export_symbols_cmds_F77" | $SED "$delay_single_quote_subst"`' +export_symbols_cmds_FC='`$ECHO "$export_symbols_cmds_FC" | $SED "$delay_single_quote_subst"`' +exclude_expsyms_CXX='`$ECHO "$exclude_expsyms_CXX" | $SED "$delay_single_quote_subst"`' +exclude_expsyms_F77='`$ECHO "$exclude_expsyms_F77" | $SED "$delay_single_quote_subst"`' +exclude_expsyms_FC='`$ECHO "$exclude_expsyms_FC" | $SED "$delay_single_quote_subst"`' +include_expsyms_CXX='`$ECHO "$include_expsyms_CXX" | $SED "$delay_single_quote_subst"`' +include_expsyms_F77='`$ECHO "$include_expsyms_F77" | $SED "$delay_single_quote_subst"`' +include_expsyms_FC='`$ECHO "$include_expsyms_FC" | $SED "$delay_single_quote_subst"`' +prelink_cmds_CXX='`$ECHO "$prelink_cmds_CXX" | $SED "$delay_single_quote_subst"`' +prelink_cmds_F77='`$ECHO "$prelink_cmds_F77" | $SED "$delay_single_quote_subst"`' +prelink_cmds_FC='`$ECHO "$prelink_cmds_FC" | $SED "$delay_single_quote_subst"`' +postlink_cmds_CXX='`$ECHO "$postlink_cmds_CXX" | $SED "$delay_single_quote_subst"`' +postlink_cmds_F77='`$ECHO "$postlink_cmds_F77" | $SED "$delay_single_quote_subst"`' +postlink_cmds_FC='`$ECHO "$postlink_cmds_FC" | $SED "$delay_single_quote_subst"`' +file_list_spec_CXX='`$ECHO "$file_list_spec_CXX" | $SED "$delay_single_quote_subst"`' +file_list_spec_F77='`$ECHO "$file_list_spec_F77" | $SED "$delay_single_quote_subst"`' +file_list_spec_FC='`$ECHO "$file_list_spec_FC" | $SED "$delay_single_quote_subst"`' +hardcode_action_CXX='`$ECHO "$hardcode_action_CXX" | $SED "$delay_single_quote_subst"`' +hardcode_action_F77='`$ECHO "$hardcode_action_F77" | $SED "$delay_single_quote_subst"`' +hardcode_action_FC='`$ECHO "$hardcode_action_FC" | $SED "$delay_single_quote_subst"`' +compiler_lib_search_dirs_CXX='`$ECHO "$compiler_lib_search_dirs_CXX" | $SED "$delay_single_quote_subst"`' +compiler_lib_search_dirs_F77='`$ECHO "$compiler_lib_search_dirs_F77" | $SED "$delay_single_quote_subst"`' +compiler_lib_search_dirs_FC='`$ECHO "$compiler_lib_search_dirs_FC" | $SED "$delay_single_quote_subst"`' +predep_objects_CXX='`$ECHO "$predep_objects_CXX" | $SED "$delay_single_quote_subst"`' +predep_objects_F77='`$ECHO "$predep_objects_F77" | $SED "$delay_single_quote_subst"`' +predep_objects_FC='`$ECHO "$predep_objects_FC" | $SED "$delay_single_quote_subst"`' +postdep_objects_CXX='`$ECHO "$postdep_objects_CXX" | $SED "$delay_single_quote_subst"`' +postdep_objects_F77='`$ECHO "$postdep_objects_F77" | $SED "$delay_single_quote_subst"`' +postdep_objects_FC='`$ECHO "$postdep_objects_FC" | $SED "$delay_single_quote_subst"`' +predeps_CXX='`$ECHO "$predeps_CXX" | $SED "$delay_single_quote_subst"`' +predeps_F77='`$ECHO "$predeps_F77" | $SED "$delay_single_quote_subst"`' +predeps_FC='`$ECHO "$predeps_FC" | $SED "$delay_single_quote_subst"`' +postdeps_CXX='`$ECHO "$postdeps_CXX" | $SED "$delay_single_quote_subst"`' +postdeps_F77='`$ECHO "$postdeps_F77" | $SED "$delay_single_quote_subst"`' +postdeps_FC='`$ECHO "$postdeps_FC" | $SED "$delay_single_quote_subst"`' +compiler_lib_search_path_CXX='`$ECHO "$compiler_lib_search_path_CXX" | $SED "$delay_single_quote_subst"`' +compiler_lib_search_path_F77='`$ECHO "$compiler_lib_search_path_F77" | $SED "$delay_single_quote_subst"`' +compiler_lib_search_path_FC='`$ECHO "$compiler_lib_search_path_FC" | $SED "$delay_single_quote_subst"`' LTCC='$LTCC' LTCFLAGS='$LTCFLAGS' compiler='$compiler_DEFAULT' +# A function that is used when there is no print builtin or printf. +func_fallback_echo () +{ + eval 'cat <<_LTECHO_EOF +\$1 +_LTECHO_EOF' +} + # Quote evaled strings. -for var in SED \ +for var in SHELL \ +ECHO \ +SED \ GREP \ EGREP \ FGREP \ @@ -23860,8 +24622,13 @@ OBJDUMP \ deplibs_check_method \ file_magic_cmd \ +file_magic_glob \ +want_nocaseglob \ +DLLTOOL \ +sharedlib_from_linklib_cmd \ AR \ AR_FLAGS \ +archiver_list_spec \ STRIP \ RANLIB \ CC \ @@ -23871,14 +24638,14 @@ lt_cv_sys_global_symbol_to_cdecl \ lt_cv_sys_global_symbol_to_c_name_address \ lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \ -SHELL \ -ECHO \ +nm_file_list_spec \ lt_prog_compiler_no_builtin_flag \ -lt_prog_compiler_wl \ lt_prog_compiler_pic \ +lt_prog_compiler_wl \ lt_prog_compiler_static \ lt_cv_prog_compiler_c_o \ need_locks \ +MANIFEST_TOOL \ DSYMUTIL \ NMEDIT \ LIPO \ @@ -23894,7 +24661,6 @@ hardcode_libdir_flag_spec \ hardcode_libdir_flag_spec_ld \ hardcode_libdir_separator \ -fix_srcfile_path \ exclude_expsyms \ include_expsyms \ file_list_spec \ @@ -23902,6 +24668,7 @@ libname_spec \ library_names_spec \ soname_spec \ +install_override_mode \ finish_eval \ old_striplib \ striplib \ @@ -23914,18 +24681,21 @@ LD_CXX \ LD_F77 \ LD_FC \ +reload_flag_CXX \ +reload_flag_F77 \ +reload_flag_FC \ compiler_CXX \ compiler_F77 \ compiler_FC \ lt_prog_compiler_no_builtin_flag_CXX \ lt_prog_compiler_no_builtin_flag_F77 \ lt_prog_compiler_no_builtin_flag_FC \ -lt_prog_compiler_wl_CXX \ -lt_prog_compiler_wl_F77 \ -lt_prog_compiler_wl_FC \ lt_prog_compiler_pic_CXX \ lt_prog_compiler_pic_F77 \ lt_prog_compiler_pic_FC \ +lt_prog_compiler_wl_CXX \ +lt_prog_compiler_wl_F77 \ +lt_prog_compiler_wl_FC \ lt_prog_compiler_static_CXX \ lt_prog_compiler_static_F77 \ lt_prog_compiler_static_FC \ @@ -23959,9 +24729,6 @@ hardcode_libdir_separator_CXX \ hardcode_libdir_separator_F77 \ hardcode_libdir_separator_FC \ -fix_srcfile_path_CXX \ -fix_srcfile_path_F77 \ -fix_srcfile_path_FC \ exclude_expsyms_CXX \ exclude_expsyms_F77 \ exclude_expsyms_FC \ @@ -23989,9 +24756,9 @@ compiler_lib_search_path_CXX \ compiler_lib_search_path_F77 \ compiler_lib_search_path_FC; do - case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in + case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[\\\\\\\`\\"\\\$]*) - eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" + eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" @@ -24013,11 +24780,15 @@ module_expsym_cmds \ export_symbols_cmds \ prelink_cmds \ +postlink_cmds \ postinstall_cmds \ postuninstall_cmds \ finish_cmds \ sys_lib_search_path_spec \ sys_lib_dlsearch_path_spec \ +reload_cmds_CXX \ +reload_cmds_F77 \ +reload_cmds_FC \ old_archive_cmds_CXX \ old_archive_cmds_F77 \ old_archive_cmds_FC \ @@ -24044,10 +24815,13 @@ export_symbols_cmds_FC \ prelink_cmds_CXX \ prelink_cmds_F77 \ -prelink_cmds_FC; do - case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in +prelink_cmds_FC \ +postlink_cmds_CXX \ +postlink_cmds_F77 \ +postlink_cmds_FC; do + case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[\\\\\\\`\\"\\\$]*) - eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" + eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" @@ -24055,12 +24829,6 @@ esac done -# Fix-up fallback echo if it was mangled by the above quoting rules. -case \$lt_ECHO in -*'\\\$0 --fallback-echo"') lt_ECHO=\`\$ECHO "X\$lt_ECHO" | \$Xsed -e 's/\\\\\\\\\\\\\\\$0 --fallback-echo"\$/\$0 --fallback-echo"/'\` - ;; -esac - ac_aux_dir='$ac_aux_dir' xsi_shell='$xsi_shell' lt_shell_append='$lt_shell_append' @@ -24112,7 +24880,8 @@ # NOTE: Changes made to this file will be lost: look at ltmain.sh. # # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, -# 2006, 2007, 2008 Free Software Foundation, Inc. +# 2006, 2007, 2008, 2009, 2010 Free Software Foundation, +# Inc. # Written by Gordon Matzigkeit, 1996 # # This file is part of GNU Libtool. @@ -24160,6 +24929,12 @@ # Whether or not to optimize for fast installation. fast_install=$enable_fast_install +# Shell to use when invoking shell scripts. +SHELL=$lt_SHELL + +# An echo program that protects backslashes. +ECHO=$lt_ECHO + # The host system. host_alias=$host_alias host=$host @@ -24209,9 +24984,11 @@ # turn newlines into spaces. NL2SP=$lt_lt_NL2SP -# How to create reloadable object files. -reload_flag=$lt_reload_flag -reload_cmds=$lt_reload_cmds +# convert \$build file names to \$host format. +to_host_file_cmd=$lt_cv_to_host_file_cmd + +# convert \$build files to toolchain format. +to_tool_file_cmd=$lt_cv_to_tool_file_cmd # An object symbol dumper. OBJDUMP=$lt_OBJDUMP @@ -24219,13 +24996,30 @@ # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method -# Command to use when deplibs_check_method == "file_magic". +# Command to use when deplibs_check_method = "file_magic". file_magic_cmd=$lt_file_magic_cmd +# How to find potential files when deplibs_check_method = "file_magic". +file_magic_glob=$lt_file_magic_glob + +# Find potential files using nocaseglob when deplibs_check_method = "file_magic". +want_nocaseglob=$lt_want_nocaseglob + +# DLL creation program. +DLLTOOL=$lt_DLLTOOL + +# Command to associate shared and link libraries. +sharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd + # The archiver. AR=$lt_AR + +# Flags to create an archive. AR_FLAGS=$lt_AR_FLAGS +# How to feed a file listing to the archiver. +archiver_list_spec=$lt_archiver_list_spec + # A symbol stripping program. STRIP=$lt_STRIP @@ -24234,6 +25028,9 @@ old_postinstall_cmds=$lt_old_postinstall_cmds old_postuninstall_cmds=$lt_old_postuninstall_cmds +# Whether to use a lock for old archive extraction. +lock_old_archive_extraction=$lock_old_archive_extraction + # A C compiler. LTCC=$lt_CC @@ -24252,14 +25049,14 @@ # Transform the output of nm in a C name address pair when lib prefix is needed. global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix -# The name of the directory that contains temporary libtool files. -objdir=$objdir +# Specify filename containing input files for \$NM. +nm_file_list_spec=$lt_nm_file_list_spec -# Shell to use when invoking shell scripts. -SHELL=$lt_SHELL +# The root where to search for dependent libraries,and in which our libraries should be installed. +lt_sysroot=$lt_sysroot -# An echo program that does not interpret backslashes. -ECHO=$lt_ECHO +# The name of the directory that contains temporary libtool files. +objdir=$objdir # Used to examine libraries when file_magic_cmd begins with "file". MAGIC_CMD=$MAGIC_CMD @@ -24267,6 +25064,9 @@ # Must we lock files when doing compilation? need_locks=$lt_need_locks +# Manifest tool. +MANIFEST_TOOL=$lt_MANIFEST_TOOL + # Tool to manipulate archived DWARF debug symbol files on Mac OS X. DSYMUTIL=$lt_DSYMUTIL @@ -24323,6 +25123,9 @@ # The coded name of the library, if different from the real name. soname_spec=$lt_soname_spec +# Permission mode override for installation of shared libraries. +install_override_mode=$lt_install_override_mode + # Command to use after installation of a shared archive. postinstall_cmds=$lt_postinstall_cmds @@ -24362,6 +25165,10 @@ # The linker used to build libraries. LD=$lt_LD +# How to create reloadable object files. +reload_flag=$lt_reload_flag +reload_cmds=$lt_reload_cmds + # Commands used to build an old-style archive. old_archive_cmds=$lt_old_archive_cmds @@ -24374,12 +25181,12 @@ # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag -# How to pass a linker flag through the compiler. -wl=$lt_lt_prog_compiler_wl - # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic +# How to pass a linker flag through the compiler. +wl=$lt_lt_prog_compiler_wl + # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static @@ -24466,9 +25273,6 @@ # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs -# Fix the shell variable \$srcfile for the compiler. -fix_srcfile_path=$lt_fix_srcfile_path - # Set to "yes" if exported symbols are required. always_export_symbols=$always_export_symbols @@ -24484,6 +25288,9 @@ # Commands necessary for linking programs (against libraries) with templates. prelink_cmds=$lt_prelink_cmds +# Commands necessary for finishing linking programs. +postlink_cmds=$lt_postlink_cmds + # Specify filename containing input files. file_list_spec=$lt_file_list_spec @@ -24491,251 +25298,208 @@ hardcode_action=$hardcode_action # The directories searched by this compiler when creating a shared library. -compiler_lib_search_dirs=$lt_compiler_lib_search_dirs - -# Dependencies to place before and after the objects being linked to -# create a shared library. -predep_objects=$lt_predep_objects -postdep_objects=$lt_postdep_objects -predeps=$lt_predeps -postdeps=$lt_postdeps - -# The library search path used internally by the compiler when linking -# a shared library. -compiler_lib_search_path=$lt_compiler_lib_search_path - -# ### END LIBTOOL CONFIG - -_LT_EOF - - case $host_os in - aix3*) - cat <<\_LT_EOF >> "$cfgfile" -# AIX sometimes has problems with the GCC collect2 program. For some -# reason, if we set the COLLECT_NAMES environment variable, the problems -# vanish in a puff of smoke. -if test "X${COLLECT_NAMES+set}" != Xset; then - COLLECT_NAMES= - export COLLECT_NAMES -fi -_LT_EOF - ;; - esac - - -ltmain="$ac_aux_dir/ltmain.sh" - - - # We use sed instead of cat because bash on DJGPP gets confused if - # if finds mixed CR/LF and LF-only lines. Since sed operates in - # text mode, it properly converts lines to CR/LF. This bash problem - # is reportedly fixed, but why not run on old versions too? - sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \ - || (rm -f "$cfgfile"; exit 1) - - case $xsi_shell in - yes) - cat << \_LT_EOF >> "$cfgfile" - -# func_dirname file append nondir_replacement -# Compute the dirname of FILE. If nonempty, add APPEND to the result, -# otherwise set result to NONDIR_REPLACEMENT. -func_dirname () -{ - case ${1} in - */*) func_dirname_result="${1%/*}${2}" ;; - * ) func_dirname_result="${3}" ;; - esac -} - -# func_basename file -func_basename () -{ - func_basename_result="${1##*/}" -} - -# func_dirname_and_basename file append nondir_replacement -# perform func_basename and func_dirname in a single function -# call: -# dirname: Compute the dirname of FILE. If nonempty, -# add APPEND to the result, otherwise set result -# to NONDIR_REPLACEMENT. -# value returned in "$func_dirname_result" -# basename: Compute filename of FILE. -# value retuned in "$func_basename_result" -# Implementation must be kept synchronized with func_dirname -# and func_basename. For efficiency, we do not delegate to -# those functions but instead duplicate the functionality here. -func_dirname_and_basename () -{ - case ${1} in - */*) func_dirname_result="${1%/*}${2}" ;; - * ) func_dirname_result="${3}" ;; - esac - func_basename_result="${1##*/}" -} - -# func_stripname prefix suffix name -# strip PREFIX and SUFFIX off of NAME. -# PREFIX and SUFFIX must not contain globbing or regex special -# characters, hashes, percent signs, but SUFFIX may contain a leading -# dot (in which case that matches only a dot). -func_stripname () -{ - # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are - # positional parameters, so assign one to ordinary parameter first. - func_stripname_result=${3} - func_stripname_result=${func_stripname_result#"${1}"} - func_stripname_result=${func_stripname_result%"${2}"} -} - -# func_opt_split -func_opt_split () -{ - func_opt_split_opt=${1%%=*} - func_opt_split_arg=${1#*=} -} - -# func_lo2o object -func_lo2o () -{ - case ${1} in - *.lo) func_lo2o_result=${1%.lo}.${objext} ;; - *) func_lo2o_result=${1} ;; - esac -} - -# func_xform libobj-or-source -func_xform () -{ - func_xform_result=${1%.*}.lo -} - -# func_arith arithmetic-term... -func_arith () -{ - func_arith_result=$(( $* )) -} - -# func_len string -# STRING may not start with a hyphen. -func_len () -{ - func_len_result=${#1} -} - -_LT_EOF - ;; - *) # Bourne compatible functions. - cat << \_LT_EOF >> "$cfgfile" - -# func_dirname file append nondir_replacement -# Compute the dirname of FILE. If nonempty, add APPEND to the result, -# otherwise set result to NONDIR_REPLACEMENT. -func_dirname () -{ - # Extract subdirectory from the argument. - func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"` - if test "X$func_dirname_result" = "X${1}"; then - func_dirname_result="${3}" - else - func_dirname_result="$func_dirname_result${2}" - fi -} - -# func_basename file -func_basename () -{ - func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"` -} - - -# func_stripname prefix suffix name -# strip PREFIX and SUFFIX off of NAME. -# PREFIX and SUFFIX must not contain globbing or regex special -# characters, hashes, percent signs, but SUFFIX may contain a leading -# dot (in which case that matches only a dot). -# func_strip_suffix prefix name -func_stripname () -{ - case ${2} in - .*) func_stripname_result=`$ECHO "X${3}" \ - | $Xsed -e "s%^${1}%%" -e "s%\\\\${2}\$%%"`;; - *) func_stripname_result=`$ECHO "X${3}" \ - | $Xsed -e "s%^${1}%%" -e "s%${2}\$%%"`;; - esac -} - -# sed scripts: -my_sed_long_opt='1s/^\(-[^=]*\)=.*/\1/;q' -my_sed_long_arg='1s/^-[^=]*=//' - -# func_opt_split -func_opt_split () -{ - func_opt_split_opt=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_opt"` - func_opt_split_arg=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_arg"` -} - -# func_lo2o object -func_lo2o () -{ - func_lo2o_result=`$ECHO "X${1}" | $Xsed -e "$lo2o"` -} +compiler_lib_search_dirs=$lt_compiler_lib_search_dirs -# func_xform libobj-or-source -func_xform () -{ - func_xform_result=`$ECHO "X${1}" | $Xsed -e 's/\.[^.]*$/.lo/'` -} +# Dependencies to place before and after the objects being linked to +# create a shared library. +predep_objects=$lt_predep_objects +postdep_objects=$lt_postdep_objects +predeps=$lt_predeps +postdeps=$lt_postdeps -# func_arith arithmetic-term... -func_arith () -{ - func_arith_result=`expr "$@"` -} +# The library search path used internally by the compiler when linking +# a shared library. +compiler_lib_search_path=$lt_compiler_lib_search_path -# func_len string -# STRING may not start with a hyphen. -func_len () -{ - func_len_result=`expr "$1" : ".*" 2>/dev/null || echo $max_cmd_len` -} +# ### END LIBTOOL CONFIG _LT_EOF -esac -case $lt_shell_append in - yes) - cat << \_LT_EOF >> "$cfgfile" - -# func_append var value -# Append VALUE to the end of shell variable VAR. -func_append () -{ - eval "$1+=\$2" -} + case $host_os in + aix3*) + cat <<\_LT_EOF >> "$cfgfile" +# AIX sometimes has problems with the GCC collect2 program. For some +# reason, if we set the COLLECT_NAMES environment variable, the problems +# vanish in a puff of smoke. +if test "X${COLLECT_NAMES+set}" != Xset; then + COLLECT_NAMES= + export COLLECT_NAMES +fi _LT_EOF ;; - *) - cat << \_LT_EOF >> "$cfgfile" + esac -# func_append var value -# Append VALUE to the end of shell variable VAR. -func_append () -{ - eval "$1=\$$1\$2" -} -_LT_EOF - ;; - esac +ltmain="$ac_aux_dir/ltmain.sh" + + + # We use sed instead of cat because bash on DJGPP gets confused if + # if finds mixed CR/LF and LF-only lines. Since sed operates in + # text mode, it properly converts lines to CR/LF. This bash problem + # is reportedly fixed, but why not run on old versions too? + sed '$q' "$ltmain" >> "$cfgfile" \ + || (rm -f "$cfgfile"; exit 1) + if test x"$xsi_shell" = xyes; then + sed -e '/^func_dirname ()$/,/^} # func_dirname /c\ +func_dirname ()\ +{\ +\ case ${1} in\ +\ */*) func_dirname_result="${1%/*}${2}" ;;\ +\ * ) func_dirname_result="${3}" ;;\ +\ esac\ +} # Extended-shell func_dirname implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_basename ()$/,/^} # func_basename /c\ +func_basename ()\ +{\ +\ func_basename_result="${1##*/}"\ +} # Extended-shell func_basename implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_dirname_and_basename ()$/,/^} # func_dirname_and_basename /c\ +func_dirname_and_basename ()\ +{\ +\ case ${1} in\ +\ */*) func_dirname_result="${1%/*}${2}" ;;\ +\ * ) func_dirname_result="${3}" ;;\ +\ esac\ +\ func_basename_result="${1##*/}"\ +} # Extended-shell func_dirname_and_basename implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_stripname ()$/,/^} # func_stripname /c\ +func_stripname ()\ +{\ +\ # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are\ +\ # positional parameters, so assign one to ordinary parameter first.\ +\ func_stripname_result=${3}\ +\ func_stripname_result=${func_stripname_result#"${1}"}\ +\ func_stripname_result=${func_stripname_result%"${2}"}\ +} # Extended-shell func_stripname implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_split_long_opt ()$/,/^} # func_split_long_opt /c\ +func_split_long_opt ()\ +{\ +\ func_split_long_opt_name=${1%%=*}\ +\ func_split_long_opt_arg=${1#*=}\ +} # Extended-shell func_split_long_opt implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_split_short_opt ()$/,/^} # func_split_short_opt /c\ +func_split_short_opt ()\ +{\ +\ func_split_short_opt_arg=${1#??}\ +\ func_split_short_opt_name=${1%"$func_split_short_opt_arg"}\ +} # Extended-shell func_split_short_opt implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_lo2o ()$/,/^} # func_lo2o /c\ +func_lo2o ()\ +{\ +\ case ${1} in\ +\ *.lo) func_lo2o_result=${1%.lo}.${objext} ;;\ +\ *) func_lo2o_result=${1} ;;\ +\ esac\ +} # Extended-shell func_lo2o implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_xform ()$/,/^} # func_xform /c\ +func_xform ()\ +{\ + func_xform_result=${1%.*}.lo\ +} # Extended-shell func_xform implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_arith ()$/,/^} # func_arith /c\ +func_arith ()\ +{\ + func_arith_result=$(( $* ))\ +} # Extended-shell func_arith implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_len ()$/,/^} # func_len /c\ +func_len ()\ +{\ + func_len_result=${#1}\ +} # Extended-shell func_len implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + +fi + +if test x"$lt_shell_append" = xyes; then + sed -e '/^func_append ()$/,/^} # func_append /c\ +func_append ()\ +{\ + eval "${1}+=\\${2}"\ +} # Extended-shell func_append implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_append_quoted ()$/,/^} # func_append_quoted /c\ +func_append_quoted ()\ +{\ +\ func_quote_for_eval "${2}"\ +\ eval "${1}+=\\\\ \\$func_quote_for_eval_result"\ +} # Extended-shell func_append_quoted implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + # Save a `func_append' function call where possible by direct use of '+=' + sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") + test 0 -eq $? || _lt_function_replace_fail=: +else + # Save a `func_append' function call even when '+=' is not available + sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") + test 0 -eq $? || _lt_function_replace_fail=: +fi + +if test x"$_lt_function_replace_fail" = x":"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unable to substitute extended shell functions in $ofile" >&5 +$as_echo "$as_me: WARNING: Unable to substitute extended shell functions in $ofile" >&2;} +fi - sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \ - || (rm -f "$cfgfile"; exit 1) - mv -f "$cfgfile" "$ofile" || + mv -f "$cfgfile" "$ofile" || (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") chmod +x "$ofile" @@ -24747,6 +25511,10 @@ # The linker used to build libraries. LD=$lt_LD_CXX +# How to create reloadable object files. +reload_flag=$lt_reload_flag_CXX +reload_cmds=$lt_reload_cmds_CXX + # Commands used to build an old-style archive. old_archive_cmds=$lt_old_archive_cmds_CXX @@ -24759,12 +25527,12 @@ # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_CXX -# How to pass a linker flag through the compiler. -wl=$lt_lt_prog_compiler_wl_CXX - # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic_CXX +# How to pass a linker flag through the compiler. +wl=$lt_lt_prog_compiler_wl_CXX + # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static_CXX @@ -24851,9 +25619,6 @@ # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs_CXX -# Fix the shell variable \$srcfile for the compiler. -fix_srcfile_path=$lt_fix_srcfile_path_CXX - # Set to "yes" if exported symbols are required. always_export_symbols=$always_export_symbols_CXX @@ -24869,6 +25634,9 @@ # Commands necessary for linking programs (against libraries) with templates. prelink_cmds=$lt_prelink_cmds_CXX +# Commands necessary for finishing linking programs. +postlink_cmds=$lt_postlink_cmds_CXX + # Specify filename containing input files. file_list_spec=$lt_file_list_spec_CXX @@ -24900,6 +25668,10 @@ # The linker used to build libraries. LD=$lt_LD_F77 +# How to create reloadable object files. +reload_flag=$lt_reload_flag_F77 +reload_cmds=$lt_reload_cmds_F77 + # Commands used to build an old-style archive. old_archive_cmds=$lt_old_archive_cmds_F77 @@ -24912,12 +25684,12 @@ # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_F77 -# How to pass a linker flag through the compiler. -wl=$lt_lt_prog_compiler_wl_F77 - # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic_F77 +# How to pass a linker flag through the compiler. +wl=$lt_lt_prog_compiler_wl_F77 + # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static_F77 @@ -25004,9 +25776,6 @@ # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs_F77 -# Fix the shell variable \$srcfile for the compiler. -fix_srcfile_path=$lt_fix_srcfile_path_F77 - # Set to "yes" if exported symbols are required. always_export_symbols=$always_export_symbols_F77 @@ -25022,6 +25791,9 @@ # Commands necessary for linking programs (against libraries) with templates. prelink_cmds=$lt_prelink_cmds_F77 +# Commands necessary for finishing linking programs. +postlink_cmds=$lt_postlink_cmds_F77 + # Specify filename containing input files. file_list_spec=$lt_file_list_spec_F77 @@ -25053,6 +25825,10 @@ # The linker used to build libraries. LD=$lt_LD_FC +# How to create reloadable object files. +reload_flag=$lt_reload_flag_FC +reload_cmds=$lt_reload_cmds_FC + # Commands used to build an old-style archive. old_archive_cmds=$lt_old_archive_cmds_FC @@ -25065,12 +25841,12 @@ # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_FC -# How to pass a linker flag through the compiler. -wl=$lt_lt_prog_compiler_wl_FC - # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic_FC +# How to pass a linker flag through the compiler. +wl=$lt_lt_prog_compiler_wl_FC + # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static_FC @@ -25157,9 +25933,6 @@ # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs_FC -# Fix the shell variable \$srcfile for the compiler. -fix_srcfile_path=$lt_fix_srcfile_path_FC - # Set to "yes" if exported symbols are required. always_export_symbols=$always_export_symbols_FC @@ -25175,6 +25948,9 @@ # Commands necessary for linking programs (against libraries) with templates. prelink_cmds=$lt_prelink_cmds_FC +# Commands necessary for finishing linking programs. +postlink_cmds=$lt_postlink_cmds_FC + # Specify filename containing input files. file_list_spec=$lt_file_list_spec_FC @@ -25207,15 +25983,13 @@ # appending to config.log, which fails on DOS, as config.log is still kept # open by configure. Here we exec the FD to /dev/null, effectively closing # config.log, so it can be properly (re)opened and appended to by config.lt. -if test "$no_create" != yes; then - lt_cl_success=: - test "$silent" = yes && - lt_config_lt_args="$lt_config_lt_args --quiet" - exec 5>/dev/null - $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false - exec 5>>config.log - $lt_cl_success || as_fn_exit 1 -fi +lt_cl_success=: +test "$silent" = yes && + lt_config_lt_args="$lt_config_lt_args --quiet" +exec 5>/dev/null +$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false +exec 5>>config.log +$lt_cl_success || as_fn_exit 1 @@ -25230,7 +26004,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lt_dlinit in -lltdl" >&5 $as_echo_n "checking for lt_dlinit in -lltdl... " >&6; } -if test "${ac_cv_lib_ltdl_lt_dlinit+set}" = set; then : +if ${ac_cv_lib_ltdl_lt_dlinit+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -25264,7 +26038,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ltdl_lt_dlinit" >&5 $as_echo "$ac_cv_lib_ltdl_lt_dlinit" >&6; } -if test "x$ac_cv_lib_ltdl_lt_dlinit" = x""yes; then : +if test "x$ac_cv_lib_ltdl_lt_dlinit" = xyes; then : have_ltdl=yes else have_ltdl=no @@ -25274,14 +26048,14 @@ LIBS=$saved_libs if test "x$have_ltdl" == "xno"; then - as_fn_error "libltdl is required to build modules. Please either specify the location of the libltdl library using --with-ldtl-prefix=PREFIX or else disable the building of modules by using --disable-modules." "$LINENO" 5 + as_fn_error $? "libltdl is required to build modules. Please either specify the location of the libltdl library using --with-ldtl-prefix=PREFIX or else disable the building of modules by using --disable-modules." "$LINENO" 5 fi if test "x$ltdl_prefix" != "x"; then for ac_header in ltdl.h do : ac_fn_c_check_header_mongrel "$LINENO" "ltdl.h" "ac_cv_header_ltdl_h" "$ac_includes_default" -if test "x$ac_cv_header_ltdl_h" = x""yes; then : +if test "x$ac_cv_header_ltdl_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LTDL_H 1 _ACEOF @@ -25296,7 +26070,7 @@ for ac_header in ltdl.h do : ac_fn_c_check_header_mongrel "$LINENO" "ltdl.h" "ac_cv_header_ltdl_h" "$ac_includes_default" -if test "x$ac_cv_header_ltdl_h" = x""yes; then : +if test "x$ac_cv_header_ltdl_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LTDL_H 1 _ACEOF @@ -25329,7 +26103,7 @@ echo { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5 $as_echo_n "checking for inline... " >&6; } -if test "${ac_cv_c_inline+set}" = set; then : +if ${ac_cv_c_inline+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_c_inline=no @@ -25372,7 +26146,7 @@ gd_saved_CFLAGS=$CFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Wall" >&5 $as_echo_n "checking whether $CC accepts -Wall... " >&6; } -if test "${gd_cv_prog_cc_wall+set}" = set; then : +if ${gd_cv_prog_cc_wall+:} false; then : $as_echo_n "(cached) " >&6 else CFLAGS="-Wall" @@ -25400,7 +26174,7 @@ gd_saved_CFLAGS=$CFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Wextra" >&5 $as_echo_n "checking whether $CC accepts -Wextra... " >&6; } -if test "${gd_cv_prog_cc_wextra+set}" = set; then : +if ${gd_cv_prog_cc_wextra+:} false; then : $as_echo_n "(cached) " >&6 else CFLAGS="-Wextra" @@ -25430,7 +26204,7 @@ gd_saved_CXXFLAGS=$CXXFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -Wall" >&5 $as_echo_n "checking whether $CXX accepts -Wall... " >&6; } -if test "${gd_cv_prog_cxx_wall+set}" = set; then : +if ${gd_cv_prog_cxx_wall+:} false; then : $as_echo_n "(cached) " >&6 else CXXFLAGS="-Wall" @@ -25470,7 +26244,7 @@ gd_saved_CXXFLAGS=$CXXFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -Wextra" >&5 $as_echo_n "checking whether $CXX accepts -Wextra... " >&6; } -if test "${gd_cv_prog_cxx_wextra+set}" = set; then : +if ${gd_cv_prog_cxx_wextra+:} false; then : $as_echo_n "(cached) " >&6 else CXXFLAGS="-Wextra" @@ -25513,7 +26287,7 @@ gd_saved_FFLAGS=$FFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $F77 accepts -Wall" >&5 $as_echo_n "checking whether $F77 accepts -Wall... " >&6; } -if test "${gd_cv_prog_f77_wall+set}" = set; then : +if ${gd_cv_prog_f77_wall+:} false; then : $as_echo_n "(cached) " >&6 else FFLAGS="-Wall" @@ -25546,7 +26320,7 @@ gd_saved_FFLAGS=$FFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $F77 accepts -Wextra" >&5 $as_echo_n "checking whether $F77 accepts -Wextra... " >&6; } -if test "${gd_cv_prog_f77_wextra+set}" = set; then : +if ${gd_cv_prog_f77_wextra+:} false; then : $as_echo_n "(cached) " >&6 else FFLAGS="-Wextra" @@ -25578,7 +26352,7 @@ FFLAGS=$gd_saved_FFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the Intel Fortran-77 compiler" >&5 $as_echo_n "checking whether we are using the Intel Fortran-77 compiler... " >&6; } -if test "${gd_cv_f77_compiler_intel+set}" = set; then : +if ${gd_cv_f77_compiler_intel+:} false; then : $as_echo_n "(cached) " >&6 else if $F77 -help 2>/dev/null | grep -q 'Intel.R. Fortran Compiler'; then @@ -25596,7 +26370,7 @@ gd_saved_FCFLAGS=$FCFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $FC accepts -Wall" >&5 $as_echo_n "checking whether $FC accepts -Wall... " >&6; } -if test "${gd_cv_prog_fc_wall+set}" = set; then : +if ${gd_cv_prog_fc_wall+:} false; then : $as_echo_n "(cached) " >&6 else FCFLAGS="-Wall" @@ -25629,7 +26403,7 @@ gd_saved_FCFLAGS=$FCFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $FC accepts -Wextra" >&5 $as_echo_n "checking whether $FC accepts -Wextra... " >&6; } -if test "${gd_cv_prog_fc_wextra+set}" = set; then : +if ${gd_cv_prog_fc_wextra+:} false; then : $as_echo_n "(cached) " >&6 else FCFLAGS="-Wextra" @@ -25661,7 +26435,7 @@ FCFLAGS=$gd_saved_FCFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the Intel Fortran compiler" >&5 $as_echo_n "checking whether we are using the Intel Fortran compiler... " >&6; } -if test "${gd_cv_fc_compiler_intel+set}" = set; then : +if ${gd_cv_fc_compiler_intel+:} false; then : $as_echo_n "(cached) " >&6 else if $FC -help 2>/dev/null | grep -q 'Intel.R. Fortran Compiler'; then @@ -25682,7 +26456,7 @@ set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_DIFF+set}" = set; then : +if ${ac_cv_prog_DIFF+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$DIFF"; then @@ -25724,7 +26498,7 @@ ac_compiler_gnu=$ac_cv_f77_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to get verbose linking output from $F77" >&5 $as_echo_n "checking how to get verbose linking output from $F77... " >&6; } -if test "${ac_cv_prog_f77_v+set}" = set; then : +if ${ac_cv_prog_f77_v+:} false; then : $as_echo_n "(cached) " >&6 else cat > conftest.$ac_ext <<_ACEOF @@ -25754,7 +26528,8 @@ # gfortran 4.3 outputs lines setting COLLECT_GCC_OPTIONS, COMPILER_PATH, # LIBRARY_PATH; skip all such settings. ac_f77_v_output=`eval $ac_link 5>&1 2>&1 | - grep -v 'Driving:' | grep -v "^[_$as_cr_Letters][_$as_cr_alnum]*="` + sed '/^Driving:/d; /^Configured with:/d; + '"/^[_$as_cr_Letters][_$as_cr_alnum]*=/d"` $as_echo "$ac_f77_v_output" >&5 FFLAGS=$ac_save_FFLAGS @@ -25819,7 +26594,7 @@ $as_echo "$ac_cv_prog_f77_v" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Fortran 77 libraries of $F77" >&5 $as_echo_n "checking for Fortran 77 libraries of $F77... " >&6; } -if test "${ac_cv_f77_libs+set}" = set; then : +if ${ac_cv_f77_libs+:} false; then : $as_echo_n "(cached) " >&6 else if test "x$FLIBS" != "x"; then @@ -25844,7 +26619,8 @@ # gfortran 4.3 outputs lines setting COLLECT_GCC_OPTIONS, COMPILER_PATH, # LIBRARY_PATH; skip all such settings. ac_f77_v_output=`eval $ac_link 5>&1 2>&1 | - grep -v 'Driving:' | grep -v "^[_$as_cr_Letters][_$as_cr_alnum]*="` + sed '/^Driving:/d; /^Configured with:/d; + '"/^[_$as_cr_Letters][_$as_cr_alnum]*=/d"` $as_echo "$ac_f77_v_output" >&5 FFLAGS=$ac_save_FFLAGS @@ -25934,7 +26710,7 @@ ;; # Ignore these flags. -lang* | -lcrt*.o | -lc | -lgcc* | -lSystem | -libmil | -little \ - |-LANG:=* | -LIST:* | -LNO:*) + |-LANG:=* | -LIST:* | -LNO:* | -link) ;; -lkernel32) test x"$CYGWIN" != xyes && ac_cv_f77_libs="$ac_cv_f77_libs $ac_arg" @@ -26032,7 +26808,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dummy main to link with Fortran 77 libraries" >&5 $as_echo_n "checking for dummy main to link with Fortran 77 libraries... " >&6; } -if test "${ac_cv_f77_dummy_main+set}" = set; then : +if ${ac_cv_f77_dummy_main+:} false; then : $as_echo_n "(cached) " >&6 else ac_f77_dm_save_LIBS=$LIBS @@ -26128,8 +26904,8 @@ else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "linking to Fortran libraries from C fails -See \`config.log' for more details." "$LINENO" 5; } +as_fn_error $? "linking to Fortran libraries from C fails +See \`config.log' for more details" "$LINENO" 5; } fi ac_ext=c @@ -26144,7 +26920,7 @@ ac_compiler_gnu=$ac_cv_f77_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Fortran 77 name-mangling scheme" >&5 $as_echo_n "checking for Fortran 77 name-mangling scheme... " >&6; } -if test "${ac_cv_f77_mangling+set}" = set; then : +if ${ac_cv_f77_mangling+:} false; then : $as_echo_n "(cached) " >&6 else cat > conftest.$ac_ext <<_ACEOF @@ -26290,8 +27066,8 @@ else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "cannot compile a simple Fortran program -See \`config.log' for more details." "$LINENO" 5; } +as_fn_error $? "cannot compile a simple Fortran program +See \`config.log' for more details" "$LINENO" 5; } fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext @@ -26421,7 +27197,7 @@ echo { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing ceil" >&5 $as_echo_n "checking for library containing ceil... " >&6; } -if test "${ac_cv_search_ceil+set}" = set; then : +if ${ac_cv_search_ceil+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS @@ -26463,11 +27239,11 @@ fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext - if test "${ac_cv_search_ceil+set}" = set; then : + if ${ac_cv_search_ceil+:} false; then : break fi done -if test "${ac_cv_search_ceil+set}" = set; then : +if ${ac_cv_search_ceil+:} false; then : else ac_cv_search_ceil=no @@ -26487,7 +27263,7 @@ if test "x${use_modules}" != "xno"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing pthread_mutex_lock" >&5 $as_echo_n "checking for library containing pthread_mutex_lock... " >&6; } -if test "${ac_cv_search_pthread_mutex_lock+set}" = set; then : +if ${ac_cv_search_pthread_mutex_lock+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS @@ -26529,11 +27305,11 @@ fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext - if test "${ac_cv_search_pthread_mutex_lock+set}" = set; then : + if ${ac_cv_search_pthread_mutex_lock+:} false; then : break fi done -if test "${ac_cv_search_pthread_mutex_lock+set}" = set; then : +if ${ac_cv_search_pthread_mutex_lock+:} false; then : else ac_cv_search_pthread_mutex_lock=no @@ -26558,7 +27334,7 @@ for ac_header in pthread.h do : ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default" -if test "x$ac_cv_header_pthread_h" = x""yes; then : +if test "x$ac_cv_header_pthread_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_PTHREAD_H 1 _ACEOF @@ -26570,13 +27346,12 @@ fi for ac_func in _commit fchmod _fdopen fseeko fseeko64 fsync ftello ftello64 \ - getdelim gmtime_r _lseeki64 _mkdir mkstemp _open _read _rmdir \ - stat64 _stat64 strtoll strtoull _unlink _write + getdelim gmtime_r _lseeki64 _mkdir mkstemp nan _open _read \ + _rmdir stat64 _stat64 strtoll strtoull _unlink _write do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" -eval as_val=\$$as_ac_var - if test "x$as_val" = x""yes; then : +if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF @@ -26588,7 +27363,7 @@ for ac_func in cabs do : ac_fn_c_check_func "$LINENO" "cabs" "ac_cv_func_cabs" -if test "x$ac_cv_func_cabs" = x""yes; then : +if test "x$ac_cv_func_cabs" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_CABS 1 _ACEOF @@ -26598,7 +27373,7 @@ fi ac_fn_c_check_decl "$LINENO" "strerror_r" "ac_cv_have_decl_strerror_r" "$ac_includes_default" -if test "x$ac_cv_have_decl_strerror_r" = x""yes; then : +if test "x$ac_cv_have_decl_strerror_r" = xyes; then : ac_have_decl=1 else ac_have_decl=0 @@ -26611,7 +27386,7 @@ for ac_func in strerror_r do : ac_fn_c_check_func "$LINENO" "strerror_r" "ac_cv_func_strerror_r" -if test "x$ac_cv_func_strerror_r" = x""yes; then : +if test "x$ac_cv_func_strerror_r" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_STRERROR_R 1 _ACEOF @@ -26621,7 +27396,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror_r returns char *" >&5 $as_echo_n "checking whether strerror_r returns char *... " >&6; } -if test "${ac_cv_func_strerror_r_char_p+set}" = set; then : +if ${ac_cv_func_strerror_r_char_p+:} false; then : $as_echo_n "(cached) " >&6 else @@ -26713,8 +27488,7 @@ do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" -eval as_val=\$$as_ac_Header - if test "x$as_val" = x""yes; then : +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF @@ -26727,7 +27501,7 @@ for ac_header in complex.h do : ac_fn_c_check_header_mongrel "$LINENO" "complex.h" "ac_cv_header_complex_h" "$ac_includes_default" -if test "x$ac_cv_header_complex_h" = x""yes; then : +if test "x$ac_cv_header_complex_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_COMPLEX_H 1 _ACEOF @@ -26742,7 +27516,7 @@ as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5 $as_echo_n "checking for $ac_hdr that defines DIR... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval \${$as_ac_Header+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -26777,8 +27551,7 @@ eval ac_res=\$$as_ac_Header { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } -eval as_val=\$$as_ac_Header - if test "x$as_val" = x""yes; then : +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1 _ACEOF @@ -26791,7 +27564,7 @@ if test $ac_header_dirent = dirent.h; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5 $as_echo_n "checking for library containing opendir... " >&6; } -if test "${ac_cv_search_opendir+set}" = set; then : +if ${ac_cv_search_opendir+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS @@ -26833,11 +27606,11 @@ fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext - if test "${ac_cv_search_opendir+set}" = set; then : + if ${ac_cv_search_opendir+:} false; then : break fi done -if test "${ac_cv_search_opendir+set}" = set; then : +if ${ac_cv_search_opendir+:} false; then : else ac_cv_search_opendir=no @@ -26856,7 +27629,7 @@ else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5 $as_echo_n "checking for library containing opendir... " >&6; } -if test "${ac_cv_search_opendir+set}" = set; then : +if ${ac_cv_search_opendir+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS @@ -26898,11 +27671,11 @@ fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext - if test "${ac_cv_search_opendir+set}" = set; then : + if ${ac_cv_search_opendir+:} false; then : break fi done -if test "${ac_cv_search_opendir+set}" = set; then : +if ${ac_cv_search_opendir+:} false; then : else ac_cv_search_opendir=no @@ -26924,7 +27697,7 @@ for ac_header in io.h do : ac_fn_c_check_header_mongrel "$LINENO" "io.h" "ac_cv_header_io_h" "$ac_includes_default" -if test "x$ac_cv_header_io_h" = x""yes; then : +if test "x$ac_cv_header_io_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_IO_H 1 _ACEOF @@ -26990,7 +27763,7 @@ echo { $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5 $as_echo_n "checking for an ANSI C-conforming const... " >&6; } -if test "${ac_cv_c_const+set}" = set; then : +if ${ac_cv_c_const+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -27078,7 +27851,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5 $as_echo_n "checking whether byte ordering is bigendian... " >&6; } -if test "${ac_cv_c_bigendian+set}" = set; then : +if ${ac_cv_c_bigendian+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_c_bigendian=unknown @@ -27344,13 +28117,13 @@ ;; #( *) - as_fn_error "unknown endianness + as_fn_error $? "unknown endianness presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking floating point endianness" >&5 $as_echo_n "checking floating point endianness... " >&6; } -if test "${gd_cv_c_floatordering+set}" = set; then : +if ${gd_cv_c_floatordering+:} false; then : $as_echo_n "(cached) " >&6 else gd_cv_c_floatordering=unknown @@ -27452,7 +28225,7 @@ fi ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default" -if test "x$ac_cv_type_size_t" = x""yes; then : +if test "x$ac_cv_type_size_t" = xyes; then : else @@ -27468,7 +28241,7 @@ # This bug is HP SR number 8606223364. { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5 $as_echo_n "checking size of size_t... " >&6; } -if test "${ac_cv_sizeof_size_t+set}" = set; then : +if ${ac_cv_sizeof_size_t+:} false; then : $as_echo_n "(cached) " >&6 else if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (size_t))" "ac_cv_sizeof_size_t" "$ac_includes_default"; then : @@ -27477,9 +28250,8 @@ if test "$ac_cv_type_size_t" = yes; then { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ as_fn_set_status 77 -as_fn_error "cannot compute sizeof (size_t) -See \`config.log' for more details." "$LINENO" 5; }; } +as_fn_error 77 "cannot compute sizeof (size_t) +See \`config.log' for more details" "$LINENO" 5; } else ac_cv_sizeof_size_t=0 fi @@ -27497,7 +28269,7 @@ ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default" -if test "x$ac_cv_type_ssize_t" = x""yes; then : +if test "x$ac_cv_type_ssize_t" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_SSIZE_T 1 @@ -27507,7 +28279,7 @@ fi ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default" -if test "x$ac_cv_type_off_t" = x""yes; then : +if test "x$ac_cv_type_off_t" = xyes; then : else @@ -27523,7 +28295,7 @@ # This bug is HP SR number 8606223364. { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5 $as_echo_n "checking size of off_t... " >&6; } -if test "${ac_cv_sizeof_off_t+set}" = set; then : +if ${ac_cv_sizeof_off_t+:} false; then : $as_echo_n "(cached) " >&6 else if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "$ac_includes_default"; then : @@ -27532,9 +28304,8 @@ if test "$ac_cv_type_off_t" = yes; then { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ as_fn_set_status 77 -as_fn_error "cannot compute sizeof (off_t) -See \`config.log' for more details." "$LINENO" 5; }; } +as_fn_error 77 "cannot compute sizeof (off_t) +See \`config.log' for more details" "$LINENO" 5; } else ac_cv_sizeof_off_t=0 fi @@ -27652,7 +28423,7 @@ if test "x$disable_c99" = "xno"; then ac_fn_c_check_type "$LINENO" "_Complex float" "ac_cv_type__Complex_float" "$ac_includes_default" -if test "x$ac_cv_type__Complex_float" = x""yes; then : +if test "x$ac_cv_type__Complex_float" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE__COMPLEX_FLOAT 1 @@ -27661,7 +28432,7 @@ fi ac_fn_c_check_type "$LINENO" "_Complex double" "ac_cv_type__Complex_double" "$ac_includes_default" -if test "x$ac_cv_type__Complex_double" = x""yes; then : +if test "x$ac_cv_type__Complex_double" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE__COMPLEX_DOUBLE 1 @@ -27675,7 +28446,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct stat64" >&5 $as_echo_n "checking for struct stat64... " >&6; } -if test "${gd_cv_type_struct_stat64+set}" = set; then : +if ${gd_cv_type_struct_stat64+:} false; then : $as_echo_n "(cached) " >&6 else @@ -27770,7 +28541,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct __stat64" >&5 $as_echo_n "checking for struct __stat64... " >&6; } -if test "${gd_cv_type_struct___stat64+set}" = set; then : +if ${gd_cv_type_struct___stat64+:} false; then : $as_echo_n "(cached) " >&6 else @@ -27865,7 +28636,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for off64_t" >&5 $as_echo_n "checking for off64_t... " >&6; } -if test "${gd_cv_type_off64_t+set}" = set; then : +if ${gd_cv_type_off64_t+:} false; then : $as_echo_n "(cached) " >&6 else @@ -27972,7 +28743,7 @@ # This bug is HP SR number 8606223364. { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short int" >&5 $as_echo_n "checking size of short int... " >&6; } -if test "${ac_cv_sizeof_short_int+set}" = set; then : +if ${ac_cv_sizeof_short_int+:} false; then : $as_echo_n "(cached) " >&6 else if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (short int))" "ac_cv_sizeof_short_int" "$ac_includes_default"; then : @@ -27981,9 +28752,8 @@ if test "$ac_cv_type_short_int" = yes; then { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ as_fn_set_status 77 -as_fn_error "cannot compute sizeof (short int) -See \`config.log' for more details." "$LINENO" 5; }; } +as_fn_error 77 "cannot compute sizeof (short int) +See \`config.log' for more details" "$LINENO" 5; } else ac_cv_sizeof_short_int=0 fi @@ -28006,7 +28776,7 @@ # This bug is HP SR number 8606223364. { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5 $as_echo_n "checking size of int... " >&6; } -if test "${ac_cv_sizeof_int+set}" = set; then : +if ${ac_cv_sizeof_int+:} false; then : $as_echo_n "(cached) " >&6 else if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int))" "ac_cv_sizeof_int" "$ac_includes_default"; then : @@ -28015,9 +28785,8 @@ if test "$ac_cv_type_int" = yes; then { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ as_fn_set_status 77 -as_fn_error "cannot compute sizeof (int) -See \`config.log' for more details." "$LINENO" 5; }; } +as_fn_error 77 "cannot compute sizeof (int) +See \`config.log' for more details" "$LINENO" 5; } else ac_cv_sizeof_int=0 fi @@ -28040,7 +28809,7 @@ # This bug is HP SR number 8606223364. { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long int" >&5 $as_echo_n "checking size of long int... " >&6; } -if test "${ac_cv_sizeof_long_int+set}" = set; then : +if ${ac_cv_sizeof_long_int+:} false; then : $as_echo_n "(cached) " >&6 else if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long int))" "ac_cv_sizeof_long_int" "$ac_includes_default"; then : @@ -28049,9 +28818,8 @@ if test "$ac_cv_type_long_int" = yes; then { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ as_fn_set_status 77 -as_fn_error "cannot compute sizeof (long int) -See \`config.log' for more details." "$LINENO" 5; }; } +as_fn_error 77 "cannot compute sizeof (long int) +See \`config.log' for more details" "$LINENO" 5; } else ac_cv_sizeof_long_int=0 fi @@ -28074,7 +28842,7 @@ # This bug is HP SR number 8606223364. { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long int" >&5 $as_echo_n "checking size of long long int... " >&6; } -if test "${ac_cv_sizeof_long_long_int+set}" = set; then : +if ${ac_cv_sizeof_long_long_int+:} false; then : $as_echo_n "(cached) " >&6 else if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long int))" "ac_cv_sizeof_long_long_int" "$ac_includes_default"; then : @@ -28083,9 +28851,8 @@ if test "$ac_cv_type_long_long_int" = yes; then { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ as_fn_set_status 77 -as_fn_error "cannot compute sizeof (long long int) -See \`config.log' for more details." "$LINENO" 5; }; } +as_fn_error 77 "cannot compute sizeof (long long int) +See \`config.log' for more details" "$LINENO" 5; } else ac_cv_sizeof_long_long_int=0 fi @@ -28108,7 +28875,7 @@ # This bug is HP SR number 8606223364. { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned short int" >&5 $as_echo_n "checking size of unsigned short int... " >&6; } -if test "${ac_cv_sizeof_unsigned_short_int+set}" = set; then : +if ${ac_cv_sizeof_unsigned_short_int+:} false; then : $as_echo_n "(cached) " >&6 else if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned short int))" "ac_cv_sizeof_unsigned_short_int" "$ac_includes_default"; then : @@ -28117,9 +28884,8 @@ if test "$ac_cv_type_unsigned_short_int" = yes; then { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ as_fn_set_status 77 -as_fn_error "cannot compute sizeof (unsigned short int) -See \`config.log' for more details." "$LINENO" 5; }; } +as_fn_error 77 "cannot compute sizeof (unsigned short int) +See \`config.log' for more details" "$LINENO" 5; } else ac_cv_sizeof_unsigned_short_int=0 fi @@ -28142,7 +28908,7 @@ # This bug is HP SR number 8606223364. { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned int" >&5 $as_echo_n "checking size of unsigned int... " >&6; } -if test "${ac_cv_sizeof_unsigned_int+set}" = set; then : +if ${ac_cv_sizeof_unsigned_int+:} false; then : $as_echo_n "(cached) " >&6 else if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned int))" "ac_cv_sizeof_unsigned_int" "$ac_includes_default"; then : @@ -28151,9 +28917,8 @@ if test "$ac_cv_type_unsigned_int" = yes; then { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ as_fn_set_status 77 -as_fn_error "cannot compute sizeof (unsigned int) -See \`config.log' for more details." "$LINENO" 5; }; } +as_fn_error 77 "cannot compute sizeof (unsigned int) +See \`config.log' for more details" "$LINENO" 5; } else ac_cv_sizeof_unsigned_int=0 fi @@ -28176,7 +28941,7 @@ # This bug is HP SR number 8606223364. { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned long int" >&5 $as_echo_n "checking size of unsigned long int... " >&6; } -if test "${ac_cv_sizeof_unsigned_long_int+set}" = set; then : +if ${ac_cv_sizeof_unsigned_long_int+:} false; then : $as_echo_n "(cached) " >&6 else if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long int))" "ac_cv_sizeof_unsigned_long_int" "$ac_includes_default"; then : @@ -28185,9 +28950,8 @@ if test "$ac_cv_type_unsigned_long_int" = yes; then { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ as_fn_set_status 77 -as_fn_error "cannot compute sizeof (unsigned long int) -See \`config.log' for more details." "$LINENO" 5; }; } +as_fn_error 77 "cannot compute sizeof (unsigned long int) +See \`config.log' for more details" "$LINENO" 5; } else ac_cv_sizeof_unsigned_long_int=0 fi @@ -28210,7 +28974,7 @@ # This bug is HP SR number 8606223364. { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned long long int" >&5 $as_echo_n "checking size of unsigned long long int... " >&6; } -if test "${ac_cv_sizeof_unsigned_long_long_int+set}" = set; then : +if ${ac_cv_sizeof_unsigned_long_long_int+:} false; then : $as_echo_n "(cached) " >&6 else if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long long int))" "ac_cv_sizeof_unsigned_long_long_int" "$ac_includes_default"; then : @@ -28219,9 +28983,8 @@ if test "$ac_cv_type_unsigned_long_long_int" = yes; then { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ as_fn_set_status 77 -as_fn_error "cannot compute sizeof (unsigned long long int) -See \`config.log' for more details." "$LINENO" 5; }; } +as_fn_error 77 "cannot compute sizeof (unsigned long long int) +See \`config.log' for more details" "$LINENO" 5; } else ac_cv_sizeof_unsigned_long_long_int=0 fi @@ -28299,7 +29062,7 @@ set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_SEQ+set}" = set; then : +if ${ac_cv_prog_SEQ+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$SEQ"; then @@ -28478,7 +29241,7 @@ for ac_header in Python.h do : ac_fn_c_check_header_mongrel "$LINENO" "Python.h" "ac_cv_header_Python_h" "$ac_includes_default" -if test "x$ac_cv_header_Python_h" = x""yes; then : +if test "x$ac_cv_header_Python_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_PYTHON_H 1 _ACEOF @@ -28587,7 +29350,7 @@ #include " -if test "x$ac_cv_header_numpy_arrayobject_h" = x""yes; then : +if test "x$ac_cv_header_numpy_arrayobject_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_NUMPY_ARRAYOBJECT_H 1 _ACEOF @@ -28820,7 +29583,7 @@ for ac_header in idl_export.h do : ac_fn_c_check_header_mongrel "$LINENO" "idl_export.h" "ac_cv_header_idl_export_h" "$ac_includes_default" -if test "x$ac_cv_header_idl_export_h" = x""yes; then : +if test "x$ac_cv_header_idl_export_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_IDL_EXPORT_H 1 _ACEOF @@ -28844,7 +29607,7 @@ set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_DATE+set}" = set; then : +if ${ac_cv_prog_DATE+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$DATE"; then @@ -28925,7 +29688,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BZ2_bzReadOpen in -lbz2" >&5 $as_echo_n "checking for BZ2_bzReadOpen in -lbz2... " >&6; } -if test "${ac_cv_lib_bz2_BZ2_bzReadOpen+set}" = set; then : +if ${ac_cv_lib_bz2_BZ2_bzReadOpen+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -28967,7 +29730,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bz2_BZ2_bzReadOpen" >&5 $as_echo "$ac_cv_lib_bz2_BZ2_bzReadOpen" >&6; } -if test "x$ac_cv_lib_bz2_BZ2_bzReadOpen" = x""yes; then : +if test "x$ac_cv_lib_bz2_BZ2_bzReadOpen" = xyes; then : have_this_lib=yes $as_echo "#define HAVE_LIBBZ2 1" >>confdefs.h @@ -28984,7 +29747,7 @@ for ac_header in bzlib.h do : ac_fn_c_check_header_mongrel "$LINENO" "bzlib.h" "ac_cv_header_bzlib_h" "$ac_includes_default" -if test "x$ac_cv_header_bzlib_h" = x""yes; then : +if test "x$ac_cv_header_bzlib_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_BZLIB_H 1 _ACEOF @@ -29023,7 +29786,7 @@ set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_path_bzip2+set}" = set; then : +if ${ac_cv_path_path_bzip2+:} false; then : $as_echo_n "(cached) " >&6 else case $path_bzip2 in @@ -29079,7 +29842,7 @@ set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_path_bunzip2+set}" = set; then : +if ${ac_cv_path_path_bunzip2+:} false; then : $as_echo_n "(cached) " >&6 else case $path_bunzip2 in @@ -29196,7 +29959,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for slimopen in -lslim" >&5 $as_echo_n "checking for slimopen in -lslim... " >&6; } -if test "${ac_cv_lib_slim_slimopen+set}" = set; then : +if ${ac_cv_lib_slim_slimopen+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -29238,7 +30001,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_slim_slimopen" >&5 $as_echo "$ac_cv_lib_slim_slimopen" >&6; } -if test "x$ac_cv_lib_slim_slimopen" = x""yes; then : +if test "x$ac_cv_lib_slim_slimopen" = xyes; then : have_this_lib=yes $as_echo "#define HAVE_LIBSLIM 1" >>confdefs.h @@ -29255,7 +30018,7 @@ for ac_header in slimlib.h do : ac_fn_c_check_header_mongrel "$LINENO" "slimlib.h" "ac_cv_header_slimlib_h" "$ac_includes_default" -if test "x$ac_cv_header_slimlib_h" = x""yes; then : +if test "x$ac_cv_header_slimlib_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_SLIMLIB_H 1 _ACEOF @@ -29294,7 +30057,7 @@ set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_path_slim+set}" = set; then : +if ${ac_cv_path_path_slim+:} false; then : $as_echo_n "(cached) " >&6 else case $path_slim in @@ -29350,7 +30113,7 @@ set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_path_unslim+set}" = set; then : +if ${ac_cv_path_path_unslim+:} false; then : $as_echo_n "(cached) " >&6 else case $path_unslim in @@ -29467,7 +30230,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gzopen in -lz" >&5 $as_echo_n "checking for gzopen in -lz... " >&6; } -if test "${ac_cv_lib_z_gzopen+set}" = set; then : +if ${ac_cv_lib_z_gzopen+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -29509,7 +30272,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_gzopen" >&5 $as_echo "$ac_cv_lib_z_gzopen" >&6; } -if test "x$ac_cv_lib_z_gzopen" = x""yes; then : +if test "x$ac_cv_lib_z_gzopen" = xyes; then : have_this_lib=yes $as_echo "#define HAVE_LIBZ 1" >>confdefs.h @@ -29526,7 +30289,7 @@ for ac_header in zlib.h do : ac_fn_c_check_header_mongrel "$LINENO" "zlib.h" "ac_cv_header_zlib_h" "$ac_includes_default" -if test "x$ac_cv_header_zlib_h" = x""yes; then : +if test "x$ac_cv_header_zlib_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_ZLIB_H 1 _ACEOF @@ -29565,7 +30328,7 @@ set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_path_gzip+set}" = set; then : +if ${ac_cv_path_path_gzip+:} false; then : $as_echo_n "(cached) " >&6 else case $path_gzip in @@ -29621,7 +30384,7 @@ set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_path_gunzip+set}" = set; then : +if ${ac_cv_path_path_gunzip+:} false; then : $as_echo_n "(cached) " >&6 else case $path_gunzip in @@ -29738,7 +30501,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lzma_auto_decoder in -llzma" >&5 $as_echo_n "checking for lzma_auto_decoder in -llzma... " >&6; } -if test "${ac_cv_lib_lzma_lzma_auto_decoder+set}" = set; then : +if ${ac_cv_lib_lzma_lzma_auto_decoder+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -29780,7 +30543,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lzma_lzma_auto_decoder" >&5 $as_echo "$ac_cv_lib_lzma_lzma_auto_decoder" >&6; } -if test "x$ac_cv_lib_lzma_lzma_auto_decoder" = x""yes; then : +if test "x$ac_cv_lib_lzma_lzma_auto_decoder" = xyes; then : have_this_lib=yes $as_echo "#define HAVE_LIBLZMA 1" >>confdefs.h @@ -29797,7 +30560,7 @@ for ac_header in lzma.h do : ac_fn_c_check_header_mongrel "$LINENO" "lzma.h" "ac_cv_header_lzma_h" "$ac_includes_default" -if test "x$ac_cv_header_lzma_h" = x""yes; then : +if test "x$ac_cv_header_lzma_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LZMA_H 1 _ACEOF @@ -29836,7 +30599,7 @@ set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_path_xz+set}" = set; then : +if ${ac_cv_path_path_xz+:} false; then : $as_echo_n "(cached) " >&6 else case $path_xz in @@ -30225,10 +30988,21 @@ :end' >>confcache if diff "$cache_file" confcache >/dev/null 2>&1; then :; else if test -w "$cache_file"; then - test "x$cache_file" != "x/dev/null" && + if test "x$cache_file" != "x/dev/null"; then { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 $as_echo "$as_me: updating cache $cache_file" >&6;} - cat confcache >$cache_file + if test ! -f "$cache_file" || test -h "$cache_file"; then + cat confcache >"$cache_file" + else + case $cache_file in #( + */* | ?:*) + mv -f confcache "$cache_file"$$ && + mv -f "$cache_file"$$ "$cache_file" ;; #( + *) + mv -f confcache "$cache_file" ;; + esac + fi + fi else { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} @@ -30244,6 +31018,7 @@ ac_libobjs= ac_ltlibobjs= +U= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' @@ -30267,148 +31042,144 @@ fi if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then - as_fn_error "conditional \"AMDEP\" was never defined. + as_fn_error $? "conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then - as_fn_error "conditional \"am__fastdepCC\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then - as_fn_error "conditional \"am__fastdepCXX\" was never defined. + as_fn_error $? "conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then - as_fn_error "conditional \"am__fastdepCXX\" was never defined. + as_fn_error $? "conditional \"am__fastdepCXX\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then - as_fn_error "conditional \"am__fastdepCXX\" was never defined. + as_fn_error $? "conditional \"am__fastdepCXX\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${USE_BZIP2_TRUE}" && test -z "${USE_BZIP2_FALSE}"; then - as_fn_error "conditional \"USE_BZIP2\" was never defined. + as_fn_error $? "conditional \"USE_BZIP2\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${TEST_BZIP2_TRUE}" && test -z "${TEST_BZIP2_FALSE}"; then - as_fn_error "conditional \"TEST_BZIP2\" was never defined. + as_fn_error $? "conditional \"TEST_BZIP2\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${USE_SLIM_TRUE}" && test -z "${USE_SLIM_FALSE}"; then - as_fn_error "conditional \"USE_SLIM\" was never defined. + as_fn_error $? "conditional \"USE_SLIM\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${TEST_SLIM_TRUE}" && test -z "${TEST_SLIM_FALSE}"; then - as_fn_error "conditional \"TEST_SLIM\" was never defined. + as_fn_error $? "conditional \"TEST_SLIM\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${USE_GZIP_TRUE}" && test -z "${USE_GZIP_FALSE}"; then - as_fn_error "conditional \"USE_GZIP\" was never defined. + as_fn_error $? "conditional \"USE_GZIP\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${TEST_GZIP_TRUE}" && test -z "${TEST_GZIP_FALSE}"; then - as_fn_error "conditional \"TEST_GZIP\" was never defined. + as_fn_error $? "conditional \"TEST_GZIP\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${USE_LZMA_TRUE}" && test -z "${USE_LZMA_FALSE}"; then - as_fn_error "conditional \"USE_LZMA\" was never defined. + as_fn_error $? "conditional \"USE_LZMA\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${TEST_LZMA_TRUE}" && test -z "${TEST_LZMA_FALSE}"; then - as_fn_error "conditional \"TEST_LZMA\" was never defined. + as_fn_error $? "conditional \"TEST_LZMA\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${GETDATA_DEBUG_TRUE}" && test -z "${GETDATA_DEBUG_FALSE}"; then - as_fn_error "conditional \"GETDATA_DEBUG\" was never defined. + as_fn_error $? "conditional \"GETDATA_DEBUG\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${CC_WALL_TRUE}" && test -z "${CC_WALL_FALSE}"; then - as_fn_error "conditional \"CC_WALL\" was never defined. + as_fn_error $? "conditional \"CC_WALL\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${CXX_WALL_TRUE}" && test -z "${CXX_WALL_FALSE}"; then - as_fn_error "conditional \"CXX_WALL\" was never defined. + as_fn_error $? "conditional \"CXX_WALL\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${F77_WALL_TRUE}" && test -z "${F77_WALL_FALSE}"; then - as_fn_error "conditional \"F77_WALL\" was never defined. + as_fn_error $? "conditional \"F77_WALL\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${FC_WALL_TRUE}" && test -z "${FC_WALL_FALSE}"; then - as_fn_error "conditional \"FC_WALL\" was never defined. + as_fn_error $? "conditional \"FC_WALL\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${CC_WEXTRA_TRUE}" && test -z "${CC_WEXTRA_FALSE}"; then - as_fn_error "conditional \"CC_WEXTRA\" was never defined. + as_fn_error $? "conditional \"CC_WEXTRA\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${CXX_WEXTRA_TRUE}" && test -z "${CXX_WEXTRA_FALSE}"; then - as_fn_error "conditional \"CXX_WEXTRA\" was never defined. + as_fn_error $? "conditional \"CXX_WEXTRA\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${F77_WEXTRA_TRUE}" && test -z "${F77_WEXTRA_FALSE}"; then - as_fn_error "conditional \"F77_WEXTRA\" was never defined. + as_fn_error $? "conditional \"F77_WEXTRA\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${FC_WEXTRA_TRUE}" && test -z "${FC_WEXTRA_FALSE}"; then - as_fn_error "conditional \"FC_WEXTRA\" was never defined. + as_fn_error $? "conditional \"FC_WEXTRA\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${INTEL_F77_COMPILER_TRUE}" && test -z "${INTEL_F77_COMPILER_FALSE}"; then - as_fn_error "conditional \"INTEL_F77_COMPILER\" was never defined. + as_fn_error $? "conditional \"INTEL_F77_COMPILER\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${INTEL_FC_COMPILER_TRUE}" && test -z "${INTEL_FC_COMPILER_FALSE}"; then - as_fn_error "conditional \"INTEL_FC_COMPILER\" was never defined. + as_fn_error $? "conditional \"INTEL_FC_COMPILER\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${LFS_TRANSITIONAL_API_TRUE}" && test -z "${LFS_TRANSITIONAL_API_FALSE}"; then - as_fn_error "conditional \"LFS_TRANSITIONAL_API\" was never defined. + as_fn_error $? "conditional \"LFS_TRANSITIONAL_API\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${INCLUDE_LEGACY_API_TRUE}" && test -z "${INCLUDE_LEGACY_API_FALSE}"; then - as_fn_error "conditional \"INCLUDE_LEGACY_API\" was never defined. + as_fn_error $? "conditional \"INCLUDE_LEGACY_API\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${MAKE_CXXBINDINGS_TRUE}" && test -z "${MAKE_CXXBINDINGS_FALSE}"; then - as_fn_error "conditional \"MAKE_CXXBINDINGS\" was never defined. + as_fn_error $? "conditional \"MAKE_CXXBINDINGS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${MAKE_F77BINDINGS_TRUE}" && test -z "${MAKE_F77BINDINGS_FALSE}"; then - as_fn_error "conditional \"MAKE_F77BINDINGS\" was never defined. + as_fn_error $? "conditional \"MAKE_F77BINDINGS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${MAKE_F95BINDINGS_TRUE}" && test -z "${MAKE_F95BINDINGS_FALSE}"; then - as_fn_error "conditional \"MAKE_F95BINDINGS\" was never defined. + as_fn_error $? "conditional \"MAKE_F95BINDINGS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${MAKE_PYBINDINGS_TRUE}" && test -z "${MAKE_PYBINDINGS_FALSE}"; then - as_fn_error "conditional \"MAKE_PYBINDINGS\" was never defined. + as_fn_error $? "conditional \"MAKE_PYBINDINGS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${MAKE_IDLBINDINGS_TRUE}" && test -z "${MAKE_IDLBINDINGS_FALSE}"; then - as_fn_error "conditional \"MAKE_IDLBINDINGS\" was never defined. + as_fn_error $? "conditional \"MAKE_IDLBINDINGS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${USE_MODULES_TRUE}" && test -z "${USE_MODULES_FALSE}"; then - as_fn_error "conditional \"USE_MODULES\" was never defined. + as_fn_error $? "conditional \"USE_MODULES\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${TEST_PYTHON_TRUE}" && test -z "${TEST_PYTHON_FALSE}"; then - as_fn_error "conditional \"TEST_PYTHON\" was never defined. + as_fn_error $? "conditional \"TEST_PYTHON\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${TEST_IDL_TRUE}" && test -z "${TEST_IDL_FALSE}"; then - as_fn_error "conditional \"TEST_IDL\" was never defined. + as_fn_error $? "conditional \"TEST_IDL\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_DIFF_TRUE}" && test -z "${HAVE_DIFF_FALSE}"; then - as_fn_error "conditional \"HAVE_DIFF\" was never defined. + as_fn_error $? "conditional \"HAVE_DIFF\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi -: ${CONFIG_STATUS=./config.status} +: "${CONFIG_STATUS=./config.status}" ac_write_fail=0 ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" @@ -30509,6 +31280,7 @@ IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. +as_myself= case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -30554,19 +31326,19 @@ (unset CDPATH) >/dev/null 2>&1 && unset CDPATH -# as_fn_error ERROR [LINENO LOG_FD] -# --------------------------------- +# as_fn_error STATUS ERROR [LINENO LOG_FD] +# ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the -# script with status $?, using 1 if that was 0. +# script with STATUS, using 1 if that was 0. as_fn_error () { - as_status=$?; test $as_status -eq 0 && as_status=1 - if test "$3"; then - as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3 + as_status=$1; test $as_status -eq 0 && as_status=1 + if test "$4"; then + as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi - $as_echo "$as_me: error: $1" >&2 + $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error @@ -30762,7 +31534,7 @@ test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir" + } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p @@ -30815,8 +31587,8 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by GetData $as_me 0.7.0, which was -generated by GNU Autoconf 2.65. Invocation command line was +This file was extended by GetData $as_me 0.7.1, which was +generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS @@ -30881,11 +31653,11 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -GetData config.status 0.7.0 -configured by $0, generated by GNU Autoconf 2.65, +GetData config.status 0.7.1 +configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" -Copyright (C) 2009 Free Software Foundation, Inc. +Copyright (C) 2010 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." @@ -30903,11 +31675,16 @@ while test $# != 0 do case $1 in - --*=*) + --*=?*) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` ac_shift=: ;; + --*=) + ac_option=`expr "X$1" : 'X\([^=]*\)='` + ac_optarg= + ac_shift=: + ;; *) ac_option=$1 ac_optarg=$2 @@ -30929,6 +31706,7 @@ $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; + '') as_fn_error $? "missing file argument" ;; esac as_fn_append CONFIG_FILES " '$ac_optarg'" ac_need_defaults=false;; @@ -30941,7 +31719,7 @@ ac_need_defaults=false;; --he | --h) # Conflict between --help and --header - as_fn_error "ambiguous option: \`$1' + as_fn_error $? "ambiguous option: \`$1' Try \`$0 --help' for more information.";; --help | --hel | -h ) $as_echo "$ac_cs_usage"; exit ;; @@ -30950,7 +31728,7 @@ ac_cs_silent=: ;; # This is an error. - -*) as_fn_error "unrecognized option: \`$1' + -*) as_fn_error $? "unrecognized option: \`$1' Try \`$0 --help' for more information." ;; *) as_fn_append ac_config_targets " $1" @@ -31004,278 +31782,306 @@ sed_quote_subst='$sed_quote_subst' double_quote_subst='$double_quote_subst' delay_variable_subst='$delay_variable_subst' -macro_version='`$ECHO "X$macro_version" | $Xsed -e "$delay_single_quote_subst"`' -macro_revision='`$ECHO "X$macro_revision" | $Xsed -e "$delay_single_quote_subst"`' -enable_shared='`$ECHO "X$enable_shared" | $Xsed -e "$delay_single_quote_subst"`' -enable_static='`$ECHO "X$enable_static" | $Xsed -e "$delay_single_quote_subst"`' -pic_mode='`$ECHO "X$pic_mode" | $Xsed -e "$delay_single_quote_subst"`' -enable_fast_install='`$ECHO "X$enable_fast_install" | $Xsed -e "$delay_single_quote_subst"`' -host_alias='`$ECHO "X$host_alias" | $Xsed -e "$delay_single_quote_subst"`' -host='`$ECHO "X$host" | $Xsed -e "$delay_single_quote_subst"`' -host_os='`$ECHO "X$host_os" | $Xsed -e "$delay_single_quote_subst"`' -build_alias='`$ECHO "X$build_alias" | $Xsed -e "$delay_single_quote_subst"`' -build='`$ECHO "X$build" | $Xsed -e "$delay_single_quote_subst"`' -build_os='`$ECHO "X$build_os" | $Xsed -e "$delay_single_quote_subst"`' -SED='`$ECHO "X$SED" | $Xsed -e "$delay_single_quote_subst"`' -Xsed='`$ECHO "X$Xsed" | $Xsed -e "$delay_single_quote_subst"`' -GREP='`$ECHO "X$GREP" | $Xsed -e "$delay_single_quote_subst"`' -EGREP='`$ECHO "X$EGREP" | $Xsed -e "$delay_single_quote_subst"`' -FGREP='`$ECHO "X$FGREP" | $Xsed -e "$delay_single_quote_subst"`' -LD='`$ECHO "X$LD" | $Xsed -e "$delay_single_quote_subst"`' -NM='`$ECHO "X$NM" | $Xsed -e "$delay_single_quote_subst"`' -LN_S='`$ECHO "X$LN_S" | $Xsed -e "$delay_single_quote_subst"`' -max_cmd_len='`$ECHO "X$max_cmd_len" | $Xsed -e "$delay_single_quote_subst"`' -ac_objext='`$ECHO "X$ac_objext" | $Xsed -e "$delay_single_quote_subst"`' -exeext='`$ECHO "X$exeext" | $Xsed -e "$delay_single_quote_subst"`' -lt_unset='`$ECHO "X$lt_unset" | $Xsed -e "$delay_single_quote_subst"`' -lt_SP2NL='`$ECHO "X$lt_SP2NL" | $Xsed -e "$delay_single_quote_subst"`' -lt_NL2SP='`$ECHO "X$lt_NL2SP" | $Xsed -e "$delay_single_quote_subst"`' -reload_flag='`$ECHO "X$reload_flag" | $Xsed -e "$delay_single_quote_subst"`' -reload_cmds='`$ECHO "X$reload_cmds" | $Xsed -e "$delay_single_quote_subst"`' -OBJDUMP='`$ECHO "X$OBJDUMP" | $Xsed -e "$delay_single_quote_subst"`' -deplibs_check_method='`$ECHO "X$deplibs_check_method" | $Xsed -e "$delay_single_quote_subst"`' -file_magic_cmd='`$ECHO "X$file_magic_cmd" | $Xsed -e "$delay_single_quote_subst"`' -AR='`$ECHO "X$AR" | $Xsed -e "$delay_single_quote_subst"`' -AR_FLAGS='`$ECHO "X$AR_FLAGS" | $Xsed -e "$delay_single_quote_subst"`' -STRIP='`$ECHO "X$STRIP" | $Xsed -e "$delay_single_quote_subst"`' -RANLIB='`$ECHO "X$RANLIB" | $Xsed -e "$delay_single_quote_subst"`' -old_postinstall_cmds='`$ECHO "X$old_postinstall_cmds" | $Xsed -e "$delay_single_quote_subst"`' -old_postuninstall_cmds='`$ECHO "X$old_postuninstall_cmds" | $Xsed -e "$delay_single_quote_subst"`' -old_archive_cmds='`$ECHO "X$old_archive_cmds" | $Xsed -e "$delay_single_quote_subst"`' -CC='`$ECHO "X$CC" | $Xsed -e "$delay_single_quote_subst"`' -CFLAGS='`$ECHO "X$CFLAGS" | $Xsed -e "$delay_single_quote_subst"`' -compiler='`$ECHO "X$compiler" | $Xsed -e "$delay_single_quote_subst"`' -GCC='`$ECHO "X$GCC" | $Xsed -e "$delay_single_quote_subst"`' -lt_cv_sys_global_symbol_pipe='`$ECHO "X$lt_cv_sys_global_symbol_pipe" | $Xsed -e "$delay_single_quote_subst"`' -lt_cv_sys_global_symbol_to_cdecl='`$ECHO "X$lt_cv_sys_global_symbol_to_cdecl" | $Xsed -e "$delay_single_quote_subst"`' -lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "X$lt_cv_sys_global_symbol_to_c_name_address" | $Xsed -e "$delay_single_quote_subst"`' -lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "X$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $Xsed -e "$delay_single_quote_subst"`' -objdir='`$ECHO "X$objdir" | $Xsed -e "$delay_single_quote_subst"`' -SHELL='`$ECHO "X$SHELL" | $Xsed -e "$delay_single_quote_subst"`' -ECHO='`$ECHO "X$ECHO" | $Xsed -e "$delay_single_quote_subst"`' -MAGIC_CMD='`$ECHO "X$MAGIC_CMD" | $Xsed -e "$delay_single_quote_subst"`' -lt_prog_compiler_no_builtin_flag='`$ECHO "X$lt_prog_compiler_no_builtin_flag" | $Xsed -e "$delay_single_quote_subst"`' -lt_prog_compiler_wl='`$ECHO "X$lt_prog_compiler_wl" | $Xsed -e "$delay_single_quote_subst"`' -lt_prog_compiler_pic='`$ECHO "X$lt_prog_compiler_pic" | $Xsed -e "$delay_single_quote_subst"`' -lt_prog_compiler_static='`$ECHO "X$lt_prog_compiler_static" | $Xsed -e "$delay_single_quote_subst"`' -lt_cv_prog_compiler_c_o='`$ECHO "X$lt_cv_prog_compiler_c_o" | $Xsed -e "$delay_single_quote_subst"`' -need_locks='`$ECHO "X$need_locks" | $Xsed -e "$delay_single_quote_subst"`' -DSYMUTIL='`$ECHO "X$DSYMUTIL" | $Xsed -e "$delay_single_quote_subst"`' -NMEDIT='`$ECHO "X$NMEDIT" | $Xsed -e "$delay_single_quote_subst"`' -LIPO='`$ECHO "X$LIPO" | $Xsed -e "$delay_single_quote_subst"`' -OTOOL='`$ECHO "X$OTOOL" | $Xsed -e "$delay_single_quote_subst"`' -OTOOL64='`$ECHO "X$OTOOL64" | $Xsed -e "$delay_single_quote_subst"`' -libext='`$ECHO "X$libext" | $Xsed -e "$delay_single_quote_subst"`' -shrext_cmds='`$ECHO "X$shrext_cmds" | $Xsed -e "$delay_single_quote_subst"`' -extract_expsyms_cmds='`$ECHO "X$extract_expsyms_cmds" | $Xsed -e "$delay_single_quote_subst"`' -archive_cmds_need_lc='`$ECHO "X$archive_cmds_need_lc" | $Xsed -e "$delay_single_quote_subst"`' -enable_shared_with_static_runtimes='`$ECHO "X$enable_shared_with_static_runtimes" | $Xsed -e "$delay_single_quote_subst"`' -export_dynamic_flag_spec='`$ECHO "X$export_dynamic_flag_spec" | $Xsed -e "$delay_single_quote_subst"`' -whole_archive_flag_spec='`$ECHO "X$whole_archive_flag_spec" | $Xsed -e "$delay_single_quote_subst"`' -compiler_needs_object='`$ECHO "X$compiler_needs_object" | $Xsed -e "$delay_single_quote_subst"`' -old_archive_from_new_cmds='`$ECHO "X$old_archive_from_new_cmds" | $Xsed -e "$delay_single_quote_subst"`' -old_archive_from_expsyms_cmds='`$ECHO "X$old_archive_from_expsyms_cmds" | $Xsed -e "$delay_single_quote_subst"`' -archive_cmds='`$ECHO "X$archive_cmds" | $Xsed -e "$delay_single_quote_subst"`' -archive_expsym_cmds='`$ECHO "X$archive_expsym_cmds" | $Xsed -e "$delay_single_quote_subst"`' -module_cmds='`$ECHO "X$module_cmds" | $Xsed -e "$delay_single_quote_subst"`' -module_expsym_cmds='`$ECHO "X$module_expsym_cmds" | $Xsed -e "$delay_single_quote_subst"`' -with_gnu_ld='`$ECHO "X$with_gnu_ld" | $Xsed -e "$delay_single_quote_subst"`' -allow_undefined_flag='`$ECHO "X$allow_undefined_flag" | $Xsed -e "$delay_single_quote_subst"`' -no_undefined_flag='`$ECHO "X$no_undefined_flag" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_libdir_flag_spec='`$ECHO "X$hardcode_libdir_flag_spec" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_libdir_flag_spec_ld='`$ECHO "X$hardcode_libdir_flag_spec_ld" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_libdir_separator='`$ECHO "X$hardcode_libdir_separator" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_direct='`$ECHO "X$hardcode_direct" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_direct_absolute='`$ECHO "X$hardcode_direct_absolute" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_minus_L='`$ECHO "X$hardcode_minus_L" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_shlibpath_var='`$ECHO "X$hardcode_shlibpath_var" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_automatic='`$ECHO "X$hardcode_automatic" | $Xsed -e "$delay_single_quote_subst"`' -inherit_rpath='`$ECHO "X$inherit_rpath" | $Xsed -e "$delay_single_quote_subst"`' -link_all_deplibs='`$ECHO "X$link_all_deplibs" | $Xsed -e "$delay_single_quote_subst"`' -fix_srcfile_path='`$ECHO "X$fix_srcfile_path" | $Xsed -e "$delay_single_quote_subst"`' -always_export_symbols='`$ECHO "X$always_export_symbols" | $Xsed -e "$delay_single_quote_subst"`' -export_symbols_cmds='`$ECHO "X$export_symbols_cmds" | $Xsed -e "$delay_single_quote_subst"`' -exclude_expsyms='`$ECHO "X$exclude_expsyms" | $Xsed -e "$delay_single_quote_subst"`' -include_expsyms='`$ECHO "X$include_expsyms" | $Xsed -e "$delay_single_quote_subst"`' -prelink_cmds='`$ECHO "X$prelink_cmds" | $Xsed -e "$delay_single_quote_subst"`' -file_list_spec='`$ECHO "X$file_list_spec" | $Xsed -e "$delay_single_quote_subst"`' -variables_saved_for_relink='`$ECHO "X$variables_saved_for_relink" | $Xsed -e "$delay_single_quote_subst"`' -need_lib_prefix='`$ECHO "X$need_lib_prefix" | $Xsed -e "$delay_single_quote_subst"`' -need_version='`$ECHO "X$need_version" | $Xsed -e "$delay_single_quote_subst"`' -version_type='`$ECHO "X$version_type" | $Xsed -e "$delay_single_quote_subst"`' -runpath_var='`$ECHO "X$runpath_var" | $Xsed -e "$delay_single_quote_subst"`' -shlibpath_var='`$ECHO "X$shlibpath_var" | $Xsed -e "$delay_single_quote_subst"`' -shlibpath_overrides_runpath='`$ECHO "X$shlibpath_overrides_runpath" | $Xsed -e "$delay_single_quote_subst"`' -libname_spec='`$ECHO "X$libname_spec" | $Xsed -e "$delay_single_quote_subst"`' -library_names_spec='`$ECHO "X$library_names_spec" | $Xsed -e "$delay_single_quote_subst"`' -soname_spec='`$ECHO "X$soname_spec" | $Xsed -e "$delay_single_quote_subst"`' -postinstall_cmds='`$ECHO "X$postinstall_cmds" | $Xsed -e "$delay_single_quote_subst"`' -postuninstall_cmds='`$ECHO "X$postuninstall_cmds" | $Xsed -e "$delay_single_quote_subst"`' -finish_cmds='`$ECHO "X$finish_cmds" | $Xsed -e "$delay_single_quote_subst"`' -finish_eval='`$ECHO "X$finish_eval" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_into_libs='`$ECHO "X$hardcode_into_libs" | $Xsed -e "$delay_single_quote_subst"`' -sys_lib_search_path_spec='`$ECHO "X$sys_lib_search_path_spec" | $Xsed -e "$delay_single_quote_subst"`' -sys_lib_dlsearch_path_spec='`$ECHO "X$sys_lib_dlsearch_path_spec" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_action='`$ECHO "X$hardcode_action" | $Xsed -e "$delay_single_quote_subst"`' -enable_dlopen='`$ECHO "X$enable_dlopen" | $Xsed -e "$delay_single_quote_subst"`' -enable_dlopen_self='`$ECHO "X$enable_dlopen_self" | $Xsed -e "$delay_single_quote_subst"`' -enable_dlopen_self_static='`$ECHO "X$enable_dlopen_self_static" | $Xsed -e "$delay_single_quote_subst"`' -old_striplib='`$ECHO "X$old_striplib" | $Xsed -e "$delay_single_quote_subst"`' -striplib='`$ECHO "X$striplib" | $Xsed -e "$delay_single_quote_subst"`' -compiler_lib_search_dirs='`$ECHO "X$compiler_lib_search_dirs" | $Xsed -e "$delay_single_quote_subst"`' -predep_objects='`$ECHO "X$predep_objects" | $Xsed -e "$delay_single_quote_subst"`' -postdep_objects='`$ECHO "X$postdep_objects" | $Xsed -e "$delay_single_quote_subst"`' -predeps='`$ECHO "X$predeps" | $Xsed -e "$delay_single_quote_subst"`' -postdeps='`$ECHO "X$postdeps" | $Xsed -e "$delay_single_quote_subst"`' -compiler_lib_search_path='`$ECHO "X$compiler_lib_search_path" | $Xsed -e "$delay_single_quote_subst"`' -LD_CXX='`$ECHO "X$LD_CXX" | $Xsed -e "$delay_single_quote_subst"`' -LD_F77='`$ECHO "X$LD_F77" | $Xsed -e "$delay_single_quote_subst"`' -LD_FC='`$ECHO "X$LD_FC" | $Xsed -e "$delay_single_quote_subst"`' -old_archive_cmds_CXX='`$ECHO "X$old_archive_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`' -old_archive_cmds_F77='`$ECHO "X$old_archive_cmds_F77" | $Xsed -e "$delay_single_quote_subst"`' -old_archive_cmds_FC='`$ECHO "X$old_archive_cmds_FC" | $Xsed -e "$delay_single_quote_subst"`' -compiler_CXX='`$ECHO "X$compiler_CXX" | $Xsed -e "$delay_single_quote_subst"`' -compiler_F77='`$ECHO "X$compiler_F77" | $Xsed -e "$delay_single_quote_subst"`' -compiler_FC='`$ECHO "X$compiler_FC" | $Xsed -e "$delay_single_quote_subst"`' -GCC_CXX='`$ECHO "X$GCC_CXX" | $Xsed -e "$delay_single_quote_subst"`' -GCC_F77='`$ECHO "X$GCC_F77" | $Xsed -e "$delay_single_quote_subst"`' -GCC_FC='`$ECHO "X$GCC_FC" | $Xsed -e "$delay_single_quote_subst"`' -lt_prog_compiler_no_builtin_flag_CXX='`$ECHO "X$lt_prog_compiler_no_builtin_flag_CXX" | $Xsed -e "$delay_single_quote_subst"`' -lt_prog_compiler_no_builtin_flag_F77='`$ECHO "X$lt_prog_compiler_no_builtin_flag_F77" | $Xsed -e "$delay_single_quote_subst"`' -lt_prog_compiler_no_builtin_flag_FC='`$ECHO "X$lt_prog_compiler_no_builtin_flag_FC" | $Xsed -e "$delay_single_quote_subst"`' -lt_prog_compiler_wl_CXX='`$ECHO "X$lt_prog_compiler_wl_CXX" | $Xsed -e "$delay_single_quote_subst"`' -lt_prog_compiler_wl_F77='`$ECHO "X$lt_prog_compiler_wl_F77" | $Xsed -e "$delay_single_quote_subst"`' -lt_prog_compiler_wl_FC='`$ECHO "X$lt_prog_compiler_wl_FC" | $Xsed -e "$delay_single_quote_subst"`' -lt_prog_compiler_pic_CXX='`$ECHO "X$lt_prog_compiler_pic_CXX" | $Xsed -e "$delay_single_quote_subst"`' -lt_prog_compiler_pic_F77='`$ECHO "X$lt_prog_compiler_pic_F77" | $Xsed -e "$delay_single_quote_subst"`' -lt_prog_compiler_pic_FC='`$ECHO "X$lt_prog_compiler_pic_FC" | $Xsed -e "$delay_single_quote_subst"`' -lt_prog_compiler_static_CXX='`$ECHO "X$lt_prog_compiler_static_CXX" | $Xsed -e "$delay_single_quote_subst"`' -lt_prog_compiler_static_F77='`$ECHO "X$lt_prog_compiler_static_F77" | $Xsed -e "$delay_single_quote_subst"`' -lt_prog_compiler_static_FC='`$ECHO "X$lt_prog_compiler_static_FC" | $Xsed -e "$delay_single_quote_subst"`' -lt_cv_prog_compiler_c_o_CXX='`$ECHO "X$lt_cv_prog_compiler_c_o_CXX" | $Xsed -e "$delay_single_quote_subst"`' -lt_cv_prog_compiler_c_o_F77='`$ECHO "X$lt_cv_prog_compiler_c_o_F77" | $Xsed -e "$delay_single_quote_subst"`' -lt_cv_prog_compiler_c_o_FC='`$ECHO "X$lt_cv_prog_compiler_c_o_FC" | $Xsed -e "$delay_single_quote_subst"`' -archive_cmds_need_lc_CXX='`$ECHO "X$archive_cmds_need_lc_CXX" | $Xsed -e "$delay_single_quote_subst"`' -archive_cmds_need_lc_F77='`$ECHO "X$archive_cmds_need_lc_F77" | $Xsed -e "$delay_single_quote_subst"`' -archive_cmds_need_lc_FC='`$ECHO "X$archive_cmds_need_lc_FC" | $Xsed -e "$delay_single_quote_subst"`' -enable_shared_with_static_runtimes_CXX='`$ECHO "X$enable_shared_with_static_runtimes_CXX" | $Xsed -e "$delay_single_quote_subst"`' -enable_shared_with_static_runtimes_F77='`$ECHO "X$enable_shared_with_static_runtimes_F77" | $Xsed -e "$delay_single_quote_subst"`' -enable_shared_with_static_runtimes_FC='`$ECHO "X$enable_shared_with_static_runtimes_FC" | $Xsed -e "$delay_single_quote_subst"`' -export_dynamic_flag_spec_CXX='`$ECHO "X$export_dynamic_flag_spec_CXX" | $Xsed -e "$delay_single_quote_subst"`' -export_dynamic_flag_spec_F77='`$ECHO "X$export_dynamic_flag_spec_F77" | $Xsed -e "$delay_single_quote_subst"`' -export_dynamic_flag_spec_FC='`$ECHO "X$export_dynamic_flag_spec_FC" | $Xsed -e "$delay_single_quote_subst"`' -whole_archive_flag_spec_CXX='`$ECHO "X$whole_archive_flag_spec_CXX" | $Xsed -e "$delay_single_quote_subst"`' -whole_archive_flag_spec_F77='`$ECHO "X$whole_archive_flag_spec_F77" | $Xsed -e "$delay_single_quote_subst"`' -whole_archive_flag_spec_FC='`$ECHO "X$whole_archive_flag_spec_FC" | $Xsed -e "$delay_single_quote_subst"`' -compiler_needs_object_CXX='`$ECHO "X$compiler_needs_object_CXX" | $Xsed -e "$delay_single_quote_subst"`' -compiler_needs_object_F77='`$ECHO "X$compiler_needs_object_F77" | $Xsed -e "$delay_single_quote_subst"`' -compiler_needs_object_FC='`$ECHO "X$compiler_needs_object_FC" | $Xsed -e "$delay_single_quote_subst"`' -old_archive_from_new_cmds_CXX='`$ECHO "X$old_archive_from_new_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`' -old_archive_from_new_cmds_F77='`$ECHO "X$old_archive_from_new_cmds_F77" | $Xsed -e "$delay_single_quote_subst"`' -old_archive_from_new_cmds_FC='`$ECHO "X$old_archive_from_new_cmds_FC" | $Xsed -e "$delay_single_quote_subst"`' -old_archive_from_expsyms_cmds_CXX='`$ECHO "X$old_archive_from_expsyms_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`' -old_archive_from_expsyms_cmds_F77='`$ECHO "X$old_archive_from_expsyms_cmds_F77" | $Xsed -e "$delay_single_quote_subst"`' -old_archive_from_expsyms_cmds_FC='`$ECHO "X$old_archive_from_expsyms_cmds_FC" | $Xsed -e "$delay_single_quote_subst"`' -archive_cmds_CXX='`$ECHO "X$archive_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`' -archive_cmds_F77='`$ECHO "X$archive_cmds_F77" | $Xsed -e "$delay_single_quote_subst"`' -archive_cmds_FC='`$ECHO "X$archive_cmds_FC" | $Xsed -e "$delay_single_quote_subst"`' -archive_expsym_cmds_CXX='`$ECHO "X$archive_expsym_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`' -archive_expsym_cmds_F77='`$ECHO "X$archive_expsym_cmds_F77" | $Xsed -e "$delay_single_quote_subst"`' -archive_expsym_cmds_FC='`$ECHO "X$archive_expsym_cmds_FC" | $Xsed -e "$delay_single_quote_subst"`' -module_cmds_CXX='`$ECHO "X$module_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`' -module_cmds_F77='`$ECHO "X$module_cmds_F77" | $Xsed -e "$delay_single_quote_subst"`' -module_cmds_FC='`$ECHO "X$module_cmds_FC" | $Xsed -e "$delay_single_quote_subst"`' -module_expsym_cmds_CXX='`$ECHO "X$module_expsym_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`' -module_expsym_cmds_F77='`$ECHO "X$module_expsym_cmds_F77" | $Xsed -e "$delay_single_quote_subst"`' -module_expsym_cmds_FC='`$ECHO "X$module_expsym_cmds_FC" | $Xsed -e "$delay_single_quote_subst"`' -with_gnu_ld_CXX='`$ECHO "X$with_gnu_ld_CXX" | $Xsed -e "$delay_single_quote_subst"`' -with_gnu_ld_F77='`$ECHO "X$with_gnu_ld_F77" | $Xsed -e "$delay_single_quote_subst"`' -with_gnu_ld_FC='`$ECHO "X$with_gnu_ld_FC" | $Xsed -e "$delay_single_quote_subst"`' -allow_undefined_flag_CXX='`$ECHO "X$allow_undefined_flag_CXX" | $Xsed -e "$delay_single_quote_subst"`' -allow_undefined_flag_F77='`$ECHO "X$allow_undefined_flag_F77" | $Xsed -e "$delay_single_quote_subst"`' -allow_undefined_flag_FC='`$ECHO "X$allow_undefined_flag_FC" | $Xsed -e "$delay_single_quote_subst"`' -no_undefined_flag_CXX='`$ECHO "X$no_undefined_flag_CXX" | $Xsed -e "$delay_single_quote_subst"`' -no_undefined_flag_F77='`$ECHO "X$no_undefined_flag_F77" | $Xsed -e "$delay_single_quote_subst"`' -no_undefined_flag_FC='`$ECHO "X$no_undefined_flag_FC" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_libdir_flag_spec_CXX='`$ECHO "X$hardcode_libdir_flag_spec_CXX" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_libdir_flag_spec_F77='`$ECHO "X$hardcode_libdir_flag_spec_F77" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_libdir_flag_spec_FC='`$ECHO "X$hardcode_libdir_flag_spec_FC" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_libdir_flag_spec_ld_CXX='`$ECHO "X$hardcode_libdir_flag_spec_ld_CXX" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_libdir_flag_spec_ld_F77='`$ECHO "X$hardcode_libdir_flag_spec_ld_F77" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_libdir_flag_spec_ld_FC='`$ECHO "X$hardcode_libdir_flag_spec_ld_FC" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_libdir_separator_CXX='`$ECHO "X$hardcode_libdir_separator_CXX" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_libdir_separator_F77='`$ECHO "X$hardcode_libdir_separator_F77" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_libdir_separator_FC='`$ECHO "X$hardcode_libdir_separator_FC" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_direct_CXX='`$ECHO "X$hardcode_direct_CXX" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_direct_F77='`$ECHO "X$hardcode_direct_F77" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_direct_FC='`$ECHO "X$hardcode_direct_FC" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_direct_absolute_CXX='`$ECHO "X$hardcode_direct_absolute_CXX" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_direct_absolute_F77='`$ECHO "X$hardcode_direct_absolute_F77" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_direct_absolute_FC='`$ECHO "X$hardcode_direct_absolute_FC" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_minus_L_CXX='`$ECHO "X$hardcode_minus_L_CXX" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_minus_L_F77='`$ECHO "X$hardcode_minus_L_F77" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_minus_L_FC='`$ECHO "X$hardcode_minus_L_FC" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_shlibpath_var_CXX='`$ECHO "X$hardcode_shlibpath_var_CXX" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_shlibpath_var_F77='`$ECHO "X$hardcode_shlibpath_var_F77" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_shlibpath_var_FC='`$ECHO "X$hardcode_shlibpath_var_FC" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_automatic_CXX='`$ECHO "X$hardcode_automatic_CXX" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_automatic_F77='`$ECHO "X$hardcode_automatic_F77" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_automatic_FC='`$ECHO "X$hardcode_automatic_FC" | $Xsed -e "$delay_single_quote_subst"`' -inherit_rpath_CXX='`$ECHO "X$inherit_rpath_CXX" | $Xsed -e "$delay_single_quote_subst"`' -inherit_rpath_F77='`$ECHO "X$inherit_rpath_F77" | $Xsed -e "$delay_single_quote_subst"`' -inherit_rpath_FC='`$ECHO "X$inherit_rpath_FC" | $Xsed -e "$delay_single_quote_subst"`' -link_all_deplibs_CXX='`$ECHO "X$link_all_deplibs_CXX" | $Xsed -e "$delay_single_quote_subst"`' -link_all_deplibs_F77='`$ECHO "X$link_all_deplibs_F77" | $Xsed -e "$delay_single_quote_subst"`' -link_all_deplibs_FC='`$ECHO "X$link_all_deplibs_FC" | $Xsed -e "$delay_single_quote_subst"`' -fix_srcfile_path_CXX='`$ECHO "X$fix_srcfile_path_CXX" | $Xsed -e "$delay_single_quote_subst"`' -fix_srcfile_path_F77='`$ECHO "X$fix_srcfile_path_F77" | $Xsed -e "$delay_single_quote_subst"`' -fix_srcfile_path_FC='`$ECHO "X$fix_srcfile_path_FC" | $Xsed -e "$delay_single_quote_subst"`' -always_export_symbols_CXX='`$ECHO "X$always_export_symbols_CXX" | $Xsed -e "$delay_single_quote_subst"`' -always_export_symbols_F77='`$ECHO "X$always_export_symbols_F77" | $Xsed -e "$delay_single_quote_subst"`' -always_export_symbols_FC='`$ECHO "X$always_export_symbols_FC" | $Xsed -e "$delay_single_quote_subst"`' -export_symbols_cmds_CXX='`$ECHO "X$export_symbols_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`' -export_symbols_cmds_F77='`$ECHO "X$export_symbols_cmds_F77" | $Xsed -e "$delay_single_quote_subst"`' -export_symbols_cmds_FC='`$ECHO "X$export_symbols_cmds_FC" | $Xsed -e "$delay_single_quote_subst"`' -exclude_expsyms_CXX='`$ECHO "X$exclude_expsyms_CXX" | $Xsed -e "$delay_single_quote_subst"`' -exclude_expsyms_F77='`$ECHO "X$exclude_expsyms_F77" | $Xsed -e "$delay_single_quote_subst"`' -exclude_expsyms_FC='`$ECHO "X$exclude_expsyms_FC" | $Xsed -e "$delay_single_quote_subst"`' -include_expsyms_CXX='`$ECHO "X$include_expsyms_CXX" | $Xsed -e "$delay_single_quote_subst"`' -include_expsyms_F77='`$ECHO "X$include_expsyms_F77" | $Xsed -e "$delay_single_quote_subst"`' -include_expsyms_FC='`$ECHO "X$include_expsyms_FC" | $Xsed -e "$delay_single_quote_subst"`' -prelink_cmds_CXX='`$ECHO "X$prelink_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`' -prelink_cmds_F77='`$ECHO "X$prelink_cmds_F77" | $Xsed -e "$delay_single_quote_subst"`' -prelink_cmds_FC='`$ECHO "X$prelink_cmds_FC" | $Xsed -e "$delay_single_quote_subst"`' -file_list_spec_CXX='`$ECHO "X$file_list_spec_CXX" | $Xsed -e "$delay_single_quote_subst"`' -file_list_spec_F77='`$ECHO "X$file_list_spec_F77" | $Xsed -e "$delay_single_quote_subst"`' -file_list_spec_FC='`$ECHO "X$file_list_spec_FC" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_action_CXX='`$ECHO "X$hardcode_action_CXX" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_action_F77='`$ECHO "X$hardcode_action_F77" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_action_FC='`$ECHO "X$hardcode_action_FC" | $Xsed -e "$delay_single_quote_subst"`' -compiler_lib_search_dirs_CXX='`$ECHO "X$compiler_lib_search_dirs_CXX" | $Xsed -e "$delay_single_quote_subst"`' -compiler_lib_search_dirs_F77='`$ECHO "X$compiler_lib_search_dirs_F77" | $Xsed -e "$delay_single_quote_subst"`' -compiler_lib_search_dirs_FC='`$ECHO "X$compiler_lib_search_dirs_FC" | $Xsed -e "$delay_single_quote_subst"`' -predep_objects_CXX='`$ECHO "X$predep_objects_CXX" | $Xsed -e "$delay_single_quote_subst"`' -predep_objects_F77='`$ECHO "X$predep_objects_F77" | $Xsed -e "$delay_single_quote_subst"`' -predep_objects_FC='`$ECHO "X$predep_objects_FC" | $Xsed -e "$delay_single_quote_subst"`' -postdep_objects_CXX='`$ECHO "X$postdep_objects_CXX" | $Xsed -e "$delay_single_quote_subst"`' -postdep_objects_F77='`$ECHO "X$postdep_objects_F77" | $Xsed -e "$delay_single_quote_subst"`' -postdep_objects_FC='`$ECHO "X$postdep_objects_FC" | $Xsed -e "$delay_single_quote_subst"`' -predeps_CXX='`$ECHO "X$predeps_CXX" | $Xsed -e "$delay_single_quote_subst"`' -predeps_F77='`$ECHO "X$predeps_F77" | $Xsed -e "$delay_single_quote_subst"`' -predeps_FC='`$ECHO "X$predeps_FC" | $Xsed -e "$delay_single_quote_subst"`' -postdeps_CXX='`$ECHO "X$postdeps_CXX" | $Xsed -e "$delay_single_quote_subst"`' -postdeps_F77='`$ECHO "X$postdeps_F77" | $Xsed -e "$delay_single_quote_subst"`' -postdeps_FC='`$ECHO "X$postdeps_FC" | $Xsed -e "$delay_single_quote_subst"`' -compiler_lib_search_path_CXX='`$ECHO "X$compiler_lib_search_path_CXX" | $Xsed -e "$delay_single_quote_subst"`' -compiler_lib_search_path_F77='`$ECHO "X$compiler_lib_search_path_F77" | $Xsed -e "$delay_single_quote_subst"`' -compiler_lib_search_path_FC='`$ECHO "X$compiler_lib_search_path_FC" | $Xsed -e "$delay_single_quote_subst"`' +macro_version='`$ECHO "$macro_version" | $SED "$delay_single_quote_subst"`' +macro_revision='`$ECHO "$macro_revision" | $SED "$delay_single_quote_subst"`' +enable_shared='`$ECHO "$enable_shared" | $SED "$delay_single_quote_subst"`' +enable_static='`$ECHO "$enable_static" | $SED "$delay_single_quote_subst"`' +pic_mode='`$ECHO "$pic_mode" | $SED "$delay_single_quote_subst"`' +enable_fast_install='`$ECHO "$enable_fast_install" | $SED "$delay_single_quote_subst"`' +SHELL='`$ECHO "$SHELL" | $SED "$delay_single_quote_subst"`' +ECHO='`$ECHO "$ECHO" | $SED "$delay_single_quote_subst"`' +host_alias='`$ECHO "$host_alias" | $SED "$delay_single_quote_subst"`' +host='`$ECHO "$host" | $SED "$delay_single_quote_subst"`' +host_os='`$ECHO "$host_os" | $SED "$delay_single_quote_subst"`' +build_alias='`$ECHO "$build_alias" | $SED "$delay_single_quote_subst"`' +build='`$ECHO "$build" | $SED "$delay_single_quote_subst"`' +build_os='`$ECHO "$build_os" | $SED "$delay_single_quote_subst"`' +SED='`$ECHO "$SED" | $SED "$delay_single_quote_subst"`' +Xsed='`$ECHO "$Xsed" | $SED "$delay_single_quote_subst"`' +GREP='`$ECHO "$GREP" | $SED "$delay_single_quote_subst"`' +EGREP='`$ECHO "$EGREP" | $SED "$delay_single_quote_subst"`' +FGREP='`$ECHO "$FGREP" | $SED "$delay_single_quote_subst"`' +LD='`$ECHO "$LD" | $SED "$delay_single_quote_subst"`' +NM='`$ECHO "$NM" | $SED "$delay_single_quote_subst"`' +LN_S='`$ECHO "$LN_S" | $SED "$delay_single_quote_subst"`' +max_cmd_len='`$ECHO "$max_cmd_len" | $SED "$delay_single_quote_subst"`' +ac_objext='`$ECHO "$ac_objext" | $SED "$delay_single_quote_subst"`' +exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`' +lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`' +lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`' +lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`' +lt_cv_to_host_file_cmd='`$ECHO "$lt_cv_to_host_file_cmd" | $SED "$delay_single_quote_subst"`' +lt_cv_to_tool_file_cmd='`$ECHO "$lt_cv_to_tool_file_cmd" | $SED "$delay_single_quote_subst"`' +reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`' +reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`' +OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$delay_single_quote_subst"`' +deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`' +file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`' +file_magic_glob='`$ECHO "$file_magic_glob" | $SED "$delay_single_quote_subst"`' +want_nocaseglob='`$ECHO "$want_nocaseglob" | $SED "$delay_single_quote_subst"`' +DLLTOOL='`$ECHO "$DLLTOOL" | $SED "$delay_single_quote_subst"`' +sharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`' +AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`' +AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`' +archiver_list_spec='`$ECHO "$archiver_list_spec" | $SED "$delay_single_quote_subst"`' +STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`' +RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`' +old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`' +old_postuninstall_cmds='`$ECHO "$old_postuninstall_cmds" | $SED "$delay_single_quote_subst"`' +old_archive_cmds='`$ECHO "$old_archive_cmds" | $SED "$delay_single_quote_subst"`' +lock_old_archive_extraction='`$ECHO "$lock_old_archive_extraction" | $SED "$delay_single_quote_subst"`' +CC='`$ECHO "$CC" | $SED "$delay_single_quote_subst"`' +CFLAGS='`$ECHO "$CFLAGS" | $SED "$delay_single_quote_subst"`' +compiler='`$ECHO "$compiler" | $SED "$delay_single_quote_subst"`' +GCC='`$ECHO "$GCC" | $SED "$delay_single_quote_subst"`' +lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$delay_single_quote_subst"`' +lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`' +lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`' +lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $SED "$delay_single_quote_subst"`' +nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`' +lt_sysroot='`$ECHO "$lt_sysroot" | $SED "$delay_single_quote_subst"`' +objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`' +MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`' +lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`' +lt_prog_compiler_pic='`$ECHO "$lt_prog_compiler_pic" | $SED "$delay_single_quote_subst"`' +lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`' +lt_prog_compiler_static='`$ECHO "$lt_prog_compiler_static" | $SED "$delay_single_quote_subst"`' +lt_cv_prog_compiler_c_o='`$ECHO "$lt_cv_prog_compiler_c_o" | $SED "$delay_single_quote_subst"`' +need_locks='`$ECHO "$need_locks" | $SED "$delay_single_quote_subst"`' +MANIFEST_TOOL='`$ECHO "$MANIFEST_TOOL" | $SED "$delay_single_quote_subst"`' +DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`' +NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`' +LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`' +OTOOL='`$ECHO "$OTOOL" | $SED "$delay_single_quote_subst"`' +OTOOL64='`$ECHO "$OTOOL64" | $SED "$delay_single_quote_subst"`' +libext='`$ECHO "$libext" | $SED "$delay_single_quote_subst"`' +shrext_cmds='`$ECHO "$shrext_cmds" | $SED "$delay_single_quote_subst"`' +extract_expsyms_cmds='`$ECHO "$extract_expsyms_cmds" | $SED "$delay_single_quote_subst"`' +archive_cmds_need_lc='`$ECHO "$archive_cmds_need_lc" | $SED "$delay_single_quote_subst"`' +enable_shared_with_static_runtimes='`$ECHO "$enable_shared_with_static_runtimes" | $SED "$delay_single_quote_subst"`' +export_dynamic_flag_spec='`$ECHO "$export_dynamic_flag_spec" | $SED "$delay_single_quote_subst"`' +whole_archive_flag_spec='`$ECHO "$whole_archive_flag_spec" | $SED "$delay_single_quote_subst"`' +compiler_needs_object='`$ECHO "$compiler_needs_object" | $SED "$delay_single_quote_subst"`' +old_archive_from_new_cmds='`$ECHO "$old_archive_from_new_cmds" | $SED "$delay_single_quote_subst"`' +old_archive_from_expsyms_cmds='`$ECHO "$old_archive_from_expsyms_cmds" | $SED "$delay_single_quote_subst"`' +archive_cmds='`$ECHO "$archive_cmds" | $SED "$delay_single_quote_subst"`' +archive_expsym_cmds='`$ECHO "$archive_expsym_cmds" | $SED "$delay_single_quote_subst"`' +module_cmds='`$ECHO "$module_cmds" | $SED "$delay_single_quote_subst"`' +module_expsym_cmds='`$ECHO "$module_expsym_cmds" | $SED "$delay_single_quote_subst"`' +with_gnu_ld='`$ECHO "$with_gnu_ld" | $SED "$delay_single_quote_subst"`' +allow_undefined_flag='`$ECHO "$allow_undefined_flag" | $SED "$delay_single_quote_subst"`' +no_undefined_flag='`$ECHO "$no_undefined_flag" | $SED "$delay_single_quote_subst"`' +hardcode_libdir_flag_spec='`$ECHO "$hardcode_libdir_flag_spec" | $SED "$delay_single_quote_subst"`' +hardcode_libdir_flag_spec_ld='`$ECHO "$hardcode_libdir_flag_spec_ld" | $SED "$delay_single_quote_subst"`' +hardcode_libdir_separator='`$ECHO "$hardcode_libdir_separator" | $SED "$delay_single_quote_subst"`' +hardcode_direct='`$ECHO "$hardcode_direct" | $SED "$delay_single_quote_subst"`' +hardcode_direct_absolute='`$ECHO "$hardcode_direct_absolute" | $SED "$delay_single_quote_subst"`' +hardcode_minus_L='`$ECHO "$hardcode_minus_L" | $SED "$delay_single_quote_subst"`' +hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_quote_subst"`' +hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`' +inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`' +link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`' +always_export_symbols='`$ECHO "$always_export_symbols" | $SED "$delay_single_quote_subst"`' +export_symbols_cmds='`$ECHO "$export_symbols_cmds" | $SED "$delay_single_quote_subst"`' +exclude_expsyms='`$ECHO "$exclude_expsyms" | $SED "$delay_single_quote_subst"`' +include_expsyms='`$ECHO "$include_expsyms" | $SED "$delay_single_quote_subst"`' +prelink_cmds='`$ECHO "$prelink_cmds" | $SED "$delay_single_quote_subst"`' +postlink_cmds='`$ECHO "$postlink_cmds" | $SED "$delay_single_quote_subst"`' +file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`' +variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`' +need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`' +need_version='`$ECHO "$need_version" | $SED "$delay_single_quote_subst"`' +version_type='`$ECHO "$version_type" | $SED "$delay_single_quote_subst"`' +runpath_var='`$ECHO "$runpath_var" | $SED "$delay_single_quote_subst"`' +shlibpath_var='`$ECHO "$shlibpath_var" | $SED "$delay_single_quote_subst"`' +shlibpath_overrides_runpath='`$ECHO "$shlibpath_overrides_runpath" | $SED "$delay_single_quote_subst"`' +libname_spec='`$ECHO "$libname_spec" | $SED "$delay_single_quote_subst"`' +library_names_spec='`$ECHO "$library_names_spec" | $SED "$delay_single_quote_subst"`' +soname_spec='`$ECHO "$soname_spec" | $SED "$delay_single_quote_subst"`' +install_override_mode='`$ECHO "$install_override_mode" | $SED "$delay_single_quote_subst"`' +postinstall_cmds='`$ECHO "$postinstall_cmds" | $SED "$delay_single_quote_subst"`' +postuninstall_cmds='`$ECHO "$postuninstall_cmds" | $SED "$delay_single_quote_subst"`' +finish_cmds='`$ECHO "$finish_cmds" | $SED "$delay_single_quote_subst"`' +finish_eval='`$ECHO "$finish_eval" | $SED "$delay_single_quote_subst"`' +hardcode_into_libs='`$ECHO "$hardcode_into_libs" | $SED "$delay_single_quote_subst"`' +sys_lib_search_path_spec='`$ECHO "$sys_lib_search_path_spec" | $SED "$delay_single_quote_subst"`' +sys_lib_dlsearch_path_spec='`$ECHO "$sys_lib_dlsearch_path_spec" | $SED "$delay_single_quote_subst"`' +hardcode_action='`$ECHO "$hardcode_action" | $SED "$delay_single_quote_subst"`' +enable_dlopen='`$ECHO "$enable_dlopen" | $SED "$delay_single_quote_subst"`' +enable_dlopen_self='`$ECHO "$enable_dlopen_self" | $SED "$delay_single_quote_subst"`' +enable_dlopen_self_static='`$ECHO "$enable_dlopen_self_static" | $SED "$delay_single_quote_subst"`' +old_striplib='`$ECHO "$old_striplib" | $SED "$delay_single_quote_subst"`' +striplib='`$ECHO "$striplib" | $SED "$delay_single_quote_subst"`' +compiler_lib_search_dirs='`$ECHO "$compiler_lib_search_dirs" | $SED "$delay_single_quote_subst"`' +predep_objects='`$ECHO "$predep_objects" | $SED "$delay_single_quote_subst"`' +postdep_objects='`$ECHO "$postdep_objects" | $SED "$delay_single_quote_subst"`' +predeps='`$ECHO "$predeps" | $SED "$delay_single_quote_subst"`' +postdeps='`$ECHO "$postdeps" | $SED "$delay_single_quote_subst"`' +compiler_lib_search_path='`$ECHO "$compiler_lib_search_path" | $SED "$delay_single_quote_subst"`' +LD_CXX='`$ECHO "$LD_CXX" | $SED "$delay_single_quote_subst"`' +LD_F77='`$ECHO "$LD_F77" | $SED "$delay_single_quote_subst"`' +LD_FC='`$ECHO "$LD_FC" | $SED "$delay_single_quote_subst"`' +reload_flag_CXX='`$ECHO "$reload_flag_CXX" | $SED "$delay_single_quote_subst"`' +reload_flag_F77='`$ECHO "$reload_flag_F77" | $SED "$delay_single_quote_subst"`' +reload_flag_FC='`$ECHO "$reload_flag_FC" | $SED "$delay_single_quote_subst"`' +reload_cmds_CXX='`$ECHO "$reload_cmds_CXX" | $SED "$delay_single_quote_subst"`' +reload_cmds_F77='`$ECHO "$reload_cmds_F77" | $SED "$delay_single_quote_subst"`' +reload_cmds_FC='`$ECHO "$reload_cmds_FC" | $SED "$delay_single_quote_subst"`' +old_archive_cmds_CXX='`$ECHO "$old_archive_cmds_CXX" | $SED "$delay_single_quote_subst"`' +old_archive_cmds_F77='`$ECHO "$old_archive_cmds_F77" | $SED "$delay_single_quote_subst"`' +old_archive_cmds_FC='`$ECHO "$old_archive_cmds_FC" | $SED "$delay_single_quote_subst"`' +compiler_CXX='`$ECHO "$compiler_CXX" | $SED "$delay_single_quote_subst"`' +compiler_F77='`$ECHO "$compiler_F77" | $SED "$delay_single_quote_subst"`' +compiler_FC='`$ECHO "$compiler_FC" | $SED "$delay_single_quote_subst"`' +GCC_CXX='`$ECHO "$GCC_CXX" | $SED "$delay_single_quote_subst"`' +GCC_F77='`$ECHO "$GCC_F77" | $SED "$delay_single_quote_subst"`' +GCC_FC='`$ECHO "$GCC_FC" | $SED "$delay_single_quote_subst"`' +lt_prog_compiler_no_builtin_flag_CXX='`$ECHO "$lt_prog_compiler_no_builtin_flag_CXX" | $SED "$delay_single_quote_subst"`' +lt_prog_compiler_no_builtin_flag_F77='`$ECHO "$lt_prog_compiler_no_builtin_flag_F77" | $SED "$delay_single_quote_subst"`' +lt_prog_compiler_no_builtin_flag_FC='`$ECHO "$lt_prog_compiler_no_builtin_flag_FC" | $SED "$delay_single_quote_subst"`' +lt_prog_compiler_pic_CXX='`$ECHO "$lt_prog_compiler_pic_CXX" | $SED "$delay_single_quote_subst"`' +lt_prog_compiler_pic_F77='`$ECHO "$lt_prog_compiler_pic_F77" | $SED "$delay_single_quote_subst"`' +lt_prog_compiler_pic_FC='`$ECHO "$lt_prog_compiler_pic_FC" | $SED "$delay_single_quote_subst"`' +lt_prog_compiler_wl_CXX='`$ECHO "$lt_prog_compiler_wl_CXX" | $SED "$delay_single_quote_subst"`' +lt_prog_compiler_wl_F77='`$ECHO "$lt_prog_compiler_wl_F77" | $SED "$delay_single_quote_subst"`' +lt_prog_compiler_wl_FC='`$ECHO "$lt_prog_compiler_wl_FC" | $SED "$delay_single_quote_subst"`' +lt_prog_compiler_static_CXX='`$ECHO "$lt_prog_compiler_static_CXX" | $SED "$delay_single_quote_subst"`' +lt_prog_compiler_static_F77='`$ECHO "$lt_prog_compiler_static_F77" | $SED "$delay_single_quote_subst"`' +lt_prog_compiler_static_FC='`$ECHO "$lt_prog_compiler_static_FC" | $SED "$delay_single_quote_subst"`' +lt_cv_prog_compiler_c_o_CXX='`$ECHO "$lt_cv_prog_compiler_c_o_CXX" | $SED "$delay_single_quote_subst"`' +lt_cv_prog_compiler_c_o_F77='`$ECHO "$lt_cv_prog_compiler_c_o_F77" | $SED "$delay_single_quote_subst"`' +lt_cv_prog_compiler_c_o_FC='`$ECHO "$lt_cv_prog_compiler_c_o_FC" | $SED "$delay_single_quote_subst"`' +archive_cmds_need_lc_CXX='`$ECHO "$archive_cmds_need_lc_CXX" | $SED "$delay_single_quote_subst"`' +archive_cmds_need_lc_F77='`$ECHO "$archive_cmds_need_lc_F77" | $SED "$delay_single_quote_subst"`' +archive_cmds_need_lc_FC='`$ECHO "$archive_cmds_need_lc_FC" | $SED "$delay_single_quote_subst"`' +enable_shared_with_static_runtimes_CXX='`$ECHO "$enable_shared_with_static_runtimes_CXX" | $SED "$delay_single_quote_subst"`' +enable_shared_with_static_runtimes_F77='`$ECHO "$enable_shared_with_static_runtimes_F77" | $SED "$delay_single_quote_subst"`' +enable_shared_with_static_runtimes_FC='`$ECHO "$enable_shared_with_static_runtimes_FC" | $SED "$delay_single_quote_subst"`' +export_dynamic_flag_spec_CXX='`$ECHO "$export_dynamic_flag_spec_CXX" | $SED "$delay_single_quote_subst"`' +export_dynamic_flag_spec_F77='`$ECHO "$export_dynamic_flag_spec_F77" | $SED "$delay_single_quote_subst"`' +export_dynamic_flag_spec_FC='`$ECHO "$export_dynamic_flag_spec_FC" | $SED "$delay_single_quote_subst"`' +whole_archive_flag_spec_CXX='`$ECHO "$whole_archive_flag_spec_CXX" | $SED "$delay_single_quote_subst"`' +whole_archive_flag_spec_F77='`$ECHO "$whole_archive_flag_spec_F77" | $SED "$delay_single_quote_subst"`' +whole_archive_flag_spec_FC='`$ECHO "$whole_archive_flag_spec_FC" | $SED "$delay_single_quote_subst"`' +compiler_needs_object_CXX='`$ECHO "$compiler_needs_object_CXX" | $SED "$delay_single_quote_subst"`' +compiler_needs_object_F77='`$ECHO "$compiler_needs_object_F77" | $SED "$delay_single_quote_subst"`' +compiler_needs_object_FC='`$ECHO "$compiler_needs_object_FC" | $SED "$delay_single_quote_subst"`' +old_archive_from_new_cmds_CXX='`$ECHO "$old_archive_from_new_cmds_CXX" | $SED "$delay_single_quote_subst"`' +old_archive_from_new_cmds_F77='`$ECHO "$old_archive_from_new_cmds_F77" | $SED "$delay_single_quote_subst"`' +old_archive_from_new_cmds_FC='`$ECHO "$old_archive_from_new_cmds_FC" | $SED "$delay_single_quote_subst"`' +old_archive_from_expsyms_cmds_CXX='`$ECHO "$old_archive_from_expsyms_cmds_CXX" | $SED "$delay_single_quote_subst"`' +old_archive_from_expsyms_cmds_F77='`$ECHO "$old_archive_from_expsyms_cmds_F77" | $SED "$delay_single_quote_subst"`' +old_archive_from_expsyms_cmds_FC='`$ECHO "$old_archive_from_expsyms_cmds_FC" | $SED "$delay_single_quote_subst"`' +archive_cmds_CXX='`$ECHO "$archive_cmds_CXX" | $SED "$delay_single_quote_subst"`' +archive_cmds_F77='`$ECHO "$archive_cmds_F77" | $SED "$delay_single_quote_subst"`' +archive_cmds_FC='`$ECHO "$archive_cmds_FC" | $SED "$delay_single_quote_subst"`' +archive_expsym_cmds_CXX='`$ECHO "$archive_expsym_cmds_CXX" | $SED "$delay_single_quote_subst"`' +archive_expsym_cmds_F77='`$ECHO "$archive_expsym_cmds_F77" | $SED "$delay_single_quote_subst"`' +archive_expsym_cmds_FC='`$ECHO "$archive_expsym_cmds_FC" | $SED "$delay_single_quote_subst"`' +module_cmds_CXX='`$ECHO "$module_cmds_CXX" | $SED "$delay_single_quote_subst"`' +module_cmds_F77='`$ECHO "$module_cmds_F77" | $SED "$delay_single_quote_subst"`' +module_cmds_FC='`$ECHO "$module_cmds_FC" | $SED "$delay_single_quote_subst"`' +module_expsym_cmds_CXX='`$ECHO "$module_expsym_cmds_CXX" | $SED "$delay_single_quote_subst"`' +module_expsym_cmds_F77='`$ECHO "$module_expsym_cmds_F77" | $SED "$delay_single_quote_subst"`' +module_expsym_cmds_FC='`$ECHO "$module_expsym_cmds_FC" | $SED "$delay_single_quote_subst"`' +with_gnu_ld_CXX='`$ECHO "$with_gnu_ld_CXX" | $SED "$delay_single_quote_subst"`' +with_gnu_ld_F77='`$ECHO "$with_gnu_ld_F77" | $SED "$delay_single_quote_subst"`' +with_gnu_ld_FC='`$ECHO "$with_gnu_ld_FC" | $SED "$delay_single_quote_subst"`' +allow_undefined_flag_CXX='`$ECHO "$allow_undefined_flag_CXX" | $SED "$delay_single_quote_subst"`' +allow_undefined_flag_F77='`$ECHO "$allow_undefined_flag_F77" | $SED "$delay_single_quote_subst"`' +allow_undefined_flag_FC='`$ECHO "$allow_undefined_flag_FC" | $SED "$delay_single_quote_subst"`' +no_undefined_flag_CXX='`$ECHO "$no_undefined_flag_CXX" | $SED "$delay_single_quote_subst"`' +no_undefined_flag_F77='`$ECHO "$no_undefined_flag_F77" | $SED "$delay_single_quote_subst"`' +no_undefined_flag_FC='`$ECHO "$no_undefined_flag_FC" | $SED "$delay_single_quote_subst"`' +hardcode_libdir_flag_spec_CXX='`$ECHO "$hardcode_libdir_flag_spec_CXX" | $SED "$delay_single_quote_subst"`' +hardcode_libdir_flag_spec_F77='`$ECHO "$hardcode_libdir_flag_spec_F77" | $SED "$delay_single_quote_subst"`' +hardcode_libdir_flag_spec_FC='`$ECHO "$hardcode_libdir_flag_spec_FC" | $SED "$delay_single_quote_subst"`' +hardcode_libdir_flag_spec_ld_CXX='`$ECHO "$hardcode_libdir_flag_spec_ld_CXX" | $SED "$delay_single_quote_subst"`' +hardcode_libdir_flag_spec_ld_F77='`$ECHO "$hardcode_libdir_flag_spec_ld_F77" | $SED "$delay_single_quote_subst"`' +hardcode_libdir_flag_spec_ld_FC='`$ECHO "$hardcode_libdir_flag_spec_ld_FC" | $SED "$delay_single_quote_subst"`' +hardcode_libdir_separator_CXX='`$ECHO "$hardcode_libdir_separator_CXX" | $SED "$delay_single_quote_subst"`' +hardcode_libdir_separator_F77='`$ECHO "$hardcode_libdir_separator_F77" | $SED "$delay_single_quote_subst"`' +hardcode_libdir_separator_FC='`$ECHO "$hardcode_libdir_separator_FC" | $SED "$delay_single_quote_subst"`' +hardcode_direct_CXX='`$ECHO "$hardcode_direct_CXX" | $SED "$delay_single_quote_subst"`' +hardcode_direct_F77='`$ECHO "$hardcode_direct_F77" | $SED "$delay_single_quote_subst"`' +hardcode_direct_FC='`$ECHO "$hardcode_direct_FC" | $SED "$delay_single_quote_subst"`' +hardcode_direct_absolute_CXX='`$ECHO "$hardcode_direct_absolute_CXX" | $SED "$delay_single_quote_subst"`' +hardcode_direct_absolute_F77='`$ECHO "$hardcode_direct_absolute_F77" | $SED "$delay_single_quote_subst"`' +hardcode_direct_absolute_FC='`$ECHO "$hardcode_direct_absolute_FC" | $SED "$delay_single_quote_subst"`' +hardcode_minus_L_CXX='`$ECHO "$hardcode_minus_L_CXX" | $SED "$delay_single_quote_subst"`' +hardcode_minus_L_F77='`$ECHO "$hardcode_minus_L_F77" | $SED "$delay_single_quote_subst"`' +hardcode_minus_L_FC='`$ECHO "$hardcode_minus_L_FC" | $SED "$delay_single_quote_subst"`' +hardcode_shlibpath_var_CXX='`$ECHO "$hardcode_shlibpath_var_CXX" | $SED "$delay_single_quote_subst"`' +hardcode_shlibpath_var_F77='`$ECHO "$hardcode_shlibpath_var_F77" | $SED "$delay_single_quote_subst"`' +hardcode_shlibpath_var_FC='`$ECHO "$hardcode_shlibpath_var_FC" | $SED "$delay_single_quote_subst"`' +hardcode_automatic_CXX='`$ECHO "$hardcode_automatic_CXX" | $SED "$delay_single_quote_subst"`' +hardcode_automatic_F77='`$ECHO "$hardcode_automatic_F77" | $SED "$delay_single_quote_subst"`' +hardcode_automatic_FC='`$ECHO "$hardcode_automatic_FC" | $SED "$delay_single_quote_subst"`' +inherit_rpath_CXX='`$ECHO "$inherit_rpath_CXX" | $SED "$delay_single_quote_subst"`' +inherit_rpath_F77='`$ECHO "$inherit_rpath_F77" | $SED "$delay_single_quote_subst"`' +inherit_rpath_FC='`$ECHO "$inherit_rpath_FC" | $SED "$delay_single_quote_subst"`' +link_all_deplibs_CXX='`$ECHO "$link_all_deplibs_CXX" | $SED "$delay_single_quote_subst"`' +link_all_deplibs_F77='`$ECHO "$link_all_deplibs_F77" | $SED "$delay_single_quote_subst"`' +link_all_deplibs_FC='`$ECHO "$link_all_deplibs_FC" | $SED "$delay_single_quote_subst"`' +always_export_symbols_CXX='`$ECHO "$always_export_symbols_CXX" | $SED "$delay_single_quote_subst"`' +always_export_symbols_F77='`$ECHO "$always_export_symbols_F77" | $SED "$delay_single_quote_subst"`' +always_export_symbols_FC='`$ECHO "$always_export_symbols_FC" | $SED "$delay_single_quote_subst"`' +export_symbols_cmds_CXX='`$ECHO "$export_symbols_cmds_CXX" | $SED "$delay_single_quote_subst"`' +export_symbols_cmds_F77='`$ECHO "$export_symbols_cmds_F77" | $SED "$delay_single_quote_subst"`' +export_symbols_cmds_FC='`$ECHO "$export_symbols_cmds_FC" | $SED "$delay_single_quote_subst"`' +exclude_expsyms_CXX='`$ECHO "$exclude_expsyms_CXX" | $SED "$delay_single_quote_subst"`' +exclude_expsyms_F77='`$ECHO "$exclude_expsyms_F77" | $SED "$delay_single_quote_subst"`' +exclude_expsyms_FC='`$ECHO "$exclude_expsyms_FC" | $SED "$delay_single_quote_subst"`' +include_expsyms_CXX='`$ECHO "$include_expsyms_CXX" | $SED "$delay_single_quote_subst"`' +include_expsyms_F77='`$ECHO "$include_expsyms_F77" | $SED "$delay_single_quote_subst"`' +include_expsyms_FC='`$ECHO "$include_expsyms_FC" | $SED "$delay_single_quote_subst"`' +prelink_cmds_CXX='`$ECHO "$prelink_cmds_CXX" | $SED "$delay_single_quote_subst"`' +prelink_cmds_F77='`$ECHO "$prelink_cmds_F77" | $SED "$delay_single_quote_subst"`' +prelink_cmds_FC='`$ECHO "$prelink_cmds_FC" | $SED "$delay_single_quote_subst"`' +postlink_cmds_CXX='`$ECHO "$postlink_cmds_CXX" | $SED "$delay_single_quote_subst"`' +postlink_cmds_F77='`$ECHO "$postlink_cmds_F77" | $SED "$delay_single_quote_subst"`' +postlink_cmds_FC='`$ECHO "$postlink_cmds_FC" | $SED "$delay_single_quote_subst"`' +file_list_spec_CXX='`$ECHO "$file_list_spec_CXX" | $SED "$delay_single_quote_subst"`' +file_list_spec_F77='`$ECHO "$file_list_spec_F77" | $SED "$delay_single_quote_subst"`' +file_list_spec_FC='`$ECHO "$file_list_spec_FC" | $SED "$delay_single_quote_subst"`' +hardcode_action_CXX='`$ECHO "$hardcode_action_CXX" | $SED "$delay_single_quote_subst"`' +hardcode_action_F77='`$ECHO "$hardcode_action_F77" | $SED "$delay_single_quote_subst"`' +hardcode_action_FC='`$ECHO "$hardcode_action_FC" | $SED "$delay_single_quote_subst"`' +compiler_lib_search_dirs_CXX='`$ECHO "$compiler_lib_search_dirs_CXX" | $SED "$delay_single_quote_subst"`' +compiler_lib_search_dirs_F77='`$ECHO "$compiler_lib_search_dirs_F77" | $SED "$delay_single_quote_subst"`' +compiler_lib_search_dirs_FC='`$ECHO "$compiler_lib_search_dirs_FC" | $SED "$delay_single_quote_subst"`' +predep_objects_CXX='`$ECHO "$predep_objects_CXX" | $SED "$delay_single_quote_subst"`' +predep_objects_F77='`$ECHO "$predep_objects_F77" | $SED "$delay_single_quote_subst"`' +predep_objects_FC='`$ECHO "$predep_objects_FC" | $SED "$delay_single_quote_subst"`' +postdep_objects_CXX='`$ECHO "$postdep_objects_CXX" | $SED "$delay_single_quote_subst"`' +postdep_objects_F77='`$ECHO "$postdep_objects_F77" | $SED "$delay_single_quote_subst"`' +postdep_objects_FC='`$ECHO "$postdep_objects_FC" | $SED "$delay_single_quote_subst"`' +predeps_CXX='`$ECHO "$predeps_CXX" | $SED "$delay_single_quote_subst"`' +predeps_F77='`$ECHO "$predeps_F77" | $SED "$delay_single_quote_subst"`' +predeps_FC='`$ECHO "$predeps_FC" | $SED "$delay_single_quote_subst"`' +postdeps_CXX='`$ECHO "$postdeps_CXX" | $SED "$delay_single_quote_subst"`' +postdeps_F77='`$ECHO "$postdeps_F77" | $SED "$delay_single_quote_subst"`' +postdeps_FC='`$ECHO "$postdeps_FC" | $SED "$delay_single_quote_subst"`' +compiler_lib_search_path_CXX='`$ECHO "$compiler_lib_search_path_CXX" | $SED "$delay_single_quote_subst"`' +compiler_lib_search_path_F77='`$ECHO "$compiler_lib_search_path_F77" | $SED "$delay_single_quote_subst"`' +compiler_lib_search_path_FC='`$ECHO "$compiler_lib_search_path_FC" | $SED "$delay_single_quote_subst"`' LTCC='$LTCC' LTCFLAGS='$LTCFLAGS' compiler='$compiler_DEFAULT' +# A function that is used when there is no print builtin or printf. +func_fallback_echo () +{ + eval 'cat <<_LTECHO_EOF +\$1 +_LTECHO_EOF' +} + # Quote evaled strings. -for var in SED \ +for var in SHELL \ +ECHO \ +SED \ GREP \ EGREP \ FGREP \ @@ -31288,8 +32094,13 @@ OBJDUMP \ deplibs_check_method \ file_magic_cmd \ +file_magic_glob \ +want_nocaseglob \ +DLLTOOL \ +sharedlib_from_linklib_cmd \ AR \ AR_FLAGS \ +archiver_list_spec \ STRIP \ RANLIB \ CC \ @@ -31299,14 +32110,14 @@ lt_cv_sys_global_symbol_to_cdecl \ lt_cv_sys_global_symbol_to_c_name_address \ lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \ -SHELL \ -ECHO \ +nm_file_list_spec \ lt_prog_compiler_no_builtin_flag \ -lt_prog_compiler_wl \ lt_prog_compiler_pic \ +lt_prog_compiler_wl \ lt_prog_compiler_static \ lt_cv_prog_compiler_c_o \ need_locks \ +MANIFEST_TOOL \ DSYMUTIL \ NMEDIT \ LIPO \ @@ -31322,7 +32133,6 @@ hardcode_libdir_flag_spec \ hardcode_libdir_flag_spec_ld \ hardcode_libdir_separator \ -fix_srcfile_path \ exclude_expsyms \ include_expsyms \ file_list_spec \ @@ -31330,6 +32140,7 @@ libname_spec \ library_names_spec \ soname_spec \ +install_override_mode \ finish_eval \ old_striplib \ striplib \ @@ -31342,18 +32153,21 @@ LD_CXX \ LD_F77 \ LD_FC \ +reload_flag_CXX \ +reload_flag_F77 \ +reload_flag_FC \ compiler_CXX \ compiler_F77 \ compiler_FC \ lt_prog_compiler_no_builtin_flag_CXX \ lt_prog_compiler_no_builtin_flag_F77 \ lt_prog_compiler_no_builtin_flag_FC \ -lt_prog_compiler_wl_CXX \ -lt_prog_compiler_wl_F77 \ -lt_prog_compiler_wl_FC \ lt_prog_compiler_pic_CXX \ lt_prog_compiler_pic_F77 \ lt_prog_compiler_pic_FC \ +lt_prog_compiler_wl_CXX \ +lt_prog_compiler_wl_F77 \ +lt_prog_compiler_wl_FC \ lt_prog_compiler_static_CXX \ lt_prog_compiler_static_F77 \ lt_prog_compiler_static_FC \ @@ -31387,9 +32201,6 @@ hardcode_libdir_separator_CXX \ hardcode_libdir_separator_F77 \ hardcode_libdir_separator_FC \ -fix_srcfile_path_CXX \ -fix_srcfile_path_F77 \ -fix_srcfile_path_FC \ exclude_expsyms_CXX \ exclude_expsyms_F77 \ exclude_expsyms_FC \ @@ -31417,9 +32228,9 @@ compiler_lib_search_path_CXX \ compiler_lib_search_path_F77 \ compiler_lib_search_path_FC; do - case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in + case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[\\\\\\\`\\"\\\$]*) - eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" + eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" @@ -31441,11 +32252,15 @@ module_expsym_cmds \ export_symbols_cmds \ prelink_cmds \ +postlink_cmds \ postinstall_cmds \ postuninstall_cmds \ finish_cmds \ sys_lib_search_path_spec \ sys_lib_dlsearch_path_spec \ +reload_cmds_CXX \ +reload_cmds_F77 \ +reload_cmds_FC \ old_archive_cmds_CXX \ old_archive_cmds_F77 \ old_archive_cmds_FC \ @@ -31472,10 +32287,13 @@ export_symbols_cmds_FC \ prelink_cmds_CXX \ prelink_cmds_F77 \ -prelink_cmds_FC; do - case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in +prelink_cmds_FC \ +postlink_cmds_CXX \ +postlink_cmds_F77 \ +postlink_cmds_FC; do + case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[\\\\\\\`\\"\\\$]*) - eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" + eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" @@ -31483,12 +32301,6 @@ esac done -# Fix-up fallback echo if it was mangled by the above quoting rules. -case \$lt_ECHO in -*'\\\$0 --fallback-echo"') lt_ECHO=\`\$ECHO "X\$lt_ECHO" | \$Xsed -e 's/\\\\\\\\\\\\\\\$0 --fallback-echo"\$/\$0 --fallback-echo"/'\` - ;; -esac - ac_aux_dir='$ac_aux_dir' xsi_shell='$xsi_shell' lt_shell_append='$lt_shell_append' @@ -31549,7 +32361,7 @@ "test/Makefile") CONFIG_FILES="$CONFIG_FILES test/Makefile" ;; "util/Makefile") CONFIG_FILES="$CONFIG_FILES util/Makefile" ;; - *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;; + *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; esac done @@ -31572,9 +32384,10 @@ # after its creation but before its name has been assigned to `$tmp'. $debug || { - tmp= + tmp= ac_tmp= trap 'exit_status=$? - { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status + : "${ac_tmp:=$tmp}" + { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status ' 0 trap 'as_fn_exit 1' 1 2 13 15 } @@ -31582,12 +32395,13 @@ { tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && - test -n "$tmp" && test -d "$tmp" + test -d "$tmp" } || { tmp=./conf$$-$RANDOM (umask 077 && mkdir "$tmp") -} || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5 +} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 +ac_tmp=$tmp # Set up the scripts for CONFIG_FILES section. # No need to generate them if there are no CONFIG_FILES. @@ -31604,12 +32418,12 @@ fi ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then - ac_cs_awk_cr='\r' + ac_cs_awk_cr='\\r' else ac_cs_awk_cr=$ac_cr fi -echo 'BEGIN {' >"$tmp/subs1.awk" && +echo 'BEGIN {' >"$ac_tmp/subs1.awk" && _ACEOF @@ -31618,18 +32432,18 @@ echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && echo "_ACEOF" } >conf$$subs.sh || - as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 -ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'` + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 +ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` ac_delim='%!_!# ' for ac_last_try in false false false false false :; do . ./conf$$subs.sh || - as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` if test $ac_delim_n = $ac_delim_num; then break elif $ac_last_try; then - as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi @@ -31637,7 +32451,7 @@ rm -f conf$$subs.sh cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -cat >>"\$tmp/subs1.awk" <<\\_ACAWK && +cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && _ACEOF sed -n ' h @@ -31685,7 +32499,7 @@ rm -f conf$$subs.awk cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 _ACAWK -cat >>"\$tmp/subs1.awk" <<_ACAWK && +cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && for (key in S) S_is_set[key] = 1 FS = "" @@ -31717,21 +32531,29 @@ sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" else cat -fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \ - || as_fn_error "could not setup config files machinery" "$LINENO" 5 +fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ + || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 _ACEOF -# VPATH may cause trouble with some makes, so we remove $(srcdir), -# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and +# VPATH may cause trouble with some makes, so we remove sole $(srcdir), +# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and # trailing colons and then remove the whole line if VPATH becomes empty # (actually we leave an empty line to preserve line numbers). if test "x$srcdir" = x.; then - ac_vpsub='/^[ ]*VPATH[ ]*=/{ -s/:*\$(srcdir):*/:/ -s/:*\${srcdir}:*/:/ -s/:*@srcdir@:*/:/ -s/^\([^=]*=[ ]*\):*/\1/ + ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ +h +s/// +s/^/:/ +s/[ ]*$/:/ +s/:\$(srcdir):/:/g +s/:\${srcdir}:/:/g +s/:@srcdir@:/:/g +s/^:*// s/:*$// +x +s/\(=[ ]*\).*/\1/ +G +s/\n// s/^[^=]*=[ ]*$// }' fi @@ -31743,7 +32565,7 @@ # No need to generate them if there are no CONFIG_HEADERS. # This happens for instance with `./config.status Makefile'. if test -n "$CONFIG_HEADERS"; then -cat >"$tmp/defines.awk" <<\_ACAWK || +cat >"$ac_tmp/defines.awk" <<\_ACAWK || BEGIN { _ACEOF @@ -31755,11 +32577,11 @@ # handling of long lines. ac_delim='%!_!# ' for ac_last_try in false false :; do - ac_t=`sed -n "/$ac_delim/p" confdefs.h` - if test -z "$ac_t"; then + ac_tt=`sed -n "/$ac_delim/p" confdefs.h` + if test -z "$ac_tt"; then break elif $ac_last_try; then - as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5 + as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi @@ -31844,7 +32666,7 @@ _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 - as_fn_error "could not setup config headers machinery" "$LINENO" 5 + as_fn_error $? "could not setup config headers machinery" "$LINENO" 5 fi # test -n "$CONFIG_HEADERS" @@ -31857,7 +32679,7 @@ esac case $ac_mode$ac_tag in :[FHL]*:*);; - :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;; + :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac @@ -31876,7 +32698,7 @@ for ac_f do case $ac_f in - -) ac_f="$tmp/stdin";; + -) ac_f="$ac_tmp/stdin";; *) # Look for the file first in the build tree, then in the source tree # (if the path is not absolute). The absolute path cannot be DOS-style, # because $ac_f cannot contain `:'. @@ -31885,7 +32707,7 @@ [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || - as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;; + as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; esac case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac as_fn_append ac_file_inputs " '$ac_f'" @@ -31911,8 +32733,8 @@ esac case $ac_tag in - *:-:* | *:-) cat >"$tmp/stdin" \ - || as_fn_error "could not create $ac_file" "$LINENO" 5 ;; + *:-:* | *:-) cat >"$ac_tmp/stdin" \ + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; esac ;; esac @@ -32048,23 +32870,24 @@ s&@MKDIR_P@&$ac_MKDIR_P&;t t $ac_datarootdir_hack " -eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \ - || as_fn_error "could not create $ac_file" "$LINENO" 5 +eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \ + >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && - { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && - { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && + { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && + { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ + "$ac_tmp/out"`; test -z "$ac_out"; } && { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined." >&5 +which seems to be undefined. Please make sure it is defined" >&5 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined." >&2;} +which seems to be undefined. Please make sure it is defined" >&2;} - rm -f "$tmp/stdin" + rm -f "$ac_tmp/stdin" case $ac_file in - -) cat "$tmp/out" && rm -f "$tmp/out";; - *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";; + -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; + *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; esac \ - || as_fn_error "could not create $ac_file" "$LINENO" 5 + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; :H) # @@ -32073,21 +32896,21 @@ if test x"$ac_file" != x-; then { $as_echo "/* $configure_input */" \ - && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" - } >"$tmp/config.h" \ - || as_fn_error "could not create $ac_file" "$LINENO" 5 - if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then + && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" + } >"$ac_tmp/config.h" \ + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 + if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 $as_echo "$as_me: $ac_file is unchanged" >&6;} else rm -f "$ac_file" - mv "$tmp/config.h" "$ac_file" \ - || as_fn_error "could not create $ac_file" "$LINENO" 5 + mv "$ac_tmp/config.h" "$ac_file" \ + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 fi else $as_echo "/* $configure_input */" \ - && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \ - || as_fn_error "could not create -" "$LINENO" 5 + && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \ + || as_fn_error $? "could not create -" "$LINENO" 5 fi # Compute "$ac_file"'s index in $config_headers. _am_arg="$ac_file" @@ -32248,7 +33071,8 @@ # NOTE: Changes made to this file will be lost: look at ltmain.sh. # # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, -# 2006, 2007, 2008 Free Software Foundation, Inc. +# 2006, 2007, 2008, 2009, 2010 Free Software Foundation, +# Inc. # Written by Gordon Matzigkeit, 1996 # # This file is part of GNU Libtool. @@ -32296,6 +33120,12 @@ # Whether or not to optimize for fast installation. fast_install=$enable_fast_install +# Shell to use when invoking shell scripts. +SHELL=$lt_SHELL + +# An echo program that protects backslashes. +ECHO=$lt_ECHO + # The host system. host_alias=$host_alias host=$host @@ -32345,9 +33175,11 @@ # turn newlines into spaces. NL2SP=$lt_lt_NL2SP -# How to create reloadable object files. -reload_flag=$lt_reload_flag -reload_cmds=$lt_reload_cmds +# convert \$build file names to \$host format. +to_host_file_cmd=$lt_cv_to_host_file_cmd + +# convert \$build files to toolchain format. +to_tool_file_cmd=$lt_cv_to_tool_file_cmd # An object symbol dumper. OBJDUMP=$lt_OBJDUMP @@ -32355,13 +33187,30 @@ # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method -# Command to use when deplibs_check_method == "file_magic". +# Command to use when deplibs_check_method = "file_magic". file_magic_cmd=$lt_file_magic_cmd +# How to find potential files when deplibs_check_method = "file_magic". +file_magic_glob=$lt_file_magic_glob + +# Find potential files using nocaseglob when deplibs_check_method = "file_magic". +want_nocaseglob=$lt_want_nocaseglob + +# DLL creation program. +DLLTOOL=$lt_DLLTOOL + +# Command to associate shared and link libraries. +sharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd + # The archiver. AR=$lt_AR + +# Flags to create an archive. AR_FLAGS=$lt_AR_FLAGS +# How to feed a file listing to the archiver. +archiver_list_spec=$lt_archiver_list_spec + # A symbol stripping program. STRIP=$lt_STRIP @@ -32370,6 +33219,9 @@ old_postinstall_cmds=$lt_old_postinstall_cmds old_postuninstall_cmds=$lt_old_postuninstall_cmds +# Whether to use a lock for old archive extraction. +lock_old_archive_extraction=$lock_old_archive_extraction + # A C compiler. LTCC=$lt_CC @@ -32388,14 +33240,14 @@ # Transform the output of nm in a C name address pair when lib prefix is needed. global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix -# The name of the directory that contains temporary libtool files. -objdir=$objdir +# Specify filename containing input files for \$NM. +nm_file_list_spec=$lt_nm_file_list_spec -# Shell to use when invoking shell scripts. -SHELL=$lt_SHELL +# The root where to search for dependent libraries,and in which our libraries should be installed. +lt_sysroot=$lt_sysroot -# An echo program that does not interpret backslashes. -ECHO=$lt_ECHO +# The name of the directory that contains temporary libtool files. +objdir=$objdir # Used to examine libraries when file_magic_cmd begins with "file". MAGIC_CMD=$MAGIC_CMD @@ -32403,6 +33255,9 @@ # Must we lock files when doing compilation? need_locks=$lt_need_locks +# Manifest tool. +MANIFEST_TOOL=$lt_MANIFEST_TOOL + # Tool to manipulate archived DWARF debug symbol files on Mac OS X. DSYMUTIL=$lt_DSYMUTIL @@ -32459,6 +33314,9 @@ # The coded name of the library, if different from the real name. soname_spec=$lt_soname_spec +# Permission mode override for installation of shared libraries. +install_override_mode=$lt_install_override_mode + # Command to use after installation of a shared archive. postinstall_cmds=$lt_postinstall_cmds @@ -32498,6 +33356,10 @@ # The linker used to build libraries. LD=$lt_LD +# How to create reloadable object files. +reload_flag=$lt_reload_flag +reload_cmds=$lt_reload_cmds + # Commands used to build an old-style archive. old_archive_cmds=$lt_old_archive_cmds @@ -32510,12 +33372,12 @@ # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag -# How to pass a linker flag through the compiler. -wl=$lt_lt_prog_compiler_wl - # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic +# How to pass a linker flag through the compiler. +wl=$lt_lt_prog_compiler_wl + # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static @@ -32602,9 +33464,6 @@ # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs -# Fix the shell variable \$srcfile for the compiler. -fix_srcfile_path=$lt_fix_srcfile_path - # Set to "yes" if exported symbols are required. always_export_symbols=$always_export_symbols @@ -32620,6 +33479,9 @@ # Commands necessary for linking programs (against libraries) with templates. prelink_cmds=$lt_prelink_cmds +# Commands necessary for finishing linking programs. +postlink_cmds=$lt_postlink_cmds + # Specify filename containing input files. file_list_spec=$lt_file_list_spec @@ -32666,212 +33528,169 @@ # if finds mixed CR/LF and LF-only lines. Since sed operates in # text mode, it properly converts lines to CR/LF. This bash problem # is reportedly fixed, but why not run on old versions too? - sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \ - || (rm -f "$cfgfile"; exit 1) - - case $xsi_shell in - yes) - cat << \_LT_EOF >> "$cfgfile" - -# func_dirname file append nondir_replacement -# Compute the dirname of FILE. If nonempty, add APPEND to the result, -# otherwise set result to NONDIR_REPLACEMENT. -func_dirname () -{ - case ${1} in - */*) func_dirname_result="${1%/*}${2}" ;; - * ) func_dirname_result="${3}" ;; - esac -} - -# func_basename file -func_basename () -{ - func_basename_result="${1##*/}" -} - -# func_dirname_and_basename file append nondir_replacement -# perform func_basename and func_dirname in a single function -# call: -# dirname: Compute the dirname of FILE. If nonempty, -# add APPEND to the result, otherwise set result -# to NONDIR_REPLACEMENT. -# value returned in "$func_dirname_result" -# basename: Compute filename of FILE. -# value retuned in "$func_basename_result" -# Implementation must be kept synchronized with func_dirname -# and func_basename. For efficiency, we do not delegate to -# those functions but instead duplicate the functionality here. -func_dirname_and_basename () -{ - case ${1} in - */*) func_dirname_result="${1%/*}${2}" ;; - * ) func_dirname_result="${3}" ;; - esac - func_basename_result="${1##*/}" -} - -# func_stripname prefix suffix name -# strip PREFIX and SUFFIX off of NAME. -# PREFIX and SUFFIX must not contain globbing or regex special -# characters, hashes, percent signs, but SUFFIX may contain a leading -# dot (in which case that matches only a dot). -func_stripname () -{ - # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are - # positional parameters, so assign one to ordinary parameter first. - func_stripname_result=${3} - func_stripname_result=${func_stripname_result#"${1}"} - func_stripname_result=${func_stripname_result%"${2}"} -} - -# func_opt_split -func_opt_split () -{ - func_opt_split_opt=${1%%=*} - func_opt_split_arg=${1#*=} -} - -# func_lo2o object -func_lo2o () -{ - case ${1} in - *.lo) func_lo2o_result=${1%.lo}.${objext} ;; - *) func_lo2o_result=${1} ;; - esac -} - -# func_xform libobj-or-source -func_xform () -{ - func_xform_result=${1%.*}.lo -} - -# func_arith arithmetic-term... -func_arith () -{ - func_arith_result=$(( $* )) -} - -# func_len string -# STRING may not start with a hyphen. -func_len () -{ - func_len_result=${#1} -} - -_LT_EOF - ;; - *) # Bourne compatible functions. - cat << \_LT_EOF >> "$cfgfile" - -# func_dirname file append nondir_replacement -# Compute the dirname of FILE. If nonempty, add APPEND to the result, -# otherwise set result to NONDIR_REPLACEMENT. -func_dirname () -{ - # Extract subdirectory from the argument. - func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"` - if test "X$func_dirname_result" = "X${1}"; then - func_dirname_result="${3}" - else - func_dirname_result="$func_dirname_result${2}" - fi -} - -# func_basename file -func_basename () -{ - func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"` -} - - -# func_stripname prefix suffix name -# strip PREFIX and SUFFIX off of NAME. -# PREFIX and SUFFIX must not contain globbing or regex special -# characters, hashes, percent signs, but SUFFIX may contain a leading -# dot (in which case that matches only a dot). -# func_strip_suffix prefix name -func_stripname () -{ - case ${2} in - .*) func_stripname_result=`$ECHO "X${3}" \ - | $Xsed -e "s%^${1}%%" -e "s%\\\\${2}\$%%"`;; - *) func_stripname_result=`$ECHO "X${3}" \ - | $Xsed -e "s%^${1}%%" -e "s%${2}\$%%"`;; - esac -} - -# sed scripts: -my_sed_long_opt='1s/^\(-[^=]*\)=.*/\1/;q' -my_sed_long_arg='1s/^-[^=]*=//' - -# func_opt_split -func_opt_split () -{ - func_opt_split_opt=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_opt"` - func_opt_split_arg=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_arg"` -} - -# func_lo2o object -func_lo2o () -{ - func_lo2o_result=`$ECHO "X${1}" | $Xsed -e "$lo2o"` -} - -# func_xform libobj-or-source -func_xform () -{ - func_xform_result=`$ECHO "X${1}" | $Xsed -e 's/\.[^.]*$/.lo/'` -} - -# func_arith arithmetic-term... -func_arith () -{ - func_arith_result=`expr "$@"` -} - -# func_len string -# STRING may not start with a hyphen. -func_len () -{ - func_len_result=`expr "$1" : ".*" 2>/dev/null || echo $max_cmd_len` -} - -_LT_EOF -esac - -case $lt_shell_append in - yes) - cat << \_LT_EOF >> "$cfgfile" - -# func_append var value -# Append VALUE to the end of shell variable VAR. -func_append () -{ - eval "$1+=\$2" -} -_LT_EOF - ;; - *) - cat << \_LT_EOF >> "$cfgfile" - -# func_append var value -# Append VALUE to the end of shell variable VAR. -func_append () -{ - eval "$1=\$$1\$2" -} - -_LT_EOF - ;; - esac + sed '$q' "$ltmain" >> "$cfgfile" \ + || (rm -f "$cfgfile"; exit 1) + if test x"$xsi_shell" = xyes; then + sed -e '/^func_dirname ()$/,/^} # func_dirname /c\ +func_dirname ()\ +{\ +\ case ${1} in\ +\ */*) func_dirname_result="${1%/*}${2}" ;;\ +\ * ) func_dirname_result="${3}" ;;\ +\ esac\ +} # Extended-shell func_dirname implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_basename ()$/,/^} # func_basename /c\ +func_basename ()\ +{\ +\ func_basename_result="${1##*/}"\ +} # Extended-shell func_basename implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_dirname_and_basename ()$/,/^} # func_dirname_and_basename /c\ +func_dirname_and_basename ()\ +{\ +\ case ${1} in\ +\ */*) func_dirname_result="${1%/*}${2}" ;;\ +\ * ) func_dirname_result="${3}" ;;\ +\ esac\ +\ func_basename_result="${1##*/}"\ +} # Extended-shell func_dirname_and_basename implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_stripname ()$/,/^} # func_stripname /c\ +func_stripname ()\ +{\ +\ # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are\ +\ # positional parameters, so assign one to ordinary parameter first.\ +\ func_stripname_result=${3}\ +\ func_stripname_result=${func_stripname_result#"${1}"}\ +\ func_stripname_result=${func_stripname_result%"${2}"}\ +} # Extended-shell func_stripname implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_split_long_opt ()$/,/^} # func_split_long_opt /c\ +func_split_long_opt ()\ +{\ +\ func_split_long_opt_name=${1%%=*}\ +\ func_split_long_opt_arg=${1#*=}\ +} # Extended-shell func_split_long_opt implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_split_short_opt ()$/,/^} # func_split_short_opt /c\ +func_split_short_opt ()\ +{\ +\ func_split_short_opt_arg=${1#??}\ +\ func_split_short_opt_name=${1%"$func_split_short_opt_arg"}\ +} # Extended-shell func_split_short_opt implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_lo2o ()$/,/^} # func_lo2o /c\ +func_lo2o ()\ +{\ +\ case ${1} in\ +\ *.lo) func_lo2o_result=${1%.lo}.${objext} ;;\ +\ *) func_lo2o_result=${1} ;;\ +\ esac\ +} # Extended-shell func_lo2o implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_xform ()$/,/^} # func_xform /c\ +func_xform ()\ +{\ + func_xform_result=${1%.*}.lo\ +} # Extended-shell func_xform implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_arith ()$/,/^} # func_arith /c\ +func_arith ()\ +{\ + func_arith_result=$(( $* ))\ +} # Extended-shell func_arith implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_len ()$/,/^} # func_len /c\ +func_len ()\ +{\ + func_len_result=${#1}\ +} # Extended-shell func_len implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + +fi + +if test x"$lt_shell_append" = xyes; then + sed -e '/^func_append ()$/,/^} # func_append /c\ +func_append ()\ +{\ + eval "${1}+=\\${2}"\ +} # Extended-shell func_append implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_append_quoted ()$/,/^} # func_append_quoted /c\ +func_append_quoted ()\ +{\ +\ func_quote_for_eval "${2}"\ +\ eval "${1}+=\\\\ \\$func_quote_for_eval_result"\ +} # Extended-shell func_append_quoted implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + # Save a `func_append' function call where possible by direct use of '+=' + sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") + test 0 -eq $? || _lt_function_replace_fail=: +else + # Save a `func_append' function call even when '+=' is not available + sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") + test 0 -eq $? || _lt_function_replace_fail=: +fi + +if test x"$_lt_function_replace_fail" = x":"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unable to substitute extended shell functions in $ofile" >&5 +$as_echo "$as_me: WARNING: Unable to substitute extended shell functions in $ofile" >&2;} +fi - sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \ - || (rm -f "$cfgfile"; exit 1) - mv -f "$cfgfile" "$ofile" || + mv -f "$cfgfile" "$ofile" || (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") chmod +x "$ofile" @@ -32883,6 +33702,10 @@ # The linker used to build libraries. LD=$lt_LD_CXX +# How to create reloadable object files. +reload_flag=$lt_reload_flag_CXX +reload_cmds=$lt_reload_cmds_CXX + # Commands used to build an old-style archive. old_archive_cmds=$lt_old_archive_cmds_CXX @@ -32895,12 +33718,12 @@ # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_CXX -# How to pass a linker flag through the compiler. -wl=$lt_lt_prog_compiler_wl_CXX - # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic_CXX +# How to pass a linker flag through the compiler. +wl=$lt_lt_prog_compiler_wl_CXX + # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static_CXX @@ -32987,9 +33810,6 @@ # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs_CXX -# Fix the shell variable \$srcfile for the compiler. -fix_srcfile_path=$lt_fix_srcfile_path_CXX - # Set to "yes" if exported symbols are required. always_export_symbols=$always_export_symbols_CXX @@ -33005,6 +33825,9 @@ # Commands necessary for linking programs (against libraries) with templates. prelink_cmds=$lt_prelink_cmds_CXX +# Commands necessary for finishing linking programs. +postlink_cmds=$lt_postlink_cmds_CXX + # Specify filename containing input files. file_list_spec=$lt_file_list_spec_CXX @@ -33036,6 +33859,10 @@ # The linker used to build libraries. LD=$lt_LD_F77 +# How to create reloadable object files. +reload_flag=$lt_reload_flag_F77 +reload_cmds=$lt_reload_cmds_F77 + # Commands used to build an old-style archive. old_archive_cmds=$lt_old_archive_cmds_F77 @@ -33048,12 +33875,12 @@ # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_F77 -# How to pass a linker flag through the compiler. -wl=$lt_lt_prog_compiler_wl_F77 - # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic_F77 +# How to pass a linker flag through the compiler. +wl=$lt_lt_prog_compiler_wl_F77 + # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static_F77 @@ -33140,9 +33967,6 @@ # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs_F77 -# Fix the shell variable \$srcfile for the compiler. -fix_srcfile_path=$lt_fix_srcfile_path_F77 - # Set to "yes" if exported symbols are required. always_export_symbols=$always_export_symbols_F77 @@ -33158,6 +33982,9 @@ # Commands necessary for linking programs (against libraries) with templates. prelink_cmds=$lt_prelink_cmds_F77 +# Commands necessary for finishing linking programs. +postlink_cmds=$lt_postlink_cmds_F77 + # Specify filename containing input files. file_list_spec=$lt_file_list_spec_F77 @@ -33189,6 +34016,10 @@ # The linker used to build libraries. LD=$lt_LD_FC +# How to create reloadable object files. +reload_flag=$lt_reload_flag_FC +reload_cmds=$lt_reload_cmds_FC + # Commands used to build an old-style archive. old_archive_cmds=$lt_old_archive_cmds_FC @@ -33201,12 +34032,12 @@ # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_FC -# How to pass a linker flag through the compiler. -wl=$lt_lt_prog_compiler_wl_FC - # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic_FC +# How to pass a linker flag through the compiler. +wl=$lt_lt_prog_compiler_wl_FC + # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static_FC @@ -33293,9 +34124,6 @@ # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs_FC -# Fix the shell variable \$srcfile for the compiler. -fix_srcfile_path=$lt_fix_srcfile_path_FC - # Set to "yes" if exported symbols are required. always_export_symbols=$always_export_symbols_FC @@ -33311,6 +34139,9 @@ # Commands necessary for linking programs (against libraries) with templates. prelink_cmds=$lt_prelink_cmds_FC +# Commands necessary for finishing linking programs. +postlink_cmds=$lt_postlink_cmds_FC + # Specify filename containing input files. file_list_spec=$lt_file_list_spec_FC @@ -33346,7 +34177,7 @@ ac_clean_files=$ac_clean_files_save test $ac_write_fail = 0 || - as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5 + as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 # configure is writing to config.log, and then calls config.status. @@ -33367,7 +34198,7 @@ exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. - $ac_cs_success || as_fn_exit $? + $ac_cs_success || as_fn_exit 1 fi if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 diff -Nru libgetdata-0.7.0/configure.ac libgetdata-0.7.1/configure.ac --- libgetdata-0.7.0/configure.ac 2010-11-23 00:33:14.000000000 +0000 +++ libgetdata-0.7.1/configure.ac 2010-12-06 23:08:06.000000000 +0000 @@ -21,7 +21,7 @@ m4_define(getdata_major, 0) m4_define(getdata_minor, 7) -m4_define(getdata_revision, 0) +m4_define(getdata_revision, 1) m4_define(getdata_extra, []) m4_define(getdata_version, getdata_major.getdata_minor.getdata_revision[]getdata_extra) @@ -45,7 +45,7 @@ dnl libgetdata current interface version AC_SUBST(GETDATA_IFACE_VERSION, [4]) dnl libgetdata current interface implementation revision -AC_SUBST(GETDATA_IMPL_REVISION, [0]) +AC_SUBST(GETDATA_IMPL_REVISION, [1]) dnl libgetdata interface age (current interface - oldest supported interface) AC_SUBST(GETDATA_IFACE_AGE, [0]) @@ -53,7 +53,7 @@ AC_SUBST(GETDATAXX_VERSION, [2:0:0]) dnl libfgetdata interface version info -AC_SUBST(FGETDATA_VERSION, [2:0:0]) +AC_SUBST(FGETDATA_VERSION, [2:1:0]) dnl libf95getdata interface version info AC_SUBST(F95GETDATA_VERSION, [2:0:0]) @@ -508,8 +508,8 @@ dnl functions AC_CHECK_FUNCS([_commit fchmod _fdopen fseeko fseeko64 fsync ftello ftello64 \ - getdelim gmtime_r _lseeki64 _mkdir mkstemp _open _read _rmdir \ - stat64 _stat64 strtoll strtoull _unlink _write]) + getdelim gmtime_r _lseeki64 _mkdir mkstemp nan _open _read \ + _rmdir stat64 _stat64 strtoll strtoull _unlink _write]) if test "x$disable_c99" = "xno"; then AC_CHECK_FUNCS([cabs]) fi diff -Nru libgetdata-0.7.0/debian/changelog libgetdata-0.7.1/debian/changelog --- libgetdata-0.7.0/debian/changelog 2010-12-21 21:37:49.000000000 +0000 +++ libgetdata-0.7.1/debian/changelog 2010-12-21 21:37:49.000000000 +0000 @@ -1,3 +1,11 @@ +libgetdata (0.7.1) lucid; urgency=low + + * new upstream release + * repackaged again as not debian-native (I must be doing something wrong) + * packaged python bindings in libgetdata-python + + -- Steven Benton Wed, 22 Dec 2010 09:45:24 +1300 + libgetdata (0.7.0) lucid; urgency=low * new upstream release diff -Nru libgetdata-0.7.0/debian/control libgetdata-0.7.1/debian/control --- libgetdata-0.7.0/debian/control 2010-12-21 21:37:49.000000000 +0000 +++ libgetdata-0.7.1/debian/control 2010-12-21 21:37:49.000000000 +0000 @@ -2,7 +2,7 @@ Priority: extra Maintainer: Ubuntu Developers XSBC-Original-Maintainer: Steven Benton -Build-Depends: debhelper (>= 7), autotools-dev +Build-Depends: debhelper (>= 7), autotools-dev, python-numpy, python-dev Standards-Version: 3.8.3 Section: libs Homepage: http://getdata.sourceforge.net/ @@ -37,3 +37,13 @@ data. The Dirfile database format is designed to provide a fast, simple format for storing and reading data. +Package: libgetdata-python +Section: libs +Architecture: any +Depends: libgetdata (= ${binary:Version}), python-numpy +Description: library for reading and writing dirfile data - python bindings + The GetData Project is the reference implementation of the Dirfile Standards, + a filesystem-based, column-oriented database format for time-ordered binary + data. The Dirfile database format is designed to provide a fast, simple format + for storing and reading data. + diff -Nru libgetdata-0.7.0/debian/libgetdata-python.install libgetdata-0.7.1/debian/libgetdata-python.install --- libgetdata-0.7.0/debian/libgetdata-python.install 1970-01-01 00:00:00.000000000 +0000 +++ libgetdata-0.7.1/debian/libgetdata-python.install 2010-12-21 21:37:49.000000000 +0000 @@ -0,0 +1 @@ +/usr/lib/python2.6/* diff -Nru libgetdata-0.7.0/doc/Makefile.in libgetdata-0.7.1/doc/Makefile.in --- libgetdata-0.7.0/doc/Makefile.in 2010-11-23 00:33:32.000000000 +0000 +++ libgetdata-0.7.1/doc/Makefile.in 2010-12-06 23:08:41.000000000 +0000 @@ -105,6 +105,7 @@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DIFF = @DIFF@ +DLLTOOL = @DLLTOOL@ DL_LIBRARY_PATH = @DL_LIBRARY_PATH@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ @@ -150,6 +151,7 @@ LZMA_CPPFLAGS = @LZMA_CPPFLAGS@ LZMA_LDFLAGS = @LZMA_LDFLAGS@ MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ @@ -184,6 +186,7 @@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ absolute_docdir = @absolute_docdir@ +ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ @@ -220,7 +223,6 @@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ diff -Nru libgetdata-0.7.0/ltmain.sh libgetdata-0.7.1/ltmain.sh --- libgetdata-0.7.0/ltmain.sh 2010-05-12 07:31:16.000000000 +0000 +++ libgetdata-0.7.1/ltmain.sh 2010-11-12 21:34:20.000000000 +0000 @@ -1,9 +1,9 @@ -# Generated from ltmain.m4sh. -# ltmain.sh (GNU libtool) 2.2.6b +# libtool (GNU libtool) 2.4 # Written by Gordon Matzigkeit , 1996 -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, 2007 2008 Free Software Foundation, Inc. +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, +# 2007, 2008, 2009, 2010 Free Software Foundation, Inc. # This is free software; see the source for copying conditions. There is NO # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. @@ -32,50 +32,56 @@ # # Provide generalized library-building support services. # -# --config show all configuration variables -# --debug enable verbose shell tracing -# -n, --dry-run display commands without modifying any files -# --features display basic configuration information and exit -# --mode=MODE use operation mode MODE -# --preserve-dup-deps don't remove duplicate dependency libraries -# --quiet, --silent don't print informational messages -# --tag=TAG use configuration variables from tag TAG -# -v, --verbose print informational messages (default) -# --version print version information -# -h, --help print short or long help message +# --config show all configuration variables +# --debug enable verbose shell tracing +# -n, --dry-run display commands without modifying any files +# --features display basic configuration information and exit +# --mode=MODE use operation mode MODE +# --preserve-dup-deps don't remove duplicate dependency libraries +# --quiet, --silent don't print informational messages +# --no-quiet, --no-silent +# print informational messages (default) +# --tag=TAG use configuration variables from tag TAG +# -v, --verbose print more informational messages than default +# --no-verbose don't print the extra informational messages +# --version print version information +# -h, --help, --help-all print short, long, or detailed help message # # MODE must be one of the following: # -# clean remove files from the build directory -# compile compile a source file into a libtool object -# execute automatically set library path, then run a program -# finish complete the installation of libtool libraries -# install install libraries or executables -# link create a library or an executable -# uninstall remove libraries from an installed directory +# clean remove files from the build directory +# compile compile a source file into a libtool object +# execute automatically set library path, then run a program +# finish complete the installation of libtool libraries +# install install libraries or executables +# link create a library or an executable +# uninstall remove libraries from an installed directory # -# MODE-ARGS vary depending on the MODE. +# MODE-ARGS vary depending on the MODE. When passed as first option, +# `--mode=MODE' may be abbreviated as `MODE' or a unique abbreviation of that. # Try `$progname --help --mode=MODE' for a more detailed description of MODE. # # When reporting a bug, please describe a test case to reproduce it and # include the following information: # -# host-triplet: $host -# shell: $SHELL -# compiler: $LTCC -# compiler flags: $LTCFLAGS -# linker: $LD (gnu? $with_gnu_ld) -# $progname: (GNU libtool) 2.2.6b -# automake: $automake_version -# autoconf: $autoconf_version +# host-triplet: $host +# shell: $SHELL +# compiler: $LTCC +# compiler flags: $LTCFLAGS +# linker: $LD (gnu? $with_gnu_ld) +# $progname: (GNU libtool) 2.4 +# automake: $automake_version +# autoconf: $autoconf_version # # Report bugs to . +# GNU libtool home page: . +# General help using GNU software: . -PROGRAM=ltmain.sh +PROGRAM=libtool PACKAGE=libtool -VERSION=2.2.6b +VERSION=2.4 TIMESTAMP="" -package_revision=1.3017 +package_revision=1.3293 # Be Bourne compatible if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then @@ -91,10 +97,15 @@ BIN_SH=xpg4; export BIN_SH # for Tru64 DUALCASE=1; export DUALCASE # for MKS sh +# A function that is used when there is no print builtin or printf. +func_fallback_echo () +{ + eval 'cat <<_LTECHO_EOF +$1 +_LTECHO_EOF' +} + # NLS nuisances: We save the old values to restore during execute mode. -# Only set LANG and LC_ALL to C if already set. -# These must not be set unconditionally because not all systems understand -# e.g. LANG=C (notably SCO). lt_user_locale= lt_safe_locale= for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES @@ -107,24 +118,33 @@ lt_safe_locale=\"$lt_var=C; \$lt_safe_locale\" fi" done +LC_ALL=C +LANGUAGE=C +export LANGUAGE LC_ALL $lt_unset CDPATH +# Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh +# is ksh but when the shell is invoked as "sh" and the current value of +# the _XPG environment variable is not equal to 1 (one), the special +# positional parameter $0, within a function call, is the name of the +# function. +progpath="$0" : ${CP="cp -f"} -: ${ECHO="echo"} -: ${EGREP="/bin/grep -E"} -: ${FGREP="/bin/grep -F"} -: ${GREP="/bin/grep"} +test "${ECHO+set}" = set || ECHO=${as_echo-'printf %s\n'} +: ${EGREP="grep -E"} +: ${FGREP="grep -F"} +: ${GREP="grep"} : ${LN_S="ln -s"} : ${MAKE="make"} : ${MKDIR="mkdir"} : ${MV="mv -f"} : ${RM="rm -f"} -: ${SED="/bin/sed"} +: ${SED="sed"} : ${SHELL="${CONFIG_SHELL-/bin/sh}"} : ${Xsed="$SED -e 1s/^X//"} @@ -144,6 +164,27 @@ dirname="s,/[^/]*$,," basename="s,^.*/,," +# func_dirname file append nondir_replacement +# Compute the dirname of FILE. If nonempty, add APPEND to the result, +# otherwise set result to NONDIR_REPLACEMENT. +func_dirname () +{ + func_dirname_result=`$ECHO "${1}" | $SED "$dirname"` + if test "X$func_dirname_result" = "X${1}"; then + func_dirname_result="${3}" + else + func_dirname_result="$func_dirname_result${2}" + fi +} # func_dirname may be replaced by extended shell implementation + + +# func_basename file +func_basename () +{ + func_basename_result=`$ECHO "${1}" | $SED "$basename"` +} # func_basename may be replaced by extended shell implementation + + # func_dirname_and_basename file append nondir_replacement # perform func_basename and func_dirname in a single function # call: @@ -158,33 +199,183 @@ # those functions but instead duplicate the functionality here. func_dirname_and_basename () { - # Extract subdirectory from the argument. - func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"` - if test "X$func_dirname_result" = "X${1}"; then - func_dirname_result="${3}" - else - func_dirname_result="$func_dirname_result${2}" - fi - func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"` + # Extract subdirectory from the argument. + func_dirname_result=`$ECHO "${1}" | $SED -e "$dirname"` + if test "X$func_dirname_result" = "X${1}"; then + func_dirname_result="${3}" + else + func_dirname_result="$func_dirname_result${2}" + fi + func_basename_result=`$ECHO "${1}" | $SED -e "$basename"` +} # func_dirname_and_basename may be replaced by extended shell implementation + + +# func_stripname prefix suffix name +# strip PREFIX and SUFFIX off of NAME. +# PREFIX and SUFFIX must not contain globbing or regex special +# characters, hashes, percent signs, but SUFFIX may contain a leading +# dot (in which case that matches only a dot). +# func_strip_suffix prefix name +func_stripname () +{ + case ${2} in + .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; + *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; + esac +} # func_stripname may be replaced by extended shell implementation + + +# These SED scripts presuppose an absolute path with a trailing slash. +pathcar='s,^/\([^/]*\).*$,\1,' +pathcdr='s,^/[^/]*,,' +removedotparts=':dotsl + s@/\./@/@g + t dotsl + s,/\.$,/,' +collapseslashes='s@/\{1,\}@/@g' +finalslash='s,/*$,/,' + +# func_normal_abspath PATH +# Remove doubled-up and trailing slashes, "." path components, +# and cancel out any ".." path components in PATH after making +# it an absolute path. +# value returned in "$func_normal_abspath_result" +func_normal_abspath () +{ + # Start from root dir and reassemble the path. + func_normal_abspath_result= + func_normal_abspath_tpath=$1 + func_normal_abspath_altnamespace= + case $func_normal_abspath_tpath in + "") + # Empty path, that just means $cwd. + func_stripname '' '/' "`pwd`" + func_normal_abspath_result=$func_stripname_result + return + ;; + # The next three entries are used to spot a run of precisely + # two leading slashes without using negated character classes; + # we take advantage of case's first-match behaviour. + ///*) + # Unusual form of absolute path, do nothing. + ;; + //*) + # Not necessarily an ordinary path; POSIX reserves leading '//' + # and for example Cygwin uses it to access remote file shares + # over CIFS/SMB, so we conserve a leading double slash if found. + func_normal_abspath_altnamespace=/ + ;; + /*) + # Absolute path, do nothing. + ;; + *) + # Relative path, prepend $cwd. + func_normal_abspath_tpath=`pwd`/$func_normal_abspath_tpath + ;; + esac + # Cancel out all the simple stuff to save iterations. We also want + # the path to end with a slash for ease of parsing, so make sure + # there is one (and only one) here. + func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \ + -e "$removedotparts" -e "$collapseslashes" -e "$finalslash"` + while :; do + # Processed it all yet? + if test "$func_normal_abspath_tpath" = / ; then + # If we ascended to the root using ".." the result may be empty now. + if test -z "$func_normal_abspath_result" ; then + func_normal_abspath_result=/ + fi + break + fi + func_normal_abspath_tcomponent=`$ECHO "$func_normal_abspath_tpath" | $SED \ + -e "$pathcar"` + func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \ + -e "$pathcdr"` + # Figure out what to do with it + case $func_normal_abspath_tcomponent in + "") + # Trailing empty path component, ignore it. + ;; + ..) + # Parent dir; strip last assembled component from result. + func_dirname "$func_normal_abspath_result" + func_normal_abspath_result=$func_dirname_result + ;; + *) + # Actual path component, append it. + func_normal_abspath_result=$func_normal_abspath_result/$func_normal_abspath_tcomponent + ;; + esac + done + # Restore leading double-slash if one was found on entry. + func_normal_abspath_result=$func_normal_abspath_altnamespace$func_normal_abspath_result } -# Generated shell functions inserted here. +# func_relative_path SRCDIR DSTDIR +# generates a relative path from SRCDIR to DSTDIR, with a trailing +# slash if non-empty, suitable for immediately appending a filename +# without needing to append a separator. +# value returned in "$func_relative_path_result" +func_relative_path () +{ + func_relative_path_result= + func_normal_abspath "$1" + func_relative_path_tlibdir=$func_normal_abspath_result + func_normal_abspath "$2" + func_relative_path_tbindir=$func_normal_abspath_result + + # Ascend the tree starting from libdir + while :; do + # check if we have found a prefix of bindir + case $func_relative_path_tbindir in + $func_relative_path_tlibdir) + # found an exact match + func_relative_path_tcancelled= + break + ;; + $func_relative_path_tlibdir*) + # found a matching prefix + func_stripname "$func_relative_path_tlibdir" '' "$func_relative_path_tbindir" + func_relative_path_tcancelled=$func_stripname_result + if test -z "$func_relative_path_result"; then + func_relative_path_result=. + fi + break + ;; + *) + func_dirname $func_relative_path_tlibdir + func_relative_path_tlibdir=${func_dirname_result} + if test "x$func_relative_path_tlibdir" = x ; then + # Have to descend all the way to the root! + func_relative_path_result=../$func_relative_path_result + func_relative_path_tcancelled=$func_relative_path_tbindir + break + fi + func_relative_path_result=../$func_relative_path_result + ;; + esac + done + + # Now calculate path; take care to avoid doubling-up slashes. + func_stripname '' '/' "$func_relative_path_result" + func_relative_path_result=$func_stripname_result + func_stripname '/' '/' "$func_relative_path_tcancelled" + if test "x$func_stripname_result" != x ; then + func_relative_path_result=${func_relative_path_result}/${func_stripname_result} + fi -# Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh -# is ksh but when the shell is invoked as "sh" and the current value of -# the _XPG environment variable is not equal to 1 (one), the special -# positional parameter $0, within a function call, is the name of the -# function. -progpath="$0" + # Normalisation. If bindir is libdir, return empty string, + # else relative path ending with a slash; either way, target + # file name can be directly appended. + if test ! -z "$func_relative_path_result"; then + func_stripname './' '' "$func_relative_path_result/" + func_relative_path_result=$func_stripname_result + fi +} # The name of this program: -# In the unlikely event $progname began with a '-', it would play havoc with -# func_echo (imagine progname=-n), so we prepend ./ in that case: func_dirname_and_basename "$progpath" progname=$func_basename_result -case $progname in - -*) progname=./$progname ;; -esac # Make sure we have an absolute path for reexecution: case $progpath in @@ -215,6 +406,15 @@ # Same as above, but do not quote variable references. double_quote_subst='s/\(["`\\]\)/\\\1/g' +# Sed substitution that turns a string into a regex matching for the +# string literally. +sed_make_literal_regex='s,[].[^$\\*\/],\\&,g' + +# Sed substitution that converts a w32 file name or path +# which contains forward slashes, into one that contains +# (escaped) backslashes. A very naive implementation. +lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g' + # Re-`\' parameter expansions in output of double_quote_subst that were # `\'-ed in input to the same. If an odd number of `\' preceded a '$' # in input to double_quote_subst, that '$' was protected from expansion. @@ -243,7 +443,7 @@ # name if it has been set yet. func_echo () { - $ECHO "$progname${mode+: }$mode: $*" + $ECHO "$progname: ${opt_mode+$opt_mode: }$*" } # func_verbose arg... @@ -258,18 +458,25 @@ : } +# func_echo_all arg... +# Invoke $ECHO with all args, space-separated. +func_echo_all () +{ + $ECHO "$*" +} + # func_error arg... # Echo program name prefixed message to standard error. func_error () { - $ECHO "$progname${mode+: }$mode: "${1+"$@"} 1>&2 + $ECHO "$progname: ${opt_mode+$opt_mode: }"${1+"$@"} 1>&2 } # func_warning arg... # Echo program name prefixed warning message to standard error. func_warning () { - $opt_warning && $ECHO "$progname${mode+: }$mode: warning: "${1+"$@"} 1>&2 + $opt_warning && $ECHO "$progname: ${opt_mode+$opt_mode: }warning: "${1+"$@"} 1>&2 # bash bug again: : @@ -326,9 +533,9 @@ case $my_directory_path in */*) ;; *) break ;; esac # ...otherwise throw away the child directory and loop - my_directory_path=`$ECHO "X$my_directory_path" | $Xsed -e "$dirname"` + my_directory_path=`$ECHO "$my_directory_path" | $SED -e "$dirname"` done - my_dir_list=`$ECHO "X$my_dir_list" | $Xsed -e 's,:*$,,'` + my_dir_list=`$ECHO "$my_dir_list" | $SED 's,:*$,,'` save_mkdir_p_IFS="$IFS"; IFS=':' for my_dir in $my_dir_list; do @@ -378,7 +585,7 @@ func_fatal_error "cannot create temporary directory \`$my_tmpdir'" fi - $ECHO "X$my_tmpdir" | $Xsed + $ECHO "$my_tmpdir" } @@ -392,7 +599,7 @@ { case $1 in *[\\\`\"\$]*) - func_quote_for_eval_unquoted_result=`$ECHO "X$1" | $Xsed -e "$sed_quote_subst"` ;; + func_quote_for_eval_unquoted_result=`$ECHO "$1" | $SED "$sed_quote_subst"` ;; *) func_quote_for_eval_unquoted_result="$1" ;; esac @@ -419,7 +626,7 @@ { case $1 in *[\\\`\"]*) - my_arg=`$ECHO "X$1" | $Xsed \ + my_arg=`$ECHO "$1" | $SED \ -e "$double_quote_subst" -e "$sed_double_backslash"` ;; *) my_arg="$1" ;; @@ -488,15 +695,39 @@ fi } - - +# func_tr_sh +# Turn $1 into a string suitable for a shell variable name. +# Result is stored in $func_tr_sh_result. All characters +# not in the set a-zA-Z0-9_ are replaced with '_'. Further, +# if $1 begins with a digit, a '_' is prepended as well. +func_tr_sh () +{ + case $1 in + [0-9]* | *[!a-zA-Z0-9_]*) + func_tr_sh_result=`$ECHO "$1" | $SED 's/^\([0-9]\)/_\1/; s/[^a-zA-Z0-9_]/_/g'` + ;; + * ) + func_tr_sh_result=$1 + ;; + esac +} # func_version # Echo version message to standard output and exit. func_version () { - $SED -n '/^# '$PROGRAM' (GNU /,/# warranty; / { + $opt_debug + + $SED -n '/(C)/!b go + :more + /\./!{ + N + s/\n# / / + b more + } + :go + /^# '$PROGRAM' (GNU /,/# warranty; / { s/^# // s/^# *$// s/\((C)\)[ 0-9,-]*\( [1-9][0-9]*\)/\1\2/ @@ -509,22 +740,28 @@ # Echo short help message to standard output and exit. func_usage () { - $SED -n '/^# Usage:/,/# -h/ { + $opt_debug + + $SED -n '/^# Usage:/,/^# *.*--help/ { s/^# // s/^# *$// s/\$progname/'$progname'/ p }' < "$progpath" - $ECHO + echo $ECHO "run \`$progname --help | more' for full usage" exit $? } -# func_help -# Echo long help message to standard output and exit. +# func_help [NOEXIT] +# Echo long help message to standard output and exit, +# unless 'noexit' is passed as argument. func_help () { + $opt_debug + $SED -n '/^# Usage:/,/# Report bugs to/ { + :print s/^# // s/^# *$// s*\$progname*'$progname'* @@ -537,8 +774,15 @@ s/\$automake_version/'"`(automake --version) 2>/dev/null |$SED 1q`"'/ s/\$autoconf_version/'"`(autoconf --version) 2>/dev/null |$SED 1q`"'/ p - }' < "$progpath" - exit $? + d + } + /^# .* home page:/b print + /^# General help using/b print + ' < "$progpath" + ret=$? + if test -z "$1"; then + exit $ret + fi } # func_missing_arg argname @@ -546,63 +790,106 @@ # exit_cmd. func_missing_arg () { - func_error "missing argument for $1" + $opt_debug + + func_error "missing argument for $1." exit_cmd=exit } -exit_cmd=: +# func_split_short_opt shortopt +# Set func_split_short_opt_name and func_split_short_opt_arg shell +# variables after splitting SHORTOPT after the 2nd character. +func_split_short_opt () +{ + my_sed_short_opt='1s/^\(..\).*$/\1/;q' + my_sed_short_rest='1s/^..\(.*\)$/\1/;q' + + func_split_short_opt_name=`$ECHO "$1" | $SED "$my_sed_short_opt"` + func_split_short_opt_arg=`$ECHO "$1" | $SED "$my_sed_short_rest"` +} # func_split_short_opt may be replaced by extended shell implementation + + +# func_split_long_opt longopt +# Set func_split_long_opt_name and func_split_long_opt_arg shell +# variables after splitting LONGOPT at the `=' sign. +func_split_long_opt () +{ + my_sed_long_opt='1s/^\(--[^=]*\)=.*/\1/;q' + my_sed_long_arg='1s/^--[^=]*=//' + + func_split_long_opt_name=`$ECHO "$1" | $SED "$my_sed_long_opt"` + func_split_long_opt_arg=`$ECHO "$1" | $SED "$my_sed_long_arg"` +} # func_split_long_opt may be replaced by extended shell implementation +exit_cmd=: -# Check that we have a working $ECHO. -if test "X$1" = X--no-reexec; then - # Discard the --no-reexec flag, and continue. - shift -elif test "X$1" = X--fallback-echo; then - # Avoid inline document here, it may be left over - : -elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t'; then - # Yippee, $ECHO works! - : -else - # Restart under the correct shell, and then maybe $ECHO will work. - exec $SHELL "$progpath" --no-reexec ${1+"$@"} -fi -if test "X$1" = X--fallback-echo; then - # used as fallback echo - shift - cat </dev/null || echo $max_cmd_len` +} # func_len may be replaced by extended shell implementation + + +# func_lo2o object +func_lo2o () +{ + func_lo2o_result=`$ECHO "${1}" | $SED "$lo2o"` +} # func_lo2o may be replaced by extended shell implementation + + +# func_xform libobj-or-source +func_xform () +{ + func_xform_result=`$ECHO "${1}" | $SED 's/\.[^.]*$/.lo/'` +} # func_xform may be replaced by extended shell implementation + + # func_fatal_configuration arg... # Echo program name prefixed message to standard error, followed by # a configuration failure hint, and exit. @@ -636,16 +923,16 @@ # Display the features supported by this script. func_features () { - $ECHO "host: $host" + echo "host: $host" if test "$build_libtool_libs" = yes; then - $ECHO "enable shared libraries" + echo "enable shared libraries" else - $ECHO "disable shared libraries" + echo "disable shared libraries" fi if test "$build_old_libs" = yes; then - $ECHO "enable static libraries" + echo "enable static libraries" else - $ECHO "disable static libraries" + echo "disable static libraries" fi exit $? @@ -692,117 +979,204 @@ esac } -# Parse options once, thoroughly. This comes as soon as possible in -# the script to make things like `libtool --version' happen quickly. +# func_check_version_match +# Ensure that we are using m4 macros, and libtool script from the same +# release of libtool. +func_check_version_match () { + if test "$package_revision" != "$macro_revision"; then + if test "$VERSION" != "$macro_version"; then + if test -z "$macro_version"; then + cat >&2 <<_LT_EOF +$progname: Version mismatch error. This is $PACKAGE $VERSION, but the +$progname: definition of this LT_INIT comes from an older release. +$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION +$progname: and run autoconf again. +_LT_EOF + else + cat >&2 <<_LT_EOF +$progname: Version mismatch error. This is $PACKAGE $VERSION, but the +$progname: definition of this LT_INIT comes from $PACKAGE $macro_version. +$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION +$progname: and run autoconf again. +_LT_EOF + fi + else + cat >&2 <<_LT_EOF +$progname: Version mismatch error. This is $PACKAGE $VERSION, revision $package_revision, +$progname: but the definition of this LT_INIT comes from revision $macro_revision. +$progname: You should recreate aclocal.m4 with macros from revision $package_revision +$progname: of $PACKAGE $VERSION and run autoconf again. +_LT_EOF + fi + + exit $EXIT_MISMATCH + fi +} + + +# Shorthand for --mode=foo, only valid as the first argument +case $1 in +clean|clea|cle|cl) + shift; set dummy --mode clean ${1+"$@"}; shift + ;; +compile|compil|compi|comp|com|co|c) + shift; set dummy --mode compile ${1+"$@"}; shift + ;; +execute|execut|execu|exec|exe|ex|e) + shift; set dummy --mode execute ${1+"$@"}; shift + ;; +finish|finis|fini|fin|fi|f) + shift; set dummy --mode finish ${1+"$@"}; shift + ;; +install|instal|insta|inst|ins|in|i) + shift; set dummy --mode install ${1+"$@"}; shift + ;; +link|lin|li|l) + shift; set dummy --mode link ${1+"$@"}; shift + ;; +uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u) + shift; set dummy --mode uninstall ${1+"$@"}; shift + ;; +esac - # Shorthand for --mode=foo, only valid as the first argument - case $1 in - clean|clea|cle|cl) - shift; set dummy --mode clean ${1+"$@"}; shift - ;; - compile|compil|compi|comp|com|co|c) - shift; set dummy --mode compile ${1+"$@"}; shift - ;; - execute|execut|execu|exec|exe|ex|e) - shift; set dummy --mode execute ${1+"$@"}; shift - ;; - finish|finis|fini|fin|fi|f) - shift; set dummy --mode finish ${1+"$@"}; shift - ;; - install|instal|insta|inst|ins|in|i) - shift; set dummy --mode install ${1+"$@"}; shift - ;; - link|lin|li|l) - shift; set dummy --mode link ${1+"$@"}; shift - ;; - uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u) - shift; set dummy --mode uninstall ${1+"$@"}; shift - ;; - esac - # Parse non-mode specific arguments: - while test "$#" -gt 0; do + +# Option defaults: +opt_debug=: +opt_dry_run=false +opt_config=false +opt_preserve_dup_deps=false +opt_features=false +opt_finish=false +opt_help=false +opt_help_all=false +opt_silent=: +opt_verbose=: +opt_silent=false +opt_verbose=false + + +# Parse options once, thoroughly. This comes as soon as possible in the +# script to make things like `--version' happen as quickly as we can. +{ + # this just eases exit handling + while test $# -gt 0; do opt="$1" shift - case $opt in - --config) func_config ;; - - --debug) preserve_args="$preserve_args $opt" + --debug|-x) opt_debug='set -x' func_echo "enabling shell trace mode" - opt_debug='set -x' $opt_debug ;; - - -dlopen) test "$#" -eq 0 && func_missing_arg "$opt" && break - execute_dlfiles="$execute_dlfiles $1" - shift + --dry-run|--dryrun|-n) + opt_dry_run=: ;; - - --dry-run | -n) opt_dry_run=: ;; - --features) func_features ;; - --finish) mode="finish" ;; - - --mode) test "$#" -eq 0 && func_missing_arg "$opt" && break - case $1 in - # Valid mode arguments: - clean) ;; - compile) ;; - execute) ;; - finish) ;; - install) ;; - link) ;; - relink) ;; - uninstall) ;; - - # Catch anything else as an error - *) func_error "invalid argument for $opt" - exit_cmd=exit - break - ;; - esac - - mode="$1" + --config) + opt_config=: +func_config + ;; + --dlopen|-dlopen) + optarg="$1" + opt_dlopen="${opt_dlopen+$opt_dlopen +}$optarg" shift ;; - --preserve-dup-deps) - opt_duplicate_deps=: ;; - - --quiet|--silent) preserve_args="$preserve_args $opt" - opt_silent=: + opt_preserve_dup_deps=: ;; - - --verbose| -v) preserve_args="$preserve_args $opt" + --features) + opt_features=: +func_features + ;; + --finish) + opt_finish=: +set dummy --mode finish ${1+"$@"}; shift + ;; + --help) + opt_help=: + ;; + --help-all) + opt_help_all=: +opt_help=': help-all' + ;; + --mode) + test $# = 0 && func_missing_arg $opt && break + optarg="$1" + opt_mode="$optarg" +case $optarg in + # Valid mode arguments: + clean|compile|execute|finish|install|link|relink|uninstall) ;; + + # Catch anything else as an error + *) func_error "invalid argument for $opt" + exit_cmd=exit + break + ;; +esac + shift + ;; + --no-silent|--no-quiet) opt_silent=false +func_append preserve_args " $opt" ;; - - --tag) test "$#" -eq 0 && func_missing_arg "$opt" && break - preserve_args="$preserve_args $opt $1" - func_enable_tag "$1" # tagname is set here + --no-verbose) + opt_verbose=false +func_append preserve_args " $opt" + ;; + --silent|--quiet) + opt_silent=: +func_append preserve_args " $opt" + opt_verbose=false + ;; + --verbose|-v) + opt_verbose=: +func_append preserve_args " $opt" +opt_silent=false + ;; + --tag) + test $# = 0 && func_missing_arg $opt && break + optarg="$1" + opt_tag="$optarg" +func_append preserve_args " $opt $optarg" +func_enable_tag "$optarg" shift ;; + -\?|-h) func_usage ;; + --help) func_help ;; + --version) func_version ;; + # Separate optargs to long options: - -dlopen=*|--mode=*|--tag=*) - func_opt_split "$opt" - set dummy "$func_opt_split_opt" "$func_opt_split_arg" ${1+"$@"} + --*=*) + func_split_long_opt "$opt" + set dummy "$func_split_long_opt_name" "$func_split_long_opt_arg" ${1+"$@"} shift ;; - -\?|-h) func_usage ;; - --help) opt_help=: ;; - --version) func_version ;; - - -*) func_fatal_help "unrecognized option \`$opt'" ;; - - *) nonopt="$opt" - break + # Separate non-argument short options: + -\?*|-h*|-n*|-v*) + func_split_short_opt "$opt" + set dummy "$func_split_short_opt_name" "-$func_split_short_opt_arg" ${1+"$@"} + shift ;; + + --) break ;; + -*) func_fatal_help "unrecognized option \`$opt'" ;; + *) set dummy "$opt" ${1+"$@"}; shift; break ;; esac done + # Validate options: + + # save first non-option argument + if test "$#" -gt 0; then + nonopt="$opt" + shift + fi + + # preserve --debug + test "$opt_debug" = : || func_append preserve_args " --debug" case $host in *cygwin* | *mingw* | *pw32* | *cegcc*) @@ -810,82 +1184,44 @@ opt_duplicate_compiler_generated_deps=: ;; *) - opt_duplicate_compiler_generated_deps=$opt_duplicate_deps + opt_duplicate_compiler_generated_deps=$opt_preserve_dup_deps ;; esac - # Having warned about all mis-specified options, bail out if - # anything was wrong. - $exit_cmd $EXIT_FAILURE -} + $opt_help || { + # Sanity checks first: + func_check_version_match -# func_check_version_match -# Ensure that we are using m4 macros, and libtool script from the same -# release of libtool. -func_check_version_match () -{ - if test "$package_revision" != "$macro_revision"; then - if test "$VERSION" != "$macro_version"; then - if test -z "$macro_version"; then - cat >&2 <<_LT_EOF -$progname: Version mismatch error. This is $PACKAGE $VERSION, but the -$progname: definition of this LT_INIT comes from an older release. -$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION -$progname: and run autoconf again. -_LT_EOF - else - cat >&2 <<_LT_EOF -$progname: Version mismatch error. This is $PACKAGE $VERSION, but the -$progname: definition of this LT_INIT comes from $PACKAGE $macro_version. -$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION -$progname: and run autoconf again. -_LT_EOF - fi - else - cat >&2 <<_LT_EOF -$progname: Version mismatch error. This is $PACKAGE $VERSION, revision $package_revision, -$progname: but the definition of this LT_INIT comes from revision $macro_revision. -$progname: You should recreate aclocal.m4 with macros from revision $package_revision -$progname: of $PACKAGE $VERSION and run autoconf again. -_LT_EOF + if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then + func_fatal_configuration "not configured to build any kind of library" fi - exit $EXIT_MISMATCH - fi -} - + # Darwin sucks + eval std_shrext=\"$shrext_cmds\" -## ----------- ## -## Main. ## -## ----------- ## - -$opt_help || { - # Sanity checks first: - func_check_version_match - - if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then - func_fatal_configuration "not configured to build any kind of library" - fi + # Only execute mode is allowed to have -dlopen flags. + if test -n "$opt_dlopen" && test "$opt_mode" != execute; then + func_error "unrecognized option \`-dlopen'" + $ECHO "$help" 1>&2 + exit $EXIT_FAILURE + fi - test -z "$mode" && func_fatal_error "error: you must specify a MODE." + # Change the help message to a mode-specific one. + generic_help="$help" + help="Try \`$progname --help --mode=$opt_mode' for more information." + } - # Darwin sucks - eval std_shrext=\"$shrext_cmds\" + # Bail if the options were screwed + $exit_cmd $EXIT_FAILURE +} - # Only execute mode is allowed to have -dlopen flags. - if test -n "$execute_dlfiles" && test "$mode" != execute; then - func_error "unrecognized option \`-dlopen'" - $ECHO "$help" 1>&2 - exit $EXIT_FAILURE - fi - # Change the help message to a mode-specific one. - generic_help="$help" - help="Try \`$progname --help --mode=$mode' for more information." -} +## ----------- ## +## Main. ## +## ----------- ## # func_lalib_p file # True iff FILE is a libtool `.la' library or `.lo' object file. @@ -950,12 +1286,9 @@ # temporary ltwrapper_script. func_ltwrapper_scriptname () { - func_ltwrapper_scriptname_result="" - if func_ltwrapper_executable_p "$1"; then - func_dirname_and_basename "$1" "" "." - func_stripname '' '.exe' "$func_basename_result" - func_ltwrapper_scriptname_result="$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper" - fi + func_dirname_and_basename "$1" "" "." + func_stripname '' '.exe' "$func_basename_result" + func_ltwrapper_scriptname_result="$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper" } # func_ltwrapper_p file @@ -1001,6 +1334,37 @@ } +# func_resolve_sysroot PATH +# Replace a leading = in PATH with a sysroot. Store the result into +# func_resolve_sysroot_result +func_resolve_sysroot () +{ + func_resolve_sysroot_result=$1 + case $func_resolve_sysroot_result in + =*) + func_stripname '=' '' "$func_resolve_sysroot_result" + func_resolve_sysroot_result=$lt_sysroot$func_stripname_result + ;; + esac +} + +# func_replace_sysroot PATH +# If PATH begins with the sysroot, replace it with = and +# store the result into func_replace_sysroot_result. +func_replace_sysroot () +{ + case "$lt_sysroot:$1" in + ?*:"$lt_sysroot"*) + func_stripname "$lt_sysroot" '' "$1" + func_replace_sysroot_result="=$func_stripname_result" + ;; + *) + # Including no sysroot. + func_replace_sysroot_result=$1 + ;; + esac +} + # func_infer_tag arg # Infer tagged configuration to use if any are available and # if one wasn't chosen via the "--tag" command line option. @@ -1013,13 +1377,15 @@ if test -n "$available_tags" && test -z "$tagname"; then CC_quoted= for arg in $CC; do - func_quote_for_eval "$arg" - CC_quoted="$CC_quoted $func_quote_for_eval_result" + func_append_quoted CC_quoted "$arg" done + CC_expanded=`func_echo_all $CC` + CC_quoted_expanded=`func_echo_all $CC_quoted` case $@ in # Blanks in the command may have been stripped by the calling shell, # but not from the CC environment variable when configure was run. - " $CC "* | "$CC "* | " `$ECHO $CC` "* | "`$ECHO $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$ECHO $CC_quoted` "* | "`$ECHO $CC_quoted` "*) ;; + " $CC "* | "$CC "* | " $CC_expanded "* | "$CC_expanded "* | \ + " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*) ;; # Blanks at the start of $base_compile will cause this to fail # if we don't check for them as well. *) @@ -1030,11 +1396,13 @@ CC_quoted= for arg in $CC; do # Double-quote args containing other shell metacharacters. - func_quote_for_eval "$arg" - CC_quoted="$CC_quoted $func_quote_for_eval_result" + func_append_quoted CC_quoted "$arg" done + CC_expanded=`func_echo_all $CC` + CC_quoted_expanded=`func_echo_all $CC_quoted` case "$@ " in - " $CC "* | "$CC "* | " `$ECHO $CC` "* | "`$ECHO $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$ECHO $CC_quoted` "* | "`$ECHO $CC_quoted` "*) + " $CC "* | "$CC "* | " $CC_expanded "* | "$CC_expanded "* | \ + " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*) # The compiler in the base compile command matches # the one in the tagged configuration. # Assume this is the tagged configuration we want. @@ -1097,6 +1465,486 @@ } } + +################################################## +# FILE NAME AND PATH CONVERSION HELPER FUNCTIONS # +################################################## + +# func_convert_core_file_wine_to_w32 ARG +# Helper function used by file name conversion functions when $build is *nix, +# and $host is mingw, cygwin, or some other w32 environment. Relies on a +# correctly configured wine environment available, with the winepath program +# in $build's $PATH. +# +# ARG is the $build file name to be converted to w32 format. +# Result is available in $func_convert_core_file_wine_to_w32_result, and will +# be empty on error (or when ARG is empty) +func_convert_core_file_wine_to_w32 () +{ + $opt_debug + func_convert_core_file_wine_to_w32_result="$1" + if test -n "$1"; then + # Unfortunately, winepath does not exit with a non-zero error code, so we + # are forced to check the contents of stdout. On the other hand, if the + # command is not found, the shell will set an exit code of 127 and print + # *an error message* to stdout. So we must check for both error code of + # zero AND non-empty stdout, which explains the odd construction: + func_convert_core_file_wine_to_w32_tmp=`winepath -w "$1" 2>/dev/null` + if test "$?" -eq 0 && test -n "${func_convert_core_file_wine_to_w32_tmp}"; then + func_convert_core_file_wine_to_w32_result=`$ECHO "$func_convert_core_file_wine_to_w32_tmp" | + $SED -e "$lt_sed_naive_backslashify"` + else + func_convert_core_file_wine_to_w32_result= + fi + fi +} +# end: func_convert_core_file_wine_to_w32 + + +# func_convert_core_path_wine_to_w32 ARG +# Helper function used by path conversion functions when $build is *nix, and +# $host is mingw, cygwin, or some other w32 environment. Relies on a correctly +# configured wine environment available, with the winepath program in $build's +# $PATH. Assumes ARG has no leading or trailing path separator characters. +# +# ARG is path to be converted from $build format to win32. +# Result is available in $func_convert_core_path_wine_to_w32_result. +# Unconvertible file (directory) names in ARG are skipped; if no directory names +# are convertible, then the result may be empty. +func_convert_core_path_wine_to_w32 () +{ + $opt_debug + # unfortunately, winepath doesn't convert paths, only file names + func_convert_core_path_wine_to_w32_result="" + if test -n "$1"; then + oldIFS=$IFS + IFS=: + for func_convert_core_path_wine_to_w32_f in $1; do + IFS=$oldIFS + func_convert_core_file_wine_to_w32 "$func_convert_core_path_wine_to_w32_f" + if test -n "$func_convert_core_file_wine_to_w32_result" ; then + if test -z "$func_convert_core_path_wine_to_w32_result"; then + func_convert_core_path_wine_to_w32_result="$func_convert_core_file_wine_to_w32_result" + else + func_append func_convert_core_path_wine_to_w32_result ";$func_convert_core_file_wine_to_w32_result" + fi + fi + done + IFS=$oldIFS + fi +} +# end: func_convert_core_path_wine_to_w32 + + +# func_cygpath ARGS... +# Wrapper around calling the cygpath program via LT_CYGPATH. This is used when +# when (1) $build is *nix and Cygwin is hosted via a wine environment; or (2) +# $build is MSYS and $host is Cygwin, or (3) $build is Cygwin. In case (1) or +# (2), returns the Cygwin file name or path in func_cygpath_result (input +# file name or path is assumed to be in w32 format, as previously converted +# from $build's *nix or MSYS format). In case (3), returns the w32 file name +# or path in func_cygpath_result (input file name or path is assumed to be in +# Cygwin format). Returns an empty string on error. +# +# ARGS are passed to cygpath, with the last one being the file name or path to +# be converted. +# +# Specify the absolute *nix (or w32) name to cygpath in the LT_CYGPATH +# environment variable; do not put it in $PATH. +func_cygpath () +{ + $opt_debug + if test -n "$LT_CYGPATH" && test -f "$LT_CYGPATH"; then + func_cygpath_result=`$LT_CYGPATH "$@" 2>/dev/null` + if test "$?" -ne 0; then + # on failure, ensure result is empty + func_cygpath_result= + fi + else + func_cygpath_result= + func_error "LT_CYGPATH is empty or specifies non-existent file: \`$LT_CYGPATH'" + fi +} +#end: func_cygpath + + +# func_convert_core_msys_to_w32 ARG +# Convert file name or path ARG from MSYS format to w32 format. Return +# result in func_convert_core_msys_to_w32_result. +func_convert_core_msys_to_w32 () +{ + $opt_debug + # awkward: cmd appends spaces to result + func_convert_core_msys_to_w32_result=`( cmd //c echo "$1" ) 2>/dev/null | + $SED -e 's/[ ]*$//' -e "$lt_sed_naive_backslashify"` +} +#end: func_convert_core_msys_to_w32 + + +# func_convert_file_check ARG1 ARG2 +# Verify that ARG1 (a file name in $build format) was converted to $host +# format in ARG2. Otherwise, emit an error message, but continue (resetting +# func_to_host_file_result to ARG1). +func_convert_file_check () +{ + $opt_debug + if test -z "$2" && test -n "$1" ; then + func_error "Could not determine host file name corresponding to" + func_error " \`$1'" + func_error "Continuing, but uninstalled executables may not work." + # Fallback: + func_to_host_file_result="$1" + fi +} +# end func_convert_file_check + + +# func_convert_path_check FROM_PATHSEP TO_PATHSEP FROM_PATH TO_PATH +# Verify that FROM_PATH (a path in $build format) was converted to $host +# format in TO_PATH. Otherwise, emit an error message, but continue, resetting +# func_to_host_file_result to a simplistic fallback value (see below). +func_convert_path_check () +{ + $opt_debug + if test -z "$4" && test -n "$3"; then + func_error "Could not determine the host path corresponding to" + func_error " \`$3'" + func_error "Continuing, but uninstalled executables may not work." + # Fallback. This is a deliberately simplistic "conversion" and + # should not be "improved". See libtool.info. + if test "x$1" != "x$2"; then + lt_replace_pathsep_chars="s|$1|$2|g" + func_to_host_path_result=`echo "$3" | + $SED -e "$lt_replace_pathsep_chars"` + else + func_to_host_path_result="$3" + fi + fi +} +# end func_convert_path_check + + +# func_convert_path_front_back_pathsep FRONTPAT BACKPAT REPL ORIG +# Modifies func_to_host_path_result by prepending REPL if ORIG matches FRONTPAT +# and appending REPL if ORIG matches BACKPAT. +func_convert_path_front_back_pathsep () +{ + $opt_debug + case $4 in + $1 ) func_to_host_path_result="$3$func_to_host_path_result" + ;; + esac + case $4 in + $2 ) func_append func_to_host_path_result "$3" + ;; + esac +} +# end func_convert_path_front_back_pathsep + + +################################################## +# $build to $host FILE NAME CONVERSION FUNCTIONS # +################################################## +# invoked via `$to_host_file_cmd ARG' +# +# In each case, ARG is the path to be converted from $build to $host format. +# Result will be available in $func_to_host_file_result. + + +# func_to_host_file ARG +# Converts the file name ARG from $build format to $host format. Return result +# in func_to_host_file_result. +func_to_host_file () +{ + $opt_debug + $to_host_file_cmd "$1" +} +# end func_to_host_file + + +# func_to_tool_file ARG LAZY +# converts the file name ARG from $build format to toolchain format. Return +# result in func_to_tool_file_result. If the conversion in use is listed +# in (the comma separated) LAZY, no conversion takes place. +func_to_tool_file () +{ + $opt_debug + case ,$2, in + *,"$to_tool_file_cmd",*) + func_to_tool_file_result=$1 + ;; + *) + $to_tool_file_cmd "$1" + func_to_tool_file_result=$func_to_host_file_result + ;; + esac +} +# end func_to_tool_file + + +# func_convert_file_noop ARG +# Copy ARG to func_to_host_file_result. +func_convert_file_noop () +{ + func_to_host_file_result="$1" +} +# end func_convert_file_noop + + +# func_convert_file_msys_to_w32 ARG +# Convert file name ARG from (mingw) MSYS to (mingw) w32 format; automatic +# conversion to w32 is not available inside the cwrapper. Returns result in +# func_to_host_file_result. +func_convert_file_msys_to_w32 () +{ + $opt_debug + func_to_host_file_result="$1" + if test -n "$1"; then + func_convert_core_msys_to_w32 "$1" + func_to_host_file_result="$func_convert_core_msys_to_w32_result" + fi + func_convert_file_check "$1" "$func_to_host_file_result" +} +# end func_convert_file_msys_to_w32 + + +# func_convert_file_cygwin_to_w32 ARG +# Convert file name ARG from Cygwin to w32 format. Returns result in +# func_to_host_file_result. +func_convert_file_cygwin_to_w32 () +{ + $opt_debug + func_to_host_file_result="$1" + if test -n "$1"; then + # because $build is cygwin, we call "the" cygpath in $PATH; no need to use + # LT_CYGPATH in this case. + func_to_host_file_result=`cygpath -m "$1"` + fi + func_convert_file_check "$1" "$func_to_host_file_result" +} +# end func_convert_file_cygwin_to_w32 + + +# func_convert_file_nix_to_w32 ARG +# Convert file name ARG from *nix to w32 format. Requires a wine environment +# and a working winepath. Returns result in func_to_host_file_result. +func_convert_file_nix_to_w32 () +{ + $opt_debug + func_to_host_file_result="$1" + if test -n "$1"; then + func_convert_core_file_wine_to_w32 "$1" + func_to_host_file_result="$func_convert_core_file_wine_to_w32_result" + fi + func_convert_file_check "$1" "$func_to_host_file_result" +} +# end func_convert_file_nix_to_w32 + + +# func_convert_file_msys_to_cygwin ARG +# Convert file name ARG from MSYS to Cygwin format. Requires LT_CYGPATH set. +# Returns result in func_to_host_file_result. +func_convert_file_msys_to_cygwin () +{ + $opt_debug + func_to_host_file_result="$1" + if test -n "$1"; then + func_convert_core_msys_to_w32 "$1" + func_cygpath -u "$func_convert_core_msys_to_w32_result" + func_to_host_file_result="$func_cygpath_result" + fi + func_convert_file_check "$1" "$func_to_host_file_result" +} +# end func_convert_file_msys_to_cygwin + + +# func_convert_file_nix_to_cygwin ARG +# Convert file name ARG from *nix to Cygwin format. Requires Cygwin installed +# in a wine environment, working winepath, and LT_CYGPATH set. Returns result +# in func_to_host_file_result. +func_convert_file_nix_to_cygwin () +{ + $opt_debug + func_to_host_file_result="$1" + if test -n "$1"; then + # convert from *nix to w32, then use cygpath to convert from w32 to cygwin. + func_convert_core_file_wine_to_w32 "$1" + func_cygpath -u "$func_convert_core_file_wine_to_w32_result" + func_to_host_file_result="$func_cygpath_result" + fi + func_convert_file_check "$1" "$func_to_host_file_result" +} +# end func_convert_file_nix_to_cygwin + + +############################################# +# $build to $host PATH CONVERSION FUNCTIONS # +############################################# +# invoked via `$to_host_path_cmd ARG' +# +# In each case, ARG is the path to be converted from $build to $host format. +# The result will be available in $func_to_host_path_result. +# +# Path separators are also converted from $build format to $host format. If +# ARG begins or ends with a path separator character, it is preserved (but +# converted to $host format) on output. +# +# All path conversion functions are named using the following convention: +# file name conversion function : func_convert_file_X_to_Y () +# path conversion function : func_convert_path_X_to_Y () +# where, for any given $build/$host combination the 'X_to_Y' value is the +# same. If conversion functions are added for new $build/$host combinations, +# the two new functions must follow this pattern, or func_init_to_host_path_cmd +# will break. + + +# func_init_to_host_path_cmd +# Ensures that function "pointer" variable $to_host_path_cmd is set to the +# appropriate value, based on the value of $to_host_file_cmd. +to_host_path_cmd= +func_init_to_host_path_cmd () +{ + $opt_debug + if test -z "$to_host_path_cmd"; then + func_stripname 'func_convert_file_' '' "$to_host_file_cmd" + to_host_path_cmd="func_convert_path_${func_stripname_result}" + fi +} + + +# func_to_host_path ARG +# Converts the path ARG from $build format to $host format. Return result +# in func_to_host_path_result. +func_to_host_path () +{ + $opt_debug + func_init_to_host_path_cmd + $to_host_path_cmd "$1" +} +# end func_to_host_path + + +# func_convert_path_noop ARG +# Copy ARG to func_to_host_path_result. +func_convert_path_noop () +{ + func_to_host_path_result="$1" +} +# end func_convert_path_noop + + +# func_convert_path_msys_to_w32 ARG +# Convert path ARG from (mingw) MSYS to (mingw) w32 format; automatic +# conversion to w32 is not available inside the cwrapper. Returns result in +# func_to_host_path_result. +func_convert_path_msys_to_w32 () +{ + $opt_debug + func_to_host_path_result="$1" + if test -n "$1"; then + # Remove leading and trailing path separator characters from ARG. MSYS + # behavior is inconsistent here; cygpath turns them into '.;' and ';.'; + # and winepath ignores them completely. + func_stripname : : "$1" + func_to_host_path_tmp1=$func_stripname_result + func_convert_core_msys_to_w32 "$func_to_host_path_tmp1" + func_to_host_path_result="$func_convert_core_msys_to_w32_result" + func_convert_path_check : ";" \ + "$func_to_host_path_tmp1" "$func_to_host_path_result" + func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" + fi +} +# end func_convert_path_msys_to_w32 + + +# func_convert_path_cygwin_to_w32 ARG +# Convert path ARG from Cygwin to w32 format. Returns result in +# func_to_host_file_result. +func_convert_path_cygwin_to_w32 () +{ + $opt_debug + func_to_host_path_result="$1" + if test -n "$1"; then + # See func_convert_path_msys_to_w32: + func_stripname : : "$1" + func_to_host_path_tmp1=$func_stripname_result + func_to_host_path_result=`cygpath -m -p "$func_to_host_path_tmp1"` + func_convert_path_check : ";" \ + "$func_to_host_path_tmp1" "$func_to_host_path_result" + func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" + fi +} +# end func_convert_path_cygwin_to_w32 + + +# func_convert_path_nix_to_w32 ARG +# Convert path ARG from *nix to w32 format. Requires a wine environment and +# a working winepath. Returns result in func_to_host_file_result. +func_convert_path_nix_to_w32 () +{ + $opt_debug + func_to_host_path_result="$1" + if test -n "$1"; then + # See func_convert_path_msys_to_w32: + func_stripname : : "$1" + func_to_host_path_tmp1=$func_stripname_result + func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1" + func_to_host_path_result="$func_convert_core_path_wine_to_w32_result" + func_convert_path_check : ";" \ + "$func_to_host_path_tmp1" "$func_to_host_path_result" + func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" + fi +} +# end func_convert_path_nix_to_w32 + + +# func_convert_path_msys_to_cygwin ARG +# Convert path ARG from MSYS to Cygwin format. Requires LT_CYGPATH set. +# Returns result in func_to_host_file_result. +func_convert_path_msys_to_cygwin () +{ + $opt_debug + func_to_host_path_result="$1" + if test -n "$1"; then + # See func_convert_path_msys_to_w32: + func_stripname : : "$1" + func_to_host_path_tmp1=$func_stripname_result + func_convert_core_msys_to_w32 "$func_to_host_path_tmp1" + func_cygpath -u -p "$func_convert_core_msys_to_w32_result" + func_to_host_path_result="$func_cygpath_result" + func_convert_path_check : : \ + "$func_to_host_path_tmp1" "$func_to_host_path_result" + func_convert_path_front_back_pathsep ":*" "*:" : "$1" + fi +} +# end func_convert_path_msys_to_cygwin + + +# func_convert_path_nix_to_cygwin ARG +# Convert path ARG from *nix to Cygwin format. Requires Cygwin installed in a +# a wine environment, working winepath, and LT_CYGPATH set. Returns result in +# func_to_host_file_result. +func_convert_path_nix_to_cygwin () +{ + $opt_debug + func_to_host_path_result="$1" + if test -n "$1"; then + # Remove leading and trailing path separator characters from + # ARG. msys behavior is inconsistent here, cygpath turns them + # into '.;' and ';.', and winepath ignores them completely. + func_stripname : : "$1" + func_to_host_path_tmp1=$func_stripname_result + func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1" + func_cygpath -u -p "$func_convert_core_path_wine_to_w32_result" + func_to_host_path_result="$func_cygpath_result" + func_convert_path_check : : \ + "$func_to_host_path_tmp1" "$func_to_host_path_result" + func_convert_path_front_back_pathsep ":*" "*:" : "$1" + fi +} +# end func_convert_path_nix_to_cygwin + + # func_mode_compile arg... func_mode_compile () { @@ -1137,12 +1985,12 @@ ;; -pie | -fpie | -fPIE) - pie_flag="$pie_flag $arg" + func_append pie_flag " $arg" continue ;; -shared | -static | -prefer-pic | -prefer-non-pic) - later="$later $arg" + func_append later " $arg" continue ;; @@ -1163,15 +2011,14 @@ save_ifs="$IFS"; IFS=',' for arg in $args; do IFS="$save_ifs" - func_quote_for_eval "$arg" - lastarg="$lastarg $func_quote_for_eval_result" + func_append_quoted lastarg "$arg" done IFS="$save_ifs" func_stripname ' ' '' "$lastarg" lastarg=$func_stripname_result # Add the arguments to base_compile. - base_compile="$base_compile $lastarg" + func_append base_compile " $lastarg" continue ;; @@ -1187,8 +2034,7 @@ esac # case $arg_mode # Aesthetically quote the previous argument. - func_quote_for_eval "$lastarg" - base_compile="$base_compile $func_quote_for_eval_result" + func_append_quoted base_compile "$lastarg" done # for arg case $arg_mode in @@ -1213,7 +2059,7 @@ *.[cCFSifmso] | \ *.ada | *.adb | *.ads | *.asm | \ *.c++ | *.cc | *.ii | *.class | *.cpp | *.cxx | \ - *.[fF][09]? | *.for | *.java | *.obj | *.sx) + *.[fF][09]? | *.for | *.java | *.obj | *.sx | *.cu | *.cup) func_xform "$libobj" libobj=$func_xform_result ;; @@ -1288,7 +2134,7 @@ # Calculate the filename of the output object if compiler does # not support -o with -c if test "$compiler_c_o" = no; then - output_obj=`$ECHO "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\.[^.]*$%%'`.${objext} + output_obj=`$ECHO "$srcfile" | $SED 's%^.*/%%; s%\.[^.]*$%%'`.${objext} lockfile="$output_obj.lock" else output_obj= @@ -1319,17 +2165,16 @@ $opt_dry_run || $RM $removelist exit $EXIT_FAILURE fi - removelist="$removelist $output_obj" + func_append removelist " $output_obj" $ECHO "$srcfile" > "$lockfile" fi $opt_dry_run || $RM $removelist - removelist="$removelist $lockfile" + func_append removelist " $lockfile" trap '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' 1 2 15 - if test -n "$fix_srcfile_path"; then - eval srcfile=\"$fix_srcfile_path\" - fi + func_to_tool_file "$srcfile" func_convert_file_msys_to_w32 + srcfile=$func_to_tool_file_result func_quote_for_eval "$srcfile" qsrcfile=$func_quote_for_eval_result @@ -1349,7 +2194,7 @@ if test -z "$output_obj"; then # Place PIC objects in $objdir - command="$command -o $lobj" + func_append command " -o $lobj" fi func_show_eval_locale "$command" \ @@ -1396,11 +2241,11 @@ command="$base_compile $qsrcfile $pic_flag" fi if test "$compiler_c_o" = yes; then - command="$command -o $obj" + func_append command " -o $obj" fi # Suppress compiler output if we already did a PIC compilation. - command="$command$suppress_output" + func_append command "$suppress_output" func_show_eval_locale "$command" \ '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' @@ -1445,13 +2290,13 @@ } $opt_help || { -test "$mode" = compile && func_mode_compile ${1+"$@"} + test "$opt_mode" = compile && func_mode_compile ${1+"$@"} } func_mode_help () { # We need to display help for each of the modes. - case $mode in + case $opt_mode in "") # Generic help is extracted from the usage comments # at the start of this file. @@ -1482,10 +2327,11 @@ -o OUTPUT-FILE set the output file name to OUTPUT-FILE -no-suppress do not suppress compiler output for multiple passes - -prefer-pic try to building PIC objects only - -prefer-non-pic try to building non-PIC objects only + -prefer-pic try to build PIC objects only + -prefer-non-pic try to build non-PIC objects only -shared do not build a \`.o' file suitable for static linking -static only build a \`.o' file suitable for static linking + -Wc,FLAG pass FLAG directly to the compiler COMPILE-COMMAND is a command to be used in creating a \`standard' object file from the given SOURCEFILE. @@ -1538,7 +2384,7 @@ The following components of INSTALL-COMMAND are treated specially: - -inst-prefix PREFIX-DIR Use PREFIX-DIR as a staging area for installation + -inst-prefix-dir PREFIX-DIR Use PREFIX-DIR as a staging area for installation The rest of the components are interpreted as arguments to that command (only BSD-compatible install options are recognized)." @@ -1558,6 +2404,8 @@ -all-static do not do any dynamic linking at all -avoid-version do not add a version suffix if possible + -bindir BINDIR specify path to binaries directory (for systems where + libraries must be found in the PATH setting at runtime) -dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3) @@ -1586,6 +2434,11 @@ -version-info CURRENT[:REVISION[:AGE]] specify library version info [each variable defaults to 0] -weak LIBNAME declare that the target provides the LIBNAME interface + -Wc,FLAG + -Xcompiler FLAG pass linker-specific FLAG directly to the compiler + -Wl,FLAG + -Xlinker FLAG pass linker-specific FLAG directly to the linker + -XCClinker FLAG pass link-specific FLAG to the compiler driver (CC) All other options (arguments beginning with \`-') are ignored. @@ -1619,18 +2472,44 @@ ;; *) - func_fatal_help "invalid operation mode \`$mode'" + func_fatal_help "invalid operation mode \`$opt_mode'" ;; esac - $ECHO + echo $ECHO "Try \`$progname --help' for more information about other modes." - - exit $? } - # Now that we've collected a possible --mode arg, show help if necessary - $opt_help && func_mode_help +# Now that we've collected a possible --mode arg, show help if necessary +if $opt_help; then + if test "$opt_help" = :; then + func_mode_help + else + { + func_help noexit + for opt_mode in compile link execute install finish uninstall clean; do + func_mode_help + done + } | sed -n '1p; 2,$s/^Usage:/ or: /p' + { + func_help noexit + for opt_mode in compile link execute install finish uninstall clean; do + echo + func_mode_help + done + } | + sed '1d + /^When reporting/,/^Report/{ + H + d + } + $x + /information about other modes/d + /more detailed .*MODE/d + s/^Usage:.*--mode=\([^ ]*\) .*/Description of \1 mode:/' + fi + exit $? +fi # func_mode_execute arg... @@ -1643,13 +2522,16 @@ func_fatal_help "you must specify a COMMAND" # Handle -dlopen flags immediately. - for file in $execute_dlfiles; do + for file in $opt_dlopen; do test -f "$file" \ || func_fatal_help "\`$file' is not a file" dir= case $file in *.la) + func_resolve_sysroot "$file" + file=$func_resolve_sysroot_result + # Check to see that this really is a libtool archive. func_lalib_unsafe_p "$file" \ || func_fatal_help "\`$lib' is not a valid libtool archive" @@ -1671,7 +2553,7 @@ dir="$func_dirname_result" if test -f "$dir/$objdir/$dlname"; then - dir="$dir/$objdir" + func_append dir "/$objdir" else if test ! -f "$dir/$dlname"; then func_fatal_error "cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" @@ -1712,7 +2594,7 @@ for file do case $file in - -*) ;; + -* | *.la | *.lo ) ;; *) # Do a test to see if this is really a libtool program. if func_ltwrapper_script_p "$file"; then @@ -1728,8 +2610,7 @@ ;; esac # Quote arguments (to preserve shell metacharacters). - func_quote_for_eval "$file" - args="$args $func_quote_for_eval_result" + func_append_quoted args "$file" done if test "X$opt_dry_run" = Xfalse; then @@ -1754,29 +2635,66 @@ # Display what would be done. if test -n "$shlibpath_var"; then eval "\$ECHO \"\$shlibpath_var=\$$shlibpath_var\"" - $ECHO "export $shlibpath_var" + echo "export $shlibpath_var" fi $ECHO "$cmd$args" exit $EXIT_SUCCESS fi } -test "$mode" = execute && func_mode_execute ${1+"$@"} +test "$opt_mode" = execute && func_mode_execute ${1+"$@"} + + +# func_mode_finish arg... +func_mode_finish () +{ + $opt_debug + libs= + libdirs= + admincmds= + + for opt in "$nonopt" ${1+"$@"} + do + if test -d "$opt"; then + func_append libdirs " $opt" + + elif test -f "$opt"; then + if func_lalib_unsafe_p "$opt"; then + func_append libs " $opt" + else + func_warning "\`$opt' is not a valid libtool archive" + fi + + else + func_fatal_error "invalid argument \`$opt'" + fi + done + if test -n "$libs"; then + if test -n "$lt_sysroot"; then + sysroot_regex=`$ECHO "$lt_sysroot" | $SED "$sed_make_literal_regex"` + sysroot_cmd="s/\([ ']\)$sysroot_regex/\1/g;" + else + sysroot_cmd= + fi -# func_mode_finish arg... -func_mode_finish () -{ - $opt_debug - libdirs="$nonopt" - admincmds= + # Remove sysroot references + if $opt_dry_run; then + for lib in $libs; do + echo "removing references to $lt_sysroot and \`=' prefixes from $lib" + done + else + tmpdir=`func_mktempdir` + for lib in $libs; do + sed -e "${sysroot_cmd} s/\([ ']-[LR]\)=/\1/g; s/\([ ']\)=/\1/g" $lib \ + > $tmpdir/tmp-la + mv -f $tmpdir/tmp-la $lib + done + ${RM}r "$tmpdir" + fi + fi if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then - for dir - do - libdirs="$libdirs $dir" - done - for libdir in $libdirs; do if test -n "$finish_cmds"; then # Do each command in the finish commands. @@ -1786,7 +2704,7 @@ if test -n "$finish_eval"; then # Do the single finish_eval. eval cmds=\"$finish_eval\" - $opt_dry_run || eval "$cmds" || admincmds="$admincmds + $opt_dry_run || eval "$cmds" || func_append admincmds " $cmds" fi done @@ -1795,53 +2713,55 @@ # Exit here if they wanted silent mode. $opt_silent && exit $EXIT_SUCCESS - $ECHO "X----------------------------------------------------------------------" | $Xsed - $ECHO "Libraries have been installed in:" - for libdir in $libdirs; do - $ECHO " $libdir" - done - $ECHO - $ECHO "If you ever happen to want to link against installed libraries" - $ECHO "in a given directory, LIBDIR, you must either use libtool, and" - $ECHO "specify the full pathname of the library, or use the \`-LLIBDIR'" - $ECHO "flag during linking and do at least one of the following:" - if test -n "$shlibpath_var"; then - $ECHO " - add LIBDIR to the \`$shlibpath_var' environment variable" - $ECHO " during execution" - fi - if test -n "$runpath_var"; then - $ECHO " - add LIBDIR to the \`$runpath_var' environment variable" - $ECHO " during linking" - fi - if test -n "$hardcode_libdir_flag_spec"; then - libdir=LIBDIR - eval flag=\"$hardcode_libdir_flag_spec\" + if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then + echo "----------------------------------------------------------------------" + echo "Libraries have been installed in:" + for libdir in $libdirs; do + $ECHO " $libdir" + done + echo + echo "If you ever happen to want to link against installed libraries" + echo "in a given directory, LIBDIR, you must either use libtool, and" + echo "specify the full pathname of the library, or use the \`-LLIBDIR'" + echo "flag during linking and do at least one of the following:" + if test -n "$shlibpath_var"; then + echo " - add LIBDIR to the \`$shlibpath_var' environment variable" + echo " during execution" + fi + if test -n "$runpath_var"; then + echo " - add LIBDIR to the \`$runpath_var' environment variable" + echo " during linking" + fi + if test -n "$hardcode_libdir_flag_spec"; then + libdir=LIBDIR + eval flag=\"$hardcode_libdir_flag_spec\" - $ECHO " - use the \`$flag' linker flag" - fi - if test -n "$admincmds"; then - $ECHO " - have your system administrator run these commands:$admincmds" - fi - if test -f /etc/ld.so.conf; then - $ECHO " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'" - fi - $ECHO + $ECHO " - use the \`$flag' linker flag" + fi + if test -n "$admincmds"; then + $ECHO " - have your system administrator run these commands:$admincmds" + fi + if test -f /etc/ld.so.conf; then + echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'" + fi + echo - $ECHO "See any operating system documentation about shared libraries for" - case $host in - solaris2.[6789]|solaris2.1[0-9]) - $ECHO "more information, such as the ld(1), crle(1) and ld.so(8) manual" - $ECHO "pages." - ;; - *) - $ECHO "more information, such as the ld(1) and ld.so(8) manual pages." - ;; - esac - $ECHO "X----------------------------------------------------------------------" | $Xsed + echo "See any operating system documentation about shared libraries for" + case $host in + solaris2.[6789]|solaris2.1[0-9]) + echo "more information, such as the ld(1), crle(1) and ld.so(8) manual" + echo "pages." + ;; + *) + echo "more information, such as the ld(1) and ld.so(8) manual pages." + ;; + esac + echo "----------------------------------------------------------------------" + fi exit $EXIT_SUCCESS } -test "$mode" = finish && func_mode_finish ${1+"$@"} +test "$opt_mode" = finish && func_mode_finish ${1+"$@"} # func_mode_install arg... @@ -1852,7 +2772,7 @@ # install_prog (especially on Windows NT). if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh || # Allow the use of GNU shtool's install command. - $ECHO "X$nonopt" | $GREP shtool >/dev/null; then + case $nonopt in *shtool*) :;; *) false;; esac; then # Aesthetically quote it. func_quote_for_eval "$nonopt" install_prog="$func_quote_for_eval_result " @@ -1866,7 +2786,12 @@ # The real first argument should be the name of the installation program. # Aesthetically quote it. func_quote_for_eval "$arg" - install_prog="$install_prog$func_quote_for_eval_result" + func_append install_prog "$func_quote_for_eval_result" + install_shared_prog=$install_prog + case " $install_prog " in + *[\\\ /]cp\ *) install_cp=: ;; + *) install_cp=false ;; + esac # We need to accept at least all the BSD install flags. dest= @@ -1876,10 +2801,12 @@ install_type= isdir=no stripme= + no_mode=: for arg do + arg2= if test -n "$dest"; then - files="$files $dest" + func_append files " $dest" dest=$arg continue fi @@ -1887,10 +2814,9 @@ case $arg in -d) isdir=yes ;; -f) - case " $install_prog " in - *[\\\ /]cp\ *) ;; - *) prev=$arg ;; - esac + if $install_cp; then :; else + prev=$arg + fi ;; -g | -m | -o) prev=$arg @@ -1904,6 +2830,10 @@ *) # If the previous option needed an argument, then skip it. if test -n "$prev"; then + if test "x$prev" = x-m && test -n "$install_override_mode"; then + arg2=$install_override_mode + no_mode=false + fi prev= else dest=$arg @@ -1914,7 +2844,11 @@ # Aesthetically quote the argument. func_quote_for_eval "$arg" - install_prog="$install_prog $func_quote_for_eval_result" + func_append install_prog " $func_quote_for_eval_result" + if test -n "$arg2"; then + func_quote_for_eval "$arg2" + fi + func_append install_shared_prog " $func_quote_for_eval_result" done test -z "$install_prog" && \ @@ -1923,6 +2857,13 @@ test -n "$prev" && \ func_fatal_help "the \`$prev' option requires an argument" + if test -n "$install_override_mode" && $no_mode; then + if $install_cp; then :; else + func_quote_for_eval "$install_override_mode" + func_append install_shared_prog " -m $func_quote_for_eval_result" + fi + fi + if test -z "$files"; then if test -z "$dest"; then func_fatal_help "no file or destination specified" @@ -1977,10 +2918,13 @@ case $file in *.$libext) # Do the static libraries later. - staticlibs="$staticlibs $file" + func_append staticlibs " $file" ;; *.la) + func_resolve_sysroot "$file" + file=$func_resolve_sysroot_result + # Check to see that this really is a libtool archive. func_lalib_unsafe_p "$file" \ || func_fatal_help "\`$file' is not a valid libtool archive" @@ -1994,23 +2938,23 @@ if test "X$destdir" = "X$libdir"; then case "$current_libdirs " in *" $libdir "*) ;; - *) current_libdirs="$current_libdirs $libdir" ;; + *) func_append current_libdirs " $libdir" ;; esac else # Note the libdir as a future libdir. case "$future_libdirs " in *" $libdir "*) ;; - *) future_libdirs="$future_libdirs $libdir" ;; + *) func_append future_libdirs " $libdir" ;; esac fi func_dirname "$file" "/" "" dir="$func_dirname_result" - dir="$dir$objdir" + func_append dir "$objdir" if test -n "$relink_command"; then # Determine the prefix the user has applied to our future dir. - inst_prefix_dir=`$ECHO "X$destdir" | $Xsed -e "s%$libdir\$%%"` + inst_prefix_dir=`$ECHO "$destdir" | $SED -e "s%$libdir\$%%"` # Don't allow the user to place us outside of our expected # location b/c this prevents finding dependent libraries that @@ -2023,9 +2967,9 @@ if test -n "$inst_prefix_dir"; then # Stick the inst_prefix_dir data into the link command. - relink_command=`$ECHO "X$relink_command" | $Xsed -e "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"` + relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"` else - relink_command=`$ECHO "X$relink_command" | $Xsed -e "s%@inst_prefix_dir@%%"` + relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%%"` fi func_warning "relinking \`$file'" @@ -2043,7 +2987,7 @@ test -n "$relink_command" && srcname="$realname"T # Install the shared library and build the symlinks. - func_show_eval "$install_prog $dir/$srcname $destdir/$realname" \ + func_show_eval "$install_shared_prog $dir/$srcname $destdir/$realname" \ 'exit $?' tstripme="$stripme" case $host_os in @@ -2083,7 +3027,7 @@ func_show_eval "$install_prog $instname $destdir/$name" 'exit $?' # Maybe install the static library, too. - test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library" + test -n "$old_library" && func_append staticlibs " $dir/$old_library" ;; *.lo) @@ -2183,7 +3127,7 @@ if test -f "$lib"; then func_source "$lib" fi - libfile="$libdir/"`$ECHO "X$lib" | $Xsed -e 's%^.*/%%g'` ### testsuite: skip nested quoting test + libfile="$libdir/"`$ECHO "$lib" | $SED 's%^.*/%%g'` ### testsuite: skip nested quoting test if test -n "$libdir" && test ! -f "$libfile"; then func_warning "\`$lib' has not been installed in \`$libdir'" finalize=no @@ -2202,7 +3146,7 @@ file="$func_basename_result" outputname="$tmpdir/$file" # Replace the output file specification. - relink_command=`$ECHO "X$relink_command" | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g'` + relink_command=`$ECHO "$relink_command" | $SED 's%@OUTPUT@%'"$outputname"'%g'` $opt_silent || { func_quote_for_expand "$relink_command" @@ -2221,7 +3165,7 @@ } else # Install the binary that we compiled earlier. - file=`$ECHO "X$file$stripped_ext" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"` + file=`$ECHO "$file$stripped_ext" | $SED "s%\([^/]*\)$%$objdir/\1%"` fi fi @@ -2280,7 +3224,7 @@ fi } -test "$mode" = install && func_mode_install ${1+"$@"} +test "$opt_mode" = install && func_mode_install ${1+"$@"} # func_generate_dlsyms outputname originator pic_p @@ -2323,6 +3267,22 @@ extern \"C\" { #endif +#if defined(__GNUC__) && (((__GNUC__ == 4) && (__GNUC_MINOR__ >= 4)) || (__GNUC__ > 4)) +#pragma GCC diagnostic ignored \"-Wstrict-prototypes\" +#endif + +/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ +#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) +/* DATA imports from DLLs on WIN32 con't be const, because runtime + relocations are performed -- see ld's documentation on pseudo-relocs. */ +# define LT_DLSYM_CONST +#elif defined(__osf__) +/* This system does not cope well with relocations in const data. */ +# define LT_DLSYM_CONST +#else +# define LT_DLSYM_CONST const +#endif + /* External symbol declarations for the compiler. */\ " @@ -2332,10 +3292,11 @@ $opt_dry_run || echo ': @PROGRAM@ ' > "$nlist" # Add our own program objects to the symbol list. - progfiles=`$ECHO "X$objs$old_deplibs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` + progfiles=`$ECHO "$objs$old_deplibs" | $SP2NL | $SED "$lo2o" | $NL2SP` for progfile in $progfiles; do - func_verbose "extracting global C symbols from \`$progfile'" - $opt_dry_run || eval "$NM $progfile | $global_symbol_pipe >> '$nlist'" + func_to_tool_file "$progfile" func_convert_file_msys_to_w32 + func_verbose "extracting global C symbols from \`$func_to_tool_file_result'" + $opt_dry_run || eval "$NM $func_to_tool_file_result | $global_symbol_pipe >> '$nlist'" done if test -n "$exclude_expsyms"; then @@ -2371,7 +3332,7 @@ eval '$GREP -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T' eval '$MV "$nlist"T "$nlist"' case $host in - *cygwin | *mingw* | *cegcc* ) + *cygwin* | *mingw* | *cegcc* ) eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' eval 'cat "$nlist" >> "$output_objdir/$outputname.def"' ;; @@ -2384,10 +3345,52 @@ func_verbose "extracting global C symbols from \`$dlprefile'" func_basename "$dlprefile" name="$func_basename_result" - $opt_dry_run || { - eval '$ECHO ": $name " >> "$nlist"' - eval "$NM $dlprefile 2>/dev/null | $global_symbol_pipe >> '$nlist'" - } + case $host in + *cygwin* | *mingw* | *cegcc* ) + # if an import library, we need to obtain dlname + if func_win32_import_lib_p "$dlprefile"; then + func_tr_sh "$dlprefile" + eval "curr_lafile=\$libfile_$func_tr_sh_result" + dlprefile_dlbasename="" + if test -n "$curr_lafile" && func_lalib_p "$curr_lafile"; then + # Use subshell, to avoid clobbering current variable values + dlprefile_dlname=`source "$curr_lafile" && echo "$dlname"` + if test -n "$dlprefile_dlname" ; then + func_basename "$dlprefile_dlname" + dlprefile_dlbasename="$func_basename_result" + else + # no lafile. user explicitly requested -dlpreopen . + $sharedlib_from_linklib_cmd "$dlprefile" + dlprefile_dlbasename=$sharedlib_from_linklib_result + fi + fi + $opt_dry_run || { + if test -n "$dlprefile_dlbasename" ; then + eval '$ECHO ": $dlprefile_dlbasename" >> "$nlist"' + else + func_warning "Could not compute DLL name from $name" + eval '$ECHO ": $name " >> "$nlist"' + fi + func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 + eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe | + $SED -e '/I __imp/d' -e 's/I __nm_/D /;s/_nm__//' >> '$nlist'" + } + else # not an import lib + $opt_dry_run || { + eval '$ECHO ": $name " >> "$nlist"' + func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 + eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'" + } + fi + ;; + *) + $opt_dry_run || { + eval '$ECHO ": $name " >> "$nlist"' + func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 + eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'" + } + ;; + esac done $opt_dry_run || { @@ -2415,36 +3418,19 @@ if test -f "$nlist"S; then eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$my_dlsyms"' else - $ECHO '/* NONE */' >> "$output_objdir/$my_dlsyms" + echo '/* NONE */' >> "$output_objdir/$my_dlsyms" fi - $ECHO >> "$output_objdir/$my_dlsyms" "\ + echo >> "$output_objdir/$my_dlsyms" "\ /* The mapping between symbol names and symbols. */ typedef struct { const char *name; void *address; } lt_dlsymlist; -" - case $host in - *cygwin* | *mingw* | *cegcc* ) - $ECHO >> "$output_objdir/$my_dlsyms" "\ -/* DATA imports from DLLs on WIN32 con't be const, because - runtime relocations are performed -- see ld's documentation - on pseudo-relocs. */" - lt_dlsym_const= ;; - *osf5*) - echo >> "$output_objdir/$my_dlsyms" "\ -/* This system does not cope well with relocations in const data */" - lt_dlsym_const= ;; - *) - lt_dlsym_const=const ;; - esac - - $ECHO >> "$output_objdir/$my_dlsyms" "\ -extern $lt_dlsym_const lt_dlsymlist +extern LT_DLSYM_CONST lt_dlsymlist lt_${my_prefix}_LTX_preloaded_symbols[]; -$lt_dlsym_const lt_dlsymlist +LT_DLSYM_CONST lt_dlsymlist lt_${my_prefix}_LTX_preloaded_symbols[] = {\ { \"$my_originator\", (void *) 0 }," @@ -2457,7 +3443,7 @@ eval "$global_symbol_to_c_name_address_lib_prefix" < "$nlist" >> "$output_objdir/$my_dlsyms" ;; esac - $ECHO >> "$output_objdir/$my_dlsyms" "\ + echo >> "$output_objdir/$my_dlsyms" "\ {0, (void *) 0} }; @@ -2500,7 +3486,7 @@ for arg in $LTCFLAGS; do case $arg in -pie | -fpie | -fPIE) ;; - *) symtab_cflags="$symtab_cflags $arg" ;; + *) func_append symtab_cflags " $arg" ;; esac done @@ -2515,16 +3501,16 @@ case $host in *cygwin* | *mingw* | *cegcc* ) if test -f "$output_objdir/$my_outputname.def"; then - compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` - finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` + compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` + finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` else - compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"` - finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"` + compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"` + finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"` fi ;; *) - compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"` - finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"` + compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"` + finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"` ;; esac ;; @@ -2538,8 +3524,8 @@ # really was required. # Nullify the symbol file. - compile_command=`$ECHO "X$compile_command" | $Xsed -e "s% @SYMFILE@%%"` - finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"` + compile_command=`$ECHO "$compile_command" | $SED "s% @SYMFILE@%%"` + finalize_command=`$ECHO "$finalize_command" | $SED "s% @SYMFILE@%%"` fi } @@ -2549,6 +3535,7 @@ # Need a lot of goo to handle *both* DLLs and import libs # Has to be a shell function in order to 'eat' the argument # that is supplied when $file_magic_command is called. +# Despite the name, also deal with 64 bit binaries. func_win32_libid () { $opt_debug @@ -2559,9 +3546,11 @@ win32_libid_type="x86 archive import" ;; *ar\ archive*) # could be an import, or static + # Keep the egrep pattern in sync with the one in _LT_CHECK_MAGIC_METHOD. if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | - $EGREP 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then - win32_nmres=`eval $NM -f posix -A $1 | + $EGREP 'file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' >/dev/null; then + func_to_tool_file "$1" func_convert_file_msys_to_w32 + win32_nmres=`eval $NM -f posix -A \"$func_to_tool_file_result\" | $SED -n -e ' 1,100{ / I /{ @@ -2590,6 +3579,131 @@ $ECHO "$win32_libid_type" } +# func_cygming_dll_for_implib ARG +# +# Platform-specific function to extract the +# name of the DLL associated with the specified +# import library ARG. +# Invoked by eval'ing the libtool variable +# $sharedlib_from_linklib_cmd +# Result is available in the variable +# $sharedlib_from_linklib_result +func_cygming_dll_for_implib () +{ + $opt_debug + sharedlib_from_linklib_result=`$DLLTOOL --identify-strict --identify "$1"` +} + +# func_cygming_dll_for_implib_fallback_core SECTION_NAME LIBNAMEs +# +# The is the core of a fallback implementation of a +# platform-specific function to extract the name of the +# DLL associated with the specified import library LIBNAME. +# +# SECTION_NAME is either .idata$6 or .idata$7, depending +# on the platform and compiler that created the implib. +# +# Echos the name of the DLL associated with the +# specified import library. +func_cygming_dll_for_implib_fallback_core () +{ + $opt_debug + match_literal=`$ECHO "$1" | $SED "$sed_make_literal_regex"` + $OBJDUMP -s --section "$1" "$2" 2>/dev/null | + $SED '/^Contents of section '"$match_literal"':/{ + # Place marker at beginning of archive member dllname section + s/.*/====MARK====/ + p + d + } + # These lines can sometimes be longer than 43 characters, but + # are always uninteresting + /:[ ]*file format pe[i]\{,1\}-/d + /^In archive [^:]*:/d + # Ensure marker is printed + /^====MARK====/p + # Remove all lines with less than 43 characters + /^.\{43\}/!d + # From remaining lines, remove first 43 characters + s/^.\{43\}//' | + $SED -n ' + # Join marker and all lines until next marker into a single line + /^====MARK====/ b para + H + $ b para + b + :para + x + s/\n//g + # Remove the marker + s/^====MARK====// + # Remove trailing dots and whitespace + s/[\. \t]*$// + # Print + /./p' | + # we now have a list, one entry per line, of the stringified + # contents of the appropriate section of all members of the + # archive which possess that section. Heuristic: eliminate + # all those which have a first or second character that is + # a '.' (that is, objdump's representation of an unprintable + # character.) This should work for all archives with less than + # 0x302f exports -- but will fail for DLLs whose name actually + # begins with a literal '.' or a single character followed by + # a '.'. + # + # Of those that remain, print the first one. + $SED -e '/^\./d;/^.\./d;q' +} + +# func_cygming_gnu_implib_p ARG +# This predicate returns with zero status (TRUE) if +# ARG is a GNU/binutils-style import library. Returns +# with nonzero status (FALSE) otherwise. +func_cygming_gnu_implib_p () +{ + $opt_debug + func_to_tool_file "$1" func_convert_file_msys_to_w32 + func_cygming_gnu_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $EGREP ' (_head_[A-Za-z0-9_]+_[ad]l*|[A-Za-z0-9_]+_[ad]l*_iname)$'` + test -n "$func_cygming_gnu_implib_tmp" +} + +# func_cygming_ms_implib_p ARG +# This predicate returns with zero status (TRUE) if +# ARG is an MS-style import library. Returns +# with nonzero status (FALSE) otherwise. +func_cygming_ms_implib_p () +{ + $opt_debug + func_to_tool_file "$1" func_convert_file_msys_to_w32 + func_cygming_ms_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $GREP '_NULL_IMPORT_DESCRIPTOR'` + test -n "$func_cygming_ms_implib_tmp" +} + +# func_cygming_dll_for_implib_fallback ARG +# Platform-specific function to extract the +# name of the DLL associated with the specified +# import library ARG. +# +# This fallback implementation is for use when $DLLTOOL +# does not support the --identify-strict option. +# Invoked by eval'ing the libtool variable +# $sharedlib_from_linklib_cmd +# Result is available in the variable +# $sharedlib_from_linklib_result +func_cygming_dll_for_implib_fallback () +{ + $opt_debug + if func_cygming_gnu_implib_p "$1" ; then + # binutils import library + sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$7' "$1"` + elif func_cygming_ms_implib_p "$1" ; then + # ms-generated import library + sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$6' "$1"` + else + # unknown + sharedlib_from_linklib_result="" + fi +} # func_extract_an_archive dir oldlib @@ -2598,7 +3712,18 @@ $opt_debug f_ex_an_ar_dir="$1"; shift f_ex_an_ar_oldlib="$1" - func_show_eval "(cd \$f_ex_an_ar_dir && $AR x \"\$f_ex_an_ar_oldlib\")" 'exit $?' + if test "$lock_old_archive_extraction" = yes; then + lockfile=$f_ex_an_ar_oldlib.lock + until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do + func_echo "Waiting for $lockfile to be removed" + sleep 2 + done + fi + func_show_eval "(cd \$f_ex_an_ar_dir && $AR x \"\$f_ex_an_ar_oldlib\")" \ + 'stat=$?; rm -f "$lockfile"; exit $stat' + if test "$lock_old_archive_extraction" = yes; then + $opt_dry_run || rm -f "$lockfile" + fi if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then : else @@ -2669,7 +3794,7 @@ darwin_file= darwin_files= for darwin_file in $darwin_filelist; do - darwin_files=`find unfat-$$ -name $darwin_file -print | $NL2SP` + darwin_files=`find unfat-$$ -name $darwin_file -print | sort | $NL2SP` $LIPO -create -output "$darwin_file" $darwin_files done # $darwin_filelist $RM -rf unfat-$$ @@ -2684,25 +3809,30 @@ func_extract_an_archive "$my_xdir" "$my_xabs" ;; esac - my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP` + my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | sort | $NL2SP` done func_extract_archives_result="$my_oldobjs" } - -# func_emit_wrapper_part1 [arg=no] +# func_emit_wrapper [arg=no] # -# Emit the first part of a libtool wrapper script on stdout. -# For more information, see the description associated with -# func_emit_wrapper(), below. -func_emit_wrapper_part1 () -{ - func_emit_wrapper_part1_arg1=no - if test -n "$1" ; then - func_emit_wrapper_part1_arg1=$1 - fi +# Emit a libtool wrapper script on stdout. +# Don't directly open a file because we may want to +# incorporate the script contents within a cygwin/mingw +# wrapper executable. Must ONLY be called from within +# func_mode_link because it depends on a number of variables +# set therein. +# +# ARG is the value that the WRAPPER_SCRIPT_BELONGS_IN_OBJDIR +# variable will take. If 'yes', then the emitted script +# will assume that the directory in which it is stored is +# the $objdir directory. This is a cygwin/mingw-specific +# behavior. +func_emit_wrapper () +{ + func_emit_wrapper_arg1=${1-no} $ECHO "\ #! $SHELL @@ -2718,7 +3848,6 @@ # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. -Xsed='${SED} -e 1s/^X//' sed_quote_subst='$sed_quote_subst' # Be Bourne compatible @@ -2749,31 +3878,132 @@ else # When we are sourced in execute mode, \$file and \$ECHO are already set. if test \"\$libtool_execute_magic\" != \"$magic\"; then - ECHO=\"$qecho\" - file=\"\$0\" - # Make sure echo works. - if test \"X\$1\" = X--no-reexec; then - # Discard the --no-reexec flag, and continue. - shift - elif test \"X\`{ \$ECHO '\t'; } 2>/dev/null\`\" = 'X\t'; then - # Yippee, \$ECHO works! - : - else - # Restart under the correct shell, and then maybe \$ECHO will work. - exec $SHELL \"\$0\" --no-reexec \${1+\"\$@\"} - fi - fi\ + file=\"\$0\"" + + qECHO=`$ECHO "$ECHO" | $SED "$sed_quote_subst"` + $ECHO "\ + +# A function that is used when there is no print builtin or printf. +func_fallback_echo () +{ + eval 'cat <<_LTECHO_EOF +\$1 +_LTECHO_EOF' +} + ECHO=\"$qECHO\" + fi + +# Very basic option parsing. These options are (a) specific to +# the libtool wrapper, (b) are identical between the wrapper +# /script/ and the wrapper /executable/ which is used only on +# windows platforms, and (c) all begin with the string "--lt-" +# (application programs are unlikely to have options which match +# this pattern). +# +# There are only two supported options: --lt-debug and +# --lt-dump-script. There is, deliberately, no --lt-help. +# +# The first argument to this parsing function should be the +# script's $0 value, followed by "$@". +lt_option_debug= +func_parse_lt_options () +{ + lt_script_arg0=\$0 + shift + for lt_opt + do + case \"\$lt_opt\" in + --lt-debug) lt_option_debug=1 ;; + --lt-dump-script) + lt_dump_D=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%/[^/]*$%%'\` + test \"X\$lt_dump_D\" = \"X\$lt_script_arg0\" && lt_dump_D=. + lt_dump_F=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%^.*/%%'\` + cat \"\$lt_dump_D/\$lt_dump_F\" + exit 0 + ;; + --lt-*) + \$ECHO \"Unrecognized --lt- option: '\$lt_opt'\" 1>&2 + exit 1 + ;; + esac + done + + # Print the debug banner immediately: + if test -n \"\$lt_option_debug\"; then + echo \"${outputname}:${output}:\${LINENO}: libtool wrapper (GNU $PACKAGE$TIMESTAMP) $VERSION\" 1>&2 + fi +} + +# Used when --lt-debug. Prints its arguments to stdout +# (redirection is the responsibility of the caller) +func_lt_dump_args () +{ + lt_dump_args_N=1; + for lt_arg + do + \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[\$lt_dump_args_N]: \$lt_arg\" + lt_dump_args_N=\`expr \$lt_dump_args_N + 1\` + done +} + +# Core function for launching the target application +func_exec_program_core () +{ " - $ECHO "\ + case $host in + # Backslashes separate directories on plain windows + *-*-mingw | *-*-os2* | *-cegcc*) + $ECHO "\ + if test -n \"\$lt_option_debug\"; then + \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[0]: \$progdir\\\\\$program\" 1>&2 + func_lt_dump_args \${1+\"\$@\"} 1>&2 + fi + exec \"\$progdir\\\\\$program\" \${1+\"\$@\"} +" + ;; + + *) + $ECHO "\ + if test -n \"\$lt_option_debug\"; then + \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[0]: \$progdir/\$program\" 1>&2 + func_lt_dump_args \${1+\"\$@\"} 1>&2 + fi + exec \"\$progdir/\$program\" \${1+\"\$@\"} +" + ;; + esac + $ECHO "\ + \$ECHO \"\$0: cannot exec \$program \$*\" 1>&2 + exit 1 +} + +# A function to encapsulate launching the target application +# Strips options in the --lt-* namespace from \$@ and +# launches target application with the remaining arguments. +func_exec_program () +{ + for lt_wr_arg + do + case \$lt_wr_arg in + --lt-*) ;; + *) set x \"\$@\" \"\$lt_wr_arg\"; shift;; + esac + shift + done + func_exec_program_core \${1+\"\$@\"} +} + + # Parse options + func_parse_lt_options \"\$0\" \${1+\"\$@\"} # Find the directory that this script lives in. - thisdir=\`\$ECHO \"X\$file\" | \$Xsed -e 's%/[^/]*$%%'\` + thisdir=\`\$ECHO \"\$file\" | $SED 's%/[^/]*$%%'\` test \"x\$thisdir\" = \"x\$file\" && thisdir=. # Follow symbolic links until we get to the real thisdir. - file=\`ls -ld \"\$file\" | ${SED} -n 's/.*-> //p'\` + file=\`ls -ld \"\$file\" | $SED -n 's/.*-> //p'\` while test -n \"\$file\"; do - destdir=\`\$ECHO \"X\$file\" | \$Xsed -e 's%/[^/]*\$%%'\` + destdir=\`\$ECHO \"\$file\" | $SED 's%/[^/]*\$%%'\` # If there was a directory component, then change thisdir. if test \"x\$destdir\" != \"x\$file\"; then @@ -2783,30 +4013,13 @@ esac fi - file=\`\$ECHO \"X\$file\" | \$Xsed -e 's%^.*/%%'\` - file=\`ls -ld \"\$thisdir/\$file\" | ${SED} -n 's/.*-> //p'\` + file=\`\$ECHO \"\$file\" | $SED 's%^.*/%%'\` + file=\`ls -ld \"\$thisdir/\$file\" | $SED -n 's/.*-> //p'\` done -" -} -# end: func_emit_wrapper_part1 - -# func_emit_wrapper_part2 [arg=no] -# -# Emit the second part of a libtool wrapper script on stdout. -# For more information, see the description associated with -# func_emit_wrapper(), below. -func_emit_wrapper_part2 () -{ - func_emit_wrapper_part2_arg1=no - if test -n "$1" ; then - func_emit_wrapper_part2_arg1=$1 - fi - - $ECHO "\ # Usually 'no', except on cygwin/mingw when embedded into # the cwrapper. - WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=$func_emit_wrapper_part2_arg1 + WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=$func_emit_wrapper_arg1 if test \"\$WRAPPER_SCRIPT_BELONGS_IN_OBJDIR\" = \"yes\"; then # special case for '.' if test \"\$thisdir\" = \".\"; then @@ -2814,7 +4027,7 @@ fi # remove .libs from thisdir case \"\$thisdir\" in - *[\\\\/]$objdir ) thisdir=\`\$ECHO \"X\$thisdir\" | \$Xsed -e 's%[\\\\/][^\\\\/]*$%%'\` ;; + *[\\\\/]$objdir ) thisdir=\`\$ECHO \"\$thisdir\" | $SED 's%[\\\\/][^\\\\/]*$%%'\` ;; $objdir ) thisdir=. ;; esac fi @@ -2869,6 +4082,18 @@ if test -f \"\$progdir/\$program\"; then" + # fixup the dll searchpath if we need to. + # + # Fix the DLL searchpath if we need to. Do this before prepending + # to shlibpath, because on Windows, both are PATH and uninstalled + # libraries must come first. + if test -n "$dllsearchpath"; then + $ECHO "\ + # Add the dll search path components to the executable PATH + PATH=$dllsearchpath:\$PATH +" + fi + # Export our shlibpath_var if we have one. if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then $ECHO "\ @@ -2877,253 +4102,28 @@ # Some systems cannot cope with colon-terminated $shlibpath_var # The second colon is a workaround for a bug in BeOS R4 sed - $shlibpath_var=\`\$ECHO \"X\$$shlibpath_var\" | \$Xsed -e 's/::*\$//'\` + $shlibpath_var=\`\$ECHO \"\$$shlibpath_var\" | $SED 's/::*\$//'\` export $shlibpath_var " fi - # fixup the dll searchpath if we need to. - if test -n "$dllsearchpath"; then - $ECHO "\ - # Add the dll search path components to the executable PATH - PATH=$dllsearchpath:\$PATH -" - fi - $ECHO "\ if test \"\$libtool_execute_magic\" != \"$magic\"; then # Run the actual program with our arguments. -" - case $host in - # Backslashes separate directories on plain windows - *-*-mingw | *-*-os2* | *-cegcc*) - $ECHO "\ - exec \"\$progdir\\\\\$program\" \${1+\"\$@\"} -" - ;; - - *) - $ECHO "\ - exec \"\$progdir/\$program\" \${1+\"\$@\"} -" - ;; - esac - $ECHO "\ - \$ECHO \"\$0: cannot exec \$program \$*\" 1>&2 - exit 1 + func_exec_program \${1+\"\$@\"} fi else # The program doesn't exist. \$ECHO \"\$0: error: \\\`\$progdir/\$program' does not exist\" 1>&2 \$ECHO \"This script is just a wrapper for \$program.\" 1>&2 - $ECHO \"See the $PACKAGE documentation for more information.\" 1>&2 - exit 1 - fi -fi\ -" -} -# end: func_emit_wrapper_part2 - - -# func_emit_wrapper [arg=no] -# -# Emit a libtool wrapper script on stdout. -# Don't directly open a file because we may want to -# incorporate the script contents within a cygwin/mingw -# wrapper executable. Must ONLY be called from within -# func_mode_link because it depends on a number of variables -# set therein. -# -# ARG is the value that the WRAPPER_SCRIPT_BELONGS_IN_OBJDIR -# variable will take. If 'yes', then the emitted script -# will assume that the directory in which it is stored is -# the $objdir directory. This is a cygwin/mingw-specific -# behavior. -func_emit_wrapper () -{ - func_emit_wrapper_arg1=no - if test -n "$1" ; then - func_emit_wrapper_arg1=$1 - fi - - # split this up so that func_emit_cwrapperexe_src - # can call each part independently. - func_emit_wrapper_part1 "${func_emit_wrapper_arg1}" - func_emit_wrapper_part2 "${func_emit_wrapper_arg1}" -} - - -# func_to_host_path arg -# -# Convert paths to host format when used with build tools. -# Intended for use with "native" mingw (where libtool itself -# is running under the msys shell), or in the following cross- -# build environments: -# $build $host -# mingw (msys) mingw [e.g. native] -# cygwin mingw -# *nix + wine mingw -# where wine is equipped with the `winepath' executable. -# In the native mingw case, the (msys) shell automatically -# converts paths for any non-msys applications it launches, -# but that facility isn't available from inside the cwrapper. -# Similar accommodations are necessary for $host mingw and -# $build cygwin. Calling this function does no harm for other -# $host/$build combinations not listed above. -# -# ARG is the path (on $build) that should be converted to -# the proper representation for $host. The result is stored -# in $func_to_host_path_result. -func_to_host_path () -{ - func_to_host_path_result="$1" - if test -n "$1" ; then - case $host in - *mingw* ) - lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g' - case $build in - *mingw* ) # actually, msys - # awkward: cmd appends spaces to result - lt_sed_strip_trailing_spaces="s/[ ]*\$//" - func_to_host_path_tmp1=`( cmd //c echo "$1" |\ - $SED -e "$lt_sed_strip_trailing_spaces" ) 2>/dev/null || echo ""` - func_to_host_path_result=`echo "$func_to_host_path_tmp1" |\ - $SED -e "$lt_sed_naive_backslashify"` - ;; - *cygwin* ) - func_to_host_path_tmp1=`cygpath -w "$1"` - func_to_host_path_result=`echo "$func_to_host_path_tmp1" |\ - $SED -e "$lt_sed_naive_backslashify"` - ;; - * ) - # Unfortunately, winepath does not exit with a non-zero - # error code, so we are forced to check the contents of - # stdout. On the other hand, if the command is not - # found, the shell will set an exit code of 127 and print - # *an error message* to stdout. So we must check for both - # error code of zero AND non-empty stdout, which explains - # the odd construction: - func_to_host_path_tmp1=`winepath -w "$1" 2>/dev/null` - if test "$?" -eq 0 && test -n "${func_to_host_path_tmp1}"; then - func_to_host_path_result=`echo "$func_to_host_path_tmp1" |\ - $SED -e "$lt_sed_naive_backslashify"` - else - # Allow warning below. - func_to_host_path_result="" - fi - ;; - esac - if test -z "$func_to_host_path_result" ; then - func_error "Could not determine host path corresponding to" - func_error " '$1'" - func_error "Continuing, but uninstalled executables may not work." - # Fallback: - func_to_host_path_result="$1" - fi - ;; - esac - fi -} -# end: func_to_host_path - -# func_to_host_pathlist arg -# -# Convert pathlists to host format when used with build tools. -# See func_to_host_path(), above. This function supports the -# following $build/$host combinations (but does no harm for -# combinations not listed here): -# $build $host -# mingw (msys) mingw [e.g. native] -# cygwin mingw -# *nix + wine mingw -# -# Path separators are also converted from $build format to -# $host format. If ARG begins or ends with a path separator -# character, it is preserved (but converted to $host format) -# on output. -# -# ARG is a pathlist (on $build) that should be converted to -# the proper representation on $host. The result is stored -# in $func_to_host_pathlist_result. -func_to_host_pathlist () -{ - func_to_host_pathlist_result="$1" - if test -n "$1" ; then - case $host in - *mingw* ) - lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g' - # Remove leading and trailing path separator characters from - # ARG. msys behavior is inconsistent here, cygpath turns them - # into '.;' and ';.', and winepath ignores them completely. - func_to_host_pathlist_tmp2="$1" - # Once set for this call, this variable should not be - # reassigned. It is used in tha fallback case. - func_to_host_pathlist_tmp1=`echo "$func_to_host_pathlist_tmp2" |\ - $SED -e 's|^:*||' -e 's|:*$||'` - case $build in - *mingw* ) # Actually, msys. - # Awkward: cmd appends spaces to result. - lt_sed_strip_trailing_spaces="s/[ ]*\$//" - func_to_host_pathlist_tmp2=`( cmd //c echo "$func_to_host_pathlist_tmp1" |\ - $SED -e "$lt_sed_strip_trailing_spaces" ) 2>/dev/null || echo ""` - func_to_host_pathlist_result=`echo "$func_to_host_pathlist_tmp2" |\ - $SED -e "$lt_sed_naive_backslashify"` - ;; - *cygwin* ) - func_to_host_pathlist_tmp2=`cygpath -w -p "$func_to_host_pathlist_tmp1"` - func_to_host_pathlist_result=`echo "$func_to_host_pathlist_tmp2" |\ - $SED -e "$lt_sed_naive_backslashify"` - ;; - * ) - # unfortunately, winepath doesn't convert pathlists - func_to_host_pathlist_result="" - func_to_host_pathlist_oldIFS=$IFS - IFS=: - for func_to_host_pathlist_f in $func_to_host_pathlist_tmp1 ; do - IFS=$func_to_host_pathlist_oldIFS - if test -n "$func_to_host_pathlist_f" ; then - func_to_host_path "$func_to_host_pathlist_f" - if test -n "$func_to_host_path_result" ; then - if test -z "$func_to_host_pathlist_result" ; then - func_to_host_pathlist_result="$func_to_host_path_result" - else - func_to_host_pathlist_result="$func_to_host_pathlist_result;$func_to_host_path_result" - fi - fi - fi - IFS=: - done - IFS=$func_to_host_pathlist_oldIFS - ;; - esac - if test -z "$func_to_host_pathlist_result" ; then - func_error "Could not determine the host path(s) corresponding to" - func_error " '$1'" - func_error "Continuing, but uninstalled executables may not work." - # Fallback. This may break if $1 contains DOS-style drive - # specifications. The fix is not to complicate the expression - # below, but for the user to provide a working wine installation - # with winepath so that path translation in the cross-to-mingw - # case works properly. - lt_replace_pathsep_nix_to_dos="s|:|;|g" - func_to_host_pathlist_result=`echo "$func_to_host_pathlist_tmp1" |\ - $SED -e "$lt_replace_pathsep_nix_to_dos"` - fi - # Now, add the leading and trailing path separators back - case "$1" in - :* ) func_to_host_pathlist_result=";$func_to_host_pathlist_result" - ;; - esac - case "$1" in - *: ) func_to_host_pathlist_result="$func_to_host_pathlist_result;" - ;; - esac - ;; - esac + \$ECHO \"See the $PACKAGE documentation for more information.\" 1>&2 + exit 1 fi +fi\ +" } -# end: func_to_host_pathlist + # func_emit_cwrapperexe_src # emit the source code for a wrapper executable on stdout @@ -3141,31 +4141,23 @@ This wrapper executable should never be moved out of the build directory. If it is, it will not operate correctly. - - Currently, it simply execs the wrapper *script* "$SHELL $output", - but could eventually absorb all of the scripts functionality and - exec $objdir/$outputname directly. */ EOF cat <<"EOF" +#ifdef _MSC_VER +# define _CRT_SECURE_NO_DEPRECATE 1 +#endif #include #include #ifdef _MSC_VER # include # include # include -# define setmode _setmode #else # include # include # ifdef __CYGWIN__ # include -# define HAVE_SETENV -# ifdef __STRICT_ANSI__ -char *realpath (const char *, char *); -int putenv (char *); -int setenv (const char *, const char *, int); -# endif # endif #endif #include @@ -3177,6 +4169,44 @@ #include #include +/* declarations of non-ANSI functions */ +#if defined(__MINGW32__) +# ifdef __STRICT_ANSI__ +int _putenv (const char *); +# endif +#elif defined(__CYGWIN__) +# ifdef __STRICT_ANSI__ +char *realpath (const char *, char *); +int putenv (char *); +int setenv (const char *, const char *, int); +# endif +/* #elif defined (other platforms) ... */ +#endif + +/* portability defines, excluding path handling macros */ +#if defined(_MSC_VER) +# define setmode _setmode +# define stat _stat +# define chmod _chmod +# define getcwd _getcwd +# define putenv _putenv +# define S_IXUSR _S_IEXEC +# ifndef _INTPTR_T_DEFINED +# define _INTPTR_T_DEFINED +# define intptr_t int +# endif +#elif defined(__MINGW32__) +# define setmode _setmode +# define stat _stat +# define chmod _chmod +# define getcwd _getcwd +# define putenv _putenv +#elif defined(__CYGWIN__) +# define HAVE_SETENV +# define FOPEN_WB "wb" +/* #elif defined (other platforms) ... */ +#endif + #if defined(PATH_MAX) # define LT_PATHMAX PATH_MAX #elif defined(MAXPATHLEN) @@ -3192,14 +4222,7 @@ # define S_IXGRP 0 #endif -#ifdef _MSC_VER -# define S_IXUSR _S_IEXEC -# define stat _stat -# ifndef _INTPTR_T_DEFINED -# define intptr_t int -# endif -#endif - +/* path handling portability macros */ #ifndef DIR_SEPARATOR # define DIR_SEPARATOR '/' # define PATH_SEPARATOR ':' @@ -3230,10 +4253,6 @@ # define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2) #endif /* PATH_SEPARATOR_2 */ -#ifdef __CYGWIN__ -# define FOPEN_WB "wb" -#endif - #ifndef FOPEN_WB # define FOPEN_WB "w" #endif @@ -3246,22 +4265,13 @@ if (stale) { free ((void *) stale); stale = 0; } \ } while (0) -#undef LTWRAPPER_DEBUGPRINTF -#if defined DEBUGWRAPPER -# define LTWRAPPER_DEBUGPRINTF(args) ltwrapper_debugprintf args -static void -ltwrapper_debugprintf (const char *fmt, ...) -{ - va_list args; - va_start (args, fmt); - (void) vfprintf (stderr, fmt, args); - va_end (args); -} +#if defined(LT_DEBUGWRAPPER) +static int lt_debug = 1; #else -# define LTWRAPPER_DEBUGPRINTF(args) +static int lt_debug = 0; #endif -const char *program_name = NULL; +const char *program_name = "libtool-wrapper"; /* in case xstrdup fails */ void *xmalloc (size_t num); char *xstrdup (const char *string); @@ -3271,41 +4281,27 @@ int make_executable (const char *path); int check_executable (const char *path); char *strendzap (char *str, const char *pat); -void lt_fatal (const char *message, ...); +void lt_debugprintf (const char *file, int line, const char *fmt, ...); +void lt_fatal (const char *file, int line, const char *message, ...); +static const char *nonnull (const char *s); +static const char *nonempty (const char *s); void lt_setenv (const char *name, const char *value); char *lt_extend_str (const char *orig_value, const char *add, int to_end); -void lt_opt_process_env_set (const char *arg); -void lt_opt_process_env_prepend (const char *arg); -void lt_opt_process_env_append (const char *arg); -int lt_split_name_value (const char *arg, char** name, char** value); void lt_update_exe_path (const char *name, const char *value); void lt_update_lib_path (const char *name, const char *value); - -static const char *script_text_part1 = -EOF - - func_emit_wrapper_part1 yes | - $SED -e 's/\([\\"]\)/\\\1/g' \ - -e 's/^/ "/' -e 's/$/\\n"/' - echo ";" - cat <"))); + lt_debugprintf (__FILE__, __LINE__, "(main) lt_argv_zero: %s\n", + nonnull (lt_argv_zero)); for (i = 0; i < newargc; i++) { - LTWRAPPER_DEBUGPRINTF (("(main) newargz[%d] : %s\n", i, (newargz[i] ? newargz[i] : ""))); + lt_debugprintf (__FILE__, __LINE__, "(main) newargz[%d]: %s\n", + i, nonnull (newargz[i])); } EOF @@ -3560,11 +4517,14 @@ mingw*) cat <<"EOF" /* execv doesn't actually work on mingw as expected on unix */ + newargz = prepare_spawn (newargz); rval = _spawnv (_P_WAIT, lt_argv_zero, (const char * const *) newargz); if (rval == -1) { /* failed to start process */ - LTWRAPPER_DEBUGPRINTF (("(main) failed to launch target \"%s\": errno = %d\n", lt_argv_zero, errno)); + lt_debugprintf (__FILE__, __LINE__, + "(main) failed to launch target \"%s\": %s\n", + lt_argv_zero, nonnull (strerror (errno))); return 127; } return rval; @@ -3586,7 +4546,7 @@ { void *p = (void *) malloc (num); if (!p) - lt_fatal ("Memory exhausted"); + lt_fatal (__FILE__, __LINE__, "memory exhausted"); return p; } @@ -3620,8 +4580,8 @@ { struct stat st; - LTWRAPPER_DEBUGPRINTF (("(check_executable) : %s\n", - path ? (*path ? path : "EMPTY!") : "NULL!")); + lt_debugprintf (__FILE__, __LINE__, "(check_executable): %s\n", + nonempty (path)); if ((!path) || (!*path)) return 0; @@ -3638,8 +4598,8 @@ int rval = 0; struct stat st; - LTWRAPPER_DEBUGPRINTF (("(make_executable) : %s\n", - path ? (*path ? path : "EMPTY!") : "NULL!")); + lt_debugprintf (__FILE__, __LINE__, "(make_executable): %s\n", + nonempty (path)); if ((!path) || (!*path)) return 0; @@ -3665,8 +4625,8 @@ int tmp_len; char *concat_name; - LTWRAPPER_DEBUGPRINTF (("(find_executable) : %s\n", - wrapper ? (*wrapper ? wrapper : "EMPTY!") : "NULL!")); + lt_debugprintf (__FILE__, __LINE__, "(find_executable): %s\n", + nonempty (wrapper)); if ((wrapper == NULL) || (*wrapper == '\0')) return NULL; @@ -3719,7 +4679,8 @@ { /* empty path: current directory */ if (getcwd (tmp, LT_PATHMAX) == NULL) - lt_fatal ("getcwd failed"); + lt_fatal (__FILE__, __LINE__, "getcwd failed: %s", + nonnull (strerror (errno))); tmp_len = strlen (tmp); concat_name = XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1); @@ -3744,7 +4705,8 @@ } /* Relative path | not found in path: prepend cwd */ if (getcwd (tmp, LT_PATHMAX) == NULL) - lt_fatal ("getcwd failed"); + lt_fatal (__FILE__, __LINE__, "getcwd failed: %s", + nonnull (strerror (errno))); tmp_len = strlen (tmp); concat_name = XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1); memcpy (concat_name, tmp, tmp_len); @@ -3770,8 +4732,9 @@ int has_symlinks = 0; while (strlen (tmp_pathspec) && !has_symlinks) { - LTWRAPPER_DEBUGPRINTF (("checking path component for symlinks: %s\n", - tmp_pathspec)); + lt_debugprintf (__FILE__, __LINE__, + "checking path component for symlinks: %s\n", + tmp_pathspec); if (lstat (tmp_pathspec, &s) == 0) { if (S_ISLNK (s.st_mode) != 0) @@ -3793,8 +4756,9 @@ } else { - char *errstr = strerror (errno); - lt_fatal ("Error accessing file %s (%s)", tmp_pathspec, errstr); + lt_fatal (__FILE__, __LINE__, + "error accessing file \"%s\": %s", + tmp_pathspec, nonnull (strerror (errno))); } } XFREE (tmp_pathspec); @@ -3807,7 +4771,8 @@ tmp_pathspec = realpath (pathspec, buf); if (tmp_pathspec == 0) { - lt_fatal ("Could not follow symlinks for %s", pathspec); + lt_fatal (__FILE__, __LINE__, + "could not follow symlinks for %s", pathspec); } return xstrdup (tmp_pathspec); #endif @@ -3833,11 +4798,25 @@ return str; } +void +lt_debugprintf (const char *file, int line, const char *fmt, ...) +{ + va_list args; + if (lt_debug) + { + (void) fprintf (stderr, "%s:%s:%d: ", program_name, file, line); + va_start (args, fmt); + (void) vfprintf (stderr, fmt, args); + va_end (args); + } +} + static void -lt_error_core (int exit_status, const char *mode, +lt_error_core (int exit_status, const char *file, + int line, const char *mode, const char *message, va_list ap) { - fprintf (stderr, "%s: %s: ", program_name, mode); + fprintf (stderr, "%s:%s:%d: %s: ", program_name, file, line, mode); vfprintf (stderr, message, ap); fprintf (stderr, ".\n"); @@ -3846,20 +4825,32 @@ } void -lt_fatal (const char *message, ...) +lt_fatal (const char *file, int line, const char *message, ...) { va_list ap; va_start (ap, message); - lt_error_core (EXIT_FAILURE, "FATAL", message, ap); + lt_error_core (EXIT_FAILURE, file, line, "FATAL", message, ap); va_end (ap); } +static const char * +nonnull (const char *s) +{ + return s ? s : "(null)"; +} + +static const char * +nonempty (const char *s) +{ + return (s && !*s) ? "(empty)" : nonnull (s); +} + void lt_setenv (const char *name, const char *value) { - LTWRAPPER_DEBUGPRINTF (("(lt_setenv) setting '%s' to '%s'\n", - (name ? name : ""), - (value ? value : ""))); + lt_debugprintf (__FILE__, __LINE__, + "(lt_setenv) setting '%s' to '%s'\n", + nonnull (name), nonnull (value)); { #ifdef HAVE_SETENV /* always make a copy, for consistency with !HAVE_SETENV */ @@ -3904,95 +4895,12 @@ return new_value; } -int -lt_split_name_value (const char *arg, char** name, char** value) -{ - const char *p; - int len; - if (!arg || !*arg) - return 1; - - p = strchr (arg, (int)'='); - - if (!p) - return 1; - - *value = xstrdup (++p); - - len = strlen (arg) - strlen (*value); - *name = XMALLOC (char, len); - strncpy (*name, arg, len-1); - (*name)[len - 1] = '\0'; - - return 0; -} - -void -lt_opt_process_env_set (const char *arg) -{ - char *name = NULL; - char *value = NULL; - - if (lt_split_name_value (arg, &name, &value) != 0) - { - XFREE (name); - XFREE (value); - lt_fatal ("bad argument for %s: '%s'", env_set_opt, arg); - } - - lt_setenv (name, value); - XFREE (name); - XFREE (value); -} - -void -lt_opt_process_env_prepend (const char *arg) -{ - char *name = NULL; - char *value = NULL; - char *new_value = NULL; - - if (lt_split_name_value (arg, &name, &value) != 0) - { - XFREE (name); - XFREE (value); - lt_fatal ("bad argument for %s: '%s'", env_prepend_opt, arg); - } - - new_value = lt_extend_str (getenv (name), value, 0); - lt_setenv (name, new_value); - XFREE (new_value); - XFREE (name); - XFREE (value); -} - -void -lt_opt_process_env_append (const char *arg) -{ - char *name = NULL; - char *value = NULL; - char *new_value = NULL; - - if (lt_split_name_value (arg, &name, &value) != 0) - { - XFREE (name); - XFREE (value); - lt_fatal ("bad argument for %s: '%s'", env_append_opt, arg); - } - - new_value = lt_extend_str (getenv (name), value, 1); - lt_setenv (name, new_value); - XFREE (new_value); - XFREE (name); - XFREE (value); -} - void lt_update_exe_path (const char *name, const char *value) { - LTWRAPPER_DEBUGPRINTF (("(lt_update_exe_path) modifying '%s' by prepending '%s'\n", - (name ? name : ""), - (value ? value : ""))); + lt_debugprintf (__FILE__, __LINE__, + "(lt_update_exe_path) modifying '%s' by prepending '%s'\n", + nonnull (name), nonnull (value)); if (name && *name && value && *value) { @@ -4011,9 +4919,9 @@ void lt_update_lib_path (const char *name, const char *value) { - LTWRAPPER_DEBUGPRINTF (("(lt_update_lib_path) modifying '%s' by prepending '%s'\n", - (name ? name : ""), - (value ? value : ""))); + lt_debugprintf (__FILE__, __LINE__, + "(lt_update_lib_path) modifying '%s' by prepending '%s'\n", + nonnull (name), nonnull (value)); if (name && *name && value && *value) { @@ -4023,11 +4931,152 @@ } } +EOF + case $host_os in + mingw*) + cat <<"EOF" + +/* Prepares an argument vector before calling spawn(). + Note that spawn() does not by itself call the command interpreter + (getenv ("COMSPEC") != NULL ? getenv ("COMSPEC") : + ({ OSVERSIONINFO v; v.dwOSVersionInfoSize = sizeof(OSVERSIONINFO); + GetVersionEx(&v); + v.dwPlatformId == VER_PLATFORM_WIN32_NT; + }) ? "cmd.exe" : "command.com"). + Instead it simply concatenates the arguments, separated by ' ', and calls + CreateProcess(). We must quote the arguments since Win32 CreateProcess() + interprets characters like ' ', '\t', '\\', '"' (but not '<' and '>') in a + special way: + - Space and tab are interpreted as delimiters. They are not treated as + delimiters if they are surrounded by double quotes: "...". + - Unescaped double quotes are removed from the input. Their only effect is + that within double quotes, space and tab are treated like normal + characters. + - Backslashes not followed by double quotes are not special. + - But 2*n+1 backslashes followed by a double quote become + n backslashes followed by a double quote (n >= 0): + \" -> " + \\\" -> \" + \\\\\" -> \\" + */ +#define SHELL_SPECIAL_CHARS "\"\\ \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037" +#define SHELL_SPACE_CHARS " \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037" +char ** +prepare_spawn (char **argv) +{ + size_t argc; + char **new_argv; + size_t i; + + /* Count number of arguments. */ + for (argc = 0; argv[argc] != NULL; argc++) + ; + + /* Allocate new argument vector. */ + new_argv = XMALLOC (char *, argc + 1); + + /* Put quoted arguments into the new argument vector. */ + for (i = 0; i < argc; i++) + { + const char *string = argv[i]; + + if (string[0] == '\0') + new_argv[i] = xstrdup ("\"\""); + else if (strpbrk (string, SHELL_SPECIAL_CHARS) != NULL) + { + int quote_around = (strpbrk (string, SHELL_SPACE_CHARS) != NULL); + size_t length; + unsigned int backslashes; + const char *s; + char *quoted_string; + char *p; + + length = 0; + backslashes = 0; + if (quote_around) + length++; + for (s = string; *s != '\0'; s++) + { + char c = *s; + if (c == '"') + length += backslashes + 1; + length++; + if (c == '\\') + backslashes++; + else + backslashes = 0; + } + if (quote_around) + length += backslashes + 1; + + quoted_string = XMALLOC (char, length + 1); + + p = quoted_string; + backslashes = 0; + if (quote_around) + *p++ = '"'; + for (s = string; *s != '\0'; s++) + { + char c = *s; + if (c == '"') + { + unsigned int j; + for (j = backslashes + 1; j > 0; j--) + *p++ = '\\'; + } + *p++ = c; + if (c == '\\') + backslashes++; + else + backslashes = 0; + } + if (quote_around) + { + unsigned int j; + for (j = backslashes; j > 0; j--) + *p++ = '\\'; + *p++ = '"'; + } + *p = '\0'; + + new_argv[i] = quoted_string; + } + else + new_argv[i] = (char *) string; + } + new_argv[argc] = NULL; + + return new_argv; +} +EOF + ;; + esac + + cat <<"EOF" +void lt_dump_script (FILE* f) +{ +EOF + func_emit_wrapper yes | + $SED -e 's/\([\\"]\)/\\\1/g' \ + -e 's/^/ fputs ("/' -e 's/$/\\n", f);/' + cat <<"EOF" +} EOF } # end: func_emit_cwrapperexe_src +# func_win32_import_lib_p ARG +# True if ARG is an import lib, as indicated by $file_magic_cmd +func_win32_import_lib_p () +{ + $opt_debug + case `eval $file_magic_cmd \"\$1\" 2>/dev/null | $SED -e 10q` in + *import*) : ;; + *) false ;; + esac +} + # func_mode_link arg... func_mode_link () { @@ -4072,6 +5121,7 @@ new_inherited_linker_flags= avoid_version=no + bindir= dlfiles= dlprefiles= dlself=no @@ -4164,6 +5214,11 @@ esac case $prev in + bindir) + bindir="$arg" + prev= + continue + ;; dlfiles|dlprefiles) if test "$preload" = no; then # Add the symbol object into the linking commands. @@ -4195,9 +5250,9 @@ ;; *) if test "$prev" = dlfiles; then - dlfiles="$dlfiles $arg" + func_append dlfiles " $arg" else - dlprefiles="$dlprefiles $arg" + func_append dlprefiles " $arg" fi prev= continue @@ -4221,7 +5276,7 @@ *-*-darwin*) case "$deplibs " in *" $qarg.ltframework "*) ;; - *) deplibs="$deplibs $qarg.ltframework" # this is fixed later + *) func_append deplibs " $qarg.ltframework" # this is fixed later ;; esac ;; @@ -4240,7 +5295,7 @@ moreargs= for fil in `cat "$save_arg"` do -# moreargs="$moreargs $fil" +# func_append moreargs " $fil" arg=$fil # A libtool-controlled object. @@ -4269,7 +5324,7 @@ if test "$prev" = dlfiles; then if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then - dlfiles="$dlfiles $pic_object" + func_append dlfiles " $pic_object" prev= continue else @@ -4281,7 +5336,7 @@ # CHECK ME: I think I busted this. -Ossama if test "$prev" = dlprefiles; then # Preload the old-style object. - dlprefiles="$dlprefiles $pic_object" + func_append dlprefiles " $pic_object" prev= fi @@ -4351,12 +5406,12 @@ if test "$prev" = rpath; then case "$rpath " in *" $arg "*) ;; - *) rpath="$rpath $arg" ;; + *) func_append rpath " $arg" ;; esac else case "$xrpath " in *" $arg "*) ;; - *) xrpath="$xrpath $arg" ;; + *) func_append xrpath " $arg" ;; esac fi prev= @@ -4368,28 +5423,28 @@ continue ;; weak) - weak_libs="$weak_libs $arg" + func_append weak_libs " $arg" prev= continue ;; xcclinker) - linker_flags="$linker_flags $qarg" - compiler_flags="$compiler_flags $qarg" + func_append linker_flags " $qarg" + func_append compiler_flags " $qarg" prev= func_append compile_command " $qarg" func_append finalize_command " $qarg" continue ;; xcompiler) - compiler_flags="$compiler_flags $qarg" + func_append compiler_flags " $qarg" prev= func_append compile_command " $qarg" func_append finalize_command " $qarg" continue ;; xlinker) - linker_flags="$linker_flags $qarg" - compiler_flags="$compiler_flags $wl$qarg" + func_append linker_flags " $qarg" + func_append compiler_flags " $wl$qarg" prev= func_append compile_command " $wl$qarg" func_append finalize_command " $wl$qarg" @@ -4425,6 +5480,11 @@ continue ;; + -bindir) + prev=bindir + continue + ;; + -dlopen) prev=dlfiles continue @@ -4475,15 +5535,16 @@ ;; -L*) - func_stripname '-L' '' "$arg" - dir=$func_stripname_result - if test -z "$dir"; then + func_stripname "-L" '' "$arg" + if test -z "$func_stripname_result"; then if test "$#" -gt 0; then func_fatal_error "require no space between \`-L' and \`$1'" else func_fatal_error "need path for \`-L' option" fi fi + func_resolve_sysroot "$func_stripname_result" + dir=$func_resolve_sysroot_result # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) ;; @@ -4495,24 +5556,30 @@ ;; esac case "$deplibs " in - *" -L$dir "*) ;; + *" -L$dir "* | *" $arg "*) + # Will only happen for absolute or sysroot arguments + ;; *) - deplibs="$deplibs -L$dir" - lib_search_path="$lib_search_path $dir" + # Preserve sysroot, but never include relative directories + case $dir in + [\\/]* | [A-Za-z]:[\\/]* | =*) func_append deplibs " $arg" ;; + *) func_append deplibs " -L$dir" ;; + esac + func_append lib_search_path " $dir" ;; esac case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) - testbindir=`$ECHO "X$dir" | $Xsed -e 's*/lib$*/bin*'` + testbindir=`$ECHO "$dir" | $SED 's*/lib$*/bin*'` case :$dllsearchpath: in *":$dir:"*) ;; ::) dllsearchpath=$dir;; - *) dllsearchpath="$dllsearchpath:$dir";; + *) func_append dllsearchpath ":$dir";; esac case :$dllsearchpath: in *":$testbindir:"*) ;; ::) dllsearchpath=$testbindir;; - *) dllsearchpath="$dllsearchpath:$testbindir";; + *) func_append dllsearchpath ":$testbindir";; esac ;; esac @@ -4522,7 +5589,7 @@ -l*) if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos* | *-cegcc*) + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos* | *-cegcc* | *-*-haiku*) # These systems don't actually have a C or math library (as such) continue ;; @@ -4536,7 +5603,7 @@ ;; *-*-rhapsody* | *-*-darwin1.[012]) # Rhapsody C and math libraries are in the System framework - deplibs="$deplibs System.ltframework" + func_append deplibs " System.ltframework" continue ;; *-*-sco3.2v5* | *-*-sco5v6*) @@ -4556,7 +5623,7 @@ ;; esac fi - deplibs="$deplibs $arg" + func_append deplibs " $arg" continue ;; @@ -4568,8 +5635,8 @@ # Tru64 UNIX uses -model [arg] to determine the layout of C++ # classes, name mangling, and exception handling. # Darwin uses the -arch flag to determine output architecture. - -model|-arch|-isysroot) - compiler_flags="$compiler_flags $arg" + -model|-arch|-isysroot|--sysroot) + func_append compiler_flags " $arg" func_append compile_command " $arg" func_append finalize_command " $arg" prev=xcompiler @@ -4577,12 +5644,12 @@ ;; -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads) - compiler_flags="$compiler_flags $arg" + func_append compiler_flags " $arg" func_append compile_command " $arg" func_append finalize_command " $arg" case "$new_inherited_linker_flags " in *" $arg "*) ;; - * ) new_inherited_linker_flags="$new_inherited_linker_flags $arg" ;; + * ) func_append new_inherited_linker_flags " $arg" ;; esac continue ;; @@ -4649,13 +5716,17 @@ # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) ;; + =*) + func_stripname '=' '' "$dir" + dir=$lt_sysroot$func_stripname_result + ;; *) func_fatal_error "only absolute run-paths are allowed" ;; esac case "$xrpath " in *" $dir "*) ;; - *) xrpath="$xrpath $dir" ;; + *) func_append xrpath " $dir" ;; esac continue ;; @@ -4708,8 +5779,8 @@ for flag in $args; do IFS="$save_ifs" func_quote_for_eval "$flag" - arg="$arg $wl$func_quote_for_eval_result" - compiler_flags="$compiler_flags $func_quote_for_eval_result" + func_append arg " $func_quote_for_eval_result" + func_append compiler_flags " $func_quote_for_eval_result" done IFS="$save_ifs" func_stripname ' ' '' "$arg" @@ -4724,9 +5795,9 @@ for flag in $args; do IFS="$save_ifs" func_quote_for_eval "$flag" - arg="$arg $wl$func_quote_for_eval_result" - compiler_flags="$compiler_flags $wl$func_quote_for_eval_result" - linker_flags="$linker_flags $func_quote_for_eval_result" + func_append arg " $wl$func_quote_for_eval_result" + func_append compiler_flags " $wl$func_quote_for_eval_result" + func_append linker_flags " $func_quote_for_eval_result" done IFS="$save_ifs" func_stripname ' ' '' "$arg" @@ -4754,23 +5825,27 @@ arg="$func_quote_for_eval_result" ;; - # -64, -mips[0-9] enable 64-bit mode on the SGI compiler - # -r[0-9][0-9]* specifies the processor on the SGI compiler - # -xarch=*, -xtarget=* enable 64-bit mode on the Sun compiler - # +DA*, +DD* enable 64-bit mode on the HP compiler - # -q* pass through compiler args for the IBM compiler - # -m*, -t[45]*, -txscale* pass through architecture-specific - # compiler args for GCC - # -F/path gives path to uninstalled frameworks, gcc on darwin - # -p, -pg, --coverage, -fprofile-* pass through profiling flag for GCC - # @file GCC response files + # Flags to be passed through unchanged, with rationale: + # -64, -mips[0-9] enable 64-bit mode for the SGI compiler + # -r[0-9][0-9]* specify processor for the SGI compiler + # -xarch=*, -xtarget=* enable 64-bit mode for the Sun compiler + # +DA*, +DD* enable 64-bit mode for the HP compiler + # -q* compiler args for the IBM compiler + # -m*, -t[45]*, -txscale* architecture-specific flags for GCC + # -F/path path to uninstalled frameworks, gcc on darwin + # -p, -pg, --coverage, -fprofile-* profiling flags for GCC + # @file GCC response files + # -tp=* Portland pgcc target processor selection + # --sysroot=* for sysroot support + # -O*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ - -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*) + -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \ + -O*|-flto*|-fwhopr*|-fuse-linker-plugin) func_quote_for_eval "$arg" arg="$func_quote_for_eval_result" func_append compile_command " $arg" func_append finalize_command " $arg" - compiler_flags="$compiler_flags $arg" + func_append compiler_flags " $arg" continue ;; @@ -4782,7 +5857,7 @@ *.$objext) # A standard object. - objs="$objs $arg" + func_append objs " $arg" ;; *.lo) @@ -4813,7 +5888,7 @@ if test "$prev" = dlfiles; then if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then - dlfiles="$dlfiles $pic_object" + func_append dlfiles " $pic_object" prev= continue else @@ -4825,7 +5900,7 @@ # CHECK ME: I think I busted this. -Ossama if test "$prev" = dlprefiles; then # Preload the old-style object. - dlprefiles="$dlprefiles $pic_object" + func_append dlprefiles " $pic_object" prev= fi @@ -4870,24 +5945,25 @@ *.$libext) # An archive. - deplibs="$deplibs $arg" - old_deplibs="$old_deplibs $arg" + func_append deplibs " $arg" + func_append old_deplibs " $arg" continue ;; *.la) # A libtool-controlled library. + func_resolve_sysroot "$arg" if test "$prev" = dlfiles; then # This library was specified with -dlopen. - dlfiles="$dlfiles $arg" + func_append dlfiles " $func_resolve_sysroot_result" prev= elif test "$prev" = dlprefiles; then # The library was specified with -dlpreopen. - dlprefiles="$dlprefiles $arg" + func_append dlprefiles " $func_resolve_sysroot_result" prev= else - deplibs="$deplibs $arg" + func_append deplibs " $func_resolve_sysroot_result" fi continue ;; @@ -4925,7 +6001,7 @@ if test -n "$shlibpath_var"; then # get the directories listed in $shlibpath_var - eval shlib_search_path=\`\$ECHO \"X\${$shlibpath_var}\" \| \$Xsed -e \'s/:/ /g\'\` + eval shlib_search_path=\`\$ECHO \"\${$shlibpath_var}\" \| \$SED \'s/:/ /g\'\` else shlib_search_path= fi @@ -4934,6 +6010,8 @@ func_dirname "$output" "/" "" output_objdir="$func_dirname_result$objdir" + func_to_tool_file "$output_objdir/" + tool_output_objdir=$func_to_tool_file_result # Create the object directory. func_mkdir_p "$output_objdir" @@ -4954,12 +6032,12 @@ # Find all interdependent deplibs by searching for libraries # that are linked more than once (e.g. -la -lb -la) for deplib in $deplibs; do - if $opt_duplicate_deps ; then + if $opt_preserve_dup_deps ; then case "$libs " in - *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; + *" $deplib "*) func_append specialdeplibs " $deplib" ;; esac fi - libs="$libs $deplib" + func_append libs " $deplib" done if test "$linkmode" = lib; then @@ -4972,9 +6050,9 @@ if $opt_duplicate_compiler_generated_deps; then for pre_post_dep in $predeps $postdeps; do case "$pre_post_deps " in - *" $pre_post_dep "*) specialdeplibs="$specialdeplibs $pre_post_deps" ;; + *" $pre_post_dep "*) func_append specialdeplibs " $pre_post_deps" ;; esac - pre_post_deps="$pre_post_deps $pre_post_dep" + func_append pre_post_deps " $pre_post_dep" done fi pre_post_deps= @@ -5041,17 +6119,19 @@ for lib in $dlprefiles; do # Ignore non-libtool-libs dependency_libs= + func_resolve_sysroot "$lib" case $lib in - *.la) func_source "$lib" ;; + *.la) func_source "$func_resolve_sysroot_result" ;; esac # Collect preopened libtool deplibs, except any this library # has declared as weak libs for deplib in $dependency_libs; do - deplib_base=`$ECHO "X$deplib" | $Xsed -e "$basename"` + func_basename "$deplib" + deplib_base=$func_basename_result case " $weak_libs " in *" $deplib_base "*) ;; - *) deplibs="$deplibs $deplib" ;; + *) func_append deplibs " $deplib" ;; esac done done @@ -5072,11 +6152,11 @@ compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else - compiler_flags="$compiler_flags $deplib" + func_append compiler_flags " $deplib" if test "$linkmode" = lib ; then case "$new_inherited_linker_flags " in *" $deplib "*) ;; - * ) new_inherited_linker_flags="$new_inherited_linker_flags $deplib" ;; + * ) func_append new_inherited_linker_flags " $deplib" ;; esac fi fi @@ -5161,7 +6241,7 @@ if test "$linkmode" = lib ; then case "$new_inherited_linker_flags " in *" $deplib "*) ;; - * ) new_inherited_linker_flags="$new_inherited_linker_flags $deplib" ;; + * ) func_append new_inherited_linker_flags " $deplib" ;; esac fi fi @@ -5174,7 +6254,8 @@ test "$pass" = conv && continue newdependency_libs="$deplib $newdependency_libs" func_stripname '-L' '' "$deplib" - newlib_search_path="$newlib_search_path $func_stripname_result" + func_resolve_sysroot "$func_stripname_result" + func_append newlib_search_path " $func_resolve_sysroot_result" ;; prog) if test "$pass" = conv; then @@ -5188,7 +6269,8 @@ finalize_deplibs="$deplib $finalize_deplibs" fi func_stripname '-L' '' "$deplib" - newlib_search_path="$newlib_search_path $func_stripname_result" + func_resolve_sysroot "$func_stripname_result" + func_append newlib_search_path " $func_resolve_sysroot_result" ;; *) func_warning "\`-L' is ignored for archives/objects" @@ -5199,17 +6281,21 @@ -R*) if test "$pass" = link; then func_stripname '-R' '' "$deplib" - dir=$func_stripname_result + func_resolve_sysroot "$func_stripname_result" + dir=$func_resolve_sysroot_result # Make sure the xrpath contains only unique directories. case "$xrpath " in *" $dir "*) ;; - *) xrpath="$xrpath $dir" ;; + *) func_append xrpath " $dir" ;; esac fi deplibs="$deplib $deplibs" continue ;; - *.la) lib="$deplib" ;; + *.la) + func_resolve_sysroot "$deplib" + lib=$func_resolve_sysroot_result + ;; *.$libext) if test "$pass" = conv; then deplibs="$deplib $deplibs" @@ -5227,7 +6313,7 @@ match_pattern*) set dummy $deplibs_check_method; shift match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` - if eval "\$ECHO \"X$deplib\"" 2>/dev/null | $Xsed -e 10q \ + if eval "\$ECHO \"$deplib\"" 2>/dev/null | $SED 10q \ | $EGREP "$match_pattern_regex" > /dev/null; then valid_a_lib=yes fi @@ -5237,15 +6323,15 @@ ;; esac if test "$valid_a_lib" != yes; then - $ECHO + echo $ECHO "*** Warning: Trying to link with static lib archive $deplib." - $ECHO "*** I have the capability to make that library automatically link in when" - $ECHO "*** you link to this library. But I can only do this if you have a" - $ECHO "*** shared version of the library, which you do not appear to have" - $ECHO "*** because the file extensions .$libext of this argument makes me believe" - $ECHO "*** that it is just a static archive that I should not use here." + echo "*** I have the capability to make that library automatically link in when" + echo "*** you link to this library. But I can only do this if you have a" + echo "*** shared version of the library, which you do not appear to have" + echo "*** because the file extensions .$libext of this argument makes me believe" + echo "*** that it is just a static archive that I should not use here." else - $ECHO + echo $ECHO "*** Warning: Linking the shared library $output against the" $ECHO "*** static library $deplib is not portable!" deplibs="$deplib $deplibs" @@ -5272,11 +6358,11 @@ if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then # If there is no dlopen support or we're linking statically, # we need to preload. - newdlprefiles="$newdlprefiles $deplib" + func_append newdlprefiles " $deplib" compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else - newdlfiles="$newdlfiles $deplib" + func_append newdlfiles " $deplib" fi fi continue @@ -5318,20 +6404,20 @@ # Convert "-framework foo" to "foo.ltframework" if test -n "$inherited_linker_flags"; then - tmp_inherited_linker_flags=`$ECHO "X$inherited_linker_flags" | $Xsed -e 's/-framework \([^ $]*\)/\1.ltframework/g'` + tmp_inherited_linker_flags=`$ECHO "$inherited_linker_flags" | $SED 's/-framework \([^ $]*\)/\1.ltframework/g'` for tmp_inherited_linker_flag in $tmp_inherited_linker_flags; do case " $new_inherited_linker_flags " in *" $tmp_inherited_linker_flag "*) ;; - *) new_inherited_linker_flags="$new_inherited_linker_flags $tmp_inherited_linker_flag";; + *) func_append new_inherited_linker_flags " $tmp_inherited_linker_flag";; esac done fi - dependency_libs=`$ECHO "X $dependency_libs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` + dependency_libs=`$ECHO " $dependency_libs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` if test "$linkmode,$pass" = "lib,link" || test "$linkmode,$pass" = "prog,scan" || { test "$linkmode" != prog && test "$linkmode" != lib; }; then - test -n "$dlopen" && dlfiles="$dlfiles $dlopen" - test -n "$dlpreopen" && dlprefiles="$dlprefiles $dlpreopen" + test -n "$dlopen" && func_append dlfiles " $dlopen" + test -n "$dlpreopen" && func_append dlprefiles " $dlpreopen" fi if test "$pass" = conv; then @@ -5342,20 +6428,20 @@ func_fatal_error "cannot find name of link library for \`$lib'" fi # It is a libtool convenience library, so add in its objects. - convenience="$convenience $ladir/$objdir/$old_library" - old_convenience="$old_convenience $ladir/$objdir/$old_library" + func_append convenience " $ladir/$objdir/$old_library" + func_append old_convenience " $ladir/$objdir/$old_library" elif test "$linkmode" != prog && test "$linkmode" != lib; then func_fatal_error "\`$lib' is not a convenience library" fi tmp_libs= for deplib in $dependency_libs; do deplibs="$deplib $deplibs" - if $opt_duplicate_deps ; then + if $opt_preserve_dup_deps ; then case "$tmp_libs " in - *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; + *" $deplib "*) func_append specialdeplibs " $deplib" ;; esac fi - tmp_libs="$tmp_libs $deplib" + func_append tmp_libs " $deplib" done continue fi # $pass = conv @@ -5363,9 +6449,15 @@ # Get the name of the library we link against. linklib= - for l in $old_library $library_names; do - linklib="$l" - done + if test -n "$old_library" && + { test "$prefer_static_libs" = yes || + test "$prefer_static_libs,$installed" = "built,no"; }; then + linklib=$old_library + else + for l in $old_library $library_names; do + linklib="$l" + done + fi if test -z "$linklib"; then func_fatal_error "cannot find name of link library for \`$lib'" fi @@ -5382,9 +6474,9 @@ # statically, we need to preload. We also need to preload any # dependent libraries so libltdl's deplib preloader doesn't # bomb out in the load deplibs phase. - dlprefiles="$dlprefiles $lib $dependency_libs" + func_append dlprefiles " $lib $dependency_libs" else - newdlfiles="$newdlfiles $lib" + func_append newdlfiles " $lib" fi continue fi # $pass = dlopen @@ -5406,14 +6498,14 @@ # Find the relevant object directory and library name. if test "X$installed" = Xyes; then - if test ! -f "$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then - # func_warning "library \`$lib' was moved." + if test ! -f "$lt_sysroot$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then + #func_warning "library \`$lib' was moved." dir="$ladir" absdir="$abs_ladir" libdir="$abs_ladir" else - dir="$libdir" - absdir="$libdir" + dir="$lt_sysroot$libdir" + absdir="$lt_sysroot$libdir" fi test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes else @@ -5421,12 +6513,12 @@ dir="$ladir" absdir="$abs_ladir" # Remove this search path later - notinst_path="$notinst_path $abs_ladir" + func_append notinst_path " $abs_ladir" else dir="$ladir/$objdir" absdir="$abs_ladir/$objdir" # Remove this search path later - notinst_path="$notinst_path $abs_ladir" + func_append notinst_path " $abs_ladir" fi fi # $installed = yes func_stripname 'lib' '.la' "$laname" @@ -5437,20 +6529,46 @@ if test -z "$libdir" && test "$linkmode" = prog; then func_fatal_error "only libraries may -dlpreopen a convenience library: \`$lib'" fi - # Prefer using a static library (so that no silly _DYNAMIC symbols - # are required to link). - if test -n "$old_library"; then - newdlprefiles="$newdlprefiles $dir/$old_library" - # Keep a list of preopened convenience libraries to check - # that they are being used correctly in the link pass. - test -z "$libdir" && \ - dlpreconveniencelibs="$dlpreconveniencelibs $dir/$old_library" - # Otherwise, use the dlname, so that lt_dlopen finds it. - elif test -n "$dlname"; then - newdlprefiles="$newdlprefiles $dir/$dlname" - else - newdlprefiles="$newdlprefiles $dir/$linklib" - fi + case "$host" in + # special handling for platforms with PE-DLLs. + *cygwin* | *mingw* | *cegcc* ) + # Linker will automatically link against shared library if both + # static and shared are present. Therefore, ensure we extract + # symbols from the import library if a shared library is present + # (otherwise, the dlopen module name will be incorrect). We do + # this by putting the import library name into $newdlprefiles. + # We recover the dlopen module name by 'saving' the la file + # name in a special purpose variable, and (later) extracting the + # dlname from the la file. + if test -n "$dlname"; then + func_tr_sh "$dir/$linklib" + eval "libfile_$func_tr_sh_result=\$abs_ladir/\$laname" + func_append newdlprefiles " $dir/$linklib" + else + func_append newdlprefiles " $dir/$old_library" + # Keep a list of preopened convenience libraries to check + # that they are being used correctly in the link pass. + test -z "$libdir" && \ + func_append dlpreconveniencelibs " $dir/$old_library" + fi + ;; + * ) + # Prefer using a static library (so that no silly _DYNAMIC symbols + # are required to link). + if test -n "$old_library"; then + func_append newdlprefiles " $dir/$old_library" + # Keep a list of preopened convenience libraries to check + # that they are being used correctly in the link pass. + test -z "$libdir" && \ + func_append dlpreconveniencelibs " $dir/$old_library" + # Otherwise, use the dlname, so that lt_dlopen finds it. + elif test -n "$dlname"; then + func_append newdlprefiles " $dir/$dlname" + else + func_append newdlprefiles " $dir/$linklib" + fi + ;; + esac fi # $pass = dlpreopen if test -z "$libdir"; then @@ -5468,7 +6586,7 @@ if test "$linkmode" = prog && test "$pass" != link; then - newlib_search_path="$newlib_search_path $ladir" + func_append newlib_search_path " $ladir" deplibs="$lib $deplibs" linkalldeplibs=no @@ -5481,7 +6599,8 @@ for deplib in $dependency_libs; do case $deplib in -L*) func_stripname '-L' '' "$deplib" - newlib_search_path="$newlib_search_path $func_stripname_result" + func_resolve_sysroot "$func_stripname_result" + func_append newlib_search_path " $func_resolve_sysroot_result" ;; esac # Need to link against all dependency_libs? @@ -5492,12 +6611,12 @@ # or/and link against static libraries newdependency_libs="$deplib $newdependency_libs" fi - if $opt_duplicate_deps ; then + if $opt_preserve_dup_deps ; then case "$tmp_libs " in - *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; + *" $deplib "*) func_append specialdeplibs " $deplib" ;; esac fi - tmp_libs="$tmp_libs $deplib" + func_append tmp_libs " $deplib" done # for deplib continue fi # $linkmode = prog... @@ -5512,7 +6631,7 @@ # Make sure the rpath contains only unique directories. case "$temp_rpath:" in *"$absdir:"*) ;; - *) temp_rpath="$temp_rpath$absdir:" ;; + *) func_append temp_rpath "$absdir:" ;; esac fi @@ -5524,7 +6643,7 @@ *) case "$compile_rpath " in *" $absdir "*) ;; - *) compile_rpath="$compile_rpath $absdir" + *) func_append compile_rpath " $absdir" ;; esac ;; esac @@ -5533,7 +6652,7 @@ *) case "$finalize_rpath " in *" $libdir "*) ;; - *) finalize_rpath="$finalize_rpath $libdir" + *) func_append finalize_rpath " $libdir" ;; esac ;; esac @@ -5558,12 +6677,12 @@ case $host in *cygwin* | *mingw* | *cegcc*) # No point in relinking DLLs because paths are not encoded - notinst_deplibs="$notinst_deplibs $lib" + func_append notinst_deplibs " $lib" need_relink=no ;; *) if test "$installed" = no; then - notinst_deplibs="$notinst_deplibs $lib" + func_append notinst_deplibs " $lib" need_relink=yes fi ;; @@ -5580,7 +6699,7 @@ fi done if test -z "$dlopenmodule" && test "$shouldnotlink" = yes && test "$pass" = link; then - $ECHO + echo if test "$linkmode" = prog; then $ECHO "*** Warning: Linking the executable $output against the loadable module" else @@ -5598,7 +6717,7 @@ *) case "$compile_rpath " in *" $absdir "*) ;; - *) compile_rpath="$compile_rpath $absdir" + *) func_append compile_rpath " $absdir" ;; esac ;; esac @@ -5607,7 +6726,7 @@ *) case "$finalize_rpath " in *" $libdir "*) ;; - *) finalize_rpath="$finalize_rpath $libdir" + *) func_append finalize_rpath " $libdir" ;; esac ;; esac @@ -5661,7 +6780,7 @@ linklib=$newlib fi # test -n "$old_archive_from_expsyms_cmds" - if test "$linkmode" = prog || test "$mode" != relink; then + if test "$linkmode" = prog || test "$opt_mode" != relink; then add_shlibpath= add_dir= add= @@ -5683,9 +6802,9 @@ if test "X$dlopenmodule" != "X$lib"; then $ECHO "*** Warning: lib $linklib is a module, not a shared library" if test -z "$old_library" ; then - $ECHO - $ECHO "*** And there doesn't seem to be a static archive available" - $ECHO "*** The link will probably fail, sorry" + echo + echo "*** And there doesn't seem to be a static archive available" + echo "*** The link will probably fail, sorry" else add="$dir/$old_library" fi @@ -5717,7 +6836,7 @@ if test -n "$inst_prefix_dir"; then case $libdir in [\\/]*) - add_dir="$add_dir -L$inst_prefix_dir$libdir" + func_append add_dir " -L$inst_prefix_dir$libdir" ;; esac fi @@ -5739,7 +6858,7 @@ if test -n "$add_shlibpath"; then case :$compile_shlibpath: in *":$add_shlibpath:"*) ;; - *) compile_shlibpath="$compile_shlibpath$add_shlibpath:" ;; + *) func_append compile_shlibpath "$add_shlibpath:" ;; esac fi if test "$linkmode" = prog; then @@ -5753,13 +6872,13 @@ test "$hardcode_shlibpath_var" = yes; then case :$finalize_shlibpath: in *":$libdir:"*) ;; - *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;; + *) func_append finalize_shlibpath "$libdir:" ;; esac fi fi fi - if test "$linkmode" = prog || test "$mode" = relink; then + if test "$linkmode" = prog || test "$opt_mode" = relink; then add_shlibpath= add_dir= add= @@ -5773,7 +6892,7 @@ elif test "$hardcode_shlibpath_var" = yes; then case :$finalize_shlibpath: in *":$libdir:"*) ;; - *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;; + *) func_append finalize_shlibpath "$libdir:" ;; esac add="-l$name" elif test "$hardcode_automatic" = yes; then @@ -5790,7 +6909,7 @@ if test -n "$inst_prefix_dir"; then case $libdir in [\\/]*) - add_dir="$add_dir -L$inst_prefix_dir$libdir" + func_append add_dir " -L$inst_prefix_dir$libdir" ;; esac fi @@ -5825,21 +6944,21 @@ # Just print a warning and add the library to dependency_libs so # that the program can be linked against the static library. - $ECHO + echo $ECHO "*** Warning: This system can not link to static lib archive $lib." - $ECHO "*** I have the capability to make that library automatically link in when" - $ECHO "*** you link to this library. But I can only do this if you have a" - $ECHO "*** shared version of the library, which you do not appear to have." + echo "*** I have the capability to make that library automatically link in when" + echo "*** you link to this library. But I can only do this if you have a" + echo "*** shared version of the library, which you do not appear to have." if test "$module" = yes; then - $ECHO "*** But as you try to build a module library, libtool will still create " - $ECHO "*** a static module, that should work as long as the dlopening application" - $ECHO "*** is linked with the -dlopen flag to resolve symbols at runtime." + echo "*** But as you try to build a module library, libtool will still create " + echo "*** a static module, that should work as long as the dlopening application" + echo "*** is linked with the -dlopen flag to resolve symbols at runtime." if test -z "$global_symbol_pipe"; then - $ECHO - $ECHO "*** However, this would only work if libtool was able to extract symbol" - $ECHO "*** lists from a program, using \`nm' or equivalent, but libtool could" - $ECHO "*** not find such a program. So, this module is probably useless." - $ECHO "*** \`nm' from GNU binutils and a full rebuild may help." + echo + echo "*** However, this would only work if libtool was able to extract symbol" + echo "*** lists from a program, using \`nm' or equivalent, but libtool could" + echo "*** not find such a program. So, this module is probably useless." + echo "*** \`nm' from GNU binutils and a full rebuild may help." fi if test "$build_old_libs" = no; then build_libtool_libs=module @@ -5867,37 +6986,46 @@ temp_xrpath=$func_stripname_result case " $xrpath " in *" $temp_xrpath "*) ;; - *) xrpath="$xrpath $temp_xrpath";; + *) func_append xrpath " $temp_xrpath";; esac;; - *) temp_deplibs="$temp_deplibs $libdir";; + *) func_append temp_deplibs " $libdir";; esac done dependency_libs="$temp_deplibs" fi - newlib_search_path="$newlib_search_path $absdir" + func_append newlib_search_path " $absdir" # Link against this library test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs" # ... and its dependency_libs tmp_libs= for deplib in $dependency_libs; do newdependency_libs="$deplib $newdependency_libs" - if $opt_duplicate_deps ; then + case $deplib in + -L*) func_stripname '-L' '' "$deplib" + func_resolve_sysroot "$func_stripname_result";; + *) func_resolve_sysroot "$deplib" ;; + esac + if $opt_preserve_dup_deps ; then case "$tmp_libs " in - *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; + *" $func_resolve_sysroot_result "*) + func_append specialdeplibs " $func_resolve_sysroot_result" ;; esac fi - tmp_libs="$tmp_libs $deplib" + func_append tmp_libs " $func_resolve_sysroot_result" done if test "$link_all_deplibs" != no; then # Add the search paths of all dependency libraries for deplib in $dependency_libs; do + path= case $deplib in -L*) path="$deplib" ;; *.la) + func_resolve_sysroot "$deplib" + deplib=$func_resolve_sysroot_result func_dirname "$deplib" "" "." - dir="$func_dirname_result" + dir=$func_dirname_result # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;; @@ -5924,8 +7052,8 @@ if test -z "$darwin_install_name"; then darwin_install_name=`${OTOOL64} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` fi - compiler_flags="$compiler_flags ${wl}-dylib_file ${wl}${darwin_install_name}:${depdepl}" - linker_flags="$linker_flags -dylib_file ${darwin_install_name}:${depdepl}" + func_append compiler_flags " ${wl}-dylib_file ${wl}${darwin_install_name}:${depdepl}" + func_append linker_flags " -dylib_file ${darwin_install_name}:${depdepl}" path= fi fi @@ -5938,8 +7066,8 @@ eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` test -z "$libdir" && \ func_fatal_error "\`$deplib' is not a valid libtool archive" - # test "$absdir" != "$libdir" && \ - # func_warning "\`$deplib' seems to be moved" + #test "$absdir" != "$libdir" && \ + # func_warning "\`$deplib' seems to be moved" path="-L$absdir" fi @@ -5958,7 +7086,7 @@ compile_deplibs="$new_inherited_linker_flags $compile_deplibs" finalize_deplibs="$new_inherited_linker_flags $finalize_deplibs" else - compiler_flags="$compiler_flags "`$ECHO "X $new_inherited_linker_flags" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` + compiler_flags="$compiler_flags "`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` fi fi dependency_libs="$newdependency_libs" @@ -5975,7 +7103,7 @@ for dir in $newlib_search_path; do case "$lib_search_path " in *" $dir "*) ;; - *) lib_search_path="$lib_search_path $dir" ;; + *) func_append lib_search_path " $dir" ;; esac done newlib_search_path= @@ -6033,10 +7161,10 @@ -L*) case " $tmp_libs " in *" $deplib "*) ;; - *) tmp_libs="$tmp_libs $deplib" ;; + *) func_append tmp_libs " $deplib" ;; esac ;; - *) tmp_libs="$tmp_libs $deplib" ;; + *) func_append tmp_libs " $deplib" ;; esac done eval $var=\"$tmp_libs\" @@ -6052,7 +7180,7 @@ ;; esac if test -n "$i" ; then - tmp_libs="$tmp_libs $i" + func_append tmp_libs " $i" fi done dependency_libs=$tmp_libs @@ -6093,7 +7221,7 @@ # Now set the variables for building old libraries. build_libtool_libs=no oldlibs="$output" - objs="$objs$old_deplibs" + func_append objs "$old_deplibs" ;; lib) @@ -6126,10 +7254,10 @@ if test "$deplibs_check_method" != pass_all; then func_fatal_error "cannot build libtool library \`$output' from non-libtool objects on this host:$objs" else - $ECHO + echo $ECHO "*** Warning: Linking the shared library $output against the non-libtool" $ECHO "*** objects $objs is not portable!" - libobjs="$libobjs $objs" + func_append libobjs " $objs" fi fi @@ -6194,7 +7322,7 @@ age="$number_minor" revision="$number_revision" ;; - freebsd-aout|freebsd-elf|sunos) + freebsd-aout|freebsd-elf|qnx|sunos) current="$number_major" revision="$number_minor" age="0" @@ -6327,7 +7455,7 @@ done # Make executables depend on our current version. - verstring="$verstring:${current}.0" + func_append verstring ":${current}.0" ;; qnx) @@ -6395,10 +7523,10 @@ fi func_generate_dlsyms "$libname" "$libname" "yes" - libobjs="$libobjs $symfileobj" + func_append libobjs " $symfileobj" test "X$libobjs" = "X " && libobjs= - if test "$mode" != relink; then + if test "$opt_mode" != relink; then # Remove our outputs, but don't remove object files since they # may have been created when compiling PIC objects. removelist= @@ -6414,7 +7542,7 @@ continue fi fi - removelist="$removelist $p" + func_append removelist " $p" ;; *) ;; esac @@ -6425,27 +7553,28 @@ # Now set the variables for building old libraries. if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then - oldlibs="$oldlibs $output_objdir/$libname.$libext" + func_append oldlibs " $output_objdir/$libname.$libext" # Transform .lo files to .o files. - oldobjs="$objs "`$ECHO "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e "$lo2o" | $NL2SP` + oldobjs="$objs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.${libext}$/d; $lo2o" | $NL2SP` fi # Eliminate all temporary directories. #for path in $notinst_path; do - # lib_search_path=`$ECHO "X$lib_search_path " | $Xsed -e "s% $path % %g"` - # deplibs=`$ECHO "X$deplibs " | $Xsed -e "s% -L$path % %g"` - # dependency_libs=`$ECHO "X$dependency_libs " | $Xsed -e "s% -L$path % %g"` + # lib_search_path=`$ECHO "$lib_search_path " | $SED "s% $path % %g"` + # deplibs=`$ECHO "$deplibs " | $SED "s% -L$path % %g"` + # dependency_libs=`$ECHO "$dependency_libs " | $SED "s% -L$path % %g"` #done if test -n "$xrpath"; then # If the user specified any rpath flags, then add them. temp_xrpath= for libdir in $xrpath; do - temp_xrpath="$temp_xrpath -R$libdir" + func_replace_sysroot "$libdir" + func_append temp_xrpath " -R$func_replace_sysroot_result" case "$finalize_rpath " in *" $libdir "*) ;; - *) finalize_rpath="$finalize_rpath $libdir" ;; + *) func_append finalize_rpath " $libdir" ;; esac done if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then @@ -6459,7 +7588,7 @@ for lib in $old_dlfiles; do case " $dlprefiles $dlfiles " in *" $lib "*) ;; - *) dlfiles="$dlfiles $lib" ;; + *) func_append dlfiles " $lib" ;; esac done @@ -6469,19 +7598,19 @@ for lib in $old_dlprefiles; do case "$dlprefiles " in *" $lib "*) ;; - *) dlprefiles="$dlprefiles $lib" ;; + *) func_append dlprefiles " $lib" ;; esac done if test "$build_libtool_libs" = yes; then if test -n "$rpath"; then case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos* | *-cegcc*) + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos* | *-cegcc* | *-*-haiku*) # these systems don't actually have a c library (as such)! ;; *-*-rhapsody* | *-*-darwin1.[012]) # Rhapsody C library is in the System framework - deplibs="$deplibs System.ltframework" + func_append deplibs " System.ltframework" ;; *-*-netbsd*) # Don't link with libc until the a.out ld.so is fixed. @@ -6498,7 +7627,7 @@ *) # Add libc to deplibs on all other systems if necessary. if test "$build_libtool_need_lc" = "yes"; then - deplibs="$deplibs -lc" + func_append deplibs " -lc" fi ;; esac @@ -6547,7 +7676,7 @@ if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then case " $predeps $postdeps " in *" $i "*) - newdeplibs="$newdeplibs $i" + func_append newdeplibs " $i" i="" ;; esac @@ -6558,21 +7687,21 @@ set dummy $deplib_matches; shift deplib_match=$1 if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then - newdeplibs="$newdeplibs $i" + func_append newdeplibs " $i" else droppeddeps=yes - $ECHO + echo $ECHO "*** Warning: dynamic linker does not accept needed library $i." - $ECHO "*** I have the capability to make that library automatically link in when" - $ECHO "*** you link to this library. But I can only do this if you have a" - $ECHO "*** shared version of the library, which I believe you do not have" - $ECHO "*** because a test_compile did reveal that the linker did not use it for" - $ECHO "*** its dynamic dependency list that programs get resolved with at runtime." + echo "*** I have the capability to make that library automatically link in when" + echo "*** you link to this library. But I can only do this if you have a" + echo "*** shared version of the library, which I believe you do not have" + echo "*** because a test_compile did reveal that the linker did not use it for" + echo "*** its dynamic dependency list that programs get resolved with at runtime." fi fi ;; *) - newdeplibs="$newdeplibs $i" + func_append newdeplibs " $i" ;; esac done @@ -6590,7 +7719,7 @@ if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then case " $predeps $postdeps " in *" $i "*) - newdeplibs="$newdeplibs $i" + func_append newdeplibs " $i" i="" ;; esac @@ -6601,29 +7730,29 @@ set dummy $deplib_matches; shift deplib_match=$1 if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then - newdeplibs="$newdeplibs $i" + func_append newdeplibs " $i" else droppeddeps=yes - $ECHO + echo $ECHO "*** Warning: dynamic linker does not accept needed library $i." - $ECHO "*** I have the capability to make that library automatically link in when" - $ECHO "*** you link to this library. But I can only do this if you have a" - $ECHO "*** shared version of the library, which you do not appear to have" - $ECHO "*** because a test_compile did reveal that the linker did not use this one" - $ECHO "*** as a dynamic dependency that programs can get resolved with at runtime." + echo "*** I have the capability to make that library automatically link in when" + echo "*** you link to this library. But I can only do this if you have a" + echo "*** shared version of the library, which you do not appear to have" + echo "*** because a test_compile did reveal that the linker did not use this one" + echo "*** as a dynamic dependency that programs can get resolved with at runtime." fi fi else droppeddeps=yes - $ECHO + echo $ECHO "*** Warning! Library $i is needed by this library but I was not able to" - $ECHO "*** make it link in! You will probably need to install it or some" - $ECHO "*** library that it depends on before this library will be fully" - $ECHO "*** functional. Installing it before continuing would be even better." + echo "*** make it link in! You will probably need to install it or some" + echo "*** library that it depends on before this library will be fully" + echo "*** functional. Installing it before continuing would be even better." fi ;; *) - newdeplibs="$newdeplibs $i" + func_append newdeplibs " $i" ;; esac done @@ -6640,15 +7769,27 @@ if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then case " $predeps $postdeps " in *" $a_deplib "*) - newdeplibs="$newdeplibs $a_deplib" + func_append newdeplibs " $a_deplib" a_deplib="" ;; esac fi if test -n "$a_deplib" ; then libname=`eval "\\$ECHO \"$libname_spec\""` + if test -n "$file_magic_glob"; then + libnameglob=`func_echo_all "$libname" | $SED -e $file_magic_glob` + else + libnameglob=$libname + fi + test "$want_nocaseglob" = yes && nocaseglob=`shopt -p nocaseglob` for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do - potential_libs=`ls $i/$libname[.-]* 2>/dev/null` + if test "$want_nocaseglob" = yes; then + shopt -s nocaseglob + potential_libs=`ls $i/$libnameglob[.-]* 2>/dev/null` + $nocaseglob + else + potential_libs=`ls $i/$libnameglob[.-]* 2>/dev/null` + fi for potent_lib in $potential_libs; do # Follow soft links. if ls -lLd "$potent_lib" 2>/dev/null | @@ -6665,13 +7806,13 @@ potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'` case $potliblink in [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";; - *) potlib=`$ECHO "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";; + *) potlib=`$ECHO "$potlib" | $SED 's,[^/]*$,,'`"$potliblink";; esac done if eval $file_magic_cmd \"\$potlib\" 2>/dev/null | $SED -e 10q | $EGREP "$file_magic_regex" > /dev/null; then - newdeplibs="$newdeplibs $a_deplib" + func_append newdeplibs " $a_deplib" a_deplib="" break 2 fi @@ -6680,12 +7821,12 @@ fi if test -n "$a_deplib" ; then droppeddeps=yes - $ECHO + echo $ECHO "*** Warning: linker path does not have real file for library $a_deplib." - $ECHO "*** I have the capability to make that library automatically link in when" - $ECHO "*** you link to this library. But I can only do this if you have a" - $ECHO "*** shared version of the library, which you do not appear to have" - $ECHO "*** because I did check the linker path looking for a file starting" + echo "*** I have the capability to make that library automatically link in when" + echo "*** you link to this library. But I can only do this if you have a" + echo "*** shared version of the library, which you do not appear to have" + echo "*** because I did check the linker path looking for a file starting" if test -z "$potlib" ; then $ECHO "*** with $libname but no candidates were found. (...for file magic test)" else @@ -6696,7 +7837,7 @@ ;; *) # Add a -L argument. - newdeplibs="$newdeplibs $a_deplib" + func_append newdeplibs " $a_deplib" ;; esac done # Gone through all deplibs. @@ -6712,7 +7853,7 @@ if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then case " $predeps $postdeps " in *" $a_deplib "*) - newdeplibs="$newdeplibs $a_deplib" + func_append newdeplibs " $a_deplib" a_deplib="" ;; esac @@ -6723,9 +7864,9 @@ potential_libs=`ls $i/$libname[.-]* 2>/dev/null` for potent_lib in $potential_libs; do potlib="$potent_lib" # see symlink-check above in file_magic test - if eval "\$ECHO \"X$potent_lib\"" 2>/dev/null | $Xsed -e 10q | \ + if eval "\$ECHO \"$potent_lib\"" 2>/dev/null | $SED 10q | \ $EGREP "$match_pattern_regex" > /dev/null; then - newdeplibs="$newdeplibs $a_deplib" + func_append newdeplibs " $a_deplib" a_deplib="" break 2 fi @@ -6734,12 +7875,12 @@ fi if test -n "$a_deplib" ; then droppeddeps=yes - $ECHO + echo $ECHO "*** Warning: linker path does not have real file for library $a_deplib." - $ECHO "*** I have the capability to make that library automatically link in when" - $ECHO "*** you link to this library. But I can only do this if you have a" - $ECHO "*** shared version of the library, which you do not appear to have" - $ECHO "*** because I did check the linker path looking for a file starting" + echo "*** I have the capability to make that library automatically link in when" + echo "*** you link to this library. But I can only do this if you have a" + echo "*** shared version of the library, which you do not appear to have" + echo "*** because I did check the linker path looking for a file starting" if test -z "$potlib" ; then $ECHO "*** with $libname but no candidates were found. (...for regex pattern test)" else @@ -6750,32 +7891,32 @@ ;; *) # Add a -L argument. - newdeplibs="$newdeplibs $a_deplib" + func_append newdeplibs " $a_deplib" ;; esac done # Gone through all deplibs. ;; none | unknown | *) newdeplibs="" - tmp_deplibs=`$ECHO "X $deplibs" | $Xsed \ - -e 's/ -lc$//' -e 's/ -[LR][^ ]*//g'` + tmp_deplibs=`$ECHO " $deplibs" | $SED 's/ -lc$//; s/ -[LR][^ ]*//g'` if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then for i in $predeps $postdeps ; do # can't use Xsed below, because $i might contain '/' - tmp_deplibs=`$ECHO "X $tmp_deplibs" | $Xsed -e "s,$i,,"` + tmp_deplibs=`$ECHO " $tmp_deplibs" | $SED "s,$i,,"` done fi - if $ECHO "X $tmp_deplibs" | $Xsed -e 's/[ ]//g' | - $GREP . >/dev/null; then - $ECHO + case $tmp_deplibs in + *[!\ \ ]*) + echo if test "X$deplibs_check_method" = "Xnone"; then - $ECHO "*** Warning: inter-library dependencies are not supported in this platform." + echo "*** Warning: inter-library dependencies are not supported in this platform." else - $ECHO "*** Warning: inter-library dependencies are not known to be supported." + echo "*** Warning: inter-library dependencies are not known to be supported." fi - $ECHO "*** All declared inter-library dependencies are being dropped." + echo "*** All declared inter-library dependencies are being dropped." droppeddeps=yes - fi + ;; + esac ;; esac versuffix=$versuffix_save @@ -6787,23 +7928,23 @@ case $host in *-*-rhapsody* | *-*-darwin1.[012]) # On Rhapsody replace the C library with the System framework - newdeplibs=`$ECHO "X $newdeplibs" | $Xsed -e 's/ -lc / System.ltframework /'` + newdeplibs=`$ECHO " $newdeplibs" | $SED 's/ -lc / System.ltframework /'` ;; esac if test "$droppeddeps" = yes; then if test "$module" = yes; then - $ECHO - $ECHO "*** Warning: libtool could not satisfy all declared inter-library" + echo + echo "*** Warning: libtool could not satisfy all declared inter-library" $ECHO "*** dependencies of module $libname. Therefore, libtool will create" - $ECHO "*** a static module, that should work as long as the dlopening" - $ECHO "*** application is linked with the -dlopen flag." + echo "*** a static module, that should work as long as the dlopening" + echo "*** application is linked with the -dlopen flag." if test -z "$global_symbol_pipe"; then - $ECHO - $ECHO "*** However, this would only work if libtool was able to extract symbol" - $ECHO "*** lists from a program, using \`nm' or equivalent, but libtool could" - $ECHO "*** not find such a program. So, this module is probably useless." - $ECHO "*** \`nm' from GNU binutils and a full rebuild may help." + echo + echo "*** However, this would only work if libtool was able to extract symbol" + echo "*** lists from a program, using \`nm' or equivalent, but libtool could" + echo "*** not find such a program. So, this module is probably useless." + echo "*** \`nm' from GNU binutils and a full rebuild may help." fi if test "$build_old_libs" = no; then oldlibs="$output_objdir/$libname.$libext" @@ -6813,16 +7954,16 @@ build_libtool_libs=no fi else - $ECHO "*** The inter-library dependencies that have been dropped here will be" - $ECHO "*** automatically added whenever a program is linked with this library" - $ECHO "*** or is declared to -dlopen it." + echo "*** The inter-library dependencies that have been dropped here will be" + echo "*** automatically added whenever a program is linked with this library" + echo "*** or is declared to -dlopen it." if test "$allow_undefined" = no; then - $ECHO - $ECHO "*** Since this library must not contain undefined symbols," - $ECHO "*** because either the platform does not support them or" - $ECHO "*** it was explicitly requested with -no-undefined," - $ECHO "*** libtool will only create a static version of it." + echo + echo "*** Since this library must not contain undefined symbols," + echo "*** because either the platform does not support them or" + echo "*** it was explicitly requested with -no-undefined," + echo "*** libtool will only create a static version of it." if test "$build_old_libs" = no; then oldlibs="$output_objdir/$libname.$libext" build_libtool_libs=module @@ -6839,9 +7980,9 @@ # Time to change all our "foo.ltframework" stuff back to "-framework foo" case $host in *-*-darwin*) - newdeplibs=`$ECHO "X $newdeplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` - new_inherited_linker_flags=`$ECHO "X $new_inherited_linker_flags" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` - deplibs=`$ECHO "X $deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` + newdeplibs=`$ECHO " $newdeplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` + new_inherited_linker_flags=`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` + deplibs=`$ECHO " $deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` ;; esac @@ -6854,7 +7995,7 @@ *) case " $deplibs " in *" -L$path/$objdir "*) - new_libs="$new_libs -L$path/$objdir" ;; + func_append new_libs " -L$path/$objdir" ;; esac ;; esac @@ -6864,10 +8005,10 @@ -L*) case " $new_libs " in *" $deplib "*) ;; - *) new_libs="$new_libs $deplib" ;; + *) func_append new_libs " $deplib" ;; esac ;; - *) new_libs="$new_libs $deplib" ;; + *) func_append new_libs " $deplib" ;; esac done deplibs="$new_libs" @@ -6884,10 +8025,12 @@ hardcode_libdirs= dep_rpath= rpath="$finalize_rpath" - test "$mode" != relink && rpath="$compile_rpath$rpath" + test "$opt_mode" != relink && rpath="$compile_rpath$rpath" for libdir in $rpath; do if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then + func_replace_sysroot "$libdir" + libdir=$func_replace_sysroot_result if test -z "$hardcode_libdirs"; then hardcode_libdirs="$libdir" else @@ -6896,18 +8039,18 @@ *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) - hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" + func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" - dep_rpath="$dep_rpath $flag" + func_append dep_rpath " $flag" fi elif test -n "$runpath_var"; then case "$perm_rpath " in *" $libdir "*) ;; - *) perm_rpath="$perm_rpath $libdir" ;; + *) func_apped perm_rpath " $libdir" ;; esac fi done @@ -6925,7 +8068,7 @@ # We should set the runpath_var. rpath= for dir in $perm_rpath; do - rpath="$rpath$dir:" + func_append rpath "$dir:" done eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var" fi @@ -6933,7 +8076,7 @@ fi shlibpath="$finalize_shlibpath" - test "$mode" != relink && shlibpath="$compile_shlibpath$shlibpath" + test "$opt_mode" != relink && shlibpath="$compile_shlibpath$shlibpath" if test -n "$shlibpath"; then eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var" fi @@ -6959,18 +8102,18 @@ linknames= for link do - linknames="$linknames $link" + func_append linknames " $link" done # Use standard objects if they are pic - test -z "$pic_flag" && libobjs=`$ECHO "X$libobjs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` + test -z "$pic_flag" && libobjs=`$ECHO "$libobjs" | $SP2NL | $SED "$lo2o" | $NL2SP` test "X$libobjs" = "X " && libobjs= delfiles= if test -n "$export_symbols" && test -n "$include_expsyms"; then $opt_dry_run || cp "$export_symbols" "$output_objdir/$libname.uexp" export_symbols="$output_objdir/$libname.uexp" - delfiles="$delfiles $export_symbols" + func_append delfiles " $export_symbols" fi orig_export_symbols= @@ -7001,13 +8144,45 @@ $opt_dry_run || $RM $export_symbols cmds=$export_symbols_cmds save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do + for cmd1 in $cmds; do IFS="$save_ifs" - eval cmd=\"$cmd\" - func_len " $cmd" - len=$func_len_result - if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then + # Take the normal branch if the nm_file_list_spec branch + # doesn't work or if tool conversion is not needed. + case $nm_file_list_spec~$to_tool_file_cmd in + *~func_convert_file_noop | *~func_convert_file_msys_to_w32 | ~*) + try_normal_branch=yes + eval cmd=\"$cmd1\" + func_len " $cmd" + len=$func_len_result + ;; + *) + try_normal_branch=no + ;; + esac + if test "$try_normal_branch" = yes \ + && { test "$len" -lt "$max_cmd_len" \ + || test "$max_cmd_len" -le -1; } + then + func_show_eval "$cmd" 'exit $?' + skipped_export=false + elif test -n "$nm_file_list_spec"; then + func_basename "$output" + output_la=$func_basename_result + save_libobjs=$libobjs + save_output=$output + output=${output_objdir}/${output_la}.nm + func_to_tool_file "$output" + libobjs=$nm_file_list_spec$func_to_tool_file_result + func_append delfiles " $output" + func_verbose "creating $NM input file list: $output" + for obj in $save_libobjs; do + func_to_tool_file "$obj" + $ECHO "$func_to_tool_file_result" + done > "$output" + eval cmd=\"$cmd1\" func_show_eval "$cmd" 'exit $?' + output=$save_output + libobjs=$save_libobjs skipped_export=false else # The command line is too long to execute in one step. @@ -7029,7 +8204,7 @@ if test -n "$export_symbols" && test -n "$include_expsyms"; then tmp_export_symbols="$export_symbols" test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols" - $opt_dry_run || eval '$ECHO "X$include_expsyms" | $Xsed | $SP2NL >> "$tmp_export_symbols"' + $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"' fi if test "X$skipped_export" != "X:" && test -n "$orig_export_symbols"; then @@ -7041,7 +8216,7 @@ # global variables. join(1) would be nice here, but unfortunately # isn't a blessed tool. $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter - delfiles="$delfiles $export_symbols $output_objdir/$libname.filter" + func_append delfiles " $export_symbols $output_objdir/$libname.filter" export_symbols=$output_objdir/$libname.def $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols fi @@ -7051,7 +8226,7 @@ case " $convenience " in *" $test_deplib "*) ;; *) - tmp_deplibs="$tmp_deplibs $test_deplib" + func_append tmp_deplibs " $test_deplib" ;; esac done @@ -7071,21 +8246,21 @@ test "X$libobjs" = "X " && libobjs= else gentop="$output_objdir/${outputname}x" - generated="$generated $gentop" + func_append generated " $gentop" func_extract_archives $gentop $convenience - libobjs="$libobjs $func_extract_archives_result" + func_append libobjs " $func_extract_archives_result" test "X$libobjs" = "X " && libobjs= fi fi if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then eval flag=\"$thread_safe_flag_spec\" - linker_flags="$linker_flags $flag" + func_append linker_flags " $flag" fi # Make a backup of the uninstalled library when relinking - if test "$mode" = relink; then + if test "$opt_mode" = relink; then $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}U && $MV $realname ${realname}U)' || exit $? fi @@ -7130,7 +8305,8 @@ save_libobjs=$libobjs fi save_output=$output - output_la=`$ECHO "X$output" | $Xsed -e "$basename"` + func_basename "$output" + output_la=$func_basename_result # Clear the reloadable object creation command queue and # initialize k to one. @@ -7143,13 +8319,16 @@ if test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "$with_gnu_ld" = yes; then output=${output_objdir}/${output_la}.lnkscript func_verbose "creating GNU ld script: $output" - $ECHO 'INPUT (' > $output + echo 'INPUT (' > $output for obj in $save_libobjs do - $ECHO "$obj" >> $output + func_to_tool_file "$obj" + $ECHO "$func_to_tool_file_result" >> $output done - $ECHO ')' >> $output - delfiles="$delfiles $output" + echo ')' >> $output + func_append delfiles " $output" + func_to_tool_file "$output" + output=$func_to_tool_file_result elif test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "X$file_list_spec" != X; then output=${output_objdir}/${output_la}.lnk func_verbose "creating linker input file list: $output" @@ -7163,10 +8342,12 @@ fi for obj do - $ECHO "$obj" >> $output + func_to_tool_file "$obj" + $ECHO "$func_to_tool_file_result" >> $output done - delfiles="$delfiles $output" - output=$firstobj\"$file_list_spec$output\" + func_append delfiles " $output" + func_to_tool_file "$output" + output=$firstobj\"$file_list_spec$func_to_tool_file_result\" else if test -n "$save_libobjs"; then func_verbose "creating reloadable object files..." @@ -7190,17 +8371,19 @@ # command to the queue. if test "$k" -eq 1 ; then # The first file doesn't have a previous command to add. - eval concat_cmds=\"$reload_cmds $objlist $last_robj\" + reload_objs=$objlist + eval concat_cmds=\"$reload_cmds\" else # All subsequent reloadable object files will link in # the last one created. - eval concat_cmds=\"\$concat_cmds~$reload_cmds $objlist $last_robj~\$RM $last_robj\" + reload_objs="$objlist $last_robj" + eval concat_cmds=\"\$concat_cmds~$reload_cmds~\$RM $last_robj\" fi last_robj=$output_objdir/$output_la-${k}.$objext func_arith $k + 1 k=$func_arith_result output=$output_objdir/$output_la-${k}.$objext - objlist=$obj + objlist=" $obj" func_len " $last_robj" func_arith $len0 + $func_len_result len=$func_arith_result @@ -7210,11 +8393,12 @@ # reloadable object file. All subsequent reloadable object # files will link in the last one created. test -z "$concat_cmds" || concat_cmds=$concat_cmds~ - eval concat_cmds=\"\${concat_cmds}$reload_cmds $objlist $last_robj\" + reload_objs="$objlist $last_robj" + eval concat_cmds=\"\${concat_cmds}$reload_cmds\" if test -n "$last_robj"; then eval concat_cmds=\"\${concat_cmds}~\$RM $last_robj\" fi - delfiles="$delfiles $output" + func_append delfiles " $output" else output= @@ -7248,7 +8432,7 @@ lt_exit=$? # Restore the uninstalled library and exit - if test "$mode" = relink; then + if test "$opt_mode" = relink; then ( cd "$output_objdir" && \ $RM "${realname}T" && \ $MV "${realname}U" "$realname" ) @@ -7269,7 +8453,7 @@ if test -n "$export_symbols" && test -n "$include_expsyms"; then tmp_export_symbols="$export_symbols" test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols" - $opt_dry_run || eval '$ECHO "X$include_expsyms" | $Xsed | $SP2NL >> "$tmp_export_symbols"' + $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"' fi if test -n "$orig_export_symbols"; then @@ -7281,7 +8465,7 @@ # global variables. join(1) would be nice here, but unfortunately # isn't a blessed tool. $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter - delfiles="$delfiles $export_symbols $output_objdir/$libname.filter" + func_append delfiles " $export_symbols $output_objdir/$libname.filter" export_symbols=$output_objdir/$libname.def $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols fi @@ -7322,10 +8506,10 @@ # Add any objects from preloaded convenience libraries if test -n "$dlprefiles"; then gentop="$output_objdir/${outputname}x" - generated="$generated $gentop" + func_append generated " $gentop" func_extract_archives $gentop $dlprefiles - libobjs="$libobjs $func_extract_archives_result" + func_append libobjs " $func_extract_archives_result" test "X$libobjs" = "X " && libobjs= fi @@ -7341,7 +8525,7 @@ lt_exit=$? # Restore the uninstalled library and exit - if test "$mode" = relink; then + if test "$opt_mode" = relink; then ( cd "$output_objdir" && \ $RM "${realname}T" && \ $MV "${realname}U" "$realname" ) @@ -7353,7 +8537,7 @@ IFS="$save_ifs" # Restore the uninstalled library and exit - if test "$mode" = relink; then + if test "$opt_mode" = relink; then $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}T && $MV $realname ${realname}T && $MV ${realname}U $realname)' || exit $? if test -n "$convenience"; then @@ -7434,18 +8618,21 @@ if test -n "$convenience"; then if test -n "$whole_archive_flag_spec"; then eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\" - reload_conv_objs=$reload_objs\ `$ECHO "X$tmp_whole_archive_flags" | $Xsed -e 's|,| |g'` + reload_conv_objs=$reload_objs\ `$ECHO "$tmp_whole_archive_flags" | $SED 's|,| |g'` else gentop="$output_objdir/${obj}x" - generated="$generated $gentop" + func_append generated " $gentop" func_extract_archives $gentop $convenience reload_conv_objs="$reload_objs $func_extract_archives_result" fi fi + # If we're not building shared, we need to use non_pic_objs + test "$build_libtool_libs" != yes && libobjs="$non_pic_objects" + # Create the old-style object. - reload_objs="$objs$old_deplibs "`$ECHO "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}$'/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test + reload_objs="$objs$old_deplibs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.${libext}$/d; /\.lib$/d; $lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test output="$obj" func_execute_cmds "$reload_cmds" 'exit $?' @@ -7505,8 +8692,8 @@ case $host in *-*-rhapsody* | *-*-darwin1.[012]) # On Rhapsody replace the C library is the System framework - compile_deplibs=`$ECHO "X $compile_deplibs" | $Xsed -e 's/ -lc / System.ltframework /'` - finalize_deplibs=`$ECHO "X $finalize_deplibs" | $Xsed -e 's/ -lc / System.ltframework /'` + compile_deplibs=`$ECHO " $compile_deplibs" | $SED 's/ -lc / System.ltframework /'` + finalize_deplibs=`$ECHO " $finalize_deplibs" | $SED 's/ -lc / System.ltframework /'` ;; esac @@ -7517,14 +8704,14 @@ if test "$tagname" = CXX ; then case ${MACOSX_DEPLOYMENT_TARGET-10.0} in 10.[0123]) - compile_command="$compile_command ${wl}-bind_at_load" - finalize_command="$finalize_command ${wl}-bind_at_load" + func_append compile_command " ${wl}-bind_at_load" + func_append finalize_command " ${wl}-bind_at_load" ;; esac fi # Time to change all our "foo.ltframework" stuff back to "-framework foo" - compile_deplibs=`$ECHO "X $compile_deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` - finalize_deplibs=`$ECHO "X $finalize_deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` + compile_deplibs=`$ECHO " $compile_deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` + finalize_deplibs=`$ECHO " $finalize_deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` ;; esac @@ -7538,7 +8725,7 @@ *) case " $compile_deplibs " in *" -L$path/$objdir "*) - new_libs="$new_libs -L$path/$objdir" ;; + func_append new_libs " -L$path/$objdir" ;; esac ;; esac @@ -7548,17 +8735,17 @@ -L*) case " $new_libs " in *" $deplib "*) ;; - *) new_libs="$new_libs $deplib" ;; + *) func_append new_libs " $deplib" ;; esac ;; - *) new_libs="$new_libs $deplib" ;; + *) func_append new_libs " $deplib" ;; esac done compile_deplibs="$new_libs" - compile_command="$compile_command $compile_deplibs" - finalize_command="$finalize_command $finalize_deplibs" + func_append compile_command " $compile_deplibs" + func_append finalize_command " $finalize_deplibs" if test -n "$rpath$xrpath"; then # If the user specified any rpath flags, then add them. @@ -7566,7 +8753,7 @@ # This is the magic to use -rpath. case "$finalize_rpath " in *" $libdir "*) ;; - *) finalize_rpath="$finalize_rpath $libdir" ;; + *) func_append finalize_rpath " $libdir" ;; esac done fi @@ -7585,18 +8772,18 @@ *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) - hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" + func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" - rpath="$rpath $flag" + func_append rpath " $flag" fi elif test -n "$runpath_var"; then case "$perm_rpath " in *" $libdir "*) ;; - *) perm_rpath="$perm_rpath $libdir" ;; + *) func_append perm_rpath " $libdir" ;; esac fi case $host in @@ -7605,12 +8792,12 @@ case :$dllsearchpath: in *":$libdir:"*) ;; ::) dllsearchpath=$libdir;; - *) dllsearchpath="$dllsearchpath:$libdir";; + *) func_append dllsearchpath ":$libdir";; esac case :$dllsearchpath: in *":$testbindir:"*) ;; ::) dllsearchpath=$testbindir;; - *) dllsearchpath="$dllsearchpath:$testbindir";; + *) func_append dllsearchpath ":$testbindir";; esac ;; esac @@ -7636,18 +8823,18 @@ *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) - hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" + func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" - rpath="$rpath $flag" + func_append rpath " $flag" fi elif test -n "$runpath_var"; then case "$finalize_perm_rpath " in *" $libdir "*) ;; - *) finalize_perm_rpath="$finalize_perm_rpath $libdir" ;; + *) func_append finalize_perm_rpath " $libdir" ;; esac fi done @@ -7661,8 +8848,8 @@ if test -n "$libobjs" && test "$build_old_libs" = yes; then # Transform all the library objects into standard objects. - compile_command=`$ECHO "X$compile_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` - finalize_command=`$ECHO "X$finalize_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` + compile_command=`$ECHO "$compile_command" | $SP2NL | $SED "$lo2o" | $NL2SP` + finalize_command=`$ECHO "$finalize_command" | $SP2NL | $SED "$lo2o" | $NL2SP` fi func_generate_dlsyms "$outputname" "@PROGRAM@" "no" @@ -7674,15 +8861,15 @@ wrappers_required=yes case $host in + *cegcc* | *mingw32ce*) + # Disable wrappers for cegcc and mingw32ce hosts, we are cross compiling anyway. + wrappers_required=no + ;; *cygwin* | *mingw* ) if test "$build_libtool_libs" != yes; then wrappers_required=no fi ;; - *cegcc) - # Disable wrappers for cegcc, we are cross compiling anyway. - wrappers_required=no - ;; *) if test "$need_relink" = no || test "$build_libtool_libs" != yes; then wrappers_required=no @@ -7691,13 +8878,19 @@ esac if test "$wrappers_required" = no; then # Replace the output file specification. - compile_command=`$ECHO "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'` + compile_command=`$ECHO "$compile_command" | $SED 's%@OUTPUT@%'"$output"'%g'` link_command="$compile_command$compile_rpath" # We have no uninstalled library dependencies, so finalize right now. exit_status=0 func_show_eval "$link_command" 'exit_status=$?' + if test -n "$postlink_cmds"; then + func_to_tool_file "$output" + postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` + func_execute_cmds "$postlink_cmds" 'exit $?' + fi + # Delete the generated files. if test -f "$output_objdir/${outputname}S.${objext}"; then func_show_eval '$RM "$output_objdir/${outputname}S.${objext}"' @@ -7720,7 +8913,7 @@ # We should set the runpath_var. rpath= for dir in $perm_rpath; do - rpath="$rpath$dir:" + func_append rpath "$dir:" done compile_var="$runpath_var=\"$rpath\$$runpath_var\" " fi @@ -7728,7 +8921,7 @@ # We should set the runpath_var. rpath= for dir in $finalize_perm_rpath; do - rpath="$rpath$dir:" + func_append rpath "$dir:" done finalize_var="$runpath_var=\"$rpath\$$runpath_var\" " fi @@ -7738,11 +8931,18 @@ # We don't need to create a wrapper script. link_command="$compile_var$compile_command$compile_rpath" # Replace the output file specification. - link_command=`$ECHO "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'` + link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output"'%g'` # Delete the old output file. $opt_dry_run || $RM $output # Link the executable and exit func_show_eval "$link_command" 'exit $?' + + if test -n "$postlink_cmds"; then + func_to_tool_file "$output" + postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` + func_execute_cmds "$postlink_cmds" 'exit $?' + fi + exit $EXIT_SUCCESS fi @@ -7757,7 +8957,7 @@ if test "$fast_install" != no; then link_command="$finalize_var$compile_command$finalize_rpath" if test "$fast_install" = yes; then - relink_command=`$ECHO "X$compile_var$compile_command$compile_rpath" | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g'` + relink_command=`$ECHO "$compile_var$compile_command$compile_rpath" | $SED 's%@OUTPUT@%\$progdir/\$file%g'` else # fast_install is set to needless relink_command= @@ -7769,13 +8969,19 @@ fi # Replace the output file specification. - link_command=`$ECHO "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'` + link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'` # Delete the old output files. $opt_dry_run || $RM $output $output_objdir/$outputname $output_objdir/lt-$outputname func_show_eval "$link_command" 'exit $?' + if test -n "$postlink_cmds"; then + func_to_tool_file "$output_objdir/$outputname" + postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` + func_execute_cmds "$postlink_cmds" 'exit $?' + fi + # Now create the wrapper script. func_verbose "creating $output" @@ -7793,18 +8999,7 @@ fi done relink_command="(cd `pwd`; $relink_command)" - relink_command=`$ECHO "X$relink_command" | $Xsed -e "$sed_quote_subst"` - fi - - # Quote $ECHO for shipping. - if test "X$ECHO" = "X$SHELL $progpath --fallback-echo"; then - case $progpath in - [\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $progpath --fallback-echo";; - *) qecho="$SHELL `pwd`/$progpath --fallback-echo";; - esac - qecho=`$ECHO "X$qecho" | $Xsed -e "$sed_quote_subst"` - else - qecho=`$ECHO "X$ECHO" | $Xsed -e "$sed_quote_subst"` + relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"` fi # Only actually do things if not in dry run mode. @@ -7884,7 +9079,7 @@ else oldobjs="$old_deplibs $non_pic_objects" if test "$preload" = yes && test -f "$symfileobj"; then - oldobjs="$oldobjs $symfileobj" + func_append oldobjs " $symfileobj" fi fi addlibs="$old_convenience" @@ -7892,10 +9087,10 @@ if test -n "$addlibs"; then gentop="$output_objdir/${outputname}x" - generated="$generated $gentop" + func_append generated " $gentop" func_extract_archives $gentop $addlibs - oldobjs="$oldobjs $func_extract_archives_result" + func_append oldobjs " $func_extract_archives_result" fi # Do each command in the archive commands. @@ -7906,10 +9101,10 @@ # Add any objects from preloaded convenience libraries if test -n "$dlprefiles"; then gentop="$output_objdir/${outputname}x" - generated="$generated $gentop" + func_append generated " $gentop" func_extract_archives $gentop $dlprefiles - oldobjs="$oldobjs $func_extract_archives_result" + func_append oldobjs " $func_extract_archives_result" fi # POSIX demands no paths to be encoded in archives. We have @@ -7925,9 +9120,9 @@ done | sort | sort -uc >/dev/null 2>&1); then : else - $ECHO "copying selected object files to avoid basename conflicts..." + echo "copying selected object files to avoid basename conflicts..." gentop="$output_objdir/${outputname}x" - generated="$generated $gentop" + func_append generated " $gentop" func_mkdir_p "$gentop" save_oldobjs=$oldobjs oldobjs= @@ -7951,9 +9146,9 @@ esac done func_show_eval "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj" - oldobjs="$oldobjs $gentop/$newobj" + func_append oldobjs " $gentop/$newobj" ;; - *) oldobjs="$oldobjs $obj" ;; + *) func_append oldobjs " $obj" ;; esac done fi @@ -7963,6 +9158,16 @@ len=$func_len_result if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then cmds=$old_archive_cmds + elif test -n "$archiver_list_spec"; then + func_verbose "using command file archive linking..." + for obj in $oldobjs + do + func_to_tool_file "$obj" + $ECHO "$func_to_tool_file_result" + done > $output_objdir/$libname.libcmd + func_to_tool_file "$output_objdir/$libname.libcmd" + oldobjs=" $archiver_list_spec$func_to_tool_file_result" + cmds=$old_archive_cmds else # the command line is too long to link in one step, link in parts func_verbose "using piecewise archive linking..." @@ -8036,7 +9241,7 @@ done # Quote the link command for shipping. relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)" - relink_command=`$ECHO "X$relink_command" | $Xsed -e "$sed_quote_subst"` + relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"` if test "$hardcode_automatic" = yes ; then relink_command= fi @@ -8059,9 +9264,19 @@ eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` test -z "$libdir" && \ func_fatal_error "\`$deplib' is not a valid libtool archive" - newdependency_libs="$newdependency_libs $libdir/$name" + func_append newdependency_libs " ${lt_sysroot:+=}$libdir/$name" + ;; + -L*) + func_stripname -L '' "$deplib" + func_replace_sysroot "$func_stripname_result" + func_append newdependency_libs " -L$func_replace_sysroot_result" ;; - *) newdependency_libs="$newdependency_libs $deplib" ;; + -R*) + func_stripname -R '' "$deplib" + func_replace_sysroot "$func_stripname_result" + func_append newdependency_libs " -R$func_replace_sysroot_result" + ;; + *) func_append newdependency_libs " $deplib" ;; esac done dependency_libs="$newdependency_libs" @@ -8075,9 +9290,9 @@ eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` test -z "$libdir" && \ func_fatal_error "\`$lib' is not a valid libtool archive" - newdlfiles="$newdlfiles $libdir/$name" + func_append newdlfiles " ${lt_sysroot:+=}$libdir/$name" ;; - *) newdlfiles="$newdlfiles $lib" ;; + *) func_append newdlfiles " $lib" ;; esac done dlfiles="$newdlfiles" @@ -8094,7 +9309,7 @@ eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` test -z "$libdir" && \ func_fatal_error "\`$lib' is not a valid libtool archive" - newdlprefiles="$newdlprefiles $libdir/$name" + func_append newdlprefiles " ${lt_sysroot:+=}$libdir/$name" ;; esac done @@ -8106,7 +9321,7 @@ [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; *) abs=`pwd`"/$lib" ;; esac - newdlfiles="$newdlfiles $abs" + func_append newdlfiles " $abs" done dlfiles="$newdlfiles" newdlprefiles= @@ -8115,15 +9330,33 @@ [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; *) abs=`pwd`"/$lib" ;; esac - newdlprefiles="$newdlprefiles $abs" + func_append newdlprefiles " $abs" done dlprefiles="$newdlprefiles" fi $RM $output # place dlname in correct position for cygwin + # In fact, it would be nice if we could use this code for all target + # systems that can't hard-code library paths into their executables + # and that have no shared library path variable independent of PATH, + # but it turns out we can't easily determine that from inspecting + # libtool variables, so we have to hard-code the OSs to which it + # applies here; at the moment, that means platforms that use the PE + # object format with DLL files. See the long comment at the top of + # tests/bindir.at for full details. tdlname=$dlname case $host,$output,$installed,$module,$dlname in - *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;; + *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll) + # If a -bindir argument was supplied, place the dll there. + if test "x$bindir" != x ; + then + func_relative_path "$install_libdir" "$bindir" + tdlname=$func_relative_path_result$dlname + else + # Otherwise fall back on heuristic. + tdlname=../bin/$dlname + fi + ;; esac $ECHO > $output "\ # $outputname - a libtool library file @@ -8182,7 +9415,7 @@ exit $EXIT_SUCCESS } -{ test "$mode" = link || test "$mode" = relink; } && +{ test "$opt_mode" = link || test "$opt_mode" = relink; } && func_mode_link ${1+"$@"} @@ -8202,9 +9435,9 @@ for arg do case $arg in - -f) RM="$RM $arg"; rmforce=yes ;; - -*) RM="$RM $arg" ;; - *) files="$files $arg" ;; + -f) func_append RM " $arg"; rmforce=yes ;; + -*) func_append RM " $arg" ;; + *) func_append files " $arg" ;; esac done @@ -8213,24 +9446,23 @@ rmdirs= - origobjdir="$objdir" for file in $files; do func_dirname "$file" "" "." dir="$func_dirname_result" if test "X$dir" = X.; then - objdir="$origobjdir" + odir="$objdir" else - objdir="$dir/$origobjdir" + odir="$dir/$objdir" fi func_basename "$file" name="$func_basename_result" - test "$mode" = uninstall && objdir="$dir" + test "$opt_mode" = uninstall && odir="$dir" - # Remember objdir for removal later, being careful to avoid duplicates - if test "$mode" = clean; then + # Remember odir for removal later, being careful to avoid duplicates + if test "$opt_mode" = clean; then case " $rmdirs " in - *" $objdir "*) ;; - *) rmdirs="$rmdirs $objdir" ;; + *" $odir "*) ;; + *) func_append rmdirs " $odir" ;; esac fi @@ -8256,18 +9488,17 @@ # Delete the libtool libraries and symlinks. for n in $library_names; do - rmfiles="$rmfiles $objdir/$n" + func_append rmfiles " $odir/$n" done - test -n "$old_library" && rmfiles="$rmfiles $objdir/$old_library" + test -n "$old_library" && func_append rmfiles " $odir/$old_library" - case "$mode" in + case "$opt_mode" in clean) - case " $library_names " in - # " " in the beginning catches empty $dlname + case " $library_names " in *" $dlname "*) ;; - *) rmfiles="$rmfiles $objdir/$dlname" ;; + *) test -n "$dlname" && func_append rmfiles " $odir/$dlname" ;; esac - test -n "$libdir" && rmfiles="$rmfiles $objdir/$name $objdir/${name}i" + test -n "$libdir" && func_append rmfiles " $odir/$name $odir/${name}i" ;; uninstall) if test -n "$library_names"; then @@ -8295,19 +9526,19 @@ # Add PIC object to the list of files to remove. if test -n "$pic_object" && test "$pic_object" != none; then - rmfiles="$rmfiles $dir/$pic_object" + func_append rmfiles " $dir/$pic_object" fi # Add non-PIC object to the list of files to remove. if test -n "$non_pic_object" && test "$non_pic_object" != none; then - rmfiles="$rmfiles $dir/$non_pic_object" + func_append rmfiles " $dir/$non_pic_object" fi fi ;; *) - if test "$mode" = clean ; then + if test "$opt_mode" = clean ; then noexename=$name case $file in *.exe) @@ -8317,7 +9548,7 @@ noexename=$func_stripname_result # $file with .exe has already been added to rmfiles, # add $file without .exe - rmfiles="$rmfiles $file" + func_append rmfiles " $file" ;; esac # Do a test to see if this is a libtool program. @@ -8326,7 +9557,7 @@ func_ltwrapper_scriptname "$file" relink_command= func_source $func_ltwrapper_scriptname_result - rmfiles="$rmfiles $func_ltwrapper_scriptname_result" + func_append rmfiles " $func_ltwrapper_scriptname_result" else relink_command= func_source $dir/$noexename @@ -8334,12 +9565,12 @@ # note $name still contains .exe if it was in $file originally # as does the version of $file that was added into $rmfiles - rmfiles="$rmfiles $objdir/$name $objdir/${name}S.${objext}" + func_append rmfiles " $odir/$name $odir/${name}S.${objext}" if test "$fast_install" = yes && test -n "$relink_command"; then - rmfiles="$rmfiles $objdir/lt-$name" + func_append rmfiles " $odir/lt-$name" fi if test "X$noexename" != "X$name" ; then - rmfiles="$rmfiles $objdir/lt-${noexename}.c" + func_append rmfiles " $odir/lt-${noexename}.c" fi fi fi @@ -8347,7 +9578,6 @@ esac func_show_eval "$RM $rmfiles" 'exit_status=1' done - objdir="$origobjdir" # Try to remove the ${objdir}s in the directories where we deleted files for dir in $rmdirs; do @@ -8359,16 +9589,16 @@ exit $exit_status } -{ test "$mode" = uninstall || test "$mode" = clean; } && +{ test "$opt_mode" = uninstall || test "$opt_mode" = clean; } && func_mode_uninstall ${1+"$@"} -test -z "$mode" && { +test -z "$opt_mode" && { help="$generic_help" func_fatal_help "you must specify a MODE" } test -z "$exec_cmd" && \ - func_fatal_help "invalid operation mode \`$mode'" + func_fatal_help "invalid operation mode \`$opt_mode'" if test -n "$exec_cmd"; then eval exec "$exec_cmd" diff -Nru libgetdata-0.7.0/m4/libtool.m4 libgetdata-0.7.1/m4/libtool.m4 --- libgetdata-0.7.0/m4/libtool.m4 2010-05-12 07:31:16.000000000 +0000 +++ libgetdata-0.7.1/m4/libtool.m4 2010-11-12 21:34:20.000000000 +0000 @@ -1,7 +1,8 @@ # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- # # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, -# 2006, 2007, 2008 Free Software Foundation, Inc. +# 2006, 2007, 2008, 2009, 2010 Free Software Foundation, +# Inc. # Written by Gordon Matzigkeit, 1996 # # This file is free software; the Free Software Foundation gives @@ -10,7 +11,8 @@ m4_define([_LT_COPYING], [dnl # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, -# 2006, 2007, 2008 Free Software Foundation, Inc. +# 2006, 2007, 2008, 2009, 2010 Free Software Foundation, +# Inc. # Written by Gordon Matzigkeit, 1996 # # This file is part of GNU Libtool. @@ -37,7 +39,7 @@ # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ]) -# serial 56 LT_INIT +# serial 57 LT_INIT # LT_PREREQ(VERSION) @@ -66,6 +68,7 @@ # ------------------ AC_DEFUN([LT_INIT], [AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT +AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl AC_BEFORE([$0], [LT_LANG])dnl AC_BEFORE([$0], [LT_OUTPUT])dnl AC_BEFORE([$0], [LTDL_INIT])dnl @@ -82,6 +85,8 @@ AC_REQUIRE([LTOBSOLETE_VERSION])dnl m4_require([_LT_PROG_LTMAIN])dnl +_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}]) + dnl Parse OPTIONS _LT_SET_OPTIONS([$0], [$1]) @@ -118,7 +123,7 @@ *) break;; esac done -cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` +cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` ]) @@ -138,6 +143,9 @@ m4_defun([_LT_SETUP], [AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl +AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl +AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl + _LT_DECL([], [host_alias], [0], [The host system])dnl _LT_DECL([], [host], [0])dnl _LT_DECL([], [host_os], [0])dnl @@ -160,10 +168,13 @@ dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_CHECK_SHELL_FEATURES])dnl +m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl m4_require([_LT_CMD_RELOAD])dnl m4_require([_LT_CHECK_MAGIC_METHOD])dnl +m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl m4_require([_LT_CMD_OLD_ARCHIVE])dnl m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl +m4_require([_LT_WITH_SYSROOT])dnl _LT_CONFIG_LIBTOOL_INIT([ # See if we are running on zsh, and set the options which allow our @@ -179,7 +190,6 @@ _LT_CHECK_OBJDIR m4_require([_LT_TAG_COMPILER])dnl -_LT_PROG_ECHO_BACKSLASH case $host_os in aix3*) @@ -193,23 +203,6 @@ ;; esac -# Sed substitution that helps us do robust quoting. It backslashifies -# metacharacters that are still active within double-quoted strings. -sed_quote_subst='s/\([["`$\\]]\)/\\\1/g' - -# Same as above, but do not quote variable references. -double_quote_subst='s/\([["`\\]]\)/\\\1/g' - -# Sed substitution to delay expansion of an escaped shell variable in a -# double_quote_subst'ed string. -delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' - -# Sed substitution to delay expansion of an escaped single quote. -delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' - -# Sed substitution to avoid accidental globbing in evaled expressions -no_glob_subst='s/\*/\\\*/g' - # Global variables: ofile=libtool can_build_shared=yes @@ -250,6 +243,28 @@ ])# _LT_SETUP +# _LT_PREPARE_SED_QUOTE_VARS +# -------------------------- +# Define a few sed substitution that help us do robust quoting. +m4_defun([_LT_PREPARE_SED_QUOTE_VARS], +[# Backslashify metacharacters that are still active within +# double-quoted strings. +sed_quote_subst='s/\([["`$\\]]\)/\\\1/g' + +# Same as above, but do not quote variable references. +double_quote_subst='s/\([["`\\]]\)/\\\1/g' + +# Sed substitution to delay expansion of an escaped shell variable in a +# double_quote_subst'ed string. +delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' + +# Sed substitution to delay expansion of an escaped single quote. +delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' + +# Sed substitution to avoid accidental globbing in evaled expressions +no_glob_subst='s/\*/\\\*/g' +]) + # _LT_PROG_LTMAIN # --------------- # Note that this code is called both from `configure', and `config.status' @@ -408,7 +423,7 @@ # declaration there will have the same value as in `configure'. VARNAME # must have a single quote delimited value for this to work. m4_define([_LT_CONFIG_STATUS_DECLARE], -[$1='`$ECHO "X$][$1" | $Xsed -e "$delay_single_quote_subst"`']) +[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`']) # _LT_CONFIG_STATUS_DECLARATIONS @@ -418,7 +433,7 @@ # embedded single quotes properly. In configure, this macro expands # each variable declared with _LT_DECL (and _LT_TAGDECL) into: # -# ='`$ECHO "X$" | $Xsed -e "$delay_single_quote_subst"`' +# ='`$ECHO "$" | $SED "$delay_single_quote_subst"`' m4_defun([_LT_CONFIG_STATUS_DECLARATIONS], [m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) @@ -517,12 +532,20 @@ LTCFLAGS='$LTCFLAGS' compiler='$compiler_DEFAULT' +# A function that is used when there is no print builtin or printf. +func_fallback_echo () +{ + eval 'cat <<_LTECHO_EOF +\$[]1 +_LTECHO_EOF' +} + # Quote evaled strings. for var in lt_decl_all_varnames([[ \ ]], lt_decl_quote_varnames); do - case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in + case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[[\\\\\\\`\\"\\\$]]*) - eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" + eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" @@ -533,9 +556,9 @@ # Double-quote double-evaled strings. for var in lt_decl_all_varnames([[ \ ]], lt_decl_dquote_varnames); do - case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in + case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[[\\\\\\\`\\"\\\$]]*) - eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" + eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" @@ -543,16 +566,38 @@ esac done -# Fix-up fallback echo if it was mangled by the above quoting rules. -case \$lt_ECHO in -*'\\\[$]0 --fallback-echo"')dnl " - lt_ECHO=\`\$ECHO "X\$lt_ECHO" | \$Xsed -e 's/\\\\\\\\\\\\\\\[$]0 --fallback-echo"\[$]/\[$]0 --fallback-echo"/'\` - ;; -esac - _LT_OUTPUT_LIBTOOL_INIT ]) +# _LT_GENERATED_FILE_INIT(FILE, [COMMENT]) +# ------------------------------------ +# Generate a child script FILE with all initialization necessary to +# reuse the environment learned by the parent script, and make the +# file executable. If COMMENT is supplied, it is inserted after the +# `#!' sequence but before initialization text begins. After this +# macro, additional text can be appended to FILE to form the body of +# the child script. The macro ends with non-zero status if the +# file could not be fully written (such as if the disk is full). +m4_ifdef([AS_INIT_GENERATED], +[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])], +[m4_defun([_LT_GENERATED_FILE_INIT], +[m4_require([AS_PREPARE])]dnl +[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl +[lt_write_fail=0 +cat >$1 <<_ASEOF || lt_write_fail=1 +#! $SHELL +# Generated by $as_me. +$2 +SHELL=\${CONFIG_SHELL-$SHELL} +export SHELL +_ASEOF +cat >>$1 <<\_ASEOF || lt_write_fail=1 +AS_SHELL_SANITIZE +_AS_PREPARE +exec AS_MESSAGE_FD>&1 +_ASEOF +test $lt_write_fail = 0 && chmod +x $1[]dnl +m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT # LT_OUTPUT # --------- @@ -562,20 +607,11 @@ AC_DEFUN([LT_OUTPUT], [: ${CONFIG_LT=./config.lt} AC_MSG_NOTICE([creating $CONFIG_LT]) -cat >"$CONFIG_LT" <<_LTEOF -#! $SHELL -# Generated by $as_me. -# Run this file to recreate a libtool stub with the current configuration. - -lt_cl_silent=false -SHELL=\${CONFIG_SHELL-$SHELL} -_LTEOF +_LT_GENERATED_FILE_INIT(["$CONFIG_LT"], +[# Run this file to recreate a libtool stub with the current configuration.]) cat >>"$CONFIG_LT" <<\_LTEOF -AS_SHELL_SANITIZE -_AS_PREPARE - -exec AS_MESSAGE_FD>&1 +lt_cl_silent=false exec AS_MESSAGE_LOG_FD>>config.log { echo @@ -601,7 +637,7 @@ m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) configured by $[0], generated by m4_PACKAGE_STRING. -Copyright (C) 2008 Free Software Foundation, Inc. +Copyright (C) 2010 Free Software Foundation, Inc. This config.lt script is free software; the Free Software Foundation gives unlimited permision to copy, distribute and modify it." @@ -646,15 +682,13 @@ # appending to config.log, which fails on DOS, as config.log is still kept # open by configure. Here we exec the FD to /dev/null, effectively closing # config.log, so it can be properly (re)opened and appended to by config.lt. -if test "$no_create" != yes; then - lt_cl_success=: - test "$silent" = yes && - lt_config_lt_args="$lt_config_lt_args --quiet" - exec AS_MESSAGE_LOG_FD>/dev/null - $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false - exec AS_MESSAGE_LOG_FD>>config.log - $lt_cl_success || AS_EXIT(1) -fi +lt_cl_success=: +test "$silent" = yes && + lt_config_lt_args="$lt_config_lt_args --quiet" +exec AS_MESSAGE_LOG_FD>/dev/null +$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false +exec AS_MESSAGE_LOG_FD>>config.log +$lt_cl_success || AS_EXIT(1) ])# LT_OUTPUT @@ -717,15 +751,12 @@ # if finds mixed CR/LF and LF-only lines. Since sed operates in # text mode, it properly converts lines to CR/LF. This bash problem # is reportedly fixed, but why not run on old versions too? - sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \ - || (rm -f "$cfgfile"; exit 1) + sed '$q' "$ltmain" >> "$cfgfile" \ + || (rm -f "$cfgfile"; exit 1) - _LT_PROG_XSI_SHELLFNS + _LT_PROG_REPLACE_SHELLFNS - sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \ - || (rm -f "$cfgfile"; exit 1) - - mv -f "$cfgfile" "$ofile" || + mv -f "$cfgfile" "$ofile" || (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") chmod +x "$ofile" ], @@ -831,11 +862,13 @@ AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) +AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_CXX], []) dnl AC_DEFUN([AC_LIBTOOL_F77], []) dnl AC_DEFUN([AC_LIBTOOL_FC], []) dnl AC_DEFUN([AC_LIBTOOL_GCJ], []) +dnl AC_DEFUN([AC_LIBTOOL_RC], []) # _LT_TAG_COMPILER @@ -940,6 +973,31 @@ [lt_cv_ld_exported_symbols_list=no]) LDFLAGS="$save_LDFLAGS" ]) + AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load], + [lt_cv_ld_force_load=no + cat > conftest.c << _LT_EOF +int forced_loaded() { return 2;} +_LT_EOF + echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD + $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD + echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD + $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD + echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD + $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD + cat > conftest.c << _LT_EOF +int main() { return 0;} +_LT_EOF + echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD + $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err + _lt_result=$? + if test -f conftest && test ! -s conftest.err && test $_lt_result = 0 && $GREP forced_load conftest 2>&1 >/dev/null; then + lt_cv_ld_force_load=yes + else + cat conftest.err >&AS_MESSAGE_LOG_FD + fi + rm -f conftest.err libconftest.a conftest conftest.c + rm -rf conftest.dSYM + ]) case $host_os in rhapsody* | darwin1.[[012]]) _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; @@ -967,7 +1025,7 @@ else _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' fi - if test "$DSYMUTIL" != ":"; then + if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then _lt_dsymutil='~$DSYMUTIL $lib || :' else _lt_dsymutil= @@ -987,7 +1045,11 @@ _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_automatic, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported - _LT_TAGVAR(whole_archive_flag_spec, $1)='' + if test "$lt_cv_ld_force_load" = "yes"; then + _LT_TAGVAR(whole_archive_flag_spec, $1)='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' + else + _LT_TAGVAR(whole_archive_flag_spec, $1)='' + fi _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined" case $cc_basename in @@ -995,7 +1057,7 @@ *) _lt_dar_can_shared=$GCC ;; esac if test "$_lt_dar_can_shared" = "yes"; then - output_verbose_link_cmd=echo + output_verbose_link_cmd=func_echo_all _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" @@ -1011,203 +1073,142 @@ fi ]) -# _LT_SYS_MODULE_PATH_AIX -# ----------------------- +# _LT_SYS_MODULE_PATH_AIX([TAGNAME]) +# ---------------------------------- # Links a minimal program and checks the executable # for the system default hardcoded library path. In most cases, # this is /usr/lib:/lib, but when the MPI compilers are used # the location of the communication and MPI libs are included too. # If we don't find anything, use the default library path according # to the aix ld manual. +# Store the results from the different compilers for each TAGNAME. +# Allow to override them for all tags through lt_cv_aix_libpath. m4_defun([_LT_SYS_MODULE_PATH_AIX], [m4_require([_LT_DECL_SED])dnl -AC_LINK_IFELSE(AC_LANG_PROGRAM,[ -lt_aix_libpath_sed=' - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\(.*\)$/\1/ - p - } - }' -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -# Check for a 64-bit object if we didn't find anything. -if test -z "$aix_libpath"; then - aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -fi],[]) -if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi +if test "${lt_cv_aix_libpath+set}" = set; then + aix_libpath=$lt_cv_aix_libpath +else + AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])], + [AC_LINK_IFELSE([AC_LANG_PROGRAM],[ + lt_aix_libpath_sed='[ + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\([^ ]*\) *$/\1/ + p + } + }]' + _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + # Check for a 64-bit object if we didn't find anything. + if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then + _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + fi],[]) + if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then + _LT_TAGVAR([lt_cv_aix_libpath_], [$1])="/usr/lib:/lib" + fi + ]) + aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1]) +fi ])# _LT_SYS_MODULE_PATH_AIX # _LT_SHELL_INIT(ARG) # ------------------- m4_define([_LT_SHELL_INIT], -[ifdef([AC_DIVERSION_NOTICE], - [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)], - [AC_DIVERT_PUSH(NOTICE)]) -$1 -AC_DIVERT_POP -])# _LT_SHELL_INIT +[m4_divert_text([M4SH-INIT], [$1 +])])# _LT_SHELL_INIT + # _LT_PROG_ECHO_BACKSLASH # ----------------------- -# Add some code to the start of the generated configure script which -# will find an echo command which doesn't interpret backslashes. +# Find how we can fake an echo command that does not interpret backslash. +# In particular, with Autoconf 2.60 or later we add some code to the start +# of the generated configure script which will find a shell with a builtin +# printf (which we can use as an echo command). m4_defun([_LT_PROG_ECHO_BACKSLASH], -[_LT_SHELL_INIT([ -# Check that we are running under the correct shell. -SHELL=${CONFIG_SHELL-/bin/sh} - -case X$lt_ECHO in -X*--fallback-echo) - # Remove one level of quotation (which was required for Make). - ECHO=`echo "$lt_ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','` - ;; -esac - -ECHO=${lt_ECHO-echo} -if test "X[$]1" = X--no-reexec; then - # Discard the --no-reexec flag, and continue. - shift -elif test "X[$]1" = X--fallback-echo; then - # Avoid inline document here, it may be left over - : -elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' ; then - # Yippee, $ECHO works! - : +[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' +ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO +ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO + +AC_MSG_CHECKING([how to print strings]) +# Test print first, because it will be a builtin if present. +if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ + test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then + ECHO='print -r --' +elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then + ECHO='printf %s\n' else - # Restart under the correct shell. - exec $SHELL "[$]0" --no-reexec ${1+"[$]@"} -fi - -if test "X[$]1" = X--fallback-echo; then - # used as fallback echo - shift - cat <<_LT_EOF -[$]* -_LT_EOF - exit 0 + # Use this function as a fallback that always works. + func_fallback_echo () + { + eval 'cat <<_LTECHO_EOF +$[]1 +_LTECHO_EOF' + } + ECHO='func_fallback_echo' fi -# The HP-UX ksh and POSIX shell print the target directory to stdout -# if CDPATH is set. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - -if test -z "$lt_ECHO"; then - if test "X${echo_test_string+set}" != Xset; then - # find a string as large as possible, as long as the shell can cope with it - for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do - # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... - if { echo_test_string=`eval $cmd`; } 2>/dev/null && - { test "X$echo_test_string" = "X$echo_test_string"; } 2>/dev/null - then - break - fi - done - fi - - if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' && - echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - : - else - # The Solaris, AIX, and Digital Unix default echo programs unquote - # backslashes. This makes it impossible to quote backslashes using - # echo "$something" | sed 's/\\/\\\\/g' - # - # So, first we look for a working echo in the user's PATH. - - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - for dir in $PATH /usr/ucb; do - IFS="$lt_save_ifs" - if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && - test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && - echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - ECHO="$dir/echo" - break - fi - done - IFS="$lt_save_ifs" - - if test "X$ECHO" = Xecho; then - # We didn't find a better echo, so look for alternatives. - if test "X`{ print -r '\t'; } 2>/dev/null`" = 'X\t' && - echo_testing_string=`{ print -r "$echo_test_string"; } 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - # This shell has a builtin print -r that does the trick. - ECHO='print -r' - elif { test -f /bin/ksh || test -f /bin/ksh$ac_exeext; } && - test "X$CONFIG_SHELL" != X/bin/ksh; then - # If we have ksh, try running configure again with it. - ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} - export ORIGINAL_CONFIG_SHELL - CONFIG_SHELL=/bin/ksh - export CONFIG_SHELL - exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"} - else - # Try using printf. - ECHO='printf %s\n' - if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' && - echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - # Cool, printf works - : - elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && - test "X$echo_testing_string" = 'X\t' && - echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL - export CONFIG_SHELL - SHELL="$CONFIG_SHELL" - export SHELL - ECHO="$CONFIG_SHELL [$]0 --fallback-echo" - elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && - test "X$echo_testing_string" = 'X\t' && - echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - ECHO="$CONFIG_SHELL [$]0 --fallback-echo" - else - # maybe with a smaller string... - prev=: - - for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do - if { test "X$echo_test_string" = "X`eval $cmd`"; } 2>/dev/null - then - break - fi - prev="$cmd" - done +# func_echo_all arg... +# Invoke $ECHO with all args, space-separated. +func_echo_all () +{ + $ECHO "$*" +} - if test "$prev" != 'sed 50q "[$]0"'; then - echo_test_string=`eval $prev` - export echo_test_string - exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"} - else - # Oops. We lost completely, so just stick with echo. - ECHO=echo - fi - fi - fi - fi - fi -fi +case "$ECHO" in + printf*) AC_MSG_RESULT([printf]) ;; + print*) AC_MSG_RESULT([print -r]) ;; + *) AC_MSG_RESULT([cat]) ;; +esac -# Copy echo and quote the copy suitably for passing to libtool from -# the Makefile, instead of quoting the original, which is used later. -lt_ECHO=$ECHO -if test "X$lt_ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then - lt_ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo" -fi +m4_ifdef([_AS_DETECT_SUGGESTED], +[_AS_DETECT_SUGGESTED([ + test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || ( + ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' + ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO + ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO + PATH=/empty FPATH=/empty; export PATH FPATH + test "X`printf %s $ECHO`" = "X$ECHO" \ + || test "X`print -r -- $ECHO`" = "X$ECHO" )])]) -AC_SUBST(lt_ECHO) -]) _LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) -_LT_DECL([], [ECHO], [1], - [An echo program that does not interpret backslashes]) +_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes]) ])# _LT_PROG_ECHO_BACKSLASH +# _LT_WITH_SYSROOT +# ---------------- +AC_DEFUN([_LT_WITH_SYSROOT], +[AC_MSG_CHECKING([for sysroot]) +AC_ARG_WITH([sysroot], +[ --with-sysroot[=DIR] Search for dependent libraries within DIR + (or the compiler's sysroot if not specified).], +[], [with_sysroot=no]) + +dnl lt_sysroot will always be passed unquoted. We quote it here +dnl in case the user passed a directory name. +lt_sysroot= +case ${with_sysroot} in #( + yes) + if test "$GCC" = yes; then + lt_sysroot=`$CC --print-sysroot 2>/dev/null` + fi + ;; #( + /*) + lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` + ;; #( + no|'') + ;; #( + *) + AC_MSG_RESULT([${with_sysroot}]) + AC_MSG_ERROR([The sysroot must be an absolute path.]) + ;; +esac + + AC_MSG_RESULT([${lt_sysroot:-no}]) +_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl +[dependent libraries, and in which our libraries should be installed.])]) + # _LT_ENABLE_LOCK # --------------- m4_defun([_LT_ENABLE_LOCK], @@ -1236,7 +1237,7 @@ ;; *-*-irix6*) # Find out which ABI we are using. - echo '[#]line __oline__ "configure"' > conftest.$ac_ext + echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then if test "$lt_cv_prog_gnu_ld" = yes; then case `/usr/bin/file conftest.$ac_objext` in @@ -1354,14 +1355,47 @@ ])# _LT_ENABLE_LOCK +# _LT_PROG_AR +# ----------- +m4_defun([_LT_PROG_AR], +[AC_CHECK_TOOLS(AR, [ar], false) +: ${AR=ar} +: ${AR_FLAGS=cru} +_LT_DECL([], [AR], [1], [The archiver]) +_LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive]) + +AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file], + [lt_cv_ar_at_file=no + AC_COMPILE_IFELSE([AC_LANG_PROGRAM], + [echo conftest.$ac_objext > conftest.lst + lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD' + AC_TRY_EVAL([lt_ar_try]) + if test "$ac_status" -eq 0; then + # Ensure the archiver fails upon bogus file names. + rm -f conftest.$ac_objext libconftest.a + AC_TRY_EVAL([lt_ar_try]) + if test "$ac_status" -ne 0; then + lt_cv_ar_at_file=@ + fi + fi + rm -f conftest.* libconftest.a + ]) + ]) + +if test "x$lt_cv_ar_at_file" = xno; then + archiver_list_spec= +else + archiver_list_spec=$lt_cv_ar_at_file +fi +_LT_DECL([], [archiver_list_spec], [1], + [How to feed a file listing to the archiver]) +])# _LT_PROG_AR + + # _LT_CMD_OLD_ARCHIVE # ------------------- m4_defun([_LT_CMD_OLD_ARCHIVE], -[AC_CHECK_TOOL(AR, ar, false) -test -z "$AR" && AR=ar -test -z "$AR_FLAGS" && AR_FLAGS=cru -_LT_DECL([], [AR], [1], [The archiver]) -_LT_DECL([], [AR_FLAGS], [1]) +[_LT_PROG_AR AC_CHECK_TOOL(STRIP, strip, :) test -z "$STRIP" && STRIP=: @@ -1388,10 +1422,19 @@ esac old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" fi + +case $host_os in + darwin*) + lock_old_archive_extraction=yes ;; + *) + lock_old_archive_extraction=no ;; +esac _LT_DECL([], [old_postinstall_cmds], [2]) _LT_DECL([], [old_postuninstall_cmds], [2]) _LT_TAGDECL([], [old_archive_cmds], [2], [Commands used to build an old-style archive]) +_LT_DECL([], [lock_old_archive_extraction], [0], + [Whether to use a lock for old archive extraction]) ])# _LT_CMD_OLD_ARCHIVE @@ -1416,15 +1459,15 @@ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) + (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&AS_MESSAGE_LOG_FD - echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD + echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. - $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp + $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then $2=yes @@ -1464,7 +1507,7 @@ if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&AS_MESSAGE_LOG_FD - $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp + $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then $2=yes @@ -1527,6 +1570,11 @@ lt_cv_sys_max_cmd_len=8192; ;; + mint*) + # On MiNT this can take a long time and run out of memory. + lt_cv_sys_max_cmd_len=8192; + ;; + amigaos*) # On AmigaOS with pdksh, this test takes hours, literally. # So we just punt and use a minimum line length of 8192. @@ -1591,8 +1639,8 @@ # If test is not a shell built-in, we'll probably end up computing a # maximum length that is only half of the actual maximum length, but # we can't tell. - while { test "X"`$SHELL [$]0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \ - = "XX$teststring$teststring"; } >/dev/null 2>&1 && + while { test "X"`func_fallback_echo "$teststring$teststring" 2>/dev/null` \ + = "X$teststring$teststring"; } >/dev/null 2>&1 && test $i != 17 # 1/2 MB should be enough do i=`expr $i + 1` @@ -1643,7 +1691,7 @@ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -[#line __oline__ "configure" +[#line $LINENO "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -1684,7 +1732,13 @@ # endif #endif -void fnord() { int i=42;} +/* When -fvisbility=hidden is used, assume the code has been annotated + correspondingly for the symbols needed. */ +#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) +int fnord () __attribute__((visibility("default"))); +#endif + +int fnord () { return 42; } int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); @@ -1693,7 +1747,11 @@ if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; - else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; + else + { + if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; + else puts (dlerror ()); + } /* dlclose (self); */ } else @@ -1869,16 +1927,16 @@ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) + (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&AS_MESSAGE_LOG_FD - echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD + echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings - $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp + $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes @@ -2037,6 +2095,7 @@ m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_OBJDUMP])dnl m4_require([_LT_DECL_SED])dnl +m4_require([_LT_CHECK_SHELL_FEATURES])dnl AC_MSG_CHECKING([dynamic linker characteristics]) m4_if([$1], [], [ @@ -2045,16 +2104,23 @@ darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; *) lt_awk_arg="/^libraries:/" ;; esac - lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"` - if $ECHO "$lt_search_path_spec" | $GREP ';' >/dev/null ; then + case $host_os in + mingw* | cegcc*) lt_sed_strip_eq="s,=\([[A-Za-z]]:\),\1,g" ;; + *) lt_sed_strip_eq="s,=/,/,g" ;; + esac + lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` + case $lt_search_path_spec in + *\;*) # if the path contains ";" then we assume it to be the separator # otherwise default to the standard path separator (i.e. ":") - it is # assumed that no part of a normal pathname contains ";" but that should # okay in the real world where ";" in dirpaths is itself problematic. - lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e 's/;/ /g'` - else - lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` - fi + lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` + ;; + *) + lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` + ;; + esac # Ok, now we have the path, separated by spaces, we can step through it # and add multilib dir if necessary. lt_tmp_lt_search_path_spec= @@ -2067,7 +2133,7 @@ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" fi done - lt_search_path_spec=`$ECHO $lt_tmp_lt_search_path_spec | awk ' + lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' BEGIN {RS=" "; FS="/|\n";} { lt_foo=""; lt_count=0; @@ -2087,7 +2153,13 @@ if (lt_foo != "") { lt_freq[[lt_foo]]++; } if (lt_freq[[lt_foo]] == 1) { print lt_foo; } }'` - sys_lib_search_path_spec=`$ECHO $lt_search_path_spec` + # AWK program above erroneously prepends '/' to C:/dos/paths + # for these hosts. + case $host_os in + mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ + $SED 's,/\([[A-Za-z]]:\),\1,g'` ;; + esac + sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` else sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" fi]) @@ -2175,7 +2247,7 @@ m68k) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. - finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$ECHO "X$lib" | $Xsed -e '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' + finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; esac ;; @@ -2206,8 +2278,9 @@ need_version=no need_lib_prefix=no - case $GCC,$host_os in - yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*) + case $GCC,$cc_basename in + yes,*) + # gcc library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ @@ -2228,36 +2301,83 @@ cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' - sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" +m4_if([$1], [],[ + sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"]) ;; mingw* | cegcc*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' - sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` - if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then - # It is most probably a Windows format PATH printed by - # mingw gcc, but we are running on Cygwin. Gcc prints its search - # path with ; separators, and with drive letters. We can handle the - # drive letters (cygwin fileutils understands them), so leave them, - # especially as we might pass files found there to a mingw objdump, - # which wouldn't understand a cygwinified path. Ahh. - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` - else - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` - fi ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' ;; esac + dynamic_linker='Win32 ld.exe' + ;; + + *,cl*) + # Native MSVC + libname_spec='$name' + soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' + library_names_spec='${libname}.dll.lib' + + case $build_os in + mingw*) + sys_lib_search_path_spec= + lt_save_ifs=$IFS + IFS=';' + for lt_path in $LIB + do + IFS=$lt_save_ifs + # Let DOS variable expansion print the short 8.3 style file name. + lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` + sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" + done + IFS=$lt_save_ifs + # Convert to MSYS style. + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'` + ;; + cygwin*) + # Convert to unix form, then to dos form, then back to unix form + # but this time dos style (no spaces!) so that the unix form looks + # like /cygdrive/c/PROGRA~1:/cygdr... + sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` + sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` + sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + ;; + *) + sys_lib_search_path_spec="$LIB" + if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then + # It is most probably a Windows format PATH. + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` + else + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + fi + # FIXME: find the short name or the path components, as spaces are + # common. (e.g. "Program Files" -> "PROGRA~1") + ;; + esac + + # DLL is installed to $(libdir)/../bin by postinstall_cmds + postinstall_cmds='base_file=`basename \${file}`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ + dldir=$destdir/`dirname \$dlpath`~ + test -d \$dldir || mkdir -p \$dldir~ + $install_prog $dir/$dlname \$dldir/$dlname' + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ + dlpath=$dir/\$dldll~ + $RM \$dlpath' + shlibpath_overrides_runpath=yes + dynamic_linker='Win32 link.exe' ;; *) + # Assume MSVC wrapper library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' + dynamic_linker='Win32 ld.exe' ;; esac - dynamic_linker='Win32 ld.exe' # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; @@ -2344,6 +2464,19 @@ hardcode_into_libs=yes ;; +haiku*) + version_type=linux + need_lib_prefix=no + need_version=no + dynamic_linker="$host_os runtime_loader" + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LIBRARY_PATH + shlibpath_overrides_runpath=yes + sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' + hardcode_into_libs=yes + ;; + hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. @@ -2386,8 +2519,10 @@ soname_spec='${libname}${release}${shared_ext}$major' ;; esac - # HP-UX runs *really* slowly unless shared libraries are mode 555. + # HP-UX runs *really* slowly unless shared libraries are mode 555, ... postinstall_cmds='chmod 555 $lib' + # or fails outright, so override atomically: + install_override_mode=555 ;; interix[[3-9]]*) @@ -2445,7 +2580,7 @@ ;; # This must be Linux ELF. -linux* | k*bsd*-gnu) +linux* | k*bsd*-gnu | kopensolaris*-gnu) version_type=linux need_lib_prefix=no need_version=no @@ -2454,16 +2589,21 @@ finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no + # Some binutils ld are patched to set DT_RUNPATH - save_LDFLAGS=$LDFLAGS - save_libdir=$libdir - eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ - LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" - AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], - [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], - [shlibpath_overrides_runpath=yes])]) - LDFLAGS=$save_LDFLAGS - libdir=$save_libdir + AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath], + [lt_cv_shlibpath_overrides_runpath=no + save_LDFLAGS=$LDFLAGS + save_libdir=$libdir + eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ + LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" + AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], + [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], + [lt_cv_shlibpath_overrides_runpath=yes])]) + LDFLAGS=$save_LDFLAGS + libdir=$save_libdir + ]) + shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install @@ -2472,7 +2612,7 @@ # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then - lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` + lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi @@ -2705,6 +2845,8 @@ The last name is the one that the linker finds with -lNAME]]) _LT_DECL([], [soname_spec], [1], [[The coded name of the library, if different from the real name]]) +_LT_DECL([], [install_override_mode], [1], + [Permission mode override for installation of shared libraries]) _LT_DECL([], [postinstall_cmds], [2], [Command to use after installation of a shared archive]) _LT_DECL([], [postuninstall_cmds], [2], @@ -2817,6 +2959,7 @@ AC_REQUIRE([AC_CANONICAL_BUILD])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_DECL_EGREP])dnl +m4_require([_LT_PROG_ECHO_BACKSLASH])dnl AC_ARG_WITH([gnu-ld], [AS_HELP_STRING([--with-gnu-ld], @@ -2938,6 +3081,11 @@ esac reload_cmds='$LD$reload_flag -o $output$reload_objs' case $host_os in + cygwin* | mingw* | pw32* | cegcc*) + if test "$GCC" != yes; then + reload_cmds=false + fi + ;; darwin*) if test "$GCC" = yes; then reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' @@ -2946,8 +3094,8 @@ fi ;; esac -_LT_DECL([], [reload_flag], [1], [How to create reloadable object files])dnl -_LT_DECL([], [reload_cmds], [2])dnl +_LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl +_LT_TAGDECL([], [reload_cmds], [2])dnl ])# _LT_CMD_RELOAD @@ -2999,16 +3147,18 @@ # Base MSYS/MinGW do not provide the 'file' command needed by # func_win32_libid shell function, so use a weaker test based on 'objdump', # unless we find 'file', for example because we are cross-compiling. - if ( file / ) >/dev/null 2>&1; then + # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin. + if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' else - lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' + # Keep this pattern in sync with the one in func_win32_libid. + lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' lt_cv_file_magic_cmd='$OBJDUMP -f' fi ;; -cegcc) +cegcc*) # use the weaker test based on 'objdump'. See mingw*. lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' lt_cv_file_magic_cmd='$OBJDUMP -f' @@ -3038,6 +3188,10 @@ lt_cv_deplibs_check_method=pass_all ;; +haiku*) + lt_cv_deplibs_check_method=pass_all + ;; + hpux10.20* | hpux11*) lt_cv_file_magic_cmd=/usr/bin/file case $host_cpu in @@ -3046,11 +3200,11 @@ lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so ;; hppa*64*) - [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]'] + [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]'] lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl ;; *) - lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library' + lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library' lt_cv_file_magic_test_file=/usr/lib/libc.sl ;; esac @@ -3072,7 +3226,7 @@ ;; # This must be Linux ELF. -linux* | k*bsd*-gnu) +linux* | k*bsd*-gnu | kopensolaris*-gnu) lt_cv_deplibs_check_method=pass_all ;; @@ -3150,6 +3304,21 @@ ;; esac ]) + +file_magic_glob= +want_nocaseglob=no +if test "$build" = "$host"; then + case $host_os in + mingw* | pw32*) + if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then + want_nocaseglob=yes + else + file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"` + fi + ;; + esac +fi + file_magic_cmd=$lt_cv_file_magic_cmd deplibs_check_method=$lt_cv_deplibs_check_method test -z "$deplibs_check_method" && deplibs_check_method=unknown @@ -3157,7 +3326,11 @@ _LT_DECL([], [deplibs_check_method], [1], [Method to check whether dependent libraries are shared objects]) _LT_DECL([], [file_magic_cmd], [1], - [Command to use when deplibs_check_method == "file_magic"]) + [Command to use when deplibs_check_method = "file_magic"]) +_LT_DECL([], [file_magic_glob], [1], + [How to find potential files when deplibs_check_method = "file_magic"]) +_LT_DECL([], [want_nocaseglob], [1], + [Find potential files using nocaseglob when deplibs_check_method = "file_magic"]) ])# _LT_CHECK_MAGIC_METHOD @@ -3214,7 +3387,19 @@ NM="$lt_cv_path_NM" else # Didn't find any BSD compatible name lister, look for dumpbin. - AC_CHECK_TOOLS(DUMPBIN, ["dumpbin -symbols" "link -dump -symbols"], :) + if test -n "$DUMPBIN"; then : + # Let the user override the test. + else + AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :) + case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in + *COFF*) + DUMPBIN="$DUMPBIN -symbols" + ;; + *) + DUMPBIN=: + ;; + esac + fi AC_SUBST([DUMPBIN]) if test "$DUMPBIN" != ":"; then NM="$DUMPBIN" @@ -3227,13 +3412,13 @@ AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], [lt_cv_nm_interface="BSD nm" echo "int some_variable = 0;" > conftest.$ac_ext - (eval echo "\"\$as_me:__oline__: $ac_compile\"" >&AS_MESSAGE_LOG_FD) + (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$ac_compile" 2>conftest.err) cat conftest.err >&AS_MESSAGE_LOG_FD - (eval echo "\"\$as_me:__oline__: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) + (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) cat conftest.err >&AS_MESSAGE_LOG_FD - (eval echo "\"\$as_me:__oline__: output\"" >&AS_MESSAGE_LOG_FD) + (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD) cat conftest.out >&AS_MESSAGE_LOG_FD if $GREP 'External.*some_variable' conftest.out > /dev/null; then lt_cv_nm_interface="MS dumpbin" @@ -3248,6 +3433,67 @@ dnl AC_DEFUN([AM_PROG_NM], []) dnl AC_DEFUN([AC_PROG_NM], []) +# _LT_CHECK_SHAREDLIB_FROM_LINKLIB +# -------------------------------- +# how to determine the name of the shared library +# associated with a specific link library. +# -- PORTME fill in with the dynamic library characteristics +m4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB], +[m4_require([_LT_DECL_EGREP]) +m4_require([_LT_DECL_OBJDUMP]) +m4_require([_LT_DECL_DLLTOOL]) +AC_CACHE_CHECK([how to associate runtime and link libraries], +lt_cv_sharedlib_from_linklib_cmd, +[lt_cv_sharedlib_from_linklib_cmd='unknown' + +case $host_os in +cygwin* | mingw* | pw32* | cegcc*) + # two different shell functions defined in ltmain.sh + # decide which to use based on capabilities of $DLLTOOL + case `$DLLTOOL --help 2>&1` in + *--identify-strict*) + lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib + ;; + *) + lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback + ;; + esac + ;; +*) + # fallback: assume linklib IS sharedlib + lt_cv_sharedlib_from_linklib_cmd="$ECHO" + ;; +esac +]) +sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd +test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO + +_LT_DECL([], [sharedlib_from_linklib_cmd], [1], + [Command to associate shared and link libraries]) +])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB + + +# _LT_PATH_MANIFEST_TOOL +# ---------------------- +# locate the manifest tool +m4_defun([_LT_PATH_MANIFEST_TOOL], +[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :) +test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt +AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool], + [lt_cv_path_mainfest_tool=no + echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD + $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out + cat conftest.err >&AS_MESSAGE_LOG_FD + if $GREP 'Manifest Tool' conftest.out > /dev/null; then + lt_cv_path_mainfest_tool=yes + fi + rm -f conftest*]) +if test "x$lt_cv_path_mainfest_tool" != xyes; then + MANIFEST_TOOL=: +fi +_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl +])# _LT_PATH_MANIFEST_TOOL + # LT_LIB_M # -------- @@ -3256,7 +3502,7 @@ [AC_REQUIRE([AC_CANONICAL_HOST])dnl LIBM= case $host in -*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*) +*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*) # These system don't have libm, or don't need it ;; *-ncr-sysv4.3*) @@ -3284,7 +3530,12 @@ _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= if test "$GCC" = yes; then - _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' + case $cc_basename in + nvcc*) + _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;; + *) + _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;; + esac _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], lt_cv_prog_compiler_rtti_exceptions, @@ -3301,6 +3552,7 @@ m4_defun([_LT_CMD_GLOBAL_SYMBOLS], [AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_PROG_CC])dnl +AC_REQUIRE([AC_PROG_AWK])dnl AC_REQUIRE([LT_PATH_NM])dnl AC_REQUIRE([LT_PATH_LD])dnl m4_require([_LT_DECL_SED])dnl @@ -3368,8 +3620,8 @@ lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" # Transform an extracted symbol line into symbol name and symbol address -lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'" -lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"lib\2\", (void *) \&\2},/p'" +lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'" +lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"lib\2\", (void *) \&\2},/p'" # Handle CRLF in mingw tool chain opt_cr= @@ -3405,6 +3657,7 @@ else lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" fi + lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" # Check to see that the pipe works correctly. pipe_works=no @@ -3426,7 +3679,7 @@ if AC_TRY_EVAL(ac_compile); then # Now try to grab the symbols. nlist=conftest.nm - if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then + if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then # Try sorting and uniquifying the output. if sort "$nlist" | uniq > "$nlist"T; then mv -f "$nlist"T "$nlist" @@ -3438,6 +3691,18 @@ if $GREP ' nm_test_var$' "$nlist" >/dev/null; then if $GREP ' nm_test_func$' "$nlist" >/dev/null; then cat <<_LT_EOF > conftest.$ac_ext +/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ +#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) +/* DATA imports from DLLs on WIN32 con't be const, because runtime + relocations are performed -- see ld's documentation on pseudo-relocs. */ +# define LT@&t@_DLSYM_CONST +#elif defined(__osf__) +/* This system does not cope well with relocations in const data. */ +# define LT@&t@_DLSYM_CONST +#else +# define LT@&t@_DLSYM_CONST const +#endif + #ifdef __cplusplus extern "C" { #endif @@ -3449,7 +3714,7 @@ cat <<_LT_EOF >> conftest.$ac_ext /* The mapping between symbol names and symbols. */ -const struct { +LT@&t@_DLSYM_CONST struct { const char *name; void *address; } @@ -3475,15 +3740,15 @@ _LT_EOF # Now try linking the two files. mv conftest.$ac_objext conftstm.$ac_objext - lt_save_LIBS="$LIBS" - lt_save_CFLAGS="$CFLAGS" + lt_globsym_save_LIBS=$LIBS + lt_globsym_save_CFLAGS=$CFLAGS LIBS="conftstm.$ac_objext" CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then pipe_works=yes fi - LIBS="$lt_save_LIBS" - CFLAGS="$lt_save_CFLAGS" + LIBS=$lt_globsym_save_LIBS + CFLAGS=$lt_globsym_save_CFLAGS else echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD fi @@ -3516,6 +3781,13 @@ AC_MSG_RESULT(ok) fi +# Response file support. +if test "$lt_cv_nm_interface" = "MS dumpbin"; then + nm_file_list_spec='@' +elif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then + nm_file_list_spec='@' +fi + _LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], [Take the output of nm and produce a listing of raw symbols and C names]) _LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], @@ -3526,6 +3798,8 @@ _LT_DECL([global_symbol_to_c_name_address_lib_prefix], [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], [Transform the output of nm in a C name address pair when lib prefix is needed]) +_LT_DECL([], [nm_file_list_spec], [1], + [Specify filename containing input files for $NM]) ]) # _LT_CMD_GLOBAL_SYMBOLS @@ -3537,7 +3811,6 @@ _LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_static, $1)= -AC_MSG_CHECKING([for $compiler option to produce PIC]) m4_if([$1], [CXX], [ # C++ specific cases for pic, static, wl, etc. if test "$GXX" = yes; then @@ -3588,6 +3861,11 @@ # DJGPP does not support shared libraries at all _LT_TAGVAR(lt_prog_compiler_pic, $1)= ;; + haiku*) + # PIC is the default for Haiku. + # The "-static" flag exists, but is broken. + _LT_TAGVAR(lt_prog_compiler_static, $1)= + ;; interix[[3-9]]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. @@ -3637,6 +3915,12 @@ ;; esac ;; + mingw* | cygwin* | os2* | pw32* | cegcc*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + m4_if([$1], [GCJ], [], + [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) + ;; dgux*) case $cc_basename in ec++*) @@ -3693,7 +3977,7 @@ ;; esac ;; - linux* | k*bsd*-gnu) + linux* | k*bsd*-gnu | kopensolaris*-gnu) case $cc_basename in KCC*) # KAI C++ Compiler @@ -3726,8 +4010,8 @@ _LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; - xlc* | xlC*) - # IBM XL 8.0 on PPC + xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*) + # IBM XL 8.0, 9.0 on PPC and BlueGene _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' @@ -3789,7 +4073,7 @@ ;; solaris*) case $cc_basename in - CC*) + CC* | sunCC*) # Sun C++ 4.2, 5.x and Centerline C++ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' @@ -3893,6 +4177,12 @@ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' ;; + haiku*) + # PIC is the default for Haiku. + # The "-static" flag exists, but is broken. + _LT_TAGVAR(lt_prog_compiler_static, $1)= + ;; + hpux*) # PIC is the default for 64-bit PA HP-UX, but not for 32-bit # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag @@ -3935,6 +4225,13 @@ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac + + case $cc_basename in + nvcc*) # Cuda Compiler Driver 2.2 + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker ' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Xcompiler -fPIC' + ;; + esac else # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in @@ -3977,7 +4274,7 @@ _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; - linux* | k*bsd*-gnu) + linux* | k*bsd*-gnu | kopensolaris*-gnu) case $cc_basename in # old Intel for x86_64 which still supported -KPIC. ecc*) @@ -3998,7 +4295,13 @@ _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' ;; - pgcc* | pgf77* | pgf90* | pgf95*) + nagfor*) + # NAG Fortran compiler + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' @@ -4010,25 +4313,25 @@ # All Alpha code is PIC. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; - xl*) - # IBM XL C 8.0/Fortran 10.1 on PPC + xl* | bgxl* | bgf* | mpixl*) + # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' ;; *) case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) - # Sun C 5.9 + *Sun\ F* | *Sun*Fortran*) + # Sun Fortran 8.3 passes all unrecognized flags to the linker _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_wl, $1)='' ;; - *Sun\ F*) - # Sun Fortran 8.3 passes all unrecognized flags to the linker + *Sun\ C*) + # Sun C 5.9 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - _LT_TAGVAR(lt_prog_compiler_wl, $1)='' + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' ;; esac ;; @@ -4060,7 +4363,7 @@ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' case $cc_basename in - f77* | f90* | f95*) + f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; *) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; @@ -4117,9 +4420,11 @@ _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" ;; esac -AC_MSG_RESULT([$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) -_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], - [How to pass a linker flag through the compiler]) + +AC_CACHE_CHECK([for $compiler option to produce PIC], + [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)], + [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) +_LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1) # # Check to make sure the PIC flag actually works. @@ -4138,6 +4443,8 @@ _LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], [Additional compiler flags for building library objects]) +_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], + [How to pass a linker flag through the compiler]) # # Check to make sure the static flag actually works. # @@ -4158,6 +4465,7 @@ m4_defun([_LT_LINKER_SHLIBS], [AC_REQUIRE([LT_PATH_LD])dnl AC_REQUIRE([LT_PATH_NM])dnl +m4_require([_LT_PATH_MANIFEST_TOOL])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_DECL_SED])dnl @@ -4166,27 +4474,35 @@ AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) m4_if([$1], [CXX], [ _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] case $host_os in aix[[4-9]]*) # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm + # Also, AIX nm treats weak defined symbols like other global defined + # symbols, whereas GNU nm marks them as "W". if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then - _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' + _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' else _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' fi ;; pw32*) _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" - ;; + ;; cygwin* | mingw* | cegcc*) - _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;/^.*[[ ]]__nm__/s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' - ;; + case $cc_basename in + cl*) ;; + *) + _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' + _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] + ;; + esac + ;; *) _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - ;; + ;; esac - _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] ], [ runpath_var= _LT_TAGVAR(allow_undefined_flag, $1)= @@ -4249,7 +4565,33 @@ esac _LT_TAGVAR(ld_shlibs, $1)=yes + + # On some targets, GNU ld is compatible enough with the native linker + # that we're better off using the native interface for both. + lt_use_gnu_ld_interface=no if test "$with_gnu_ld" = yes; then + case $host_os in + aix*) + # The AIX port of GNU ld has always aspired to compatibility + # with the native linker. However, as the warning in the GNU ld + # block says, versions before 2.19.5* couldn't really create working + # shared libraries, regardless of the interface used. + case `$LD -v 2>&1` in + *\ \(GNU\ Binutils\)\ 2.19.5*) ;; + *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;; + *\ \(GNU\ Binutils\)\ [[3-9]]*) ;; + *) + lt_use_gnu_ld_interface=yes + ;; + esac + ;; + *) + lt_use_gnu_ld_interface=yes + ;; + esac + fi + + if test "$lt_use_gnu_ld_interface" = yes; then # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='${wl}' @@ -4267,6 +4609,7 @@ fi supports_anon_versioning=no case `$LD -v 2>&1` in + *GNU\ gold*) supports_anon_versioning=yes ;; *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... @@ -4282,11 +4625,12 @@ _LT_TAGVAR(ld_shlibs, $1)=no cat <<_LT_EOF 1>&2 -*** Warning: the GNU linker, at least up to release 2.9.1, is reported +*** Warning: the GNU linker, at least up to release 2.19, is reported *** to be unable to reliably create shared libraries on AIX. *** Therefore, libtool is disabling shared libraries support. If you -*** really care for shared libraries, you may want to modify your PATH -*** so that a non-GNU linker is found, and then restart. +*** really care for shared libraries, you may want to install binutils +*** 2.20 or above, or modify your PATH so that a non-GNU linker is found. +*** You will then need to restart the configuration process. _LT_EOF fi @@ -4322,10 +4666,12 @@ # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, # as there is no search path for DLLs. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes - _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols' + _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' + _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' @@ -4343,6 +4689,11 @@ fi ;; + haiku*) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(link_all_deplibs, $1)=yes + ;; + interix[[3-9]]*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no @@ -4358,7 +4709,7 @@ _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; - gnu* | linux* | tpf* | k*bsd*-gnu) + gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) tmp_diet=no if test "$host_os" = linux-dietlibc; then case $cc_basename in @@ -4368,15 +4719,16 @@ if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ && test "$tmp_diet" = no then - tmp_addflag= + tmp_addflag=' $pic_flag' tmp_sharedflag='-shared' case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag' ;; - pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' + pgf77* | pgf90* | pgf95* | pgfortran*) + # Portland Group f77 and f90 compilers + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag -Mnomain' ;; ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 tmp_addflag=' -i_dynamic' ;; @@ -4387,13 +4739,17 @@ lf95*) # Lahey Fortran 8.1 _LT_TAGVAR(whole_archive_flag_spec, $1)= tmp_sharedflag='--shared' ;; - xl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) + xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) tmp_sharedflag='-qmkshrobj' tmp_addflag= ;; + nvcc*) # Cuda Compiler Driver 2.2 + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' + _LT_TAGVAR(compiler_needs_object, $1)=yes + ;; esac case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' _LT_TAGVAR(compiler_needs_object, $1)=yes tmp_sharedflag='-G' ;; *Sun\ F*) # Sun Fortran 8.3 @@ -4409,17 +4765,17 @@ fi case $cc_basename in - xlf*) + xlf* | bgf* | bgxlf* | mpixlf*) # IBM XL Fortran 10.1 on PPC cannot create shared libs itself _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir' - _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' if test "x$supports_anon_versioning" = xyes; then _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ - $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' + $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' fi ;; esac @@ -4433,8 +4789,8 @@ _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' fi ;; @@ -4452,8 +4808,8 @@ _LT_EOF elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi @@ -4499,8 +4855,8 @@ *) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi @@ -4540,8 +4896,10 @@ else # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm + # Also, AIX nm treats weak defined symbols like other global + # defined symbols, whereas GNU nm marks them as "W". if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then - _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' + _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' else _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' fi @@ -4628,9 +4986,9 @@ _LT_TAGVAR(allow_undefined_flag, $1)='-berok' # Determine the default libpath from the value encoded in an # empty executable. - _LT_SYS_MODULE_PATH_AIX + _LT_SYS_MODULE_PATH_AIX([$1]) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' @@ -4639,14 +4997,19 @@ else # Determine the default libpath from the value encoded in an # empty executable. - _LT_SYS_MODULE_PATH_AIX + _LT_SYS_MODULE_PATH_AIX([$1]) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' - # Exported symbols can be pulled into shared objects from archives - _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' + if test "$with_gnu_ld" = yes; then + # We only use this code for GNU lds that support --whole-archive. + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' + else + # Exported symbols can be pulled into shared objects from archives + _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' + fi _LT_TAGVAR(archive_cmds_need_lc, $1)=yes # This is similar to how AIX traditionally builds its shared libraries. _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' @@ -4678,20 +5041,63 @@ # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - # Tell ltmain to make .lib files, not .a files. - libext=lib - # Tell ltmain to make .dll files, not .so files. - shrext_cmds=".dll" - # FIXME: Setting linknames here is a bad hack. - _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `$ECHO "X$deplibs" | $Xsed -e '\''s/ -lc$//'\''` -link -dll~linknames=' - # The linker will automatically build a .lib file if we build a DLL. - _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' - # FIXME: Should let the user specify the lib program. - _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' - _LT_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`' - _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes + case $cc_basename in + cl*) + # Native MSVC + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported + _LT_TAGVAR(always_export_symbols, $1)=yes + _LT_TAGVAR(file_list_spec, $1)='@' + # Tell ltmain to make .lib files, not .a files. + libext=lib + # Tell ltmain to make .dll files, not .so files. + shrext_cmds=".dll" + # FIXME: Setting linknames here is a bad hack. + _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' + _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; + else + sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; + fi~ + $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ + linknames=' + # The linker will not automatically build a static lib if we build a DLL. + # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' + _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes + _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1,DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols' + # Don't use ranlib + _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' + _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ + lt_tool_outputfile="@TOOL_OUTPUT@"~ + case $lt_outputfile in + *.exe|*.EXE) ;; + *) + lt_outputfile="$lt_outputfile.exe" + lt_tool_outputfile="$lt_tool_outputfile.exe" + ;; + esac~ + if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then + $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; + $RM "$lt_outputfile.manifest"; + fi' + ;; + *) + # Assume MSVC wrapper + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported + # Tell ltmain to make .lib files, not .a files. + libext=lib + # Tell ltmain to make .dll files, not .so files. + shrext_cmds=".dll" + # FIXME: Setting linknames here is a bad hack. + _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' + # The linker will automatically build a .lib file if we build a DLL. + _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' + # FIXME: Should let the user specify the lib program. + _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' + _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes + ;; + esac ;; darwin* | rhapsody*) @@ -4729,7 +5135,7 @@ # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | dragonfly*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no @@ -4737,7 +5143,7 @@ hpux9*) if test "$GCC" = yes; then - _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' fi @@ -4752,8 +5158,8 @@ ;; hpux10*) - if test "$GCC" = yes -a "$with_gnu_ld" = no; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + if test "$GCC" = yes && test "$with_gnu_ld" = no; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi @@ -4771,16 +5177,16 @@ ;; hpux11*) - if test "$GCC" = yes -a "$with_gnu_ld" = no; then + if test "$GCC" = yes && test "$with_gnu_ld" = no; then case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else @@ -4792,7 +5198,14 @@ _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) - _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + m4_if($1, [], [ + # Older versions of the 11.00 compiler do not understand -b yet + # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) + _LT_LINKER_OPTION([if $CC understands -b], + _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b], + [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'], + [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])], + [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags']) ;; esac fi @@ -4820,19 +5233,34 @@ irix5* | irix6* | nonstopux*) if test "$GCC" = yes; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' # Try to use the -exported_symbol ld option, if it does not # work, assume that -exports_file does not work either and # implicitly export all symbols. - save_LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" - AC_LINK_IFELSE(int foo(void) {}, - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' - ) - LDFLAGS="$save_LDFLAGS" + # This should be the same for all languages, so no per-tag cache variable. + AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol], + [lt_cv_irix_exported_symbol], + [save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" + AC_LINK_IFELSE( + [AC_LANG_SOURCE( + [AC_LANG_CASE([C], [[int foo (void) { return 0; }]], + [C++], [[int foo (void) { return 0; }]], + [Fortran 77], [[ + subroutine foo + end]], + [Fortran], [[ + subroutine foo + end]])])], + [lt_cv_irix_exported_symbol=yes], + [lt_cv_irix_exported_symbol=no]) + LDFLAGS="$save_LDFLAGS"]) + if test "$lt_cv_irix_exported_symbol" = yes; then + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' + fi else - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' fi _LT_TAGVAR(archive_cmds_need_lc, $1)='no' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' @@ -4894,17 +5322,17 @@ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$ECHO DATA >> $output_objdir/$libname.def~$ECHO " SINGLE NONSHARED" >> $output_objdir/$libname.def~$ECHO EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' + _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' ;; osf3*) if test "$GCC" = yes; then _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' fi _LT_TAGVAR(archive_cmds_need_lc, $1)='no' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' @@ -4914,13 +5342,13 @@ osf4* | osf5*) # as osf3* with the addition of -msym flag if test "$GCC" = yes; then _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' else _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ - $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' + $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' # Both c and cxx compiler support -rpath directly _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' @@ -4933,9 +5361,9 @@ _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' if test "$GCC" = yes; then wlarc='${wl}' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' + $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' else case `$CC -V 2>&1` in *"Compilers 5.0"*) @@ -5111,36 +5539,38 @@ # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. - AC_MSG_CHECKING([whether -lc should be explicitly linked in]) - $RM conftest* - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - if AC_TRY_EVAL(ac_compile) 2>conftest.err; then - soname=conftest - lib=conftest - libobjs=conftest.$ac_objext - deplibs= - wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) - pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) - compiler_flags=-v - linker_flags=-v - verstring= - output_objdir=. - libname=conftest - lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) - _LT_TAGVAR(allow_undefined_flag, $1)= - if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) - then - _LT_TAGVAR(archive_cmds_need_lc, $1)=no - else - _LT_TAGVAR(archive_cmds_need_lc, $1)=yes - fi - _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag - else - cat conftest.err 1>&5 - fi - $RM conftest* - AC_MSG_RESULT([$_LT_TAGVAR(archive_cmds_need_lc, $1)]) + AC_CACHE_CHECK([whether -lc should be explicitly linked in], + [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1), + [$RM conftest* + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + + if AC_TRY_EVAL(ac_compile) 2>conftest.err; then + soname=conftest + lib=conftest + libobjs=conftest.$ac_objext + deplibs= + wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) + pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) + compiler_flags=-v + linker_flags=-v + verstring= + output_objdir=. + libname=conftest + lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) + _LT_TAGVAR(allow_undefined_flag, $1)= + if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) + then + lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no + else + lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes + fi + _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag + else + cat conftest.err 1>&5 + fi + $RM conftest* + ]) + _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1) ;; esac fi @@ -5205,8 +5635,6 @@ to runtime path list]) _LT_TAGDECL([], [link_all_deplibs], [0], [Whether libtool must link a program against all its dependency libraries]) -_LT_TAGDECL([], [fix_srcfile_path], [1], - [Fix the shell variable $srcfile for the compiler]) _LT_TAGDECL([], [always_export_symbols], [0], [Set to "yes" if exported symbols are required]) _LT_TAGDECL([], [export_symbols_cmds], [2], @@ -5217,6 +5645,8 @@ [Symbols that must always be exported]) _LT_TAGDECL([], [prelink_cmds], [2], [Commands necessary for linking programs (against libraries) with templates]) +_LT_TAGDECL([], [postlink_cmds], [2], + [Commands necessary for finishing linking programs]) _LT_TAGDECL([], [file_list_spec], [1], [Specify filename containing input files]) dnl FIXME: Not yet implemented @@ -5310,37 +5740,22 @@ ])# _LT_LANG_C_CONFIG -# _LT_PROG_CXX -# ------------ -# Since AC_PROG_CXX is broken, in that it returns g++ if there is no c++ -# compiler, we have our own version here. -m4_defun([_LT_PROG_CXX], -[ -pushdef([AC_MSG_ERROR], [_lt_caught_CXX_error=yes]) -AC_PROG_CXX -if test -n "$CXX" && ( test "X$CXX" != "Xno" && - ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || - (test "X$CXX" != "Xg++"))) ; then - AC_PROG_CXXCPP -else - _lt_caught_CXX_error=yes -fi -popdef([AC_MSG_ERROR]) -])# _LT_PROG_CXX - -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([_LT_PROG_CXX], []) - - # _LT_LANG_CXX_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for a C++ compiler are suitably # defined. These variables are subsequently used by _LT_CONFIG to write # the compiler configuration to `libtool'. m4_defun([_LT_LANG_CXX_CONFIG], -[AC_REQUIRE([_LT_PROG_CXX])dnl -m4_require([_LT_FILEUTILS_DEFAULTS])dnl +[m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_EGREP])dnl +m4_require([_LT_PATH_MANIFEST_TOOL])dnl +if test -n "$CXX" && ( test "X$CXX" != "Xno" && + ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || + (test "X$CXX" != "Xg++"))) ; then + AC_PROG_CXXCPP +else + _lt_caught_CXX_error=yes +fi AC_LANG_PUSH(C++) _LT_TAGVAR(archive_cmds_need_lc, $1)=no @@ -5362,6 +5777,8 @@ _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds +_LT_TAGVAR(reload_flag, $1)=$reload_flag +_LT_TAGVAR(reload_cmds, $1)=$reload_cmds _LT_TAGVAR(no_undefined_flag, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no @@ -5393,6 +5810,7 @@ # Allow CC to be a program name with arguments. lt_save_CC=$CC + lt_save_CFLAGS=$CFLAGS lt_save_LD=$LD lt_save_GCC=$GCC GCC=$GXX @@ -5410,6 +5828,7 @@ fi test -z "${LDCXX+set}" || LD=$LDCXX CC=${CXX-"c++"} + CFLAGS=$CXXFLAGS compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) @@ -5431,8 +5850,8 @@ # Check if GNU C++ uses GNU ld as the underlying linker, since the # archiving commands below assume that GNU ld is being used. if test "$with_gnu_ld" = yes; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' @@ -5464,7 +5883,7 @@ # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else GXX=no @@ -5573,10 +5992,10 @@ _LT_TAGVAR(allow_undefined_flag, $1)='-berok' # Determine the default libpath from the value encoded in an empty # executable. - _LT_SYS_MODULE_PATH_AIX + _LT_SYS_MODULE_PATH_AIX([$1]) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' @@ -5585,14 +6004,19 @@ else # Determine the default libpath from the value encoded in an # empty executable. - _LT_SYS_MODULE_PATH_AIX + _LT_SYS_MODULE_PATH_AIX([$1]) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' - # Exported symbols can be pulled into shared objects from archives - _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' + if test "$with_gnu_ld" = yes; then + # We only use this code for GNU lds that support --whole-archive. + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' + else + # Exported symbols can be pulled into shared objects from archives + _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' + fi _LT_TAGVAR(archive_cmds_need_lc, $1)=yes # This is similar to how AIX traditionally builds its shared # libraries. @@ -5622,28 +6046,75 @@ ;; cygwin* | mingw* | pw32* | cegcc*) - # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, - # as there is no search path for DLLs. - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - _LT_TAGVAR(always_export_symbols, $1)=no - _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes - - if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - # If the export-symbols file already is a .def file (1st line - # is EXPORTS), use it as is; otherwise, prepend... - _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then - cp $export_symbols $output_objdir/$soname.def; - else - echo EXPORTS > $output_objdir/$soname.def; - cat $export_symbols >> $output_objdir/$soname.def; - fi~ - $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; + case $GXX,$cc_basename in + ,cl* | no,cl*) + # Native MSVC + # hardcode_libdir_flag_spec is actually meaningless, as there is + # no search path for DLLs. + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported + _LT_TAGVAR(always_export_symbols, $1)=yes + _LT_TAGVAR(file_list_spec, $1)='@' + # Tell ltmain to make .lib files, not .a files. + libext=lib + # Tell ltmain to make .dll files, not .so files. + shrext_cmds=".dll" + # FIXME: Setting linknames here is a bad hack. + _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' + _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; + else + $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; + fi~ + $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ + linknames=' + # The linker will not automatically build a static lib if we build a DLL. + # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' + _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes + # Don't use ranlib + _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' + _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ + lt_tool_outputfile="@TOOL_OUTPUT@"~ + case $lt_outputfile in + *.exe|*.EXE) ;; + *) + lt_outputfile="$lt_outputfile.exe" + lt_tool_outputfile="$lt_tool_outputfile.exe" + ;; + esac~ + func_to_tool_file "$lt_outputfile"~ + if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then + $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; + $RM "$lt_outputfile.manifest"; + fi' + ;; + *) + # g++ + # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, + # as there is no search path for DLLs. + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported + _LT_TAGVAR(always_export_symbols, $1)=no + _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes + + if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + # If the export-symbols file already is a .def file (1st line + # is EXPORTS), use it as is; otherwise, prepend... + _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + cp $export_symbols $output_objdir/$soname.def; + else + echo EXPORTS > $output_objdir/$soname.def; + cat $export_symbols >> $output_objdir/$soname.def; + fi~ + $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + ;; darwin* | rhapsody*) _LT_DARWIN_LINKER_FEATURES($1) ;; @@ -5685,6 +6156,11 @@ gnu*) ;; + haiku*) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(link_all_deplibs, $1)=yes + ;; + hpux9*) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: @@ -5709,11 +6185,11 @@ # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. - output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' + output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test "$GXX" = yes; then - _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no @@ -5774,7 +6250,7 @@ # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. - output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' + output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test "$GXX" = yes; then @@ -5784,10 +6260,10 @@ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac fi @@ -5817,7 +6293,7 @@ case $cc_basename in CC*) # SGI C++ - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' # Archives containing C++ object files must be created using # "CC -ar", where "CC" is the IRIX C++ compiler. This is @@ -5828,9 +6304,9 @@ *) if test "$GXX" = yes; then if test "$with_gnu_ld" = no; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` -o $lib' fi fi _LT_TAGVAR(link_all_deplibs, $1)=yes @@ -5841,7 +6317,7 @@ _LT_TAGVAR(inherit_rpath, $1)=yes ;; - linux* | k*bsd*-gnu) + linux* | k*bsd*-gnu | kopensolaris*-gnu) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler @@ -5859,7 +6335,7 @@ # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. - output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' + output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' @@ -5896,26 +6372,26 @@ pgCC* | pgcpp*) # Portland Group C++ compiler case `$CC -V` in - *pgCC\ [[1-5]]* | *pgcpp\ [[1-5]]*) + *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*) _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ - compile_command="$compile_command `find $tpldir -name \*.o | $NL2SP`"' + compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ - $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | $NL2SP`~ + $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ $RANLIB $oldlib' _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ - $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' + $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ - $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' + $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' ;; - *) # Version 6 will use weak symbols + *) # Version 6 and above use weak symbols _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' ;; @@ -5923,7 +6399,7 @@ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' ;; cxx*) # Compaq C++ @@ -5942,9 +6418,9 @@ # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. - output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' + output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed' ;; - xl*) + xl* | mpixl* | bgxl*) # IBM XL 8.0 on PPC, with GNU ld _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' @@ -5964,13 +6440,13 @@ _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' _LT_TAGVAR(compiler_needs_object, $1)=yes # Not sure whether something based on # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 # would be better. - output_verbose_link_cmd='echo' + output_verbose_link_cmd='func_echo_all' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is @@ -6039,7 +6515,7 @@ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' fi - output_verbose_link_cmd=echo + output_verbose_link_cmd=func_echo_all else _LT_TAGVAR(ld_shlibs, $1)=no fi @@ -6074,15 +6550,15 @@ case $host in osf3*) _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && $ECHO "X${wl}-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && func_echo_all "${wl}-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' ;; *) _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ echo "-hidden">> $lib.exp~ - $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~ + $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~ $RM $lib.exp' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' ;; @@ -6098,17 +6574,17 @@ # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. - output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' + output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test "$GXX" = yes && test "$with_gnu_ld" = no; then _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' case $host in osf3*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' ;; *) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' ;; esac @@ -6118,7 +6594,7 @@ # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else # FIXME: insert proper C++ library support @@ -6154,7 +6630,7 @@ solaris*) case $cc_basename in - CC*) + CC* | sunCC*) # Sun C++ 4.2, 5.x and Centerline C++ _LT_TAGVAR(archive_cmds_need_lc,$1)=yes _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' @@ -6175,7 +6651,7 @@ esac _LT_TAGVAR(link_all_deplibs, $1)=yes - output_verbose_link_cmd='echo' + output_verbose_link_cmd='func_echo_all' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is @@ -6195,14 +6671,14 @@ if test "$GXX" = yes && test "$with_gnu_ld" = no; then _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' if $CC --version | $GREP -v '^2\.7' > /dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' + $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else # g++ 2.7 appears to require `-G' NOT `-shared' on this # platform. @@ -6213,7 +6689,7 @@ # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. - output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' + output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' @@ -6267,6 +6743,10 @@ CC*) _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~ + '"$_LT_TAGVAR(old_archive_cmds, $1)" + _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~ + '"$_LT_TAGVAR(reload_cmds, $1)" ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' @@ -6322,6 +6802,7 @@ fi # test -n "$compiler" CC=$lt_save_CC + CFLAGS=$lt_save_CFLAGS LDCXX=$LD LD=$lt_save_LD GCC=$lt_save_GCC @@ -6336,6 +6817,29 @@ ])# _LT_LANG_CXX_CONFIG +# _LT_FUNC_STRIPNAME_CNF +# ---------------------- +# func_stripname_cnf prefix suffix name +# strip PREFIX and SUFFIX off of NAME. +# PREFIX and SUFFIX must not contain globbing or regex special +# characters, hashes, percent signs, but SUFFIX may contain a leading +# dot (in which case that matches only a dot). +# +# This function is identical to the (non-XSI) version of func_stripname, +# except this one can be used by m4 code that may be executed by configure, +# rather than the libtool script. +m4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl +AC_REQUIRE([_LT_DECL_SED]) +AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH]) +func_stripname_cnf () +{ + case ${2} in + .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; + *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; + esac +} # func_stripname_cnf +])# _LT_FUNC_STRIPNAME_CNF + # _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) # --------------------------------- # Figure out "hidden" library dependencies from verbose @@ -6344,6 +6848,7 @@ # objects, libraries and library flags. m4_defun([_LT_SYS_HIDDEN_LIBDEPS], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl +AC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl # Dependencies to place before and after the object being linked: _LT_TAGVAR(predep_objects, $1)= _LT_TAGVAR(postdep_objects, $1)= @@ -6394,6 +6899,13 @@ }; _LT_EOF ]) + +_lt_libdeps_save_CFLAGS=$CFLAGS +case "$CC $CFLAGS " in #( +*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; +*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; +esac + dnl Parse the compiler output and extract the necessary dnl objects, libraries and library flags. if AC_TRY_EVAL(ac_compile); then @@ -6405,7 +6917,7 @@ pre_test_object_deps_done=no for p in `eval "$output_verbose_link_cmd"`; do - case $p in + case ${prev}${p} in -L* | -R* | -l*) # Some compilers place space between "-{L,R}" and the path. @@ -6414,13 +6926,22 @@ test $p = "-R"; then prev=$p continue - else - prev= fi + # Expand the sysroot to ease extracting the directories later. + if test -z "$prev"; then + case $p in + -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; + -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; + -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; + esac + fi + case $p in + =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; + esac if test "$pre_test_object_deps_done" = no; then - case $p in - -L* | -R*) + case ${prev} in + -L | -R) # Internal compiler library paths should come after those # provided the user. The postdeps already come after the # user supplied libs so there is no need to process them. @@ -6440,8 +6961,10 @@ _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}" fi fi + prev= ;; + *.lto.$objext) ;; # Ignore GCC LTO objects *.$objext) # This assumes that the test object file only shows up # once in the compiler output. @@ -6477,6 +7000,7 @@ fi $RM -f confest.$objext +CFLAGS=$_lt_libdeps_save_CFLAGS # PORTME: override above test on systems where it is broken m4_if([$1], [CXX], @@ -6513,7 +7037,7 @@ solaris*) case $cc_basename in - CC*) + CC* | sunCC*) # The more standards-conforming stlport4 library is # incompatible with the Cstd library. Avoid specifying # it if it's in CXXFLAGS. Ignore libCrun as @@ -6557,32 +7081,16 @@ ])# _LT_SYS_HIDDEN_LIBDEPS -# _LT_PROG_F77 -# ------------ -# Since AC_PROG_F77 is broken, in that it returns the empty string -# if there is no fortran compiler, we have our own version here. -m4_defun([_LT_PROG_F77], -[ -pushdef([AC_MSG_ERROR], [_lt_disable_F77=yes]) -AC_PROG_F77 -if test -z "$F77" || test "X$F77" = "Xno"; then - _lt_disable_F77=yes -fi -popdef([AC_MSG_ERROR]) -])# _LT_PROG_F77 - -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([_LT_PROG_F77], []) - - # _LT_LANG_F77_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for a Fortran 77 compiler are # suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to `libtool'. m4_defun([_LT_LANG_F77_CONFIG], -[AC_REQUIRE([_LT_PROG_F77])dnl -AC_LANG_PUSH(Fortran 77) +[AC_LANG_PUSH(Fortran 77) +if test -z "$F77" || test "X$F77" = "Xno"; then + _lt_disable_F77=yes +fi _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(allow_undefined_flag, $1)= @@ -6601,6 +7109,8 @@ _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds +_LT_TAGVAR(reload_flag, $1)=$reload_flag +_LT_TAGVAR(reload_cmds, $1)=$reload_cmds _LT_TAGVAR(no_undefined_flag, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no @@ -6640,7 +7150,9 @@ # Allow CC to be a program name with arguments. lt_save_CC="$CC" lt_save_GCC=$GCC + lt_save_CFLAGS=$CFLAGS CC=${F77-"f77"} + CFLAGS=$FFLAGS compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) @@ -6694,38 +7206,24 @@ GCC=$lt_save_GCC CC="$lt_save_CC" + CFLAGS="$lt_save_CFLAGS" fi # test "$_lt_disable_F77" != yes AC_LANG_POP ])# _LT_LANG_F77_CONFIG -# _LT_PROG_FC -# ----------- -# Since AC_PROG_FC is broken, in that it returns the empty string -# if there is no fortran compiler, we have our own version here. -m4_defun([_LT_PROG_FC], -[ -pushdef([AC_MSG_ERROR], [_lt_disable_FC=yes]) -AC_PROG_FC -if test -z "$FC" || test "X$FC" = "Xno"; then - _lt_disable_FC=yes -fi -popdef([AC_MSG_ERROR]) -])# _LT_PROG_FC - -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([_LT_PROG_FC], []) - - # _LT_LANG_FC_CONFIG([TAG]) # ------------------------- # Ensure that the configuration variables for a Fortran compiler are # suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to `libtool'. m4_defun([_LT_LANG_FC_CONFIG], -[AC_REQUIRE([_LT_PROG_FC])dnl -AC_LANG_PUSH(Fortran) +[AC_LANG_PUSH(Fortran) + +if test -z "$FC" || test "X$FC" = "Xno"; then + _lt_disable_FC=yes +fi _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(allow_undefined_flag, $1)= @@ -6744,6 +7242,8 @@ _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds +_LT_TAGVAR(reload_flag, $1)=$reload_flag +_LT_TAGVAR(reload_cmds, $1)=$reload_cmds _LT_TAGVAR(no_undefined_flag, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no @@ -6783,7 +7283,9 @@ # Allow CC to be a program name with arguments. lt_save_CC="$CC" lt_save_GCC=$GCC + lt_save_CFLAGS=$CFLAGS CC=${FC-"f95"} + CFLAGS=$FCFLAGS compiler=$CC GCC=$ac_cv_fc_compiler_gnu @@ -6839,7 +7341,8 @@ fi # test -n "$compiler" GCC=$lt_save_GCC - CC="$lt_save_CC" + CC=$lt_save_CC + CFLAGS=$lt_save_CFLAGS fi # test "$_lt_disable_FC" != yes AC_LANG_POP @@ -6876,10 +7379,12 @@ _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. -lt_save_CC="$CC" +lt_save_CC=$CC +lt_save_CFLAGS=$CFLAGS lt_save_GCC=$GCC GCC=yes CC=${GCJ-"gcj"} +CFLAGS=$GCJFLAGS compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_TAGVAR(LD, $1)="$LD" @@ -6889,6 +7394,8 @@ _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds +_LT_TAGVAR(reload_flag, $1)=$reload_flag +_LT_TAGVAR(reload_cmds, $1)=$reload_cmds ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change @@ -6908,7 +7415,8 @@ AC_LANG_RESTORE GCC=$lt_save_GCC -CC="$lt_save_CC" +CC=$lt_save_CC +CFLAGS=$lt_save_CFLAGS ])# _LT_LANG_GCJ_CONFIG @@ -6943,9 +7451,11 @@ # Allow CC to be a program name with arguments. lt_save_CC="$CC" +lt_save_CFLAGS=$CFLAGS lt_save_GCC=$GCC GCC= CC=${RC-"windres"} +CFLAGS= compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) @@ -6958,7 +7468,8 @@ GCC=$lt_save_GCC AC_LANG_RESTORE -CC="$lt_save_CC" +CC=$lt_save_CC +CFLAGS=$lt_save_CFLAGS ])# _LT_LANG_RC_CONFIG @@ -7017,6 +7528,15 @@ AC_SUBST([OBJDUMP]) ]) +# _LT_DECL_DLLTOOL +# ---------------- +# Ensure DLLTOOL variable is set. +m4_defun([_LT_DECL_DLLTOOL], +[AC_CHECK_TOOL(DLLTOOL, dlltool, false) +test -z "$DLLTOOL" && DLLTOOL=dlltool +_LT_DECL([], [DLLTOOL], [1], [DLL creation program]) +AC_SUBST([DLLTOOL]) +]) # _LT_DECL_SED # ------------ @@ -7110,8 +7630,8 @@ # Try some XSI features xsi_shell=no ( _lt_dummy="a/b/c" - test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \ - = c,a/b,, \ + test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \ + = c,a/b,b/c, \ && eval 'test $(( 1 + 1 )) -eq 2 \ && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ && xsi_shell=yes @@ -7150,208 +7670,162 @@ ])# _LT_CHECK_SHELL_FEATURES -# _LT_PROG_XSI_SHELLFNS -# --------------------- -# Bourne and XSI compatible variants of some useful shell functions. -m4_defun([_LT_PROG_XSI_SHELLFNS], -[case $xsi_shell in - yes) - cat << \_LT_EOF >> "$cfgfile" - -# func_dirname file append nondir_replacement -# Compute the dirname of FILE. If nonempty, add APPEND to the result, -# otherwise set result to NONDIR_REPLACEMENT. -func_dirname () -{ - case ${1} in - */*) func_dirname_result="${1%/*}${2}" ;; - * ) func_dirname_result="${3}" ;; - esac -} - -# func_basename file -func_basename () -{ - func_basename_result="${1##*/}" -} - -# func_dirname_and_basename file append nondir_replacement -# perform func_basename and func_dirname in a single function -# call: -# dirname: Compute the dirname of FILE. If nonempty, -# add APPEND to the result, otherwise set result -# to NONDIR_REPLACEMENT. -# value returned in "$func_dirname_result" -# basename: Compute filename of FILE. -# value retuned in "$func_basename_result" -# Implementation must be kept synchronized with func_dirname -# and func_basename. For efficiency, we do not delegate to -# those functions but instead duplicate the functionality here. -func_dirname_and_basename () -{ - case ${1} in - */*) func_dirname_result="${1%/*}${2}" ;; - * ) func_dirname_result="${3}" ;; - esac - func_basename_result="${1##*/}" -} - -# func_stripname prefix suffix name -# strip PREFIX and SUFFIX off of NAME. -# PREFIX and SUFFIX must not contain globbing or regex special -# characters, hashes, percent signs, but SUFFIX may contain a leading -# dot (in which case that matches only a dot). -func_stripname () -{ - # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are - # positional parameters, so assign one to ordinary parameter first. - func_stripname_result=${3} - func_stripname_result=${func_stripname_result#"${1}"} - func_stripname_result=${func_stripname_result%"${2}"} -} - -# func_opt_split -func_opt_split () -{ - func_opt_split_opt=${1%%=*} - func_opt_split_arg=${1#*=} -} - -# func_lo2o object -func_lo2o () -{ - case ${1} in - *.lo) func_lo2o_result=${1%.lo}.${objext} ;; - *) func_lo2o_result=${1} ;; - esac -} - -# func_xform libobj-or-source -func_xform () -{ - func_xform_result=${1%.*}.lo -} - -# func_arith arithmetic-term... -func_arith () -{ - func_arith_result=$(( $[*] )) -} +# _LT_PROG_FUNCTION_REPLACE (FUNCNAME, REPLACEMENT-BODY) +# ------------------------------------------------------ +# In `$cfgfile', look for function FUNCNAME delimited by `^FUNCNAME ()$' and +# '^} FUNCNAME ', and replace its body with REPLACEMENT-BODY. +m4_defun([_LT_PROG_FUNCTION_REPLACE], +[dnl { +sed -e '/^$1 ()$/,/^} # $1 /c\ +$1 ()\ +{\ +m4_bpatsubsts([$2], [$], [\\], [^\([ ]\)], [\\\1]) +} # Extended-shell $1 implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: +]) -# func_len string -# STRING may not start with a hyphen. -func_len () -{ - func_len_result=${#1} -} -_LT_EOF - ;; - *) # Bourne compatible functions. - cat << \_LT_EOF >> "$cfgfile" +# _LT_PROG_REPLACE_SHELLFNS +# ------------------------- +# Replace existing portable implementations of several shell functions with +# equivalent extended shell implementations where those features are available.. +m4_defun([_LT_PROG_REPLACE_SHELLFNS], +[if test x"$xsi_shell" = xyes; then + _LT_PROG_FUNCTION_REPLACE([func_dirname], [dnl + case ${1} in + */*) func_dirname_result="${1%/*}${2}" ;; + * ) func_dirname_result="${3}" ;; + esac]) + + _LT_PROG_FUNCTION_REPLACE([func_basename], [dnl + func_basename_result="${1##*/}"]) + + _LT_PROG_FUNCTION_REPLACE([func_dirname_and_basename], [dnl + case ${1} in + */*) func_dirname_result="${1%/*}${2}" ;; + * ) func_dirname_result="${3}" ;; + esac + func_basename_result="${1##*/}"]) -# func_dirname file append nondir_replacement -# Compute the dirname of FILE. If nonempty, add APPEND to the result, -# otherwise set result to NONDIR_REPLACEMENT. -func_dirname () -{ - # Extract subdirectory from the argument. - func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"` - if test "X$func_dirname_result" = "X${1}"; then - func_dirname_result="${3}" - else - func_dirname_result="$func_dirname_result${2}" - fi -} + _LT_PROG_FUNCTION_REPLACE([func_stripname], [dnl + # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are + # positional parameters, so assign one to ordinary parameter first. + func_stripname_result=${3} + func_stripname_result=${func_stripname_result#"${1}"} + func_stripname_result=${func_stripname_result%"${2}"}]) -# func_basename file -func_basename () -{ - func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"` -} + _LT_PROG_FUNCTION_REPLACE([func_split_long_opt], [dnl + func_split_long_opt_name=${1%%=*} + func_split_long_opt_arg=${1#*=}]) -dnl func_dirname_and_basename -dnl A portable version of this function is already defined in general.m4sh -dnl so there is no need for it here. + _LT_PROG_FUNCTION_REPLACE([func_split_short_opt], [dnl + func_split_short_opt_arg=${1#??} + func_split_short_opt_name=${1%"$func_split_short_opt_arg"}]) -# func_stripname prefix suffix name -# strip PREFIX and SUFFIX off of NAME. -# PREFIX and SUFFIX must not contain globbing or regex special -# characters, hashes, percent signs, but SUFFIX may contain a leading -# dot (in which case that matches only a dot). -# func_strip_suffix prefix name -func_stripname () -{ - case ${2} in - .*) func_stripname_result=`$ECHO "X${3}" \ - | $Xsed -e "s%^${1}%%" -e "s%\\\\${2}\$%%"`;; - *) func_stripname_result=`$ECHO "X${3}" \ - | $Xsed -e "s%^${1}%%" -e "s%${2}\$%%"`;; - esac -} + _LT_PROG_FUNCTION_REPLACE([func_lo2o], [dnl + case ${1} in + *.lo) func_lo2o_result=${1%.lo}.${objext} ;; + *) func_lo2o_result=${1} ;; + esac]) -# sed scripts: -my_sed_long_opt='1s/^\(-[[^=]]*\)=.*/\1/;q' -my_sed_long_arg='1s/^-[[^=]]*=//' + _LT_PROG_FUNCTION_REPLACE([func_xform], [ func_xform_result=${1%.*}.lo]) -# func_opt_split -func_opt_split () -{ - func_opt_split_opt=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_opt"` - func_opt_split_arg=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_arg"` -} + _LT_PROG_FUNCTION_REPLACE([func_arith], [ func_arith_result=$(( $[*] ))]) -# func_lo2o object -func_lo2o () -{ - func_lo2o_result=`$ECHO "X${1}" | $Xsed -e "$lo2o"` -} + _LT_PROG_FUNCTION_REPLACE([func_len], [ func_len_result=${#1}]) +fi -# func_xform libobj-or-source -func_xform () -{ - func_xform_result=`$ECHO "X${1}" | $Xsed -e 's/\.[[^.]]*$/.lo/'` -} +if test x"$lt_shell_append" = xyes; then + _LT_PROG_FUNCTION_REPLACE([func_append], [ eval "${1}+=\\${2}"]) -# func_arith arithmetic-term... -func_arith () -{ - func_arith_result=`expr "$[@]"` -} + _LT_PROG_FUNCTION_REPLACE([func_append_quoted], [dnl + func_quote_for_eval "${2}" +dnl m4 expansion turns \\\\ into \\, and then the shell eval turns that into \ + eval "${1}+=\\\\ \\$func_quote_for_eval_result"]) -# func_len string -# STRING may not start with a hyphen. -func_len () -{ - func_len_result=`expr "$[1]" : ".*" 2>/dev/null || echo $max_cmd_len` -} + # Save a `func_append' function call where possible by direct use of '+=' + sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") + test 0 -eq $? || _lt_function_replace_fail=: +else + # Save a `func_append' function call even when '+=' is not available + sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") + test 0 -eq $? || _lt_function_replace_fail=: +fi -_LT_EOF -esac +if test x"$_lt_function_replace_fail" = x":"; then + AC_MSG_WARN([Unable to substitute extended shell functions in $ofile]) +fi +]) -case $lt_shell_append in - yes) - cat << \_LT_EOF >> "$cfgfile" - -# func_append var value -# Append VALUE to the end of shell variable VAR. -func_append () -{ - eval "$[1]+=\$[2]" -} -_LT_EOF +# _LT_PATH_CONVERSION_FUNCTIONS +# ----------------------------- +# Determine which file name conversion functions should be used by +# func_to_host_file (and, implicitly, by func_to_host_path). These are needed +# for certain cross-compile configurations and native mingw. +m4_defun([_LT_PATH_CONVERSION_FUNCTIONS], +[AC_REQUIRE([AC_CANONICAL_HOST])dnl +AC_REQUIRE([AC_CANONICAL_BUILD])dnl +AC_MSG_CHECKING([how to convert $build file names to $host format]) +AC_CACHE_VAL(lt_cv_to_host_file_cmd, +[case $host in + *-*-mingw* ) + case $build in + *-*-mingw* ) # actually msys + lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 + ;; + *-*-cygwin* ) + lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 + ;; + * ) # otherwise, assume *nix + lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 + ;; + esac ;; - *) - cat << \_LT_EOF >> "$cfgfile" - -# func_append var value -# Append VALUE to the end of shell variable VAR. -func_append () -{ - eval "$[1]=\$$[1]\$[2]" -} - -_LT_EOF + *-*-cygwin* ) + case $build in + *-*-mingw* ) # actually msys + lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin + ;; + *-*-cygwin* ) + lt_cv_to_host_file_cmd=func_convert_file_noop + ;; + * ) # otherwise, assume *nix + lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin + ;; + esac ;; - esac + * ) # unhandled hosts (and "normal" native builds) + lt_cv_to_host_file_cmd=func_convert_file_noop + ;; +esac +]) +to_host_file_cmd=$lt_cv_to_host_file_cmd +AC_MSG_RESULT([$lt_cv_to_host_file_cmd]) +_LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd], + [0], [convert $build file names to $host format])dnl + +AC_MSG_CHECKING([how to convert $build file names to toolchain format]) +AC_CACHE_VAL(lt_cv_to_tool_file_cmd, +[#assume ordinary cross tools, or native build. +lt_cv_to_tool_file_cmd=func_convert_file_noop +case $host in + *-*-mingw* ) + case $build in + *-*-mingw* ) # actually msys + lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 + ;; + esac + ;; +esac ]) +to_tool_file_cmd=$lt_cv_to_tool_file_cmd +AC_MSG_RESULT([$lt_cv_to_tool_file_cmd]) +_LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd], + [0], [convert $build files to toolchain format])dnl +])# _LT_PATH_CONVERSION_FUNCTIONS diff -Nru libgetdata-0.7.0/m4/lt~obsolete.m4 libgetdata-0.7.1/m4/lt~obsolete.m4 --- libgetdata-0.7.0/m4/lt~obsolete.m4 2010-05-12 07:31:16.000000000 +0000 +++ libgetdata-0.7.1/m4/lt~obsolete.m4 2010-11-12 21:34:20.000000000 +0000 @@ -1,13 +1,13 @@ # lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- # -# Copyright (C) 2004, 2005, 2007 Free Software Foundation, Inc. +# Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc. # Written by Scott James Remnant, 2004. # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. -# serial 4 lt~obsolete.m4 +# serial 5 lt~obsolete.m4 # These exist entirely to fool aclocal when bootstrapping libtool. # @@ -77,7 +77,6 @@ m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) -m4_ifndef([AC_LIBTOOL_RC], [AC_DEFUN([AC_LIBTOOL_RC])]) m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) @@ -90,3 +89,10 @@ m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) +m4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])]) +m4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])]) +m4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])]) +m4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])]) +m4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])]) +m4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])]) +m4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])]) diff -Nru libgetdata-0.7.0/m4/ltoptions.m4 libgetdata-0.7.1/m4/ltoptions.m4 --- libgetdata-0.7.0/m4/ltoptions.m4 2010-05-12 07:31:16.000000000 +0000 +++ libgetdata-0.7.1/m4/ltoptions.m4 2010-11-12 21:34:20.000000000 +0000 @@ -1,13 +1,14 @@ # Helper functions for option handling. -*- Autoconf -*- # -# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. +# Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation, +# Inc. # Written by Gary V. Vaughan, 2004 # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. -# serial 6 ltoptions.m4 +# serial 7 ltoptions.m4 # This is to help aclocal find these macros, as it can't see m4_define. AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) @@ -125,7 +126,7 @@ [enable_win32_dll=yes case $host in -*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-cegcc*) +*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) AC_CHECK_TOOL(AS, as, false) AC_CHECK_TOOL(DLLTOOL, dlltool, false) AC_CHECK_TOOL(OBJDUMP, objdump, false) @@ -133,13 +134,13 @@ esac test -z "$AS" && AS=as -_LT_DECL([], [AS], [0], [Assembler program])dnl +_LT_DECL([], [AS], [1], [Assembler program])dnl test -z "$DLLTOOL" && DLLTOOL=dlltool -_LT_DECL([], [DLLTOOL], [0], [DLL creation program])dnl +_LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl test -z "$OBJDUMP" && OBJDUMP=objdump -_LT_DECL([], [OBJDUMP], [0], [Object dumper program])dnl +_LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl ])# win32-dll AU_DEFUN([AC_LIBTOOL_WIN32_DLL], diff -Nru libgetdata-0.7.0/m4/ltversion.m4 libgetdata-0.7.1/m4/ltversion.m4 --- libgetdata-0.7.0/m4/ltversion.m4 2010-05-12 07:31:16.000000000 +0000 +++ libgetdata-0.7.1/m4/ltversion.m4 2010-11-12 21:34:20.000000000 +0000 @@ -7,17 +7,17 @@ # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. -# Generated from ltversion.in. +# @configure_input@ -# serial 3017 ltversion.m4 +# serial 3293 ltversion.m4 # This file is part of GNU Libtool -m4_define([LT_PACKAGE_VERSION], [2.2.6b]) -m4_define([LT_PACKAGE_REVISION], [1.3017]) +m4_define([LT_PACKAGE_VERSION], [2.4]) +m4_define([LT_PACKAGE_REVISION], [1.3293]) AC_DEFUN([LTVERSION_VERSION], -[macro_version='2.2.6b' -macro_revision='1.3017' +[macro_version='2.4' +macro_revision='1.3293' _LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) _LT_DECL(, macro_revision, 0) ]) diff -Nru libgetdata-0.7.0/Makefile.in libgetdata-0.7.1/Makefile.in --- libgetdata-0.7.0/Makefile.in 2010-11-23 00:33:34.000000000 +0000 +++ libgetdata-0.7.1/Makefile.in 2010-12-06 23:08:43.000000000 +0000 @@ -158,6 +158,7 @@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DIFF = @DIFF@ +DLLTOOL = @DLLTOOL@ DL_LIBRARY_PATH = @DL_LIBRARY_PATH@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ @@ -203,6 +204,7 @@ LZMA_CPPFLAGS = @LZMA_CPPFLAGS@ LZMA_LDFLAGS = @LZMA_LDFLAGS@ MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ @@ -237,6 +239,7 @@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ absolute_docdir = @absolute_docdir@ +ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ @@ -273,7 +276,6 @@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ diff -Nru libgetdata-0.7.0/man/dirfile2ascii.1 libgetdata-0.7.1/man/dirfile2ascii.1 --- libgetdata-0.7.0/man/dirfile2ascii.1 2010-11-23 00:25:53.000000000 +0000 +++ libgetdata-0.7.1/man/dirfile2ascii.1 2010-11-30 03:55:44.000000000 +0000 @@ -13,7 +13,7 @@ .\" Texts. A copy of the license is included in the `COPYING.DOC' file .\" as part of this distribution. .\" -.TH dirfile2ascii 1 "22 November 2010" "Version 0.7.0" "GETDATA" +.TH dirfile2ascii 1 "30 November 2010" "Version 0.7.1" "GETDATA" .SH NAME dirfile2ascii \(em output dirfile database vectors as ASCII text .SH SYNOPSIS @@ -49,7 +49,7 @@ .TP .BR \-f ", " \-\-first\-frame =\fIfirst_frame\fB:\fInframes\fR equivalent to \fB\-\-first\-frame\fR=\fIfirst_frame\fR -\fB--num-frames\fR=\fInframes\fR. +\fB\-\-num-frames\fR=\fInframes\fR. .TP .BR \-f ", " \-\-first\-frame =\fIfirst_frame\fR If \fIfirst_frame\fR\~>=\~0, start reading at frame @@ -59,7 +59,7 @@ is -1 and \fB\-\-num-frames\fR=\fInframes\fR is specified, read the last .I nframes frames. If -.B --first-frame +.B \-\-first-frame is not specified, reading starts at frame zero. .TP .BR \-n ", " \-\-num\-frames =\fInframes\fR @@ -89,6 +89,19 @@ .TP .BR \-v ", " \-\-verbose write diagnostic messages on standard error. +.TP +.BR \-z ", " \-\-fill =\fISTRING\fR +Fill columns which go past the end of their corresponding field with the string +.IR STRING . +The default behaviour is to fill columns with floating-point conversions with +.B NaN +and columns with integer conversion with +.BR 0 , +which mirrors what occurs when an attempt is made to print data from before the +start of a field. (Note: the default behaviour cannot be reproduced with this +option, since +.I STRING +is applied to all columns, regardless of conversion type.) .P In addition to the above, each .I FIELD diff -Nru libgetdata-0.7.0/man/gd_add.3 libgetdata-0.7.1/man/gd_add.3 --- libgetdata-0.7.0/man/gd_add.3 2010-11-04 01:50:00.000000000 +0000 +++ libgetdata-0.7.1/man/gd_add.3 2010-11-30 02:53:51.000000000 +0000 @@ -13,7 +13,7 @@ .\" Texts. A copy of the license is included in the `COPYING.DOC' file .\" as part of this distribution. .\" -.TH gd_add 3 "3 November 2010" "Version 0.7.0" "GETDATA" +.TH gd_add 3 "30 November 2010" "Version 0.7.1" "GETDATA" .SH NAME gd_add, gd_madd \(em add a field to a dirfile .SH SYNOPSIS @@ -46,7 +46,17 @@ .BR gd_entry (3) man page. All relevant members of .I entry -for the field type specified must be properly initialised. +for the field type specified must be properly initialised. If +.I entry +specifies a +.B CONST +or +.B CARRAY +field, the field's data will be set to zero. If +.I entry +specifies a +.B STRING +field, the field data will be set to the empty string. When adding a metafield, the .IR entry -> field diff -Nru libgetdata-0.7.0/man/Makefile.in libgetdata-0.7.1/man/Makefile.in --- libgetdata-0.7.0/man/Makefile.in 2010-11-23 00:33:32.000000000 +0000 +++ libgetdata-0.7.1/man/Makefile.in 2010-12-06 23:08:41.000000000 +0000 @@ -110,6 +110,7 @@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DIFF = @DIFF@ +DLLTOOL = @DLLTOOL@ DL_LIBRARY_PATH = @DL_LIBRARY_PATH@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ @@ -155,6 +156,7 @@ LZMA_CPPFLAGS = @LZMA_CPPFLAGS@ LZMA_LDFLAGS = @LZMA_LDFLAGS@ MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ @@ -189,6 +191,7 @@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ absolute_docdir = @absolute_docdir@ +ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ @@ -225,7 +228,6 @@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ diff -Nru libgetdata-0.7.0/NEWS libgetdata-0.7.1/NEWS --- libgetdata-0.7.0/NEWS 2010-11-23 00:33:22.000000000 +0000 +++ libgetdata-0.7.1/NEWS 2010-12-06 23:10:38.000000000 +0000 @@ -1,11 +1,50 @@ +New in version 0.7.1: + + Library Changes + + * BUG FIX: When the parser fails in a gd_include() call, the internal list of + conformant Standards Versions for the loaded dirfile is no longer corrupted. + * BUG FIX Performing two consecutive reads of the same field in an ASCII + encoded datasources no longer confuses GetData. + * BUG FIX: Numerous memory leaks have been patched (mostly pin-holes, although + there are a few, rare but egregious ones). + + API Changes: + + * The value(s) of a CONST or CARRAY field added with gd_[m]add() is now + guaranteed to be zero; previously, it was unspecified. + * BUG FIX: Specifying both GD_VERBOSE and GD_IGNORE_DUPS no longer results in + spurious "Field code already defined" messages when duplicate fields are + encountered. + * BUG FIX: Calling gd_delete on a metafield no longer results in a segfault. + + Bindings Changes: + + * F77 BUG FIX: A memory leak in GDASCA has been fixed. + * Python BUG FIX: The first element of a python list (instead of a NumPy + array) is no longer dropped when passed to pygetdata on 64-bit systems. + + Utilities Changes: + + * dirfile2ascii now pads reads past the end-of-field. The value used to + pad may be specified with '-z', and defaults to 0/NaN. Previously, the + value of uninitialized memory was output. + * BUG FIX: dirfile2ascii now does what the user intends when presented with + cart-before-horse arguments, ie. "dirfile2ascii -e field DIRFILE". + Previously this resulted in confusion. + * BUG FIX: dirfile2ascii now accepts field conversion '-u', which was + documented but overlooked in the argument parser. + +|==============================================================================| + New in version 0.7.0: Dirfile Changes * Dirfile Standards Version 8 has been released. It adds three new field - types: DIVIDE, which computes X/Y for vectors X and Y, and RECIP, which - computes A/X for vector X and scalar A, and CARRAY, which is an array of - CONST scalars. A few other changes are listed below. + types: DIVIDE, which computes X/Y for vectors X and Y, RECIP, which computes + A/X for vector X and scalar A, and CARRAY, which is an array of CONST + scalars. A few other changes are listed below. * Like CONST fields, CARRAY elements can be used as parametersin the definition of other fields. Syntax is 'field', where 'field' is the field name and 'n' the element index in the CARRAY (and the angle brackets @@ -19,7 +58,8 @@ * The /ENDIAN directive now takes an optional second parameter. The only allowed value for this second token is "arm", which indicates that double precision floating point data (including double precision complex data) are - stored in the ARM middle-endian format. + stored in the ARM middle-endian format. Without this, floating point data + are assumed to have the same byte sex as integer data. Library Changes @@ -29,7 +69,7 @@ caution when writing to dirfiles in this case. * GetData can now be used on ARM processors. As a side-effect, GetData can now read and write the middle-ended floating point format used by older ARM - processors (on any processor). + processors (on any processor, via endianness conversion). * Some changes have been made to the parser. It now operates in one of two modes: pedantic mode, which adheres strictly to one particular Dirfile Standards Version, and permissive mode (the default) which is more @@ -96,12 +136,12 @@ - functions which started with 'put' simply prefix 'gd_' to their name. So put_constant() becomes gd_put_constant(). - functions which started with 'get' replace 'get' with 'gd', except those - functions with a corresponding 'put' function, these simply prefix 'gd_'. + functions with a corresponding 'put' function; these simply prefix 'gd_'. So, get_constants() becomes gd_constants(), but get_constant() becomes gd_get_constant(). - functions which started with 'dirfile' replace 'dirfile' with 'gd', except for dirfilename(), which becomes gd_dirfilename(). So, - dirfile_alter_encoding() become gd_alter_encoding(). + dirfile_alter_encoding() becomes gd_alter_encoding(). - macros which started with 'GETDATA_' now start with 'GD_'. Those that started with 'NO_GETDATA_' now start with 'GD_NO_'. So GETDATA_LEGACY_API becomes GD_LEGACY_API and NO_GETDATA_LEGACY_API becomes GD_NO_LEGACY_API. diff -Nru libgetdata-0.7.0/src/add.c libgetdata-0.7.1/src/add.c --- libgetdata-0.7.0/src/add.c 2010-11-06 00:25:00.000000000 +0000 +++ libgetdata-0.7.1/src/add.c 2010-12-01 00:59:34.000000000 +0000 @@ -329,10 +329,12 @@ { _GD_SetError(D, GD_E_BAD_TYPE, E->EN(scalar,const_type), NULL, 0, NULL); } else { - E->e->u.scalar.d = malloc(GD_SIZE(_GD_ConstType(D, - E->EN(scalar,const_type)))); + size_t size = GD_SIZE(_GD_ConstType(D, E->EN(scalar,const_type))); + E->e->u.scalar.d = malloc(size); if (!D->error && E->e->u.scalar.d == NULL) _GD_SetError(D, GD_E_ALLOC, 0, NULL, 0, NULL); + else + memset(E->e->u.scalar.d, 0, size); } break; case GD_CARRAY_ENTRY: @@ -346,10 +348,13 @@ } else if (E->EN(scalar,array_len) > GD_MAX_CARRAY_LENGTH) _GD_SetError(D, GD_E_BOUNDS, 0, NULL, 0, NULL); else { - E->e->u.scalar.d = malloc(GD_SIZE(_GD_ConstType(D, - E->EN(scalar,const_type))) * E->EN(scalar,array_len)); + size_t size = GD_SIZE(_GD_ConstType(D, E->EN(scalar,const_type))) * + E->EN(scalar,array_len); + E->e->u.scalar.d = malloc(size); if (!D->error && E->e->u.scalar.d == NULL) _GD_SetError(D, GD_E_ALLOC, 0, NULL, 0, NULL); + else + memset(E->e->u.scalar.d, 0, size); } break; case GD_STRING_ENTRY: @@ -557,7 +562,7 @@ /* Directive parsing is skipped -- The Field Spec parser will add the field */ if (!D->error) _GD_ParseFieldSpec(D, n_cols, in_cols, E, "dirfile_madd_spec()", 0, me, - D->standards, 1, 1, 1, &outstring, tok_pos); + D->standards, 1, GD_PEDANTIC, 1, &outstring, tok_pos); free(outstring); @@ -619,7 +624,7 @@ /* Directive parsing is skipped -- The Field Spec parser will add the field */ if (!D->error) _GD_ParseFieldSpec(D, n_cols, in_cols, NULL, "dirfile_add_spec()", 0, - fragment_index, D->standards, 1, 1, 1, &outstring, tok_pos); + fragment_index, D->standards, 1, GD_PEDANTIC, 1, &outstring, tok_pos); free(outstring); @@ -656,6 +661,9 @@ int gd_add_raw(DIRFILE* D, const char* field_code, gd_type_t data_type, gd_spf_t spf, int fragment_index) { + gd_entry_t R; + int error; + dtrace("%p, \"%s\", %x, %i %i", D, field_code, data_type, spf, fragment_index); @@ -665,14 +673,13 @@ return -1; } - gd_entry_t R; memset(&R, 0, sizeof(gd_entry_t)); R.field = (char *)field_code; R.field_type = GD_RAW_ENTRY; R.EN(raw,spf) = spf; R.EN(raw,data_type) = data_type; R.fragment_index = fragment_index; - int error = _GD_Add(D, &R, NULL); + error = _GD_Add(D, &R, NULL); dreturn("%i", error); return error; @@ -683,11 +690,12 @@ const char** in_fields, const double* m, const double* b, int fragment_index) gd_nothrow { + int i, error; + gd_entry_t L; + dtrace("%p, \"%s\", %i, %p, %p, %p, %i", D, field_code, n_fields, in_fields, m, b, fragment_index); - int i; - if (D->flags & GD_INVALID) {/* don't crash */ _GD_SetError(D, GD_E_BAD_DIRFILE, 0, NULL, 0, NULL); dreturn("%i", -1); @@ -701,7 +709,6 @@ return -1; } - gd_entry_t L; memset(&L, 0, sizeof(gd_entry_t)); L.field = (char *)field_code; L.field_type = GD_LINCOM_ENTRY; @@ -714,7 +721,7 @@ L.EN(lincom,m)[i] = m[i]; L.EN(lincom,b)[i] = b[i]; } - int error = _GD_Add(D, &L, NULL); + error = _GD_Add(D, &L, NULL); dreturn("%i", error); return error; @@ -725,11 +732,12 @@ const char** in_fields, const GD_DCOMPLEXP(cm), const GD_DCOMPLEXP(cb), int fragment_index) gd_nothrow { + int i, error; + gd_entry_t L; + dtrace("%p, \"%s\", %i, %p, %p, %p, %i", D, field_code, n_fields, in_fields, cm, cb, fragment_index); - int i; - if (D->flags & GD_INVALID) {/* don't crash */ _GD_SetError(D, GD_E_BAD_DIRFILE, 0, NULL, 0, NULL); dreturn("%i", -1); @@ -743,7 +751,6 @@ return -1; } - gd_entry_t L; memset(&L, 0, sizeof(gd_entry_t)); L.field = (char *)field_code; L.field_type = GD_LINCOM_ENTRY; @@ -756,7 +763,7 @@ _gd_ca2c(L.EN(lincom,cm)[i], cm, i); _gd_ca2c(L.EN(lincom,cb)[i], cb, i); } - int error = _GD_Add(D, &L, NULL); + error = _GD_Add(D, &L, NULL); dreturn("%i", error); return error; @@ -766,6 +773,9 @@ int gd_add_linterp(DIRFILE* D, const char* field_code, const char* in_field, const char* table, int fragment_index) gd_nothrow { + gd_entry_t L; + int error; + dtrace("%p, \"%s\", \"%s\", \"%s\", %i", D, field_code, in_field, table, fragment_index); @@ -775,14 +785,13 @@ return -1; } - gd_entry_t L; memset(&L, 0, sizeof(gd_entry_t)); L.field = (char *)field_code; L.field_type = GD_LINTERP_ENTRY; L.in_fields[0] = (char *)in_field; L.EN(linterp,table) = (char *)table; L.fragment_index = fragment_index; - int error = _GD_Add(D, &L, NULL); + error = _GD_Add(D, &L, NULL); dreturn("%i", error); return error; @@ -792,6 +801,9 @@ int gd_add_bit(DIRFILE* D, const char* field_code, const char* in_field, gd_bit_t bitnum, gd_bit_t numbits, int fragment_index) gd_nothrow { + gd_entry_t B; + int error; + dtrace("%p, \"%s\", \"%s\", %i, %i, %i\n", D, field_code, in_field, bitnum, numbits, fragment_index); @@ -801,7 +813,6 @@ return -1; } - gd_entry_t B; memset(&B, 0, sizeof(gd_entry_t)); B.field = (char *)field_code; B.field_type = GD_BIT_ENTRY; @@ -809,7 +820,7 @@ B.EN(bit,bitnum) = bitnum; B.EN(bit,numbits) = numbits; B.fragment_index = fragment_index; - int error = _GD_Add(D, &B, NULL); + error = _GD_Add(D, &B, NULL); dreturn("%i", error); return error; @@ -819,6 +830,9 @@ int gd_add_sbit(DIRFILE* D, const char* field_code, const char* in_field, gd_bit_t bitnum, gd_bit_t numbits, int fragment_index) gd_nothrow { + gd_entry_t B; + int error; + dtrace("%p, \"%s\", \"%s\", %i, %i, %i\n", D, field_code, in_field, bitnum, numbits, fragment_index); @@ -828,7 +842,6 @@ return -1; } - gd_entry_t B; memset(&B, 0, sizeof(gd_entry_t)); B.field = (char *)field_code; B.field_type = GD_SBIT_ENTRY; @@ -836,7 +849,7 @@ B.EN(bit,bitnum) = bitnum; B.EN(bit,numbits) = numbits; B.fragment_index = fragment_index; - int error = _GD_Add(D, &B, NULL); + error = _GD_Add(D, &B, NULL); dreturn("%i", error); return error; @@ -846,6 +859,9 @@ int gd_add_multiply(DIRFILE* D, const char* field_code, const char* in_field1, const char* in_field2, int fragment_index) gd_nothrow { + gd_entry_t M; + int error; + dtrace("%p, \"%s\", \"%s\", \"%s\", %i", D, field_code, in_field1, in_field2, fragment_index); @@ -855,14 +871,13 @@ return -1; } - gd_entry_t M; memset(&M, 0, sizeof(gd_entry_t)); M.field = (char *)field_code; M.field_type = GD_MULTIPLY_ENTRY; M.in_fields[0] = (char *)in_field1; M.in_fields[1] = (char *)in_field2; M.fragment_index = fragment_index; - int error = _GD_Add(D, &M, NULL); + error = _GD_Add(D, &M, NULL); dreturn("%i", error); return error; @@ -872,6 +887,9 @@ int gd_add_divide(DIRFILE* D, const char* field_code, const char* in_field1, const char* in_field2, int fragment_index) gd_nothrow { + gd_entry_t E; + int error; + dtrace("%p, \"%s\", \"%s\", \"%s\", %i", D, field_code, in_field1, in_field2, fragment_index); @@ -881,14 +899,13 @@ return -1; } - gd_entry_t E; memset(&E, 0, sizeof(gd_entry_t)); E.field = (char *)field_code; E.field_type = GD_DIVIDE_ENTRY; E.in_fields[0] = (char *)in_field1; E.in_fields[1] = (char *)in_field2; E.fragment_index = fragment_index; - int error = _GD_Add(D, &E, NULL); + error = _GD_Add(D, &E, NULL); dreturn("%i", error); return error; @@ -898,6 +915,9 @@ int gd_add_recip(DIRFILE* D, const char* field_code, const char* in_field, double dividend, int fragment_index) gd_nothrow { + gd_entry_t E; + int error; + dtrace("%p, \"%s\", \"%s\", %g, %i", D, field_code, in_field, dividend, fragment_index); @@ -907,7 +927,6 @@ return -1; } - gd_entry_t E; memset(&E, 0, sizeof(gd_entry_t)); E.field = (char *)field_code; E.field_type = GD_RECIP_ENTRY; @@ -915,7 +934,7 @@ E.comp_scal = 0; E.in_fields[0] = (char *)in_field; E.fragment_index = fragment_index; - int error = _GD_Add(D, &E, NULL); + error = _GD_Add(D, &E, NULL); dreturn("%i", error); return error; @@ -952,6 +971,9 @@ int gd_add_crecip89(DIRFILE* D, const char* field_code, const char* in_field, const double cdividend[2], int fragment_index) gd_nothrow { + gd_entry_t E; + int error; + dtrace("%p, \"%s\", \"%s\", [%g, %g], %i", D, field_code, in_field, cdividend[0], cdividend[1], fragment_index); @@ -961,7 +983,6 @@ return -1; } - gd_entry_t E; memset(&E, 0, sizeof(gd_entry_t)); E.field = (char *)field_code; E.field_type = GD_RECIP_ENTRY; @@ -969,7 +990,7 @@ E.comp_scal = 1; E.in_fields[0] = (char *)in_field; E.fragment_index = fragment_index; - int error = _GD_Add(D, &E, NULL); + error = _GD_Add(D, &E, NULL); dreturn("%i", error); return error; @@ -979,11 +1000,12 @@ int gd_add_polynom(DIRFILE* D, const char* field_code, int poly_ord, const char* in_field, const double* a, int fragment_index) gd_nothrow { + int i, error; + gd_entry_t E; + dtrace("%p, \"%s\", %i, \"%s\", %p, %i", D, field_code, poly_ord, in_field, a, fragment_index); - int i; - if (D->flags & GD_INVALID) {/* don't crash */ _GD_SetError(D, GD_E_BAD_DIRFILE, 0, NULL, 0, NULL); dreturn("%i", -1); @@ -997,7 +1019,6 @@ return -1; } - gd_entry_t E; memset(&E, 0, sizeof(gd_entry_t)); E.field = (char *)field_code; E.field_type = GD_POLYNOM_ENTRY; @@ -1009,7 +1030,7 @@ for (i = 0; i <= poly_ord; ++i) E.EN(polynom,a)[i] = a[i]; - int error = _GD_Add(D, &E, NULL); + error = _GD_Add(D, &E, NULL); dreturn("%i", error); return error; @@ -1018,11 +1039,12 @@ int gd_add_cpolynom(DIRFILE* D, const char* field_code, int poly_ord, const char* in_field, const GD_DCOMPLEXP(ca), int fragment_index) gd_nothrow { + int i, error; + gd_entry_t E; + dtrace("%p, \"%s\", %i, \"%s\", %p, %i", D, field_code, poly_ord, in_field, ca, fragment_index); - int i; - if (D->flags & GD_INVALID) {/* don't crash */ _GD_SetError(D, GD_E_BAD_DIRFILE, 0, NULL, 0, NULL); dreturn("%i", -1); @@ -1036,7 +1058,6 @@ return -1; } - gd_entry_t E; memset(&E, 0, sizeof(gd_entry_t)); E.field = (char *)field_code; E.field_type = GD_POLYNOM_ENTRY; @@ -1048,7 +1069,7 @@ for (i = 0; i <= poly_ord; ++i) _gd_ca2c(E.EN(polynom,ca)[i], ca, i); - int error = _GD_Add(D, &E, NULL); + error = _GD_Add(D, &E, NULL); dreturn("%i", error); return error; @@ -1058,6 +1079,9 @@ int gd_add_phase(DIRFILE* D, const char* field_code, const char* in_field, gd_shift_t shift, int fragment_index) gd_nothrow { + gd_entry_t P; + int error; + dtrace("%p, \"%s\", \"%s\", %lli, %i", D, field_code, in_field, (long long)shift, fragment_index); @@ -1067,14 +1091,13 @@ return -1; } - gd_entry_t P; memset(&P, 0, sizeof(gd_entry_t)); P.field = (char *)field_code; P.field_type = GD_PHASE_ENTRY; P.in_fields[0] = (char *)in_field; P.EN(phase,shift) = shift; P.fragment_index = fragment_index; - int error = _GD_Add(D, &P, NULL); + error = _GD_Add(D, &P, NULL); dreturn("%i", error); return error; @@ -1084,6 +1107,10 @@ int gd_add_string(DIRFILE* D, const char* field_code, const char* value, int fragment_index) gd_nothrow { + gd_entry_t *entry; + gd_entry_t S; + int error; + dtrace("%p, \"%s\", \"%s\", %i", D, field_code, value, fragment_index); if (D->flags & GD_INVALID) {/* don't crash */ @@ -1092,13 +1119,11 @@ return -1; } - gd_entry_t *entry; - gd_entry_t S; memset(&S, 0, sizeof(gd_entry_t)); S.field = (char *)field_code; S.field_type = GD_STRING_ENTRY; S.fragment_index = fragment_index; - int error = _GD_Add(D, &S, NULL); + error = _GD_Add(D, &S, NULL); /* Actually store the string, now */ if (!error) { @@ -1121,6 +1146,10 @@ int gd_add_const(DIRFILE* D, const char* field_code, gd_type_t const_type, gd_type_t data_type, const void* value, int fragment_index) gd_nothrow { + gd_entry_t *entry; + gd_entry_t C; + int error; + dtrace("%p, \"%s\", 0x%x, 0x%x, %p, %i", D, field_code, const_type, data_type, value, fragment_index); @@ -1130,14 +1159,12 @@ return -1; } - gd_entry_t *entry; - gd_entry_t C; memset(&C, 0, sizeof(gd_entry_t)); C.field = (char *)field_code; C.field_type = GD_CONST_ENTRY; C.EN(scalar,const_type) = const_type; C.fragment_index = fragment_index; - int error = _GD_Add(D, &C, NULL); + error = _GD_Add(D, &C, NULL); /* Actually store the constant, now */ if (!error) { @@ -1161,6 +1188,10 @@ size_t array_len, gd_type_t data_type, const void* values, int fragment_index) gd_nothrow { + gd_entry_t *entry; + gd_entry_t C; + int error; + dtrace("%p, \"%s\", 0x%x, %zi, 0x%x, %p, %i", D, field_code, const_type, array_len, data_type, values, fragment_index); @@ -1170,15 +1201,13 @@ return -1; } - gd_entry_t *entry; - gd_entry_t C; memset(&C, 0, sizeof(gd_entry_t)); C.field = (char *)field_code; C.field_type = GD_CARRAY_ENTRY; C.EN(scalar,const_type) = const_type; C.EN(scalar,array_len) = array_len; C.fragment_index = fragment_index; - int error = _GD_Add(D, &C, NULL); + error = _GD_Add(D, &C, NULL); /* Actually store the carray, now */ if (!error) { @@ -1220,11 +1249,12 @@ int n_fields, const char** in_fields, const double* m, const double* b) gd_nothrow { + int i, error; + gd_entry_t L; + dtrace("%p, \"%s\", \"%s\", %i, %p, %p, %p", D, field_code, parent, n_fields, in_fields, m, b); - int i; - if (D->flags & GD_INVALID) {/* don't crash */ _GD_SetError(D, GD_E_BAD_DIRFILE, 0, NULL, 0, NULL); dreturn("%i", -1); @@ -1238,7 +1268,6 @@ return -1; } - gd_entry_t L; L.field = (char *)field_code; L.field_type = GD_LINCOM_ENTRY; L.EN(lincom,n_fields) = n_fields; @@ -1252,7 +1281,7 @@ L.scalar[i] = NULL; L.scalar[i + GD_MAX_LINCOM] = NULL; } - int error = _GD_Add(D, &L, parent); + error = _GD_Add(D, &L, parent); dreturn("%i", error); return error; @@ -1263,11 +1292,12 @@ int n_fields, const char** in_fields, const GD_DCOMPLEXP(cm), const GD_DCOMPLEXP(cb)) gd_nothrow { + int i, error; + gd_entry_t L; + dtrace("%p, \"%s\", \"%s\", %i, %p, %p, %p", D, field_code, parent, n_fields, in_fields, cm, cb); - int i; - if (D->flags & GD_INVALID) {/* don't crash */ _GD_SetError(D, GD_E_BAD_DIRFILE, 0, NULL, 0, NULL); dreturn("%i", -1); @@ -1281,7 +1311,6 @@ return -1; } - gd_entry_t L; L.field = (char *)field_code; L.field_type = GD_LINCOM_ENTRY; L.EN(lincom,n_fields) = n_fields; @@ -1295,7 +1324,7 @@ L.scalar[i] = NULL; L.scalar[i + GD_MAX_LINCOM] = NULL; } - int error = _GD_Add(D, &L, parent); + error = _GD_Add(D, &L, parent); dreturn("%i", error); return error; @@ -1305,6 +1334,9 @@ int gd_madd_linterp(DIRFILE* D, const char* parent, const char* field_code, const char* in_field, const char* table) gd_nothrow { + gd_entry_t L; + int error; + dtrace("%p, \"%s\", \"%s\", \"%s\", \"%s\"", D, field_code, parent, in_field, table); @@ -1314,13 +1346,12 @@ return -1; } - gd_entry_t L; L.field = (char *)field_code; L.field_type = GD_LINTERP_ENTRY; L.in_fields[0] = (char *)in_field; L.EN(linterp,table) = (char *)table; L.fragment_index = 0; - int error = _GD_Add(D, &L, parent); + error = _GD_Add(D, &L, parent); dreturn("%i", error); return error; @@ -1330,6 +1361,9 @@ int gd_madd_bit(DIRFILE* D, const char* parent, const char* field_code, const char* in_field, gd_bit_t bitnum, gd_bit_t numbits) gd_nothrow { + gd_entry_t B; + int error; + dtrace("%p, \"%s\", \"%s\", \"%s\", %i, %in", D, field_code, parent, in_field, bitnum, numbits); @@ -1339,7 +1373,6 @@ return -1; } - gd_entry_t B; B.field = (char *)field_code; B.field_type = GD_BIT_ENTRY; B.in_fields[0] = (char *)in_field; @@ -1347,7 +1380,7 @@ B.EN(bit,numbits) = numbits; B.fragment_index = 0; B.scalar[0] = B.scalar[1] = NULL; - int error = _GD_Add(D, &B, parent); + error = _GD_Add(D, &B, parent); dreturn("%i", error); return error; @@ -1357,6 +1390,9 @@ int gd_madd_sbit(DIRFILE* D, const char* parent, const char* field_code, const char* in_field, gd_bit_t bitnum, gd_bit_t numbits) gd_nothrow { + gd_entry_t B; + int error; + dtrace("%p, \"%s\", \"%s\", \"%s\", %i, %in", D, field_code, parent, in_field, bitnum, numbits); @@ -1366,7 +1402,6 @@ return -1; } - gd_entry_t B; B.field = (char *)field_code; B.field_type = GD_SBIT_ENTRY; B.in_fields[0] = (char *)in_field; @@ -1374,7 +1409,7 @@ B.EN(bit,numbits) = numbits; B.fragment_index = 0; B.scalar[0] = B.scalar[1] = NULL; - int error = _GD_Add(D, &B, parent); + error = _GD_Add(D, &B, parent); dreturn("%i", error); return error; @@ -1384,6 +1419,9 @@ int gd_madd_multiply(DIRFILE* D, const char* parent, const char* field_code, const char* in_field1, const char* in_field2) gd_nothrow { + gd_entry_t M; + int error; + dtrace("%p, \"%s\", \"%s\", \"%s\", \"%s\"", D, field_code, parent, in_field1, in_field2); @@ -1393,13 +1431,12 @@ return -1; } - gd_entry_t M; M.field = (char *)field_code; M.field_type = GD_MULTIPLY_ENTRY; M.in_fields[0] = (char *)in_field1; M.in_fields[1] = (char *)in_field2; M.fragment_index = 0; - int error = _GD_Add(D, &M, parent); + error = _GD_Add(D, &M, parent); dreturn("%i", error); return error; @@ -1409,6 +1446,9 @@ int gd_madd_phase(DIRFILE* D, const char* parent, const char* field_code, const char* in_field, gd_shift_t shift) gd_nothrow { + int error; + gd_entry_t P; + dtrace("%p, \"%s\", \"%s\", \"%s\", %lli", D, field_code, parent, in_field, (long long)shift); @@ -1418,14 +1458,13 @@ return -1; } - gd_entry_t P; P.field = (char *)field_code; P.field_type = GD_PHASE_ENTRY; P.in_fields[0] = (char *)in_field; P.EN(phase,shift) = shift; P.fragment_index = 0; P.scalar[0] = NULL; - int error = _GD_Add(D, &P, parent); + error = _GD_Add(D, &P, parent); dreturn("%i", error); return error; @@ -1435,11 +1474,12 @@ int gd_madd_polynom(DIRFILE* D, const char* parent, const char* field_code, int poly_ord, const char* in_field, const double* a) gd_nothrow { + int i, error; + gd_entry_t E; + dtrace("%p, \"%s\", \"%s\", %i, \"%s\", %p", D, field_code, parent, poly_ord, in_field, a); - int i; - if (D->flags & GD_INVALID) {/* don't crash */ _GD_SetError(D, GD_E_BAD_DIRFILE, 0, NULL, 0, NULL); dreturn("%i", -1); @@ -1453,7 +1493,6 @@ return -1; } - gd_entry_t E; E.field = (char *)field_code; E.field_type = GD_POLYNOM_ENTRY; E.EN(polynom,poly_ord) = poly_ord; @@ -1466,7 +1505,7 @@ E.scalar[i] = NULL; } - int error = _GD_Add(D, &E, parent); + error = _GD_Add(D, &E, parent); dreturn("%i", error); return error; @@ -1476,11 +1515,12 @@ int gd_madd_cpolynom(DIRFILE* D, const char* parent, const char* field_code, int poly_ord, const char* in_field, const GD_DCOMPLEXP(ca)) gd_nothrow { + int i, error; + gd_entry_t E; + dtrace("%p, \"%s\", \"%s\", %i, \"%s\", %p", D, field_code, parent, poly_ord, in_field, ca); - int i; - if (D->flags & GD_INVALID) {/* don't crash */ _GD_SetError(D, GD_E_BAD_DIRFILE, 0, NULL, 0, NULL); dreturn("%i", -1); @@ -1494,7 +1534,6 @@ return -1; } - gd_entry_t E; E.field = (char *)field_code; E.field_type = GD_POLYNOM_ENTRY; E.EN(polynom,poly_ord) = poly_ord; @@ -1507,7 +1546,7 @@ E.scalar[i] = NULL; } - int error = _GD_Add(D, &E, parent); + error = _GD_Add(D, &E, parent); dreturn("%i", error); return error; @@ -1517,6 +1556,9 @@ int gd_madd_divide(DIRFILE* D, const char *parent, const char* field_code, const char* in_field1, const char* in_field2) gd_nothrow { + int error; + gd_entry_t E; + dtrace("%p, \"%s\", \"%s\", \"%s\", \"%s\"", D, parent, field_code, in_field1, in_field2); @@ -1526,13 +1568,12 @@ return -1; } - gd_entry_t E; memset(&E, 0, sizeof(gd_entry_t)); E.field = (char *)field_code; E.field_type = GD_DIVIDE_ENTRY; E.in_fields[0] = (char *)in_field1; E.in_fields[1] = (char *)in_field2; - int error = _GD_Add(D, &E, parent); + error = _GD_Add(D, &E, parent); dreturn("%i", error); return error; @@ -1542,6 +1583,9 @@ int gd_madd_recip(DIRFILE* D, const char *parent, const char* field_code, const char* in_field, double dividend) gd_nothrow { + int error; + gd_entry_t E; + dtrace("%p, \"%s\", \"%s\", \"%s\", %g", D, parent, field_code, in_field, dividend); @@ -1551,14 +1595,13 @@ return -1; } - gd_entry_t E; memset(&E, 0, sizeof(gd_entry_t)); E.field = (char *)field_code; E.field_type = GD_RECIP_ENTRY; E.EN(recip,dividend) = dividend; E.comp_scal = 0; E.in_fields[0] = (char *)in_field; - int error = _GD_Add(D, &E, parent); + error = _GD_Add(D, &E, parent); dreturn("%i", error); return error; @@ -1594,6 +1637,9 @@ int gd_madd_crecip89(DIRFILE* D, const char *parent, const char* field_code, const char* in_field, const double cdividend[2]) gd_nothrow { + gd_entry_t E; + int error; + dtrace("%p, \"%s\", \"%s\", \"%s\", [%g, %g]", D, parent, field_code, in_field, cdividend[0], cdividend[1]); @@ -1603,14 +1649,13 @@ return -1; } - gd_entry_t E; memset(&E, 0, sizeof(gd_entry_t)); E.field = (char *)field_code; E.field_type = GD_RECIP_ENTRY; _gd_a2c(E.EN(recip,cdividend), cdividend); E.comp_scal = 1; E.in_fields[0] = (char *)in_field; - int error = _GD_Add(D, &E, parent); + error = _GD_Add(D, &E, parent); dreturn("%i", error); return error; @@ -1621,6 +1666,10 @@ const char* field_code, const char* value) gd_nothrow { char *buffer; + int error; + gd_entry_t *entry; + gd_entry_t S; + dtrace("%p, \"%s\", \"%s\", \"%s\"", D, parent, field_code, value); if (D->flags & GD_INVALID) {/* don't crash */ @@ -1629,12 +1678,10 @@ return -1; } - gd_entry_t *entry; - gd_entry_t S; S.field = (char *)field_code; S.field_type = GD_STRING_ENTRY; S.fragment_index = 0; - int error = _GD_Add(D, &S, parent); + error = _GD_Add(D, &S, parent); /* Actually store the string, now */ if (!error) { @@ -1667,6 +1714,10 @@ gd_type_t const_type, gd_type_t data_type, const void* value) gd_nothrow { char *buffer; + int error; + gd_entry_t *entry; + gd_entry_t C; + dtrace("%p, \"%s\", \"%s\", 0x%x, 0x%x, %p", D, parent, field_code, const_type, data_type, value); @@ -1676,13 +1727,11 @@ return -1; } - gd_entry_t *entry; - gd_entry_t C; C.field = (char *)field_code; C.field_type = GD_CONST_ENTRY; C.EN(scalar,const_type) = const_type; C.fragment_index = 0; - int error = _GD_Add(D, &C, parent); + error = _GD_Add(D, &C, parent); /* Actually store the constant, now */ if (!error) { @@ -1716,6 +1765,10 @@ const void* values) gd_nothrow { char *buffer; + int error; + gd_entry_t *entry; + gd_entry_t C; + dtrace("%p, \"%s\", \"%s\", 0x%x, %zi 0x%x, %p", D, parent, field_code, const_type, array_len, data_type, values); @@ -1725,14 +1778,12 @@ return -1; } - gd_entry_t *entry; - gd_entry_t C; C.field = (char *)field_code; C.field_type = GD_CARRAY_ENTRY; C.EN(scalar,const_type) = const_type; C.EN(scalar,array_len) = array_len; C.fragment_index = 0; - int error = _GD_Add(D, &C, parent); + error = _GD_Add(D, &C, parent); /* Actually store the carray, now */ if (!error) { diff -Nru libgetdata-0.7.0/src/ascii.c libgetdata-0.7.1/src/ascii.c --- libgetdata-0.7.0/src/ascii.c 2010-11-06 23:17:23.000000000 +0000 +++ libgetdata-0.7.1/src/ascii.c 2010-12-01 00:59:34.000000000 +0000 @@ -37,9 +37,11 @@ int _GD_AsciiOpen(struct _gd_raw_file* file, int mode, int creat) { + int fp; + dtrace("%p, %i, %i", file, mode, creat); - int fp = open(file->name, ((mode == GD_RDWR) ? O_RDWR : O_RDONLY) | + fp = open(file->name, ((mode == GD_RDWR) ? O_RDWR : O_RDONLY) | (creat ? O_CREAT : 0) | O_BINARY, 0666); file->edata = fdopen(fp, (mode == GD_RDWR) ? "r+" : "r"); @@ -158,6 +160,7 @@ ret = -1; break; } + file->fp++; } } else { for (n = 0; n < nmemb; ++n) { @@ -187,6 +190,7 @@ break; } } + file->fp++; } } diff -Nru libgetdata-0.7.0/src/bzip.c libgetdata-0.7.1/src/bzip.c --- libgetdata-0.7.0/src/bzip.c 2010-10-22 22:01:16.000000000 +0000 +++ libgetdata-0.7.1/src/bzip.c 2010-12-01 00:59:34.000000000 +0000 @@ -113,10 +113,10 @@ off64_t _GD_Bzip2Seek(struct _gd_raw_file* file, off64_t count, gd_type_t data_type, int pad __gd_unused) { - dtrace("%p, %lli, %x, ", file, (long long)count, data_type); - struct gd_bzdata *ptr = (struct gd_bzdata *)file->edata; + dtrace("%p, %lli, %x, ", file, (long long)count, data_type); + count *= GD_SIZE(data_type); if (ptr->base > count) { @@ -136,8 +136,10 @@ /* seek forward the slow way */ while (ptr->base + ptr->end < count) { + int n; + ptr->bzerror = 0; - int n = BZ2_bzRead(&ptr->bzerror, ptr->bzfile, ptr->data, + n = BZ2_bzRead(&ptr->bzerror, ptr->bzfile, ptr->data, GD_BZIP_BUFFER_SIZE); if (ptr->bzerror == BZ_OK || ptr->bzerror == BZ_STREAM_END) { @@ -165,13 +167,15 @@ ssize_t _GD_Bzip2Read(struct _gd_raw_file *file, void *data, gd_type_t data_type, size_t nmemb) { - dtrace("%p, %p, %x, %zu", file, data, data_type, nmemb); - char* output = (char*)data; struct gd_bzdata *ptr = (struct gd_bzdata *)file->edata; unsigned long long nbytes = nmemb * GD_SIZE(data_type); + dtrace("%p, %p, %x, %zu", file, data, data_type, nmemb); + while (nbytes > (unsigned long long)(ptr->end - ptr->pos)) { + int n; + memcpy(output, ptr->data + ptr->pos, ptr->end - ptr->pos); output += ptr->end - ptr->pos; nbytes -= ptr->end - ptr->pos; @@ -183,7 +187,7 @@ } ptr->bzerror = 0; - int n = BZ2_bzRead(&ptr->bzerror, ptr->bzfile, ptr->data, + n = BZ2_bzRead(&ptr->bzerror, ptr->bzfile, ptr->data, GD_BZIP_BUFFER_SIZE); if (ptr->bzerror == BZ_OK || ptr->bzerror == BZ_STREAM_END) { @@ -218,9 +222,8 @@ int _GD_Bzip2Close(struct _gd_raw_file *file) { - dtrace("%p", file); - struct gd_bzdata *ptr = (struct gd_bzdata *)file->edata; + dtrace("%p", file); ptr->bzerror = 0; BZ2_bzReadClose(&ptr->bzerror, ptr->bzfile); @@ -237,9 +240,12 @@ off64_t _GD_Bzip2Size(struct _gd_raw_file *file, gd_type_t data_type) { + struct gd_bzdata *ptr; + off_t n; + dtrace("%p, %x", file, data_type); - struct gd_bzdata *ptr = _GD_Bzip2DoOpen(file); + ptr = _GD_Bzip2DoOpen(file); if (ptr == NULL) { dreturn("%i", -1); @@ -248,8 +254,10 @@ /* seek forward the slow way to the end */ while (ptr->bzerror != BZ_STREAM_END) { + int n; + ptr->bzerror = 0; - int n = BZ2_bzRead(&ptr->bzerror, ptr->bzfile, ptr->data, + n = BZ2_bzRead(&ptr->bzerror, ptr->bzfile, ptr->data, GD_BZIP_BUFFER_SIZE); if (ptr->bzerror == BZ_OK || ptr->bzerror == BZ_STREAM_END) { @@ -258,12 +266,16 @@ ptr->end = n; } else { free(ptr); + BZ2_bzReadClose(&ptr->bzerror, ptr->bzfile); + fclose(ptr->stream); dreturn("%i", -1); return -1; } } + BZ2_bzReadClose(&ptr->bzerror, ptr->bzfile); + fclose(ptr->stream); - off_t n = (ptr->base + ptr->end) / GD_SIZE(data_type); + n = (ptr->base + ptr->end) / GD_SIZE(data_type); free(ptr); dreturn("%lli", (long long)n); diff -Nru libgetdata-0.7.0/src/close.c libgetdata-0.7.1/src/close.c --- libgetdata-0.7.0/src/close.c 2010-11-01 17:17:09.000000000 +0000 +++ libgetdata-0.7.1/src/close.c 2010-12-01 00:59:34.000000000 +0000 @@ -44,6 +44,7 @@ } free(D->entry); + free(D->dot_list); free(D->error_string); free(D->error_file); free(D->field_list); @@ -97,9 +98,11 @@ int gd_close(DIRFILE *D) { + int ret; + dtrace("%p", D); - int ret = _GD_ShutdownDirfile(D, 1); + ret = _GD_ShutdownDirfile(D, 1); dreturn("%i", ret); return ret; @@ -107,9 +110,11 @@ int gd_discard(DIRFILE* D) { + int ret; + dtrace("%p", D); - int ret = _GD_ShutdownDirfile(D, 0); + ret = _GD_ShutdownDirfile(D, 0); dreturn("%i", ret); return ret; diff -Nru libgetdata-0.7.0/src/common.c libgetdata-0.7.1/src/common.c --- libgetdata-0.7.0/src/common.c 2010-11-06 23:17:23.000000000 +0000 +++ libgetdata-0.7.1/src/common.c 2010-12-01 18:28:26.000000000 +0000 @@ -65,10 +65,11 @@ if (len != -1) { - dreturn("\"%s\" (%i)", line, *n); + dreturn("\"%s\" (%zu)", line, *n); return line; /* a line was read */ } + free(line); dreturn("%p", NULL); return NULL; /* there were no valid lines */ } @@ -186,6 +187,8 @@ /* compute LUT table path -- this is used by _GD_Change, so e may not be E->e */ int _GD_SetTablePath(DIRFILE *D, gd_entry_t *E, struct _gd_private_entry *e) { + char *temp_buffer; + dtrace("%p, %p, %p", D, E, e); if (E->EN(linterp,table)[0] == '/') { @@ -196,17 +199,18 @@ return 1; } } else { - e->u.linterp.table_path = (char *)malloc(FILENAME_MAX); + e->u.linterp.table_path = (char *)malloc(strlen(E->EN(linterp,table)) + 2 + + strlen(D->fragment[E->fragment_index].cname)); if (e->u.linterp.table_path == NULL) { _GD_SetError(D, GD_E_ALLOC, 0, NULL, 0, NULL); dreturn("%i", 1); return 1; } - char temp_buffer[FILENAME_MAX]; - strcpy(temp_buffer, D->fragment[E->fragment_index].cname); + temp_buffer = strdup(D->fragment[E->fragment_index].cname); strcpy(e->u.linterp.table_path, dirname(temp_buffer)); strcat(e->u.linterp.table_path, "/"); strcat(e->u.linterp.table_path, E->EN(linterp,table)); + free(temp_buffer); } dreturn("%i", 0); @@ -411,10 +415,11 @@ #define CLINTERPC(t) \ do { \ for (i = 0; i < npts; i++) { \ + double tx, dx; \ x = data_in[i]; \ idx = _GD_GetIndex(x, lut, idx, n_ln); \ - double tx = lut[idx + 1].x - lut[idx].x; \ - double dx = x - lut[idx].x; \ + tx = lut[idx + 1].x - lut[idx].x; \ + dx = x - lut[idx].x; \ ((t *)data)[2 * i] = (t)(lut[idx].y.c[0] + \ (lut[idx + 1].y.c[0] - lut[idx].y.c[0]) / tx * dx); \ ((t *)data)[2 * i + 1] = (t)(lut[idx].y.c[1] + \ @@ -775,14 +780,13 @@ int _GD_GetRepr(DIRFILE* D, const char* field_code_in, char** field_code) { int repr = GD_REPR_NONE; + const int field_code_len = strlen(field_code_in); dtrace("%p, \"%s\", %p", D, field_code_in, field_code); - const int field_code_len = strlen(field_code_in); - *field_code = (char *)field_code_in; /* find the representation, if any */ - if (field_code_in[field_code_len - 2] == '.') { + if (field_code_len > 2 && field_code_in[field_code_len - 2] == '.') { switch (field_code_in[field_code_len - 1]) { case 'r': repr = GD_REPR_REAL; diff -Nru libgetdata-0.7.0/src/compat.c libgetdata-0.7.1/src/compat.c --- libgetdata-0.7.0/src/compat.c 2010-11-06 23:17:23.000000000 +0000 +++ libgetdata-0.7.1/src/compat.c 2010-12-01 18:28:26.000000000 +0000 @@ -34,9 +34,11 @@ #ifndef HAVE_GMTIME_R struct tm *gmtime_r(const time_t *timep, struct tm *result) { + struct tm *ptr; + dtrace("%p, %p", timep, result); - struct tm *ptr = gmtime(timep); + ptr = gmtime(timep); if (!ptr) return NULL; @@ -51,18 +53,20 @@ #ifndef HAVE_MKSTEMP int mkstemp(char *template) { int ret = -1; + char *template_template; dtrace("\"%s\"", template); - char *template_template = strdup(template); + template_template = strdup(template); /* for sanity's sake */ errno = 0; /* loop while open returns EEXIST */ do { + char *ptr; strcpy(template, template_template); - char* ptr = mktemp(template); + ptr = mktemp(template); if (ptr == NULL) errno = EINVAL; @@ -80,6 +84,8 @@ #ifdef __MSVCRT__ int _GD_Rename(const char *oldname, const char *newname) { + int ret; + dtrace("\"%s\", \"%s\"", oldname, newname); if (unlink(newname)) { @@ -89,7 +95,7 @@ } } - int ret = rename(oldname, newname); + ret = rename(oldname, newname); dreturn("%i", ret); return ret; @@ -100,9 +106,11 @@ #ifndef HAVE_STRERROR_R int strerror_r(int errnum, char *buf, size_t buflen) { + char *ptr; + dtrace("%i, %p, %zu", errnum, buf, buflen); - char *ptr = strerror(errnum); + ptr = strerror(errnum); strncpy(buf, ptr, buflen); return 0; @@ -150,6 +158,11 @@ /* look for delim */ q = (char *)memchr(p, delim, nread); if (q) { +#ifdef __MSVCRT__ + int r; + off64_t new_pos; +#endif + /* found delim */ count += (q - p) + 1; @@ -164,8 +177,8 @@ #ifdef __MSVCRT__ /* Even when we open a text file in binary mode, fseek/ftell seem able * to screw up. So, do things the hard way. */ - int r = fgetc(stream); - off64_t new_pos = ftello64(stream); + r = fgetc(stream); + new_pos = ftello64(stream); while (r != EOF && (new_pos <= pos || r != '\n')) { r = fgetc(stream); new_pos = ftello64(stream); diff -Nru libgetdata-0.7.0/src/config.h.in libgetdata-0.7.1/src/config.h.in --- libgetdata-0.7.0/src/config.h.in 2010-11-23 00:33:48.000000000 +0000 +++ libgetdata-0.7.1/src/config.h.in 2010-12-06 23:09:00.000000000 +0000 @@ -150,6 +150,9 @@ /* Define to 1 if you have the `mkstemp' function. */ #undef HAVE_MKSTEMP +/* Define to 1 if you have the `nan' function. */ +#undef HAVE_NAN + /* Define to 1 if you have the header file, and it defines `DIR'. */ #undef HAVE_NDIR_H diff -Nru libgetdata-0.7.0/src/del.c libgetdata-0.7.1/src/del.c --- libgetdata-0.7.0/src/del.c 2010-11-06 00:16:42.000000000 +0000 +++ libgetdata-0.7.1/src/del.c 2010-12-01 00:59:34.000000000 +0000 @@ -194,9 +194,12 @@ { unsigned int index; unsigned int first, last = 0; - int n_del, i, repr; + int n_del, i, repr, len; unsigned int j; char *field_code; + char **new_ref = NULL; + gd_entry_t *reference = NULL, *E; + gd_entry_t **del_list; dtrace("%p, \"%s\", %x", D, field_code_in, flags); @@ -214,15 +217,14 @@ _GD_ClearError(D); - gd_entry_t *E = _GD_FindFieldAndRepr(D, field_code_in, &field_code, &repr, - &index, 1); + E = _GD_FindFieldAndRepr(D, field_code_in, &field_code, &repr, &index, 1); if (D->error) { dreturn("%i", -1); return -1; } - const int len = strlen(field_code); + len = strlen(field_code); /* check protection */ if (D->fragment[E->fragment_index].protection & GD_PROTECT_FORMAT) { @@ -256,15 +258,15 @@ * search linearly in both directions until we find something that isn't a * meta field of our parent */ while (first > 0) - if (D->entry[first - 1]->field[len] == '/' && - strncmp(D->entry[first - 1]->field, field_code, len) == 0) + if (strncmp(D->entry[first - 1]->field, field_code, len) == 0 && + D->entry[first - 1]->field[len] == '/') first--; else break; while (last < D->n_entries - 1) - if (D->entry[last + 1]->field[len] == '/' && - strncmp(D->entry[last + 1]->field, field_code, len) == 0) + if (strncmp(D->entry[last + 1]->field, field_code, len) == 0 && + D->entry[last + 1]->field[len] == '/') last++; else break; @@ -274,8 +276,8 @@ free(field_code); /* gather a list of fields */ - gd_entry_t **del_list = (gd_entry_t **)malloc(sizeof(gd_entry_t*) * - (1 + E->e->n_meta)); + del_list = (gd_entry_t **)malloc(sizeof(gd_entry_t*) * ((E->e->n_meta == -1) ? + 1 : 1 + E->e->n_meta)); if (del_list == NULL) { _GD_SetError(D, GD_E_ALLOC, 0, NULL, 0, NULL); @@ -346,9 +348,6 @@ } /* Fix up reference fields */ - char** new_ref = NULL; - gd_entry_t* reference = NULL; - if (E->field_type == GD_RAW_ENTRY) { new_ref = (char **)malloc(sizeof(char*) * D->n_fragment); if (new_ref == NULL) { diff -Nru libgetdata-0.7.0/src/encoding.c libgetdata-0.7.1/src/encoding.c --- libgetdata-0.7.0/src/encoding.c 2010-11-06 00:14:32.000000000 +0000 +++ libgetdata-0.7.1/src/encoding.c 2010-12-01 00:59:34.000000000 +0000 @@ -195,6 +195,8 @@ int _GD_MissingFramework(int encoding, unsigned int funcs) { + int ret; + dtrace("%x, %x", encoding, funcs); #ifdef USE_MODULES @@ -268,7 +270,7 @@ #endif #endif - int ret = + ret = (funcs & GD_EF_OPEN && _gd_ef[encoding].open == NULL) || (funcs & GD_EF_CLOSE && _gd_ef[encoding].close == NULL) || (funcs & GD_EF_TOUCH && _gd_ef[encoding].touch == NULL) || @@ -594,9 +596,11 @@ int _GD_GenericTouch(struct _gd_raw_file* file) { + int fd; + dtrace("%p", file); - int fd = open(file->name, O_RDWR | O_CREAT | O_TRUNC | O_BINARY, 0666); + fd = open(file->name, O_RDWR | O_CREAT | O_TRUNC | O_BINARY, 0666); if (fd != -1) fd = close(fd); @@ -607,9 +611,11 @@ int _GD_GenericUnlink(struct _gd_raw_file* file) { + int r; + dtrace("%p", file); - int r = unlink(file->name); + r = unlink(file->name); dreturn("%i", r); return r; @@ -617,11 +623,13 @@ int _GD_GenericMove(struct _gd_raw_file* file, char* new_path) { + int r, rename_errno; + dtrace("%p, \"%s\"", file, new_path); - int r = _GD_Rename(file->name, new_path); + r = _GD_Rename(file->name, new_path); - int rename_errno = errno; + rename_errno = errno; if (!r) { free(file->name); diff -Nru libgetdata-0.7.0/src/entry.c libgetdata-0.7.1/src/entry.c --- libgetdata-0.7.0/src/entry.c 2010-11-06 00:11:47.000000000 +0000 +++ libgetdata-0.7.1/src/entry.c 2010-12-01 00:59:34.000000000 +0000 @@ -49,8 +49,10 @@ case GD_LINTERP_ENTRY: free(entry->in_fields[0]); free(entry->EN(linterp,table)); - if (priv) + if (priv) { free(entry->e->u.linterp.table_path); + free(entry->e->u.linterp.lut); + } break; case GD_RECIP_ENTRY: free(entry->in_fields[0]); @@ -109,6 +111,8 @@ for (i = 0; entry->e->carray_value_list[i].n != 0; ++i) free(entry->e->carray_value_list[i].d); free(entry->e->carray_value_list); + if (entry->e->n_meta > -1) + free(entry->e->p.meta_entry); free(entry->e); free(entry); } @@ -134,12 +138,11 @@ gd_entry_t* C; int repr; char* field_code; - - dtrace("%p, %p, %i, %i, %p", D, E, i, type, data); - const char* scalar = E->scalar[i]; int index = E->scalar_ind[i]; + dtrace("%p, %p, %i, %i, %p", D, E, i, type, data); + if (scalar != NULL) { C = _GD_FindFieldAndRepr(D, scalar, &field_code, &repr, NULL, 0); @@ -262,6 +265,7 @@ { int repr; char* field_code; + gd_entry_t *E; dtrace("%p, \"%s\"", D, field_code_in); @@ -272,8 +276,7 @@ } /* Check field */ - gd_entry_t *E = _GD_FindFieldAndRepr(D, field_code_in, &field_code, &repr, - NULL, 1); + E = _GD_FindFieldAndRepr(D, field_code_in, &field_code, &repr, NULL, 1); if (D->error) { dreturn("%p", NULL); diff -Nru libgetdata-0.7.0/src/errors.c libgetdata-0.7.1/src/errors.c --- libgetdata-0.7.0/src/errors.c 2010-11-07 00:08:33.000000000 +0000 +++ libgetdata-0.7.1/src/errors.c 2010-12-01 00:59:34.000000000 +0000 @@ -202,10 +202,14 @@ D->error = error; D->suberror = suberror; D->error_line = line; - if (format_file != NULL) - strncpy(D->error_file, format_file, FILENAME_MAX); - if (token != NULL) - strncpy(D->error_string, token, FILENAME_MAX); + if (format_file != NULL) { + free(D->error_file); + D->error_file = strdup(format_file); + } + if (token != NULL) { + free(D->error_string); + D->error_string = strdup(token); + } if (D->flags & GD_VERBOSE) { char *error_string = gd_error_string(D, NULL, 0); diff -Nru libgetdata-0.7.0/src/field_list.c libgetdata-0.7.1/src/field_list.c --- libgetdata-0.7.0/src/field_list.c 2010-11-05 23:49:31.000000000 +0000 +++ libgetdata-0.7.1/src/field_list.c 2010-12-01 00:59:34.000000000 +0000 @@ -39,11 +39,11 @@ const void *gd_constants(DIRFILE* D, gd_type_t return_type) gd_nothrow { - dtrace("%p, 0x%x", D, return_type); - unsigned int i, n; char* fl; + dtrace("%p, 0x%x", D, return_type); + if (D->flags & GD_INVALID) { _GD_SetError(D, GD_E_BAD_DIRFILE, 0, NULL, 0, NULL); dreturn("%p", NULL); @@ -81,11 +81,11 @@ const gd_carray_t *gd_carrays(DIRFILE* D, gd_type_t return_type) gd_nothrow { - dtrace("%p, 0x%x", D, return_type); - unsigned int i, n; gd_carray_t* fl; + dtrace("%p, 0x%x", D, return_type); + if (D->flags & GD_INVALID) { _GD_SetError(D, GD_E_BAD_DIRFILE, 0, NULL, 0, NULL); dreturn("%p", NULL); @@ -133,11 +133,11 @@ const char **gd_strings(DIRFILE* D) gd_nothrow { - dtrace("%p", D); - unsigned int i, n; char** fl; + dtrace("%p", D); + if (D->flags & GD_INVALID) { _GD_SetError(D, GD_E_BAD_DIRFILE, 0, NULL, 0, NULL); dreturn("%p", NULL); @@ -182,12 +182,12 @@ const char **gd_field_list_by_type(DIRFILE* D, gd_entype_t type) gd_nothrow { - dtrace("%p, %x", D, type); - unsigned int i, n; char** fl; int index = -1; + dtrace("%p, %x", D, type); + if (D->flags & GD_INVALID) { _GD_SetError(D, GD_E_BAD_DIRFILE, 0, NULL, 0, NULL); dreturn("%p", NULL); @@ -252,10 +252,10 @@ const char **gd_vector_list(DIRFILE* D) gd_nothrow { - dtrace("%p", D); - unsigned int i, n; - char** fl; + char **fl; + + dtrace("%p", D); if (D->flags & GD_INVALID) { _GD_SetError(D, GD_E_BAD_DIRFILE, 0, NULL, 0, NULL); @@ -302,10 +302,10 @@ const char **gd_field_list(DIRFILE* D) gd_nothrow { - dtrace("%p", D); - unsigned int i, n; - char** fl; + char **fl; + + dtrace("%p", D); if (D->flags & GD_INVALID) { _GD_SetError(D, GD_E_BAD_DIRFILE, 0, NULL, 0, NULL); diff -Nru libgetdata-0.7.0/src/flush.c libgetdata-0.7.1/src/flush.c --- libgetdata-0.7.0/src/flush.c 2010-11-06 00:13:48.000000000 +0000 +++ libgetdata-0.7.1/src/flush.c 2010-12-01 18:28:26.000000000 +0000 @@ -91,9 +91,10 @@ static const char* _GD_TypeName(DIRFILE* D, gd_type_t data_type) { - dtrace("%p, 0x%x", D, data_type); const char* ptr; + dtrace("%p, 0x%x", D, data_type); + switch(data_type) { case GD_UINT8: ptr = "UINT8"; @@ -143,9 +144,10 @@ static const char* _GD_OldTypeName(DIRFILE* D, gd_type_t data_type) { - dtrace("%p, 0x%x", D, data_type); const char* ptr; + dtrace("%p, 0x%x", D, data_type); + switch(data_type) { case GD_UINT8: ptr = "c"; @@ -188,7 +190,7 @@ if (!permissive && standards < 6) { fputs(in, stream); - dreturn("%i", strlen(in)); + dreturn("%zu", strlen(in)); return strlen(in); } @@ -429,6 +431,7 @@ unsigned int u; mode_t mode; struct stat stat_buf; + time_t t; dtrace("%p, %i, %i", D, i, permissive); @@ -457,10 +460,10 @@ } if (D->flags & GD_PRETTY_PRINT) { - pretty = 1; size_t t = 0; size_t m = 0; int n = 0; + pretty = 1; for (u = 0; u < D->n_entries; ++u) if (D->entry[u]->fragment_index == i && D->entry[u]->e->n_meta != -1) { size_t l = strlen(D->entry[u]->field); @@ -477,7 +480,7 @@ } /* Introit */ - time_t t = time(NULL); + t = time(NULL); strftime(buffer, GD_MAX_LINE_LENGTH, "%c", gmtime_r(&t, &now)); fprintf(stream, "# This is a dirfile format file.\n" @@ -871,8 +874,6 @@ int gd_dirfile_standards(DIRFILE *D, int vers) gd_nothrow { - dtrace("%p, %i", D, vers); - /* log2(n) lut */ static const char ln2[] = { -1, 0, @@ -902,6 +903,8 @@ 44, 55, 47, 5, 32, 0, 38, 14, 22, 11, 58, 18, 53, 63, 9, 61, 27, 29, 50, 43, 46, 31, 37, 21, 57, 52, 8, 26, 49, 45, 36, 56, 7, 48, 35, 6, 34, 33}; + dtrace("%p, %i", D, vers); + _GD_ClearError(D); if (D->flags & GD_INVALID) { diff -Nru libgetdata-0.7.0/src/getdata.c libgetdata-0.7.1/src/getdata.c --- libgetdata-0.7.0/src/getdata.c 2010-11-06 00:12:42.000000000 +0000 +++ libgetdata-0.7.1/src/getdata.c 2010-12-01 00:59:34.000000000 +0000 @@ -31,6 +31,8 @@ #include #endif +#include "nan.h" + #define EXTRACT_REPR(it,ot,f) \ for (i = 0; i < n; ++i) ((ot *)rdata)[i] = (ot)f(((it *)cdata)[i]) @@ -291,11 +293,13 @@ /** open the file (and cache the fp) if it hasn't been opened yet. */ if (E->e->u.raw.file[0].fp < 0) { if (!_GD_Supports(D, E, GD_EF_OPEN | GD_EF_SEEK | GD_EF_READ)) { + free(databuffer); dreturn("%i", 0); return 0; } else if (_GD_SetEncodedName(D, E->e->u.raw.file, E->e->u.raw.filebase, 0)) { + free(databuffer); dreturn("%i", 0); return 0; } else if ((*_gd_ef[E->e->u.raw.file[0].encoding].open)(E->e->u.raw.file, @@ -303,6 +307,7 @@ { _GD_SetError(D, GD_E_RAW_IO, 0, E->e->u.raw.file[0].name, errno, NULL); + free(databuffer); dreturn("%i", 0); return 0; } @@ -312,6 +317,7 @@ E->EN(raw,data_type), 0) == -1) { _GD_SetError(D, GD_E_RAW_IO, 0, E->e->u.raw.file[0].name, errno, NULL); + free(databuffer); dreturn("%i", 0); return 0; } @@ -845,13 +851,12 @@ int i; void *tmpbuf2 = NULL; void *tmpbuf3 = NULL; + const gd_type_t ntype = (return_type & GD_COMPLEX) ? GD_COMPLEX128 + : GD_FLOAT64; dtrace("%p, %p, %lli, %zu, 0x%x, %p", D, E, first_samp, num_samp, return_type, data_out); - const gd_type_t ntype = (return_type & GD_COMPLEX) ? GD_COMPLEX128 - : GD_FLOAT64; - /* input field checks */ for (i = 0; i < E->EN(lincom,n_fields); ++i) { if (_GD_BadInput(D, E, i)) { @@ -897,6 +902,7 @@ if (E->EN(lincom,n_fields) > 1) { /* calculate the first sample, type and number of samples to read of the * second field */ + size_t n_read2; size_t num_samp2 = (int)ceil((double)n_read * spf[1] / spf[0]); off64_t first_samp2 = first_samp * spf[1] / spf[0]; @@ -909,7 +915,7 @@ } /* read the second field */ - size_t n_read2 = _GD_DoField(D, E->e->entry[1], E->e->repr[1], first_samp2, + n_read2 = _GD_DoField(D, E->e->entry[1], E->e->repr[1], first_samp2, num_samp2, ntype, tmpbuf2); if (D->error || n_read2 == 0) { free(tmpbuf2); @@ -923,6 +929,7 @@ /* Do the same for the third field, if needed */ if (E->EN(lincom,n_fields) > 2) { + size_t n_read3; size_t num_samp3 = (int)ceil((double)n_read * spf[2] / spf[0]); off64_t first_samp3 = first_samp * spf[2] / spf[0]; @@ -934,8 +941,8 @@ return 0; } - size_t n_read3 = _GD_DoField(D, E->e->entry[2], E->e->repr[2], - first_samp3, num_samp3, ntype, tmpbuf3); + n_read3 = _GD_DoField(D, E->e->entry[2], E->e->repr[2], first_samp3, + num_samp3, ntype, tmpbuf3); if (D->error || n_read3 == 0) { free(tmpbuf2); free(tmpbuf3); @@ -978,6 +985,7 @@ gd_spf_t spf1, spf2; size_t n_read, n_read2, num_samp2; off64_t first_samp2; + gd_type_t type2; dtrace("%p, %p, %lli, %zu, 0x%x, %p", D, E, first_samp, num_samp, return_type, data_out); @@ -1028,8 +1036,8 @@ first_samp2 = first_samp * spf2 / spf1; /* find the native type of the second field */ - gd_type_t type2 = (_GD_NativeType(D, E->e->entry[1], E->e->repr[1]) - & GD_COMPLEX) ? GD_COMPLEX128 : GD_FLOAT64; + type2 = (_GD_NativeType(D, E->e->entry[1], E->e->repr[1]) & GD_COMPLEX) ? + GD_COMPLEX128 : GD_FLOAT64; /* Allocate a temporary buffer for the second field */ tmpbuf = _GD_Alloc(D, type2, num_samp2); @@ -1116,6 +1124,7 @@ gd_spf_t spf1, spf2; size_t n_read, n_read2, num_samp2; off64_t first_samp2; + gd_type_t type2; dtrace("%p, %p, %lli, %zu, 0x%x, %p", D, E, first_samp, num_samp, return_type, data_out); @@ -1162,8 +1171,8 @@ first_samp2 = first_samp * spf2 / spf1; /* find the native type of the second field */ - gd_type_t type2 = (_GD_NativeType(D, E->e->entry[1], E->e->repr[1]) - & GD_COMPLEX) ? GD_COMPLEX128 : GD_FLOAT64; + type2 = (_GD_NativeType(D, E->e->entry[1], E->e->repr[1]) & GD_COMPLEX) ? + GD_COMPLEX128 : GD_FLOAT64; /* Allocate a temporary buffer for the second field */ tmpbuf = _GD_Alloc(D, type2, num_samp2); @@ -1209,13 +1218,12 @@ void *tmpbuf; size_t i; size_t n_read; + const uint64_t mask = (E->EN(bit,numbits) == 64) ? 0xffffffffffffffffULL : + ((uint64_t)1 << E->EN(bit,numbits)) - 1; dtrace("%p, %p, %i, %lli, %zu, 0x%x, %p", D, E, is_signed, first_samp, num_samp, return_type, data_out); - const uint64_t mask = (E->EN(bit,numbits) == 64) ? 0xffffffffffffffffULL : - ((uint64_t)1 << E->EN(bit,numbits)) - 1; - if (_GD_BadInput(D, E, 0)) { dreturn("%i", 0); return 0; @@ -1377,10 +1385,12 @@ static size_t _GD_DoConst(DIRFILE *D, const gd_entry_t *E, off64_t first, size_t len, gd_type_t return_type, void *data_out) { + gd_type_t type; + dtrace("%p, %p, %lli, %zu, 0x%x, %p", D, E, first, len, return_type, data_out); - gd_type_t type = _GD_ConstType(D, E->EN(scalar,const_type)); + type = _GD_ConstType(D, E->EN(scalar,const_type)); _GD_ConvertType(D, (char *)E->e->u.scalar.d + first * GD_SIZE(type), type, data_out, return_type, len); @@ -1537,6 +1547,7 @@ gd_entry_t* entry; char* field_code; int repr; + gd_spf_t spf; dtrace("%p, \"%s\", %lli, %lli, %zu, %zu, 0x%x, %p", D, field_code_in, first_frame, first_samp, num_frames, num_samp, return_type, data_out); @@ -1568,7 +1579,7 @@ } /* get the samples per frame */ - gd_spf_t spf = _GD_GetSPF(D, entry); + spf = _GD_GetSPF(D, entry); if (D->error) { dreturn("%i", 0); diff -Nru libgetdata-0.7.0/src/globals.c libgetdata-0.7.1/src/globals.c --- libgetdata-0.7.0/src/globals.c 2010-09-11 00:03:31.000000000 +0000 +++ libgetdata-0.7.1/src/globals.c 2010-12-01 00:59:34.000000000 +0000 @@ -46,6 +46,9 @@ const char *gd_reference(DIRFILE* D, const char* field_code) gd_nothrow { + gd_entry_t *E; + char *ptr; + dtrace("%p, \"%s\"", D, field_code); if (D->flags & GD_INVALID) {/* don't crash */ @@ -75,7 +78,7 @@ } /* Check field */ - gd_entry_t *E = _GD_FindField(D, field_code, D->entry, D->n_entries, NULL); + E = _GD_FindField(D, field_code, D->entry, D->n_entries, NULL); if (E == NULL) { _GD_SetError(D, GD_E_BAD_CODE, 0, NULL, 0, field_code); @@ -97,7 +100,7 @@ return NULL; } - char* ptr = strdup(E->field); + ptr = strdup(E->field); if (ptr == NULL) { _GD_SetError(D, GD_E_ALLOC, 0, NULL, 0, NULL); diff -Nru libgetdata-0.7.0/src/gzip.c libgetdata-0.7.1/src/gzip.c --- libgetdata-0.7.0/src/gzip.c 2010-06-30 02:55:33.000000000 +0000 +++ libgetdata-0.7.1/src/gzip.c 2010-12-01 00:59:34.000000000 +0000 @@ -64,10 +64,11 @@ off64_t _GD_GzipSeek(struct _gd_raw_file* file, off64_t count, gd_type_t data_type, int pad __gd_unused) { + off64_t n; + dtrace("%p, %lli, %x, ", file, (long long)count, data_type); - off64_t n = (off64_t)gzseek(file->edata, (off_t)count * GD_SIZE(data_type), - SEEK_SET); + n = (off64_t)gzseek(file->edata, (off_t)count * GD_SIZE(data_type), SEEK_SET); if (n == -1) { dreturn("%i", -1); @@ -81,9 +82,11 @@ ssize_t _GD_GzipRead(struct _gd_raw_file *file, void *ptr, gd_type_t data_type, size_t nmemb) { + ssize_t n; + dtrace("%p, %p, %x, %zu", file, ptr, data_type, nmemb); - ssize_t n = gzread(file->edata, ptr, GD_SIZE(data_type) * nmemb); + n = gzread(file->edata, ptr, GD_SIZE(data_type) * nmemb); if (n >= 0) n /= GD_SIZE(data_type); @@ -94,9 +97,11 @@ int _GD_GzipClose(struct _gd_raw_file *file) { + int ret; + dtrace("%p", file); - int ret = gzclose(file->edata); + ret = gzclose(file->edata); if (!ret) { file->fp = -1; file->edata = NULL; @@ -108,11 +113,12 @@ off64_t _GD_GzipSize(struct _gd_raw_file *file, gd_type_t data_type) { + int fd; uint32_t size = 0; dtrace("%p, %x", file, data_type); - int fd = open(file->name, O_RDONLY | O_BINARY); + fd = open(file->name, O_RDONLY | O_BINARY); if (fd < 0) { dreturn("%i", -1); return -1; diff -Nru libgetdata-0.7.0/src/include.c libgetdata-0.7.1/src/include.c --- libgetdata-0.7.0/src/include.c 2010-11-01 16:52:00.000000000 +0000 +++ libgetdata-0.7.1/src/include.c 2010-12-01 00:59:34.000000000 +0000 @@ -160,7 +160,7 @@ { int standards = GD_DIRFILE_STANDARDS_VERSION; char* ref_name = NULL; - int i; + int i, new_fragment; dtrace("%p, \"%s\", %i, %lx", D, file, fragment_index, (unsigned long)flags); @@ -200,7 +200,7 @@ return -1; } - int new_fragment = _GD_Include(D, file, "dirfile_include()", 0, &ref_name, + new_fragment = _GD_Include(D, file, "dirfile_include()", 0, &ref_name, fragment_index, &standards, &flags); if (!D->error) { @@ -239,8 +239,8 @@ ref_name); else D->reference_field = E; - free(ref_name); } + free(ref_name); dreturn("%i", new_fragment); return new_fragment; @@ -249,10 +249,11 @@ static int _GD_CollectFragments(DIRFILE* D, int** f, int fragment, int nf) { int i; + int *new_f; dtrace("%p, %p, %i, %i", D, f, fragment, nf); - int* new_f = (int *)realloc(*f, sizeof(int) * ++nf); + new_f = (int *)realloc(*f, sizeof(int) * ++nf); if (new_f == NULL) { _GD_SetError(D, GD_E_ALLOC, 0, NULL, 0, NULL); dreturn("%i", -1); @@ -291,8 +292,8 @@ int gd_uninclude(DIRFILE* D, int fragment_index, int del) { - int parent, j; - unsigned int i, o; + int parent, j, nf; + unsigned int i, o, old_count; int *f = NULL; dtrace("%p, %i, %i", D, fragment_index, del); @@ -327,7 +328,7 @@ } /* find all affected fragments */ - int nf = _GD_CollectFragments(D, &f, fragment_index, 0); + nf = _GD_CollectFragments(D, &f, fragment_index, 0); if (D->error) { free(f); @@ -363,7 +364,7 @@ /* delete fields from the fragment -- memory use is not sufficient to warrant * resizing D->entry */ - unsigned int old_count = D->n_entries; + old_count = D->n_entries; for (i = o = 0; i < old_count; ++i) if (_GD_ContainsFragment(f, nf, D->entry[i]->fragment_index)) { if (D->entry[i]->e->n_meta >= 0) { diff -Nru libgetdata-0.7.0/src/index.c libgetdata-0.7.1/src/index.c --- libgetdata-0.7.0/src/index.c 2010-07-10 03:01:05.000000000 +0000 +++ libgetdata-0.7.1/src/index.c 2010-12-01 00:59:34.000000000 +0000 @@ -25,6 +25,8 @@ #include #endif +#include "nan.h" + static double _GD_Extrapolate(DIRFILE *D, gd_entry_t *E, int repr, double value, off64_t limit, int eof) { diff -Nru libgetdata-0.7.0/src/internal.h libgetdata-0.7.1/src/internal.h --- libgetdata-0.7.0/src/internal.h 2010-11-06 23:17:23.000000000 +0000 +++ libgetdata-0.7.1/src/internal.h 2010-12-01 00:59:34.000000000 +0000 @@ -634,7 +634,7 @@ gd_type_t _GD_NativeType(DIRFILE* D, gd_entry_t* E, int repr); gd_entry_t* _GD_ParseFieldSpec(DIRFILE* D, int n_cols, char** in_cols, const gd_entry_t* P, const char* format_file, int linenum, int me, - int standards, int creat, int pedantic, int insert, char **outstring, + int standards, int creat, unsigned long flags, int insert, char **outstring, const char *tok_pos); char* _GD_ParseFragment(FILE* fp, DIRFILE *D, int me, int* standards, unsigned long int *flags); @@ -724,30 +724,6 @@ return strcmp((*(gd_entry_t**)a)->field, (*(gd_entry_t**)b)->field); } -/* The following has been extracted from internal.cpp from kjs */ - -/* - * For systems without NAN, this is a NAN in IEEE double format. - */ - -#if !defined(NAN) -static inline __attribute__ ((__const__)) double __NAN() -{ - typedef union { unsigned char b[8]; double d; } nan_t; -#ifdef ARM_ENDIAN_DOUBLES - static const nan_t NaN_Bytes = { { 0, 0, 0xf8, 0x7f, 0, 0, 0, 0 } }; -#elif defined(FLOATS_BIGENDIAN) - static const nan_t NaN_Bytes = { { 0x7f, 0xf8, 0, 0, 0, 0, 0, 0 } }; -#else - static const nan_t NaN_Bytes = { { 0, 0, 0, 0, 0, 0, 0xf8, 0x7f } }; -#endif - - const double NaN = NaN_Bytes.d; - return NaN; -} -#define NAN __NAN() -#endif /* !defined(NAN) */ - #ifndef __cplusplus # undef gd_nothrow # define gd_nothrow diff -Nru libgetdata-0.7.0/src/legacy.c libgetdata-0.7.1/src/legacy.c --- libgetdata-0.7.0/src/legacy.c 2010-11-06 00:25:10.000000000 +0000 +++ libgetdata-0.7.1/src/legacy.c 2010-12-01 00:59:34.000000000 +0000 @@ -122,10 +122,10 @@ { unsigned int i_dirfile; void *ptr; + char filedir[FILENAME_MAX]; dtrace("\"%s\", %x", filename_in, mode); - char filedir[FILENAME_MAX]; strncpy(filedir, filename_in, FILENAME_MAX); if (filedir[strlen(filedir) - 1] == '/') filedir[strlen(filedir) - 1] = '\0'; @@ -350,8 +350,6 @@ /* Okay, reconstruct the old FormatType. This is painful. */ struct FormatType *GetFormat(const char *filedir, int *error_code) gd_nothrow { - dtrace("\"%s\", %p", filedir, error_code); - unsigned int i; int nraw = 0; @@ -360,8 +358,11 @@ int nmultiply = 0; int nbit = 0; int nphase = 0; + DIRFILE *D; + + dtrace("\"%s\", %p", filedir, error_code); - DIRFILE *D = _GD_GetDirfile(filedir, GD_RDONLY, error_code); + D = _GD_GetDirfile(filedir, GD_RDONLY, error_code); if (!D) { dreturn("%p", NULL); @@ -542,6 +543,7 @@ int *error_code) gd_nothrow { DIRFILE* D; + int spf; dtrace("\"%s\", \"%s\", %p", filename, field_code, error_code); @@ -552,7 +554,7 @@ return 0; } - int spf = (int)gd_spf(D, field_code); + spf = (int)gd_spf(D, field_code); *error_code = _GD_CopyGlobalError(D); dreturn("%i", spf); diff -Nru libgetdata-0.7.0/src/lzma.c libgetdata-0.7.1/src/lzma.c --- libgetdata-0.7.0/src/lzma.c 2010-09-11 00:16:42.000000000 +0000 +++ libgetdata-0.7.1/src/lzma.c 2010-12-01 00:59:34.000000000 +0000 @@ -130,10 +130,10 @@ * appropriate. Returns -1 on error */ static int _GD_LzmaDecode(struct gd_lzmadata *ptr) { - dtrace("%p", ptr); - int n = 0; + dtrace("%p", ptr); + if (!ptr->input_eof) { n = fread(ptr->data_in + ptr->read_in, 1, GD_LZMA_BUFFER_SIZE - ptr->read_in, ptr->stream); @@ -190,10 +190,10 @@ off64_t _GD_LzmaSeek(struct _gd_raw_file* file, off64_t count, gd_type_t data_type, int pad __gd_unused) { - dtrace("%p, %lli, %x, ", file, (long long)count, data_type); - struct gd_lzmadata *ptr = (struct gd_lzmadata *)file->edata; + dtrace("%p, %lli, %x, ", file, (long long)count, data_type); + count *= GD_SIZE(data_type); if (ptr->base > count) { @@ -237,12 +237,11 @@ size_t nmemb) { char* output = (char *)data; - - dtrace("%p, %p, %x, %zu", file, data, data_type, nmemb); - struct gd_lzmadata *ptr = (struct gd_lzmadata *)file->edata; uint64_t nbytes = nmemb * GD_SIZE(data_type); + dtrace("%p, %p, %x, %zu", file, data, data_type, nmemb); + /* this loops over chunks of uncompressed data of size data_out until we * have as much data as we need in data_out, or until EOF */ while (nbytes > (uint64_t)(ptr->end - ptr->out_pos)) { @@ -284,10 +283,10 @@ int _GD_LzmaClose(struct _gd_raw_file *file) { - dtrace("%p", file); - struct gd_lzmadata *ptr = (struct gd_lzmadata *)file->edata; + dtrace("%p", file); + ptr->xzerror = 0; lzma_end(&ptr->xzfile); if (!fclose(ptr->stream)) { @@ -303,9 +302,12 @@ off64_t _GD_LzmaSize(struct _gd_raw_file *file, gd_type_t data_type) { + struct gd_lzmadata *ptr; + off_t n; + dtrace("%p, %x", file, data_type); - struct gd_lzmadata *ptr = _GD_LzmaDoOpen(file); + ptr = _GD_LzmaDoOpen(file); if (ptr == NULL) { dreturn("%i", -1); @@ -315,12 +317,16 @@ /* seek forward the slow way to the end */ while (!ptr->stream_end) { if (_GD_LzmaDecode(ptr)) { + lzma_end(&ptr->xzfile); + fclose(ptr->stream); dreturn("%i", -1); return -1; } } + lzma_end(&ptr->xzfile); + fclose(ptr->stream); - off_t n = (ptr->base + ptr->end) / GD_SIZE(data_type); + n = (ptr->base + ptr->end) / GD_SIZE(data_type); free(ptr); dreturn("%lli", (long long)n); diff -Nru libgetdata-0.7.0/src/Makefile.am libgetdata-0.7.1/src/Makefile.am --- libgetdata-0.7.0/src/Makefile.am 2010-09-17 22:23:40.000000000 +0000 +++ libgetdata-0.7.1/src/Makefile.am 2010-12-01 01:00:36.000000000 +0000 @@ -108,7 +108,8 @@ include.c ${LEGACY_C} ${LZMA_C} meta_list.c mod.c \ move.c name.c native.c nfields.c nframes.c nmeta.c \ open.c parse.c protect.c putdata.c raw.c ${SLIM_C} \ - spf.c string.c types.c ${GETDATA_LEGACY_H} internal.h + spf.c string.c types.c ${GETDATA_LEGACY_H} internal.h \ + nan.h libgetdata_la_LDFLAGS = $(EXPORT_DYNAMIC) -export-symbols-regex '^[^_]' \ -version-info \ ${GETDATA_IFACE_VERSION}:${GETDATA_IMPL_REVISION}:${GETDATA_IFACE_AGE} \ diff -Nru libgetdata-0.7.0/src/Makefile.in libgetdata-0.7.1/src/Makefile.in --- libgetdata-0.7.0/src/Makefile.in 2010-11-23 00:33:32.000000000 +0000 +++ libgetdata-0.7.1/src/Makefile.in 2010-12-06 23:08:41.000000000 +0000 @@ -96,7 +96,7 @@ globals.c gzip.c index.c include.c legacy.c lzma.c meta_list.c \ mod.c move.c name.c native.c nfields.c nframes.c nmeta.c \ open.c parse.c protect.c putdata.c raw.c slim.c spf.c string.c \ - types.c getdata_legacy.h internal.h + types.c getdata_legacy.h internal.h nan.h @USE_BZIP2_TRUE@@USE_MODULES_FALSE@am__objects_1 = bzip.lo @GETDATA_DEBUG_TRUE@am__objects_2 = debug.lo @USE_GZIP_TRUE@@USE_MODULES_FALSE@am__objects_3 = gzip.lo @@ -213,6 +213,7 @@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DIFF = @DIFF@ +DLLTOOL = @DLLTOOL@ DL_LIBRARY_PATH = @DL_LIBRARY_PATH@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ @@ -258,6 +259,7 @@ LZMA_CPPFLAGS = @LZMA_CPPFLAGS@ LZMA_LDFLAGS = @LZMA_LDFLAGS@ MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ @@ -292,6 +294,7 @@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ absolute_docdir = @absolute_docdir@ +ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ @@ -328,7 +331,6 @@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ @@ -415,7 +417,8 @@ include.c ${LEGACY_C} ${LZMA_C} meta_list.c mod.c \ move.c name.c native.c nfields.c nframes.c nmeta.c \ open.c parse.c protect.c putdata.c raw.c ${SLIM_C} \ - spf.c string.c types.c ${GETDATA_LEGACY_H} internal.h + spf.c string.c types.c ${GETDATA_LEGACY_H} internal.h \ + nan.h libgetdata_la_LDFLAGS = $(EXPORT_DYNAMIC) -export-symbols-regex '^[^_]' \ -version-info \ diff -Nru libgetdata-0.7.0/src/meta_list.c libgetdata-0.7.1/src/meta_list.c --- libgetdata-0.7.0/src/meta_list.c 2010-11-05 23:51:17.000000000 +0000 +++ libgetdata-0.7.1/src/meta_list.c 2010-12-01 00:59:34.000000000 +0000 @@ -32,10 +32,12 @@ const void *gd_mconstants(DIRFILE* D, const char* parent, gd_type_t return_type) gd_nothrow { - dtrace("%p, \"%s\", 0x%x", D, parent, return_type); - int i, n; char* fl; + gd_entry_t *P; + struct _gd_private_entry *e; + + dtrace("%p, \"%s\", 0x%x", D, parent, return_type); if (D->flags & GD_INVALID) { _GD_SetError(D, GD_E_BAD_DIRFILE, 0, NULL, 0, NULL); @@ -45,7 +47,7 @@ _GD_ClearError(D); - const gd_entry_t* P = _GD_FindField(D, parent, D->entry, D->n_entries, NULL); + P = _GD_FindField(D, parent, D->entry, D->n_entries, NULL); if (P == NULL || P->e->n_meta == -1) { _GD_SetError(D, GD_E_BAD_CODE, 0, NULL, 0, parent); @@ -53,7 +55,7 @@ return NULL; } - struct _gd_private_entry* e = P->e; + e = P->e; if (e->n_meta_const == 0) { dreturn("%p", NULL); @@ -86,10 +88,12 @@ const gd_carray_t *gd_mcarrays(DIRFILE* D, const char* parent, gd_type_t return_type) gd_nothrow { - dtrace("%p, \"%s\", 0x%x", D, parent, return_type); - int i, n; - gd_carray_t* fl; + gd_carray_t *fl; + gd_entry_t *P; + struct _gd_private_entry *e; + + dtrace("%p, \"%s\", 0x%x", D, parent, return_type); if (D->flags & GD_INVALID) { _GD_SetError(D, GD_E_BAD_DIRFILE, 0, NULL, 0, NULL); @@ -99,7 +103,7 @@ _GD_ClearError(D); - const gd_entry_t* P = _GD_FindField(D, parent, D->entry, D->n_entries, NULL); + P = _GD_FindField(D, parent, D->entry, D->n_entries, NULL); if (P == NULL || P->e->n_meta == -1) { _GD_SetError(D, GD_E_BAD_CODE, 0, NULL, 0, parent); @@ -107,7 +111,7 @@ return NULL; } - struct _gd_private_entry* e = P->e; + e = P->e; if (e->n_meta_carray == 0) { dreturn("%p", zero_carrays); @@ -149,10 +153,12 @@ const char **gd_mstrings(DIRFILE* D, const char* parent) gd_nothrow { - dtrace("%p, \"%s\"", D, parent); - int i, n; char** fl; + gd_entry_t *P; + struct _gd_private_entry *e; + + dtrace("%p, \"%s\"", D, parent); if (D->flags & GD_INVALID) { _GD_SetError(D, GD_E_BAD_DIRFILE, 0, NULL, 0, NULL); @@ -162,7 +168,7 @@ _GD_ClearError(D); - const gd_entry_t* P = _GD_FindField(D, parent, D->entry, D->n_entries, NULL); + P = _GD_FindField(D, parent, D->entry, D->n_entries, NULL); if (P == NULL || P->e->n_meta == -1) { _GD_SetError(D, GD_E_BAD_CODE, 0, NULL, 0, parent); @@ -170,7 +176,7 @@ return NULL; } - struct _gd_private_entry* e = P->e; + e = P->e; if (e->n_meta_string == 0) { dreturn("%p", zero_list); @@ -201,11 +207,14 @@ const char **gd_mfield_list_by_type(DIRFILE* D, const char* parent, gd_entype_t type) gd_nothrow { - dtrace("%p, \"%s\", %x", D, parent, type); - int i, index = -1; unsigned int n; - char** fl; + char **fl; + gd_entry_t *P; + struct _gd_private_entry *e; + size_t offs; + + dtrace("%p, \"%s\", %x", D, parent, type); if (D->flags & GD_INVALID) { _GD_SetError(D, GD_E_BAD_DIRFILE, 0, NULL, 0, NULL); @@ -215,7 +224,7 @@ _GD_ClearError(D); - const gd_entry_t* P = _GD_FindField(D, parent, D->entry, D->n_entries, NULL); + P = _GD_FindField(D, parent, D->entry, D->n_entries, NULL); if (P == NULL || P->e->n_meta == -1) { _GD_SetError(D, GD_E_BAD_CODE, 0, NULL, 0, parent); @@ -223,8 +232,8 @@ return NULL; } - struct _gd_private_entry* e = P->e; - size_t offs = strlen(P->field) + 1; + e = P->e; + offs = strlen(P->field) + 1; n = gd_nmfields_by_type(D, parent, type); @@ -274,10 +283,13 @@ const char **gd_mvector_list(DIRFILE* D, const char* parent) gd_nothrow { - dtrace("%p, \"%s\"", D, parent); - int i, n; - char** fl; + char **fl; + struct _gd_private_entry* e; + size_t offs; + gd_entry_t *P; + + dtrace("%p, \"%s\"", D, parent); if (D->flags & GD_INVALID) { _GD_SetError(D, GD_E_BAD_DIRFILE, 0, NULL, 0, NULL); @@ -287,7 +299,7 @@ _GD_ClearError(D); - const gd_entry_t* P = _GD_FindField(D, parent, D->entry, D->n_entries, NULL); + P = _GD_FindField(D, parent, D->entry, D->n_entries, NULL); if (P == NULL) { _GD_SetError(D, GD_E_BAD_CODE, 0, NULL, 0, parent); @@ -295,9 +307,8 @@ return NULL; } - struct _gd_private_entry* e = P->e; - - size_t offs = strlen(P->field) + 1; + e = P->e; + offs = strlen(P->field) + 1; n = e->n_meta - e->n_meta_string - e->n_meta_const - e->n_meta_carray; @@ -328,10 +339,13 @@ const char **gd_mfield_list(DIRFILE* D, const char* parent) gd_nothrow { - dtrace("%p, \"%s\"", D, parent); - int i, n; char** fl; + struct _gd_private_entry *e; + gd_entry_t *P; + size_t offs; + + dtrace("%p, \"%s\"", D, parent); if (D->flags & GD_INVALID) { _GD_SetError(D, GD_E_BAD_DIRFILE, 0, NULL, 0, NULL); @@ -341,7 +355,7 @@ _GD_ClearError(D); - const gd_entry_t* P = _GD_FindField(D, parent, D->entry, D->n_entries, NULL); + P = _GD_FindField(D, parent, D->entry, D->n_entries, NULL); if (P == NULL) { _GD_SetError(D, GD_E_BAD_CODE, 0, NULL, 0, parent); @@ -349,9 +363,9 @@ return NULL; } - struct _gd_private_entry* e = P->e; + e = P->e; - size_t offs = strlen(P->field) + 1; + offs = strlen(P->field) + 1; if (e->n_meta == 0) { dreturn("%p", zero_list); diff -Nru libgetdata-0.7.0/src/mod.c libgetdata-0.7.1/src/mod.c --- libgetdata-0.7.0/src/mod.c 2010-11-06 00:25:23.000000000 +0000 +++ libgetdata-0.7.1/src/mod.c 2010-12-01 00:59:34.000000000 +0000 @@ -264,16 +264,17 @@ if (flags) { ssize_t nread, nwrote; - off64_t ns_out; + off64_t ns_out, nf; void *buffer1; void *buffer2; + struct encoding_t *enc; if (j & GD_AS_NEED_RECALC) if (gd_get_constant(D, Q.scalar[0], GD_UINT16, &Q.EN(raw,spf))) break; - const off64_t nf = BUFFER_SIZE / max(E->e->u.raw.size, - GD_SIZE(Q.EN(raw,data_type))) / max(E->EN(raw,spf), Q.EN(raw,spf)); + nf = BUFFER_SIZE / max(E->e->u.raw.size, GD_SIZE(Q.EN(raw,data_type))) / + max(E->EN(raw,spf), Q.EN(raw,spf)); if (D->fragment[E->fragment_index].protection & GD_PROTECT_DATA) _GD_SetError(D, GD_E_PROTECTED, GD_E_PROTECTED_DATA, NULL, 0, @@ -286,7 +287,7 @@ if (D->error) break; - const struct encoding_t* enc = _gd_ef + E->e->u.raw.file[0].encoding; + enc = _gd_ef + E->e->u.raw.file[0].encoding; if (_GD_SetEncodedName(D, E->e->u.raw.file, E->e->u.raw.filebase, 0)) ; /* error already set */ @@ -392,6 +393,7 @@ _GD_SetError(D, GD_E_RAW_IO, 0, E->e->u.raw.file[0].name, errno, NULL); } + memcpy(Qe.u.raw.file, E->e->u.raw.file, sizeof(struct _gd_raw_file)); break; case GD_LINCOM_ENTRY: @@ -721,10 +723,9 @@ if (Q.EN(scalar,const_type) != E->EN(scalar,const_type)) modified = 1; - if (type == _GD_ConstType(D, E->EN(scalar,const_type))) { + if (type == _GD_ConstType(D, E->EN(scalar,const_type))) Qe.u.scalar.d = E->e->u.scalar.d; - E->e->u.scalar.d = NULL; - } else { + else { /* type convert */ Qe.u.scalar.d = malloc(GD_SIZE(type)); if (Qe.u.scalar.d == NULL) { @@ -751,6 +752,7 @@ *(uint64_t*)Qe.u.scalar.d = (E->EN(scalar,const_type) & (GD_COMPLEX | GD_IEEE754)) ? (uint64_t)*(double*)E->e->u.scalar.d : (uint64_t)*(int64_t*)E->e->u.scalar.d; + free(E->e->u.scalar.d); } break; @@ -844,10 +846,11 @@ int gd_alter_entry(DIRFILE* D, const char* field_code, const gd_entry_t *entry, int move) { - dtrace("%p, \"%s\", %p, %i", D, field_code, entry, move); - + int ret; gd_entry_t N; + dtrace("%p, \"%s\", %p, %i", D, field_code, entry, move); + if (D->flags & GD_INVALID) {/* don't crash */ _GD_SetError(D, GD_E_BAD_DIRFILE, 0, NULL, 0, NULL); dreturn("%i", -1); @@ -862,7 +865,7 @@ if (N.field_type == GD_LINCOM_ENTRY || N.field_type == GD_POLYNOM_ENTRY) move = 7; - int ret = _GD_Change(D, field_code, &N, move); + ret = _GD_Change(D, field_code, &N, move); dreturn("%i", ret); return ret; @@ -871,6 +874,7 @@ int gd_alter_raw(DIRFILE *D, const char *field_code, gd_type_t data_type, gd_spf_t spf, int move) { + int ret; gd_entry_t N; dtrace("%p, \"%s\", %u, %x, %i", D, field_code, spf, data_type, move); @@ -889,7 +893,7 @@ N.e = NULL; N.scalar[0] = (spf == 0) ? (char *)"" : NULL; - int ret = _GD_Change(D, field_code, &N, move); + ret = _GD_Change(D, field_code, &N, move); dreturn("%i", ret); return ret; @@ -899,7 +903,7 @@ const char** in_fields, const double* m, const double* b) gd_nothrow { gd_entry_t N; - int i; + int i, ret; int flags = 0; dtrace("%p, \"%s\", %i, %p, %p, %p", D, field_code, n_fields, in_fields, m, @@ -956,7 +960,7 @@ N.scalar[i + GD_MAX_LINCOM] = ""; } - int ret = _GD_Change(D, field_code, &N, flags); + ret = _GD_Change(D, field_code, &N, flags); dreturn("%i", ret); return ret; @@ -967,7 +971,7 @@ gd_nothrow { gd_entry_t N; - int i; + int i, ret; int flags = 0; dtrace("%p, \"%s\", %i, %p, %p, %p", D, field_code, n_fields, in_fields, cm, @@ -1024,7 +1028,7 @@ N.scalar[i + GD_MAX_LINCOM] = ""; } - int ret = _GD_Change(D, field_code, &N, flags); + ret = _GD_Change(D, field_code, &N, flags); dreturn("%i", ret); return ret; @@ -1033,6 +1037,7 @@ int gd_alter_linterp(DIRFILE* D, const char* field_code, const char* in_field, const char* table, int move) { + int ret; gd_entry_t N; dtrace("%p, \"%s\", \"%s\", \"%s\", %i", D, field_code, in_field, table, @@ -1049,7 +1054,7 @@ N.EN(linterp,table) = (char *)table; N.e = NULL; - int ret = _GD_Change(D, field_code, &N, move); + ret = _GD_Change(D, field_code, &N, move); dreturn("%i", ret); return ret; @@ -1058,6 +1063,7 @@ int gd_alter_bit(DIRFILE* D, const char* field_code, const char* in_field, gd_bit_t bitnum, gd_bit_t numbits) gd_nothrow { + int ret; gd_entry_t N; dtrace("%p, \"%s\", \"%s\", %i, %i", D, field_code, in_field, bitnum, @@ -1077,7 +1083,7 @@ N.scalar[0] = (bitnum == -1) ? (char *)"" : NULL; N.scalar[1] = (numbits == 0) ? (char *)"" : NULL; - int ret = _GD_Change(D, field_code, &N, 0); + ret = _GD_Change(D, field_code, &N, 0); dreturn("%i", ret); return ret; @@ -1086,6 +1092,7 @@ int gd_alter_sbit(DIRFILE* D, const char* field_code, const char* in_field, gd_bit_t bitnum, gd_bit_t numbits) gd_nothrow { + int ret; gd_entry_t N; dtrace("%p, \"%s\", \"%s\", %i, %i", D, field_code, in_field, bitnum, @@ -1105,7 +1112,7 @@ N.scalar[0] = (bitnum == -1) ? (char *)"" : NULL; N.scalar[1] = (numbits == 0) ? (char *)"" : NULL; - int ret = _GD_Change(D, field_code, &N, 0); + ret = _GD_Change(D, field_code, &N, 0); dreturn("%i", ret); return ret; @@ -1114,6 +1121,7 @@ int gd_alter_recip(DIRFILE* D, const char* field_code, const char* in_field, double dividend) gd_nothrow { + int ret; gd_entry_t N; dtrace("%p, \"%s\", \"%s\", %g", D, field_code, in_field, dividend); @@ -1131,7 +1139,7 @@ N.comp_scal = 0; N.e = NULL; - int ret = _GD_Change(D, field_code, &N, 0); + ret = _GD_Change(D, field_code, &N, 0); dreturn("%i", ret); return ret; @@ -1141,6 +1149,7 @@ int gd_alter_crecip(DIRFILE* D, const char* field_code, const char* in_field, double complex cdividend) { + int ret; gd_entry_t N; dtrace("%p, \"%s\", \"%s\", %g;%g", D, field_code, in_field, creal(cdividend), @@ -1159,7 +1168,7 @@ N.comp_scal = 1; N.e = NULL; - int ret = _GD_Change(D, field_code, &N, 0); + ret = _GD_Change(D, field_code, &N, 0); dreturn("%i", ret); return ret; @@ -1169,6 +1178,7 @@ int gd_alter_crecip89(DIRFILE* D, const char* field_code, const char* in_field, const double cdividend[2]) gd_nothrow { + int ret; gd_entry_t N; dtrace("%p, \"%s\", \"%s\", [%g, %g]", D, field_code, in_field, cdividend[0], @@ -1184,10 +1194,11 @@ N.in_fields[0] = (char *)in_field; N.scalar[0] = (cdividend[0] == 0 && cdividend[1] == 0) ? (char *)"" : NULL; _gd_a2c(N.EN(recip,cdividend), cdividend); + N.scalar_ind[0] = 0; N.comp_scal = 1; N.e = NULL; - int ret = _GD_Change(D, field_code, &N, 0); + ret = _GD_Change(D, field_code, &N, 0); dreturn("%i", ret); return ret; @@ -1196,6 +1207,7 @@ int gd_alter_divide(DIRFILE* D, const char* field_code, const char* in_field1, const char* in_field2) gd_nothrow { + int ret; gd_entry_t N; dtrace("%p, \"%s\", \"%s\", \"%s\"", D, field_code, in_field1, in_field2); @@ -1211,7 +1223,7 @@ N.in_fields[1] = (char *)in_field2; N.e = NULL; - int ret = _GD_Change(D, field_code, &N, 0); + ret = _GD_Change(D, field_code, &N, 0); dreturn("%i", ret); return ret; @@ -1220,6 +1232,7 @@ int gd_alter_multiply(DIRFILE* D, const char* field_code, const char* in_field1, const char* in_field2) gd_nothrow { + int ret; gd_entry_t N; dtrace("%p, \"%s\", \"%s\", \"%s\"", D, field_code, in_field1, in_field2); @@ -1235,7 +1248,7 @@ N.in_fields[1] = (char *)in_field2; N.e = NULL; - int ret = _GD_Change(D, field_code, &N, 0); + ret = _GD_Change(D, field_code, &N, 0); dreturn("%i", ret); return ret; @@ -1244,6 +1257,7 @@ int gd_alter_phase(DIRFILE* D, const char* field_code, const char* in_field, gd_shift_t shift) gd_nothrow { + int ret; gd_entry_t N; dtrace("%p, \"%s\", \"%s\", %lli", D, field_code, in_field, (long long)shift); @@ -1260,7 +1274,7 @@ N.e = NULL; N.scalar[0] = NULL; - int ret = _GD_Change(D, field_code, &N, 0); + ret = _GD_Change(D, field_code, &N, 0); dreturn("%i", ret); return ret; @@ -1269,6 +1283,7 @@ int gd_alter_const(DIRFILE* D, const char* field_code, gd_type_t const_type) gd_nothrow { + int ret; gd_entry_t N; dtrace("%p, \"%s\", 0x%x", D, field_code, const_type); @@ -1283,7 +1298,7 @@ N.EN(scalar,const_type) = const_type; N.e = NULL; - int ret = _GD_Change(D, field_code, &N, 0); + ret = _GD_Change(D, field_code, &N, 0); dreturn("%i", ret); return ret; @@ -1292,6 +1307,7 @@ int gd_alter_carray(DIRFILE* D, const char* field_code, gd_type_t const_type, size_t array_len) gd_nothrow { + int ret; gd_entry_t N; dtrace("%p, \"%s\", 0x%x, %zu", D, field_code, const_type, array_len); @@ -1307,7 +1323,7 @@ N.EN(scalar,array_len) = array_len; N.e = NULL; - int ret = _GD_Change(D, field_code, &N, 0); + ret = _GD_Change(D, field_code, &N, 0); dreturn("%i", ret); return ret; @@ -1317,7 +1333,7 @@ const char* in_field, const double* a) gd_nothrow { gd_entry_t N; - int i; + int i, ret; int flags = 0; dtrace("%p, \"%s\", %i, \"%s\", %p", D, field_code, poly_ord, in_field, a); @@ -1363,7 +1379,7 @@ for (i = 0; i <= N.EN(polynom,poly_ord); ++i) N.scalar[i] = ""; - int ret = _GD_Change(D, field_code, &N, flags); + ret = _GD_Change(D, field_code, &N, flags); dreturn("%i", ret); return ret; @@ -1373,7 +1389,7 @@ const char* in_field, const GD_DCOMPLEXP(ca)) gd_nothrow { gd_entry_t N; - int i; + int i, ret; int flags = 0; dtrace("%p, \"%s\", %i, \"%s\", %p", D, field_code, poly_ord, in_field, ca); @@ -1419,7 +1435,7 @@ for (i = 0; i <= N.EN(polynom,poly_ord); ++i) N.scalar[i] = ""; - int ret = _GD_Change(D, field_code, &N, flags); + ret = _GD_Change(D, field_code, &N, flags); dreturn("%i", ret); return ret; @@ -1430,7 +1446,7 @@ const char *tok_pos = NULL; char *outstring = NULL; char *in_cols[MAX_IN_COLS]; - int n_cols; + int n_cols, ret; int standards = GD_DIRFILE_STANDARDS_VERSION; gd_entry_t *N = NULL; @@ -1487,7 +1503,7 @@ /* Let the parser compose the entry */ N = _GD_ParseFieldSpec(D, n_cols, in_cols, NULL, "dirfile_alter_spec()", 0, - N->fragment_index, standards, 0, 1, 0, &outstring, tok_pos); + N->fragment_index, standards, 0, GD_PEDANTIC, 0, &outstring, tok_pos); free(outstring); @@ -1500,7 +1516,7 @@ move = 7; /* Change the entry */ - int ret = _GD_Change(D, N->field, N, move); + ret = _GD_Change(D, N->field, N, move); _GD_FreeE(N, 1); @@ -1513,7 +1529,7 @@ char *outstring = NULL; const char *tok_pos; char *in_cols[MAX_IN_COLS]; - int n_cols; + int n_cols, ret; int standards = GD_DIRFILE_STANDARDS_VERSION; gd_entry_t *N = NULL; @@ -1554,7 +1570,7 @@ if (!D->error) /* Let the parser compose the entry */ N = _GD_ParseFieldSpec(D, n_cols, in_cols, N, "dirfile_malter_spec()", 0, - N->fragment_index, standards, 0, 1, 0, &outstring, tok_pos); + N->fragment_index, standards, 0, GD_PEDANTIC, 0, &outstring, tok_pos); free(outstring); @@ -1567,7 +1583,7 @@ move = 7; /* Change the entry */ - int ret = _GD_Change(D, N->field, N, move); + ret = _GD_Change(D, N->field, N, move); _GD_FreeE(N, 1); diff -Nru libgetdata-0.7.0/src/move.c libgetdata-0.7.1/src/move.c --- libgetdata-0.7.0/src/move.c 2010-11-06 00:17:24.000000000 +0000 +++ libgetdata-0.7.1/src/move.c 2010-12-01 00:59:34.000000000 +0000 @@ -281,10 +281,10 @@ E->e->u.raw.filebase = new_filebase; } } - } + } else + free(new_filebase); if (D->error) { - free(new_filebase); dreturn("%i", -1); return -1; } diff -Nru libgetdata-0.7.0/src/nan.h libgetdata-0.7.1/src/nan.h --- libgetdata-0.7.0/src/nan.h 1970-01-01 00:00:00.000000000 +0000 +++ libgetdata-0.7.1/src/nan.h 2010-12-01 18:28:26.000000000 +0000 @@ -0,0 +1,34 @@ +/* Copyright (C) 2010 D. V. Wiebe + * + *************************************************************************** + * + * This file is part of the GetData project. + * + * GetData is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the + * Free Software Foundation; either version 2.1 of the License, or (at your + * option) any later version. + * + * GetData is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + * License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with GetData; if not, write to the Free Software Foundation, Inc., + * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ +#ifndef GETDATA_NAN_H +#define GETDATA_NAN_H + +#include + +#ifndef NAN +# if HAVE_NAN +# define NAN nan("") +# else +# define NAN strtod("NAN", NULL) +# endif +#endif + +#endif diff -Nru libgetdata-0.7.0/src/nmeta.c libgetdata-0.7.1/src/nmeta.c --- libgetdata-0.7.0/src/nmeta.c 2010-11-01 11:47:45.000000000 +0000 +++ libgetdata-0.7.1/src/nmeta.c 2010-12-01 00:59:34.000000000 +0000 @@ -22,6 +22,8 @@ unsigned int gd_nmfields(DIRFILE* D, const char* parent) gd_nothrow { + gd_entry_t *P; + dtrace("%p", D); if (D->flags & GD_INVALID) { @@ -32,7 +34,7 @@ _GD_ClearError(D); - const gd_entry_t* P = _GD_FindField(D, parent, D->entry, D->n_entries, NULL); + P = _GD_FindField(D, parent, D->entry, D->n_entries, NULL); if (P == NULL || P->e->n_meta == -1) { _GD_SetError(D, GD_E_BAD_CODE, 0, NULL, 0, parent); @@ -48,6 +50,8 @@ unsigned int gd_nmvectors(DIRFILE* D, const char* parent) gd_nothrow { + gd_entry_t *P; + dtrace("%p", D); if (D->flags & GD_INVALID) { @@ -58,7 +62,7 @@ _GD_ClearError(D); - const gd_entry_t* P = _GD_FindField(D, parent, D->entry, D->n_entries, NULL); + P = _GD_FindField(D, parent, D->entry, D->n_entries, NULL); if (P == NULL || P->e->n_meta == -1) { _GD_SetError(D, GD_E_BAD_CODE, 0, NULL, 0, parent); @@ -79,6 +83,7 @@ { unsigned int r = 0; int i; + gd_entry_t *P; dtrace("%p, %i", D, type); @@ -90,7 +95,7 @@ _GD_ClearError(D); - const gd_entry_t* P = _GD_FindField(D, parent, D->entry, D->n_entries, NULL); + P = _GD_FindField(D, parent, D->entry, D->n_entries, NULL); if (P == NULL || P->e->n_meta == -1) { _GD_SetError(D, GD_E_BAD_CODE, 0, NULL, 0, parent); diff -Nru libgetdata-0.7.0/src/open.c libgetdata-0.7.1/src/open.c --- libgetdata-0.7.0/src/open.c 2010-10-21 02:38:33.000000000 +0000 +++ libgetdata-0.7.1/src/open.c 2010-12-01 00:59:34.000000000 +0000 @@ -138,6 +138,7 @@ if (stat(fullname, &statbuf)) { _GD_SetError(D, GD_E_TRUNC, GD_E_TRUNC_STAT, fullname, errno, NULL); + closedir(dir); dreturn("%p", NULL); return NULL; } @@ -146,11 +147,14 @@ if (S_ISREG(statbuf.st_mode)) { if (unlink(fullname)) { _GD_SetError(D, GD_E_TRUNC, GD_E_TRUNC_UNLINK, fullname, errno, NULL); + closedir(dir); dreturn("%p", NULL); return NULL; } } } + + closedir(dir); } /* Create, if needed */ @@ -236,15 +240,15 @@ if (flags & GD_PERMISSIVE && flags & GD_PEDANTIC) flags &= ~GD_PERMISSIVE; - D->error_string = (char *)malloc(FILENAME_MAX); - D->error_file = (char *)malloc(FILENAME_MAX); + D->error_string = NULL; + D->error_file = NULL; D->name = strdup(filedir); D->flags = (flags | GD_INVALID) & ~GD_IGNORE_REFS; D->sehandler = sehandler; D->sehandler_extra = extra; D->standards = GD_DIRFILE_STANDARDS_VERSION; - if (D->error_string == NULL || D->error_file == NULL || D->name == NULL) { + if (D->name == NULL) { _GD_SetError(D, GD_E_ALLOC, 0, NULL, 0, NULL); dreturn("%p", D); return D; @@ -363,9 +367,11 @@ DIRFILE* gd_open(const char* filedir, unsigned long flags) { + DIRFILE *D; + dtrace("\"%s\", 0x%lx", filedir, (unsigned long)flags); - DIRFILE* D = gd_cbopen(filedir, flags, NULL, NULL); + D = gd_cbopen(filedir, flags, NULL, NULL); dreturn("%p", D); return D; diff -Nru libgetdata-0.7.0/src/parse.c libgetdata-0.7.1/src/parse.c --- libgetdata-0.7.0/src/parse.c 2010-11-06 00:25:27.000000000 +0000 +++ libgetdata-0.7.1/src/parse.c 2010-12-01 00:59:34.000000000 +0000 @@ -94,6 +94,7 @@ const char* format_file, int line, int *index, int *comp_scal) { char *ptr = NULL; + char *lt; dtrace("%p, \"%s\", %p, %i, \"%s\", %i, %p, %p", D, token, data, type, format_file, line, index, comp_scal); @@ -199,7 +200,6 @@ carray_check: /* look for a < delimeter */ *index = -1; - char *lt; for (lt = ptr; *lt; ++lt) if (*lt == '<') { *lt = '\0'; @@ -217,6 +217,8 @@ int n_cols, const gd_entry_t* parent, int me, const char* format_file, int line, int standards, int pedantic, int *is_dot) { + gd_entry_t *E; + dtrace("%p, %p, %i, %p, %i, \"%s\", %i, %i, %i, %p", D, in_cols, n_cols, parent, me, format_file, line, standards, pedantic, is_dot); @@ -233,7 +235,7 @@ return NULL; } - gd_entry_t* E = (gd_entry_t *)malloc(sizeof(gd_entry_t)); + E = (gd_entry_t *)malloc(sizeof(gd_entry_t)); if (E == NULL) { _GD_SetError(D, GD_E_ALLOC, 0, NULL, 0, NULL); dreturn("%p", NULL); @@ -311,6 +313,7 @@ { int i; char* ptr = NULL; + gd_entry_t *E; dtrace("%p, %p, %i, %p, \"%s\", %i, %i, %i, %p", D, in_cols, n_cols, parent, format_file, line, standards, pedantic, is_dot); @@ -321,7 +324,7 @@ return NULL; } - gd_entry_t* E = (gd_entry_t *)malloc(sizeof(gd_entry_t)); + E = (gd_entry_t *)malloc(sizeof(gd_entry_t)); if (E == NULL) { _GD_SetError(D, GD_E_ALLOC, 0, NULL, 0, NULL); dreturn("%p", NULL); @@ -413,6 +416,8 @@ char* in_cols[MAX_IN_COLS], int n_cols, const gd_entry_t* parent, const char* format_file, int line, int standards, int pedantic, int* is_dot) { + gd_entry_t *E; + dtrace("%p, %p, %i, %p, \"%s\", %i, %i, %i, %p", D, in_cols, n_cols, parent, format_file, line, standards, pedantic, is_dot); @@ -422,7 +427,7 @@ return NULL; } - gd_entry_t* E = (gd_entry_t *)malloc(sizeof(gd_entry_t)); + E = (gd_entry_t *)malloc(sizeof(gd_entry_t)); if (E == NULL) { _GD_SetError(D, GD_E_ALLOC, 0, NULL, 0, NULL); dreturn("%p", NULL); @@ -479,6 +484,8 @@ char* in_cols[MAX_IN_COLS], int n_cols, const gd_entry_t* parent, const char* format_file, int line, int standards, int pedantic, int* is_dot) { + gd_entry_t *E; + dtrace("%p, %p, %i, %p, \"%s\", %i, %i, %i, %p", D, in_cols, n_cols, parent, format_file, line, standards, pedantic, is_dot); @@ -488,7 +495,7 @@ return NULL; } - gd_entry_t* E = (gd_entry_t *)malloc(sizeof(gd_entry_t)); + E = (gd_entry_t *)malloc(sizeof(gd_entry_t)); if (E == NULL) { _GD_SetError(D, GD_E_ALLOC, 0, NULL, 0, NULL); dreturn("%p", NULL); @@ -539,6 +546,8 @@ char* in_cols[MAX_IN_COLS], int n_cols, const gd_entry_t* parent, const char* format_file, int line, int standards, int pedantic, int* is_dot) { + gd_entry_t *E; + dtrace("%p, %p, %i, %p, \"%s\", %i, %i, %i, %p", D, in_cols, n_cols, parent, format_file, line, standards, pedantic, is_dot); @@ -548,7 +557,7 @@ return NULL; } - gd_entry_t* E = (gd_entry_t *)malloc(sizeof(gd_entry_t)); + E = (gd_entry_t *)malloc(sizeof(gd_entry_t)); if (E == NULL) { _GD_SetError(D, GD_E_ALLOC, 0, NULL, 0, NULL); dreturn("%p", NULL); @@ -604,6 +613,8 @@ char* in_cols[MAX_IN_COLS], int n_cols, const gd_entry_t* parent, const char* format_file, int line, int standards, int pedantic, int* is_dot) { + gd_entry_t *E; + dtrace("%p, %p, %i, %p, \"%s\", %i, %i, %i, %p", D, in_cols, n_cols, parent, format_file, line, standards, pedantic, is_dot); @@ -613,7 +624,7 @@ return NULL; } - gd_entry_t* E = (gd_entry_t *)malloc(sizeof(gd_entry_t)); + E = (gd_entry_t *)malloc(sizeof(gd_entry_t)); if (E == NULL) { _GD_SetError(D, GD_E_ALLOC, 0, NULL, 0, NULL); dreturn("%p", NULL); @@ -665,6 +676,8 @@ char* in_cols[MAX_IN_COLS], int n_cols, const gd_entry_t* parent, const char* format_file, int line, int standards, int pedantic, int* is_dot) { + gd_entry_t *E; + dtrace("%p, %i, %p, %i, %p, \"%s\", %i, %i, %i, %p", D, is_signed, in_cols, n_cols, parent, format_file, line, standards, pedantic, is_dot); @@ -674,7 +687,7 @@ return NULL; } - gd_entry_t* E = (gd_entry_t *)malloc(sizeof(gd_entry_t)); + E = (gd_entry_t *)malloc(sizeof(gd_entry_t)); if (E == NULL) { _GD_SetError(D, GD_E_ALLOC, 0, NULL, 0, NULL); dreturn("%p", NULL); @@ -746,6 +759,8 @@ int n_cols, const gd_entry_t* parent, const char* format_file, int line, int standards, int pedantic, int* is_dot) { + gd_entry_t *E; + dtrace("%p, %p, %i, %p, \"%s\", %i, %i, %i, %p", D, in_cols, n_cols, parent, format_file, line, standards, pedantic, is_dot); @@ -755,7 +770,7 @@ return NULL; } - gd_entry_t* E = (gd_entry_t *)malloc(sizeof(gd_entry_t)); + E = (gd_entry_t *)malloc(sizeof(gd_entry_t)); if (E == NULL) { _GD_SetError(D, GD_E_ALLOC, 0, NULL, 0, NULL); dreturn("%p", NULL); @@ -811,6 +826,7 @@ const char* format_file, int line, int standards, int pedantic, int* is_dot) { int i; + gd_entry_t *E; dtrace("%p, %p, %i, %p, \"%s\", %i, %i, %i, %p", D, in_cols, n_cols, parent, format_file, line, standards, pedantic, is_dot); @@ -821,7 +837,7 @@ return NULL; } - gd_entry_t* E = (gd_entry_t *)malloc(sizeof(gd_entry_t)); + E = (gd_entry_t *)malloc(sizeof(gd_entry_t)); if (E == NULL) { _GD_SetError(D, GD_E_ALLOC, 0, NULL, 0, NULL); dreturn("%p", NULL); @@ -925,6 +941,8 @@ { int dummy; char* ptr; + gd_type_t type; + gd_entry_t *E; dtrace("%p, %p, %i, %p, \"%s\", %i, %i, %i, %p", D, in_cols, n_cols, parent, format_file, line, standards, pedantic, is_dot); @@ -935,7 +953,7 @@ return NULL; } - gd_entry_t* E = (gd_entry_t *)malloc(sizeof(gd_entry_t)); + E = (gd_entry_t *)malloc(sizeof(gd_entry_t)); if (E == NULL) { _GD_SetError(D, GD_E_ALLOC, 0, NULL, 0, NULL); dreturn("%p", NULL); @@ -984,7 +1002,7 @@ return NULL; } - gd_type_t type = _GD_ConstType(D, E->EN(scalar,const_type)); + type = _GD_ConstType(D, E->EN(scalar,const_type)); E->e->u.scalar.d = malloc(GD_SIZE(type)); if (!D->error && E->e->u.scalar.d == NULL) _GD_SetError(D, GD_E_ALLOC, 0, NULL, 0, NULL); @@ -1024,6 +1042,7 @@ gd_type_t t; char* ptr; void *data; + gd_entry_t *E; dtrace("%p, %p, %i, %p, \"%s\", %i, %i, %i, %p, %p, %p", D, in_cols, n_cols, parent, format_file, line, standards, pedantic, is_dot, outstring, @@ -1035,7 +1054,7 @@ return NULL; } - gd_entry_t* E = (gd_entry_t *)malloc(sizeof(gd_entry_t)); + E = (gd_entry_t *)malloc(sizeof(gd_entry_t)); if (E == NULL) { _GD_SetError(D, GD_E_ALLOC, 0, NULL, 0, NULL); dreturn("%p", NULL); @@ -1152,6 +1171,8 @@ int n_cols, const gd_entry_t* parent, const char* format_file, int line, int standards, int pedantic, int* is_dot) { + gd_entry_t *E; + dtrace("%p, %p, %i, %p, \"%s\", %i, %i, %i, %p", D, in_cols, n_cols, parent, format_file, line, standards, pedantic, is_dot); @@ -1161,7 +1182,7 @@ return NULL; } - gd_entry_t* E = (gd_entry_t *)malloc(sizeof(gd_entry_t)); + E = (gd_entry_t *)malloc(sizeof(gd_entry_t)); if (E == NULL) { _GD_SetError(D, GD_E_ALLOC, 0, NULL, 0, NULL); dreturn("%p", NULL); @@ -1239,16 +1260,17 @@ * specification */ gd_entry_t* _GD_ParseFieldSpec(DIRFILE* D, int n_cols, char** in_cols, const gd_entry_t* P, const char* format_file, int linenum, int me, - int standards, int creat, int pedantic, int insert, char **outstring, + int standards, int creat, unsigned long flags, int insert, char **outstring, const char *tok_pos) { gd_entry_t* E = NULL; void *ptr; char *cptr; int is_dot = 0; + const int pedantic = flags & GD_PEDANTIC; - dtrace("%p, %i, %p, %p, \"%s\", %i, %u, %i, %i, %i, %i, %p, %p", D, n_cols, - in_cols, P, format_file, linenum, me, standards, creat, pedantic, insert, + dtrace("%p, %i, %p, %p, \"%s\", %i, %i, %i, %i, %lx, %i, %p, %p", D, n_cols, + in_cols, P, format_file, linenum, me, standards, creat, flags, insert, outstring, tok_pos); /* Check for barth-style metafield definition */ @@ -1270,8 +1292,7 @@ /* point in_cols[0] to the metafield name */ in_cols[0] = cptr + 1; E = _GD_ParseFieldSpec(D, n_cols, in_cols, P, D->fragment[me].cname, - linenum, me, standards, creat, pedantic, insert, outstring, - tok_pos); + linenum, me, standards, creat, flags, insert, outstring, tok_pos); } dreturn("%p", (!insert) ? E : NULL); return (!insert) ? E : NULL; @@ -1381,16 +1402,19 @@ if (insert && D->error == GD_E_OK && E != NULL) { /* the Format file fragment index */ + unsigned int u; + gd_entry_t *Q; + E->fragment_index = me; /* Check for duplicate */ - unsigned int u; - const gd_entry_t* Q = _GD_FindField(D, E->field, D->entry, D->n_entries, - &u); + Q = _GD_FindField(D, E->field, D->entry, D->n_entries, &u); if (Q) { - _GD_SetError(D, GD_E_FORMAT, GD_E_FORMAT_DUPLICATE, format_file, linenum, - D->fragment[Q->fragment_index].cname); + if (~flags & GD_IGNORE_DUPS) + _GD_SetError(D, GD_E_FORMAT, GD_E_FORMAT_DUPLICATE, format_file, + linenum, D->fragment[Q->fragment_index].cname); + _GD_FreeE(E, 1); dreturn("%p", NULL); return NULL; } @@ -1726,7 +1750,8 @@ ref_name, me, standards, &subflags); if ((pedantic = subflags & GD_PEDANTIC)) *flags |= GD_PEDANTIC; - D->fragment[me].vers |= D->fragment[frag].vers; + if (frag != -1) + D->fragment[me].vers |= D->fragment[frag].vers; } else if (strcmp(ptr, "META") == 0 && (!pedantic || *standards >= 6)) { const gd_entry_t* P = _GD_FindField(D, in_cols[1], D->entry, D->n_entries, NULL); @@ -1741,7 +1766,7 @@ linenum, NULL); else _GD_ParseFieldSpec(D, n_cols - 2, in_cols + 2, P, D->fragment[me].cname, - linenum, me, *standards, 0, pedantic, 1, outstring, tok_pos); + linenum, me, *standards, 0, *flags, 1, outstring, tok_pos); } else if (strcmp(ptr, "PROTECT") == 0 && (!pedantic || *standards >= 6)) { if (strcmp(in_cols[1], "none") == 0) D->fragment[me].protection = GD_PROTECT_NONE; @@ -1820,13 +1845,10 @@ if (D->error == GD_E_OK && !match) first_raw = _GD_ParseFieldSpec(D, n_cols, in_cols, NULL, - D->fragment[me].cname, linenum, me, *standards, 0, - *flags & GD_PEDANTIC, 1, &outstring, tok_pos); + D->fragment[me].cname, linenum, me, *standards, 0, *flags, 1, + &outstring, tok_pos); - if (*flags & GD_IGNORE_DUPS && D->error == GD_E_FORMAT && - D->suberror == GD_E_FORMAT_DUPLICATE) - _GD_ClearError(D); /* ignore this line, continue parsing */ - else if (D->error == GD_E_FORMAT) { + if (D->error == GD_E_FORMAT) { /* we guarantee a buffer size of at least GD_MAX_LINE_LENGTH */ if (n < GD_MAX_LINE_LENGTH) { char *ptr = (char *)realloc(instring, GD_MAX_LINE_LENGTH); diff -Nru libgetdata-0.7.0/src/putdata.c libgetdata-0.7.1/src/putdata.c --- libgetdata-0.7.0/src/putdata.c 2010-11-06 00:16:12.000000000 +0000 +++ libgetdata-0.7.1/src/putdata.c 2010-12-01 00:59:34.000000000 +0000 @@ -54,6 +54,11 @@ s0 -= D->fragment[E->fragment_index].frame_offset * E->EN(raw,spf); + if (!_GD_Supports(D, E, GD_EF_OPEN | GD_EF_SEEK | GD_EF_WRITE)) { + dreturn("%i", 0); + return 0; + } + databuffer = _GD_Alloc(D, E->EN(raw,data_type), ns); if (databuffer == NULL) { @@ -69,11 +74,6 @@ return 0; } - if (!_GD_Supports(D, E, GD_EF_OPEN | GD_EF_SEEK | GD_EF_WRITE)) { - dreturn("%i", 0); - return 0; - } - if (_gd_ef[E->e->u.raw.file[0].encoding].ecor) { /* convert to/from middle-ended doubles */ if ((E->EN(raw,data_type) == GD_FLOAT64 || E->EN(raw,data_type) == @@ -104,12 +104,14 @@ /* open file for reading / writing if not already opened */ if (_GD_SetEncodedName(D, E->e->u.raw.file, E->e->u.raw.filebase, 0)) { + free(databuffer); dreturn("%i", 0); return 0; } else if ((*_gd_ef[E->e->u.raw.file[0].encoding].open)(E->e->u.raw.file, D->flags & GD_ACCMODE, 1)) { _GD_SetError(D, GD_E_RAW_IO, 0, E->e->u.raw.file[0].name, errno, NULL); + free(databuffer); dreturn("%i", 0); return 0; } @@ -119,6 +121,7 @@ E->EN(raw,data_type), 1) == -1) { _GD_SetError(D, GD_E_RAW_IO, 0, E->e->u.raw.file[0].name, errno, NULL); + free(databuffer); dreturn("%i", 0); return 0; } @@ -137,6 +140,8 @@ { size_t n_wrote; int dir = -1, i; + double *tmpbuf; + struct _gd_lut *tmp_lut; dtrace("%p, %p, %lli, %zu, 0x%x, %p", D, E, first_samp, num_samp, data_type, data_in); @@ -184,7 +189,7 @@ return 0; } - double *tmpbuf = (double *)_GD_Alloc(D, GD_FLOAT64, num_samp); + tmpbuf = (double *)_GD_Alloc(D, GD_FLOAT64, num_samp); if (tmpbuf == NULL) { free(tmpbuf); dreturn("%i", 0); @@ -200,8 +205,8 @@ } /* Make the reverse lut */ - struct _gd_lut *tmp_lut = (struct _gd_lut *)malloc(E->e->u.linterp.table_len - * sizeof(struct _gd_lut)); + tmp_lut = (struct _gd_lut *)malloc(E->e->u.linterp.table_len * + sizeof(struct _gd_lut)); if (tmp_lut == NULL) { free(tmpbuf); _GD_SetError(D, GD_E_ALLOC, 0, NULL, 0, NULL); @@ -314,13 +319,12 @@ uint64_t *tmpbuf; uint64_t *readbuf; size_t i, n_wrote; + const uint64_t mask = (E->EN(bit,numbits) == 64) ? 0xffffffffffffffffULL : + ((uint64_t)1 << E->EN(bit,numbits)) - 1; dtrace("%p, %p, %lli, %zu, 0x%x, %p", D, E, first_samp, num_samp, data_type, data_in); - const uint64_t mask = (E->EN(bit,numbits) == 64) ? 0xffffffffffffffffULL : - ((uint64_t)1 << E->EN(bit,numbits)) - 1; - if (_GD_BadInput(D, E, 0)) { dreturn("%i", 0); return 0; @@ -541,9 +545,10 @@ static size_t _GD_DoStringOut(DIRFILE* D, gd_entry_t *E, const char *data_in) { - dtrace("%p, %p, %p", D, E, data_in); char* ptr = E->e->u.string; + dtrace("%p, %p, %p", D, E, data_in); + /* check protection */ if (D->fragment[E->fragment_index].protection & GD_PROTECT_FORMAT) { _GD_SetError(D, GD_E_PROTECTED, GD_E_PROTECTED_FORMAT, NULL, 0, @@ -653,6 +658,7 @@ gd_entry_t *entry; char* field_code; int repr; + gd_spf_t spf; dtrace("%p, \"%s\", %lli, %lli, %zu, %zu, 0x%x, %p", D, field_code_in, first_frame, first_samp, num_frames, num_samp, data_type, data_in); @@ -690,7 +696,7 @@ } /* get the samples per frame */ - gd_spf_t spf = _GD_GetSPF(D, entry); + spf = _GD_GetSPF(D, entry); if (D->error) { dreturn("%i", 0); diff -Nru libgetdata-0.7.0/src/raw.c libgetdata-0.7.1/src/raw.c --- libgetdata-0.7.0/src/raw.c 2010-06-30 02:58:58.000000000 +0000 +++ libgetdata-0.7.1/src/raw.c 2010-12-01 18:28:26.000000000 +0000 @@ -43,9 +43,11 @@ off64_t _GD_RawSeek(struct _gd_raw_file* file, off64_t count, gd_type_t data_type, int pad __gd_unused) { + off64_t pos; + dtrace("%p, %lli, %x, ", file, (long long)count, data_type); - off64_t pos = lseek64(file->fp, count * GD_SIZE(data_type), SEEK_SET); + pos = lseek64(file->fp, count * GD_SIZE(data_type), SEEK_SET); if (pos == -1) { dreturn("%i", -1); @@ -59,9 +61,11 @@ ssize_t _GD_RawRead(struct _gd_raw_file *file, void *ptr, gd_type_t data_type, size_t nmemb) { + size_t nread; + dtrace("%p, %p, %x, %zu", file, ptr, data_type, nmemb); - int nread = read(file->fp, ptr, nmemb * GD_SIZE(data_type)); + nread = read(file->fp, ptr, nmemb * GD_SIZE(data_type)); if (nread >= 0) nread /= GD_SIZE(data_type); @@ -73,9 +77,11 @@ ssize_t _GD_RawWrite(struct _gd_raw_file *file, const void *ptr, gd_type_t data_type, size_t nmemb) { + ssize_t nwrote; + dtrace("%p, %p, %x, %zu", file, ptr, data_type, nmemb); - ssize_t nwrote = write(file->fp, ptr, nmemb * GD_SIZE(data_type)); + nwrote = write(file->fp, ptr, nmemb * GD_SIZE(data_type)); if (nwrote >= 0) nwrote /= GD_SIZE(data_type); @@ -91,9 +97,11 @@ int _GD_RawClose(struct _gd_raw_file *file) { + int ret; + dtrace("%p", file); - int ret = close(file->fp); + ret = close(file->fp); if (!ret) file->fp = -1; @@ -153,7 +161,7 @@ case GD_TEMP_DESTROY: if (file[1].name != NULL) { if (file[1].fp >= 0) - if (_GD_AsciiClose(file + 1)) { + if (_GD_RawClose(file + 1)) { dreturn("%i", -1); return -1; } diff -Nru libgetdata-0.7.0/src/slim.c libgetdata-0.7.1/src/slim.c --- libgetdata-0.7.0/src/slim.c 2010-09-11 00:43:55.000000000 +0000 +++ libgetdata-0.7.1/src/slim.c 2010-12-01 00:59:34.000000000 +0000 @@ -61,10 +61,12 @@ off64_t _GD_SlimSeek(struct _gd_raw_file* file, off64_t count, gd_type_t data_type, int pad __gd_unused) { + off64_t n; + dtrace("%p, %lli, %x, ", file, (long long)count, data_type); - off64_t n = (off64_t)slimseek((SLIMFILE *)file->edata, - (off_t)count * GD_SIZE(data_type), SEEK_SET); + n = (off64_t)slimseek((SLIMFILE *)file->edata, (off_t)count * + GD_SIZE(data_type), SEEK_SET); if (n == -1) { dreturn("%i", -1); @@ -78,9 +80,11 @@ ssize_t _GD_SlimRead(struct _gd_raw_file *file, void *ptr, gd_type_t data_type, size_t nmemb) { + ssize_t n; + dtrace("%p, %p, %x, %zu", file, ptr, data_type, nmemb); - ssize_t n = slimread(ptr, GD_SIZE(data_type), nmemb, (SLIMFILE *)file->edata); + n = slimread(ptr, GD_SIZE(data_type), nmemb, (SLIMFILE *)file->edata); dreturn("%zu", n); return n; @@ -88,9 +92,11 @@ int _GD_SlimClose(struct _gd_raw_file *file) { + int ret; + dtrace("%p", file); - int ret = slimclose((SLIMFILE *)file->edata); + ret = slimclose((SLIMFILE *)file->edata); if (!ret) { file->fp = -1; file->edata = NULL; diff -Nru libgetdata-0.7.0/test/add_bit_bitnum.c libgetdata-0.7.1/test/add_bit_bitnum.c --- libgetdata-0.7.0/test/add_bit_bitnum.c 2010-10-16 03:17:14.000000000 +0000 +++ libgetdata-0.7.1/test/add_bit_bitnum.c 2010-11-27 22:07:20.000000000 +0000 @@ -13,14 +13,14 @@ { const char* filedir = __TEST__ "dirfile"; const char* format = __TEST__ "dirfile/format"; - int r = 0; - + int error, n, r = 0; DIRFILE* D = gd_open(filedir, GD_RDWR | GD_CREAT); + gd_add_bit(D, "new", "input", -1, 1, 0); - int error = gd_error(D); + error = gd_error(D); /* check */ - int n = gd_nfields(D); + n = gd_nfields(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/add_bit_bitsize.c libgetdata-0.7.1/test/add_bit_bitsize.c --- libgetdata-0.7.0/test/add_bit_bitsize.c 2010-10-16 03:17:14.000000000 +0000 +++ libgetdata-0.7.1/test/add_bit_bitsize.c 2010-11-27 22:07:34.000000000 +0000 @@ -13,14 +13,14 @@ { const char* filedir = __TEST__ "dirfile"; const char* format = __TEST__ "dirfile/format"; - int r = 0; - + int error, n, r = 0; DIRFILE* D = gd_open(filedir, GD_RDWR | GD_CREAT); + gd_add_bit(D, "new", "input", 1, 99, 0); - int error = gd_error(D); + error = gd_error(D); /* check */ - int n = gd_nfields(D); + n = gd_nfields(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/add_bit.c libgetdata-0.7.1/test/add_bit.c --- libgetdata-0.7.0/test/add_bit.c 2010-10-16 03:17:14.000000000 +0000 +++ libgetdata-0.7.1/test/add_bit.c 2010-11-27 22:07:03.000000000 +0000 @@ -14,12 +14,12 @@ { const char* filedir = __TEST__ "dirfile"; const char* format = __TEST__ "dirfile/format"; - int r = 0; + int error, r = 0; gd_entry_t e; - DIRFILE* D = gd_open(filedir, GD_RDWR | GD_CREAT | GD_VERBOSE); + gd_add_bit(D, "new", "input", 1, 1, 0); - int error = gd_error(D); + error = gd_error(D); /* check */ gd_entry(D, "new", &e); diff -Nru libgetdata-0.7.0/test/add_bit_invalid.c libgetdata-0.7.1/test/add_bit_invalid.c --- libgetdata-0.7.0/test/add_bit_invalid.c 2010-10-16 03:17:14.000000000 +0000 +++ libgetdata-0.7.1/test/add_bit_invalid.c 2010-11-27 22:07:53.000000000 +0000 @@ -11,11 +11,11 @@ int main(void) { const char* filedir = __TEST__ "dirfile"; - DIRFILE* D = gd_open(filedir, GD_RDONLY); + int error, r = 0; + gd_add_bit(D, "new", "input", 1, 1, 0); - int error = gd_error(D); - int r = 0; + error = gd_error(D); gd_close(D); CHECKI(error,GD_E_BAD_DIRFILE); diff -Nru libgetdata-0.7.0/test/add_bit_numbits.c libgetdata-0.7.1/test/add_bit_numbits.c --- libgetdata-0.7.0/test/add_bit_numbits.c 2010-10-16 03:17:14.000000000 +0000 +++ libgetdata-0.7.1/test/add_bit_numbits.c 2010-11-27 22:08:15.000000000 +0000 @@ -13,14 +13,14 @@ { const char* filedir = __TEST__ "dirfile"; const char* format = __TEST__ "dirfile/format"; - int r = 0; - + int error, n, r = 0; DIRFILE* D = gd_open(filedir, GD_RDWR | GD_CREAT); + gd_add_bit(D, "new", "input", 1, 0, 0); - int error = gd_error(D); + error = gd_error(D); /* check */ - int n = gd_nfields(D); + n = gd_nfields(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/add.c libgetdata-0.7.1/test/add.c --- libgetdata-0.7.0/test/add.c 2010-10-16 03:17:14.000000000 +0000 +++ libgetdata-0.7.1/test/add.c 2010-11-27 22:06:30.000000000 +0000 @@ -15,9 +15,10 @@ const char* filedir = __TEST__ "dirfile"; const char* format = __TEST__ "dirfile/format"; const char* data = __TEST__ "dirfile/data"; - int r = 0; - + int error, r = 0; + DIRFILE *D; gd_entry_t E, e; + E.field = "data"; E.field_type = GD_RAW_ENTRY; E.fragment_index = 0; @@ -25,9 +26,9 @@ E.EN(raw,data_type) = GD_UINT8; E.scalar[0] = NULL; - DIRFILE* D = gd_open(filedir, GD_RDWR | GD_CREAT | GD_VERBOSE); + D = gd_open(filedir, GD_RDWR | GD_CREAT | GD_VERBOSE); gd_add(D, &E); - int error = gd_error(D); + error = gd_error(D); /* check */ gd_entry(D, "data", &e); diff -Nru libgetdata-0.7.0/test/add_carray.c libgetdata-0.7.1/test/add_carray.c --- libgetdata-0.7.0/test/add_carray.c 2010-11-07 00:25:21.000000000 +0000 +++ libgetdata-0.7.1/test/add_carray.c 2010-11-27 22:08:30.000000000 +0000 @@ -16,13 +16,13 @@ const char* format = __TEST__ "dirfile/format"; uint8_t val[] = {3, 4, 5, 6, 7}; uint8_t data[5]; - int n; + int n, error; int r = 0; gd_entry_t e; - DIRFILE* D = gd_open(filedir, GD_RDWR | GD_CREAT | GD_VERBOSE); + gd_add_carray(D, "data", GD_UINT8, 5, GD_UINT8, &val, 0); - int error = gd_error(D); + error = gd_error(D); /* check */ gd_entry(D, "data", &e); diff -Nru libgetdata-0.7.0/test/add_clincom.c libgetdata-0.7.1/test/add_clincom.c --- libgetdata-0.7.0/test/add_clincom.c 2010-10-16 03:17:14.000000000 +0000 +++ libgetdata-0.7.1/test/add_clincom.c 2010-11-27 22:09:10.000000000 +0000 @@ -25,11 +25,11 @@ const double complex m[2] = {1 + _Complex_I * 3.3, 0.3 + _Complex_I * 18.3}; const double complex b[2] = {2 + _Complex_I * 3.8, 2.1 + _Complex_I * 9.8}; #endif - int r = 0; + int error, r = 0; gd_entry_t e; gd_add_clincom(D, "new", 2, in_fields, m, b, 0); - int error = gd_error(D); + error = gd_error(D); /* check */ gd_entry(D, "new", &e); diff -Nru libgetdata-0.7.0/test/add_code.c libgetdata-0.7.1/test/add_code.c --- libgetdata-0.7.0/test/add_code.c 2010-10-16 03:17:14.000000000 +0000 +++ libgetdata-0.7.1/test/add_code.c 2010-11-27 22:09:24.000000000 +0000 @@ -13,21 +13,22 @@ { const char* filedir = __TEST__ "dirfile"; const char* format = __TEST__ "dirfile/format"; - int r = 0; - + int error, n, r = 0; gd_entry_t E; + DIRFILE *D; + E.field = "ne/w"; E.field_type = GD_RAW_ENTRY; E.fragment_index = 0; E.EN(raw,spf) = 2; E.EN(raw,data_type) = GD_UINT8; - DIRFILE* D = gd_open(filedir, GD_RDWR | GD_CREAT); + D = gd_open(filedir, GD_RDWR | GD_CREAT); gd_add(D, &E); - int error = gd_error(D); + error = gd_error(D); /* check */ - int n = gd_nfields(D); + n = gd_nfields(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/add_const.c libgetdata-0.7.1/test/add_const.c --- libgetdata-0.7.0/test/add_const.c 2010-11-07 00:25:23.000000000 +0000 +++ libgetdata-0.7.1/test/add_const.c 2010-11-27 22:09:43.000000000 +0000 @@ -16,12 +16,12 @@ const char* filedir = __TEST__ "dirfile"; const char* format = __TEST__ "dirfile/format"; uint8_t val = 3; - int r = 0; + int error, r = 0; gd_entry_t e; DIRFILE* D = gd_open(filedir, GD_RDWR | GD_CREAT | GD_VERBOSE); gd_add_const(D, "data", GD_UINT8, GD_UINT8, &val, 0); - int error = gd_error(D); + error = gd_error(D); /* check */ gd_entry(D, "data", &e); diff -Nru libgetdata-0.7.0/test/add_cpolynom.c libgetdata-0.7.1/test/add_cpolynom.c --- libgetdata-0.7.0/test/add_cpolynom.c 2010-10-16 03:17:14.000000000 +0000 +++ libgetdata-0.7.1/test/add_cpolynom.c 2010-11-27 22:10:11.000000000 +0000 @@ -16,7 +16,7 @@ const char* filedir = __TEST__ "dirfile"; const char* format = __TEST__ "dirfile/format"; int r = 0; - int j; + int error, j; gd_entry_t e; DIRFILE* D = gd_open(filedir, GD_RDWR | GD_CREAT | GD_VERBOSE); @@ -27,7 +27,7 @@ 0.5 + _Complex_I * 99.55, 1.8 + _Complex_I * 45.32}; #endif gd_add_cpolynom(D, "new", 3, "in", a, 0); - int error = gd_error(D); + error = gd_error(D); /* check */ gd_entry(D, "new", &e); diff -Nru libgetdata-0.7.0/test/add_crecip89.c libgetdata-0.7.1/test/add_crecip89.c --- libgetdata-0.7.0/test/add_crecip89.c 2010-10-16 03:17:14.000000000 +0000 +++ libgetdata-0.7.1/test/add_crecip89.c 2010-11-27 22:10:45.000000000 +0000 @@ -14,13 +14,13 @@ { const char* filedir = __TEST__ "dirfile"; const char* format = __TEST__ "dirfile/format"; - int r = 0; + int error, r = 0; gd_entry_t e; double dividend[2] = {33.3, 44.4}; DIRFILE* D = gd_open(filedir, GD_RDWR | GD_CREAT | GD_VERBOSE); gd_add_crecip(D, "new", "in", dividend, 0); - int error = gd_error(D); + error = gd_error(D); /* check */ gd_entry(D, "new", &e); diff -Nru libgetdata-0.7.0/test/add_crecip.c libgetdata-0.7.1/test/add_crecip.c --- libgetdata-0.7.0/test/add_crecip.c 2010-10-16 03:17:14.000000000 +0000 +++ libgetdata-0.7.1/test/add_crecip.c 2010-11-27 22:10:30.000000000 +0000 @@ -13,17 +13,17 @@ { const char* filedir = __TEST__ "dirfile"; const char* format = __TEST__ "dirfile/format"; - int r = 0; + int error, r = 0; #ifdef GD_NO_C99_API const double cdividend[2] = {33.3, 44.4}; #else const double complex cdividend = 33.3 + _Complex_I * 44.4; #endif gd_entry_t e; - DIRFILE* D = gd_open(filedir, GD_RDWR | GD_CREAT | GD_VERBOSE); + gd_add_crecip(D, "new", "in", cdividend, 0); - int error = gd_error(D); + error = gd_error(D); /* check */ gd_entry(D, "new", &e); diff -Nru libgetdata-0.7.0/test/add_divide.c libgetdata-0.7.1/test/add_divide.c --- libgetdata-0.7.0/test/add_divide.c 2010-10-16 03:17:14.000000000 +0000 +++ libgetdata-0.7.1/test/add_divide.c 2010-11-27 22:10:58.000000000 +0000 @@ -13,12 +13,12 @@ { const char* filedir = __TEST__ "dirfile"; const char* format = __TEST__ "dirfile/format"; - int r = 0; + int error, r = 0; gd_entry_t e; - DIRFILE* D = gd_open(filedir, GD_RDWR | GD_CREAT | GD_VERBOSE); + gd_add_divide(D, "new", "in1", "in2", 0); - int error = gd_error(D); + error = gd_error(D); /* check */ gd_entry(D, "new", &e); diff -Nru libgetdata-0.7.0/test/add_divide_invalid.c libgetdata-0.7.1/test/add_divide_invalid.c --- libgetdata-0.7.0/test/add_divide_invalid.c 2010-10-16 03:17:14.000000000 +0000 +++ libgetdata-0.7.1/test/add_divide_invalid.c 2010-11-27 22:11:08.000000000 +0000 @@ -11,11 +11,11 @@ int main(void) { const char* filedir = __TEST__ "dirfile"; - int r = 0; + int error, r = 0; DIRFILE* D = gd_open(filedir, GD_RDONLY); gd_add_multiply(D, "new", "in1", "in2", 0); - int error = gd_error(D); + error = gd_error(D); gd_close(D); CHECKI(error, GD_E_BAD_DIRFILE); diff -Nru libgetdata-0.7.0/test/add_duplicate.c libgetdata-0.7.1/test/add_duplicate.c --- libgetdata-0.7.0/test/add_duplicate.c 2010-10-16 03:17:14.000000000 +0000 +++ libgetdata-0.7.1/test/add_duplicate.c 2010-11-27 22:12:11.000000000 +0000 @@ -15,9 +15,10 @@ const char* format = __TEST__ "dirfile/format"; const char* format_data = "data RAW UINT8 8\n"; int r = 0; - int fd; - + int fd, error, n; gd_entry_t E; + DIRFILE *D; + E.field = "data"; E.field_type = GD_RAW_ENTRY; E.fragment_index = 0; @@ -30,12 +31,12 @@ write(fd, format_data, strlen(format_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDWR); + D = gd_open(filedir, GD_RDWR); gd_add(D, &E); - int error = gd_error(D); + error = gd_error(D); /* check */ - int n = gd_nfields(D); + n = gd_nfields(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/add_format.c libgetdata-0.7.1/test/add_format.c --- libgetdata-0.7.0/test/add_format.c 2010-10-16 03:17:14.000000000 +0000 +++ libgetdata-0.7.1/test/add_format.c 2010-11-27 22:11:54.000000000 +0000 @@ -13,21 +13,22 @@ { const char* filedir = __TEST__ "dirfile"; const char* format = __TEST__ "dirfile/format"; - int r = 0; - + int error, n, r = 0; + DIRFILE *D; gd_entry_t E; + E.field = "new"; E.field_type = GD_RAW_ENTRY; E.fragment_index = 21; E.EN(raw,spf) = 2; E.EN(raw,data_type) = GD_UINT8; - DIRFILE* D = gd_open(filedir, GD_RDWR | GD_CREAT); + D = gd_open(filedir, GD_RDWR | GD_CREAT); gd_add(D, &E); - int error = gd_error(D); + error = gd_error(D); /* check */ - int n = gd_nfields(D); + n = gd_nfields(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/add_invalid.c libgetdata-0.7.1/test/add_invalid.c --- libgetdata-0.7.0/test/add_invalid.c 2010-10-16 03:17:14.000000000 +0000 +++ libgetdata-0.7.1/test/add_invalid.c 2010-11-27 22:12:23.000000000 +0000 @@ -11,7 +11,8 @@ int main(void) { const char* filedir = __TEST__ "dirfile"; - int r = 0; + int error, r = 0; + DIRFILE *D; gd_entry_t E; E.field = "data"; @@ -20,9 +21,9 @@ E.EN(raw,spf) = 2; E.EN(raw,data_type) = GD_UINT8; - DIRFILE* D = gd_open(filedir, GD_RDONLY); + D = gd_open(filedir, GD_RDONLY); gd_add(D, &E); - int error = gd_error(D); + error = gd_error(D); gd_close(D); CHECKI(error, GD_E_BAD_DIRFILE); diff -Nru libgetdata-0.7.0/test/add_lincom.c libgetdata-0.7.1/test/add_lincom.c --- libgetdata-0.7.0/test/add_lincom.c 2010-10-16 03:17:14.000000000 +0000 +++ libgetdata-0.7.1/test/add_lincom.c 2010-11-27 22:12:38.000000000 +0000 @@ -15,7 +15,7 @@ { const char* filedir = __TEST__ "dirfile"; const char* format = __TEST__ "dirfile/format"; - int r = 0; + int error, r = 0; DIRFILE* D = gd_open(filedir, GD_RDWR | GD_CREAT | GD_VERBOSE); const char* in_fields[2] = {"in1", "in2"}; @@ -24,7 +24,7 @@ gd_entry_t e; gd_add_lincom(D, "new", 2, in_fields, m, b, 0); - int error = gd_error(D); + error = gd_error(D); /* check */ gd_entry(D, "new", &e); diff -Nru libgetdata-0.7.0/test/add_lincom_invalid.c libgetdata-0.7.1/test/add_lincom_invalid.c --- libgetdata-0.7.0/test/add_lincom_invalid.c 2010-10-16 03:17:14.000000000 +0000 +++ libgetdata-0.7.1/test/add_lincom_invalid.c 2010-11-27 22:12:56.000000000 +0000 @@ -11,14 +11,14 @@ int main(void) { const char* filedir = __TEST__ "dirfile"; - int r = 0; + int error, r = 0; DIRFILE* D = gd_open(filedir, GD_RDONLY); const char* in_fields[2] = {"in1", "in2"}; const double m[2] = {1, 0.3}; const double b[2] = {0, 0.9}; gd_add_lincom(D, "new", 2, in_fields, m, b, 0); - int error = gd_error(D); + error = gd_error(D); gd_close(D); CHECKI(error, GD_E_BAD_DIRFILE); diff -Nru libgetdata-0.7.0/test/add_lincom_nfields.c libgetdata-0.7.1/test/add_lincom_nfields.c --- libgetdata-0.7.0/test/add_lincom_nfields.c 2010-10-16 03:17:14.000000000 +0000 +++ libgetdata-0.7.1/test/add_lincom_nfields.c 2010-11-27 22:13:14.000000000 +0000 @@ -13,17 +13,17 @@ { const char* filedir = __TEST__ "dirfile"; const char* format = __TEST__ "dirfile/format"; - int r = 0; + int error, n, r = 0; DIRFILE* D = gd_open(filedir, GD_RDWR | GD_CREAT); const char* in_fields[2] = {"in1", "in2"}; const double m[2] = {1, 0.3}; const double b[2] = {0, 0.9}; gd_add_lincom(D, "new", 0, in_fields, m, b, 0); - int error = gd_error(D); + error = gd_error(D); /* check */ - int n = gd_nfields(D); + n = gd_nfields(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/add_linterp.c libgetdata-0.7.1/test/add_linterp.c --- libgetdata-0.7.0/test/add_linterp.c 2010-10-16 03:17:14.000000000 +0000 +++ libgetdata-0.7.1/test/add_linterp.c 2010-11-27 22:13:25.000000000 +0000 @@ -14,12 +14,12 @@ { const char* filedir = __TEST__ "dirfile"; const char* format = __TEST__ "dirfile/format"; - int r = 0; + int error, r = 0; gd_entry_t e; DIRFILE* D = gd_open(filedir, GD_RDWR | GD_CREAT | GD_VERBOSE); gd_add_linterp(D, "new", "in", "table", 0); - int error = gd_error(D); + error = gd_error(D); /* check */ gd_entry(D, "new", &e); diff -Nru libgetdata-0.7.0/test/add_linterp_invalid.c libgetdata-0.7.1/test/add_linterp_invalid.c --- libgetdata-0.7.0/test/add_linterp_invalid.c 2010-10-16 03:17:14.000000000 +0000 +++ libgetdata-0.7.1/test/add_linterp_invalid.c 2010-11-27 22:34:37.000000000 +0000 @@ -11,11 +11,11 @@ int main(void) { const char* filedir = __TEST__ "dirfile"; - int r = 0; + int error, r = 0; DIRFILE* D = gd_open(filedir, GD_RDONLY); gd_add_linterp(D, "new", "in", "table", 0); - int error = gd_error(D); + error = gd_error(D); gd_close(D); CHECKI(error, GD_E_BAD_DIRFILE); diff -Nru libgetdata-0.7.0/test/add_multiply.c libgetdata-0.7.1/test/add_multiply.c --- libgetdata-0.7.0/test/add_multiply.c 2010-10-16 03:17:14.000000000 +0000 +++ libgetdata-0.7.1/test/add_multiply.c 2010-11-27 22:14:44.000000000 +0000 @@ -14,12 +14,12 @@ { const char* filedir = __TEST__ "dirfile"; const char* format = __TEST__ "dirfile/format"; - int r = 0; + int error, r = 0; gd_entry_t e; DIRFILE* D = gd_open(filedir, GD_RDWR | GD_CREAT | GD_VERBOSE); gd_add_multiply(D, "new", "in1", "in2", 0); - int error = gd_error(D); + error = gd_error(D); /* check */ gd_entry(D, "new", &e); diff -Nru libgetdata-0.7.0/test/add_multiply_invalid.c libgetdata-0.7.1/test/add_multiply_invalid.c --- libgetdata-0.7.0/test/add_multiply_invalid.c 2010-10-16 03:17:14.000000000 +0000 +++ libgetdata-0.7.1/test/add_multiply_invalid.c 2010-11-27 22:14:53.000000000 +0000 @@ -11,11 +11,11 @@ int main(void) { const char* filedir = __TEST__ "dirfile"; - int r = 0; + int error, r = 0; DIRFILE* D = gd_open(filedir, GD_RDONLY); gd_add_multiply(D, "new", "in1", "in2", 0); - int error = gd_error(D); + error = gd_error(D); gd_close(D); CHECKI(error, GD_E_BAD_DIRFILE); diff -Nru libgetdata-0.7.0/test/add_phase.c libgetdata-0.7.1/test/add_phase.c --- libgetdata-0.7.0/test/add_phase.c 2010-10-16 03:17:14.000000000 +0000 +++ libgetdata-0.7.1/test/add_phase.c 2010-11-27 22:15:01.000000000 +0000 @@ -14,12 +14,12 @@ { const char* filedir = __TEST__ "dirfile"; const char* format = __TEST__ "dirfile/format"; - int r = 0; + int error, r = 0; gd_entry_t e; DIRFILE* D = gd_open(filedir, GD_RDWR | GD_CREAT | GD_VERBOSE); gd_add_phase(D, "new", "in", 3, 0); - int error = gd_error(D); + error = gd_error(D); /* check */ gd_entry(D, "new", &e); diff -Nru libgetdata-0.7.0/test/add_phase_invalid.c libgetdata-0.7.1/test/add_phase_invalid.c --- libgetdata-0.7.0/test/add_phase_invalid.c 2010-10-16 03:17:14.000000000 +0000 +++ libgetdata-0.7.1/test/add_phase_invalid.c 2010-11-27 22:34:45.000000000 +0000 @@ -11,11 +11,11 @@ int main(void) { const char* filedir = __TEST__ "dirfile"; - int r = 0; + int error, r = 0; DIRFILE* D = gd_open(filedir, GD_RDONLY); gd_add_phase(D, "new", "in", 3, 0); - int error = gd_error(D); + error = gd_error(D); gd_close(D); CHECKI(error, GD_E_BAD_DIRFILE); diff -Nru libgetdata-0.7.0/test/add_polynom.c libgetdata-0.7.1/test/add_polynom.c --- libgetdata-0.7.0/test/add_polynom.c 2010-10-16 03:17:14.000000000 +0000 +++ libgetdata-0.7.1/test/add_polynom.c 2010-11-27 22:15:13.000000000 +0000 @@ -16,13 +16,13 @@ const char* filedir = __TEST__ "dirfile"; const char* format = __TEST__ "dirfile/format"; int r = 0; - int j; + int j, error; gd_entry_t e; DIRFILE* D = gd_open(filedir, GD_RDWR | GD_CREAT | GD_VERBOSE); const double a[4] = {1, 0.3, 0.5, 1.8}; gd_add_polynom(D, "new", 3, "in", a, 0); - int error = gd_error(D); + error = gd_error(D); /* check */ gd_entry(D, "new", &e); diff -Nru libgetdata-0.7.0/test/add_protect.c libgetdata-0.7.1/test/add_protect.c --- libgetdata-0.7.0/test/add_protect.c 2010-10-16 03:17:14.000000000 +0000 +++ libgetdata-0.7.1/test/add_protect.c 2010-11-27 22:15:35.000000000 +0000 @@ -14,9 +14,10 @@ const char* filedir = __TEST__ "dirfile"; const char* format = __TEST__ "dirfile/format"; const char* format_data = "data RAW UINT8 8\nPROTECT all\n"; - int fd, r = 0; - + int fd, error, n, r = 0; + DIRFILE *D; gd_entry_t E; + E.field = "data2"; E.field_type = GD_RAW_ENTRY; E.fragment_index = 0; @@ -29,12 +30,12 @@ write(fd, format_data, strlen(format_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDWR); + D = gd_open(filedir, GD_RDWR); gd_add(D, &E); - int error = gd_error(D); + error = gd_error(D); /* check */ - int n = gd_nfields(D); + n = gd_nfields(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/add_raw.c libgetdata-0.7.1/test/add_raw.c --- libgetdata-0.7.0/test/add_raw.c 2010-10-16 03:17:14.000000000 +0000 +++ libgetdata-0.7.1/test/add_raw.c 2010-11-27 22:15:57.000000000 +0000 @@ -16,11 +16,11 @@ const char* format = __TEST__ "dirfile/format"; const char* data = __TEST__ "dirfile/data"; gd_entry_t e; - int r = 0; + int error, r = 0; DIRFILE* D = gd_open(filedir, GD_RDWR | GD_CREAT | GD_VERBOSE); gd_add_raw(D, "data", GD_UINT8, 2, 0); - int error = gd_error(D); + error = gd_error(D); /* check */ gd_entry(D, "data", &e); diff -Nru libgetdata-0.7.0/test/add_raw_invalid.c libgetdata-0.7.1/test/add_raw_invalid.c --- libgetdata-0.7.0/test/add_raw_invalid.c 2010-10-16 03:17:14.000000000 +0000 +++ libgetdata-0.7.1/test/add_raw_invalid.c 2010-11-27 22:16:17.000000000 +0000 @@ -11,11 +11,11 @@ int main(void) { const char* filedir = __TEST__ "dirfile"; - int r = 0; + int error, r = 0; DIRFILE* D = gd_open(filedir, GD_RDONLY); gd_add_raw(D, "data", GD_UINT8, 2, 0); - int error = gd_error(D); + error = gd_error(D); gd_close(D); CHECKI(error, GD_E_BAD_DIRFILE); diff -Nru libgetdata-0.7.0/test/add_raw_spf.c libgetdata-0.7.1/test/add_raw_spf.c --- libgetdata-0.7.0/test/add_raw_spf.c 2010-10-16 03:17:14.000000000 +0000 +++ libgetdata-0.7.1/test/add_raw_spf.c 2010-11-27 22:16:24.000000000 +0000 @@ -13,14 +13,14 @@ { const char* filedir = __TEST__ "dirfile"; const char* format = __TEST__ "dirfile/format"; - int r = 0; + int error, n, r = 0; DIRFILE* D = gd_open(filedir, GD_RDWR | GD_CREAT); gd_add_raw(D, "new", GD_UINT8, 0, 0); - int error = gd_error(D); + error = gd_error(D); /* check */ - int n = gd_nfields(D); + n = gd_nfields(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/add_raw_type.c libgetdata-0.7.1/test/add_raw_type.c --- libgetdata-0.7.0/test/add_raw_type.c 2010-10-16 03:17:14.000000000 +0000 +++ libgetdata-0.7.1/test/add_raw_type.c 2010-11-27 22:16:31.000000000 +0000 @@ -13,14 +13,14 @@ { const char* filedir = __TEST__ "dirfile"; const char* format = __TEST__ "dirfile/format"; - int r = 0; + int error, n, r = 0; DIRFILE* D = gd_open(filedir, GD_RDWR | GD_CREAT); gd_add_raw(D, "new", (gd_type_t)'c', 2, 0); - int error = gd_error(D); + error = gd_error(D); /* check */ - int n = gd_nfields(D); + n = gd_nfields(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/add_rdonly.c libgetdata-0.7.1/test/add_rdonly.c --- libgetdata-0.7.0/test/add_rdonly.c 2010-10-16 03:17:14.000000000 +0000 +++ libgetdata-0.7.1/test/add_rdonly.c 2010-11-27 22:16:50.000000000 +0000 @@ -14,7 +14,8 @@ const char* filedir = __TEST__ "dirfile"; const char* format = __TEST__ "dirfile/format"; const char* format_data = "data RAW UINT8 8\n"; - int fd, r = 0; + int fd, error, n, r = 0; + DIRFILE *D; gd_entry_t E; E.field = "new"; @@ -29,12 +30,12 @@ write(fd, format_data, strlen(format_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY); + D = gd_open(filedir, GD_RDONLY); gd_add(D, &E); - int error = gd_error(D); + error = gd_error(D); /* check */ - int n = gd_nfields(D); + n = gd_nfields(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/add_recip.c libgetdata-0.7.1/test/add_recip.c --- libgetdata-0.7.0/test/add_recip.c 2010-10-16 03:17:14.000000000 +0000 +++ libgetdata-0.7.1/test/add_recip.c 2010-11-27 22:16:59.000000000 +0000 @@ -13,12 +13,12 @@ { const char* filedir = __TEST__ "dirfile"; const char* format = __TEST__ "dirfile/format"; - int r = 0; + int error, r = 0; gd_entry_t e; DIRFILE* D = gd_open(filedir, GD_RDWR | GD_CREAT | GD_VERBOSE); gd_add_recip(D, "new", "in", 33.3, 0); - int error = gd_error(D); + error = gd_error(D); /* check */ gd_entry(D, "new", &e); diff -Nru libgetdata-0.7.0/test/add_sbit.c libgetdata-0.7.1/test/add_sbit.c --- libgetdata-0.7.0/test/add_sbit.c 2010-10-16 03:17:14.000000000 +0000 +++ libgetdata-0.7.1/test/add_sbit.c 2010-11-27 22:17:06.000000000 +0000 @@ -14,12 +14,12 @@ { const char* filedir = __TEST__ "dirfile"; const char* format = __TEST__ "dirfile/format"; - int r = 0; + int error, r = 0; gd_entry_t e; DIRFILE* D = gd_open(filedir, GD_RDWR | GD_CREAT | GD_VERBOSE); gd_add_sbit(D, "new", "input", 1, 1, 0); - int error = gd_error(D); + error = gd_error(D); /* check */ gd_entry(D, "new", &e); diff -Nru libgetdata-0.7.0/test/add_scalar.c libgetdata-0.7.1/test/add_scalar.c --- libgetdata-0.7.0/test/add_scalar.c 2010-10-30 00:01:56.000000000 +0000 +++ libgetdata-0.7.1/test/add_scalar.c 2010-11-27 22:17:24.000000000 +0000 @@ -15,7 +15,8 @@ { const char* filedir = __TEST__ "dirfile"; const char* format = __TEST__ "dirfile/format"; - int r = 0; + int error, r = 0; + DIRFILE *D; gd_entry_t E, e; E.field = "data"; @@ -28,10 +29,10 @@ E.scalar[0] = NULL; E.scalar[0 + GD_MAX_LINCOM] = "c"; - DIRFILE* D = gd_open(filedir, GD_RDWR | GD_CREAT | GD_VERBOSE); + D = gd_open(filedir, GD_RDWR | GD_CREAT | GD_VERBOSE); gd_add_spec(D, "c CONST INT64 4", 0); gd_add(D, &E); - int error = gd_error(D); + error = gd_error(D); /* check */ gd_entry(D, "data", &e); diff -Nru libgetdata-0.7.0/test/add_spec.c libgetdata-0.7.1/test/add_spec.c --- libgetdata-0.7.0/test/add_spec.c 2010-10-16 03:17:14.000000000 +0000 +++ libgetdata-0.7.1/test/add_spec.c 2010-11-27 22:17:54.000000000 +0000 @@ -15,12 +15,12 @@ const char* filedir = __TEST__ "dirfile"; const char* format = __TEST__ "dirfile/format"; const char* data = __TEST__ "dirfile/data"; - int r = 0; + int error, r = 0; gd_entry_t e; DIRFILE* D = gd_open(filedir, GD_RDWR | GD_CREAT | GD_VERBOSE); gd_add_spec(D, "data RAW UINT8 2", 0); - int error = gd_error(D); + error = gd_error(D); /* check */ gd_entry(D, "data", &e); diff -Nru libgetdata-0.7.0/test/add_spec_directive.c libgetdata-0.7.1/test/add_spec_directive.c --- libgetdata-0.7.0/test/add_spec_directive.c 2010-10-16 03:17:14.000000000 +0000 +++ libgetdata-0.7.1/test/add_spec_directive.c 2010-11-27 22:18:05.000000000 +0000 @@ -14,15 +14,15 @@ const char* filedir = __TEST__ "dirfile"; const char* format = __TEST__ "dirfile/format"; const char* data = __TEST__ "dirfile/INCLUDE"; - int r = 0; + int error, n, r = 0; DIRFILE* D = gd_open(filedir, GD_RDWR | GD_CREAT); gd_dirfile_standards(D, 7); gd_add_spec(D, "INCLUDE RAW UINT8 2", 0); - int error = gd_error(D); + error = gd_error(D); /* check */ - int n = gd_nfields(D); + n = gd_nfields(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/add_spec_invalid.c libgetdata-0.7.1/test/add_spec_invalid.c --- libgetdata-0.7.0/test/add_spec_invalid.c 2010-10-16 03:17:14.000000000 +0000 +++ libgetdata-0.7.1/test/add_spec_invalid.c 2010-11-27 22:18:14.000000000 +0000 @@ -11,11 +11,11 @@ int main(void) { const char* filedir = __TEST__ "dirfile"; - int r = 0; + int error, r = 0; DIRFILE* D = gd_open(filedir, GD_RDONLY); gd_add_spec(D, "data RAW UINT8 2", 0); - int error = gd_error(D); + error = gd_error(D); gd_close(D); CHECKI(error, GD_E_BAD_DIRFILE); diff -Nru libgetdata-0.7.0/test/add_spec_meta.c libgetdata-0.7.1/test/add_spec_meta.c --- libgetdata-0.7.0/test/add_spec_meta.c 2010-11-07 00:25:26.000000000 +0000 +++ libgetdata-0.7.1/test/add_spec_meta.c 2010-11-27 22:18:26.000000000 +0000 @@ -14,16 +14,16 @@ { const char* filedir = __TEST__ "dirfile"; const char* format = __TEST__ "dirfile/format"; - int r = 0; + int error, n, r = 0; gd_entry_t e; + unsigned char val; DIRFILE* D = gd_open(filedir, GD_RDWR | GD_CREAT | GD_VERBOSE); gd_add_spec(D, "INDEX/meta CONST UINT8 2", 0); - int error = gd_error(D); - unsigned char val; + error = gd_error(D); /* check */ - int n = gd_nfields(D); + n = gd_nfields(D); CHECKI(n, 1); diff -Nru libgetdata-0.7.0/test/add_string.c libgetdata-0.7.1/test/add_string.c --- libgetdata-0.7.0/test/add_string.c 2010-10-16 03:17:14.000000000 +0000 +++ libgetdata-0.7.1/test/add_string.c 2010-11-27 22:18:34.000000000 +0000 @@ -15,13 +15,13 @@ { const char* filedir = __TEST__ "dirfile"; const char* format = __TEST__ "dirfile/format"; - int r = 0; + int error, r = 0; gd_entry_t e; char val[1000]; DIRFILE* D = gd_open(filedir, GD_RDWR | GD_CREAT | GD_VERBOSE); gd_add_string(D, "data", "A string.", 0); - int error = gd_error(D); + error = gd_error(D); /* check */ gd_entry(D, "data", &e); diff -Nru libgetdata-0.7.0/test/add_type.c libgetdata-0.7.1/test/add_type.c --- libgetdata-0.7.0/test/add_type.c 2010-10-16 03:17:14.000000000 +0000 +++ libgetdata-0.7.1/test/add_type.c 2010-11-27 22:18:45.000000000 +0000 @@ -13,7 +13,8 @@ { const char* filedir = __TEST__ "dirfile"; const char* format = __TEST__ "dirfile/format"; - int r = 0; + int error, n, r = 0; + DIRFILE *D; gd_entry_t E; E.field = "new"; @@ -22,12 +23,12 @@ E.EN(raw,spf) = 2; E.EN(raw,data_type) = GD_UINT8; - DIRFILE* D = gd_open(filedir, GD_RDWR | GD_CREAT); + D = gd_open(filedir, GD_RDWR | GD_CREAT); gd_add(D, &E); - int error = gd_error(D); + error = gd_error(D); /* check */ - int n = gd_nfields(D); + n = gd_nfields(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/alter_bit_bitnum.c libgetdata-0.7.1/test/alter_bit_bitnum.c --- libgetdata-0.7.0/test/alter_bit_bitnum.c 2010-10-16 03:17:14.000000000 +0000 +++ libgetdata-0.7.1/test/alter_bit_bitnum.c 2010-11-27 22:19:14.000000000 +0000 @@ -19,7 +19,8 @@ const char* format_data = "data RAW UINT8 8\nbit BIT data 1 1\n"; unsigned char data_data[256]; unsigned char c[8]; - int fd, i, r = 0; + int fd, i, ret, error, n, r = 0; + DIRFILE *D; mkdir(filedir, 0777); @@ -34,10 +35,10 @@ write(fd, data_data, 256); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDWR | GD_VERBOSE); - int ret = gd_alter_bit(D, "bit", NULL, 2, 0); - int error = gd_error(D); - int n = gd_getdata(D, "bit", 5, 0, 1, 0, GD_UINT8, c); + D = gd_open(filedir, GD_RDWR | GD_VERBOSE); + ret = gd_alter_bit(D, "bit", NULL, 2, 0); + error = gd_error(D); + n = gd_getdata(D, "bit", 5, 0, 1, 0, GD_UINT8, c); gd_close(D); diff -Nru libgetdata-0.7.0/test/alter_bit_numbits.c libgetdata-0.7.1/test/alter_bit_numbits.c --- libgetdata-0.7.0/test/alter_bit_numbits.c 2010-10-16 03:17:14.000000000 +0000 +++ libgetdata-0.7.1/test/alter_bit_numbits.c 2010-11-27 22:19:28.000000000 +0000 @@ -19,7 +19,8 @@ const char* format_data = "data RAW UINT8 8\nbit BIT data 1 1\n"; unsigned char data_data[256]; unsigned char c[8]; - int fd, i, r = 0; + int fd, i, ret, error, n, r = 0; + DIRFILE *D; mkdir(filedir, 0777); @@ -34,10 +35,10 @@ write(fd, data_data, 256); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDWR | GD_VERBOSE); - int ret = gd_alter_bit(D, "bit", NULL, -1, 2); - int error = gd_error(D); - int n = gd_getdata(D, "bit", 5, 0, 1, 0, GD_UINT8, c); + D = gd_open(filedir, GD_RDWR | GD_VERBOSE); + ret = gd_alter_bit(D, "bit", NULL, -1, 2); + error = gd_error(D); + n = gd_getdata(D, "bit", 5, 0, 1, 0, GD_UINT8, c); gd_close(D); diff -Nru libgetdata-0.7.0/test/alter_carray_len.c libgetdata-0.7.1/test/alter_carray_len.c --- libgetdata-0.7.0/test/alter_carray_len.c 2010-10-31 16:22:57.000000000 +0000 +++ libgetdata-0.7.1/test/alter_carray_len.c 2010-11-27 22:19:49.000000000 +0000 @@ -16,7 +16,9 @@ const char* filedir = __TEST__ "dirfile"; const char* format = __TEST__ "dirfile/format"; const char* format_data = "carray CARRAY FLOAT32 8.3 7.2 6.1 5.0 3.9 2.8 1.7\n"; - int fd, i, r = 0; + int fd, i, ret, error, n, r = 0; + size_t z; + DIRFILE *D; double d[5]; mkdir(filedir, 0777); @@ -25,11 +27,11 @@ write(fd, format_data, strlen(format_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDWR | GD_VERBOSE); - int ret = gd_alter_carray(D, "carray", GD_NULL, 5); - int error = gd_error(D); - size_t z = gd_carray_len(D, "carray"); - int n = gd_get_carray(D, "carray", GD_FLOAT64, &d); + D = gd_open(filedir, GD_RDWR | GD_VERBOSE); + ret = gd_alter_carray(D, "carray", GD_NULL, 5); + error = gd_error(D); + z = gd_carray_len(D, "carray"); + n = gd_get_carray(D, "carray", GD_FLOAT64, &d); gd_close(D); diff -Nru libgetdata-0.7.0/test/alter_carray_type.c libgetdata-0.7.1/test/alter_carray_type.c --- libgetdata-0.7.0/test/alter_carray_type.c 2010-10-31 16:22:38.000000000 +0000 +++ libgetdata-0.7.1/test/alter_carray_type.c 2010-11-27 22:20:14.000000000 +0000 @@ -16,7 +16,9 @@ const char* filedir = __TEST__ "dirfile"; const char* format = __TEST__ "dirfile/format"; const char* format_data = "carray CARRAY FLOAT32 8.3 7.2 6.1 5.0 3.9 2.8 1.7\n"; - int fd, i, r = 0; + int fd, i, ret, error, n, r = 0; + size_t z; + DIRFILE *D; double d[7]; mkdir(filedir, 0777); @@ -25,11 +27,11 @@ write(fd, format_data, strlen(format_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDWR | GD_VERBOSE); - int ret = gd_alter_carray(D, "carray", GD_UINT8, 0); - int error = gd_error(D); - size_t z = gd_carray_len(D, "carray"); - int n = gd_get_carray(D, "carray", GD_FLOAT64, &d); + D = gd_open(filedir, GD_RDWR | GD_VERBOSE); + ret = gd_alter_carray(D, "carray", GD_UINT8, 0); + error = gd_error(D); + z = gd_carray_len(D, "carray"); + n = gd_get_carray(D, "carray", GD_FLOAT64, &d); gd_close(D); diff -Nru libgetdata-0.7.0/test/alter_const.c libgetdata-0.7.1/test/alter_const.c --- libgetdata-0.7.0/test/alter_const.c 2010-10-16 03:17:14.000000000 +0000 +++ libgetdata-0.7.1/test/alter_const.c 2010-11-27 22:20:27.000000000 +0000 @@ -16,7 +16,8 @@ const char* filedir = __TEST__ "dirfile"; const char* format = __TEST__ "dirfile/format"; const char* format_data = "const CONST FLOAT32 8.3\n"; - int fd, r = 0; + int fd, ret, error, n, r = 0; + DIRFILE *D; double d; mkdir(filedir, 0777); @@ -25,10 +26,10 @@ write(fd, format_data, strlen(format_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDWR | GD_VERBOSE); - int ret = gd_alter_const(D, "const", GD_UINT8); - int error = gd_error(D); - int n = gd_get_constant(D, "const", GD_FLOAT64, &d); + D = gd_open(filedir, GD_RDWR | GD_VERBOSE); + ret = gd_alter_const(D, "const", GD_UINT8); + error = gd_error(D); + n = gd_get_constant(D, "const", GD_FLOAT64, &d); gd_close(D); diff -Nru libgetdata-0.7.0/test/alter_cpolynom.c libgetdata-0.7.1/test/alter_cpolynom.c --- libgetdata-0.7.0/test/alter_cpolynom.c 2010-10-16 03:17:14.000000000 +0000 +++ libgetdata-0.7.1/test/alter_cpolynom.c 2010-11-27 22:21:04.000000000 +0000 @@ -27,7 +27,8 @@ const double complex a[] = {2 + _Complex_I * 1, 1 + _Complex_I * 2, 1 + _Complex_I * 3}; #endif - int fd, i, r = 0; + int fd, i, ret, error, n, r = 0; + DIRFILE *D; mkdir(filedir, 0777); @@ -42,20 +43,20 @@ write(fd, data_data, 256 * sizeof(int32_t)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDWR | GD_VERBOSE); - int ret = gd_alter_cpolynom(D, "polynom", 0, NULL, a); - int error = gd_error(D); - int n = gd_getdata(D, "polynom", 5, 0, 1, 0, GD_COMPLEX128, c); + D = gd_open(filedir, GD_RDWR | GD_VERBOSE); + ret = gd_alter_cpolynom(D, "polynom", 0, NULL, a); + error = gd_error(D); + n = gd_getdata(D, "polynom", 5, 0, 1, 0, GD_COMPLEX128, c); gd_close(D); for (i = 0; i < 8; ++i) { int x = i + 40; #ifdef GD_NO_C99_API - double v[2] = {2 + x + x * x, 1 + 2 * x + 3 * x * x}; + const double v[2] = {2 + x + x * x, 1 + 2 * x + 3 * x * x}; CHECKCi(i,c + 2 * i, v); #else - double complex v = (2 + _Complex_I * 1) + (1 + _Complex_I * 2) * x + const double complex v = (2 + _Complex_I * 1) + (1 + _Complex_I * 2) * x + (1 + _Complex_I * 3) * x * x; CHECKCi(i,c[i], v); #endif diff -Nru libgetdata-0.7.0/test/alter_crecip89.c libgetdata-0.7.1/test/alter_crecip89.c --- libgetdata-0.7.0/test/alter_crecip89.c 2010-10-16 03:17:14.000000000 +0000 +++ libgetdata-0.7.1/test/alter_crecip89.c 2010-11-27 22:21:48.000000000 +0000 @@ -20,7 +20,8 @@ const char* format_data = "data RAW INT32 8\nphase PHASE data 1\n" "div RECIP data 230.\n"; int32_t data_data[256]; - int fd, r = 0; + int fd, ret, error, n, r = 0; + DIRFILE *D; double div[2] = {1093., 3290.}; gd_entry_t E; @@ -37,10 +38,10 @@ write(fd, data_data, 256 * sizeof(int32_t)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDWR | GD_VERBOSE); - int ret = gd_alter_crecip(D, "div", "phase", div); - int error = gd_error(D); - int n = gd_entry(D, "div", &E); + D = gd_open(filedir, GD_RDWR | GD_VERBOSE); + ret = gd_alter_crecip(D, "div", "phase", div); + error = gd_error(D); + n = gd_entry(D, "div", &E); gd_close(D); @@ -54,6 +55,7 @@ CHECKF(E.EN(recip,cdividend)[0], div[0]); CHECKF(E.EN(recip,cdividend)[1], div[1]); CHECKS(E.in_fields[0], "phase"); + gd_free_entry_strings(&E); return r; } diff -Nru libgetdata-0.7.0/test/alter_crecip.c libgetdata-0.7.1/test/alter_crecip.c --- libgetdata-0.7.0/test/alter_crecip.c 2010-10-16 03:17:14.000000000 +0000 +++ libgetdata-0.7.1/test/alter_crecip.c 2010-11-27 22:21:33.000000000 +0000 @@ -25,7 +25,8 @@ #else double complex v = 1093 + _Complex_I * 3290; #endif - int fd, i, r = 0; + int fd, i, ret, error, n, r = 0; + DIRFILE *D; mkdir(filedir, 0777); @@ -40,10 +41,10 @@ write(fd, data_data, 256 * sizeof(int32_t)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDWR | GD_VERBOSE); - int ret = gd_alter_crecip(D, "div", "phase", v); - int error = gd_error(D); - int n = gd_getdata(D, "div", 5, 0, 1, 0, GD_FLOAT64, c); + D = gd_open(filedir, GD_RDWR | GD_VERBOSE); + ret = gd_alter_crecip(D, "div", "phase", v); + error = gd_error(D); + n = gd_getdata(D, "div", 5, 0, 1, 0, GD_FLOAT64, c); gd_close(D); diff -Nru libgetdata-0.7.0/test/alter_divide.c libgetdata-0.7.1/test/alter_divide.c --- libgetdata-0.7.0/test/alter_divide.c 2010-10-16 03:17:14.000000000 +0000 +++ libgetdata-0.7.1/test/alter_divide.c 2010-11-27 22:22:10.000000000 +0000 @@ -20,7 +20,8 @@ "div DIVIDE data data\n"; int32_t data_data[256]; double c[8]; - int fd, i, r = 0; + int fd, i, ret, error, n, r = 0; + DIRFILE *D; mkdir(filedir, 0777); @@ -35,10 +36,10 @@ write(fd, data_data, 256 * sizeof(int32_t)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDWR | GD_VERBOSE); - int ret = gd_alter_divide(D, "div", NULL, "phase"); - int error = gd_error(D); - int n = gd_getdata(D, "div", 5, 0, 1, 0, GD_FLOAT64, c); + D = gd_open(filedir, GD_RDWR | GD_VERBOSE); + ret = gd_alter_divide(D, "div", NULL, "phase"); + error = gd_error(D); + n = gd_getdata(D, "div", 5, 0, 1, 0, GD_FLOAT64, c); gd_close(D); diff -Nru libgetdata-0.7.0/test/alter_entry.c libgetdata-0.7.1/test/alter_entry.c --- libgetdata-0.7.0/test/alter_entry.c 2010-10-16 03:17:14.000000000 +0000 +++ libgetdata-0.7.1/test/alter_entry.c 2010-11-27 22:22:35.000000000 +0000 @@ -17,8 +17,10 @@ const char* data = __TEST__ "dirfile/data"; const char* format_data = "data RAW UINT8 8\n"; unsigned char data_data[256]; - int fd, r = 0; + int fd, ret, error, r = 0; + off_t n; gd_entry_t E; + DIRFILE *D; mkdir(filedir, 0777); @@ -33,13 +35,13 @@ write(fd, data_data, 256); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDWR | GD_VERBOSE); + D = gd_open(filedir, GD_RDWR | GD_VERBOSE); gd_entry(D, "data", &E); E.EN(raw,data_type) = GD_UINT16; E.EN(raw,spf) = 11; - int ret = gd_alter_entry(D, "data", &E, 0); - int error = gd_error(D); - off_t n = gd_nframes(D); + ret = gd_alter_entry(D, "data", &E, 0); + error = gd_error(D); + n = gd_nframes(D); gd_close(D); @@ -50,6 +52,7 @@ CHECKI(error, 0); CHECKI(n, 11); CHECKI(ret, 0); + gd_free_entry_strings(&E); return r; } diff -Nru libgetdata-0.7.0/test/alter_entry_recode.c libgetdata-0.7.1/test/alter_entry_recode.c --- libgetdata-0.7.0/test/alter_entry_recode.c 2010-10-16 03:17:14.000000000 +0000 +++ libgetdata-0.7.1/test/alter_entry_recode.c 2010-11-27 22:22:53.000000000 +0000 @@ -19,7 +19,9 @@ const char* format_data = "data RAW UINT8 8\n"; unsigned char data_data[256]; uint16_t d; - int fd, i, r = 0; + int fd, i, ret, error, r = 0; + off_t n; + DIRFILE *D; gd_entry_t E; mkdir(filedir, 0777); @@ -35,13 +37,13 @@ write(fd, data_data, 256); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDWR | GD_VERBOSE); + D = gd_open(filedir, GD_RDWR | GD_VERBOSE); gd_entry(D, "data", &E); E.EN(raw,data_type) = GD_UINT16; E.EN(raw,spf) = 11; - int ret = gd_alter_entry(D, "data", &E, 1); - int error = gd_error(D); - off_t n = gd_nframes(D); + ret = gd_alter_entry(D, "data", &E, 1); + error = gd_error(D); + n = gd_nframes(D); gd_close(D); @@ -66,6 +68,7 @@ CHECKI(error, 0); CHECKI(n, 32); CHECKI(ret, 0); + gd_free_entry_strings(&E); return r; } diff -Nru libgetdata-0.7.0/test/alter_entry_scalar2a.c libgetdata-0.7.1/test/alter_entry_scalar2a.c --- libgetdata-0.7.0/test/alter_entry_scalar2a.c 2010-10-16 03:17:14.000000000 +0000 +++ libgetdata-0.7.1/test/alter_entry_scalar2a.c 2010-11-27 22:23:06.000000000 +0000 @@ -16,7 +16,8 @@ const char* format = __TEST__ "dirfile/format"; const char* format_data = "data BIT in c1 3\nc1 CONST INT64 3\n" "c2 CONST INT64 11\n"; - int fd, r = 0; + int fd, ret, error, n, r = 0; + DIRFILE *D; gd_entry_t E; mkdir(filedir, 0777); @@ -25,16 +26,16 @@ write(fd, format_data, strlen(format_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDWR | GD_VERBOSE); + D = gd_open(filedir, GD_RDWR | GD_VERBOSE); gd_entry(D, "data", &E); free(E.scalar[0]); E.scalar[0] = "c2"; - int ret = gd_alter_entry(D, "data", &E, 0); - int error = gd_error(D); + ret = gd_alter_entry(D, "data", &E, 0); + error = gd_error(D); E.scalar[0] = NULL; gd_free_entry_strings(&E); - int n = gd_entry(D, "data", &E); + n = gd_entry(D, "data", &E); gd_close(D); @@ -45,6 +46,7 @@ CHECKI(n, 0); CHECKI(ret, 0); CHECKI(E.EN(bit,bitnum), 11); + gd_free_entry_strings(&E); return r; } diff -Nru libgetdata-0.7.0/test/alter_entry_scalar2n.c libgetdata-0.7.1/test/alter_entry_scalar2n.c --- libgetdata-0.7.0/test/alter_entry_scalar2n.c 2010-10-16 03:17:14.000000000 +0000 +++ libgetdata-0.7.1/test/alter_entry_scalar2n.c 2010-11-27 22:23:22.000000000 +0000 @@ -17,7 +17,8 @@ const char* data = __TEST__ "dirfile/data"; const char* format_data = "data RAW UINT8 8\nconst CONST INT64 11\n"; unsigned char data_data[256]; - int fd, r = 0; + int fd, ret, error, n, r = 0; + DIRFILE *D; gd_entry_t E; mkdir(filedir, 0777); @@ -33,15 +34,15 @@ write(fd, data_data, 256); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDWR | GD_VERBOSE); + D = gd_open(filedir, GD_RDWR | GD_VERBOSE); gd_entry(D, "data", &E); E.scalar[0] = "const"; - int ret = gd_alter_entry(D, "data", &E, 0); - int error = gd_error(D); + ret = gd_alter_entry(D, "data", &E, 0); + error = gd_error(D); E.scalar[0] = NULL; gd_free_entry_strings(&E); - int n = gd_entry(D, "data", &E); + n = gd_entry(D, "data", &E); gd_close(D); @@ -53,6 +54,7 @@ CHECKI(n, 0); CHECKI(ret, 0); CHECKI(E.EN(raw,spf), 11); + gd_free_entry_strings(&E); return r; } diff -Nru libgetdata-0.7.0/test/alter_entry_scalar3.c libgetdata-0.7.1/test/alter_entry_scalar3.c --- libgetdata-0.7.0/test/alter_entry_scalar3.c 2010-10-16 03:17:14.000000000 +0000 +++ libgetdata-0.7.1/test/alter_entry_scalar3.c 2010-11-27 22:23:35.000000000 +0000 @@ -15,7 +15,8 @@ const char* filedir = __TEST__ "dirfile"; const char* format = __TEST__ "dirfile/format"; const char* format_data = "data BIT in c1 3\nc1 CONST INT64 3\n"; - int fd, r = 0; + int fd, ret, error, n, r = 0; + DIRFILE *D; gd_entry_t E; mkdir(filedir, 0777); @@ -24,15 +25,15 @@ write(fd, format_data, strlen(format_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDWR | GD_VERBOSE); + D = gd_open(filedir, GD_RDWR | GD_VERBOSE); gd_entry(D, "data", &E); free(E.scalar[0]); E.scalar[0] = NULL; - int ret = gd_alter_entry(D, "data", &E, 0); - int error = gd_error(D); + ret = gd_alter_entry(D, "data", &E, 0); + error = gd_error(D); gd_free_entry_strings(&E); - int n = gd_entry(D, "data", &E); + n = gd_entry(D, "data", &E); gd_close(D); @@ -44,6 +45,7 @@ CHECKI(ret,0); CHECKI(E.EN(bit,bitnum), 3); CHECKP(E.scalar[0]); + gd_free_entry_strings(&E); return r; } diff -Nru libgetdata-0.7.0/test/alter_entry_scalar4.c libgetdata-0.7.1/test/alter_entry_scalar4.c --- libgetdata-0.7.0/test/alter_entry_scalar4.c 2010-10-16 03:17:14.000000000 +0000 +++ libgetdata-0.7.1/test/alter_entry_scalar4.c 2010-11-27 22:23:49.000000000 +0000 @@ -15,7 +15,8 @@ const char* filedir = __TEST__ "dirfile"; const char* format = __TEST__ "dirfile/format"; const char* format_data = "data BIT in 3 c1\nc1 CONST INT64 3\n"; - int fd, r = 0; + int fd, ret, error, n, r = 0; + DIRFILE *D; gd_entry_t E; mkdir(filedir, 0777); @@ -24,16 +25,16 @@ write(fd, format_data, strlen(format_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDWR | GD_VERBOSE); + D = gd_open(filedir, GD_RDWR | GD_VERBOSE); gd_entry(D, "data", &E); free(E.scalar[1]); E.scalar[1] = NULL; E.EN(bit,numbits) = 11; - int ret = gd_alter_entry(D, "data", &E, 0); - int error = gd_error(D); + ret = gd_alter_entry(D, "data", &E, 0); + error = gd_error(D); gd_free_entry_strings(&E); - int n = gd_entry(D, "data", &E); + n = gd_entry(D, "data", &E); gd_close(D); @@ -45,6 +46,7 @@ CHECKI(ret, 0); CHECKI(E.EN(bit,numbits), 11); CHECKP(E.scalar[1]); + gd_free_entry_strings(&E); return r; } diff -Nru libgetdata-0.7.0/test/alter_lincom_23.c libgetdata-0.7.1/test/alter_lincom_23.c --- libgetdata-0.7.0/test/alter_lincom_23.c 2010-10-16 03:17:14.000000000 +0000 +++ libgetdata-0.7.1/test/alter_lincom_23.c 2010-11-27 22:29:58.000000000 +0000 @@ -20,7 +20,8 @@ "lincom LINCOM 2 data 1 0 data 1 0\n"; int32_t data_data[256]; int32_t c[8]; - int fd, i, r = 0; + int fd, i, ret, error, n, r = 0; + DIRFILE *D; const char* in_fields[3] = {"data", "phase", "data"}; const double m[3] = {1, 2, 3}; const double b[3] = {3, 0, 1}; @@ -38,10 +39,10 @@ write(fd, data_data, 256 * sizeof(int32_t)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDWR | GD_VERBOSE); - int ret = gd_alter_lincom(D, "lincom", 3, in_fields, m, b); - int error = gd_error(D); - int n = gd_getdata(D, "lincom", 5, 0, 1, 0, GD_INT32, c); + D = gd_open(filedir, GD_RDWR | GD_VERBOSE); + ret = gd_alter_lincom(D, "lincom", 3, in_fields, m, b); + error = gd_error(D); + n = gd_getdata(D, "lincom", 5, 0, 1, 0, GD_INT32, c); gd_close(D); diff -Nru libgetdata-0.7.0/test/alter_lincom_32.c libgetdata-0.7.1/test/alter_lincom_32.c --- libgetdata-0.7.0/test/alter_lincom_32.c 2010-10-16 03:17:14.000000000 +0000 +++ libgetdata-0.7.1/test/alter_lincom_32.c 2010-11-27 22:24:20.000000000 +0000 @@ -20,7 +20,8 @@ "lincom LINCOM 3 data 1 3 phase 2 0 data 3 1\n"; int32_t data_data[256]; int32_t c[8]; - int fd, i, r = 0; + int fd, i, ret, error, n, r = 0; + DIRFILE *D; const char* in_fields[2] = {"data", "phase"}; const double m[2] = {2, 4}; const double b[2] = {0, 2}; @@ -38,10 +39,10 @@ write(fd, data_data, 256 * sizeof(int32_t)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDWR | GD_VERBOSE); - int ret = gd_alter_lincom(D, "lincom", 2, in_fields, m, b); - int error = gd_error(D); - int n = gd_getdata(D, "lincom", 5, 0, 1, 0, GD_INT32, c); + D = gd_open(filedir, GD_RDWR | GD_VERBOSE); + ret = gd_alter_lincom(D, "lincom", 2, in_fields, m, b); + error = gd_error(D); + n = gd_getdata(D, "lincom", 5, 0, 1, 0, GD_INT32, c); gd_close(D); diff -Nru libgetdata-0.7.0/test/alter_lincom_input.c libgetdata-0.7.1/test/alter_lincom_input.c --- libgetdata-0.7.0/test/alter_lincom_input.c 2010-10-16 03:17:14.000000000 +0000 +++ libgetdata-0.7.1/test/alter_lincom_input.c 2010-11-27 22:24:33.000000000 +0000 @@ -20,7 +20,8 @@ "lincom LINCOM 2 data 1 0 data 1 0\n"; int32_t data_data[256]; int32_t c[8]; - int fd, i, r = 0; + int fd, i, ret, error, n, r = 0; + DIRFILE *D; const char* in_fields[3] = {"data", "phase", NULL}; mkdir(filedir, 0777); @@ -36,10 +37,10 @@ write(fd, data_data, 256 * sizeof(int32_t)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDWR | GD_VERBOSE); - int ret = gd_alter_lincom(D, "lincom", 0, in_fields, NULL, NULL); - int error = gd_error(D); - int n = gd_getdata(D, "lincom", 5, 0, 1, 0, GD_INT32, c); + D = gd_open(filedir, GD_RDWR | GD_VERBOSE); + ret = gd_alter_lincom(D, "lincom", 0, in_fields, NULL, NULL); + error = gd_error(D); + n = gd_getdata(D, "lincom", 5, 0, 1, 0, GD_INT32, c); gd_close(D); diff -Nru libgetdata-0.7.0/test/alter_lincom_offset.c libgetdata-0.7.1/test/alter_lincom_offset.c --- libgetdata-0.7.0/test/alter_lincom_offset.c 2010-10-16 03:17:14.000000000 +0000 +++ libgetdata-0.7.1/test/alter_lincom_offset.c 2010-11-27 22:24:47.000000000 +0000 @@ -20,7 +20,8 @@ "lincom LINCOM 2 data 1 0 data 1 0\n"; int32_t data_data[256]; int32_t c[8]; - int fd, i, r = 0; + int fd, i, ret, error, n, r = 0; + DIRFILE *D; const char* in_fields[3] = {"data", "phase", NULL}; double b[3] = {2, 3, 0}; @@ -37,10 +38,10 @@ write(fd, data_data, 256 * sizeof(int32_t)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDWR | GD_VERBOSE); - int ret = gd_alter_lincom(D, "lincom", 0, in_fields, NULL, b); - int error = gd_error(D); - int n = gd_getdata(D, "lincom", 5, 0, 1, 0, GD_INT32, c); + D = gd_open(filedir, GD_RDWR | GD_VERBOSE); + ret = gd_alter_lincom(D, "lincom", 0, in_fields, NULL, b); + error = gd_error(D); + n = gd_getdata(D, "lincom", 5, 0, 1, 0, GD_INT32, c); gd_close(D); diff -Nru libgetdata-0.7.0/test/alter_lincom_slope.c libgetdata-0.7.1/test/alter_lincom_slope.c --- libgetdata-0.7.0/test/alter_lincom_slope.c 2010-10-16 03:17:14.000000000 +0000 +++ libgetdata-0.7.1/test/alter_lincom_slope.c 2010-11-27 22:25:00.000000000 +0000 @@ -20,7 +20,8 @@ "lincom LINCOM 2 data 1 0 data 1 0\n"; int32_t data_data[256]; int32_t c[8]; - int fd, i, r = 0; + int fd, i, ret, error, n, r = 0; + DIRFILE *D; const char* in_fields[3] = {"data", "phase", NULL}; double m[3] = {2, 3, 0}; @@ -37,10 +38,10 @@ write(fd, data_data, 256 * sizeof(int32_t)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDWR | GD_VERBOSE); - int ret = gd_alter_lincom(D, "lincom", 0, in_fields, m, NULL); - int error = gd_error(D); - int n = gd_getdata(D, "lincom", 5, 0, 1, 0, GD_INT32, c); + D = gd_open(filedir, GD_RDWR | GD_VERBOSE); + ret = gd_alter_lincom(D, "lincom", 0, in_fields, m, NULL); + error = gd_error(D); + n = gd_getdata(D, "lincom", 5, 0, 1, 0, GD_INT32, c); gd_close(D); diff -Nru libgetdata-0.7.0/test/alter_linterp.c libgetdata-0.7.1/test/alter_linterp.c --- libgetdata-0.7.0/test/alter_linterp.c 2010-10-16 03:17:14.000000000 +0000 +++ libgetdata-0.7.1/test/alter_linterp.c 2010-11-27 22:30:15.000000000 +0000 @@ -24,7 +24,8 @@ int32_t data_data[256]; int32_t c[8]; gd_entry_t e; - int fd, i, r = 0; + int fd, i, ret, error, error2, n, unlink_table, r = 0; + DIRFILE *D; mkdir(filedir, 0777); @@ -47,17 +48,17 @@ write(fd, data_data, 256 * sizeof(int32_t)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDWR | GD_VERBOSE); - int ret = gd_alter_linterp(D, "lut", NULL, "table1", 0); - int error = gd_error(D); + D = gd_open(filedir, GD_RDWR | GD_VERBOSE); + ret = gd_alter_linterp(D, "lut", NULL, "table1", 0); + error = gd_error(D); gd_entry(D, "lut", &e); - int error2 = gd_error(D); - int n = gd_getdata(D, "lut", 5, 0, 1, 0, GD_INT32, c); + error2 = gd_error(D); + n = gd_getdata(D, "lut", 5, 0, 1, 0, GD_INT32, c); gd_close(D); unlink(data); - int unlink_table = unlink(table); + unlink_table = unlink(table); unlink(table1); unlink(format); rmdir(filedir); @@ -72,6 +73,7 @@ CHECKI(error2, 0); CHECKS(e.in_fields[0], "data"); CHECKS(e.EN(linterp,table), "table1"); + gd_free_entry_strings(&e); return r; } diff -Nru libgetdata-0.7.0/test/alter_linterp_move.c libgetdata-0.7.1/test/alter_linterp_move.c --- libgetdata-0.7.0/test/alter_linterp_move.c 2010-10-16 03:17:14.000000000 +0000 +++ libgetdata-0.7.1/test/alter_linterp_move.c 2010-11-27 22:25:54.000000000 +0000 @@ -23,7 +23,8 @@ const char* table1data = "0 0\n1000 10000\n"; int32_t data_data[256]; int32_t c[8]; - int fd, i, r = 0; + int fd, i, ret, error, n, unlink_table, r = 0; + DIRFILE *D; mkdir(filedir, 0777); @@ -46,10 +47,10 @@ write(fd, data_data, 256 * sizeof(int32_t)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDWR | GD_VERBOSE); - int ret = gd_alter_linterp(D, "lut", NULL, "table1", 1); - int error = gd_error(D); - int n = gd_getdata(D, "lut", 5, 0, 1, 0, GD_INT32, c); + D = gd_open(filedir, GD_RDWR | GD_VERBOSE); + ret = gd_alter_linterp(D, "lut", NULL, "table1", 1); + error = gd_error(D); + n = gd_getdata(D, "lut", 5, 0, 1, 0, GD_INT32, c); gd_close(D); @@ -57,7 +58,7 @@ CHECKIi(i,c[i], (i + 40) * 5); unlink(data); - int unlink_table = unlink(table); + unlink_table = unlink(table); unlink(table1); unlink(format); rmdir(filedir); diff -Nru libgetdata-0.7.0/test/alter_mspec.c libgetdata-0.7.1/test/alter_mspec.c --- libgetdata-0.7.0/test/alter_mspec.c 2010-10-16 03:17:14.000000000 +0000 +++ libgetdata-0.7.1/test/alter_mspec.c 2010-11-27 22:26:09.000000000 +0000 @@ -19,7 +19,8 @@ const char* format_data = "data RAW UINT8 8\nMETA data phase PHASE data 1\n"; unsigned char data_data[256]; unsigned char c[8]; - int fd, i, r = 0; + int fd, i, ret, error, n, r = 0; + DIRFILE *D; mkdir(filedir, 0777); @@ -34,10 +35,10 @@ write(fd, data_data, 256); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDWR | GD_VERBOSE); - int ret = gd_malter_spec(D, "phase PHASE data 2", "data", 0); - int error = gd_error(D); - int n = gd_getdata(D, "data/phase", 5, 0, 1, 0, GD_UINT8, c); + D = gd_open(filedir, GD_RDWR | GD_VERBOSE); + ret = gd_malter_spec(D, "phase PHASE data 2", "data", 0); + error = gd_error(D); + n = gd_getdata(D, "data/phase", 5, 0, 1, 0, GD_UINT8, c); gd_close(D); diff -Nru libgetdata-0.7.0/test/alter_multiply.c libgetdata-0.7.1/test/alter_multiply.c --- libgetdata-0.7.0/test/alter_multiply.c 2010-10-16 03:17:14.000000000 +0000 +++ libgetdata-0.7.1/test/alter_multiply.c 2010-11-27 22:26:24.000000000 +0000 @@ -20,7 +20,8 @@ "mult MULTIPLY data data\n"; int32_t data_data[256]; int32_t c[8]; - int fd, i, r = 0; + int fd, i, ret, error, n, r = 0; + DIRFILE *D; mkdir(filedir, 0777); @@ -35,10 +36,10 @@ write(fd, data_data, 256 * sizeof(int32_t)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDWR | GD_VERBOSE); - int ret = gd_alter_multiply(D, "mult", NULL, "phase"); - int error = gd_error(D); - int n = gd_getdata(D, "mult", 5, 0, 1, 0, GD_INT32, c); + D = gd_open(filedir, GD_RDWR | GD_VERBOSE); + ret = gd_alter_multiply(D, "mult", NULL, "phase"); + error = gd_error(D); + n = gd_getdata(D, "mult", 5, 0, 1, 0, GD_INT32, c); gd_close(D); diff -Nru libgetdata-0.7.0/test/alter_phase.c libgetdata-0.7.1/test/alter_phase.c --- libgetdata-0.7.0/test/alter_phase.c 2010-10-16 03:17:14.000000000 +0000 +++ libgetdata-0.7.1/test/alter_phase.c 2010-11-27 22:26:47.000000000 +0000 @@ -19,7 +19,8 @@ const char* format_data = "data RAW UINT8 8\nphase PHASE data 1\n"; unsigned char data_data[256]; unsigned char c[8]; - int fd, i, r = 0; + int fd, i, ret, error, n, r = 0; + DIRFILE *D; mkdir(filedir, 0777); @@ -34,10 +35,10 @@ write(fd, data_data, 256); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDWR | GD_VERBOSE); - int ret = gd_alter_phase(D, "phase", NULL, 2); - int error = gd_error(D); - int n = gd_getdata(D, "phase", 5, 0, 1, 0, GD_UINT8, c); + D = gd_open(filedir, GD_RDWR | GD_VERBOSE); + ret = gd_alter_phase(D, "phase", NULL, 2); + error = gd_error(D); + n = gd_getdata(D, "phase", 5, 0, 1, 0, GD_UINT8, c); gd_close(D); diff -Nru libgetdata-0.7.0/test/alter_polynom_coeff.c libgetdata-0.7.1/test/alter_polynom_coeff.c --- libgetdata-0.7.0/test/alter_polynom_coeff.c 2010-10-16 03:17:14.000000000 +0000 +++ libgetdata-0.7.1/test/alter_polynom_coeff.c 2010-11-27 22:27:08.000000000 +0000 @@ -21,8 +21,9 @@ "polynom POLYNOM data 1 2 1\n"; int32_t data_data[256]; const double a[] = {2, 1, 3}; - int fd, i, r = 0; + int fd, i, ret, error, n, error2, r = 0; gd_entry_t E; + DIRFILE *D; mkdir(filedir, 0777); @@ -37,14 +38,14 @@ write(fd, data_data, 256 * sizeof(int32_t)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDWR | GD_VERBOSE); - int ret = gd_alter_polynom(D, "polynom", 0, NULL, a); - int error = gd_error(D); + D = gd_open(filedir, GD_RDWR | GD_VERBOSE); + ret = gd_alter_polynom(D, "polynom", 0, NULL, a); + error = gd_error(D); CHECKI(error,0); - int n = gd_entry(D, "polynom", &E); - int error2 = gd_error(D); + n = gd_entry(D, "polynom", &E); + error2 = gd_error(D); gd_close(D); @@ -64,6 +65,7 @@ CHECKI(error2,0); CHECKI(n,0); CHECKI(ret,0); + gd_free_entry_strings(&E); return r; } diff -Nru libgetdata-0.7.0/test/alter_polynom_input.c libgetdata-0.7.1/test/alter_polynom_input.c --- libgetdata-0.7.0/test/alter_polynom_input.c 2010-10-16 03:17:14.000000000 +0000 +++ libgetdata-0.7.1/test/alter_polynom_input.c 2010-11-27 22:27:28.000000000 +0000 @@ -20,7 +20,8 @@ "polynom POLYNOM data 1 2 1\n"; int32_t data_data[256]; int32_t c[8]; - int fd, i, r = 0; + int fd, i, ret, error, n, r = 0; + DIRFILE *D; mkdir(filedir, 0777); @@ -35,15 +36,15 @@ write(fd, data_data, 256 * sizeof(int32_t)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDWR | GD_VERBOSE); - int ret = gd_alter_polynom(D, "polynom", 0, "phase", NULL); - int error = gd_error(D); - int n = gd_getdata(D, "polynom", 5, 0, 1, 0, GD_INT32, c); + D = gd_open(filedir, GD_RDWR | GD_VERBOSE); + ret = gd_alter_polynom(D, "polynom", 0, "phase", NULL); + error = gd_error(D); + n = gd_getdata(D, "polynom", 5, 0, 1, 0, GD_INT32, c); gd_close(D); for (i = 0; i < 8; ++i) { - int x = i + 41; + const int x = i + 41; CHECKIi(i,c[i], x * x + 2 * x + 1); } diff -Nru libgetdata-0.7.0/test/alter_polynom_ord.c libgetdata-0.7.1/test/alter_polynom_ord.c --- libgetdata-0.7.0/test/alter_polynom_ord.c 2010-10-16 03:17:14.000000000 +0000 +++ libgetdata-0.7.1/test/alter_polynom_ord.c 2010-11-27 22:27:48.000000000 +0000 @@ -20,7 +20,8 @@ "polynom POLYNOM data 1 2 1\n"; int32_t data_data[256]; int32_t c[8]; - int fd, i, r = 0; + int fd, i, ret, error, n, r = 0; + DIRFILE *D; mkdir(filedir, 0777); @@ -35,10 +36,10 @@ write(fd, data_data, 256 * sizeof(int32_t)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDWR | GD_VERBOSE); - int ret = gd_alter_polynom(D, "polynom", 1, NULL, NULL); - int error = gd_error(D); - int n = gd_getdata(D, "polynom", 5, 0, 1, 0, GD_INT32, c); + D = gd_open(filedir, GD_RDWR | GD_VERBOSE); + ret = gd_alter_polynom(D, "polynom", 1, NULL, NULL); + error = gd_error(D); + n = gd_getdata(D, "polynom", 5, 0, 1, 0, GD_INT32, c); gd_close(D); diff -Nru libgetdata-0.7.0/test/alter_raw_spf.c libgetdata-0.7.1/test/alter_raw_spf.c --- libgetdata-0.7.0/test/alter_raw_spf.c 2010-10-16 03:17:14.000000000 +0000 +++ libgetdata-0.7.1/test/alter_raw_spf.c 2010-11-27 22:28:06.000000000 +0000 @@ -19,7 +19,9 @@ const char* format_data = "data RAW UINT8 8\n"; unsigned char data_data[256]; uint8_t d; - int fd, i, r = 0; + int fd, i, ret, error, r = 0; + off_t n; + DIRFILE *D; mkdir(filedir, 0777); @@ -34,10 +36,10 @@ write(fd, data_data, 256); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDWR | GD_VERBOSE); - int ret = gd_alter_raw(D, "data", GD_NULL, 11, 1); - int error = gd_error(D); - off_t n = gd_nframes(D); + D = gd_open(filedir, GD_RDWR | GD_VERBOSE); + ret = gd_alter_raw(D, "data", GD_NULL, 11, 1); + error = gd_error(D); + n = gd_nframes(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/alter_raw_type.c libgetdata-0.7.1/test/alter_raw_type.c --- libgetdata-0.7.0/test/alter_raw_type.c 2010-10-16 03:17:14.000000000 +0000 +++ libgetdata-0.7.1/test/alter_raw_type.c 2010-11-27 22:28:44.000000000 +0000 @@ -19,7 +19,9 @@ const char* format_data = "data RAW UINT8 8\n"; unsigned char data_data[256]; uint16_t d; - int fd, i, r = 0; + int fd, i, ret, error, r = 0; + off_t n; + DIRFILE *D; mkdir(filedir, 0777); @@ -34,10 +36,10 @@ write(fd, data_data, 256); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDWR | GD_VERBOSE); - int ret = gd_alter_raw(D, "data", GD_UINT16, 0, 1); - int error = gd_error(D); - off_t n = gd_nframes(D); + D = gd_open(filedir, GD_RDWR | GD_VERBOSE); + ret = gd_alter_raw(D, "data", GD_UINT16, 0, 1); + error = gd_error(D); + n = gd_nframes(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/alter_recip.c libgetdata-0.7.1/test/alter_recip.c --- libgetdata-0.7.0/test/alter_recip.c 2010-10-16 03:17:14.000000000 +0000 +++ libgetdata-0.7.1/test/alter_recip.c 2010-11-27 22:29:10.000000000 +0000 @@ -20,7 +20,8 @@ "div RECIP data 230.\n"; int32_t data_data[256]; double c[8]; - int fd, i, r = 0; + int fd, i, ret, error, n, r = 0; + DIRFILE *D; mkdir(filedir, 0777); @@ -35,10 +36,10 @@ write(fd, data_data, 256 * sizeof(int32_t)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDWR | GD_VERBOSE); - int ret = gd_alter_recip(D, "div", "phase", 1093.); - int error = gd_error(D); - int n = gd_getdata(D, "div", 5, 0, 1, 0, GD_FLOAT64, c); + D = gd_open(filedir, GD_RDWR | GD_VERBOSE); + ret = gd_alter_recip(D, "div", "phase", 1093.); + error = gd_error(D); + n = gd_getdata(D, "div", 5, 0, 1, 0, GD_FLOAT64, c); gd_close(D); diff -Nru libgetdata-0.7.0/test/alter_spec.c libgetdata-0.7.1/test/alter_spec.c --- libgetdata-0.7.0/test/alter_spec.c 2010-10-16 03:17:14.000000000 +0000 +++ libgetdata-0.7.1/test/alter_spec.c 2010-11-27 22:29:27.000000000 +0000 @@ -19,7 +19,9 @@ const char* format_data = "data RAW UINT8 8\n"; unsigned char data_data[256]; uint8_t d; - int fd, i, r = 0; + int fd, i, ret, error, r = 0; + off_t n; + DIRFILE *D; mkdir(filedir, 0777); @@ -34,10 +36,10 @@ write(fd, data_data, 256); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDWR | GD_VERBOSE); - int ret = gd_alter_spec(D, "data RAW UINT8 11", 1); - int error = gd_error(D); - off_t n = gd_nframes(D); + D = gd_open(filedir, GD_RDWR | GD_VERBOSE); + ret = gd_alter_spec(D, "data RAW UINT8 11", 1); + error = gd_error(D); + n = gd_nframes(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/alter_spec_meta.c libgetdata-0.7.1/test/alter_spec_meta.c --- libgetdata-0.7.0/test/alter_spec_meta.c 2010-10-16 03:17:14.000000000 +0000 +++ libgetdata-0.7.1/test/alter_spec_meta.c 2010-11-27 22:29:40.000000000 +0000 @@ -19,7 +19,8 @@ const char* format_data = "data RAW UINT8 8\nMETA data phase PHASE data 1\n"; unsigned char data_data[256]; unsigned char c[8]; - int fd, i, r = 0; + int fd, i, ret, error, n, r = 0; + DIRFILE *D; mkdir(filedir, 0777); @@ -34,10 +35,10 @@ write(fd, data_data, 256); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDWR | GD_VERBOSE); - int ret = gd_alter_spec(D, "data/phase PHASE data 2", 0); - int error = gd_error(D); - int n = gd_getdata(D, "data/phase", 5, 0, 1, 0, GD_UINT8, c); + D = gd_open(filedir, GD_RDWR | GD_VERBOSE); + ret = gd_alter_spec(D, "data/phase PHASE data 2", 0); + error = gd_error(D); + n = gd_getdata(D, "data/phase", 5, 0, 1, 0, GD_UINT8, c); gd_close(D); diff -Nru libgetdata-0.7.0/test/ascii_get.c libgetdata-0.7.1/test/ascii_get.c --- libgetdata-0.7.0/test/ascii_get.c 2010-10-16 03:17:14.000000000 +0000 +++ libgetdata-0.7.1/test/ascii_get.c 2010-11-27 22:30:47.000000000 +0000 @@ -17,7 +17,8 @@ const char* data = __TEST__ "dirfile/data.txt"; const char* format_data = "data RAW UINT8 8\n"; unsigned char c[8]; - int fd, i, r = 0; + int fd, i, n, error, r = 0; + DIRFILE *D; FILE* stream; memset(c, 0, 8); @@ -32,9 +33,9 @@ fprintf(stream, "%i\n", i); fclose(stream); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int n = gd_getdata(D, "data", 5, 0, 1, 0, GD_UINT8, c); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + n = gd_getdata(D, "data", 5, 0, 1, 0, GD_UINT8, c); + error = gd_error(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/ascii_get_get.c libgetdata-0.7.1/test/ascii_get_get.c --- libgetdata-0.7.0/test/ascii_get_get.c 1970-01-01 00:00:00.000000000 +0000 +++ libgetdata-0.7.1/test/ascii_get_get.c 2010-11-27 22:31:04.000000000 +0000 @@ -0,0 +1,59 @@ +/* Attempt to read UINT8 */ +#include "test.h" + +#include +#include +#include +#include +#include +#include +#include +#include + +int main(void) +{ + const char* filedir = __TEST__ "dirfile"; + const char* format = __TEST__ "dirfile/format"; + const char* data = __TEST__ "dirfile/data.txt"; + const char* format_data = "data RAW UINT8 8\n"; + unsigned char c[8], d[8]; + int fd, i, n, error, n2, error2, r = 0; + DIRFILE *D; + FILE* stream; + + memset(c, 0, 8); + mkdir(filedir, 0777); + + fd = open(format, O_CREAT | O_EXCL | O_WRONLY, 0666); + write(fd, format_data, strlen(format_data)); + close(fd); + + stream = fopen(data, "w" FOPEN_TEXT); + for (i = 0; i < 256; ++i) + fprintf(stream, "%i\n", i); + fclose(stream); + + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + n = gd_getdata(D, "data", 5, 0, 1, 0, GD_UINT8, c); + error = gd_error(D); + + n2 = gd_getdata(D, "data", 5, 0, 1, 0, GD_UINT8, d); + error2 = gd_error(D); + + gd_close(D); + + unlink(data); + unlink(format); + rmdir(filedir); + + CHECKI(error, 0); + CHECKI(n, 8); + CHECKI(error2, 0); + CHECKI(n2, 8); + for (i = 0; i < 8; ++i) { + CHECKIi(i,c[i], 40 + i); + CHECKIi(i+8,d[i], 40 + i); + } + + return r; +} diff -Nru libgetdata-0.7.0/test/ascii_nframes.c libgetdata-0.7.1/test/ascii_nframes.c --- libgetdata-0.7.0/test/ascii_nframes.c 2010-10-16 03:17:14.000000000 +0000 +++ libgetdata-0.7.1/test/ascii_nframes.c 2010-11-27 22:31:23.000000000 +0000 @@ -17,6 +17,8 @@ const char* format_data = "data RAW UINT8 1\n"; int i, r = 0; FILE* stream; + size_t n, m; + DIRFILE *D; mkdir(filedir, 0777); @@ -29,9 +31,9 @@ fprintf(stream, "%i\n", i); fclose(stream); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - size_t n = gd_nframes(D); - size_t m = gd_nframes(D); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + n = gd_nframes(D); + m = gd_nframes(D); gd_close(D); unlink(data); diff -Nru libgetdata-0.7.0/test/ascii_put.c libgetdata-0.7.1/test/ascii_put.c --- libgetdata-0.7.0/test/ascii_put.c 2010-10-16 03:17:14.000000000 +0000 +++ libgetdata-0.7.1/test/ascii_put.c 2010-11-27 22:31:37.000000000 +0000 @@ -18,10 +18,11 @@ const char* data = __TEST__ "dirfile/data.txt"; const char* format_data = "data RAW UINT8 8\n"; uint8_t c[8]; - int d; + int d, n, error; int fd, i, r = 0; struct stat buf; FILE* stream; + DIRFILE *D; memset(c, 0, 8); mkdir(filedir, 0777); @@ -33,9 +34,9 @@ write(fd, format_data, strlen(format_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDWR | GD_TEXT_ENCODED | GD_VERBOSE); - int n = gd_putdata(D, "data", 5, 0, 1, 0, GD_UINT8, c); - int error = gd_error(D); + D = gd_open(filedir, GD_RDWR | GD_TEXT_ENCODED | GD_VERBOSE); + n = gd_putdata(D, "data", 5, 0, 1, 0, GD_UINT8, c); + error = gd_error(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/bof.c libgetdata-0.7.1/test/bof.c --- libgetdata-0.7.0/test/bof.c 2010-10-16 03:17:14.000000000 +0000 +++ libgetdata-0.7.1/test/bof.c 2010-11-27 22:31:58.000000000 +0000 @@ -14,7 +14,9 @@ const char* format = __TEST__ "dirfile/format"; const char* data = __TEST__ "dirfile/data"; const char* format_data = "data RAW UINT16 2\n/FRAMEOFFSET 35\n"; - int fd, r = 0; + int fd, error, r = 0; + off_t n; + DIRFILE *D; mkdir(filedir, 0777); @@ -26,9 +28,9 @@ write(fd, data, strlen(data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - off_t n = gd_bof(D, "data"); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + n = gd_bof(D, "data"); + error = gd_error(D); gd_close(D); unlink(data); diff -Nru libgetdata-0.7.0/test/bof_lincom.c libgetdata-0.7.1/test/bof_lincom.c --- libgetdata-0.7.0/test/bof_lincom.c 2010-10-16 03:17:14.000000000 +0000 +++ libgetdata-0.7.1/test/bof_lincom.c 2010-11-27 22:32:31.000000000 +0000 @@ -20,7 +20,9 @@ "lincom2 LINCOM 2 data 1. 0. data2 1. 0.\n" "INCLUDE format1\n"; const char* format1_data = "data2 RAW UINT8 3\nFRAMEOFFSET 33\n"; - int fd, r = 0; + int fd, error1, error2, error3, error4, r = 0; + off_t bof_data, bof_data2, bof_lincom, bof_lincom2; + DIRFILE *D; mkdir(filedir, 0777); @@ -32,15 +34,15 @@ write(fd, format1_data, strlen(format1_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY); - off_t bof_data = gd_bof(D, "data"); - int error1 = gd_error(D); - off_t bof_data2 = gd_bof(D, "data2"); - int error2 = gd_error(D); - off_t bof_lincom = gd_bof(D, "lincom"); - int error3 = gd_error(D); - off_t bof_lincom2 = gd_bof(D, "lincom2"); - int error4 = gd_error(D); + D = gd_open(filedir, GD_RDONLY); + bof_data = gd_bof(D, "data"); + error1 = gd_error(D); + bof_data2 = gd_bof(D, "data2"); + error2 = gd_error(D); + bof_lincom = gd_bof(D, "lincom"); + error3 = gd_error(D); + bof_lincom2 = gd_bof(D, "lincom2"); + error4 = gd_error(D); gd_close(D); unlink(format1); diff -Nru libgetdata-0.7.0/test/bof_phase.c libgetdata-0.7.1/test/bof_phase.c --- libgetdata-0.7.0/test/bof_phase.c 2010-10-16 03:17:14.000000000 +0000 +++ libgetdata-0.7.1/test/bof_phase.c 2010-11-27 22:33:14.000000000 +0000 @@ -23,7 +23,9 @@ const char* format1_data = "data2 RAW UINT8 3\n" "FRAMEOFFSET 43\n" "phase2 PHASE data2 -7\n"; - int fd, r = 0; + int fd, error1, error2, error3, error4, r = 0; + off_t bof_phase, bof_phase2, bof_lincom, bof_lincom2; + DIRFILE *D; mkdir(filedir, 0777); @@ -35,15 +37,15 @@ write(fd, format1_data, strlen(format1_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY); - off_t bof_phase = gd_bof(D, "phase"); - int error1 = gd_error(D); - off_t bof_phase2 = gd_bof(D, "phase2"); - int error2 = gd_error(D); - off_t bof_lincom = gd_bof(D, "lincom"); - int error3 = gd_error(D); - off_t bof_lincom2 = gd_bof(D, "lincom2"); - int error4 = gd_error(D); + D = gd_open(filedir, GD_RDONLY); + bof_phase = gd_bof(D, "phase"); + error1 = gd_error(D); + bof_phase2 = gd_bof(D, "phase2"); + error2 = gd_error(D); + bof_lincom = gd_bof(D, "lincom"); + error3 = gd_error(D); + bof_lincom2 = gd_bof(D, "lincom2"); + error4 = gd_error(D); gd_close(D); unlink(format1); diff -Nru libgetdata-0.7.0/test/bzip_get.c libgetdata-0.7.1/test/bzip_get.c --- libgetdata-0.7.0/test/bzip_get.c 2010-10-16 03:17:14.000000000 +0000 +++ libgetdata-0.7.1/test/bzip_get.c 2010-11-27 22:35:06.000000000 +0000 @@ -22,7 +22,8 @@ uint16_t c[8]; char command[4096]; uint16_t data_data[256]; - int fd, r = 0; + int fd, n, error, i, r = 0; + DIRFILE *D; memset(c, 0, 8); mkdir(filedir, 0777); @@ -44,12 +45,12 @@ return 1; #ifdef USE_BZIP2 - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); #else - DIRFILE* D = gd_open(filedir, GD_RDONLY); + D = gd_open(filedir, GD_RDONLY); #endif - int n = gd_getdata(D, "data", 5, 0, 1, 0, GD_UINT16, c); - int error = gd_error(D); + n = gd_getdata(D, "data", 5, 0, 1, 0, GD_UINT16, c); + error = gd_error(D); gd_close(D); @@ -58,8 +59,6 @@ rmdir(filedir); #ifdef USE_BZIP2 - int i; - CHECKI(error, 0); CHECKI(n, 8); for (i = 0; i < 8; ++i) diff -Nru libgetdata-0.7.0/test/bzip_get_get.c libgetdata-0.7.1/test/bzip_get_get.c --- libgetdata-0.7.0/test/bzip_get_get.c 2010-10-16 03:17:14.000000000 +0000 +++ libgetdata-0.7.1/test/bzip_get_get.c 2010-11-27 22:35:22.000000000 +0000 @@ -25,7 +25,8 @@ uint16_t c1[8], c2[8]; char command[4096]; uint16_t data_data[256]; - int fd, i, r = 0; + int fd, i, n1, error1, n2, error2, r = 0; + DIRFILE *D; memset(c1, 0, 16); memset(c2, 0, 16); @@ -47,14 +48,14 @@ if (gd_system(command)) return 1; - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int n1 = gd_getdata(D, "data", 5, 0, 1, 0, GD_UINT16, c1); - int error1 = gd_error(D); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + n1 = gd_getdata(D, "data", 5, 0, 1, 0, GD_UINT16, c1); + error1 = gd_error(D); gd_close(D); D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int n2 = gd_getdata(D, "data", 5, 0, 1, 0, GD_UINT16, c2); - int error2 = gd_error(D); + n2 = gd_getdata(D, "data", 5, 0, 1, 0, GD_UINT16, c2); + error2 = gd_error(D); gd_close(D); unlink(gzipdata); diff -Nru libgetdata-0.7.0/test/bzip_move_from.c libgetdata-0.7.1/test/bzip_move_from.c --- libgetdata-0.7.0/test/bzip_move_from.c 2010-10-16 03:17:14.000000000 +0000 +++ libgetdata-0.7.1/test/bzip_move_from.c 2010-11-28 00:08:08.000000000 +0000 @@ -25,9 +25,11 @@ "/INCLUDE format1\ndata RAW UINT16 11\nENCODING bzip2\n"; const char* format1_data = "ENCODING none\n"; uint16_t data_data[128]; - int fd, r = 0; + int fd, ret, error, ge_ret, unlink_data, unlink_bz2data, r = 0, i = 0; char command[4096]; gd_entry_t E; + DIRFILE *D; + uint16_t d; mkdir(filedir, 0777); @@ -52,20 +54,17 @@ return 1; #ifdef USE_BZIP2 - DIRFILE* D = gd_open(filedir, GD_RDWR | GD_VERBOSE | GD_UNENCODED); + D = gd_open(filedir, GD_RDWR | GD_VERBOSE | GD_UNENCODED); #else - DIRFILE* D = gd_open(filedir, GD_RDWR | GD_UNENCODED); + D = gd_open(filedir, GD_RDWR | GD_UNENCODED); #endif - int ret = gd_move(D, "data", 1, 1); - int error = gd_error(D); - int ge_ret = gd_entry(D, "data", &E); + ret = gd_move(D, "data", 1, 1); + error = gd_error(D); + ge_ret = gd_entry(D, "data", &E); gd_close(D); #ifdef USE_BZIP2 - uint16_t d; - fd = open(data, O_RDONLY | O_BINARY); - int i = 0; if (fd >= 0) { while (read(fd, &d, sizeof(uint16_t))) { @@ -81,8 +80,8 @@ unlink(format1); unlink(format); - int unlink_data = unlink(data); - int unlink_bz2data = unlink(bz2data); + unlink_data = unlink(data); + unlink_bz2data = unlink(bz2data); rmdir(filedir); #ifdef USE_BZIP2 @@ -100,6 +99,7 @@ CHECKI(unlink_data, -1); CHECKI(unlink_bz2data, 0); #endif + gd_free_entry_strings(&E); return r; } diff -Nru libgetdata-0.7.0/test/bzip_nframes.c libgetdata-0.7.1/test/bzip_nframes.c --- libgetdata-0.7.0/test/bzip_nframes.c 2010-10-16 03:17:14.000000000 +0000 +++ libgetdata-0.7.1/test/bzip_nframes.c 2010-11-27 22:36:41.000000000 +0000 @@ -20,7 +20,9 @@ const char* format_data = "data RAW UINT16 1\n"; char command[4096]; uint16_t data_data[256]; - int i, r = 0; + int i, error, r = 0; + size_t n; + DIRFILE *D; mkdir(filedir, 0777); @@ -43,12 +45,12 @@ } #ifdef USE_BZIP2 - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); #else - DIRFILE* D = gd_open(filedir, GD_RDONLY); + D = gd_open(filedir, GD_RDONLY); #endif - size_t n = gd_nframes(D); - int error = gd_error(D); + n = gd_nframes(D); + error = gd_error(D); gd_close(D); unlink(gzipdata); diff -Nru libgetdata-0.7.0/test/close.c libgetdata-0.7.1/test/close.c --- libgetdata-0.7.0/test/close.c 2010-10-16 03:17:14.000000000 +0000 +++ libgetdata-0.7.1/test/close.c 2010-11-27 22:37:34.000000000 +0000 @@ -12,13 +12,14 @@ { const char* filedir = __TEST__ "dirfile"; const char* format = __TEST__ "dirfile/format"; - int r = 0; + int error, r = 0; + DIRFILE *D; mkdir(filedir, 0777); close(open(format, O_CREAT | O_EXCL | O_WRONLY, 0666)); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int error = gd_close(D); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + error = gd_close(D); unlink(format); rmdir(filedir); diff -Nru libgetdata-0.7.0/test/close_discard.c libgetdata-0.7.1/test/close_discard.c --- libgetdata-0.7.0/test/close_discard.c 2010-10-16 03:17:14.000000000 +0000 +++ libgetdata-0.7.1/test/close_discard.c 2010-11-27 22:37:55.000000000 +0000 @@ -14,16 +14,17 @@ const char* filedir = __TEST__ "dirfile"; const char* format = __TEST__ "dirfile/format"; const char* data = __TEST__ "dirfile/data"; - int r = 0; + int ret, n, r = 0; + DIRFILE *D; mkdir(filedir, 0777); close(open(format, O_CREAT | O_EXCL | O_WRONLY, 0666)); - DIRFILE* D = gd_open(filedir, GD_RDWR | GD_UNENCODED | GD_VERBOSE); + D = gd_open(filedir, GD_RDWR | GD_UNENCODED | GD_VERBOSE); gd_add_spec(D, "data RAW UINT8 1", 0); - int ret = gd_discard(D); + ret = gd_discard(D); D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int n = gd_nfields(D); + n = gd_nfields(D); gd_close(D); unlink(data); diff -Nru libgetdata-0.7.0/test/convert_complex128_complex64.c libgetdata-0.7.1/test/convert_complex128_complex64.c --- libgetdata-0.7.0/test/convert_complex128_complex64.c 2010-10-16 03:17:14.000000000 +0000 +++ libgetdata-0.7.1/test/convert_complex128_complex64.c 2010-11-27 22:39:51.000000000 +0000 @@ -25,7 +25,8 @@ double complex data_data[256]; float complex c[8]; #endif - int fd, i, r = 0; + int fd, i, n, error, r = 0; + DIRFILE *D; memset(c, 0, 8); mkdir(filedir, 0777); @@ -46,9 +47,9 @@ write(fd, data_data, 512 * sizeof(double)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int n = gd_getdata(D, "data", 5, 0, 1, 0, GD_COMPLEX64, c); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + n = gd_getdata(D, "data", 5, 0, 1, 0, GD_COMPLEX64, c); + error = gd_error(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/convert_complex128_float64.c libgetdata-0.7.1/test/convert_complex128_float64.c --- libgetdata-0.7.0/test/convert_complex128_float64.c 2010-10-16 03:17:14.000000000 +0000 +++ libgetdata-0.7.1/test/convert_complex128_float64.c 2010-11-27 22:40:27.000000000 +0000 @@ -22,7 +22,8 @@ #else double complex d = 8; #endif - int fd, r = 0; + int fd, n1, n2, error, r = 0; + DIRFILE *D; mkdir(filedir, 0777); @@ -30,14 +31,14 @@ write(fd, format_data, strlen(format_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDWR); + D = gd_open(filedir, GD_RDWR); #ifdef GD_NO_C99_API - int n1 = gd_put_constant(D, "data", GD_COMPLEX128, d); + n1 = gd_put_constant(D, "data", GD_COMPLEX128, d); #else - int n1 = gd_put_constant(D, "data", GD_COMPLEX128, &d); + n1 = gd_put_constant(D, "data", GD_COMPLEX128, &d); #endif - int n2 = gd_get_constant(D, "data", GD_FLOAT64, &c); - int error = gd_error(D); + n2 = gd_get_constant(D, "data", GD_FLOAT64, &c); + error = gd_error(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/convert_complex128_int64.c libgetdata-0.7.1/test/convert_complex128_int64.c --- libgetdata-0.7.0/test/convert_complex128_int64.c 2010-10-16 03:17:14.000000000 +0000 +++ libgetdata-0.7.1/test/convert_complex128_int64.c 2010-11-27 22:40:24.000000000 +0000 @@ -21,7 +21,8 @@ #else double complex d = 8; #endif - int fd, r = 0; + int fd, n1, n2, error, r = 0; + DIRFILE *D; mkdir(filedir, 0777); @@ -29,14 +30,14 @@ write(fd, format_data, strlen(format_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDWR); + D = gd_open(filedir, GD_RDWR); #ifdef GD_NO_C99_API - int n1 = gd_put_constant(D, "data", GD_COMPLEX128, d); + n1 = gd_put_constant(D, "data", GD_COMPLEX128, d); #else - int n1 = gd_put_constant(D, "data", GD_COMPLEX128, &d); + n1 = gd_put_constant(D, "data", GD_COMPLEX128, &d); #endif - int n2 = gd_get_constant(D, "data", GD_INT64, &c); - int error = gd_error(D); + n2 = gd_get_constant(D, "data", GD_INT64, &c); + error = gd_error(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/convert_complex128_uint64.c libgetdata-0.7.1/test/convert_complex128_uint64.c --- libgetdata-0.7.0/test/convert_complex128_uint64.c 2010-10-16 03:17:14.000000000 +0000 +++ libgetdata-0.7.1/test/convert_complex128_uint64.c 2010-11-27 22:40:45.000000000 +0000 @@ -21,7 +21,8 @@ #else double complex d = 8; #endif - int fd, r = 0; + int fd, n1, n2, error, r = 0; + DIRFILE *D; mkdir(filedir, 0777); @@ -29,14 +30,14 @@ write(fd, format_data, strlen(format_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDWR); + D = gd_open(filedir, GD_RDWR); #ifdef GD_NO_C99_API - int n1 = gd_put_constant(D, "data", GD_COMPLEX128, d); + n1 = gd_put_constant(D, "data", GD_COMPLEX128, d); #else - int n1 = gd_put_constant(D, "data", GD_COMPLEX128, &d); + n1 = gd_put_constant(D, "data", GD_COMPLEX128, &d); #endif - int n2 = gd_get_constant(D, "data", GD_UINT64, &c); - int error = gd_error(D); + n2 = gd_get_constant(D, "data", GD_UINT64, &c); + error = gd_error(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/convert_complex64_complex128.c libgetdata-0.7.1/test/convert_complex64_complex128.c --- libgetdata-0.7.0/test/convert_complex64_complex128.c 2010-10-16 03:17:14.000000000 +0000 +++ libgetdata-0.7.1/test/convert_complex64_complex128.c 2010-11-27 22:40:57.000000000 +0000 @@ -24,7 +24,8 @@ float complex data_data[256]; double complex c[8]; #endif - int fd, i, r = 0; + int fd, i, n, error, r = 0; + DIRFILE *D; memset(c, 0, 8); mkdir(filedir, 0777); @@ -45,9 +46,9 @@ write(fd, data_data, 512 * sizeof(float)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int n = gd_getdata(D, "data", 5, 0, 1, 0, GD_COMPLEX128, c); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + n = gd_getdata(D, "data", 5, 0, 1, 0, GD_COMPLEX128, c); + error = gd_error(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/convert_complex64_float64.c libgetdata-0.7.1/test/convert_complex64_float64.c --- libgetdata-0.7.0/test/convert_complex64_float64.c 2010-10-16 03:17:14.000000000 +0000 +++ libgetdata-0.7.1/test/convert_complex64_float64.c 2010-11-27 22:41:17.000000000 +0000 @@ -22,7 +22,8 @@ #else float complex d = 8; #endif - int fd, r = 0; + int fd, n1, n2, error, r = 0; + DIRFILE *D; mkdir(filedir, 0777); @@ -30,14 +31,14 @@ write(fd, format_data, strlen(format_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDWR); + D = gd_open(filedir, GD_RDWR); #ifdef GD_NO_C99_API - int n1 = gd_put_constant(D, "data", GD_COMPLEX64, d); + n1 = gd_put_constant(D, "data", GD_COMPLEX64, d); #else - int n1 = gd_put_constant(D, "data", GD_COMPLEX64, &d); + n1 = gd_put_constant(D, "data", GD_COMPLEX64, &d); #endif - int n2 = gd_get_constant(D, "data", GD_FLOAT64, &c); - int error = gd_error(D); + n2 = gd_get_constant(D, "data", GD_FLOAT64, &c); + error = gd_error(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/convert_complex64_int64.c libgetdata-0.7.1/test/convert_complex64_int64.c --- libgetdata-0.7.0/test/convert_complex64_int64.c 2010-10-16 03:17:14.000000000 +0000 +++ libgetdata-0.7.1/test/convert_complex64_int64.c 2010-11-27 22:41:28.000000000 +0000 @@ -21,7 +21,8 @@ #else float complex d = 8; #endif - int fd, r = 0; + int fd, n1, n2, error, r = 0; + DIRFILE *D; mkdir(filedir, 0777); @@ -29,14 +30,14 @@ write(fd, format_data, strlen(format_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDWR); + D = gd_open(filedir, GD_RDWR); #ifdef GD_NO_C99_API - int n1 = gd_put_constant(D, "data", GD_COMPLEX64, d); + n1 = gd_put_constant(D, "data", GD_COMPLEX64, d); #else - int n1 = gd_put_constant(D, "data", GD_COMPLEX64, &d); + n1 = gd_put_constant(D, "data", GD_COMPLEX64, &d); #endif - int n2 = gd_get_constant(D, "data", GD_INT64, &c); - int error = gd_error(D); + n2 = gd_get_constant(D, "data", GD_INT64, &c); + error = gd_error(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/convert_complex64_uint64.c libgetdata-0.7.1/test/convert_complex64_uint64.c --- libgetdata-0.7.0/test/convert_complex64_uint64.c 2010-10-16 03:17:14.000000000 +0000 +++ libgetdata-0.7.1/test/convert_complex64_uint64.c 2010-11-27 22:41:44.000000000 +0000 @@ -21,7 +21,8 @@ #else float complex d = 8; #endif - int fd, r = 0; + int fd, error, n1, n2, r = 0; + DIRFILE *D; mkdir(filedir, 0777); @@ -29,14 +30,14 @@ write(fd, format_data, strlen(format_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDWR); + D = gd_open(filedir, GD_RDWR); #ifdef GD_NO_C99_API - int n1 = gd_put_constant(D, "data", GD_COMPLEX64, d); + n1 = gd_put_constant(D, "data", GD_COMPLEX64, d); #else - int n1 = gd_put_constant(D, "data", GD_COMPLEX64, &d); + n1 = gd_put_constant(D, "data", GD_COMPLEX64, &d); #endif - int n2 = gd_get_constant(D, "data", GD_UINT64, &c); - int error = gd_error(D); + n2 = gd_get_constant(D, "data", GD_UINT64, &c); + error = gd_error(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/convert_float32_complex128.c libgetdata-0.7.1/test/convert_float32_complex128.c --- libgetdata-0.7.0/test/convert_float32_complex128.c 2010-10-16 03:17:14.000000000 +0000 +++ libgetdata-0.7.1/test/convert_float32_complex128.c 2010-11-27 22:42:01.000000000 +0000 @@ -23,7 +23,8 @@ #else double complex c[8]; #endif - int fd, i, r = 0; + int fd, i, n, error, r = 0; + DIRFILE *D; memset(c, 0, 8); mkdir(filedir, 0777); @@ -39,9 +40,9 @@ write(fd, data_data, 256 * sizeof(float)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int n = gd_getdata(D, "data", 5, 0, 1, 0, GD_COMPLEX128, c); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + n = gd_getdata(D, "data", 5, 0, 1, 0, GD_COMPLEX128, c); + error = gd_error(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/convert_float32_complex64.c libgetdata-0.7.1/test/convert_float32_complex64.c --- libgetdata-0.7.0/test/convert_float32_complex64.c 2010-10-16 03:17:14.000000000 +0000 +++ libgetdata-0.7.1/test/convert_float32_complex64.c 2010-11-27 22:42:52.000000000 +0000 @@ -23,7 +23,8 @@ #else float complex c[8]; #endif - int fd, i, r = 0; + int fd, i, n, error, r = 0; + DIRFILE *D; memset(c, 0, 8); mkdir(filedir, 0777); @@ -39,9 +40,9 @@ write(fd, data_data, 256 * sizeof(float)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int n = gd_getdata(D, "data", 5, 0, 1, 0, GD_COMPLEX64, c); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + n = gd_getdata(D, "data", 5, 0, 1, 0, GD_COMPLEX64, c); + error = gd_error(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/convert_float32_float64.c libgetdata-0.7.1/test/convert_float32_float64.c --- libgetdata-0.7.0/test/convert_float32_float64.c 2010-10-16 03:17:14.000000000 +0000 +++ libgetdata-0.7.1/test/convert_float32_float64.c 2010-11-27 22:43:05.000000000 +0000 @@ -19,7 +19,8 @@ const char* format_data = "data RAW FLOAT32 8\n"; float data_data[256]; double c[8]; - int fd, i, r = 0; + int fd, i, n, error, r = 0; + DIRFILE *D; memset(c, 0, 8); mkdir(filedir, 0777); @@ -35,9 +36,9 @@ write(fd, data_data, 256 * sizeof(float)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int n = gd_getdata(D, "data", 5, 0, 1, 0, GD_FLOAT64, c); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + n = gd_getdata(D, "data", 5, 0, 1, 0, GD_FLOAT64, c); + error = gd_error(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/convert_float32_int16.c libgetdata-0.7.1/test/convert_float32_int16.c --- libgetdata-0.7.0/test/convert_float32_int16.c 2010-10-16 03:17:14.000000000 +0000 +++ libgetdata-0.7.1/test/convert_float32_int16.c 2010-11-27 22:43:46.000000000 +0000 @@ -18,7 +18,8 @@ const char* format_data = "data RAW FLOAT32 8\n"; float data_data[256]; int16_t c[8]; - int fd, i, r = 0; + int fd, i, n, error, r = 0; + DIRFILE *D; memset(c, 0, 8); mkdir(filedir, 0777); @@ -34,9 +35,9 @@ write(fd, data_data, 256 * sizeof(float)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int n = gd_getdata(D, "data", 5, 0, 1, 0, GD_INT16, c); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + n = gd_getdata(D, "data", 5, 0, 1, 0, GD_INT16, c); + error = gd_error(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/convert_float32_int32.c libgetdata-0.7.1/test/convert_float32_int32.c --- libgetdata-0.7.0/test/convert_float32_int32.c 2010-10-16 03:17:14.000000000 +0000 +++ libgetdata-0.7.1/test/convert_float32_int32.c 2010-11-27 22:43:57.000000000 +0000 @@ -18,7 +18,8 @@ const char* format_data = "data RAW FLOAT32 8\n"; float data_data[256]; int32_t c[8]; - int fd, i, r = 0; + int fd, i, n, error, r = 0; + DIRFILE *D; memset(c, 0, 8); mkdir(filedir, 0777); @@ -34,9 +35,9 @@ write(fd, data_data, 256 * sizeof(float)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int n = gd_getdata(D, "data", 5, 0, 1, 0, GD_INT32, c); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + n = gd_getdata(D, "data", 5, 0, 1, 0, GD_INT32, c); + error = gd_error(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/convert_float32_int64.c libgetdata-0.7.1/test/convert_float32_int64.c --- libgetdata-0.7.0/test/convert_float32_int64.c 2010-10-16 03:17:14.000000000 +0000 +++ libgetdata-0.7.1/test/convert_float32_int64.c 2010-11-27 22:44:08.000000000 +0000 @@ -18,7 +18,8 @@ const char* format_data = "data RAW FLOAT32 8\n"; float data_data[256]; int64_t c[8]; - int fd, i, r = 0; + int fd, i, n, error, r = 0; + DIRFILE *D; memset(c, 0, 8); mkdir(filedir, 0777); @@ -34,9 +35,9 @@ write(fd, data_data, 256 * sizeof(float)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int n = gd_getdata(D, "data", 5, 0, 1, 0, GD_INT64, c); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + n = gd_getdata(D, "data", 5, 0, 1, 0, GD_INT64, c); + error = gd_error(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/convert_float32_int8.c libgetdata-0.7.1/test/convert_float32_int8.c --- libgetdata-0.7.0/test/convert_float32_int8.c 2010-10-16 03:17:14.000000000 +0000 +++ libgetdata-0.7.1/test/convert_float32_int8.c 2010-11-27 22:44:20.000000000 +0000 @@ -18,7 +18,8 @@ const char* format_data = "data RAW FLOAT32 8\n"; float data_data[256]; int8_t c[8]; - int fd, i, r = 0; + int fd, i, n, error, r = 0; + DIRFILE *D; memset(c, 0, 8); mkdir(filedir, 0777); @@ -34,9 +35,9 @@ write(fd, data_data, 256 * sizeof(float)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int n = gd_getdata(D, "data", 5, 0, 1, 0, GD_INT8, c); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + n = gd_getdata(D, "data", 5, 0, 1, 0, GD_INT8, c); + error = gd_error(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/convert_float32_uint16.c libgetdata-0.7.1/test/convert_float32_uint16.c --- libgetdata-0.7.0/test/convert_float32_uint16.c 2010-10-16 03:17:14.000000000 +0000 +++ libgetdata-0.7.1/test/convert_float32_uint16.c 2010-11-27 22:44:33.000000000 +0000 @@ -18,7 +18,8 @@ const char* format_data = "data RAW FLOAT32 8\n"; float data_data[256]; uint16_t c[8], i; - int fd, r = 0; + int fd, error, n, r = 0; + DIRFILE *D; memset(c, 0, 8); mkdir(filedir, 0777); @@ -34,9 +35,9 @@ write(fd, data_data, 256 * sizeof(float)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int n = gd_getdata(D, "data", 5, 0, 1, 0, GD_UINT16, c); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + n = gd_getdata(D, "data", 5, 0, 1, 0, GD_UINT16, c); + error = gd_error(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/convert_float32_uint32.c libgetdata-0.7.1/test/convert_float32_uint32.c --- libgetdata-0.7.0/test/convert_float32_uint32.c 2010-10-16 03:17:14.000000000 +0000 +++ libgetdata-0.7.1/test/convert_float32_uint32.c 2010-11-27 22:44:48.000000000 +0000 @@ -18,7 +18,8 @@ const char* format_data = "data RAW FLOAT32 8\n"; float data_data[256]; uint32_t c[8], i; - int fd, r = 0; + int fd, n, error, r = 0; + DIRFILE *D; memset(c, 0, 8); mkdir(filedir, 0777); @@ -34,9 +35,9 @@ write(fd, data_data, 256 * sizeof(float)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int n = gd_getdata(D, "data", 5, 0, 1, 0, GD_UINT32, c); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + n = gd_getdata(D, "data", 5, 0, 1, 0, GD_UINT32, c); + error = gd_error(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/convert_float32_uint64.c libgetdata-0.7.1/test/convert_float32_uint64.c --- libgetdata-0.7.0/test/convert_float32_uint64.c 2010-10-16 03:17:14.000000000 +0000 +++ libgetdata-0.7.1/test/convert_float32_uint64.c 2010-11-27 22:46:08.000000000 +0000 @@ -18,7 +18,8 @@ const char* format_data = "data RAW FLOAT32 8\n"; float data_data[256]; uint64_t c[8], i; - int fd, r = 0; + int fd, n, error, r = 0; + DIRFILE *D; memset(c, 0, 8); mkdir(filedir, 0777); @@ -34,9 +35,9 @@ write(fd, data_data, 256 * sizeof(float)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int n = gd_getdata(D, "data", 5, 0, 1, 0, GD_UINT64, c); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + n = gd_getdata(D, "data", 5, 0, 1, 0, GD_UINT64, c); + error = gd_error(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/convert_float32_uint8.c libgetdata-0.7.1/test/convert_float32_uint8.c --- libgetdata-0.7.0/test/convert_float32_uint8.c 2010-10-16 03:17:14.000000000 +0000 +++ libgetdata-0.7.1/test/convert_float32_uint8.c 2010-11-27 22:46:17.000000000 +0000 @@ -18,7 +18,8 @@ const char* format_data = "data RAW FLOAT32 8\n"; float data_data[256]; uint8_t c[8], i; - int fd, r = 0; + int fd, n, error, r = 0; + DIRFILE *D; memset(c, 0, 8); mkdir(filedir, 0777); @@ -34,9 +35,9 @@ write(fd, data_data, 256 * sizeof(float)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int n = gd_getdata(D, "data", 5, 0, 1, 0, GD_UINT8, c); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + n = gd_getdata(D, "data", 5, 0, 1, 0, GD_UINT8, c); + error = gd_error(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/convert_float64_complex128.c libgetdata-0.7.1/test/convert_float64_complex128.c --- libgetdata-0.7.0/test/convert_float64_complex128.c 2010-10-16 03:17:14.000000000 +0000 +++ libgetdata-0.7.1/test/convert_float64_complex128.c 2010-11-27 22:46:29.000000000 +0000 @@ -23,7 +23,8 @@ #else double complex c[8]; #endif - int fd, i, r = 0; + int fd, i, n, error, r = 0; + DIRFILE *D; memset(c, 0, 8); mkdir(filedir, 0777); @@ -39,9 +40,9 @@ write(fd, data_data, 256 * sizeof(double)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int n = gd_getdata(D, "data", 5, 0, 1, 0, GD_COMPLEX128, c); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + n = gd_getdata(D, "data", 5, 0, 1, 0, GD_COMPLEX128, c); + error = gd_error(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/convert_float64_complex64.c libgetdata-0.7.1/test/convert_float64_complex64.c --- libgetdata-0.7.0/test/convert_float64_complex64.c 2010-10-16 03:17:14.000000000 +0000 +++ libgetdata-0.7.1/test/convert_float64_complex64.c 2010-11-27 22:46:52.000000000 +0000 @@ -23,7 +23,8 @@ #else float complex c[8]; #endif - int fd, i, r = 0; + int fd, i, n, error, r = 0; + DIRFILE *D; memset(c, 0, 8); mkdir(filedir, 0777); @@ -39,9 +40,9 @@ write(fd, data_data, 256 * sizeof(double)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int n = gd_getdata(D, "data", 5, 0, 1, 0, GD_COMPLEX64, c); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + n = gd_getdata(D, "data", 5, 0, 1, 0, GD_COMPLEX64, c); + error = gd_error(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/convert_float64_float32.c libgetdata-0.7.1/test/convert_float64_float32.c --- libgetdata-0.7.0/test/convert_float64_float32.c 2010-10-16 03:17:14.000000000 +0000 +++ libgetdata-0.7.1/test/convert_float64_float32.c 2010-11-27 22:47:19.000000000 +0000 @@ -19,7 +19,8 @@ const char* format_data = "data RAW FLOAT64 8\n"; double data_data[256]; float c[8]; - int fd, i, r = 0; + int fd, i, n, error, r = 0; + DIRFILE *D; memset(c, 0, 8); mkdir(filedir, 0777); @@ -35,9 +36,9 @@ write(fd, data_data, 256 * sizeof(double)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int n = gd_getdata(D, "data", 5, 0, 1, 0, GD_FLOAT32, c); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + n = gd_getdata(D, "data", 5, 0, 1, 0, GD_FLOAT32, c); + error = gd_error(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/convert_float64_int16.c libgetdata-0.7.1/test/convert_float64_int16.c --- libgetdata-0.7.0/test/convert_float64_int16.c 2010-10-16 03:17:14.000000000 +0000 +++ libgetdata-0.7.1/test/convert_float64_int16.c 2010-11-27 22:47:29.000000000 +0000 @@ -18,7 +18,8 @@ const char* format_data = "data RAW FLOAT64 8\n"; double data_data[256]; int16_t c[8]; - int fd, i, r = 0; + int fd, i, n, error, r = 0; + DIRFILE *D; memset(c, 0, 8); mkdir(filedir, 0777); @@ -34,10 +35,10 @@ write(fd, data_data, 256 * sizeof(double)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int n = gd_getdata(D, "data", 5, 0, 1, 0, GD_INT16, c); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + n = gd_getdata(D, "data", 5, 0, 1, 0, GD_INT16, c); - int error = gd_error(D); + error = gd_error(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/convert_float64_int32.c libgetdata-0.7.1/test/convert_float64_int32.c --- libgetdata-0.7.0/test/convert_float64_int32.c 2010-10-16 03:17:14.000000000 +0000 +++ libgetdata-0.7.1/test/convert_float64_int32.c 2010-11-27 22:47:40.000000000 +0000 @@ -18,7 +18,8 @@ const char* format_data = "data RAW FLOAT64 8\n"; double data_data[256]; int32_t c[8]; - int fd, i, r = 0; + int fd, i, n, error, r = 0; + DIRFILE *D; memset(c, 0, 8); mkdir(filedir, 0777); @@ -34,10 +35,10 @@ write(fd, data_data, 256 * sizeof(double)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int n = gd_getdata(D, "data", 5, 0, 1, 0, GD_INT32, c); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + n = gd_getdata(D, "data", 5, 0, 1, 0, GD_INT32, c); - int error = gd_error(D); + error = gd_error(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/convert_float64_int64.c libgetdata-0.7.1/test/convert_float64_int64.c --- libgetdata-0.7.0/test/convert_float64_int64.c 2010-10-16 03:17:14.000000000 +0000 +++ libgetdata-0.7.1/test/convert_float64_int64.c 2010-11-28 00:08:41.000000000 +0000 @@ -17,8 +17,9 @@ const char* data = __TEST__ "dirfile/data"; const char* format_data = "data RAW FLOAT64 8\n"; double data_data[256]; - uint64_t c[8], i; - int fd, r = 0; + uint64_t c[8]; + int fd, i, n, error, r = 0; + DIRFILE *D; memset(c, 0, 8); mkdir(filedir, 0777); @@ -34,10 +35,10 @@ write(fd, data_data, 256 * sizeof(double)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int n = gd_getdata(D, "data", 5, 0, 1, 0, GD_UINT64, c); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + n = gd_getdata(D, "data", 5, 0, 1, 0, GD_UINT64, c); - int error = gd_error(D); + error = gd_error(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/convert_float64_int8.c libgetdata-0.7.1/test/convert_float64_int8.c --- libgetdata-0.7.0/test/convert_float64_int8.c 2010-10-16 03:17:14.000000000 +0000 +++ libgetdata-0.7.1/test/convert_float64_int8.c 2010-11-27 22:48:05.000000000 +0000 @@ -16,9 +16,10 @@ const char* format = __TEST__ "dirfile/format"; const char* data = __TEST__ "dirfile/data"; const char* format_data = "data RAW FLOAT64 8\n"; - double data_data[256]; + double data_data[256]; int8_t c[8]; - int fd, i, r = 0; + int fd, i, n, error, r = 0; + DIRFILE *D; memset(c, 0, 8); mkdir(filedir, 0777); @@ -34,10 +35,10 @@ write(fd, data_data, 256 * sizeof(double)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int n = gd_getdata(D, "data", 5, 0, 1, 0, GD_INT8, c); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + n = gd_getdata(D, "data", 5, 0, 1, 0, GD_INT8, c); - int error = gd_error(D); + error = gd_error(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/convert_float64_uint16.c libgetdata-0.7.1/test/convert_float64_uint16.c --- libgetdata-0.7.0/test/convert_float64_uint16.c 2010-10-16 03:17:14.000000000 +0000 +++ libgetdata-0.7.1/test/convert_float64_uint16.c 2010-11-27 22:49:44.000000000 +0000 @@ -16,9 +16,10 @@ const char* format = __TEST__ "dirfile/format"; const char* data = __TEST__ "dirfile/data"; const char* format_data = "data RAW FLOAT64 8\n"; - double data_data[256]; + double data_data[256]; uint16_t c[8], i; - int fd, r = 0; + int fd, n, error, r = 0; + DIRFILE *D; memset(c, 0, 8); mkdir(filedir, 0777); @@ -34,10 +35,10 @@ write(fd, data_data, 256 * sizeof(double)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int n = gd_getdata(D, "data", 5, 0, 1, 0, GD_UINT16, c); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + n = gd_getdata(D, "data", 5, 0, 1, 0, GD_UINT16, c); - int error = gd_error(D); + error = gd_error(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/convert_float64_uint32.c libgetdata-0.7.1/test/convert_float64_uint32.c --- libgetdata-0.7.0/test/convert_float64_uint32.c 2010-10-16 03:17:14.000000000 +0000 +++ libgetdata-0.7.1/test/convert_float64_uint32.c 2010-11-27 22:49:55.000000000 +0000 @@ -18,7 +18,8 @@ const char* format_data = "data RAW FLOAT64 8\n"; double data_data[256]; uint32_t c[8], i; - int fd, r = 0; + int fd, n, error, r = 0; + DIRFILE *D; memset(c, 0, 8); mkdir(filedir, 0777); @@ -34,10 +35,10 @@ write(fd, data_data, 256 * sizeof(double)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int n = gd_getdata(D, "data", 5, 0, 1, 0, GD_UINT32, c); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + n = gd_getdata(D, "data", 5, 0, 1, 0, GD_UINT32, c); - int error = gd_error(D); + error = gd_error(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/convert_float64_uint64.c libgetdata-0.7.1/test/convert_float64_uint64.c --- libgetdata-0.7.0/test/convert_float64_uint64.c 2010-10-16 03:17:14.000000000 +0000 +++ libgetdata-0.7.1/test/convert_float64_uint64.c 2010-11-27 22:50:07.000000000 +0000 @@ -18,7 +18,8 @@ const char* format_data = "data RAW FLOAT64 8\n"; double data_data[256]; uint64_t c[8], i; - int fd, r = 0; + int fd, n, error, r = 0; + DIRFILE *D; memset(c, 0, 8); mkdir(filedir, 0777); @@ -34,10 +35,10 @@ write(fd, data_data, 256 * sizeof(double)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int n = gd_getdata(D, "data", 5, 0, 1, 0, GD_UINT64, c); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + n = gd_getdata(D, "data", 5, 0, 1, 0, GD_UINT64, c); - int error = gd_error(D); + error = gd_error(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/convert_float64_uint8.c libgetdata-0.7.1/test/convert_float64_uint8.c --- libgetdata-0.7.0/test/convert_float64_uint8.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/convert_float64_uint8.c 2010-11-27 22:50:20.000000000 +0000 @@ -16,9 +16,10 @@ const char* format = __TEST__ "dirfile/format"; const char* data = __TEST__ "dirfile/data"; const char* format_data = "data RAW FLOAT64 8\n"; - double data_data[256]; + double data_data[256]; uint8_t c[8], i; - int fd, r = 0; + int fd, n, error, r = 0; + DIRFILE *D; memset(c, 0, 8); mkdir(filedir, 0777); @@ -34,10 +35,10 @@ write(fd, data_data, 256 * sizeof(double)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int n = gd_getdata(D, "data", 5, 0, 1, 0, GD_UINT8, c); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + n = gd_getdata(D, "data", 5, 0, 1, 0, GD_UINT8, c); - int error = gd_error(D); + error = gd_error(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/convert_int16_complex128.c libgetdata-0.7.1/test/convert_int16_complex128.c --- libgetdata-0.7.0/test/convert_int16_complex128.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/convert_int16_complex128.c 2010-11-27 22:51:47.000000000 +0000 @@ -23,7 +23,8 @@ #else double complex c[8]; #endif - int fd, i, r = 0; + int fd, i, n, error, r = 0; + DIRFILE *D; memset(c, 0, 8); mkdir(filedir, 0777); @@ -39,9 +40,9 @@ write(fd, data_data, 256 * sizeof(int16_t)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int n = gd_getdata(D, "data", 5, 0, 1, 0, GD_COMPLEX128, c); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + n = gd_getdata(D, "data", 5, 0, 1, 0, GD_COMPLEX128, c); + error = gd_error(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/convert_int16_complex64.c libgetdata-0.7.1/test/convert_int16_complex64.c --- libgetdata-0.7.0/test/convert_int16_complex64.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/convert_int16_complex64.c 2010-11-27 22:52:49.000000000 +0000 @@ -17,13 +17,14 @@ const char* format = __TEST__ "dirfile/format"; const char* data = __TEST__ "dirfile/data"; const char* format_data = "data RAW INT16 8\n"; - int16_t data_data[256]; + int16_t data_data[256]; #ifdef GD_NO_C99_API float c[16]; #else float complex c[8]; #endif - int fd, i, r = 0; + int fd, i, n, error, r = 0; + DIRFILE *D; memset(c, 0, 8); mkdir(filedir, 0777); @@ -39,9 +40,9 @@ write(fd, data_data, 256 * sizeof(int16_t)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int n = gd_getdata(D, "data", 5, 0, 1, 0, GD_COMPLEX64, c); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + n = gd_getdata(D, "data", 5, 0, 1, 0, GD_COMPLEX64, c); + error = gd_error(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/convert_int16_float32.c libgetdata-0.7.1/test/convert_int16_float32.c --- libgetdata-0.7.0/test/convert_int16_float32.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/convert_int16_float32.c 2010-11-27 22:52:59.000000000 +0000 @@ -19,7 +19,8 @@ const char* format_data = "data RAW INT16 8\n"; int16_t data_data[256]; float c[8]; - int fd, i, r = 0; + int fd, i, n, error, r = 0; + DIRFILE *D; memset(c, 0, 8); mkdir(filedir, 0777); @@ -35,9 +36,9 @@ write(fd, data_data, 256 * sizeof(int16_t)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int n = gd_getdata(D, "data", 5, 0, 1, 0, GD_FLOAT32, c); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + n = gd_getdata(D, "data", 5, 0, 1, 0, GD_FLOAT32, c); + error = gd_error(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/convert_int16_float64.c libgetdata-0.7.1/test/convert_int16_float64.c --- libgetdata-0.7.0/test/convert_int16_float64.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/convert_int16_float64.c 2010-11-27 22:53:09.000000000 +0000 @@ -17,9 +17,10 @@ const char* format = __TEST__ "dirfile/format"; const char* data = __TEST__ "dirfile/data"; const char* format_data = "data RAW INT16 8\n"; - int16_t data_data[256]; + int16_t data_data[256]; double c[8]; - int fd, i, r = 0; + int fd, i, n, error, r = 0; + DIRFILE *D; memset(c, 0, 8); mkdir(filedir, 0777); @@ -35,9 +36,9 @@ write(fd, data_data, 256 * sizeof(int16_t)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int n = gd_getdata(D, "data", 5, 0, 1, 0, GD_FLOAT64, c); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + n = gd_getdata(D, "data", 5, 0, 1, 0, GD_FLOAT64, c); + error = gd_error(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/convert_int16_int32.c libgetdata-0.7.1/test/convert_int16_int32.c --- libgetdata-0.7.0/test/convert_int16_int32.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/convert_int16_int32.c 2010-11-27 22:53:20.000000000 +0000 @@ -16,9 +16,10 @@ const char* format = __TEST__ "dirfile/format"; const char* data = __TEST__ "dirfile/data"; const char* format_data = "data RAW INT16 8\n"; - int16_t data_data[256]; + int16_t data_data[256]; int32_t c[8]; - int fd, i, r = 0; + int fd, i, n, error, r = 0; + DIRFILE *D; memset(c, 0, 8); mkdir(filedir, 0777); @@ -34,9 +35,9 @@ write(fd, data_data, 256 * sizeof(int16_t)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int n = gd_getdata(D, "data", 5, 0, 1, 0, GD_INT32, c); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + n = gd_getdata(D, "data", 5, 0, 1, 0, GD_INT32, c); + error = gd_error(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/convert_int16_int64.c libgetdata-0.7.1/test/convert_int16_int64.c --- libgetdata-0.7.0/test/convert_int16_int64.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/convert_int16_int64.c 2010-11-27 22:54:17.000000000 +0000 @@ -18,7 +18,8 @@ const char* format_data = "data RAW INT16 8\n"; int16_t data_data[256]; int64_t c[8]; - int fd, i, r = 0; + int fd, i, n, error, r = 0; + DIRFILE *D; memset(c, 0, 8); mkdir(filedir, 0777); @@ -34,9 +35,9 @@ write(fd, data_data, 256 * sizeof(int16_t)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int n = gd_getdata(D, "data", 5, 0, 1, 0, GD_INT64, c); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + n = gd_getdata(D, "data", 5, 0, 1, 0, GD_INT64, c); + error = gd_error(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/convert_int16_int8.c libgetdata-0.7.1/test/convert_int16_int8.c --- libgetdata-0.7.0/test/convert_int16_int8.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/convert_int16_int8.c 2010-11-27 22:54:28.000000000 +0000 @@ -18,7 +18,8 @@ const char* format_data = "data RAW INT16 8\n"; int16_t data_data[256]; int8_t c[8]; - int fd, i, r = 0; + int fd, i, n, error, r = 0; + DIRFILE *D; memset(c, 0, 8); mkdir(filedir, 0777); @@ -34,9 +35,9 @@ write(fd, data_data, 256 * sizeof(int16_t)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int n = gd_getdata(D, "data", 5, 0, 1, 0, GD_INT8, c); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + n = gd_getdata(D, "data", 5, 0, 1, 0, GD_INT8, c); + error = gd_error(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/convert_int16_uint16.c libgetdata-0.7.1/test/convert_int16_uint16.c --- libgetdata-0.7.0/test/convert_int16_uint16.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/convert_int16_uint16.c 2010-11-27 22:54:37.000000000 +0000 @@ -18,7 +18,8 @@ const char* format_data = "data RAW INT16 8\n"; int16_t data_data[256]; uint16_t c[8], i; - int fd, r = 0; + int fd, n, error, r = 0; + DIRFILE *D; memset(c, 0, 8); mkdir(filedir, 0777); @@ -34,9 +35,9 @@ write(fd, data_data, 256 * sizeof(int16_t)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int n = gd_getdata(D, "data", 5, 0, 1, 0, GD_UINT16, c); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + n = gd_getdata(D, "data", 5, 0, 1, 0, GD_UINT16, c); + error = gd_error(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/convert_int16_uint32.c libgetdata-0.7.1/test/convert_int16_uint32.c --- libgetdata-0.7.0/test/convert_int16_uint32.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/convert_int16_uint32.c 2010-11-27 22:54:47.000000000 +0000 @@ -18,7 +18,8 @@ const char* format_data = "data RAW INT16 8\n"; int16_t data_data[256]; uint32_t c[8], i; - int fd, r = 0; + int fd, n, error, r = 0; + DIRFILE *D; memset(c, 0, 8); mkdir(filedir, 0777); @@ -34,9 +35,9 @@ write(fd, data_data, 256 * sizeof(int16_t)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int n = gd_getdata(D, "data", 5, 0, 1, 0, GD_UINT32, c); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + n = gd_getdata(D, "data", 5, 0, 1, 0, GD_UINT32, c); + error = gd_error(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/convert_int16_uint64.c libgetdata-0.7.1/test/convert_int16_uint64.c --- libgetdata-0.7.0/test/convert_int16_uint64.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/convert_int16_uint64.c 2010-11-27 22:54:57.000000000 +0000 @@ -18,7 +18,8 @@ const char* format_data = "data RAW INT16 8\n"; int16_t data_data[256]; uint64_t c[8], i; - int fd, r = 0; + int fd, n, error, r = 0; + DIRFILE *D; memset(c, 0, 8); mkdir(filedir, 0777); @@ -34,9 +35,9 @@ write(fd, data_data, 256 * sizeof(int16_t)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int n = gd_getdata(D, "data", 5, 0, 1, 0, GD_UINT64, c); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + n = gd_getdata(D, "data", 5, 0, 1, 0, GD_UINT64, c); + error = gd_error(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/convert_int16_uint8.c libgetdata-0.7.1/test/convert_int16_uint8.c --- libgetdata-0.7.0/test/convert_int16_uint8.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/convert_int16_uint8.c 2010-11-28 00:09:11.000000000 +0000 @@ -17,8 +17,9 @@ const char* data = __TEST__ "dirfile/data"; const char* format_data = "data RAW INT16 8\n"; int16_t data_data[256]; - uint8_t c[8], i; - int fd, r = 0; + uint8_t c[8]; + int fd, i, n, error, r = 0; + DIRFILE *D; memset(c, 0, 8); mkdir(filedir, 0777); @@ -34,9 +35,9 @@ write(fd, data_data, 256 * sizeof(int16_t)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int n = gd_getdata(D, "data", 5, 0, 1, 0, GD_UINT8, c); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + n = gd_getdata(D, "data", 5, 0, 1, 0, GD_UINT8, c); + error = gd_error(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/convert_int32_complex128.c libgetdata-0.7.1/test/convert_int32_complex128.c --- libgetdata-0.7.0/test/convert_int32_complex128.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/convert_int32_complex128.c 2010-11-27 22:56:10.000000000 +0000 @@ -17,13 +17,14 @@ const char* format = __TEST__ "dirfile/format"; const char* data = __TEST__ "dirfile/data"; const char* format_data = "data RAW INT32 8\n"; - int32_t data_data[256]; + int32_t data_data[256]; #ifdef GD_NO_C99_API double c[16]; #else double complex c[8]; #endif - int fd, i, r = 0; + int fd, i, n, error, r = 0; + DIRFILE *D; memset(c, 0, 8); mkdir(filedir, 0777); @@ -39,9 +40,9 @@ write(fd, data_data, 256 * sizeof(int32_t)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int n = gd_getdata(D, "data", 5, 0, 1, 0, GD_COMPLEX128, c); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + n = gd_getdata(D, "data", 5, 0, 1, 0, GD_COMPLEX128, c); + error = gd_error(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/convert_int32_complex64.c libgetdata-0.7.1/test/convert_int32_complex64.c --- libgetdata-0.7.0/test/convert_int32_complex64.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/convert_int32_complex64.c 2010-11-27 22:56:19.000000000 +0000 @@ -23,7 +23,8 @@ #else float complex c[8]; #endif - int fd, i, r = 0; + int fd, i, n, error, r = 0; + DIRFILE *D; memset(c, 0, 8); mkdir(filedir, 0777); @@ -39,9 +40,9 @@ write(fd, data_data, 256 * sizeof(int32_t)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int n = gd_getdata(D, "data", 5, 0, 1, 0, GD_COMPLEX64, c); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + n = gd_getdata(D, "data", 5, 0, 1, 0, GD_COMPLEX64, c); + error = gd_error(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/convert_int32_float32.c libgetdata-0.7.1/test/convert_int32_float32.c --- libgetdata-0.7.0/test/convert_int32_float32.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/convert_int32_float32.c 2010-11-27 22:56:32.000000000 +0000 @@ -19,7 +19,8 @@ const char* format_data = "data RAW INT32 8\n"; int32_t data_data[256]; float c[8]; - int fd, i, r = 0; + int fd, i, n, error, r = 0; + DIRFILE *D; memset(c, 0, 8); mkdir(filedir, 0777); @@ -35,9 +36,9 @@ write(fd, data_data, 256 * sizeof(int32_t)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int n = gd_getdata(D, "data", 5, 0, 1, 0, GD_FLOAT32, c); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + n = gd_getdata(D, "data", 5, 0, 1, 0, GD_FLOAT32, c); + error = gd_error(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/convert_int32_float64.c libgetdata-0.7.1/test/convert_int32_float64.c --- libgetdata-0.7.0/test/convert_int32_float64.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/convert_int32_float64.c 2010-11-27 22:56:38.000000000 +0000 @@ -19,7 +19,8 @@ const char* format_data = "data RAW INT32 8\n"; int32_t data_data[256]; double c[8]; - int fd, i, r = 0; + int fd, i, n, error, r = 0; + DIRFILE *D; memset(c, 0, 8); mkdir(filedir, 0777); @@ -35,9 +36,9 @@ write(fd, data_data, 256 * sizeof(int32_t)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int n = gd_getdata(D, "data", 5, 0, 1, 0, GD_FLOAT64, c); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + n = gd_getdata(D, "data", 5, 0, 1, 0, GD_FLOAT64, c); + error = gd_error(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/convert_int32_int16.c libgetdata-0.7.1/test/convert_int32_int16.c --- libgetdata-0.7.0/test/convert_int32_int16.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/convert_int32_int16.c 2010-11-27 22:56:45.000000000 +0000 @@ -18,7 +18,8 @@ const char* format_data = "data RAW INT32 8\n"; int32_t data_data[256]; int16_t c[8]; - int fd, i, r = 0; + int fd, i, n, error, r = 0; + DIRFILE *D; memset(c, 0, 8); mkdir(filedir, 0777); @@ -34,10 +35,10 @@ write(fd, data_data, 256 * sizeof(int32_t)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int n = gd_getdata(D, "data", 5, 0, 1, 0, GD_INT16, c); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + n = gd_getdata(D, "data", 5, 0, 1, 0, GD_INT16, c); - int error = gd_error(D); + error = gd_error(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/convert_int32_int64.c libgetdata-0.7.1/test/convert_int32_int64.c --- libgetdata-0.7.0/test/convert_int32_int64.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/convert_int32_int64.c 2010-11-27 22:56:52.000000000 +0000 @@ -18,7 +18,8 @@ const char* format_data = "data RAW INT32 8\n"; int32_t data_data[256]; int64_t c[8]; - int fd, i, r = 0; + int fd, i, n, error, r = 0; + DIRFILE *D; memset(c, 0, 8); mkdir(filedir, 0777); @@ -34,10 +35,10 @@ write(fd, data_data, 256 * sizeof(int32_t)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int n = gd_getdata(D, "data", 5, 0, 1, 0, GD_INT64, c); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + n = gd_getdata(D, "data", 5, 0, 1, 0, GD_INT64, c); - int error = gd_error(D); + error = gd_error(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/convert_int32_int8.c libgetdata-0.7.1/test/convert_int32_int8.c --- libgetdata-0.7.0/test/convert_int32_int8.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/convert_int32_int8.c 2010-11-27 22:57:00.000000000 +0000 @@ -18,7 +18,8 @@ const char* format_data = "data RAW INT32 8\n"; int32_t data_data[256]; int8_t c[8]; - int fd, i, r = 0; + int fd, i, n, error, r = 0; + DIRFILE *D; memset(c, 0, 8); mkdir(filedir, 0777); @@ -34,10 +35,10 @@ write(fd, data_data, 256 * sizeof(int32_t)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int n = gd_getdata(D, "data", 5, 0, 1, 0, GD_INT8, c); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + n = gd_getdata(D, "data", 5, 0, 1, 0, GD_INT8, c); - int error = gd_error(D); + error = gd_error(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/convert_int32_uint16.c libgetdata-0.7.1/test/convert_int32_uint16.c --- libgetdata-0.7.0/test/convert_int32_uint16.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/convert_int32_uint16.c 2010-11-28 00:10:04.000000000 +0000 @@ -16,9 +16,10 @@ const char* format = __TEST__ "dirfile/format"; const char* data = __TEST__ "dirfile/data"; const char* format_data = "data RAW INT32 8\n"; - int32_t data_data[256]; - uint16_t c[8], i; - int fd, r = 0; + int32_t data_data[256]; + uint16_t c[8]; + int fd, i, n, error, r = 0; + DIRFILE *D; memset(c, 0, 8); mkdir(filedir, 0777); @@ -34,10 +35,10 @@ write(fd, data_data, 256 * sizeof(int32_t)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int n = gd_getdata(D, "data", 5, 0, 1, 0, GD_UINT16, c); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + n = gd_getdata(D, "data", 5, 0, 1, 0, GD_UINT16, c); - int error = gd_error(D); + error = gd_error(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/convert_int32_uint32.c libgetdata-0.7.1/test/convert_int32_uint32.c --- libgetdata-0.7.0/test/convert_int32_uint32.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/convert_int32_uint32.c 2010-11-28 00:18:11.000000000 +0000 @@ -16,9 +16,10 @@ const char* format = __TEST__ "dirfile/format"; const char* data = __TEST__ "dirfile/data"; const char* format_data = "data RAW INT32 8\n"; - int32_t data_data[256]; - uint32_t c[8], i; - int fd, r = 0; + int32_t data_data[256]; + uint32_t c[8]; + int fd, i, n, error, r = 0; + DIRFILE *D; memset(c, 0, 8); mkdir(filedir, 0777); @@ -34,10 +35,10 @@ write(fd, data_data, 256 * sizeof(int32_t)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int n = gd_getdata(D, "data", 5, 0, 1, 0, GD_UINT32, c); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + n = gd_getdata(D, "data", 5, 0, 1, 0, GD_UINT32, c); - int error = gd_error(D); + error = gd_error(D); gd_close(D); @@ -48,7 +49,7 @@ CHECKI(error, 0); CHECKI(n, 8); for (i = 0; i < 8; ++i) - CHECKUi(i,c[i], 40 + i); + CHECKUi(i,c[i], 40 + (unsigned)i); return r; } diff -Nru libgetdata-0.7.0/test/convert_int32_uint64.c libgetdata-0.7.1/test/convert_int32_uint64.c --- libgetdata-0.7.0/test/convert_int32_uint64.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/convert_int32_uint64.c 2010-11-28 00:18:18.000000000 +0000 @@ -16,9 +16,10 @@ const char* format = __TEST__ "dirfile/format"; const char* data = __TEST__ "dirfile/data"; const char* format_data = "data RAW INT32 8\n"; - int32_t data_data[256]; - uint64_t c[8], i; - int fd, r = 0; + int32_t data_data[256]; + uint64_t c[8]; + int fd, i, n, error, r = 0; + DIRFILE *D; memset(c, 0, 8); mkdir(filedir, 0777); @@ -34,10 +35,10 @@ write(fd, data_data, 256 * sizeof(int32_t)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int n = gd_getdata(D, "data", 5, 0, 1, 0, GD_UINT64, c); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + n = gd_getdata(D, "data", 5, 0, 1, 0, GD_UINT64, c); - int error = gd_error(D); + error = gd_error(D); gd_close(D); @@ -48,7 +49,7 @@ CHECKI(error, 0); CHECKI(n, 8); for (i = 0; i < 8; ++i) - CHECKUi(i,c[i], 40 + i); + CHECKUi(i,c[i], 40 + (unsigned)i); return r; } diff -Nru libgetdata-0.7.0/test/convert_int32_uint8.c libgetdata-0.7.1/test/convert_int32_uint8.c --- libgetdata-0.7.0/test/convert_int32_uint8.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/convert_int32_uint8.c 2010-11-28 00:10:42.000000000 +0000 @@ -16,9 +16,10 @@ const char* format = __TEST__ "dirfile/format"; const char* data = __TEST__ "dirfile/data"; const char* format_data = "data RAW INT32 8\n"; - int32_t data_data[256]; - uint8_t c[8], i; - int fd, r = 0; + int32_t data_data[256]; + uint8_t c[8]; + int fd, i, n, error, r = 0; + DIRFILE *D; memset(c, 0, 8); mkdir(filedir, 0777); @@ -34,10 +35,10 @@ write(fd, data_data, 256 * sizeof(int32_t)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int n = gd_getdata(D, "data", 5, 0, 1, 0, GD_UINT8, c); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + n = gd_getdata(D, "data", 5, 0, 1, 0, GD_UINT8, c); - int error = gd_error(D); + error = gd_error(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/convert_int64_complex128.c libgetdata-0.7.1/test/convert_int64_complex128.c --- libgetdata-0.7.0/test/convert_int64_complex128.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/convert_int64_complex128.c 2010-11-27 22:57:42.000000000 +0000 @@ -23,7 +23,8 @@ #else double complex c[8]; #endif - int fd, i, r = 0; + int fd, i, n, error, r = 0; + DIRFILE *D; memset(c, 0, 8); mkdir(filedir, 0777); @@ -39,9 +40,9 @@ write(fd, data_data, 256 * sizeof(int64_t)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int n = gd_getdata(D, "data", 5, 0, 1, 0, GD_COMPLEX128, c); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + n = gd_getdata(D, "data", 5, 0, 1, 0, GD_COMPLEX128, c); + error = gd_error(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/convert_int64_complex64.c libgetdata-0.7.1/test/convert_int64_complex64.c --- libgetdata-0.7.0/test/convert_int64_complex64.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/convert_int64_complex64.c 2010-11-27 22:57:49.000000000 +0000 @@ -23,7 +23,8 @@ #else float complex c[8]; #endif - int fd, i, r = 0; + int fd, i, n, error, r = 0; + DIRFILE *D; memset(c, 0, 8); mkdir(filedir, 0777); @@ -39,9 +40,9 @@ write(fd, data_data, 256 * sizeof(int64_t)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int n = gd_getdata(D, "data", 5, 0, 1, 0, GD_COMPLEX64, c); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + n = gd_getdata(D, "data", 5, 0, 1, 0, GD_COMPLEX64, c); + error = gd_error(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/convert_int64_float32.c libgetdata-0.7.1/test/convert_int64_float32.c --- libgetdata-0.7.0/test/convert_int64_float32.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/convert_int64_float32.c 2010-11-27 22:57:58.000000000 +0000 @@ -19,7 +19,8 @@ const char* format_data = "data RAW INT64 8\n"; int64_t data_data[256]; float c[8]; - int fd, i, r = 0; + int fd, i, n, error, r = 0; + DIRFILE *D; memset(c, 0, 8); mkdir(filedir, 0777); @@ -35,9 +36,9 @@ write(fd, data_data, 256 * sizeof(int64_t)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int n = gd_getdata(D, "data", 5, 0, 1, 0, GD_FLOAT32, c); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + n = gd_getdata(D, "data", 5, 0, 1, 0, GD_FLOAT32, c); + error = gd_error(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/convert_int64_float64.c libgetdata-0.7.1/test/convert_int64_float64.c --- libgetdata-0.7.0/test/convert_int64_float64.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/convert_int64_float64.c 2010-11-27 22:59:09.000000000 +0000 @@ -19,7 +19,8 @@ const char* format_data = "data RAW INT64 8\n"; int64_t data_data[256]; double c[8]; - int fd, i, r = 0; + int fd, i, n, error, r = 0; + DIRFILE *D; memset(c, 0, 8); mkdir(filedir, 0777); @@ -35,9 +36,9 @@ write(fd, data_data, 256 * sizeof(int64_t)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int n = gd_getdata(D, "data", 5, 0, 1, 0, GD_FLOAT64, c); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + n = gd_getdata(D, "data", 5, 0, 1, 0, GD_FLOAT64, c); + error = gd_error(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/convert_int64_int16.c libgetdata-0.7.1/test/convert_int64_int16.c --- libgetdata-0.7.0/test/convert_int64_int16.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/convert_int64_int16.c 2010-11-27 22:59:17.000000000 +0000 @@ -18,7 +18,8 @@ const char* format_data = "data RAW INT64 8\n"; int64_t data_data[256]; int16_t c[8]; - int fd, i, r = 0; + int fd, i, n, error, r = 0; + DIRFILE *D; memset(c, 0, 8); mkdir(filedir, 0777); @@ -34,10 +35,10 @@ write(fd, data_data, 256 * sizeof(int64_t)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int n = gd_getdata(D, "data", 5, 0, 1, 0, GD_INT16, c); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + n = gd_getdata(D, "data", 5, 0, 1, 0, GD_INT16, c); - int error = gd_error(D); + error = gd_error(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/convert_int64_int32.c libgetdata-0.7.1/test/convert_int64_int32.c --- libgetdata-0.7.0/test/convert_int64_int32.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/convert_int64_int32.c 2010-11-27 22:59:24.000000000 +0000 @@ -18,7 +18,8 @@ const char* format_data = "data RAW INT64 8\n"; int64_t data_data[256]; int32_t c[8]; - int fd, i, r = 0; + int fd, i, n, error, r = 0; + DIRFILE *D; memset(c, 0, 8); mkdir(filedir, 0777); @@ -34,10 +35,10 @@ write(fd, data_data, 256 * sizeof(int64_t)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int n = gd_getdata(D, "data", 5, 0, 1, 0, GD_INT32, c); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + n = gd_getdata(D, "data", 5, 0, 1, 0, GD_INT32, c); - int error = gd_error(D); + error = gd_error(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/convert_int64_int8.c libgetdata-0.7.1/test/convert_int64_int8.c --- libgetdata-0.7.0/test/convert_int64_int8.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/convert_int64_int8.c 2010-11-27 22:59:31.000000000 +0000 @@ -18,7 +18,8 @@ const char* format_data = "data RAW INT64 8\n"; int64_t data_data[256]; int8_t c[8]; - int fd, i, r = 0; + int fd, i, n, error, r = 0; + DIRFILE *D; memset(c, 0, 8); mkdir(filedir, 0777); @@ -34,10 +35,10 @@ write(fd, data_data, 256 * sizeof(int64_t)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int n = gd_getdata(D, "data", 5, 0, 1, 0, GD_INT8, c); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + n = gd_getdata(D, "data", 5, 0, 1, 0, GD_INT8, c); - int error = gd_error(D); + error = gd_error(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/convert_int64_uint16.c libgetdata-0.7.1/test/convert_int64_uint16.c --- libgetdata-0.7.0/test/convert_int64_uint16.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/convert_int64_uint16.c 2010-11-28 00:10:57.000000000 +0000 @@ -16,9 +16,10 @@ const char* format = __TEST__ "dirfile/format"; const char* data = __TEST__ "dirfile/data"; const char* format_data = "data RAW INT64 8\n"; - int64_t data_data[256]; - uint16_t c[8], i; - int fd, r = 0; + int64_t data_data[256]; + uint16_t c[8]; + int fd, i, n, error, r = 0; + DIRFILE *D; memset(c, 0, 8); mkdir(filedir, 0777); @@ -34,10 +35,10 @@ write(fd, data_data, 256 * sizeof(int64_t)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int n = gd_getdata(D, "data", 5, 0, 1, 0, GD_UINT16, c); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + n = gd_getdata(D, "data", 5, 0, 1, 0, GD_UINT16, c); - int error = gd_error(D); + error = gd_error(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/convert_int64_uint32.c libgetdata-0.7.1/test/convert_int64_uint32.c --- libgetdata-0.7.0/test/convert_int64_uint32.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/convert_int64_uint32.c 2010-11-28 00:18:24.000000000 +0000 @@ -16,9 +16,10 @@ const char* format = __TEST__ "dirfile/format"; const char* data = __TEST__ "dirfile/data"; const char* format_data = "data RAW INT64 8\n"; - int64_t data_data[256]; - uint32_t c[8], i; - int fd, r = 0; + int64_t data_data[256]; + uint32_t c[8]; + int fd, i, n, error, r = 0; + DIRFILE *D; memset(c, 0, 8); mkdir(filedir, 0777); @@ -34,10 +35,10 @@ write(fd, data_data, 256 * sizeof(int64_t)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int n = gd_getdata(D, "data", 5, 0, 1, 0, GD_UINT32, c); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + n = gd_getdata(D, "data", 5, 0, 1, 0, GD_UINT32, c); - int error = gd_error(D); + error = gd_error(D); gd_close(D); @@ -48,7 +49,7 @@ CHECKI(error, 0); CHECKI(n, 8); for (i = 0; i < 8; ++i) - CHECKUi(i,c[i], 40 + i); + CHECKUi(i,c[i], 40 + (unsigned)i); return r; } diff -Nru libgetdata-0.7.0/test/convert_int64_uint64.c libgetdata-0.7.1/test/convert_int64_uint64.c --- libgetdata-0.7.0/test/convert_int64_uint64.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/convert_int64_uint64.c 2010-11-28 00:18:29.000000000 +0000 @@ -16,9 +16,10 @@ const char* format = __TEST__ "dirfile/format"; const char* data = __TEST__ "dirfile/data"; const char* format_data = "data RAW INT64 8\n"; - int64_t data_data[256]; - uint64_t c[8], i; - int fd, r = 0; + int64_t data_data[256]; + uint64_t c[8]; + int fd, i, n, error, r = 0; + DIRFILE *D; memset(c, 0, 8); mkdir(filedir, 0777); @@ -34,10 +35,10 @@ write(fd, data_data, 256 * sizeof(int64_t)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int n = gd_getdata(D, "data", 5, 0, 1, 0, GD_UINT64, c); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + n = gd_getdata(D, "data", 5, 0, 1, 0, GD_UINT64, c); - int error = gd_error(D); + error = gd_error(D); gd_close(D); @@ -48,7 +49,7 @@ CHECKI(error, 0); CHECKI(n, 8); for (i = 0; i < 8; ++i) - CHECKUi(i,c[i], 40 + i); + CHECKUi(i,c[i], 40 + (unsigned)i); return r; } diff -Nru libgetdata-0.7.0/test/convert_int64_uint8.c libgetdata-0.7.1/test/convert_int64_uint8.c --- libgetdata-0.7.0/test/convert_int64_uint8.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/convert_int64_uint8.c 2010-11-28 00:11:39.000000000 +0000 @@ -16,9 +16,10 @@ const char* format = __TEST__ "dirfile/format"; const char* data = __TEST__ "dirfile/data"; const char* format_data = "data RAW INT64 8\n"; - int64_t data_data[256]; - uint8_t c[8], i; - int fd, r = 0; + int64_t data_data[256]; + uint8_t c[8]; + int fd, i, n, error, r = 0; + DIRFILE *D; memset(c, 0, 8); mkdir(filedir, 0777); @@ -34,10 +35,10 @@ write(fd, data_data, 256 * sizeof(int64_t)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int n = gd_getdata(D, "data", 5, 0, 1, 0, GD_UINT8, c); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + n = gd_getdata(D, "data", 5, 0, 1, 0, GD_UINT8, c); - int error = gd_error(D); + error = gd_error(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/convert_int8_complex128.c libgetdata-0.7.1/test/convert_int8_complex128.c --- libgetdata-0.7.0/test/convert_int8_complex128.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/convert_int8_complex128.c 2010-11-27 23:00:09.000000000 +0000 @@ -23,7 +23,8 @@ double complex c[8]; #endif int8_t data_data[256]; - int fd, i, r = 0; + int fd, i, n, error, r = 0; + DIRFILE *D; memset(c, 0, 8); mkdir(filedir, 0777); @@ -39,9 +40,9 @@ write(fd, data_data, 256); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int n = gd_getdata(D, "data", 5, 0, 1, 0, GD_COMPLEX128, c); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + n = gd_getdata(D, "data", 5, 0, 1, 0, GD_COMPLEX128, c); + error = gd_error(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/convert_int8_complex64.c libgetdata-0.7.1/test/convert_int8_complex64.c --- libgetdata-0.7.0/test/convert_int8_complex64.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/convert_int8_complex64.c 2010-11-27 23:00:17.000000000 +0000 @@ -23,7 +23,8 @@ float complex c[8]; #endif int8_t data_data[256]; - int fd, i, r = 0; + int fd, i, n, error, r = 0; + DIRFILE *D; memset(c, 0, 8); mkdir(filedir, 0777); @@ -39,9 +40,9 @@ write(fd, data_data, 256); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int n = gd_getdata(D, "data", 5, 0, 1, 0, GD_COMPLEX64, c); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + n = gd_getdata(D, "data", 5, 0, 1, 0, GD_COMPLEX64, c); + error = gd_error(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/convert_int8_float32.c libgetdata-0.7.1/test/convert_int8_float32.c --- libgetdata-0.7.0/test/convert_int8_float32.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/convert_int8_float32.c 2010-11-27 23:00:25.000000000 +0000 @@ -19,7 +19,8 @@ const char* format_data = "data RAW INT8 8\n"; float c[8]; int8_t data_data[256]; - int fd, i, r = 0; + int fd, i, n, error, r = 0; + DIRFILE *D; memset(c, 0, 8); mkdir(filedir, 0777); @@ -35,9 +36,9 @@ write(fd, data_data, 256); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int n = gd_getdata(D, "data", 5, 0, 1, 0, GD_FLOAT32, c); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + n = gd_getdata(D, "data", 5, 0, 1, 0, GD_FLOAT32, c); + error = gd_error(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/convert_int8_float64.c libgetdata-0.7.1/test/convert_int8_float64.c --- libgetdata-0.7.0/test/convert_int8_float64.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/convert_int8_float64.c 2010-11-27 23:00:33.000000000 +0000 @@ -19,7 +19,8 @@ const char* format_data = "data RAW INT8 8\n"; double c[8]; int8_t data_data[256]; - int fd, i, r = 0; + int fd, i, n, error, r = 0; + DIRFILE *D; memset(c, 0, 8); mkdir(filedir, 0777); @@ -35,9 +36,9 @@ write(fd, data_data, 256); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int n = gd_getdata(D, "data", 5, 0, 1, 0, GD_FLOAT64, c); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + n = gd_getdata(D, "data", 5, 0, 1, 0, GD_FLOAT64, c); + error = gd_error(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/convert_int8_int16.c libgetdata-0.7.1/test/convert_int8_int16.c --- libgetdata-0.7.0/test/convert_int8_int16.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/convert_int8_int16.c 2010-11-27 23:01:04.000000000 +0000 @@ -18,7 +18,8 @@ const char* format_data = "data RAW INT8 8\n"; int16_t c[8]; int8_t data_data[256]; - int fd, i, r = 0; + int fd, i, n, error, r = 0; + DIRFILE *D; memset(c, 0, 8); mkdir(filedir, 0777); @@ -34,9 +35,9 @@ write(fd, data_data, 256); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int n = gd_getdata(D, "data", 5, 0, 1, 0, GD_INT16, c); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + n = gd_getdata(D, "data", 5, 0, 1, 0, GD_INT16, c); + error = gd_error(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/convert_int8_int32.c libgetdata-0.7.1/test/convert_int8_int32.c --- libgetdata-0.7.0/test/convert_int8_int32.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/convert_int8_int32.c 2010-11-27 23:01:12.000000000 +0000 @@ -18,7 +18,8 @@ const char* format_data = "data RAW INT8 8\n"; int32_t c[8]; int8_t data_data[256]; - int fd, i, r = 0; + int fd, i, n, error, r = 0; + DIRFILE *D; memset(c, 0, 8); mkdir(filedir, 0777); @@ -34,9 +35,9 @@ write(fd, data_data, 256); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int n = gd_getdata(D, "data", 5, 0, 1, 0, GD_INT32, c); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + n = gd_getdata(D, "data", 5, 0, 1, 0, GD_INT32, c); + error = gd_error(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/convert_int8_int64.c libgetdata-0.7.1/test/convert_int8_int64.c --- libgetdata-0.7.0/test/convert_int8_int64.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/convert_int8_int64.c 2010-11-27 23:01:19.000000000 +0000 @@ -18,7 +18,8 @@ const char* format_data = "data RAW INT8 8\n"; int64_t c[8]; int8_t data_data[256]; - int fd, i, r = 0; + int fd, i, n, error, r = 0; + DIRFILE *D; memset(c, 0, 8); mkdir(filedir, 0777); @@ -34,9 +35,9 @@ write(fd, data_data, 256); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int n = gd_getdata(D, "data", 5, 0, 1, 0, GD_INT64, c); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + n = gd_getdata(D, "data", 5, 0, 1, 0, GD_INT64, c); + error = gd_error(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/convert_int8_uint16.c libgetdata-0.7.1/test/convert_int8_uint16.c --- libgetdata-0.7.0/test/convert_int8_uint16.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/convert_int8_uint16.c 2010-11-28 00:11:52.000000000 +0000 @@ -16,9 +16,10 @@ const char* format = __TEST__ "dirfile/format"; const char* data = __TEST__ "dirfile/data"; const char* format_data = "data RAW INT8 8\n"; - uint16_t c[8], i; + uint16_t c[8]; int8_t data_data[256]; - int fd, r = 0; + int fd, i, n, error, r = 0; + DIRFILE *D; memset(c, 0, 8); mkdir(filedir, 0777); @@ -34,9 +35,9 @@ write(fd, data_data, 256); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int n = gd_getdata(D, "data", 5, 0, 1, 0, GD_UINT16, c); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + n = gd_getdata(D, "data", 5, 0, 1, 0, GD_UINT16, c); + error = gd_error(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/convert_int8_uint32.c libgetdata-0.7.1/test/convert_int8_uint32.c --- libgetdata-0.7.0/test/convert_int8_uint32.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/convert_int8_uint32.c 2010-11-28 06:28:06.000000000 +0000 @@ -16,9 +16,10 @@ const char* format = __TEST__ "dirfile/format"; const char* data = __TEST__ "dirfile/data"; const char* format_data = "data RAW INT8 8\n"; - uint32_t c[8], i; + uint32_t c[8]; int8_t data_data[256]; - int fd, r = 0; + int fd, i, n, error, r = 0; + DIRFILE *D; memset(c, 0, 8); mkdir(filedir, 0777); @@ -34,9 +35,9 @@ write(fd, data_data, 256); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int n = gd_getdata(D, "data", 5, 0, 1, 0, GD_UINT32, c); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + n = gd_getdata(D, "data", 5, 0, 1, 0, GD_UINT32, c); + error = gd_error(D); gd_close(D); @@ -47,7 +48,7 @@ CHECKI(error, 0); CHECKI(n, 8); for (i = 0; i < 8; ++i) - CHECKUi(i,c[i], 40 + i); + CHECKUi(i,c[i], 40 + (unsigned)i); return r; } diff -Nru libgetdata-0.7.0/test/convert_int8_uint64.c libgetdata-0.7.1/test/convert_int8_uint64.c --- libgetdata-0.7.0/test/convert_int8_uint64.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/convert_int8_uint64.c 2010-11-28 00:15:04.000000000 +0000 @@ -18,7 +18,8 @@ const char* format_data = "data RAW INT8 8\n"; uint64_t c[8], i; int8_t data_data[256]; - int fd, r = 0; + int fd, n, error, r = 0; + DIRFILE *D; memset(c, 0, 8); mkdir(filedir, 0777); @@ -34,9 +35,9 @@ write(fd, data_data, 256); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int n = gd_getdata(D, "data", 5, 0, 1, 0, GD_UINT64, c); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + n = gd_getdata(D, "data", 5, 0, 1, 0, GD_UINT64, c); + error = gd_error(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/convert_int8_uint8.c libgetdata-0.7.1/test/convert_int8_uint8.c --- libgetdata-0.7.0/test/convert_int8_uint8.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/convert_int8_uint8.c 2010-11-27 23:02:11.000000000 +0000 @@ -18,7 +18,8 @@ const char* format_data = "data RAW INT8 8\n"; uint8_t c[8], i; int8_t data_data[256]; - int fd, r = 0; + int fd, n, error, r = 0; + DIRFILE *D; memset(c, 0, 8); mkdir(filedir, 0777); @@ -34,9 +35,9 @@ write(fd, data_data, 256); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int n = gd_getdata(D, "data", 5, 0, 1, 0, GD_UINT8, c); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + n = gd_getdata(D, "data", 5, 0, 1, 0, GD_UINT8, c); + error = gd_error(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/convert_uint16_complex128.c libgetdata-0.7.1/test/convert_uint16_complex128.c --- libgetdata-0.7.0/test/convert_uint16_complex128.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/convert_uint16_complex128.c 2010-11-27 23:02:28.000000000 +0000 @@ -23,7 +23,8 @@ #else double complex c[8]; #endif - int fd, i, r = 0; + int fd, i, n, error, r = 0; + DIRFILE *D; memset(c, 0, 8); mkdir(filedir, 0777); @@ -39,9 +40,9 @@ write(fd, data_data, 256 * sizeof(uint16_t)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int n = gd_getdata(D, "data", 5, 0, 1, 0, GD_COMPLEX128, c); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + n = gd_getdata(D, "data", 5, 0, 1, 0, GD_COMPLEX128, c); + error = gd_error(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/convert_uint16_complex64.c libgetdata-0.7.1/test/convert_uint16_complex64.c --- libgetdata-0.7.0/test/convert_uint16_complex64.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/convert_uint16_complex64.c 2010-11-27 23:02:35.000000000 +0000 @@ -23,7 +23,8 @@ #else float complex c[8]; #endif - int fd, i, r = 0; + int fd, i, n, error, r = 0; + DIRFILE *D; memset(c, 0, 8); mkdir(filedir, 0777); @@ -39,9 +40,9 @@ write(fd, data_data, 256 * sizeof(uint16_t)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int n = gd_getdata(D, "data", 5, 0, 1, 0, GD_COMPLEX64, c); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + n = gd_getdata(D, "data", 5, 0, 1, 0, GD_COMPLEX64, c); + error = gd_error(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/convert_uint16_float32.c libgetdata-0.7.1/test/convert_uint16_float32.c --- libgetdata-0.7.0/test/convert_uint16_float32.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/convert_uint16_float32.c 2010-11-27 23:02:42.000000000 +0000 @@ -19,7 +19,8 @@ const char* format_data = "data RAW UINT16 8\n"; uint16_t data_data[256]; float c[8]; - int fd, i, r = 0; + int fd, i, n, error, r = 0; + DIRFILE *D; memset(c, 0, 8); mkdir(filedir, 0777); @@ -35,9 +36,9 @@ write(fd, data_data, 256 * sizeof(uint16_t)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int n = gd_getdata(D, "data", 5, 0, 1, 0, GD_FLOAT32, c); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + n = gd_getdata(D, "data", 5, 0, 1, 0, GD_FLOAT32, c); + error = gd_error(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/convert_uint16_float64.c libgetdata-0.7.1/test/convert_uint16_float64.c --- libgetdata-0.7.0/test/convert_uint16_float64.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/convert_uint16_float64.c 2010-11-27 23:02:50.000000000 +0000 @@ -19,7 +19,8 @@ const char* format_data = "data RAW UINT16 8\n"; uint16_t data_data[256]; double c[8]; - int fd, i, r = 0; + int fd, i, n, error, r = 0; + DIRFILE *D; memset(c, 0, 8); mkdir(filedir, 0777); @@ -35,9 +36,9 @@ write(fd, data_data, 256 * sizeof(uint16_t)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int n = gd_getdata(D, "data", 5, 0, 1, 0, GD_FLOAT64, c); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + n = gd_getdata(D, "data", 5, 0, 1, 0, GD_FLOAT64, c); + error = gd_error(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/convert_uint16_int16.c libgetdata-0.7.1/test/convert_uint16_int16.c --- libgetdata-0.7.0/test/convert_uint16_int16.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/convert_uint16_int16.c 2010-11-27 23:02:58.000000000 +0000 @@ -18,7 +18,8 @@ const char* format_data = "data RAW UINT16 8\n"; uint16_t data_data[256]; int16_t c[8]; - int fd, i, r = 0; + int fd, i, n, error, r = 0; + DIRFILE *D; memset(c, 0, 8); mkdir(filedir, 0777); @@ -34,9 +35,9 @@ write(fd, data_data, 256 * sizeof(uint16_t)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int n = gd_getdata(D, "data", 5, 0, 1, 0, GD_INT16, c); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + n = gd_getdata(D, "data", 5, 0, 1, 0, GD_INT16, c); + error = gd_error(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/convert_uint16_int32.c libgetdata-0.7.1/test/convert_uint16_int32.c --- libgetdata-0.7.0/test/convert_uint16_int32.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/convert_uint16_int32.c 2010-11-27 23:03:04.000000000 +0000 @@ -18,7 +18,8 @@ const char* format_data = "data RAW UINT16 8\n"; uint16_t data_data[256]; int32_t c[8]; - int fd, i, r = 0; + int fd, i, n, error, r = 0; + DIRFILE *D; memset(c, 0, 8); mkdir(filedir, 0777); @@ -34,9 +35,9 @@ write(fd, data_data, 256 * sizeof(uint16_t)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int n = gd_getdata(D, "data", 5, 0, 1, 0, GD_INT32, c); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + n = gd_getdata(D, "data", 5, 0, 1, 0, GD_INT32, c); + error = gd_error(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/convert_uint16_int64.c libgetdata-0.7.1/test/convert_uint16_int64.c --- libgetdata-0.7.0/test/convert_uint16_int64.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/convert_uint16_int64.c 2010-11-27 23:03:11.000000000 +0000 @@ -18,7 +18,8 @@ const char* format_data = "data RAW UINT16 8\n"; uint16_t data_data[256]; int64_t c[8]; - int fd, i, r = 0; + int fd, i, n, error, r = 0; + DIRFILE *D; memset(c, 0, 8); mkdir(filedir, 0777); @@ -34,9 +35,9 @@ write(fd, data_data, 256 * sizeof(uint16_t)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int n = gd_getdata(D, "data", 5, 0, 1, 0, GD_INT64, c); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + n = gd_getdata(D, "data", 5, 0, 1, 0, GD_INT64, c); + error = gd_error(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/convert_uint16_int8.c libgetdata-0.7.1/test/convert_uint16_int8.c --- libgetdata-0.7.0/test/convert_uint16_int8.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/convert_uint16_int8.c 2010-11-27 23:03:18.000000000 +0000 @@ -18,7 +18,8 @@ const char* format_data = "data RAW UINT16 8\n"; uint16_t data_data[256]; int8_t c[8]; - int fd, i, r = 0; + int fd, i, n, error, r = 0; + DIRFILE *D; memset(c, 0, 8); mkdir(filedir, 0777); @@ -34,9 +35,9 @@ write(fd, data_data, 256 * sizeof(uint16_t)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int n = gd_getdata(D, "data", 5, 0, 1, 0, GD_INT8, c); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + n = gd_getdata(D, "data", 5, 0, 1, 0, GD_INT8, c); + error = gd_error(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/convert_uint16_uint32.c libgetdata-0.7.1/test/convert_uint16_uint32.c --- libgetdata-0.7.0/test/convert_uint16_uint32.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/convert_uint16_uint32.c 2010-11-28 00:18:37.000000000 +0000 @@ -17,8 +17,9 @@ const char* data = __TEST__ "dirfile/data"; const char* format_data = "data RAW UINT16 8\n"; uint16_t data_data[256]; - uint32_t c[8], i; - int fd, r = 0; + uint32_t c[8]; + int fd, i, n, error, r = 0; + DIRFILE *D; memset(c, 0, 8); mkdir(filedir, 0777); @@ -34,9 +35,9 @@ write(fd, data_data, 256 * sizeof(uint16_t)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int n = gd_getdata(D, "data", 5, 0, 1, 0, GD_UINT32, c); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + n = gd_getdata(D, "data", 5, 0, 1, 0, GD_UINT32, c); + error = gd_error(D); gd_close(D); @@ -47,7 +48,7 @@ CHECKI(error, 0); CHECKI(n, 8); for (i = 0; i < 8; ++i) - CHECKUi(i,c[i], 40 + i); + CHECKUi(i,c[i], 40 + (unsigned)i); return r; } diff -Nru libgetdata-0.7.0/test/convert_uint16_uint64.c libgetdata-0.7.1/test/convert_uint16_uint64.c --- libgetdata-0.7.0/test/convert_uint16_uint64.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/convert_uint16_uint64.c 2010-11-28 00:18:48.000000000 +0000 @@ -17,8 +17,9 @@ const char* data = __TEST__ "dirfile/data"; const char* format_data = "data RAW UINT16 8\n"; uint16_t data_data[256]; - uint64_t c[8], i; - int fd, r = 0; + uint64_t c[8]; + int fd, i, n, error, r = 0; + DIRFILE *D; memset(c, 0, 8); mkdir(filedir, 0777); @@ -34,9 +35,9 @@ write(fd, data_data, 256 * sizeof(uint16_t)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int n = gd_getdata(D, "data", 5, 0, 1, 0, GD_UINT64, c); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + n = gd_getdata(D, "data", 5, 0, 1, 0, GD_UINT64, c); + error = gd_error(D); gd_close(D); @@ -47,7 +48,7 @@ CHECKI(error, 0); CHECKI(n, 8); for (i = 0; i < 8; ++i) - CHECKUi(i,c[i], 40 + i); + CHECKUi(i,c[i], 40 + (unsigned)i); return r; } diff -Nru libgetdata-0.7.0/test/convert_uint16_uint8.c libgetdata-0.7.1/test/convert_uint16_uint8.c --- libgetdata-0.7.0/test/convert_uint16_uint8.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/convert_uint16_uint8.c 2010-11-27 23:56:45.000000000 +0000 @@ -17,8 +17,9 @@ const char* data = __TEST__ "dirfile/data"; const char* format_data = "data RAW UINT16 8\n"; uint16_t data_data[256]; - uint8_t c[8], i; - int fd, r = 0; + uint8_t c[8]; + int fd, i, n, error, r = 0; + DIRFILE *D; memset(c, 0, 8); mkdir(filedir, 0777); @@ -34,9 +35,9 @@ write(fd, data_data, 256 * sizeof(uint16_t)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int n = gd_getdata(D, "data", 5, 0, 1, 0, GD_UINT8, c); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + n = gd_getdata(D, "data", 5, 0, 1, 0, GD_UINT8, c); + error = gd_error(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/convert_uint32_complex128.c libgetdata-0.7.1/test/convert_uint32_complex128.c --- libgetdata-0.7.0/test/convert_uint32_complex128.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/convert_uint32_complex128.c 2010-11-27 23:56:51.000000000 +0000 @@ -23,7 +23,8 @@ #else double complex c[8]; #endif - int fd, i, r = 0; + int fd, i, n, error, r = 0; + DIRFILE *D; memset(c, 0, 8); mkdir(filedir, 0777); @@ -39,9 +40,9 @@ write(fd, data_data, 256 * sizeof(uint32_t)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int n = gd_getdata(D, "data", 5, 0, 1, 0, GD_COMPLEX128, c); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + n = gd_getdata(D, "data", 5, 0, 1, 0, GD_COMPLEX128, c); + error = gd_error(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/convert_uint32_complex64.c libgetdata-0.7.1/test/convert_uint32_complex64.c --- libgetdata-0.7.0/test/convert_uint32_complex64.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/convert_uint32_complex64.c 2010-11-27 23:56:58.000000000 +0000 @@ -23,7 +23,8 @@ #else float complex c[8]; #endif - int fd, i, r = 0; + int fd, i, n, error, r = 0; + DIRFILE *D; memset(c, 0, 8); mkdir(filedir, 0777); @@ -39,9 +40,9 @@ write(fd, data_data, 256 * sizeof(uint32_t)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int n = gd_getdata(D, "data", 5, 0, 1, 0, GD_COMPLEX64, c); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + n = gd_getdata(D, "data", 5, 0, 1, 0, GD_COMPLEX64, c); + error = gd_error(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/convert_uint32_float32.c libgetdata-0.7.1/test/convert_uint32_float32.c --- libgetdata-0.7.0/test/convert_uint32_float32.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/convert_uint32_float32.c 2010-11-27 23:57:04.000000000 +0000 @@ -19,7 +19,8 @@ const char* format_data = "data RAW UINT32 8\n"; uint32_t data_data[256]; float c[8]; - int fd, i, r = 0; + int fd, i, n, error, r = 0; + DIRFILE *D; memset(c, 0, 8); mkdir(filedir, 0777); @@ -35,9 +36,9 @@ write(fd, data_data, 256 * sizeof(uint32_t)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int n = gd_getdata(D, "data", 5, 0, 1, 0, GD_FLOAT32, c); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + n = gd_getdata(D, "data", 5, 0, 1, 0, GD_FLOAT32, c); + error = gd_error(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/convert_uint32_float64.c libgetdata-0.7.1/test/convert_uint32_float64.c --- libgetdata-0.7.0/test/convert_uint32_float64.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/convert_uint32_float64.c 2010-11-27 23:57:41.000000000 +0000 @@ -19,7 +19,8 @@ const char* format_data = "data RAW UINT32 8\n"; uint32_t data_data[256]; double c[8]; - int fd, i, r = 0; + int fd, i, n, error, r = 0; + DIRFILE *D; memset(c, 0, 8); mkdir(filedir, 0777); @@ -35,9 +36,9 @@ write(fd, data_data, 256 * sizeof(uint32_t)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int n = gd_getdata(D, "data", 5, 0, 1, 0, GD_FLOAT64, c); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + n = gd_getdata(D, "data", 5, 0, 1, 0, GD_FLOAT64, c); + error = gd_error(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/convert_uint32_int16.c libgetdata-0.7.1/test/convert_uint32_int16.c --- libgetdata-0.7.0/test/convert_uint32_int16.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/convert_uint32_int16.c 2010-11-27 23:57:48.000000000 +0000 @@ -18,7 +18,8 @@ const char* format_data = "data RAW UINT32 8\n"; uint32_t data_data[256]; int16_t c[8]; - int fd, i, r = 0; + int fd, i, n, error, r = 0; + DIRFILE *D; memset(c, 0, 8); mkdir(filedir, 0777); @@ -34,10 +35,10 @@ write(fd, data_data, 256 * sizeof(uint32_t)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int n = gd_getdata(D, "data", 5, 0, 1, 0, GD_INT16, c); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + n = gd_getdata(D, "data", 5, 0, 1, 0, GD_INT16, c); - int error = gd_error(D); + error = gd_error(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/convert_uint32_int32.c libgetdata-0.7.1/test/convert_uint32_int32.c --- libgetdata-0.7.0/test/convert_uint32_int32.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/convert_uint32_int32.c 2010-11-27 23:57:54.000000000 +0000 @@ -18,7 +18,8 @@ const char* format_data = "data RAW UINT32 8\n"; uint32_t data_data[256]; int32_t c[8]; - int fd, i, r = 0; + int fd, i, n, error, r = 0; + DIRFILE *D; memset(c, 0, 8); mkdir(filedir, 0777); @@ -34,10 +35,10 @@ write(fd, data_data, 256 * sizeof(uint32_t)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int n = gd_getdata(D, "data", 5, 0, 1, 0, GD_INT32, c); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + n = gd_getdata(D, "data", 5, 0, 1, 0, GD_INT32, c); - int error = gd_error(D); + error = gd_error(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/convert_uint32_int64.c libgetdata-0.7.1/test/convert_uint32_int64.c --- libgetdata-0.7.0/test/convert_uint32_int64.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/convert_uint32_int64.c 2010-11-28 00:19:06.000000000 +0000 @@ -18,7 +18,8 @@ const char* format_data = "data RAW UINT32 8\n"; uint32_t data_data[256]; int64_t c[8]; - int fd, i, r = 0; + int fd, i, n, error, r = 0; + DIRFILE *D; memset(c, 0, 8); mkdir(filedir, 0777); @@ -34,10 +35,10 @@ write(fd, data_data, 256 * sizeof(uint32_t)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int n = gd_getdata(D, "data", 5, 0, 1, 0, GD_INT64, c); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + n = gd_getdata(D, "data", 5, 0, 1, 0, GD_INT64, c); - int error = gd_error(D); + error = gd_error(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/convert_uint32_int8.c libgetdata-0.7.1/test/convert_uint32_int8.c --- libgetdata-0.7.0/test/convert_uint32_int8.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/convert_uint32_int8.c 2010-11-27 23:58:50.000000000 +0000 @@ -18,7 +18,8 @@ const char* format_data = "data RAW UINT32 8\n"; uint32_t data_data[256]; int8_t c[8]; - int fd, i, r = 0; + int fd, i, n, error, r = 0; + DIRFILE *D; memset(c, 0, 8); mkdir(filedir, 0777); @@ -34,10 +35,10 @@ write(fd, data_data, 256 * sizeof(uint32_t)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int n = gd_getdata(D, "data", 5, 0, 1, 0, GD_INT8, c); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + n = gd_getdata(D, "data", 5, 0, 1, 0, GD_INT8, c); - int error = gd_error(D); + error = gd_error(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/convert_uint32_uint16.c libgetdata-0.7.1/test/convert_uint32_uint16.c --- libgetdata-0.7.0/test/convert_uint32_uint16.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/convert_uint32_uint16.c 2010-11-27 23:59:55.000000000 +0000 @@ -17,8 +17,9 @@ const char* data = __TEST__ "dirfile/data"; const char* format_data = "data RAW UINT32 8\n"; uint32_t data_data[256]; - uint16_t c[8], i; - int fd, r = 0; + uint16_t c[8]; + int fd, i, n, error, r = 0; + DIRFILE *D; memset(c, 0, 8); mkdir(filedir, 0777); @@ -34,10 +35,10 @@ write(fd, data_data, 256 * sizeof(uint32_t)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int n = gd_getdata(D, "data", 5, 0, 1, 0, GD_UINT16, c); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + n = gd_getdata(D, "data", 5, 0, 1, 0, GD_UINT16, c); - int error = gd_error(D); + error = gd_error(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/convert_uint32_uint64.c libgetdata-0.7.1/test/convert_uint32_uint64.c --- libgetdata-0.7.0/test/convert_uint32_uint64.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/convert_uint32_uint64.c 2010-11-28 00:19:19.000000000 +0000 @@ -17,8 +17,9 @@ const char* data = __TEST__ "dirfile/data"; const char* format_data = "data RAW UINT32 8\n"; uint32_t data_data[256]; - uint64_t c[8], i; - int fd, r = 0; + uint64_t c[8]; + int fd, i, n, error, r = 0; + DIRFILE *D; memset(c, 0, 8); mkdir(filedir, 0777); @@ -34,10 +35,10 @@ write(fd, data_data, 256 * sizeof(uint32_t)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int n = gd_getdata(D, "data", 5, 0, 1, 0, GD_UINT64, c); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + n = gd_getdata(D, "data", 5, 0, 1, 0, GD_UINT64, c); - int error = gd_error(D); + error = gd_error(D); gd_close(D); @@ -48,7 +49,7 @@ CHECKI(error, 0); CHECKI(n, 8); for (i = 0; i < 8; ++i) - CHECKUi(i,c[i], 40 + i); + CHECKUi(i,c[i], 40 + (unsigned)i); return r; } diff -Nru libgetdata-0.7.0/test/convert_uint32_uint8.c libgetdata-0.7.1/test/convert_uint32_uint8.c --- libgetdata-0.7.0/test/convert_uint32_uint8.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/convert_uint32_uint8.c 2010-11-28 00:00:17.000000000 +0000 @@ -17,8 +17,9 @@ const char* data = __TEST__ "dirfile/data"; const char* format_data = "data RAW UINT32 8\n"; uint32_t data_data[256]; - uint8_t c[8], i; - int fd, r = 0; + uint8_t c[8]; + int fd, i, n, error, r = 0; + DIRFILE *D; memset(c, 0, 8); mkdir(filedir, 0777); @@ -34,10 +35,10 @@ write(fd, data_data, 256 * sizeof(uint32_t)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int n = gd_getdata(D, "data", 5, 0, 1, 0, GD_UINT8, c); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + n = gd_getdata(D, "data", 5, 0, 1, 0, GD_UINT8, c); - int error = gd_error(D); + error = gd_error(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/convert_uint64_complex128.c libgetdata-0.7.1/test/convert_uint64_complex128.c --- libgetdata-0.7.0/test/convert_uint64_complex128.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/convert_uint64_complex128.c 2010-11-28 00:00:24.000000000 +0000 @@ -23,7 +23,8 @@ #else double complex c[8]; #endif - int fd, i, r = 0; + int fd, i, n, error, r = 0; + DIRFILE *D; memset(c, 0, 8); mkdir(filedir, 0777); @@ -39,9 +40,9 @@ write(fd, data_data, 256 * sizeof(uint64_t)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int n = gd_getdata(D, "data", 5, 0, 1, 0, GD_COMPLEX128, c); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + n = gd_getdata(D, "data", 5, 0, 1, 0, GD_COMPLEX128, c); + error = gd_error(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/convert_uint64_complex64.c libgetdata-0.7.1/test/convert_uint64_complex64.c --- libgetdata-0.7.0/test/convert_uint64_complex64.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/convert_uint64_complex64.c 2010-11-28 00:00:32.000000000 +0000 @@ -23,7 +23,8 @@ #else float complex c[8]; #endif - int fd, i, r = 0; + int fd, i, n, error, r = 0; + DIRFILE *D; memset(c, 0, 8); mkdir(filedir, 0777); @@ -39,9 +40,9 @@ write(fd, data_data, 256 * sizeof(uint64_t)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int n = gd_getdata(D, "data", 5, 0, 1, 0, GD_COMPLEX64, c); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + n = gd_getdata(D, "data", 5, 0, 1, 0, GD_COMPLEX64, c); + error = gd_error(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/convert_uint64_float32.c libgetdata-0.7.1/test/convert_uint64_float32.c --- libgetdata-0.7.0/test/convert_uint64_float32.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/convert_uint64_float32.c 2010-11-28 00:00:39.000000000 +0000 @@ -19,7 +19,8 @@ const char* format_data = "data RAW UINT64 8\n"; uint64_t data_data[256]; float c[8]; - int fd, i, r = 0; + int fd, i, n, error, r = 0; + DIRFILE *D; memset(c, 0, 8); mkdir(filedir, 0777); @@ -35,9 +36,9 @@ write(fd, data_data, 256 * sizeof(uint64_t)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int n = gd_getdata(D, "data", 5, 0, 1, 0, GD_FLOAT32, c); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + n = gd_getdata(D, "data", 5, 0, 1, 0, GD_FLOAT32, c); + error = gd_error(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/convert_uint64_float64.c libgetdata-0.7.1/test/convert_uint64_float64.c --- libgetdata-0.7.0/test/convert_uint64_float64.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/convert_uint64_float64.c 2010-11-28 00:00:48.000000000 +0000 @@ -19,7 +19,8 @@ const char* format_data = "data RAW UINT64 8\n"; uint64_t data_data[256]; double c[8]; - int fd, i, r = 0; + int fd, i, n, error, r = 0; + DIRFILE *D; memset(c, 0, 8); mkdir(filedir, 0777); @@ -35,9 +36,9 @@ write(fd, data_data, 256 * sizeof(uint64_t)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int n = gd_getdata(D, "data", 5, 0, 1, 0, GD_FLOAT64, c); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + n = gd_getdata(D, "data", 5, 0, 1, 0, GD_FLOAT64, c); + error = gd_error(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/convert_uint64_int16.c libgetdata-0.7.1/test/convert_uint64_int16.c --- libgetdata-0.7.0/test/convert_uint64_int16.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/convert_uint64_int16.c 2010-11-28 00:00:56.000000000 +0000 @@ -18,7 +18,8 @@ const char* format_data = "data RAW UINT64 8\n"; uint64_t data_data[256]; int16_t c[8]; - int fd, i, r = 0; + int fd, i, n, error, r = 0; + DIRFILE *D; memset(c, 0, 8); mkdir(filedir, 0777); @@ -34,10 +35,10 @@ write(fd, data_data, 256 * sizeof(uint64_t)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int n = gd_getdata(D, "data", 5, 0, 1, 0, GD_INT16, c); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + n = gd_getdata(D, "data", 5, 0, 1, 0, GD_INT16, c); - int error = gd_error(D); + error = gd_error(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/convert_uint64_int32.c libgetdata-0.7.1/test/convert_uint64_int32.c --- libgetdata-0.7.0/test/convert_uint64_int32.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/convert_uint64_int32.c 2010-11-28 00:01:02.000000000 +0000 @@ -18,7 +18,8 @@ const char* format_data = "data RAW UINT64 8\n"; uint64_t data_data[256]; int32_t c[8]; - int fd, i, r = 0; + int fd, i, n, error, r = 0; + DIRFILE *D; memset(c, 0, 8); mkdir(filedir, 0777); @@ -34,10 +35,10 @@ write(fd, data_data, 256 * sizeof(uint64_t)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int n = gd_getdata(D, "data", 5, 0, 1, 0, GD_INT32, c); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + n = gd_getdata(D, "data", 5, 0, 1, 0, GD_INT32, c); - int error = gd_error(D); + error = gd_error(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/convert_uint64_int64.c libgetdata-0.7.1/test/convert_uint64_int64.c --- libgetdata-0.7.0/test/convert_uint64_int64.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/convert_uint64_int64.c 2010-11-28 00:01:09.000000000 +0000 @@ -18,7 +18,8 @@ const char* format_data = "data RAW UINT64 8\n"; uint64_t data_data[256]; int64_t c[8]; - int fd, i, r = 0; + int fd, i, n, error, r = 0; + DIRFILE *D; memset(c, 0, 8); mkdir(filedir, 0777); @@ -34,10 +35,10 @@ write(fd, data_data, 256 * sizeof(uint64_t)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int n = gd_getdata(D, "data", 5, 0, 1, 0, GD_INT64, c); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + n = gd_getdata(D, "data", 5, 0, 1, 0, GD_INT64, c); - int error = gd_error(D); + error = gd_error(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/convert_uint64_int8.c libgetdata-0.7.1/test/convert_uint64_int8.c --- libgetdata-0.7.0/test/convert_uint64_int8.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/convert_uint64_int8.c 2010-11-28 00:01:16.000000000 +0000 @@ -18,7 +18,8 @@ const char* format_data = "data RAW UINT64 8\n"; uint64_t data_data[256]; int8_t c[8]; - int fd, i, r = 0; + int fd, i, n, error, r = 0; + DIRFILE *D; memset(c, 0, 8); mkdir(filedir, 0777); @@ -34,10 +35,10 @@ write(fd, data_data, 256 * sizeof(uint64_t)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int n = gd_getdata(D, "data", 5, 0, 1, 0, GD_INT8, c); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + n = gd_getdata(D, "data", 5, 0, 1, 0, GD_INT8, c); - int error = gd_error(D); + error = gd_error(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/convert_uint64_uint16.c libgetdata-0.7.1/test/convert_uint64_uint16.c --- libgetdata-0.7.0/test/convert_uint64_uint16.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/convert_uint64_uint16.c 2010-11-28 00:19:29.000000000 +0000 @@ -17,8 +17,9 @@ const char* data = __TEST__ "dirfile/data"; const char* format_data = "data RAW UINT64 8\n"; uint64_t data_data[256]; - uint16_t c[8], i; - int fd, r = 0; + uint16_t c[8]; + int fd, i, n, error, r = 0; + DIRFILE *D; memset(c, 0, 8); mkdir(filedir, 0777); @@ -34,10 +35,10 @@ write(fd, data_data, 256 * sizeof(uint64_t)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int n = gd_getdata(D, "data", 5, 0, 1, 0, GD_UINT16, c); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + n = gd_getdata(D, "data", 5, 0, 1, 0, GD_UINT16, c); - int error = gd_error(D); + error = gd_error(D); gd_close(D); @@ -48,7 +49,7 @@ CHECKI(error, 0); CHECKI(n, 8); for (i = 0; i < 8; ++i) - CHECKUi(i,c[i], 40 + i); + CHECKUi(i,c[i], 40 + (unsigned)i); return r; } diff -Nru libgetdata-0.7.0/test/convert_uint64_uint32.c libgetdata-0.7.1/test/convert_uint64_uint32.c --- libgetdata-0.7.0/test/convert_uint64_uint32.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/convert_uint64_uint32.c 2010-11-28 00:21:44.000000000 +0000 @@ -17,8 +17,9 @@ const char* data = __TEST__ "dirfile/data"; const char* format_data = "data RAW UINT64 8\n"; uint64_t data_data[256]; - uint32_t c[8], i; - int fd, r = 0; + uint32_t c[8]; + int fd, i, n, error, r = 0; + DIRFILE *D; memset(c, 0, 8); mkdir(filedir, 0777); @@ -34,10 +35,10 @@ write(fd, data_data, 256 * sizeof(uint64_t)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int n = gd_getdata(D, "data", 5, 0, 1, 0, GD_UINT32, c); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + n = gd_getdata(D, "data", 5, 0, 1, 0, GD_UINT32, c); - int error = gd_error(D); + error = gd_error(D); gd_close(D); @@ -48,7 +49,7 @@ CHECKI(error, 0); CHECKI(n, 8); for (i = 0; i < 8; ++i) - CHECKUi(i,c[i], 40 + i); + CHECKUi(i,c[i], 40 + (unsigned)i); return r; } diff -Nru libgetdata-0.7.0/test/convert_uint64_uint8.c libgetdata-0.7.1/test/convert_uint64_uint8.c --- libgetdata-0.7.0/test/convert_uint64_uint8.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/convert_uint64_uint8.c 2010-11-28 00:03:11.000000000 +0000 @@ -17,8 +17,9 @@ const char* data = __TEST__ "dirfile/data"; const char* format_data = "data RAW UINT64 8\n"; uint64_t data_data[256]; - uint8_t c[8], i; - int fd, r = 0; + uint8_t c[8]; + int fd, i, n, error, r = 0; + DIRFILE *D; memset(c, 0, 8); mkdir(filedir, 0777); @@ -34,10 +35,10 @@ write(fd, data_data, 256 * sizeof(uint64_t)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int n = gd_getdata(D, "data", 5, 0, 1, 0, GD_UINT8, c); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + n = gd_getdata(D, "data", 5, 0, 1, 0, GD_UINT8, c); - int error = gd_error(D); + error = gd_error(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/convert_uint8_complex128.c libgetdata-0.7.1/test/convert_uint8_complex128.c --- libgetdata-0.7.0/test/convert_uint8_complex128.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/convert_uint8_complex128.c 2010-11-28 00:03:18.000000000 +0000 @@ -23,7 +23,8 @@ double complex c[8]; #endif unsigned char data_data[256]; - int fd, i, r = 0; + int fd, i, n, error, r = 0; + DIRFILE *D; memset(c, 0, 8); mkdir(filedir, 0777); @@ -39,9 +40,9 @@ write(fd, data_data, 256); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int n = gd_getdata(D, "data", 5, 0, 1, 0, GD_COMPLEX128, c); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + n = gd_getdata(D, "data", 5, 0, 1, 0, GD_COMPLEX128, c); + error = gd_error(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/convert_uint8_complex64.c libgetdata-0.7.1/test/convert_uint8_complex64.c --- libgetdata-0.7.0/test/convert_uint8_complex64.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/convert_uint8_complex64.c 2010-11-28 00:03:26.000000000 +0000 @@ -23,7 +23,8 @@ float complex c[8]; #endif unsigned char data_data[256]; - int fd, i, r = 0; + int fd, i, n, error, r = 0; + DIRFILE *D; memset(c, 0, 8); mkdir(filedir, 0777); @@ -39,9 +40,9 @@ write(fd, data_data, 256); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int n = gd_getdata(D, "data", 5, 0, 1, 0, GD_COMPLEX64, c); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + n = gd_getdata(D, "data", 5, 0, 1, 0, GD_COMPLEX64, c); + error = gd_error(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/convert_uint8_float32.c libgetdata-0.7.1/test/convert_uint8_float32.c --- libgetdata-0.7.0/test/convert_uint8_float32.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/convert_uint8_float32.c 2010-11-28 00:03:34.000000000 +0000 @@ -19,7 +19,8 @@ const char* format_data = "data RAW UINT8 8\n"; float c[8]; unsigned char data_data[256]; - int fd, i, r = 0; + int fd, i, n, error, r = 0; + DIRFILE *D; memset(c, 0, 8); mkdir(filedir, 0777); @@ -35,9 +36,9 @@ write(fd, data_data, 256); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int n = gd_getdata(D, "data", 5, 0, 1, 0, GD_FLOAT32, c); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + n = gd_getdata(D, "data", 5, 0, 1, 0, GD_FLOAT32, c); + error = gd_error(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/convert_uint8_float64.c libgetdata-0.7.1/test/convert_uint8_float64.c --- libgetdata-0.7.0/test/convert_uint8_float64.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/convert_uint8_float64.c 2010-11-28 00:03:40.000000000 +0000 @@ -19,7 +19,8 @@ const char* format_data = "data RAW UINT8 8\n"; double c[8]; unsigned char data_data[256]; - int fd, i, r = 0; + int fd, i, n, error, r = 0; + DIRFILE *D; memset(c, 0, 8); mkdir(filedir, 0777); @@ -35,9 +36,9 @@ write(fd, data_data, 256); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int n = gd_getdata(D, "data", 5, 0, 1, 0, GD_FLOAT64, c); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + n = gd_getdata(D, "data", 5, 0, 1, 0, GD_FLOAT64, c); + error = gd_error(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/convert_uint8_int16.c libgetdata-0.7.1/test/convert_uint8_int16.c --- libgetdata-0.7.0/test/convert_uint8_int16.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/convert_uint8_int16.c 2010-11-28 00:03:45.000000000 +0000 @@ -18,7 +18,8 @@ const char* format_data = "data RAW UINT8 8\n"; int16_t c[8]; unsigned char data_data[256]; - int fd, i, r = 0; + int fd, i, n, error, r = 0; + DIRFILE *D; memset(c, 0, 8); mkdir(filedir, 0777); @@ -34,9 +35,9 @@ write(fd, data_data, 256); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int n = gd_getdata(D, "data", 5, 0, 1, 0, GD_INT16, c); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + n = gd_getdata(D, "data", 5, 0, 1, 0, GD_INT16, c); + error = gd_error(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/convert_uint8_int32.c libgetdata-0.7.1/test/convert_uint8_int32.c --- libgetdata-0.7.0/test/convert_uint8_int32.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/convert_uint8_int32.c 2010-11-28 00:03:52.000000000 +0000 @@ -18,7 +18,8 @@ const char* format_data = "data RAW UINT8 8\n"; int32_t c[8]; unsigned char data_data[256]; - int fd, i, r = 0; + int fd, i, n, error, r = 0; + DIRFILE *D; memset(c, 0, 8); mkdir(filedir, 0777); @@ -34,9 +35,9 @@ write(fd, data_data, 256); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int n = gd_getdata(D, "data", 5, 0, 1, 0, GD_INT32, c); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + n = gd_getdata(D, "data", 5, 0, 1, 0, GD_INT32, c); + error = gd_error(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/convert_uint8_int64.c libgetdata-0.7.1/test/convert_uint8_int64.c --- libgetdata-0.7.0/test/convert_uint8_int64.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/convert_uint8_int64.c 2010-11-28 00:03:58.000000000 +0000 @@ -18,7 +18,8 @@ const char* format_data = "data RAW UINT8 8\n"; int64_t c[8]; unsigned char data_data[256]; - int fd, i, r = 0; + int fd, i, n, error, r = 0; + DIRFILE *D; memset(c, 0, 8); mkdir(filedir, 0777); @@ -34,9 +35,9 @@ write(fd, data_data, 256); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int n = gd_getdata(D, "data", 5, 0, 1, 0, GD_INT64, c); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + n = gd_getdata(D, "data", 5, 0, 1, 0, GD_INT64, c); + error = gd_error(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/convert_uint8_int8.c libgetdata-0.7.1/test/convert_uint8_int8.c --- libgetdata-0.7.0/test/convert_uint8_int8.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/convert_uint8_int8.c 2010-11-28 00:04:04.000000000 +0000 @@ -18,7 +18,8 @@ const char* format_data = "data RAW UINT8 8\n"; int8_t c[8]; uint8_t data_data[256]; - int fd, i, r = 0; + int fd, i, n, error, r = 0; + DIRFILE *D; memset(c, 0, 8); mkdir(filedir, 0777); @@ -34,9 +35,9 @@ write(fd, data_data, 256); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int n = gd_getdata(D, "data", 5, 0, 1, 0, GD_INT8, c); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + n = gd_getdata(D, "data", 5, 0, 1, 0, GD_INT8, c); + error = gd_error(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/convert_uint8_uint16.c libgetdata-0.7.1/test/convert_uint8_uint16.c --- libgetdata-0.7.0/test/convert_uint8_uint16.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/convert_uint8_uint16.c 2010-11-28 00:04:13.000000000 +0000 @@ -17,9 +17,10 @@ const char* format = __TEST__ "dirfile/format"; const char* data = __TEST__ "dirfile/data"; const char* format_data = "data RAW UINT8 8\n"; - uint16_t c[8], i; + uint16_t c[8]; unsigned char data_data[256]; - int fd, r = 0; + int fd, i, n, error, r = 0; + DIRFILE *D; memset(c, 0, 8); mkdir(filedir, 0777); @@ -35,9 +36,9 @@ write(fd, data_data, 256); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int n = gd_getdata(D, "data", 5, 0, 1, 0, GD_UINT16, c); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + n = gd_getdata(D, "data", 5, 0, 1, 0, GD_UINT16, c); + error = gd_error(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/convert_uint8_uint32.c libgetdata-0.7.1/test/convert_uint8_uint32.c --- libgetdata-0.7.0/test/convert_uint8_uint32.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/convert_uint8_uint32.c 2010-11-28 00:21:50.000000000 +0000 @@ -17,9 +17,10 @@ const char* format = __TEST__ "dirfile/format"; const char* data = __TEST__ "dirfile/data"; const char* format_data = "data RAW UINT8 8\n"; - uint32_t c[8], i; + uint32_t c[8]; unsigned char data_data[256]; - int fd, r = 0; + int fd, i, n, error, r = 0; + DIRFILE *D; memset(c, 0, 8); mkdir(filedir, 0777); @@ -35,9 +36,9 @@ write(fd, data_data, 256); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int n = gd_getdata(D, "data", 5, 0, 1, 0, GD_UINT32, c); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + n = gd_getdata(D, "data", 5, 0, 1, 0, GD_UINT32, c); + error = gd_error(D); gd_close(D); @@ -48,7 +49,7 @@ CHECKI(error, 0); CHECKI(n, 8); for (i = 0; i < 8; ++i) - CHECKUi(i,c[i], 40 + i); + CHECKUi(i,c[i], 40 + (unsigned)i); return r; } diff -Nru libgetdata-0.7.0/test/convert_uint8_uint64.c libgetdata-0.7.1/test/convert_uint8_uint64.c --- libgetdata-0.7.0/test/convert_uint8_uint64.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/convert_uint8_uint64.c 2010-11-28 00:21:56.000000000 +0000 @@ -17,9 +17,10 @@ const char* format = __TEST__ "dirfile/format"; const char* data = __TEST__ "dirfile/data"; const char* format_data = "data RAW UINT8 8\n"; - uint64_t c[8], i; + uint64_t c[8]; unsigned char data_data[256]; - int fd, r = 0; + int fd, i, n, error, r = 0; + DIRFILE *D; memset(c, 0, 8); mkdir(filedir, 0777); @@ -35,9 +36,9 @@ write(fd, data_data, 256); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int n = gd_getdata(D, "data", 5, 0, 1, 0, GD_UINT64, c); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + n = gd_getdata(D, "data", 5, 0, 1, 0, GD_UINT64, c); + error = gd_error(D); gd_close(D); @@ -48,7 +49,7 @@ CHECKI(error, 0); CHECKI(n, 8); for (i = 0; i < 8; ++i) - CHECKUi(i,c[i], 40 + i); + CHECKUi(i,c[i], 40 + (unsigned)i); return r; } diff -Nru libgetdata-0.7.0/test/creat.c libgetdata-0.7.1/test/creat.c --- libgetdata-0.7.0/test/creat.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/creat.c 2010-11-28 00:04:54.000000000 +0000 @@ -13,14 +13,14 @@ { const char* filedir = __TEST__ "dirfile"; const char* format = __TEST__ "dirfile/format"; - int r = 0; + int unlink_ret, rmdir_ret, r = 0; DIRFILE* D = gd_open(filedir, GD_RDWR | GD_CREAT | GD_VERBOSE); int error = gd_error(D); gd_close(D); - int unlink_ret = unlink(format); - int rmdir_ret = rmdir(filedir); + unlink_ret = unlink(format); + rmdir_ret = rmdir(filedir); CHECKI(unlink_ret, 0); CHECKI(rmdir_ret, 0); diff -Nru libgetdata-0.7.0/test/creat_excl.c libgetdata-0.7.1/test/creat_excl.c --- libgetdata-0.7.0/test/creat_excl.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/creat_excl.c 2010-11-28 00:05:05.000000000 +0000 @@ -12,13 +12,14 @@ { const char* filedir = __TEST__ "dirfile"; const char* format = __TEST__ "dirfile/format"; - int r = 0; + int error, r = 0; + DIRFILE *D; mkdir(filedir, 0777); close(open(format, O_CREAT | O_EXCL | O_WRONLY, 0666)); - DIRFILE* D = gd_open(filedir, GD_RDWR | GD_CREAT | GD_EXCL); - int error = gd_error(D); + D = gd_open(filedir, GD_RDWR | GD_CREAT | GD_EXCL); + error = gd_error(D); gd_close(D); unlink(format); diff -Nru libgetdata-0.7.0/test/creat_rdonly.c libgetdata-0.7.1/test/creat_rdonly.c --- libgetdata-0.7.0/test/creat_rdonly.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/creat_rdonly.c 2010-11-28 00:05:17.000000000 +0000 @@ -13,14 +13,14 @@ { const char* filedir = __TEST__ "dirfile"; const char* format = __TEST__ "dirfile/format"; - int r = 0; + int unlink_ret, rmdir_ret, r = 0; DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_CREAT); int error = gd_error(D); gd_close(D); - int unlink_ret = unlink(format); - int rmdir_ret = rmdir(filedir); + unlink_ret = unlink(format); + rmdir_ret = rmdir(filedir); CHECKI(unlink_ret, -1); CHECKI(rmdir_ret, -1); diff -Nru libgetdata-0.7.0/test/cvlist_array.c libgetdata-0.7.1/test/cvlist_array.c --- libgetdata-0.7.0/test/cvlist_array.c 2010-11-01 17:30:45.000000000 +0000 +++ libgetdata-0.7.1/test/cvlist_array.c 2010-11-28 00:06:20.000000000 +0000 @@ -19,12 +19,13 @@ "data2 CARRAY UINT8 2 4 6 8 10 12\n" "data3 CARRAY UINT8 3 6 9 12 15 18 21\n" "data4 RAW UINT8 1\n"; - int fd, r = 0; + int fd, error, r = 0; size_t i; struct uint8_carrays { size_t n; uint8_t *d; - }; + } *field_list; + DIRFILE *D; mkdir(filedir, 0777); @@ -32,11 +33,10 @@ write(fd, format_data, strlen(format_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - const struct uint8_carrays* field_list = (struct uint8_carrays*)gd_carrays(D, - GD_UINT8); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + field_list = (struct uint8_carrays*)gd_carrays(D, GD_UINT8); - int error = gd_error(D); + error = gd_error(D); CHECKI(error, 0); diff -Nru libgetdata-0.7.0/test/cvlist_array_meta.c libgetdata-0.7.1/test/cvlist_array_meta.c --- libgetdata-0.7.0/test/cvlist_array_meta.c 2010-11-01 17:37:08.000000000 +0000 +++ libgetdata-0.7.1/test/cvlist_array_meta.c 2010-11-28 00:06:46.000000000 +0000 @@ -21,11 +21,12 @@ "parent/data3 CARRAY UINT8 3 6 9 12 15 18 21\n" "META parent data4 LINTERP UINT8 1\n"; int fd, r = 0; - size_t i; + size_t i, error; struct uint8_carrays { size_t n; uint8_t *d; - }; + } *field_list; + DIRFILE *D; mkdir(filedir, 0777); @@ -33,11 +34,10 @@ write(fd, format_data, strlen(format_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - const struct uint8_carrays* field_list = - (struct uint8_carrays *)gd_mcarrays(D, "parent", GD_UINT8); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + field_list = (struct uint8_carrays *)gd_mcarrays(D, "parent", GD_UINT8); - int error = gd_error(D); + error = gd_error(D); CHECKI(error, 0); if (!r) diff -Nru libgetdata-0.7.0/test/cvlist.c libgetdata-0.7.1/test/cvlist.c --- libgetdata-0.7.0/test/cvlist.c 2010-11-03 08:46:04.000000000 +0000 +++ libgetdata-0.7.1/test/cvlist.c 2010-11-28 00:05:44.000000000 +0000 @@ -20,7 +20,9 @@ "data2 CONST UINT8 2\n" "data3 CONST UINT8 3\n" "data4 RAW UINT8 1\n"; - int fd, r = 0; + int fd, error, r = 0; + const uint8_t *field_list; + DIRFILE *D; mkdir(filedir, 0777); @@ -28,10 +30,10 @@ write(fd, format_data, strlen(format_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - const uint8_t* field_list = (const uint8_t *)gd_constants(D, GD_UINT8); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + field_list = (const uint8_t *)gd_constants(D, GD_UINT8); - int error = gd_error(D); + error = gd_error(D); CHECKI(error, 0); diff -Nru libgetdata-0.7.0/test/cvlist_meta.c libgetdata-0.7.1/test/cvlist_meta.c --- libgetdata-0.7.0/test/cvlist_meta.c 2010-11-03 08:47:09.000000000 +0000 +++ libgetdata-0.7.1/test/cvlist_meta.c 2010-11-28 00:22:05.000000000 +0000 @@ -20,7 +20,9 @@ "META parent data2 CONST UINT8 2\n" "META parent data3 CONST UINT8 3\n" "META parent data4 LINTERP UINT8 1\n"; - int fd, r = 0; + int fd, error, r = 0; + uint8_t *field_list; + DIRFILE *D; mkdir(filedir, 0777); @@ -28,11 +30,10 @@ write(fd, format_data, strlen(format_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - const uint8_t* field_list = (const uint8_t *)gd_mconstants(D, "parent", - GD_UINT8); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + field_list = (uint8_t *)gd_mconstants(D, "parent", GD_UINT8); - int error = gd_error(D); + error = gd_error(D); CHECKI(error, 0); if (!r) diff -Nru libgetdata-0.7.0/test/del.c libgetdata-0.7.1/test/del.c --- libgetdata-0.7.0/test/del.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/del.c 2010-11-28 00:28:44.000000000 +0000 @@ -18,7 +18,8 @@ const char* format_data = "data RAW UINT8 8\n"; unsigned char c[8]; unsigned char data_data[256]; - int fd, r = 0; + int fd, ret, error1, n, error2, r = 0; + DIRFILE *D; memset(c, 0, 8); mkdir(filedir, 0777); @@ -34,11 +35,11 @@ write(fd, data_data, 256); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDWR); - int ret = gd_delete(D, "data", 0); - int error1 = gd_error(D); - int n = gd_getdata(D, "data", 5, 0, 1, 0, GD_UINT8, c); - int error2 = gd_error(D); + D = gd_open(filedir, GD_RDWR); + ret = gd_delete(D, "data", 0); + error1 = gd_error(D); + n = gd_getdata(D, "data", 5, 0, 1, 0, GD_UINT8, c); + error2 = gd_error(D); gd_close(D); fd = unlink(data); diff -Nru libgetdata-0.7.0/test/del_carray.c libgetdata-0.7.1/test/del_carray.c --- libgetdata-0.7.0/test/del_carray.c 2010-10-31 23:29:25.000000000 +0000 +++ libgetdata-0.7.1/test/del_carray.c 2010-11-28 00:23:00.000000000 +0000 @@ -16,7 +16,8 @@ const char* format = __TEST__ "dirfile/format"; const char* format_data = "data CARRAY UINT8 1 2 3 4\n" "raw RAW UINT8 data<2>\n"; - int fd, r = 0; + int fd, ret, error, r = 0; + DIRFILE *D; mkdir(filedir, 0777); @@ -24,9 +25,9 @@ write(fd, format_data, strlen(format_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDWR); - int ret = gd_delete(D, "data", 0); - int error = gd_error(D); + D = gd_open(filedir, GD_RDWR); + ret = gd_delete(D, "data", 0); + error = gd_error(D); gd_close(D); unlink(format); diff -Nru libgetdata-0.7.0/test/del_carray_deref.c libgetdata-0.7.1/test/del_carray_deref.c --- libgetdata-0.7.0/test/del_carray_deref.c 2010-10-31 23:31:27.000000000 +0000 +++ libgetdata-0.7.1/test/del_carray_deref.c 2010-11-28 00:23:19.000000000 +0000 @@ -16,7 +16,9 @@ const char* format = __TEST__ "dirfile/format"; const char* format_data = "data CARRAY UINT8 13 14 15 16 17\n" "raw RAW UINT8 data<2>\n"; - int fd, r = 0; + int fd, ret, error, r = 0; + DIRFILE *D; + gd_spf_t spf; mkdir(filedir, 0777); @@ -24,10 +26,10 @@ write(fd, format_data, strlen(format_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDWR); - int ret = gd_delete(D, "data", GD_DEL_DEREF); - int error = gd_error(D); - unsigned int spf = gd_spf(D, "raw"); + D = gd_open(filedir, GD_RDWR); + ret = gd_delete(D, "data", GD_DEL_DEREF); + error = gd_error(D); + spf = gd_spf(D, "raw"); gd_close(D); unlink(format); diff -Nru libgetdata-0.7.0/test/del_const.c libgetdata-0.7.1/test/del_const.c --- libgetdata-0.7.0/test/del_const.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/del_const.c 2010-11-28 00:23:36.000000000 +0000 @@ -16,7 +16,8 @@ const char* format = __TEST__ "dirfile/format"; const char* format_data = "data CONST UINT8 1\n" "raw RAW UINT8 data\n"; - int fd, r = 0; + int fd, ret, error, r = 0; + DIRFILE *D; mkdir(filedir, 0777); @@ -24,9 +25,9 @@ write(fd, format_data, strlen(format_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDWR); - int ret = gd_delete(D, "data", 0); - int error = gd_error(D); + D = gd_open(filedir, GD_RDWR); + ret = gd_delete(D, "data", 0); + error = gd_error(D); gd_close(D); unlink(format); diff -Nru libgetdata-0.7.0/test/del_const_deref.c libgetdata-0.7.1/test/del_const_deref.c --- libgetdata-0.7.0/test/del_const_deref.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/del_const_deref.c 2010-11-28 00:29:09.000000000 +0000 @@ -16,7 +16,9 @@ const char* format = __TEST__ "dirfile/format"; const char* format_data = "data CONST UINT8 13\n" "raw RAW UINT8 data\n"; - int fd, r = 0; + int fd, ret, error, r = 0; + gd_spf_t spf; + DIRFILE *D; mkdir(filedir, 0777); @@ -24,10 +26,10 @@ write(fd, format_data, strlen(format_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDWR); - int ret = gd_delete(D, "data", GD_DEL_DEREF); - int error = gd_error(D); - unsigned int spf = gd_spf(D, "raw"); + D = gd_open(filedir, GD_RDWR); + ret = gd_delete(D, "data", GD_DEL_DEREF); + error = gd_error(D); + spf = gd_spf(D, "raw"); gd_close(D); unlink(format); diff -Nru libgetdata-0.7.0/test/del_const_force.c libgetdata-0.7.1/test/del_const_force.c --- libgetdata-0.7.0/test/del_const_force.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/del_const_force.c 2010-11-28 00:24:12.000000000 +0000 @@ -16,7 +16,9 @@ const char* format = __TEST__ "dirfile/format"; const char* format_data = "data CONST UINT8 13\n" "raw RAW UINT8 data\n"; - int fd, r = 0; + int fd, ret, error1, error2, r = 0; + DIRFILE *D; + gd_spf_t spf; mkdir(filedir, 0777); @@ -24,11 +26,11 @@ write(fd, format_data, strlen(format_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDWR); - int ret = gd_delete(D, "data", GD_DEL_FORCE); - int error1 = gd_error(D); - unsigned int spf = gd_spf(D, "raw"); - int error2 = gd_error(D); + D = gd_open(filedir, GD_RDWR); + ret = gd_delete(D, "data", GD_DEL_FORCE); + error1 = gd_error(D); + spf = gd_spf(D, "raw"); + error2 = gd_error(D); gd_close(D); unlink(format); diff -Nru libgetdata-0.7.0/test/del_data.c libgetdata-0.7.1/test/del_data.c --- libgetdata-0.7.0/test/del_data.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/del_data.c 2010-11-28 00:25:41.000000000 +0000 @@ -17,7 +17,8 @@ const char* data = __TEST__ "dirfile/data"; const char* format_data = "data RAW UINT8 8\n"; unsigned char data_data[256]; - int fd, r = 0; + int fd, ret, error1, n, error2, unlink_data, r = 0; + DIRFILE *D; mkdir(filedir, 0777); @@ -32,14 +33,14 @@ write(fd, data_data, 256); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDWR); - int ret = gd_delete(D, "data", GD_DEL_DATA); - int error1 = gd_error(D); - int n = gd_getdata(D, "data", 5, 0, 1, 0, GD_UINT8, data_data); - int error2 = gd_error(D); + D = gd_open(filedir, GD_RDWR); + ret = gd_delete(D, "data", GD_DEL_DATA); + error1 = gd_error(D); + n = gd_getdata(D, "data", 5, 0, 1, 0, GD_UINT8, data_data); + error2 = gd_error(D); gd_close(D); - int unlink_data = unlink(data); + unlink_data = unlink(data); unlink(format); rmdir(filedir); diff -Nru libgetdata-0.7.0/test/del_derived.c libgetdata-0.7.1/test/del_derived.c --- libgetdata-0.7.0/test/del_derived.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/del_derived.c 2010-11-28 00:25:56.000000000 +0000 @@ -15,7 +15,8 @@ const char* filedir = __TEST__ "dirfile"; const char* format = __TEST__ "dirfile/format"; const char* format_data = "data RAW UINT8 8\nlincom LINCOM 1 data 1 0\n"; - int fd, r = 0; + int fd, ret, error, r = 0; + DIRFILE *D; mkdir(filedir, 0777); @@ -23,9 +24,9 @@ write(fd, format_data, strlen(format_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDWR); - int ret = gd_delete(D, "data", 0); - int error = gd_error(D); + D = gd_open(filedir, GD_RDWR); + ret = gd_delete(D, "data", 0); + error = gd_error(D); gd_close(D); unlink(format); diff -Nru libgetdata-0.7.0/test/del_derived_force.c libgetdata-0.7.1/test/del_derived_force.c --- libgetdata-0.7.0/test/del_derived_force.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/del_derived_force.c 2010-11-28 00:26:24.000000000 +0000 @@ -15,7 +15,8 @@ const char* filedir = __TEST__ "dirfile"; const char* format = __TEST__ "dirfile/format"; const char* format_data = "data RAW UINT8 8\nlincom LINCOM 1 data 1 0\n"; - int fd, r = 0; + int fd, ret, error, r = 0; + DIRFILE *D; mkdir(filedir, 0777); @@ -23,9 +24,9 @@ write(fd, format_data, strlen(format_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDWR); - int ret = gd_delete(D, "data", GD_DEL_FORCE); - int error = gd_error(D); + D = gd_open(filedir, GD_RDWR); + ret = gd_delete(D, "data", GD_DEL_FORCE); + error = gd_error(D); gd_close(D); unlink(format); diff -Nru libgetdata-0.7.0/test/del_meta.c libgetdata-0.7.1/test/del_meta.c --- libgetdata-0.7.0/test/del_meta.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/del_meta.c 2010-11-28 00:26:35.000000000 +0000 @@ -21,7 +21,8 @@ "META data b CONST UINT8 4\n" "META data z CONST UINT8 5\n" "META data l CONST UINT8 6\n"; - int fd, r = 0; + int fd, ret, error, r = 0; + DIRFILE *D; mkdir(filedir, 0777); @@ -29,9 +30,9 @@ write(fd, format_data, strlen(format_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDWR); - int ret = gd_delete(D, "data", 0); - int error = gd_error(D); + D = gd_open(filedir, GD_RDWR); + ret = gd_delete(D, "data", 0); + error = gd_error(D); gd_close(D); unlink(format); diff -Nru libgetdata-0.7.0/test/del_meta_force.c libgetdata-0.7.1/test/del_meta_force.c --- libgetdata-0.7.0/test/del_meta_force.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/del_meta_force.c 2010-11-28 00:26:47.000000000 +0000 @@ -22,7 +22,8 @@ "META data z STRING 5\n" "META data l STRING 6\n" "s STRING e\n"; - int fd, r = 0; + int fd, ret, error, nf, r = 0; + DIRFILE *D; mkdir(filedir, 0777); @@ -30,10 +31,10 @@ write(fd, format_data, strlen(format_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDWR); - int ret = gd_delete(D, "data", GD_DEL_META); - int error = gd_error(D); - int nf = gd_nfields(D); + D = gd_open(filedir, GD_RDWR); + ret = gd_delete(D, "data", GD_DEL_META); + error = gd_error(D); + nf = gd_nfields(D); gd_close(D); unlink(format); diff -Nru libgetdata-0.7.0/test/dfes_bit.c libgetdata-0.7.1/test/dfes_bit.c --- libgetdata-0.7.0/test/dfes_bit.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/dfes_bit.c 2010-11-28 00:26:57.000000000 +0000 @@ -15,6 +15,8 @@ const char* format = __TEST__ "dirfile/format"; const char* format_data = "data BIT in 3 2\n"; int fd, r = 0; + DIRFILE *D; + gd_entry_t E; mkdir(filedir, 0777); @@ -22,8 +24,7 @@ write(fd, format_data, strlen(format_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - gd_entry_t E; + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); gd_entry(D, "data", &E); gd_free_entry_strings(&E); diff -Nru libgetdata-0.7.0/test/dfes_divide.c libgetdata-0.7.1/test/dfes_divide.c --- libgetdata-0.7.0/test/dfes_divide.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/dfes_divide.c 2010-11-28 00:27:05.000000000 +0000 @@ -14,6 +14,8 @@ const char* format = __TEST__ "dirfile/format"; const char* format_data = "data DIVIDE e b\n"; int fd; + DIRFILE *D; + gd_entry_t E; mkdir(filedir, 0777); @@ -21,8 +23,7 @@ write(fd, format_data, strlen(format_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - gd_entry_t E; + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); gd_entry(D, "data", &E); gd_free_entry_strings(&E); diff -Nru libgetdata-0.7.0/test/dfes_lincom.c libgetdata-0.7.1/test/dfes_lincom.c --- libgetdata-0.7.0/test/dfes_lincom.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/dfes_lincom.c 2010-11-28 00:27:21.000000000 +0000 @@ -15,6 +15,8 @@ const char* format = __TEST__ "dirfile/format"; const char* format_data = "data LINCOM 2 in1 2 1 in2 2 1\n"; int fd; + DIRFILE *D; + gd_entry_t E; mkdir(filedir, 0777); @@ -22,8 +24,7 @@ write(fd, format_data, strlen(format_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - gd_entry_t E; + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); gd_entry(D, "data", &E); gd_free_entry_strings(&E); diff -Nru libgetdata-0.7.0/test/dfes_linterp.c libgetdata-0.7.1/test/dfes_linterp.c --- libgetdata-0.7.0/test/dfes_linterp.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/dfes_linterp.c 2010-11-28 00:27:39.000000000 +0000 @@ -15,6 +15,8 @@ const char* format = __TEST__ "dirfile/format"; const char* format_data = "data LINTERP in table\n"; int fd; + DIRFILE *D; + gd_entry_t E; mkdir(filedir, 0777); @@ -22,8 +24,7 @@ write(fd, format_data, strlen(format_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - gd_entry_t E; + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); gd_entry(D, "data", &E); gd_free_entry_strings(&E); diff -Nru libgetdata-0.7.0/test/dfes_multiply.c libgetdata-0.7.1/test/dfes_multiply.c --- libgetdata-0.7.0/test/dfes_multiply.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/dfes_multiply.c 2010-11-28 00:27:54.000000000 +0000 @@ -15,6 +15,8 @@ const char* format = __TEST__ "dirfile/format"; const char* format_data = "data MULTIPLY e b\n"; int fd; + DIRFILE *D; + gd_entry_t E; mkdir(filedir, 0777); @@ -22,8 +24,7 @@ write(fd, format_data, strlen(format_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - gd_entry_t E; + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); gd_entry(D, "data", &E); gd_free_entry_strings(&E); diff -Nru libgetdata-0.7.0/test/dfes_phase.c libgetdata-0.7.1/test/dfes_phase.c --- libgetdata-0.7.0/test/dfes_phase.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/dfes_phase.c 2010-11-28 00:28:07.000000000 +0000 @@ -15,6 +15,8 @@ const char* format = __TEST__ "dirfile/format"; const char* format_data = "data PHASE in 8\n"; int fd; + DIRFILE *D; + gd_entry_t E; mkdir(filedir, 0777); @@ -22,8 +24,7 @@ write(fd, format_data, strlen(format_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - gd_entry_t E; + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); gd_entry(D, "data", &E); gd_free_entry_strings(&E); diff -Nru libgetdata-0.7.0/test/dfes_raw.c libgetdata-0.7.1/test/dfes_raw.c --- libgetdata-0.7.0/test/dfes_raw.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/dfes_raw.c 2010-11-28 00:28:14.000000000 +0000 @@ -15,6 +15,8 @@ const char* format = __TEST__ "dirfile/format"; const char* format_data = "data RAW UINT8 8\n"; int fd; + DIRFILE *D; + gd_entry_t E; mkdir(filedir, 0777); @@ -22,8 +24,7 @@ write(fd, format_data, strlen(format_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - gd_entry_t E; + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); gd_entry(D, "data", &E); gd_free_entry_strings(&E); diff -Nru libgetdata-0.7.0/test/dfes_recip.c libgetdata-0.7.1/test/dfes_recip.c --- libgetdata-0.7.0/test/dfes_recip.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/dfes_recip.c 2010-11-28 00:28:21.000000000 +0000 @@ -14,6 +14,8 @@ const char* format = __TEST__ "dirfile/format"; const char* format_data = "data RECIP b e\ne CONST UINT8 3"; int fd; + DIRFILE *D; + gd_entry_t E; mkdir(filedir, 0777); @@ -21,8 +23,7 @@ write(fd, format_data, strlen(format_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - gd_entry_t E; + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); gd_entry(D, "data", &E); gd_free_entry_strings(&E); diff -Nru libgetdata-0.7.0/test/encode_alter.c libgetdata-0.7.1/test/encode_alter.c --- libgetdata-0.7.0/test/encode_alter.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/encode_alter.c 2010-11-28 00:33:58.000000000 +0000 @@ -22,7 +22,9 @@ "0\n1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11\n12\n13\n14\n15\n"; uint16_t data_data[128]; uint16_t c[8]; - int fd, r = 0; + int fd, ret, error, r = 0; + off_t n; + DIRFILE *D; memset(c, 0, 8); mkdir(filedir, 0777); @@ -42,10 +44,10 @@ write(fd, data_data, 256); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDWR | GD_VERBOSE); - int ret = gd_alter_encoding(D, GD_TEXT_ENCODED, 0, 0); - int error = gd_error(D); - off_t n = gd_nframes(D); + D = gd_open(filedir, GD_RDWR | GD_VERBOSE); + ret = gd_alter_encoding(D, GD_TEXT_ENCODED, 0, 0); + error = gd_error(D); + n = gd_nframes(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/encode_get.c libgetdata-0.7.1/test/encode_get.c --- libgetdata-0.7.0/test/encode_get.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/encode_get.c 2010-11-28 00:34:28.000000000 +0000 @@ -17,7 +17,9 @@ const char* data = __TEST__ "dirfile/data"; const char* format_data = "data RAW UINT8 8\nFRAMEOFFSET 13\n"; unsigned char data_data[256]; - int fd, r = 0; + int fd, error, r = 0; + unsigned long n; + DIRFILE *D; mkdir(filedir, 0777); @@ -32,9 +34,9 @@ write(fd, data_data, 256); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - unsigned long n = gd_encoding(D, 0); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + n = gd_encoding(D, 0); + error = gd_error(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/encode_move.c libgetdata-0.7.1/test/encode_move.c --- libgetdata-0.7.0/test/encode_move.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/encode_move.c 2010-11-28 00:34:53.000000000 +0000 @@ -20,7 +20,8 @@ const char* format_data = "data RAW UINT16 8\nENCODING none\n"; uint16_t data_data[128]; uint16_t c[8]; - int fd, i, r = 0; + int fd, i, ret, error, n, unlink_txtdata, unlink_data, r = 0; + DIRFILE *D; memset(c, 0, 8); mkdir(filedir, 0777); @@ -36,15 +37,15 @@ write(fd, data_data, 256); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDWR | GD_VERBOSE); - int ret = gd_alter_encoding(D, GD_TEXT_ENCODED, 0, 1); - int error = gd_error(D); - int n = gd_getdata(D, "data", 5, 0, 1, 0, GD_UINT16, c); + D = gd_open(filedir, GD_RDWR | GD_VERBOSE); + ret = gd_alter_encoding(D, GD_TEXT_ENCODED, 0, 1); + error = gd_error(D); + n = gd_getdata(D, "data", 5, 0, 1, 0, GD_UINT16, c); gd_close(D); - int unlink_txtdata = unlink(txtdata); - int unlink_data = unlink(data); + unlink_txtdata = unlink(txtdata); + unlink_data = unlink(data); unlink(format); rmdir(filedir); diff -Nru libgetdata-0.7.0/test/endian_alter.c libgetdata-0.7.1/test/endian_alter.c --- libgetdata-0.7.0/test/endian_alter.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/endian_alter.c 2010-11-28 00:35:19.000000000 +0000 @@ -20,8 +20,8 @@ const char* format_data = "data RAW UINT16 8\nENDIAN little\n"; uint16_t data_data[128]; uint16_t c[8], d; - int fd; - int r = 0; + int fd, ret, error, n, i = 0, r = 0; + DIRFILE *D; memset(c, 0, 8); mkdir(filedir, 0777); @@ -37,15 +37,14 @@ write(fd, data_data, 256); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDWR | GD_VERBOSE); - int ret = gd_alter_endianness(D, GD_BIG_ENDIAN, 0, 0); - int error = gd_error(D); - int n = gd_getdata(D, "data", 5, 0, 1, 0, GD_UINT16, c); + D = gd_open(filedir, GD_RDWR | GD_VERBOSE); + ret = gd_alter_endianness(D, GD_BIG_ENDIAN, 0, 0); + error = gd_error(D); + n = gd_getdata(D, "data", 5, 0, 1, 0, GD_UINT16, c); gd_close(D); fd = open(data, O_RDONLY | O_BINARY); - int i = 0; if (fd >= 0) { while (read(fd, &d, sizeof(uint16_t))) { diff -Nru libgetdata-0.7.0/test/endian_get.c libgetdata-0.7.1/test/endian_get.c --- libgetdata-0.7.0/test/endian_get.c 2010-10-21 02:38:33.000000000 +0000 +++ libgetdata-0.7.1/test/endian_get.c 2010-11-28 00:35:45.000000000 +0000 @@ -22,7 +22,9 @@ const char* format_data1 = "ENDIAN big\nINCLUDE format2\n"; const char* format_data2 = "ENDIAN big arm\nINCLUDE format3\n"; const char* format_data3 = "ENDIAN little arm\n"; - int fd, r = 0; + int fd, error, r = 0; + unsigned long n, m, l, k; + DIRFILE *D; mkdir(filedir, 0777); @@ -42,12 +44,12 @@ write(fd, format_data3, strlen(format_data3)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - unsigned long n = gd_endianness(D, 0); - unsigned long m = gd_endianness(D, 1); - unsigned long l = gd_endianness(D, 2); - unsigned long k = gd_endianness(D, 3); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + n = gd_endianness(D, 0); + m = gd_endianness(D, 1); + l = gd_endianness(D, 2); + k = gd_endianness(D, 3); + error = gd_error(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/endian_move.c libgetdata-0.7.1/test/endian_move.c --- libgetdata-0.7.0/test/endian_move.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/endian_move.c 2010-11-28 00:36:03.000000000 +0000 @@ -20,8 +20,8 @@ const char* format_data = "data RAW UINT16 8\nENDIAN little\n"; uint16_t data_data[128]; uint16_t c[8], d; - int fd; - int r = 0; + int fd, ret, error, n, i = 0, r = 0; + DIRFILE *D; memset(c, 0, 8); mkdir(filedir, 0777); @@ -37,15 +37,14 @@ write(fd, data_data, 256); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDWR | GD_VERBOSE); - int ret = gd_alter_endianness(D, GD_BIG_ENDIAN, 0, 1); - int error = gd_error(D); - int n = gd_getdata(D, "data", 5, 0, 1, 0, GD_UINT16, c); + D = gd_open(filedir, GD_RDWR | GD_VERBOSE); + ret = gd_alter_endianness(D, GD_BIG_ENDIAN, 0, 1); + error = gd_error(D); + n = gd_getdata(D, "data", 5, 0, 1, 0, GD_UINT16, c); gd_close(D); fd = open(data, O_RDONLY | O_BINARY); - int i = 0; if (fd >= 0) { while (read(fd, &d, sizeof(uint16_t))) { diff -Nru libgetdata-0.7.0/test/entry_bad_code.c libgetdata-0.7.1/test/entry_bad_code.c --- libgetdata-0.7.0/test/entry_bad_code.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/entry_bad_code.c 2010-11-28 00:36:17.000000000 +0000 @@ -14,7 +14,9 @@ const char* filedir = __TEST__ "dirfile"; const char* format = __TEST__ "dirfile/format"; const char* format_data = "data RAW UINT8 8\n"; - int fd, r = 0; + int fd, n, error, r = 0; + DIRFILE *D; + gd_entry_t E; mkdir(filedir, 0777); @@ -22,11 +24,10 @@ write(fd, format_data, strlen(format_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY); - gd_entry_t E; + D = gd_open(filedir, GD_RDONLY); - int n = gd_entry(D, "not a field", &E); - int error = gd_error(D); + n = gd_entry(D, "not a field", &E); + error = gd_error(D); gd_close(D); unlink(format); diff -Nru libgetdata-0.7.0/test/entry_bit.c libgetdata-0.7.1/test/entry_bit.c --- libgetdata-0.7.0/test/entry_bit.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/entry_bit.c 2010-11-28 00:36:30.000000000 +0000 @@ -15,7 +15,9 @@ const char* filedir = __TEST__ "dirfile"; const char* format = __TEST__ "dirfile/format"; const char* format_data = "data BIT in1 3 4\n"; - int fd, r = 0; + int fd, n, error, r = 0; + DIRFILE *D; + gd_entry_t E; mkdir(filedir, 0777); @@ -23,11 +25,10 @@ write(fd, format_data, strlen(format_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - gd_entry_t E; + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int n = gd_entry(D, "data", &E); - int error = gd_error(D); + n = gd_entry(D, "data", &E); + error = gd_error(D); gd_close(D); unlink(format); @@ -42,6 +43,7 @@ CHECKI(E.EN(bit,numbits), 4); CHECKP(E.scalar[0]); CHECKP(E.scalar[1]); + gd_free_entry_strings(&E); return r; } diff -Nru libgetdata-0.7.0/test/entry_bit_scalar.c libgetdata-0.7.1/test/entry_bit_scalar.c --- libgetdata-0.7.0/test/entry_bit_scalar.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/entry_bit_scalar.c 2010-11-28 00:36:45.000000000 +0000 @@ -18,7 +18,9 @@ "bitnum CONST UINT8 3\n" "numbits CONST UINT8 4\n" "data BIT in1 bitnum numbits\n"; - int fd, r = 0; + int fd, n, error, r = 0; + DIRFILE *D; + gd_entry_t E; mkdir(filedir, 0777); @@ -26,11 +28,10 @@ write(fd, format_data, strlen(format_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - gd_entry_t E; + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int n = gd_entry(D, "data", &E); - int error = gd_error(D); + n = gd_entry(D, "data", &E); + error = gd_error(D); gd_close(D); unlink(format); @@ -43,6 +44,7 @@ CHECKS(E.in_fields[0], "in1"); CHECKI(E.EN(bit,bitnum), 3); CHECKI(E.EN(bit,numbits), 4); + gd_free_entry_strings(&E); return r; } diff -Nru libgetdata-0.7.0/test/entry_lincom.c libgetdata-0.7.1/test/entry_lincom.c --- libgetdata-0.7.0/test/entry_lincom.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/entry_lincom.c 2010-11-28 00:37:01.000000000 +0000 @@ -15,7 +15,9 @@ const char* filedir = __TEST__ "dirfile"; const char* format = __TEST__ "dirfile/format"; const char* format_data = "data LINCOM 3 in1 1 2 in2 3 4 in3 5 6\n"; - int fd, r = 0; + int fd, n, error, r = 0; + DIRFILE *D; + gd_entry_t E; mkdir(filedir, 0777); @@ -23,11 +25,10 @@ write(fd, format_data, strlen(format_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - gd_entry_t E; + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int n = gd_entry(D, "data", &E); - int error = gd_error(D); + n = gd_entry(D, "data", &E); + error = gd_error(D); gd_close(D); unlink(format); @@ -48,6 +49,7 @@ CHECKF(E.EN(lincom,b)[1], 4.); CHECKF(E.EN(lincom,m)[2], 5.); CHECKF(E.EN(lincom,b)[2], 6.); + gd_free_entry_strings(&E); return r; } diff -Nru libgetdata-0.7.0/test/entry_lincom_scalar.c libgetdata-0.7.1/test/entry_lincom_scalar.c --- libgetdata-0.7.0/test/entry_lincom_scalar.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/entry_lincom_scalar.c 2010-11-28 00:37:24.000000000 +0000 @@ -23,7 +23,9 @@ "m3 CONST FLOAT64 5\n" "b3 CONST FLOAT64 6\n" "data LINCOM 3 in1 m1 b1 in2 m2 b2 in3 m3 b3\n"; - int fd, r = 0; + int fd, n, error, r = 0; + DIRFILE *D; + gd_entry_t E; mkdir(filedir, 0777); @@ -31,11 +33,10 @@ write(fd, format_data, strlen(format_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - gd_entry_t E; + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int n = gd_entry(D, "data", &E); - int error = gd_error(D); + n = gd_entry(D, "data", &E); + error = gd_error(D); gd_close(D); unlink(format); @@ -61,6 +62,7 @@ CHECKF(E.EN(lincom,b)[1], 4.); CHECKF(E.EN(lincom,m)[2], 5.); CHECKF(E.EN(lincom,b)[2], 6.); + gd_free_entry_strings(&E); return r; } diff -Nru libgetdata-0.7.0/test/entry_linterp.c libgetdata-0.7.1/test/entry_linterp.c --- libgetdata-0.7.0/test/entry_linterp.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/entry_linterp.c 2010-11-28 00:37:38.000000000 +0000 @@ -14,7 +14,9 @@ const char* filedir = __TEST__ "dirfile"; const char* format = __TEST__ "dirfile/format"; const char* format_data = "data LINTERP in1 ../tablefile\n"; - int fd, r = 0; + int fd, n, error, r = 0; + DIRFILE *D; + gd_entry_t E; mkdir(filedir, 0777); @@ -22,11 +24,10 @@ write(fd, format_data, strlen(format_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - gd_entry_t E; + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int n = gd_entry(D, "data", &E); - int error = gd_error(D); + n = gd_entry(D, "data", &E); + error = gd_error(D); gd_close(D); unlink(format); @@ -38,6 +39,7 @@ CHECKI(E.field_type, GD_LINTERP_ENTRY); CHECKS(E.in_fields[0], "in1"); CHECKS(E.EN(linterp,table), "../tablefile"); + gd_free_entry_strings(&E); return r; } diff -Nru libgetdata-0.7.0/test/entry_multiply.c libgetdata-0.7.1/test/entry_multiply.c --- libgetdata-0.7.0/test/entry_multiply.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/entry_multiply.c 2010-11-28 00:44:05.000000000 +0000 @@ -14,7 +14,9 @@ const char* filedir = __TEST__ "dirfile"; const char* format = __TEST__ "dirfile/format"; const char* format_data = "data MULTIPLY in1 in2\n"; - int fd, r = 0; + int fd, n, error, r = 0; + DIRFILE *D; + gd_entry_t E; mkdir(filedir, 0777); @@ -22,11 +24,10 @@ write(fd, format_data, strlen(format_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - gd_entry_t E; + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int n = gd_entry(D, "data", &E); - int error = gd_error(D); + n = gd_entry(D, "data", &E); + error = gd_error(D); gd_close(D); unlink(format); @@ -38,6 +39,7 @@ CHECKX(E.field_type, GD_MULTIPLY_ENTRY); CHECKS(E.in_fields[0], "in1"); CHECKS(E.in_fields[1], "in2"); + gd_free_entry_strings(&E); return r; } diff -Nru libgetdata-0.7.0/test/entry_phase.c libgetdata-0.7.1/test/entry_phase.c --- libgetdata-0.7.0/test/entry_phase.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/entry_phase.c 2010-11-28 00:38:06.000000000 +0000 @@ -14,7 +14,9 @@ const char* filedir = __TEST__ "dirfile"; const char* format = __TEST__ "dirfile/format"; const char* format_data = "data PHASE in1 3\n"; - int fd, r = 0; + int fd, n, error, r = 0; + DIRFILE *D; + gd_entry_t E; mkdir(filedir, 0777); @@ -22,11 +24,10 @@ write(fd, format_data, strlen(format_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - gd_entry_t E; + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int n = gd_entry(D, "data", &E); - int error = gd_error(D); + n = gd_entry(D, "data", &E); + error = gd_error(D); gd_close(D); unlink(format); @@ -38,6 +39,7 @@ CHECKX(E.field_type, GD_PHASE_ENTRY); CHECKS(E.in_fields[0], "in1"); CHECKI(E.EN(phase,shift), 3); + gd_free_entry_strings(&E); return 0; } diff -Nru libgetdata-0.7.0/test/entry_phase_scalar.c libgetdata-0.7.1/test/entry_phase_scalar.c --- libgetdata-0.7.0/test/entry_phase_scalar.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/entry_phase_scalar.c 2010-11-28 00:38:19.000000000 +0000 @@ -15,7 +15,9 @@ const char* filedir = __TEST__ "dirfile"; const char* format = __TEST__ "dirfile/format"; const char* format_data = "shift CONST UINT8 3\ndata PHASE in1 shift\n"; - int fd, r = 0; + int fd, n, error, r = 0; + DIRFILE *D; + gd_entry_t E; mkdir(filedir, 0777); @@ -23,11 +25,10 @@ write(fd, format_data, strlen(format_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - gd_entry_t E; + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int n = gd_entry(D, "data", &E); - int error = gd_error(D); + n = gd_entry(D, "data", &E); + error = gd_error(D); gd_close(D); unlink(format); @@ -40,6 +41,7 @@ CHECKS(E.in_fields[0], "in1"); CHECKS(E.scalar[0], "shift"); CHECKI(E.EN(phase,shift), 3); + gd_free_entry_strings(&E); return r; } diff -Nru libgetdata-0.7.0/test/entry_polynom.c libgetdata-0.7.1/test/entry_polynom.c --- libgetdata-0.7.0/test/entry_polynom.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/entry_polynom.c 2010-11-28 00:38:31.000000000 +0000 @@ -15,7 +15,9 @@ const char* filedir = __TEST__ "dirfile"; const char* format = __TEST__ "dirfile/format"; const char* format_data = "data POLYNOM in 1 2 3 4 5\n"; - int fd, r = 0; + int fd, n, error, r = 0; + DIRFILE *D; + gd_entry_t E; mkdir(filedir, 0777); @@ -23,11 +25,10 @@ write(fd, format_data, strlen(format_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - gd_entry_t E; + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int n = gd_entry(D, "data", &E); - int error = gd_error(D); + n = gd_entry(D, "data", &E); + error = gd_error(D); gd_close(D); unlink(format); @@ -42,6 +43,7 @@ CHECKS(E.in_fields[0], "in"); for (fd = 0; fd < 4; ++fd) CHECKFi(fd,E.EN(polynom,a)[fd], fd + 1.); + gd_free_entry_strings(&E); return r; } diff -Nru libgetdata-0.7.0/test/entry_polynom_scalar.c libgetdata-0.7.1/test/entry_polynom_scalar.c --- libgetdata-0.7.0/test/entry_polynom_scalar.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/entry_polynom_scalar.c 2010-11-28 00:38:42.000000000 +0000 @@ -22,7 +22,9 @@ "a3 CONST FLOAT64 4\n" "a4 CONST FLOAT64 5\n" "data POLYNOM in a0 a1 a2 a3 a4\n"; - int fd, r = 0; + int fd, n, error, r = 0; + DIRFILE *D; + gd_entry_t E; mkdir(filedir, 0777); @@ -30,11 +32,10 @@ write(fd, format_data, strlen(format_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - gd_entry_t E; + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int n = gd_entry(D, "data", &E); - int error = gd_error(D); + n = gd_entry(D, "data", &E); + error = gd_error(D); gd_close(D); unlink(format); @@ -54,6 +55,7 @@ CHECKS(E.scalar[4], "a4"); for (fd = 0; fd < 4; ++fd) CHECKFi(fd,E.EN(polynom,a)[fd], fd + 1.); + gd_free_entry_strings(&E); return r; } diff -Nru libgetdata-0.7.0/test/entry_raw.c libgetdata-0.7.1/test/entry_raw.c --- libgetdata-0.7.0/test/entry_raw.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/entry_raw.c 2010-11-28 00:38:54.000000000 +0000 @@ -14,7 +14,9 @@ const char* filedir = __TEST__ "dirfile"; const char* format = __TEST__ "dirfile/format"; const char* format_data = "data RAW UINT8 8\n"; - int fd, r = 0; + int fd, n, error, r = 0; + DIRFILE *D; + gd_entry_t E; mkdir(filedir, 0777); @@ -22,11 +24,10 @@ write(fd, format_data, strlen(format_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - gd_entry_t E; + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int n = gd_entry(D, "data", &E); - int error = gd_error(D); + n = gd_entry(D, "data", &E); + error = gd_error(D); gd_close(D); unlink(format); @@ -38,6 +39,7 @@ CHECKI(E.field_type, GD_RAW_ENTRY); CHECKU(E.EN(raw,spf), 8); CHECKX(E.EN(raw,data_type), GD_UINT8); + gd_free_entry_strings(&E); return r; } diff -Nru libgetdata-0.7.0/test/entry_raw_scalar.c libgetdata-0.7.1/test/entry_raw_scalar.c --- libgetdata-0.7.0/test/entry_raw_scalar.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/entry_raw_scalar.c 2010-11-28 00:39:06.000000000 +0000 @@ -15,7 +15,9 @@ const char* filedir = __TEST__ "dirfile"; const char* format = __TEST__ "dirfile/format"; const char* format_data = "const CONST UINT32 8\ndata RAW UINT8 const\n"; - int fd, r = 0; + int fd, n, error, r = 0; + DIRFILE *D; + gd_entry_t E; mkdir(filedir, 0777); @@ -23,11 +25,10 @@ write(fd, format_data, strlen(format_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - gd_entry_t E; + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int n = gd_entry(D, "data", &E); - int error = gd_error(D); + n = gd_entry(D, "data", &E); + error = gd_error(D); gd_close(D); unlink(format); @@ -40,6 +41,7 @@ CHECKS(E.scalar[0], "const"); CHECKU(E.EN(raw,spf), 8); CHECKX(E.EN(raw,data_type), GD_UINT8); + gd_free_entry_strings(&E); return r; } diff -Nru libgetdata-0.7.0/test/entry_raw_scalar_code.c libgetdata-0.7.1/test/entry_raw_scalar_code.c --- libgetdata-0.7.0/test/entry_raw_scalar_code.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/entry_raw_scalar_code.c 2010-11-28 00:39:18.000000000 +0000 @@ -14,7 +14,9 @@ const char* filedir = __TEST__ "dirfile"; const char* format = __TEST__ "dirfile/format"; const char* format_data = "data RAW UINT8 const\n"; - int fd, r = 0; + int fd, n, error, r = 0; + DIRFILE *D; + gd_entry_t E; mkdir(filedir, 0777); @@ -22,11 +24,10 @@ write(fd, format_data, strlen(format_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY); - gd_entry_t E; + D = gd_open(filedir, GD_RDONLY); - int n = gd_entry(D, "data", &E); - int error = gd_error(D); + n = gd_entry(D, "data", &E); + error = gd_error(D); gd_close(D); unlink(format); diff -Nru libgetdata-0.7.0/test/entry_raw_scalar_type.c libgetdata-0.7.1/test/entry_raw_scalar_type.c --- libgetdata-0.7.0/test/entry_raw_scalar_type.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/entry_raw_scalar_type.c 2010-11-28 00:39:38.000000000 +0000 @@ -14,7 +14,9 @@ const char* filedir = __TEST__ "dirfile"; const char* format = __TEST__ "dirfile/format"; const char* format_data = "const RAW UINT32 8\ndata RAW UINT8 const\n"; - int fd, r = 0; + int fd, n, error, r = 0; + DIRFILE *D; + gd_entry_t E; mkdir(filedir, 0777); @@ -22,11 +24,10 @@ write(fd, format_data, strlen(format_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY); - gd_entry_t E; + D = gd_open(filedir, GD_RDONLY); - int n = gd_entry(D, "data", &E); - int error = gd_error(D); + n = gd_entry(D, "data", &E); + error = gd_error(D); gd_close(D); unlink(format); diff -Nru libgetdata-0.7.0/test/entry_scalar_repr.c libgetdata-0.7.1/test/entry_scalar_repr.c --- libgetdata-0.7.0/test/entry_scalar_repr.c 2010-10-30 00:25:14.000000000 +0000 +++ libgetdata-0.7.1/test/entry_scalar_repr.c 2010-11-28 00:40:21.000000000 +0000 @@ -19,7 +19,9 @@ "m1 CONST COMPLEX128 1.1;3.2\n" "b1 CONST COMPLEX64 2.2;9.3\n" "data LINCOM 1 in1 m1.r b1.i\n"; - int fd, r = 0; + int fd, n, error, r = 0; + DIRFILE *D; + gd_entry_t E; mkdir(filedir, 0777); @@ -27,11 +29,10 @@ write(fd, format_data, strlen(format_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - gd_entry_t E; + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int n = gd_entry(D, "data", &E); - int error = gd_error(D); + n = gd_entry(D, "data", &E); + error = gd_error(D); gd_close(D); unlink(format); @@ -47,6 +48,7 @@ CHECKS(E.scalar[GD_MAX_LINCOM], "b1.i"); CHECKF(E.EN(lincom,m)[0], 1.1); CHECKF(E.EN(lincom,b)[0], 9.3); + gd_free_entry_strings(&E); return r; } diff -Nru libgetdata-0.7.0/test/entry_type.c libgetdata-0.7.1/test/entry_type.c --- libgetdata-0.7.0/test/entry_type.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/entry_type.c 2010-11-28 00:40:40.000000000 +0000 @@ -14,7 +14,9 @@ const char* filedir = __TEST__ "dirfile"; const char* format = __TEST__ "dirfile/format"; const char* format_data = "data RAW UINT8 8\n"; - int fd, r = 0; + int fd, error, r = 0; + gd_entype_t n; + DIRFILE *D; mkdir(filedir, 0777); @@ -22,10 +24,10 @@ write(fd, format_data, strlen(format_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - gd_entype_t n = gd_entry_type(D, "data"); - int error = gd_error(D); + n = gd_entry_type(D, "data"); + error = gd_error(D); gd_close(D); unlink(format); diff -Nru libgetdata-0.7.0/test/eof.c libgetdata-0.7.1/test/eof.c --- libgetdata-0.7.0/test/eof.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/eof.c 2010-11-28 00:40:55.000000000 +0000 @@ -14,8 +14,10 @@ const char* format = __TEST__ "dirfile/format"; const char* data = __TEST__ "dirfile/data"; const char* format_data = "data RAW UINT16 1\n"; - int fd, r = 0; + int fd, error, r = 0; + off_t n; const size_t len = strlen(data); + DIRFILE *D; mkdir(filedir, 0777); @@ -27,9 +29,9 @@ write(fd, data, len); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - off_t n = gd_eof(D, "data"); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + n = gd_eof(D, "data"); + error = gd_error(D); gd_close(D); unlink(data); diff -Nru libgetdata-0.7.0/test/eof_index.c libgetdata-0.7.1/test/eof_index.c --- libgetdata-0.7.0/test/eof_index.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/eof_index.c 2010-11-28 00:41:34.000000000 +0000 @@ -18,8 +18,10 @@ "mult1 MULTIPLY data INDEX\n" "mult2 MULTIPLY INDEX INDEX\n" "mult3 MULTIPLY INDEX data\n"; - int fd, r = 0; + int fd, error0, error1, error2, error3, r = 0; const size_t len = strlen(data); + off_t eof_INDEX, eof_mult1, eof_mult2, eof_mult3; + DIRFILE *D; mkdir(filedir, 0777); @@ -31,15 +33,15 @@ write(fd, data, len); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY); - off_t eof_INDEX = gd_eof(D, "INDEX"); - int error0 = gd_error(D); - off_t eof_mult1 = gd_eof(D, "mult1"); - int error1 = gd_error(D); - off_t eof_mult2 = gd_eof(D, "mult2"); - int error2 = gd_error(D); - off_t eof_mult3 = gd_eof(D, "mult3"); - int error3 = gd_error(D); + D = gd_open(filedir, GD_RDONLY); + eof_INDEX = gd_eof(D, "INDEX"); + error0 = gd_error(D); + eof_mult1 = gd_eof(D, "mult1"); + error1 = gd_error(D); + eof_mult2 = gd_eof(D, "mult2"); + error2 = gd_error(D); + eof_mult3 = gd_eof(D, "mult3"); + error3 = gd_error(D); gd_close(D); unlink(data); diff -Nru libgetdata-0.7.0/test/eof_lincom.c libgetdata-0.7.1/test/eof_lincom.c --- libgetdata-0.7.0/test/eof_lincom.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/eof_lincom.c 2010-11-28 00:41:56.000000000 +0000 @@ -19,8 +19,10 @@ "data2 RAW UINT8 1\n" "lincom LINCOM 2 data2 1. 0. data 1. 0.\n" "lincom2 LINCOM 2 data 1. 0. data2 1. 0.\n"; - int fd, r = 0; + int fd, error, error2, r = 0; const size_t len = strlen(data); + off_t n, m; + DIRFILE *D; mkdir(filedir, 0777); @@ -36,11 +38,11 @@ write(fd, data, len); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY); - off_t n = gd_eof(D, "lincom"); - int error = gd_error(D); - off_t m = gd_eof(D, "lincom"); - int error2 = gd_error(D); + D = gd_open(filedir, GD_RDONLY); + n = gd_eof(D, "lincom"); + error = gd_error(D); + m = gd_eof(D, "lincom"); + error2 = gd_error(D); gd_close(D); unlink(data2); diff -Nru libgetdata-0.7.0/test/eof_phase.c libgetdata-0.7.1/test/eof_phase.c --- libgetdata-0.7.0/test/eof_phase.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/eof_phase.c 2010-11-28 00:42:10.000000000 +0000 @@ -14,8 +14,10 @@ const char* format = __TEST__ "dirfile/format"; const char* data = __TEST__ "dirfile/data"; const char* format_data = "data RAW UINT16 1\nphase PHASE data 3"; - int fd, r = 0; + int fd, error, r = 0; + off_t n; const size_t len = strlen(data); + DIRFILE *D; mkdir(filedir, 0777); @@ -27,9 +29,9 @@ write(fd, data, len); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - off_t n = gd_eof(D, "phase"); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + n = gd_eof(D, "phase"); + error = gd_error(D); gd_close(D); unlink(data); diff -Nru libgetdata-0.7.0/test/error.c libgetdata-0.7.1/test/error.c --- libgetdata-0.7.0/test/error.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/error.c 2010-11-28 00:42:20.000000000 +0000 @@ -13,14 +13,15 @@ const char* filedir = __TEST__ "dirfile"; const char* format = __TEST__ "dirfile/format"; char string[1000] = ""; - int r = 0; + int error, r = 0; + DIRFILE *D; mkdir(filedir, 0777); close(open(format, O_CREAT | O_EXCL | O_WRONLY, 0666)); - DIRFILE* D = gd_open(filedir, GD_RDONLY); + D = gd_open(filedir, GD_RDONLY); gd_error_string(D, string, 1000); - int error = gd_error(D); + error = gd_error(D); gd_close(D); unlink(format); diff -Nru libgetdata-0.7.0/test/error_error.c libgetdata-0.7.1/test/error_error.c --- libgetdata-0.7.0/test/error_error.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/error_error.c 2010-11-28 00:42:26.000000000 +0000 @@ -6,12 +6,12 @@ int main(void) { char string[1000]; - int r = 0; + int error, r = 0; DIRFILE* D = gd_open("a non_existant dirfile", 0); gd_error_string(D, string, 1000); - int error = gd_error(D); + error = gd_error(D); gd_close(D); CHECKI(error, GD_E_OPEN); diff -Nru libgetdata-0.7.0/test/error_short.c libgetdata-0.7.1/test/error_short.c --- libgetdata-0.7.0/test/error_short.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/error_short.c 2010-11-28 00:44:29.000000000 +0000 @@ -12,20 +12,20 @@ { const char* filedir = __TEST__ "dirfile"; const char* format = __TEST__ "dirfile/format"; - char string[1000] = ""; + char string[1000] = "abc"; int r = 0; + DIRFILE *D; mkdir(filedir, 0777); close(open(format, O_CREAT | O_EXCL | O_WRONLY, 0666)); - DIRFILE* D = gd_open(filedir, GD_RDONLY); + D = gd_open(filedir, GD_RDONLY); gd_error_string(D, string, 2); gd_close(D); unlink(format); rmdir(filedir); - CHECKI(string[0], 'S'); CHECKI(string[1], 0); return r; diff -Nru libgetdata-0.7.0/test/file.c libgetdata-0.7.1/test/file.c --- libgetdata-0.7.0/test/file.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/file.c 2010-11-28 01:40:58.000000000 +0000 @@ -16,7 +16,9 @@ const char* data = __TEST__ "dirfile/data"; const char* format_data = "data RAW UINT8 8\n"; unsigned char data_data[256]; - int fd, r = 0; + int fd, error, r = 0; + char *path; + DIRFILE *D; mkdir(filedir, 0777); @@ -31,9 +33,9 @@ write(fd, data_data, 256); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - const char *path = strdup(gd_raw_filename(D, "data")); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + path = strdup(gd_raw_filename(D, "data")); + error = gd_error(D); gd_close(D); @@ -43,6 +45,7 @@ CHECKI(error, 0); CHECKS(path, __TEST__ "dirfile/data"); + free(path); return r; } diff -Nru libgetdata-0.7.0/test/file_code.c libgetdata-0.7.1/test/file_code.c --- libgetdata-0.7.0/test/file_code.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/file_code.c 2010-11-28 00:47:19.000000000 +0000 @@ -16,7 +16,9 @@ const char* data = __TEST__ "dirfile/data"; const char* format_data = "data RAW UINT8 8\n"; unsigned char data_data[256]; - int fd, r = 0; + int fd, error, r = 0; + const char *path; + DIRFILE *D; mkdir(filedir, 0777); @@ -31,9 +33,9 @@ write(fd, data_data, 256); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY); - const char *path = gd_raw_filename(D, "bata"); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY); + path = gd_raw_filename(D, "bata"); + error = gd_error(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/file_type.c libgetdata-0.7.1/test/file_type.c --- libgetdata-0.7.0/test/file_type.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/file_type.c 2010-11-28 00:47:44.000000000 +0000 @@ -16,7 +16,9 @@ const char* data = __TEST__ "dirfile/data"; const char* format_data = "data CONST UINT8 8\n"; unsigned char data_data[256]; - int fd, r = 0; + int fd, error, r = 0; + const char *path; + DIRFILE *D; mkdir(filedir, 0777); @@ -31,9 +33,9 @@ write(fd, data_data, 256); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY); - const char *path = gd_raw_filename(D, "data"); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY); + path = gd_raw_filename(D, "data"); + error = gd_error(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/flist.c libgetdata-0.7.1/test/flist.c --- libgetdata-0.7.0/test/flist.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/flist.c 2010-11-28 00:48:05.000000000 +0000 @@ -18,7 +18,9 @@ "data1 RAW UINT8 1\n" "data2 RAW UINT8 1\n" "data3 RAW UINT8 1\n"; - int fd, i, r = 0; + int fd, i, error, r = 0; + const char **field_list; + DIRFILE *D; mkdir(filedir, 0777); @@ -26,10 +28,10 @@ write(fd, format_data, strlen(format_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - const char** field_list = gd_field_list(D); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + field_list = gd_field_list(D); - int error = gd_error(D); + error = gd_error(D); CHECKI(error, 0); CHECKPN(field_list); diff -Nru libgetdata-0.7.0/test/flist_meta.c libgetdata-0.7.1/test/flist_meta.c --- libgetdata-0.7.0/test/flist_meta.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/flist_meta.c 2010-11-28 00:48:21.000000000 +0000 @@ -19,7 +19,9 @@ "META parent data1 LINTERP UINT8 1\n" "META parent data2 LINTERP UINT8 1\n" "META parent data3 LINTERP UINT8 1\n"; - int fd, i, r = 0; + int fd, i, error, r = 0; + const char **field_list; + DIRFILE *D; mkdir(filedir, 0777); @@ -27,10 +29,10 @@ write(fd, format_data, strlen(format_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - const char** field_list = gd_mfield_list(D, "parent"); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + field_list = gd_mfield_list(D, "parent"); - int error = gd_error(D); + error = gd_error(D); CHECKI(error, 0); CHECKPN(field_list); diff -Nru libgetdata-0.7.0/test/flist_type.c libgetdata-0.7.1/test/flist_type.c --- libgetdata-0.7.0/test/flist_type.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/flist_type.c 2010-11-28 00:48:38.000000000 +0000 @@ -19,7 +19,9 @@ "data2 STRING UINT8 1\n" "data3 STRING UINT8 1\n" "data4 CONST UINT8 1\n"; - int fd, i, r = 0; + int fd, i, error, r = 0; + const char **field_list; + DIRFILE *D; mkdir(filedir, 0777); @@ -27,10 +29,10 @@ write(fd, format_data, strlen(format_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - const char** field_list = gd_field_list_by_type(D, GD_STRING_ENTRY); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + field_list = gd_field_list_by_type(D, GD_STRING_ENTRY); - int error = gd_error(D); + error = gd_error(D); CHECKI(error, GD_E_OK); CHECKPN(field_list); diff -Nru libgetdata-0.7.0/test/flist_type_meta.c libgetdata-0.7.1/test/flist_type_meta.c --- libgetdata-0.7.0/test/flist_type_meta.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/flist_type_meta.c 2010-11-28 00:48:57.000000000 +0000 @@ -20,7 +20,9 @@ "META parent data2 STRING UINT8 1\n" "META parent data3 STRING UINT8 1\n" "META parent data4 CONST UINT8 1\n"; - int fd, i, r = 0; + int fd, i, error, r = 0; + const char **field_list; + DIRFILE *D; mkdir(filedir, 0777); @@ -28,11 +30,10 @@ write(fd, format_data, strlen(format_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - const char** field_list = gd_mfield_list_by_type(D, "parent", - GD_STRING_ENTRY); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + field_list = gd_mfield_list_by_type(D, "parent", GD_STRING_ENTRY); - int error = gd_error(D); + error = gd_error(D); CHECKI(error, 0); CHECKPN(field_list); diff -Nru libgetdata-0.7.0/test/flush_all.c libgetdata-0.7.1/test/flush_all.c --- libgetdata-0.7.0/test/flush_all.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/flush_all.c 2010-11-28 00:49:43.000000000 +0000 @@ -17,8 +17,9 @@ const char* data = __TEST__ "dirfile/data"; const char* format_data = "data RAW UINT8 8\n"; uint8_t c[8], d; - int fd, i; + int fd, i, n, error; struct stat buf; + DIRFILE *D; memset(c, 0, 8); mkdir(filedir, 0777); @@ -30,10 +31,10 @@ write(fd, format_data, strlen(format_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDWR | GD_UNENCODED | GD_VERBOSE); - int n = gd_putdata(D, "data", 5, 0, 1, 0, GD_UINT8, c); + D = gd_open(filedir, GD_RDWR | GD_UNENCODED | GD_VERBOSE); + n = gd_putdata(D, "data", 5, 0, 1, 0, GD_UINT8, c); gd_flush(D, NULL); - int error = gd_error(D); + error = gd_error(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/flush_bad_code.c libgetdata-0.7.1/test/flush_bad_code.c --- libgetdata-0.7.0/test/flush_bad_code.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/flush_bad_code.c 2010-11-28 00:49:52.000000000 +0000 @@ -14,7 +14,8 @@ const char* filedir = __TEST__ "dirfile"; const char* format = __TEST__ "dirfile/format"; const char* format_data = "#\n"; - int fd, r = 0; + int fd, error, r = 0; + DIRFILE *D; mkdir(filedir, 0777); @@ -22,10 +23,10 @@ write(fd, format_data, strlen(format_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDWR); + D = gd_open(filedir, GD_RDWR); gd_flush(D, "no-such-field"); - int error = gd_error(D); + error = gd_error(D); gd_close(D); unlink(format); diff -Nru libgetdata-0.7.0/test/flush.c libgetdata-0.7.1/test/flush.c --- libgetdata-0.7.0/test/flush.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/flush.c 2010-11-28 00:49:12.000000000 +0000 @@ -17,8 +17,9 @@ const char* data = __TEST__ "dirfile/data"; const char* format_data = "data RAW UINT8 8\n"; uint8_t c[8], d; - int fd, i; + int fd, i, n, error; struct stat buf; + DIRFILE *D; memset(c, 0, 8); mkdir(filedir, 0777); @@ -30,10 +31,10 @@ write(fd, format_data, strlen(format_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDWR | GD_UNENCODED | GD_VERBOSE); - int n = gd_putdata(D, "data", 5, 0, 1, 0, GD_UINT8, c); + D = gd_open(filedir, GD_RDWR | GD_UNENCODED | GD_VERBOSE); + n = gd_putdata(D, "data", 5, 0, 1, 0, GD_UINT8, c); gd_flush(D, "data"); - int error = gd_error(D); + error = gd_error(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/flush_invalid.c libgetdata-0.7.1/test/flush_invalid.c --- libgetdata-0.7.0/test/flush_invalid.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/flush_invalid.c 2010-11-28 00:50:26.000000000 +0000 @@ -11,11 +11,14 @@ int main(void) { const char* filedir = __TEST__ "dirfile"; + int error, r = 0; DIRFILE* D = gd_open(filedir, GD_RDWR); gd_flush(D, NULL); - int error = gd_error(D); + error = gd_error(D); gd_close(D); - return (error != GD_E_BAD_DIRFILE); + CHECKI(error, GD_E_BAD_DIRFILE); + + return r; } diff -Nru libgetdata-0.7.0/test/flush_meta.c libgetdata-0.7.1/test/flush_meta.c --- libgetdata-0.7.0/test/flush_meta.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/flush_meta.c 2010-11-28 00:51:33.000000000 +0000 @@ -16,25 +16,24 @@ const char* format = __TEST__ "dirfile/format"; const char* data = __TEST__ "dirfile/new"; struct stat buf; - int r = 0; + int error, stat_format, r = 0; DIRFILE* D = gd_open(filedir, GD_RDWR | GD_CREAT | GD_TRUNC | GD_VERBOSE); gd_add_raw(D, "new", GD_UINT8, 2, 0); gd_metaflush(D); - int error = gd_error(D); + error = gd_error(D); gd_close(D); - if (stat(format, &buf)) - r = 1; + stat_format = stat(format, &buf); unlink(data); unlink(format); rmdir(filedir); - if (error || r) - return 1; + CHECKI(stat_format, 0); + CHECKI(error, GD_E_OK); - return 0; + return r; } diff -Nru libgetdata-0.7.0/test/flush_spec.c libgetdata-0.7.1/test/flush_spec.c --- libgetdata-0.7.0/test/flush_spec.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/flush_spec.c 2010-11-28 00:52:10.000000000 +0000 @@ -34,17 +34,18 @@ NULL }; - int i = 0; + int error, i = 0, r = 0; + FILE *stream; DIRFILE* D = gd_open(filedir, GD_RDWR | GD_CREAT | GD_TRUNC | GD_VERBOSE); for (i = 0; spec[i] != NULL; ++i) gd_add_spec(D, spec[i], 0); - int error = gd_error(D); + error = gd_error(D); gd_close(D); - FILE* stream = fopen(format, "rt"); + stream = fopen(format, "rt"); i = 0; while (!feof(stream)) { char line[GD_MAX_LINE_LENGTH]; @@ -67,8 +68,7 @@ unlink(format); rmdir(filedir); - if (error) - return 1; + CHECKI(error, 0); - return 0; + return r; } diff -Nru libgetdata-0.7.0/test/foffs_alter.c libgetdata-0.7.1/test/foffs_alter.c --- libgetdata-0.7.0/test/foffs_alter.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/foffs_alter.c 2010-11-28 00:52:29.000000000 +0000 @@ -17,7 +17,9 @@ const char* data = __TEST__ "dirfile/data"; const char* format_data = "data RAW UINT8 8\nFRAMEOFFSET 13\n"; unsigned char data_data[256]; - int fd, r = 0; + int fd, ret, error, r = 0; + off_t fo, nf; + DIRFILE *D; mkdir(filedir, 0777); @@ -32,11 +34,11 @@ write(fd, data_data, 256); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDWR | GD_VERBOSE); - int ret = gd_alter_frameoffset(D, 16, 0, 0); - int error = gd_error(D); - off_t fo = gd_frameoffset(D, 0); - off_t nf = gd_nframes(D); + D = gd_open(filedir, GD_RDWR | GD_VERBOSE); + ret = gd_alter_frameoffset(D, 16, 0, 0); + error = gd_error(D); + fo = gd_frameoffset(D, 0); + nf = gd_nframes(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/foffs_get.c libgetdata-0.7.1/test/foffs_get.c --- libgetdata-0.7.0/test/foffs_get.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/foffs_get.c 2010-11-28 00:52:41.000000000 +0000 @@ -16,7 +16,9 @@ const char* data = __TEST__ "dirfile/data"; const char* format_data = "data RAW UINT8 8\nFRAMEOFFSET 13\n"; unsigned char data_data[256]; - int fd,r = 0; + int fd, error, r = 0; + off_t n; + DIRFILE *D; mkdir(filedir, 0777); @@ -31,9 +33,9 @@ write(fd, data_data, 256); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - off_t n = gd_frameoffset(D, 0); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + n = gd_frameoffset(D, 0); + error = gd_error(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/foffs_move.c libgetdata-0.7.1/test/foffs_move.c --- libgetdata-0.7.0/test/foffs_move.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/foffs_move.c 2010-11-28 00:53:35.000000000 +0000 @@ -17,7 +17,9 @@ const char* data = __TEST__ "dirfile/data"; const char* format_data = "data RAW UINT8 8\nFRAMEOFFSET 13\n"; unsigned char data_data[256]; - int fd, r = 0; + int fd, ret, error, r = 0; + off_t fo, nf; + DIRFILE *D; mkdir(filedir, 0777); @@ -32,11 +34,11 @@ write(fd, data_data, 256); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDWR | GD_VERBOSE); - int ret = gd_alter_frameoffset(D, 16, 0, 1); - int error = gd_error(D); - off_t fo = gd_frameoffset(D, 0); - off_t nf = gd_nframes(D); + D = gd_open(filedir, GD_RDWR | GD_VERBOSE); + ret = gd_alter_frameoffset(D, 16, 0, 1); + error = gd_error(D); + fo = gd_frameoffset(D, 0); + nf = gd_nframes(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/fragment_index.c libgetdata-0.7.1/test/fragment_index.c --- libgetdata-0.7.0/test/fragment_index.c 2010-11-03 08:47:33.000000000 +0000 +++ libgetdata-0.7.1/test/fragment_index.c 2010-11-28 00:53:45.000000000 +0000 @@ -16,7 +16,8 @@ const char* format1 = __TEST__ "dirfile/format1"; const char* format_data = "INCLUDE format1\n"; const char* format1_data = "data RAW UINT8 8\n"; - int fd, r = 0; + int fd, n, error, r = 0; + DIRFILE *D; mkdir(filedir, 0777); @@ -28,10 +29,10 @@ write(fd, format1_data, strlen(format1_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int n = gd_fragment_index(D, "data"); - int error = gd_error(D); + n = gd_fragment_index(D, "data"); + error = gd_error(D); gd_close(D); unlink(format1); diff -Nru libgetdata-0.7.0/test/fragment_name.c libgetdata-0.7.1/test/fragment_name.c --- libgetdata-0.7.0/test/fragment_name.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/fragment_name.c 2010-11-28 00:53:55.000000000 +0000 @@ -21,6 +21,7 @@ char* form0 = NULL; char* form1 = NULL; int fd, r = 0; + DIRFILE *D; mkdir(filedir, 0777); @@ -32,7 +33,7 @@ write(fd, format1_data, strlen(format1_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); form0 = strdup(gd_fragmentname(D, 0)); form1 = strdup(gd_fragmentname(D, 1)); gd_close(D); @@ -43,6 +44,8 @@ CHECKS(form0, __TEST__ "dirfile/format"); CHECKS(form1, __TEST__ "dirfile/format1"); + free(form0); + free(form1); return r; } diff -Nru libgetdata-0.7.0/test/fragment_name_oor.c libgetdata-0.7.1/test/fragment_name_oor.c --- libgetdata-0.7.0/test/fragment_name_oor.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/fragment_name_oor.c 2010-11-28 00:54:11.000000000 +0000 @@ -19,7 +19,8 @@ const char* format1_data = "data RAW UINT8 11\n"; const char* form0 = NULL; const char* form1 = NULL; - int fd, r = 0; + int fd, error, r = 0; + DIRFILE *D; mkdir(filedir, 0777); @@ -31,10 +32,10 @@ write(fd, format1_data, strlen(format1_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY); + D = gd_open(filedir, GD_RDONLY); form0 = gd_fragmentname(D, -3000); form1 = gd_fragmentname(D, 1000); - int error = gd_error(D); + error = gd_error(D); gd_close(D); unlink(format1); diff -Nru libgetdata-0.7.0/test/get64.c libgetdata-0.7.1/test/get64.c --- libgetdata-0.7.0/test/get64.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/get64.c 2010-11-28 01:41:30.000000000 +0000 @@ -19,7 +19,8 @@ const char* format_data = "data RAW UINT8 8\n"; unsigned char c[8]; unsigned char data_data[256]; - int fd, i, r = 0; + int fd, i, n, error, r = 0; + DIRFILE *D; memset(c, 0, 8); mkdir(filedir, 0777); @@ -35,10 +36,10 @@ write(fd, data_data, 256); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int n = gd_getdata64(D, "data", 5, 0, 1, 0, GD_UINT8, c); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + n = gd_getdata64(D, "data", 5, 0, 1, 0, GD_UINT8, c); - int error = gd_error(D); + error = gd_error(D); CHECKI(error, 0); CHECKI(n, 8); for (i = 0; i < 8; ++i) diff -Nru libgetdata-0.7.0/test/get_bad_code.c libgetdata-0.7.1/test/get_bad_code.c --- libgetdata-0.7.0/test/get_bad_code.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/get_bad_code.c 2010-11-28 01:41:43.000000000 +0000 @@ -16,7 +16,8 @@ const char* format = __TEST__ "dirfile/format"; const char* format_data = "#\n"; unsigned char c = 0; - int fd, r = 0; + int fd, n, error, r = 0; + DIRFILE *D; mkdir(filedir, 0777); @@ -24,10 +25,10 @@ write(fd, format_data, strlen(format_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY); - int n = gd_getdata(D, "no-such-field", 5, 0, 1, 0, GD_UINT8, &c); + D = gd_open(filedir, GD_RDONLY); + n = gd_getdata(D, "no-such-field", 5, 0, 1, 0, GD_UINT8, &c); - int error = gd_error(D); + error = gd_error(D); gd_close(D); unlink(format); diff -Nru libgetdata-0.7.0/test/get_bit.c libgetdata-0.7.1/test/get_bit.c --- libgetdata-0.7.0/test/get_bit.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/get_bit.c 2010-11-28 01:41:52.000000000 +0000 @@ -17,7 +17,8 @@ const char* format_data = "bit BIT data 1 3\ndata RAW UINT8 1\n"; unsigned char c = 0; unsigned char data_data[256]; - int fd, r = 0; + int fd, n, error, r = 0; + DIRFILE *D; mkdir(filedir, 0777); @@ -32,9 +33,9 @@ write(fd, data_data, 256); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int n = gd_getdata(D, "bit", 5, 0, 1, 0, GD_UINT8, &c); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + n = gd_getdata(D, "bit", 5, 0, 1, 0, GD_UINT8, &c); + error = gd_error(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/get_carray.c libgetdata-0.7.1/test/get_carray.c --- libgetdata-0.7.0/test/get_carray.c 2010-10-31 15:43:47.000000000 +0000 +++ libgetdata-0.7.1/test/get_carray.c 2010-11-28 01:42:10.000000000 +0000 @@ -16,7 +16,8 @@ const char* format = __TEST__ "dirfile/format"; const char* format_data = "carray CARRAY FLOAT64 8.3 7.2 6.1 5.0 3.9 2.8 1.7\n"; double c[7]; - int fd, i, r = 0; + int fd, i, n, error, r = 0; + DIRFILE *D; mkdir(filedir, 0777); @@ -24,9 +25,9 @@ write(fd, format_data, strlen(format_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int n = gd_get_carray(D, "carray", GD_FLOAT64, c); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + n = gd_get_carray(D, "carray", GD_FLOAT64, c); + error = gd_error(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/get_carray_len.c libgetdata-0.7.1/test/get_carray_len.c --- libgetdata-0.7.0/test/get_carray_len.c 2010-10-31 15:44:53.000000000 +0000 +++ libgetdata-0.7.1/test/get_carray_len.c 2010-11-28 01:42:27.000000000 +0000 @@ -15,7 +15,9 @@ const char* filedir = __TEST__ "dirfile"; const char* format = __TEST__ "dirfile/format"; const char* format_data = "carray CARRAY FLOAT64 8.3 7.2 6.1 5.0 3.9 2.8 1.7\n"; - int fd, r = 0; + int fd, error, r = 0; + size_t n; + DIRFILE *D; mkdir(filedir, 0777); @@ -23,9 +25,9 @@ write(fd, format_data, strlen(format_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - size_t n = gd_carray_len(D, "carray"); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + n = gd_carray_len(D, "carray"); + error = gd_error(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/get_carray_slice.c libgetdata-0.7.1/test/get_carray_slice.c --- libgetdata-0.7.0/test/get_carray_slice.c 2010-10-31 15:47:07.000000000 +0000 +++ libgetdata-0.7.1/test/get_carray_slice.c 2010-11-28 01:42:37.000000000 +0000 @@ -16,7 +16,8 @@ const char* format = __TEST__ "dirfile/format"; const char* format_data = "carray CARRAY FLOAT64 8.3 7.2 6.1 5.0 3.9 2.8 1.7\n"; double c[4]; - int fd, i, r = 0; + int fd, i, n, error, r = 0; + DIRFILE *D; mkdir(filedir, 0777); @@ -24,9 +25,9 @@ write(fd, format_data, strlen(format_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int n = gd_get_carray_slice(D, "carray", 2, 4, GD_FLOAT64, c); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + n = gd_get_carray_slice(D, "carray", 2, 4, GD_FLOAT64, c); + error = gd_error(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/get_char.c libgetdata-0.7.1/test/get_char.c --- libgetdata-0.7.0/test/get_char.c 2010-11-03 08:48:11.000000000 +0000 +++ libgetdata-0.7.1/test/get_char.c 2010-11-28 01:42:47.000000000 +0000 @@ -17,7 +17,8 @@ const char* format_data = "data RAW UINT8 8\n"; unsigned char c[8]; unsigned char data_data[256]; - int fd, r = 0; + int fd, n, error, r = 0; + DIRFILE *D; memset(c, 0, 8); mkdir(filedir, 0777); @@ -33,9 +34,9 @@ write(fd, data_data, 256); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY); - int n = gd_getdata(D, "data", 5, 0, 1, 0, (gd_type_t)'c', c); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY); + n = gd_getdata(D, "data", 5, 0, 1, 0, (gd_type_t)'c', c); + error = gd_error(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/get_clincom.c libgetdata-0.7.1/test/get_clincom.c --- libgetdata-0.7.0/test/get_clincom.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/get_clincom.c 2010-11-28 01:43:11.000000000 +0000 @@ -18,11 +18,14 @@ const char* format_data = "lincom LINCOM 2 data 2;3 3;2 data 0;1 0\ndata RAW UINT8 1\n"; #ifdef GD_NO_C99_API double c[2] = {0, 0}; + const double v[2] = {13, 22}; #else double complex c = 0; + const double complex v = 13 + _Complex_I * 22; #endif unsigned char data_data[256]; - int fd, r = 0; + int fd, n, error, r = 0; + DIRFILE *D; mkdir(filedir, 0777); @@ -37,9 +40,9 @@ write(fd, data_data, 256); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int n = gd_getdata(D, "lincom", 5, 0, 1, 0, GD_COMPLEX128, &c); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + n = gd_getdata(D, "lincom", 5, 0, 1, 0, GD_COMPLEX128, &c); + error = gd_error(D); gd_close(D); @@ -47,12 +50,6 @@ unlink(format); rmdir(filedir); -#ifdef GD_NO_C99_API - const double v[2] = {13, 22}; -#else - const double complex v = 13 + _Complex_I * 22; -#endif - CHECKI(error, 0); CHECKI(n, 1); CHECKC(c, v); diff -Nru libgetdata-0.7.0/test/get_complex128.c libgetdata-0.7.1/test/get_complex128.c --- libgetdata-0.7.0/test/get_complex128.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/get_complex128.c 2010-11-28 01:43:24.000000000 +0000 @@ -23,7 +23,8 @@ double complex c[8]; double complex data_data[128]; #endif - int fd, i, r = 0; + int fd, i, n, error, r = 0; + DIRFILE *D; memset(c, 0, 8); mkdir(filedir, 0777); @@ -44,9 +45,9 @@ write(fd, data_data, 256 * sizeof(double)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int n = gd_getdata(D, "data", 5, 0, 1, 0, GD_COMPLEX128, c); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + n = gd_getdata(D, "data", 5, 0, 1, 0, GD_COMPLEX128, c); + error = gd_error(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/get_complex64.c libgetdata-0.7.1/test/get_complex64.c --- libgetdata-0.7.0/test/get_complex64.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/get_complex64.c 2010-11-28 01:43:33.000000000 +0000 @@ -23,7 +23,8 @@ float complex c[8]; float complex data_data[128]; #endif - int fd, i, r = 0; + int fd, i, n, error, r = 0; + DIRFILE *D; memset(c, 0, 8); mkdir(filedir, 0777); @@ -44,9 +45,9 @@ write(fd, data_data, 256 * sizeof(float)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int n = gd_getdata(D, "data", 5, 0, 1, 0, GD_COMPLEX64, c); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + n = gd_getdata(D, "data", 5, 0, 1, 0, GD_COMPLEX64, c); + error = gd_error(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/get_const.c libgetdata-0.7.1/test/get_const.c --- libgetdata-0.7.0/test/get_const.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/get_const.c 2010-11-28 01:43:40.000000000 +0000 @@ -16,7 +16,8 @@ const char* format = __TEST__ "dirfile/format"; const char* format_data = "const CONST FLOAT64 8.3\n"; double c; - int fd, r = 0; + int fd, n, error, r = 0; + DIRFILE *D; mkdir(filedir, 0777); @@ -24,9 +25,9 @@ write(fd, format_data, strlen(format_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int n = gd_get_constant(D, "const", GD_FLOAT64, &c); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + n = gd_get_constant(D, "const", GD_FLOAT64, &c); + error = gd_error(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/get_const_complex.c libgetdata-0.7.1/test/get_const_complex.c --- libgetdata-0.7.0/test/get_const_complex.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/get_const_complex.c 2010-11-28 01:43:49.000000000 +0000 @@ -22,7 +22,8 @@ double complex c; const double complex v = 8.3 + _Complex_I * 9.2; #endif - int fd, r = 0; + int fd, n, error, r = 0; + DIRFILE *D; mkdir(filedir, 0777); @@ -30,13 +31,13 @@ write(fd, format_data, strlen(format_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); #ifdef GD_NO_C99_API - int n = gd_get_constant(D, "const", GD_COMPLEX128, c); + n = gd_get_constant(D, "const", GD_COMPLEX128, c); #else - int n = gd_get_constant(D, "const", GD_COMPLEX128, &c); + n = gd_get_constant(D, "const", GD_COMPLEX128, &c); #endif - int error = gd_error(D); + error = gd_error(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/get_const_repr.c libgetdata-0.7.1/test/get_const_repr.c --- libgetdata-0.7.0/test/get_const_repr.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/get_const_repr.c 2010-11-28 01:43:56.000000000 +0000 @@ -16,7 +16,8 @@ const char* format = __TEST__ "dirfile/format"; const char* format_data = "const CONST COMPLEX128 8.3;9.2\n"; double c; - int fd, r = 0; + int fd, n, error, r = 0; + DIRFILE *D; mkdir(filedir, 0777); @@ -24,9 +25,9 @@ write(fd, format_data, strlen(format_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int n = gd_get_constant(D, "const.m", GD_FLOAT64, &c); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + n = gd_get_constant(D, "const.m", GD_FLOAT64, &c); + error = gd_error(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/get_cpolynom.c libgetdata-0.7.1/test/get_cpolynom.c --- libgetdata-0.7.0/test/get_cpolynom.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/get_cpolynom.c 2010-11-28 01:44:24.000000000 +0000 @@ -18,11 +18,14 @@ const char* format_data = "polynom POLYNOM data 3;2 2;4 0;1\ndata RAW UINT8 1\n"; #ifdef GD_NO_C99_API double c[2] = {0, 0}; + const double v[2] = {13, 47}; #else double complex c = 0; + const double complex v = 13 + _Complex_I * 47; #endif unsigned char data_data[256]; - int fd, r = 0; + int fd, n, error, r = 0; + DIRFILE *D; mkdir(filedir, 0777); @@ -37,9 +40,9 @@ write(fd, data_data, 256); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int n = gd_getdata(D, "polynom", 5, 0, 1, 0, GD_COMPLEX128, &c); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + n = gd_getdata(D, "polynom", 5, 0, 1, 0, GD_COMPLEX128, &c); + error = gd_error(D); gd_close(D); @@ -47,12 +50,6 @@ unlink(format); rmdir(filedir); -#ifdef GD_NO_C99_API - const double v[2] = {13, 47}; -#else - const double complex v = 13 + _Complex_I * 47; -#endif - CHECKI(error, 0); CHECKI(n, 1); CHECKC(c, v); diff -Nru libgetdata-0.7.0/test/get_divide.c libgetdata-0.7.1/test/get_divide.c --- libgetdata-0.7.0/test/get_divide.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/get_divide.c 2010-11-28 01:44:38.000000000 +0000 @@ -19,7 +19,8 @@ "data RAW UINT8 1\n"; double c = 0; unsigned char data_data[256]; - int fd, r = 0; + int fd, n, error, r = 0; + DIRFILE *D; mkdir(filedir, 0777); @@ -34,9 +35,9 @@ write(fd, data_data, 256); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int n = gd_getdata(D, "div", 5, 0, 1, 0, GD_FLOAT64, &c); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + n = gd_getdata(D, "div", 5, 0, 1, 0, GD_FLOAT64, &c); + error = gd_error(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/get_endian16.c libgetdata-0.7.1/test/get_endian16.c --- libgetdata-0.7.0/test/get_endian16.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/get_endian16.c 2010-11-28 01:44:48.000000000 +0000 @@ -29,8 +29,9 @@ char format_data[1000]; uint16_t c = 0; uint16_t data_data[128]; - int fd, r = 0; const int big_endian = BigEndian(); + int fd, n, error, r = 0; + DIRFILE *D; mkdir(filedir, 0777); @@ -48,9 +49,9 @@ write(fd, data_data, 128 * sizeof(uint16_t)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int n = gd_getdata(D, "data", 5, 0, 1, 0, GD_UINT16, &c); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + n = gd_getdata(D, "data", 5, 0, 1, 0, GD_UINT16, &c); + error = gd_error(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/get_endian32.c libgetdata-0.7.1/test/get_endian32.c --- libgetdata-0.7.0/test/get_endian32.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/get_endian32.c 2010-11-28 01:46:28.000000000 +0000 @@ -29,8 +29,9 @@ char format_data[1000]; uint32_t c = 0; uint32_t data_data[128]; - int fd, r = 0; const int big_endian = BigEndian(); + int fd, n, error, r = 0; + DIRFILE *D; mkdir(filedir, 0777); @@ -48,9 +49,9 @@ write(fd, data_data, 128 * sizeof(uint32_t)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int n = gd_getdata(D, "data", 5, 0, 1, 0, GD_UINT32, &c); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + n = gd_getdata(D, "data", 5, 0, 1, 0, GD_UINT32, &c); + error = gd_error(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/get_endian64.c libgetdata-0.7.1/test/get_endian64.c --- libgetdata-0.7.0/test/get_endian64.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/get_endian64.c 2010-11-28 01:46:35.000000000 +0000 @@ -29,8 +29,9 @@ char format_data[1000]; uint64_t c = 0; uint64_t data_data[128]; - int fd, r = 0; const int big_endian = BigEndian(); + int fd, n, error, r = 0; + DIRFILE *D; mkdir(filedir, 0777); @@ -48,9 +49,9 @@ write(fd, data_data, 128 * sizeof(uint64_t)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int n = gd_getdata(D, "data", 5, 0, 1, 0, GD_UINT64, &c); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + n = gd_getdata(D, "data", 5, 0, 1, 0, GD_UINT64, &c); + error = gd_error(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/get_endian8.c libgetdata-0.7.1/test/get_endian8.c --- libgetdata-0.7.0/test/get_endian8.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/get_endian8.c 2010-11-28 01:46:42.000000000 +0000 @@ -30,7 +30,8 @@ uint8_t c = 0; uint8_t data_data[128]; const int big_endian = BigEndian(); - int fd, r = 0; + int fd, n, error, r = 0; + DIRFILE *D; mkdir(filedir, 0777); @@ -48,9 +49,9 @@ write(fd, data_data, 128 * sizeof(uint8_t)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int n = gd_getdata(D, "data", 5, 0, 1, 0, GD_UINT8, &c); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + n = gd_getdata(D, "data", 5, 0, 1, 0, GD_UINT8, &c); + error = gd_error(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/get_endian_complex128_arm.c libgetdata-0.7.1/test/get_endian_complex128_arm.c --- libgetdata-0.7.0/test/get_endian_complex128_arm.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/get_endian_complex128_arm.c 2010-11-28 01:46:58.000000000 +0000 @@ -155,7 +155,8 @@ 0xc2, 0x90, 0x93, 0x44, 0x9b, 0x9b, 0xd7, 0x66, 0x23, 0x59, 0x9d, 0x44, 0x68, 0x69, 0x43, 0x9a }; - int fd, i, r = 0; + int fd, i, n, error, r = 0; + DIRFILE *D; mkdir(filedir, 0777); @@ -180,9 +181,9 @@ write(fd, data_data, 64 * 16 * sizeof(unsigned char)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int n = gd_getdata(D, "data", 5, 0, 0, 10, GD_COMPLEX128, u); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + n = gd_getdata(D, "data", 5, 0, 0, 10, GD_COMPLEX128, u); + error = gd_error(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/get_endian_complex128_big.c libgetdata-0.7.1/test/get_endian_complex128_big.c --- libgetdata-0.7.0/test/get_endian_complex128_big.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/get_endian_complex128_big.c 2010-11-28 01:47:10.000000000 +0000 @@ -155,7 +155,8 @@ 0x44, 0x93, 0x90, 0xc2, 0x66, 0xd7, 0x9b, 0x9b, 0x44, 0x9d, 0x59, 0x23, 0x9a, 0x43, 0x69, 0x68 }; - int fd, i, r = 0; + int fd, i, n, error, r = 0; + DIRFILE *D; mkdir(filedir, 0777); @@ -180,9 +181,9 @@ write(fd, data_data, 64 * 16 * sizeof(unsigned char)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int n = gd_getdata(D, "data", 5, 0, 0, 10, GD_COMPLEX128, u); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + n = gd_getdata(D, "data", 5, 0, 0, 10, GD_COMPLEX128, u); + error = gd_error(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/get_endian_complex128_little.c libgetdata-0.7.1/test/get_endian_complex128_little.c --- libgetdata-0.7.0/test/get_endian_complex128_little.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/get_endian_complex128_little.c 2010-11-28 01:47:18.000000000 +0000 @@ -155,7 +155,8 @@ 0x9b, 0x9b, 0xd7, 0x66, 0xc2, 0x90, 0x93, 0x44, 0x68, 0x69, 0x43, 0x9a, 0x23, 0x59, 0x9d, 0x44 }; - int fd, i, r = 0; + int fd, i, n, error, r = 0; + DIRFILE *D; mkdir(filedir, 0777); @@ -180,9 +181,9 @@ write(fd, data_data, 64 * 16 * sizeof(unsigned char)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int n = gd_getdata(D, "data", 5, 0, 0, 10, GD_COMPLEX128, u); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + n = gd_getdata(D, "data", 5, 0, 0, 10, GD_COMPLEX128, u); + error = gd_error(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/get_endian_complex64_arm.c libgetdata-0.7.1/test/get_endian_complex64_arm.c --- libgetdata-0.7.0/test/get_endian_complex64_arm.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/get_endian_complex64_arm.c 2010-11-28 01:47:33.000000000 +0000 @@ -91,7 +91,8 @@ 0xD7, 0x21, 0x0B, 0x64, 0xC2, 0xB2, 0x50, 0x64, 0x12, 0x86, 0x9C, 0x64, 0x1B, 0xC9, 0xEA, 0x64 }; - int fd, i, r = 0; + int fd, i, n, error, r = 0; + DIRFILE *D; mkdir(filedir, 0777); @@ -116,9 +117,9 @@ write(fd, data_data, 64 * 8 * sizeof(unsigned char)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int n = gd_getdata(D, "data", 5, 0, 0, 10, GD_COMPLEX64, u); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + n = gd_getdata(D, "data", 5, 0, 0, 10, GD_COMPLEX64, u); + error = gd_error(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/get_endian_complex64_big.c libgetdata-0.7.1/test/get_endian_complex64_big.c --- libgetdata-0.7.0/test/get_endian_complex64_big.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/get_endian_complex64_big.c 2010-11-28 01:47:46.000000000 +0000 @@ -91,7 +91,8 @@ 0x64, 0x0B, 0x21, 0xD7, 0x64, 0x50, 0xB2, 0xC2, 0x64, 0x9C, 0x86, 0x12, 0x64, 0xEA, 0xC9, 0x1B }; - int fd, i, r = 0; + int fd, i, n, error, r = 0; + DIRFILE *D; mkdir(filedir, 0777); @@ -116,9 +117,9 @@ write(fd, data_data, 64 * 8 * sizeof(unsigned char)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int n = gd_getdata(D, "data", 5, 0, 0, 10, GD_COMPLEX64, u); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + n = gd_getdata(D, "data", 5, 0, 0, 10, GD_COMPLEX64, u); + error = gd_error(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/get_endian_complex64_little.c libgetdata-0.7.1/test/get_endian_complex64_little.c --- libgetdata-0.7.0/test/get_endian_complex64_little.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/get_endian_complex64_little.c 2010-11-28 01:47:55.000000000 +0000 @@ -91,7 +91,8 @@ 0xD7, 0x21, 0x0B, 0x64, 0xC2, 0xB2, 0x50, 0x64, 0x12, 0x86, 0x9C, 0x64, 0x1B, 0xC9, 0xEA, 0x64 }; - int fd, i, r = 0; + int fd, i, n, error, r = 0; + DIRFILE *D; mkdir(filedir, 0777); @@ -116,9 +117,9 @@ write(fd, data_data, 64 * 8 * sizeof(unsigned char)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int n = gd_getdata(D, "data", 5, 0, 0, 10, GD_COMPLEX64, u); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + n = gd_getdata(D, "data", 5, 0, 0, 10, GD_COMPLEX64, u); + error = gd_error(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/get_endian_float32_arm.c libgetdata-0.7.1/test/get_endian_float32_arm.c --- libgetdata-0.7.0/test/get_endian_float32_arm.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/get_endian_float32_arm.c 2010-11-28 01:48:04.000000000 +0000 @@ -86,7 +86,8 @@ 0xD7, 0x21, 0x0B, 0x64, 0xC2, 0xB2, 0x50, 0x64, 0x12, 0x86, 0x9C, 0x64, 0x1B, 0xC9, 0xEA, 0x64 }; - int fd, i, r = 0; + int fd, i, n, error, r = 0; + DIRFILE *D; mkdir(filedir, 0777); @@ -102,9 +103,9 @@ write(fd, data_data, 128 * sizeof(float)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int n = gd_getdata(D, "data", 5, 0, 0, 10, GD_FLOAT32, u); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + n = gd_getdata(D, "data", 5, 0, 0, 10, GD_FLOAT32, u); + error = gd_error(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/get_endian_float32_big.c libgetdata-0.7.1/test/get_endian_float32_big.c --- libgetdata-0.7.0/test/get_endian_float32_big.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/get_endian_float32_big.c 2010-11-28 01:48:12.000000000 +0000 @@ -86,7 +86,8 @@ 0x64, 0x0B, 0x21, 0xD7, 0x64, 0x50, 0xB2, 0xC2, 0x64, 0x9C, 0x86, 0x12, 0x64, 0xEA, 0xC9, 0x1B }; - int fd, i, r = 0; + int fd, i, n, error, r = 0; + DIRFILE *D; mkdir(filedir, 0777); @@ -102,9 +103,9 @@ write(fd, data_data, 128 * sizeof(float)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int n = gd_getdata(D, "data", 5, 0, 0, 10, GD_FLOAT32, u); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + n = gd_getdata(D, "data", 5, 0, 0, 10, GD_FLOAT32, u); + error = gd_error(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/get_endian_float32_little.c libgetdata-0.7.1/test/get_endian_float32_little.c --- libgetdata-0.7.0/test/get_endian_float32_little.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/get_endian_float32_little.c 2010-11-28 01:48:20.000000000 +0000 @@ -86,7 +86,8 @@ 0xD7, 0x21, 0x0B, 0x64, 0xC2, 0xB2, 0x50, 0x64, 0x12, 0x86, 0x9C, 0x64, 0x1B, 0xC9, 0xEA, 0x64 }; - int fd, i, r = 0; + int fd, i, n, error, r = 0; + DIRFILE *D; mkdir(filedir, 0777); @@ -102,9 +103,9 @@ write(fd, data_data, 128 * sizeof(float)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int n = gd_getdata(D, "data", 5, 0, 0, 10, GD_FLOAT32, u); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + n = gd_getdata(D, "data", 5, 0, 0, 10, GD_FLOAT32, u); + error = gd_error(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/get_endian_float64_arm.c libgetdata-0.7.1/test/get_endian_float64_arm.c --- libgetdata-0.7.0/test/get_endian_float64_arm.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/get_endian_float64_arm.c 2010-11-28 01:48:27.000000000 +0000 @@ -150,7 +150,8 @@ 0xc2, 0x90, 0x93, 0x44, 0x9b, 0x9b, 0xd7, 0x66, 0x23, 0x59, 0x9d, 0x44, 0x68, 0x69, 0x43, 0x9a }; - int fd, i, r = 0; + int fd, i, n, error, r = 0; + DIRFILE *D; mkdir(filedir, 0777); @@ -166,9 +167,9 @@ write(fd, data_data, 128 * sizeof(double)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int n = gd_getdata(D, "data", 5, 0, 0, 10, GD_FLOAT64, u); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + n = gd_getdata(D, "data", 5, 0, 0, 10, GD_FLOAT64, u); + error = gd_error(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/get_endian_float64_big.c libgetdata-0.7.1/test/get_endian_float64_big.c --- libgetdata-0.7.0/test/get_endian_float64_big.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/get_endian_float64_big.c 2010-11-28 01:48:33.000000000 +0000 @@ -150,7 +150,8 @@ 0x44, 0x93, 0x90, 0xc2, 0x66, 0xd7, 0x9b, 0x9b, 0x44, 0x9d, 0x59, 0x23, 0x9a, 0x43, 0x69, 0x68 }; - int fd, i, r = 0; + int fd, i, n, error, r = 0; + DIRFILE *D; mkdir(filedir, 0777); @@ -166,9 +167,9 @@ write(fd, data_data, 128 * sizeof(double)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int n = gd_getdata(D, "data", 5, 0, 0, 10, GD_FLOAT64, u); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + n = gd_getdata(D, "data", 5, 0, 0, 10, GD_FLOAT64, u); + error = gd_error(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/get_endian_float64_little.c libgetdata-0.7.1/test/get_endian_float64_little.c --- libgetdata-0.7.0/test/get_endian_float64_little.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/get_endian_float64_little.c 2010-11-28 01:48:40.000000000 +0000 @@ -150,7 +150,8 @@ 0x9b, 0x9b, 0xd7, 0x66, 0xc2, 0x90, 0x93, 0x44, 0x68, 0x69, 0x43, 0x9a, 0x23, 0x59, 0x9d, 0x44 }; - int fd, i, r = 0; + int fd, i, n, error, r = 0; + DIRFILE *D; mkdir(filedir, 0777); @@ -166,9 +167,9 @@ write(fd, data_data, 128 * sizeof(double)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int n = gd_getdata(D, "data", 5, 0, 0, 10, GD_FLOAT64, u); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + n = gd_getdata(D, "data", 5, 0, 0, 10, GD_FLOAT64, u); + error = gd_error(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/get_ff.c libgetdata-0.7.1/test/get_ff.c --- libgetdata-0.7.0/test/get_ff.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/get_ff.c 2010-11-28 01:48:48.000000000 +0000 @@ -17,7 +17,8 @@ const char* format_data = "data RAW UINT8 8\n"; unsigned char c[8]; unsigned char data_data[256]; - int fd, i, r = 0; + int fd, i, n, error, r = 0; + DIRFILE *D; memset(c, 0, 8); mkdir(filedir, 0777); @@ -33,9 +34,9 @@ write(fd, data_data, 256); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int n = gd_getdata(D, "data", 5, 0, 1, 0, GD_UINT8, c); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + n = gd_getdata(D, "data", 5, 0, 1, 0, GD_UINT8, c); + error = gd_error(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/get_float32.c libgetdata-0.7.1/test/get_float32.c --- libgetdata-0.7.0/test/get_float32.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/get_float32.c 2010-11-28 01:48:55.000000000 +0000 @@ -18,7 +18,8 @@ const char* format_data = "data RAW FLOAT32 8\n"; float c[8]; float data_data[128]; - int fd, i, r = 0; + int fd, i, n, error, r = 0; + DIRFILE *D; memset(c, 0, 8); mkdir(filedir, 0777); @@ -34,9 +35,9 @@ write(fd, data_data, 128 * sizeof(float)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int n = gd_getdata(D, "data", 5, 0, 1, 0, GD_FLOAT32, c); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + n = gd_getdata(D, "data", 5, 0, 1, 0, GD_FLOAT32, c); + error = gd_error(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/get_float64.c libgetdata-0.7.1/test/get_float64.c --- libgetdata-0.7.0/test/get_float64.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/get_float64.c 2010-11-28 01:49:01.000000000 +0000 @@ -18,7 +18,8 @@ const char* format_data = "data RAW FLOAT64 8\n"; double c[8]; double data_data[128]; - int fd, i, r = 0; + int fd, i, n, error, r = 0; + DIRFILE *D; memset(c, 0, 8); mkdir(filedir, 0777); @@ -34,9 +35,9 @@ write(fd, data_data, 128 * sizeof(double)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int n = gd_getdata(D, "data", 5, 0, 1, 0, GD_FLOAT64, c); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + n = gd_getdata(D, "data", 5, 0, 1, 0, GD_FLOAT64, c); + error = gd_error(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/get_foffs.c libgetdata-0.7.1/test/get_foffs.c --- libgetdata-0.7.0/test/get_foffs.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/get_foffs.c 2010-11-28 01:49:09.000000000 +0000 @@ -17,7 +17,8 @@ const char* format_data = "FRAMEOFFSET 1\ndata RAW UINT8 1\n"; unsigned char c; unsigned char data_data[256]; - int fd, r = 0; + int fd, n, error, r = 0; + DIRFILE *D; mkdir(filedir, 0777); @@ -32,9 +33,9 @@ write(fd, data_data, 256); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int n = gd_getdata(D, "data", 5, 0, 1, 0, GD_UINT8, &c); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + n = gd_getdata(D, "data", 5, 0, 1, 0, GD_UINT8, &c); + error = gd_error(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/get_fs.c libgetdata-0.7.1/test/get_fs.c --- libgetdata-0.7.0/test/get_fs.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/get_fs.c 2010-11-28 01:49:17.000000000 +0000 @@ -17,7 +17,8 @@ const char* format_data = "data RAW UINT8 8\n"; unsigned char c[8]; unsigned char data_data[256]; - int fd, i, r = 0; + int fd, i, n, error, r = 0; + DIRFILE *D; memset(c, 0, 8); mkdir(filedir, 0777); @@ -33,9 +34,9 @@ write(fd, data_data, 256); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int n = gd_getdata(D, "data", 5, 0, 0, 8, GD_UINT8, c); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + n = gd_getdata(D, "data", 5, 0, 0, 8, GD_UINT8, c); + error = gd_error(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/get_int16.c libgetdata-0.7.1/test/get_int16.c --- libgetdata-0.7.0/test/get_int16.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/get_int16.c 2010-11-28 01:49:23.000000000 +0000 @@ -18,7 +18,8 @@ const char* format_data = "data RAW INT16 8\n"; int16_t c[8]; int16_t data_data[64]; - int fd, i, r = 0; + int fd, i, n, error, r = 0; + DIRFILE *D; memset(c, 0, 8); mkdir(filedir, 0777); @@ -34,9 +35,9 @@ write(fd, data_data, 64 * sizeof(int16_t)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int n = gd_getdata(D, "data", 5, 0, 1, 0, GD_INT16, c); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + n = gd_getdata(D, "data", 5, 0, 1, 0, GD_INT16, c); + error = gd_error(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/get_int32.c libgetdata-0.7.1/test/get_int32.c --- libgetdata-0.7.0/test/get_int32.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/get_int32.c 2010-11-28 01:49:34.000000000 +0000 @@ -18,7 +18,8 @@ const char* format_data = "data RAW INT32 8\n"; int32_t c[8]; int32_t data_data[64]; - int fd, i, r = 0; + int fd, i, n, error, r = 0; + DIRFILE *D; memset(c, 0, 8); mkdir(filedir, 0777); @@ -34,10 +35,10 @@ write(fd, data_data, 64 * sizeof(int32_t)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int n = gd_getdata(D, "data", 5, 0, 1, 0, GD_INT32, c); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + n = gd_getdata(D, "data", 5, 0, 1, 0, GD_INT32, c); - int error = gd_error(D); + error = gd_error(D); CHECKI(error, 0); CHECKI(n, 8); diff -Nru libgetdata-0.7.0/test/get_int64.c libgetdata-0.7.1/test/get_int64.c --- libgetdata-0.7.0/test/get_int64.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/get_int64.c 2010-11-28 01:49:41.000000000 +0000 @@ -18,7 +18,8 @@ const char* format_data = "data RAW INT64 8\n"; int64_t c[8]; int64_t data_data[64]; - int fd, i, r = 0; + int fd, i, n, error, r = 0; + DIRFILE *D; memset(c, 0, 8); mkdir(filedir, 0777); @@ -34,10 +35,10 @@ write(fd, data_data, 64 * sizeof(int64_t)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int n = gd_getdata(D, "data", 5, 0, 1, 0, GD_UINT64, c); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + n = gd_getdata(D, "data", 5, 0, 1, 0, GD_UINT64, c); - int error = gd_error(D); + error = gd_error(D); CHECKI(error, 0); CHECKI(n, 8); diff -Nru libgetdata-0.7.0/test/get_int8.c libgetdata-0.7.1/test/get_int8.c --- libgetdata-0.7.0/test/get_int8.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/get_int8.c 2010-11-28 01:49:47.000000000 +0000 @@ -17,7 +17,8 @@ const char* format_data = "data RAW INT8 8\n"; signed char c[8]; signed char data_data[128]; - int fd, i, r = 0; + int fd, i, n, error, r = 0; + DIRFILE *D; memset(c, 0, 8); mkdir(filedir, 0777); @@ -33,9 +34,9 @@ write(fd, data_data, 128); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int n = gd_getdata(D, "data", 5, 0, 1, 0, GD_INT8, c); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + n = gd_getdata(D, "data", 5, 0, 1, 0, GD_INT8, c); + error = gd_error(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/get_lincom1.c libgetdata-0.7.1/test/get_lincom1.c --- libgetdata-0.7.0/test/get_lincom1.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/get_lincom1.c 2010-11-28 01:50:04.000000000 +0000 @@ -17,7 +17,8 @@ const char* format_data = "lincom LINCOM 1 data 2 3\ndata RAW UINT8 1\n"; unsigned char c = 0; unsigned char data_data[256]; - int fd, r = 0; + int fd, n, error, r = 0; + DIRFILE *D; mkdir(filedir, 0777); @@ -32,9 +33,9 @@ write(fd, data_data, 256); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int n = gd_getdata(D, "lincom", 5, 0, 1, 0, GD_UINT8, &c); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + n = gd_getdata(D, "lincom", 5, 0, 1, 0, GD_UINT8, &c); + error = gd_error(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/get_lincom2.c libgetdata-0.7.1/test/get_lincom2.c --- libgetdata-0.7.0/test/get_lincom2.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/get_lincom2.c 2010-11-28 01:50:14.000000000 +0000 @@ -17,7 +17,8 @@ const char* format_data = "lincom LINCOM 2 data 2 3 data 1 0\ndata RAW UINT8 1\n"; unsigned char c = 0; unsigned char data_data[256]; - int fd, r = 0; + int fd, n, error, r = 0; + DIRFILE *D; mkdir(filedir, 0777); @@ -32,9 +33,9 @@ write(fd, data_data, 256); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int n = gd_getdata(D, "lincom", 5, 0, 1, 0, GD_UINT8, &c); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + n = gd_getdata(D, "lincom", 5, 0, 1, 0, GD_UINT8, &c); + error = gd_error(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/get_lincom3.c libgetdata-0.7.1/test/get_lincom3.c --- libgetdata-0.7.0/test/get_lincom3.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/get_lincom3.c 2010-11-28 01:50:39.000000000 +0000 @@ -17,7 +17,8 @@ const char* format_data = "lincom LINCOM 3 data 2 3 data 1 0 data 10 4\ndata RAW UINT8 1\n"; unsigned char c = 0; unsigned char data_data[256]; - int fd, r = 0; + int fd, n, error, r = 0; + DIRFILE *D; mkdir(filedir, 0777); @@ -32,9 +33,9 @@ write(fd, data_data, 256); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int n = gd_getdata(D, "lincom", 5, 0, 1, 0, GD_UINT8, &c); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + n = gd_getdata(D, "lincom", 5, 0, 1, 0, GD_UINT8, &c); + error = gd_error(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/get_lincom_noin.c libgetdata-0.7.1/test/get_lincom_noin.c --- libgetdata-0.7.0/test/get_lincom_noin.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/get_lincom_noin.c 2010-11-28 01:50:45.000000000 +0000 @@ -15,7 +15,8 @@ const char* format = __TEST__ "dirfile/format"; const char* format_data = "lincom LINCOM 1 data 2 3\n"; unsigned char c = 0; - int fd, r = 0; + int fd, n, error, r = 0; + DIRFILE *D; mkdir(filedir, 0777); @@ -23,10 +24,10 @@ write(fd, format_data, strlen(format_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY); - int n = gd_getdata(D, "lincom", 5, 0, 1, 0, GD_UINT8, &c); + D = gd_open(filedir, GD_RDONLY); + n = gd_getdata(D, "lincom", 5, 0, 1, 0, GD_UINT8, &c); - int error = gd_error(D); + error = gd_error(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/get_lincom_non.c libgetdata-0.7.1/test/get_lincom_non.c --- libgetdata-0.7.0/test/get_lincom_non.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/get_lincom_non.c 2010-11-28 01:50:53.000000000 +0000 @@ -17,7 +17,8 @@ const char* format_data = "lincom LINCOM data 2 3 data 1 0\ndata RAW UINT8 1\n"; unsigned char c = 0; unsigned char data_data[256]; - int fd, r = 0; + int fd, n, error, r = 0; + DIRFILE *D; mkdir(filedir, 0777); @@ -32,9 +33,9 @@ write(fd, data_data, 256); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int n = gd_getdata(D, "lincom", 5, 0, 1, 0, GD_UINT8, &c); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + n = gd_getdata(D, "lincom", 5, 0, 1, 0, GD_UINT8, &c); + error = gd_error(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/get_linterp.c libgetdata-0.7.1/test/get_linterp.c --- libgetdata-0.7.0/test/get_linterp.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/get_linterp.c 2010-11-28 01:51:37.000000000 +0000 @@ -19,7 +19,9 @@ const char* format_data = "linterp LINTERP data ./table\ndata RAW UINT8 1\n"; unsigned char c = 0; unsigned char data_data[64]; - int fd, i, r = 0; + int fd, i, n, error, r = 0; + DIRFILE *D; + FILE *t; mkdir(filedir, 0777); @@ -34,14 +36,14 @@ write(fd, data_data, 64); close(fd); - FILE* t = fopen(table, "wt"); + t = fopen(table, "wt"); for (i = 0; i < 10; ++i) fprintf(t, "%i %i\n", i * 6, i * 12); fclose(t); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int n = gd_getdata(D, "linterp", 5, 0, 1, 0, GD_UINT8, &c); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + n = gd_getdata(D, "linterp", 5, 0, 1, 0, GD_UINT8, &c); + error = gd_error(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/get_linterp_noin.c libgetdata-0.7.1/test/get_linterp_noin.c --- libgetdata-0.7.0/test/get_linterp_noin.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/get_linterp_noin.c 2010-11-28 01:51:54.000000000 +0000 @@ -17,7 +17,9 @@ const char* table = __TEST__ "dirfile/table"; const char* format_data = "linterp LINTERP data ./table\n"; unsigned char c = 0; - int fd, i, r = 0; + int fd, i, n, error, r = 0; + DIRFILE *D; + FILE *t; mkdir(filedir, 0777); @@ -25,14 +27,14 @@ write(fd, format_data, strlen(format_data)); close(fd); - FILE* t = fopen(table, "wt"); + t = fopen(table, "wt"); for (i = 0; i < 10; ++i) fprintf(t, "%i %i\n", i * 6, i * 12); fclose(t); - DIRFILE* D = gd_open(filedir, GD_RDONLY); - int n = gd_getdata(D, "linterp", 5, 0, 1, 0, GD_UINT8, &c); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY); + n = gd_getdata(D, "linterp", 5, 0, 1, 0, GD_UINT8, &c); + error = gd_error(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/get_linterp_notab.c libgetdata-0.7.1/test/get_linterp_notab.c --- libgetdata-0.7.0/test/get_linterp_notab.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/get_linterp_notab.c 2010-11-28 01:52:09.000000000 +0000 @@ -18,7 +18,8 @@ const char* format_data = "linterp LINTERP data ./table\ndata RAW UINT8 1\n"; unsigned char c = 0; unsigned char data_data[64]; - int fd, r = 0; + int fd, n1, error1, n2, error2, r = 0; + DIRFILE *D; mkdir(filedir, 0777); @@ -33,11 +34,11 @@ write(fd, data_data, 64); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY); - int n1 = gd_getdata(D, "linterp", 5, 0, 1, 0, GD_UINT8, &c); - int error1 = gd_error(D); - int n2 = gd_getdata(D, "linterp", 5, 0, 1, 0, GD_UINT8, &c); - int error2 = gd_error(D); + D = gd_open(filedir, GD_RDONLY); + n1 = gd_getdata(D, "linterp", 5, 0, 1, 0, GD_UINT8, &c); + error1 = gd_error(D); + n2 = gd_getdata(D, "linterp", 5, 0, 1, 0, GD_UINT8, &c); + error2 = gd_error(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/get_linterp_sort.c libgetdata-0.7.1/test/get_linterp_sort.c --- libgetdata-0.7.0/test/get_linterp_sort.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/get_linterp_sort.c 2010-11-28 01:52:36.000000000 +0000 @@ -19,7 +19,9 @@ const char* format_data = "linterp LINTERP data ./table\ndata RAW UINT8 1\n"; unsigned char c = 0; unsigned char data_data[64]; - int fd, r = 0; + int fd, n, error, r = 0; + DIRFILE *D; + FILE *t; mkdir(filedir, 0777); @@ -34,13 +36,13 @@ write(fd, data_data, 64); close(fd); - FILE* t = fopen(table, "wt"); + t = fopen(table, "wt"); fprintf(t, "%s", "100 600\n2 4\n50 100\n0 0\n7 14\n"); fclose(t); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int n = gd_getdata(D, "linterp", 5, 0, 1, 0, GD_UINT8, &c); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + n = gd_getdata(D, "linterp", 5, 0, 1, 0, GD_UINT8, &c); + error = gd_error(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/get_multiply.c libgetdata-0.7.1/test/get_multiply.c --- libgetdata-0.7.0/test/get_multiply.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/get_multiply.c 2010-11-28 01:52:42.000000000 +0000 @@ -17,7 +17,8 @@ const char* format_data = "mult MULTIPLY data data\ndata RAW UINT8 1\n"; unsigned char c = 0; unsigned char data_data[256]; - int fd, r = 0; + int fd, n, error, r = 0; + DIRFILE *D; mkdir(filedir, 0777); @@ -32,9 +33,9 @@ write(fd, data_data, 256); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int n = gd_getdata(D, "mult", 5, 0, 1, 0, GD_UINT8, &c); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + n = gd_getdata(D, "mult", 5, 0, 1, 0, GD_UINT8, &c); + error = gd_error(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/get_multiply_noin.c libgetdata-0.7.1/test/get_multiply_noin.c --- libgetdata-0.7.0/test/get_multiply_noin.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/get_multiply_noin.c 2010-11-28 01:52:55.000000000 +0000 @@ -17,7 +17,8 @@ const char* format_data = "mult MULTIPLY data data\n"; unsigned char c = 0; unsigned char data_data[256]; - int fd, r = 0; + int fd, n, error, r = 0; + DIRFILE *D; mkdir(filedir, 0777); @@ -32,10 +33,10 @@ write(fd, data_data, 256); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY); - int n = gd_getdata(D, "mult", 5, 0, 1, 0, GD_UINT8, &c); + D = gd_open(filedir, GD_RDONLY); + n = gd_getdata(D, "mult", 5, 0, 1, 0, GD_UINT8, &c); - int error = gd_error(D); + error = gd_error(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/get_nonexistent.c libgetdata-0.7.1/test/get_nonexistent.c --- libgetdata-0.7.0/test/get_nonexistent.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/get_nonexistent.c 2010-11-28 01:53:11.000000000 +0000 @@ -15,7 +15,8 @@ const char* format = __TEST__ "dirfile/format"; const char* format_data = "data RAW UINT8 1\n"; unsigned char c[8]; - int fd, r = 0; + int fd, n, error, r = 0; + DIRFILE *D; memset(c, 0, 8); mkdir(filedir, 0777); @@ -24,10 +25,10 @@ write(fd, format_data, strlen(format_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY); - int n = gd_getdata(D, "data", 5, 0, 1, 0, GD_UINT8, c); + D = gd_open(filedir, GD_RDONLY); + n = gd_getdata(D, "data", 5, 0, 1, 0, GD_UINT8, c); - int error = gd_error(D); + error = gd_error(D); gd_close(D); unlink(format); diff -Nru libgetdata-0.7.0/test/get_null.c libgetdata-0.7.1/test/get_null.c --- libgetdata-0.7.0/test/get_null.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/get_null.c 2010-11-28 01:53:17.000000000 +0000 @@ -16,7 +16,8 @@ const char* data = __TEST__ "dirfile/data"; const char* format_data = "data RAW UINT8 8\n"; unsigned char data_data[256]; - int fd, r = 0; + int fd, n, error, r = 0; + DIRFILE *D; mkdir(filedir, 0777); @@ -31,9 +32,9 @@ write(fd, data_data, 256); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int n = gd_getdata(D, "data", 5, 0, 1, 0, GD_NULL, NULL); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + n = gd_getdata(D, "data", 5, 0, 1, 0, GD_NULL, NULL); + error = gd_error(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/get_off64.c libgetdata-0.7.1/test/get_off64.c --- libgetdata-0.7.0/test/get_off64.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/get_off64.c 2010-11-28 01:53:25.000000000 +0000 @@ -26,7 +26,8 @@ const char* format_data = "data RAW UINT8 8\n"; unsigned char c[8]; unsigned char data_data[256]; - int fd, i, r = 0; + int fd, i, n, error, r = 0; + DIRFILE *D; memset(c, 0, 8); mkdir(filedir, 0777); @@ -42,9 +43,9 @@ write(fd, data_data, 256); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int n = gd_getdata(D, "data", 5, 0, 1, 0, GD_UINT8, c); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + n = gd_getdata(D, "data", 5, 0, 1, 0, GD_UINT8, c); + error = gd_error(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/get_phase.c libgetdata-0.7.1/test/get_phase.c --- libgetdata-0.7.0/test/get_phase.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/get_phase.c 2010-11-28 01:53:32.000000000 +0000 @@ -18,7 +18,8 @@ const char* format_data = "phase PHASE data -2\ndata RAW UINT8 1\n"; unsigned char c = 0; unsigned char data_data[256]; - int fd, r = 0; + int fd, n, error, r = 0; + DIRFILE *D; mkdir(filedir, 0777); @@ -33,9 +34,9 @@ write(fd, data_data, 256); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int n = gd_getdata(D, "phase", 5, 0, 1, 0, GD_UINT8, &c); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + n = gd_getdata(D, "phase", 5, 0, 1, 0, GD_UINT8, &c); + error = gd_error(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/get_polynom.c libgetdata-0.7.1/test/get_polynom.c --- libgetdata-0.7.0/test/get_polynom.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/get_polynom.c 2010-11-28 01:53:40.000000000 +0000 @@ -18,7 +18,8 @@ const char* format_data = "polynom POLYNOM data 3 2 1\ndata RAW UINT8 1\n"; unsigned char c = 0; unsigned char data_data[256]; - int fd, r = 0; + int fd, n, error, r = 0; + DIRFILE *D; mkdir(filedir, 0777); @@ -33,9 +34,9 @@ write(fd, data_data, 256); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int n = gd_getdata(D, "polynom", 5, 0, 1, 0, GD_UINT8, &c); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + n = gd_getdata(D, "polynom", 5, 0, 1, 0, GD_UINT8, &c); + error = gd_error(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/get_polynom_noin.c libgetdata-0.7.1/test/get_polynom_noin.c --- libgetdata-0.7.0/test/get_polynom_noin.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/get_polynom_noin.c 2010-11-28 01:53:48.000000000 +0000 @@ -15,7 +15,8 @@ const char* format = __TEST__ "dirfile/format"; const char* format_data = "polynom POLYNOM data 2 3\n"; unsigned char c = 0; - int fd, r = 0; + int fd, n, error, r = 0; + DIRFILE *D; mkdir(filedir, 0777); @@ -23,10 +24,10 @@ write(fd, format_data, strlen(format_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY); - int n = gd_getdata(D, "lincom", 5, 0, 1, 0, GD_UINT8, &c); + D = gd_open(filedir, GD_RDONLY); + n = gd_getdata(D, "lincom", 5, 0, 1, 0, GD_UINT8, &c); - int error = gd_error(D); + error = gd_error(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/get_recip.c libgetdata-0.7.1/test/get_recip.c --- libgetdata-0.7.0/test/get_recip.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/get_recip.c 2010-11-28 01:53:54.000000000 +0000 @@ -19,7 +19,8 @@ "data RAW UINT8 1\n"; double c = 0; unsigned char data_data[256]; - int fd, r = 0; + int fd, n, error, r = 0; + DIRFILE *D; mkdir(filedir, 0777); @@ -34,9 +35,9 @@ write(fd, data_data, 256); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int n = gd_getdata(D, "div", 5, 0, 1, 0, GD_FLOAT64, &c); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + n = gd_getdata(D, "div", 5, 0, 1, 0, GD_FLOAT64, &c); + error = gd_error(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/get_recip_const.c libgetdata-0.7.1/test/get_recip_const.c --- libgetdata-0.7.0/test/get_recip_const.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/get_recip_const.c 2010-11-28 01:54:01.000000000 +0000 @@ -20,7 +20,8 @@ "data RAW UINT8 1\n"; double c = 0; unsigned char data_data[256]; - int fd, r = 0; + int fd, n, error, r = 0; + DIRFILE *D; mkdir(filedir, 0777); @@ -35,9 +36,9 @@ write(fd, data_data, 256); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int n = gd_getdata(D, "div", 5, 0, 1, 0, GD_FLOAT64, &c); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + n = gd_getdata(D, "div", 5, 0, 1, 0, GD_FLOAT64, &c); + error = gd_error(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/get_recurse.c libgetdata-0.7.1/test/get_recurse.c --- libgetdata-0.7.0/test/get_recurse.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/get_recurse.c 2010-11-28 01:54:07.000000000 +0000 @@ -16,8 +16,9 @@ const char* format_data = "in1 RAW UINT8 11\n" "lincom LINCOM 2 lincom 1 0 in1 1 0\n"; - int fd, r = 0; unsigned char c[8]; + int fd, n, error, r = 0; + DIRFILE *D; mkdir(filedir, 0777); @@ -25,9 +26,9 @@ write(fd, format_data, strlen(format_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY); - int n = gd_getdata(D, "lincom", 5, 0, 1, 0, GD_UINT8, c); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY); + n = gd_getdata(D, "lincom", 5, 0, 1, 0, GD_UINT8, c); + error = gd_error(D); gd_close(D); unlink(format); diff -Nru libgetdata-0.7.0/test/get_sbit.c libgetdata-0.7.1/test/get_sbit.c --- libgetdata-0.7.0/test/get_sbit.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/get_sbit.c 2010-11-28 01:54:15.000000000 +0000 @@ -19,7 +19,8 @@ const char* format_data = "bit SBIT data 7 4\ndata RAW UINT16 1\n"; int16_t c[10]; uint16_t data_data[256]; - int fd, r = 0; + int fd, n, error, r = 0; + DIRFILE *D; mkdir(filedir, 0777); @@ -34,9 +35,9 @@ write(fd, data_data, 256 * sizeof(uint16_t)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int n = gd_getdata(D, "bit", 5, 0, 10, 0, GD_INT16, c); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + n = gd_getdata(D, "bit", 5, 0, 10, 0, GD_INT16, c); + error = gd_error(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/get_sf.c libgetdata-0.7.1/test/get_sf.c --- libgetdata-0.7.0/test/get_sf.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/get_sf.c 2010-11-28 01:54:22.000000000 +0000 @@ -17,7 +17,8 @@ const char* format_data = "data RAW UINT8 8\n"; unsigned char c[8]; unsigned char data_data[256]; - int fd, i, r = 0; + int fd, i, n, error, r = 0; + DIRFILE *D; memset(c, 0, 8); mkdir(filedir, 0777); @@ -33,9 +34,9 @@ write(fd, data_data, 256); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int n = gd_getdata(D, "data", 0, 40, 1, 0, GD_UINT8, c); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + n = gd_getdata(D, "data", 0, 40, 1, 0, GD_UINT8, c); + error = gd_error(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/get_ss.c libgetdata-0.7.1/test/get_ss.c --- libgetdata-0.7.0/test/get_ss.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/get_ss.c 2010-11-28 01:54:29.000000000 +0000 @@ -17,7 +17,8 @@ const char* format_data = "data RAW UINT8 8\n"; unsigned char c[8]; unsigned char data_data[256]; - int fd, i, r = 0; + int fd, i, n, error, r = 0; + DIRFILE *D; memset(c, 0, 8); mkdir(filedir, 0777); @@ -33,9 +34,9 @@ write(fd, data_data, 256); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int n = gd_getdata(D, "data", 0, 40, 0, 8, GD_UINT8, c); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + n = gd_getdata(D, "data", 0, 40, 0, 8, GD_UINT8, c); + error = gd_error(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/get_type.c libgetdata-0.7.1/test/get_type.c --- libgetdata-0.7.0/test/get_type.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/get_type.c 2010-11-28 01:54:36.000000000 +0000 @@ -17,7 +17,8 @@ const char* format_data = "data RAW UINT8 8\n"; unsigned char c[8]; unsigned char data_data[256]; - int fd, r = 0; + int fd, n, error, r = 0; + DIRFILE *D; memset(c, 0, 8); mkdir(filedir, 0777); @@ -33,10 +34,10 @@ write(fd, data_data, 256); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY); - int n = gd_getdata(D, "data", 5, 0, 1, 0, GD_UNKNOWN, c); + D = gd_open(filedir, GD_RDONLY); + n = gd_getdata(D, "data", 5, 0, 1, 0, GD_UNKNOWN, c); - int error = gd_error(D); + error = gd_error(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/get_uint16.c libgetdata-0.7.1/test/get_uint16.c --- libgetdata-0.7.0/test/get_uint16.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/get_uint16.c 2010-11-28 01:54:47.000000000 +0000 @@ -18,7 +18,8 @@ const char* format_data = "data RAW UINT16 8\n"; uint16_t c[8], i; uint16_t data_data[128]; - int fd, r = 0; + int fd, n, error, r = 0; + DIRFILE *D; memset(c, 0, 8); mkdir(filedir, 0777); @@ -34,9 +35,9 @@ write(fd, data_data, 128 * sizeof(uint16_t)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int n = gd_getdata(D, "data", 5, 0, 1, 0, GD_UINT16, c); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + n = gd_getdata(D, "data", 5, 0, 1, 0, GD_UINT16, c); + error = gd_error(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/get_uint32.c libgetdata-0.7.1/test/get_uint32.c --- libgetdata-0.7.0/test/get_uint32.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/get_uint32.c 2010-11-28 01:54:54.000000000 +0000 @@ -18,7 +18,8 @@ const char* format_data = "data RAW UINT32 8\n"; uint32_t c[8], i; uint32_t data_data[128]; - int fd, r = 0; + int fd, n, error, r = 0; + DIRFILE *D; memset(c, 0, 8); mkdir(filedir, 0777); @@ -34,10 +35,10 @@ write(fd, data_data, 128 * sizeof(uint32_t)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int n = gd_getdata(D, "data", 5, 0, 1, 0, GD_UINT32, c); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + n = gd_getdata(D, "data", 5, 0, 1, 0, GD_UINT32, c); - int error = gd_error(D); + error = gd_error(D); CHECKI(error, 0); CHECKI(n, 8); diff -Nru libgetdata-0.7.0/test/get_uint64.c libgetdata-0.7.1/test/get_uint64.c --- libgetdata-0.7.0/test/get_uint64.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/get_uint64.c 2010-11-28 01:55:09.000000000 +0000 @@ -18,7 +18,8 @@ const char* format_data = "data RAW UINT64 8\n"; uint64_t c[8]; uint64_t data_data[128]; - int fd, i, r = 0; + int fd, i, n, error, r = 0; + DIRFILE *D; memset(c, 0, 8); mkdir(filedir, 0777); @@ -34,10 +35,10 @@ write(fd, data_data, 128 * sizeof(uint64_t)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int n = gd_getdata(D, "data", 5, 0, 1, 0, GD_UINT64, c); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + n = gd_getdata(D, "data", 5, 0, 1, 0, GD_UINT64, c); - int error = gd_error(D); + error = gd_error(D); CHECKI(error, 0); CHECKI(n, 8); for (i = 0; i < 8; ++i) diff -Nru libgetdata-0.7.0/test/get_zero.c libgetdata-0.7.1/test/get_zero.c --- libgetdata-0.7.0/test/get_zero.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/get_zero.c 2010-11-28 01:55:54.000000000 +0000 @@ -18,7 +18,8 @@ const char* format_data = "/FRAMEOFFSET 100\ndata RAW UINT8 8\n"; unsigned char c[8]; unsigned char data_data[256]; - int fd, i, r = 0; + int fd, i, n, error, r = 0; + DIRFILE *D; memset(c, 0, 8); mkdir(filedir, 0777); @@ -34,9 +35,9 @@ write(fd, data_data, 256); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int n = gd_getdata(D, "data", 5, 0, 1, 0, GD_UINT8, c); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + n = gd_getdata(D, "data", 5, 0, 1, 0, GD_UINT8, c); + error = gd_error(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/global_name.c libgetdata-0.7.1/test/global_name.c --- libgetdata-0.7.0/test/global_name.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/global_name.c 2010-11-28 02:01:13.000000000 +0000 @@ -16,17 +16,19 @@ const char* filedir = __TEST__ "dirfile"; const char* format = __TEST__ "dirfile/format"; const char* format_data = "data1 CONST UINT8 1\n"; - int r = 0; + int fd, error, r = 0; + DIRFILE *D; + char *name; mkdir(filedir, 0777); - int fd = open(format, O_CREAT | O_EXCL | O_WRONLY, 0666); + fd = open(format, O_CREAT | O_EXCL | O_WRONLY, 0666); write(fd, format_data, strlen(format_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - const char* name = strdup(gd_dirfilename(D)); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + name = strdup(gd_dirfilename(D)); + error = gd_error(D); gd_close(D); unlink(format); @@ -34,6 +36,7 @@ CHECKI(error, GD_E_OK); CHECKS(name, filedir); + free(name); return r; } diff -Nru libgetdata-0.7.0/test/global_ref.c libgetdata-0.7.1/test/global_ref.c --- libgetdata-0.7.0/test/global_ref.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/global_ref.c 2010-11-28 02:01:20.000000000 +0000 @@ -16,17 +16,19 @@ const char* filedir = __TEST__ "dirfile"; const char* format = __TEST__ "dirfile/format"; const char* format_data = "data RAW UINT8 1\n"; - int r = 0; + int fd, error, r = 0; + char *ref; + DIRFILE *D; mkdir(filedir, 0777); - int fd = open(format, O_CREAT | O_EXCL | O_WRONLY, 0666); + fd = open(format, O_CREAT | O_EXCL | O_WRONLY, 0666); write(fd, format_data, strlen(format_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - const char* ref = strdup(gd_reference(D, NULL)); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + ref = strdup(gd_reference(D, NULL)); + error = gd_error(D); gd_close(D); unlink(format); @@ -34,6 +36,7 @@ CHECKI(error, 0); CHECKS(ref, "data"); + free(ref); return r; } diff -Nru libgetdata-0.7.0/test/global_ref_empty.c libgetdata-0.7.1/test/global_ref_empty.c --- libgetdata-0.7.0/test/global_ref_empty.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/global_ref_empty.c 2010-11-28 01:56:57.000000000 +0000 @@ -16,17 +16,19 @@ const char* filedir = __TEST__ "dirfile"; const char* format = __TEST__ "dirfile/format"; const char* format_data = "data CONST UINT8 1\n"; - int r = 0; + int fd, error, r = 0; + const char *ref; + DIRFILE *D; mkdir(filedir, 0777); - int fd = open(format, O_CREAT | O_EXCL | O_WRONLY, 0666); + fd = open(format, O_CREAT | O_EXCL | O_WRONLY, 0666); write(fd, format_data, strlen(format_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - const char* ref = gd_reference(D, NULL); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + ref = gd_reference(D, NULL); + error = gd_error(D); gd_close(D); unlink(format); diff -Nru libgetdata-0.7.0/test/global_ref_set.c libgetdata-0.7.1/test/global_ref_set.c --- libgetdata-0.7.0/test/global_ref_set.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/global_ref_set.c 2010-11-28 02:01:32.000000000 +0000 @@ -17,17 +17,19 @@ const char* format = __TEST__ "dirfile/format"; const char* format_data = "data1 RAW UINT8 1\n" "data2 RAW UINT8 1\n"; - int r = 0; + int fd, error, r = 0; + char *ref; + DIRFILE *D; mkdir(filedir, 0777); - int fd = open(format, O_CREAT | O_EXCL | O_WRONLY, 0666); + fd = open(format, O_CREAT | O_EXCL | O_WRONLY, 0666); write(fd, format_data, strlen(format_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDWR | GD_VERBOSE); - const char* ref = strdup(gd_reference(D, "data2")); - int error = gd_error(D); + D = gd_open(filedir, GD_RDWR | GD_VERBOSE); + ref = strdup(gd_reference(D, "data2")); + error = gd_error(D); gd_close(D); unlink(format); @@ -35,6 +37,7 @@ CHECKI(error, GD_E_OK); CHECKS(ref, "data2"); + free(ref); return r; } diff -Nru libgetdata-0.7.0/test/gzip_get.c libgetdata-0.7.1/test/gzip_get.c --- libgetdata-0.7.0/test/gzip_get.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/gzip_get.c 2010-11-28 01:57:43.000000000 +0000 @@ -24,7 +24,8 @@ uint16_t c[8]; char command[4096]; uint16_t data_data[256]; - int fd, r = 0; + int fd, i, n, error, r = 0; + DIRFILE *D; memset(c, 0, 8); mkdir(filedir, 0777); @@ -46,12 +47,12 @@ return 1; #ifdef USE_GZIP - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); #else - DIRFILE* D = gd_open(filedir, GD_RDONLY); + D = gd_open(filedir, GD_RDONLY); #endif - int n = gd_getdata(D, "data", 5, 0, 1, 0, GD_UINT16, c); - int error = gd_error(D); + n = gd_getdata(D, "data", 5, 0, 1, 0, GD_UINT16, c); + error = gd_error(D); gd_close(D); @@ -60,8 +61,6 @@ rmdir(filedir); #ifdef USE_GZIP - int i; - CHECKI(error, 0); CHECKI(n, 8); diff -Nru libgetdata-0.7.0/test/gzip_get_get.c libgetdata-0.7.1/test/gzip_get_get.c --- libgetdata-0.7.0/test/gzip_get_get.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/gzip_get_get.c 2010-11-28 01:58:08.000000000 +0000 @@ -25,7 +25,8 @@ uint16_t c1[8], c2[8]; char command[4096]; uint16_t data_data[256]; - int fd, i, r = 0; + int fd, i, n1, error1, n2, error2, r = 0; + DIRFILE *D; memset(c1, 0, 16); memset(c2, 0, 16); @@ -47,14 +48,14 @@ if (gd_system(command)) return 1; - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int n1 = gd_getdata(D, "data", 5, 0, 1, 0, GD_UINT16, c1); - int error1 = gd_error(D); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + n1 = gd_getdata(D, "data", 5, 0, 1, 0, GD_UINT16, c1); + error1 = gd_error(D); gd_close(D); D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int n2 = gd_getdata(D, "data", 5, 0, 1, 0, GD_UINT16, c2); - int error2 = gd_error(D); + n2 = gd_getdata(D, "data", 5, 0, 1, 0, GD_UINT16, c2); + error2 = gd_error(D); gd_close(D); unlink(gzipdata); diff -Nru libgetdata-0.7.0/test/gzip_move_from.c libgetdata-0.7.1/test/gzip_move_from.c --- libgetdata-0.7.0/test/gzip_move_from.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/gzip_move_from.c 2010-11-28 02:01:04.000000000 +0000 @@ -25,9 +25,11 @@ "/INCLUDE format1\ndata RAW UINT16 11\nENCODING gzip\n"; const char* format1_data = "ENCODING none\n"; uint16_t data_data[128]; - int fd, r = 0; char command[4096]; + int fd, ret, ge_ret, unlink_data, unlink_gzdata, error, i = 0, r = 0; + DIRFILE *D; gd_entry_t E; + uint16_t d; mkdir(filedir, 0777); @@ -52,20 +54,17 @@ return 1; #ifdef USE_GZIP - DIRFILE* D = gd_open(filedir, GD_RDWR | GD_VERBOSE | GD_UNENCODED); + D = gd_open(filedir, GD_RDWR | GD_VERBOSE | GD_UNENCODED); #else - DIRFILE* D = gd_open(filedir, GD_RDWR | GD_UNENCODED); + D = gd_open(filedir, GD_RDWR | GD_UNENCODED); #endif - int ret = gd_move(D, "data", 1, 1); - int error = gd_error(D); - int ge_ret = gd_entry(D, "data", &E); + ret = gd_move(D, "data", 1, 1); + error = gd_error(D); + ge_ret = gd_entry(D, "data", &E); gd_close(D); #ifdef USE_GZIP - uint16_t d; - fd = open(data, O_RDONLY | O_BINARY); - int i = 0; if (fd >= 0) { while (read(fd, &d, sizeof(uint16_t))) { @@ -81,8 +80,8 @@ unlink(format1); unlink(format); - int unlink_data = unlink(data); - int unlink_gzdata = unlink(gzdata); + unlink_data = unlink(data); + unlink_gzdata = unlink(gzdata); rmdir(filedir); #ifdef USE_GZIP @@ -100,6 +99,7 @@ CHECKI(unlink_data, -1); CHECKI(unlink_gzdata, 0); #endif + gd_free_entry_strings(&E); return r; } diff -Nru libgetdata-0.7.0/test/gzip_nframes.c libgetdata-0.7.1/test/gzip_nframes.c --- libgetdata-0.7.0/test/gzip_nframes.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/gzip_nframes.c 2010-11-28 01:59:48.000000000 +0000 @@ -20,7 +20,9 @@ const char* format_data = "data RAW UINT16 1\n"; char command[4096]; uint16_t data_data[256]; - int i, r = 0; + int i, error, r = 0; + size_t n; + DIRFILE *D; mkdir(filedir, 0777); @@ -41,12 +43,12 @@ return 1; #ifdef USE_GZIP - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); #else - DIRFILE* D = gd_open(filedir, GD_RDONLY); + D = gd_open(filedir, GD_RDONLY); #endif - size_t n = gd_nframes(D); - int error = gd_error(D); + n = gd_nframes(D); + error = gd_error(D); gd_close(D); unlink(gzipdata); diff -Nru libgetdata-0.7.0/test/header_complex.c libgetdata-0.7.1/test/header_complex.c --- libgetdata-0.7.0/test/header_complex.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/header_complex.c 2010-11-28 02:02:35.000000000 +0000 @@ -18,8 +18,10 @@ const char* format = __TEST__ "dirfile/format"; const char* format_data = "lincom LINCOM data 3.3;4.4 5.5;6.6 data 7.7;8.8 9.9;1.1\n"; - int fd, r = 0; + int fd, error, error2, error3, r = 0; + const double ca[] = { 2.1, 3.2, 4.3, 5.4, 6.5, 7.6 }; gd_entry_t E; + DIRFILE *D; mkdir(filedir, 0777); @@ -27,10 +29,10 @@ write(fd, format_data, strlen(format_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDWR | GD_VERBOSE); + D = gd_open(filedir, GD_RDWR | GD_VERBOSE); gd_entry(D, "lincom", &E); - int error = gd_error(D); + error = gd_error(D); CHECKI(error, 0); CHECKIi(0,E.comp_scal, 1); CHECKFi(0,E.EN(lincom,cm)[0][0], 3.3); @@ -41,18 +43,16 @@ CHECKFi(0,E.EN(lincom,cm)[1][1], 8.8); CHECKFi(0,E.EN(lincom,cb)[1][0], 9.9); CHECKFi(0,E.EN(lincom,cb)[1][1], 1.1); - gd_free_entry_strings(&E); - const double ca[] = { 2.1, 3.2, 4.3, 5.4, 6.5, 7.6 }; gd_add_cpolynom(D, "polynom", 2, "in", ca, 0); - int error2 = gd_error(D); + error2 = gd_error(D); CHECKI(error2, 0); gd_entry(D, "polynom", &E); - int error3 = gd_error(D); + error3 = gd_error(D); CHECKI(error3, 0); CHECKIi(1,E.EN(polynom,poly_ord),2); CHECKIi(1,E.comp_scal,1); @@ -62,6 +62,7 @@ CHECKFi(1,E.EN(polynom,ca)[1][1], ca[3]); CHECKFi(1,E.EN(polynom,ca)[2][0], ca[4]); CHECKFi(1,E.EN(polynom,ca)[2][1], ca[5]); + gd_free_entry_strings(&E); gd_close(D); diff -Nru libgetdata-0.7.0/test/include_accmode.c libgetdata-0.7.1/test/include_accmode.c --- libgetdata-0.7.0/test/include_accmode.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/include_accmode.c 2010-11-28 02:03:59.000000000 +0000 @@ -13,16 +13,17 @@ { const char* filedir = __TEST__ "dirfile"; const char* format = __TEST__ "dirfile/format"; - int fd, r = 0; + int fd, error, r = 0; + DIRFILE *D; mkdir(filedir, 0777); fd = open(format, O_CREAT | O_EXCL | O_WRONLY, 0666); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY); + D = gd_open(filedir, GD_RDONLY); gd_include(D, "format1", 0, GD_CREAT); - int error = gd_error(D); + error = gd_error(D); gd_close(D); unlink(format); diff -Nru libgetdata-0.7.0/test/include_auto.c libgetdata-0.7.1/test/include_auto.c --- libgetdata-0.7.0/test/include_auto.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/include_auto.c 2010-11-28 02:04:40.000000000 +0000 @@ -17,7 +17,11 @@ const char* format1 = __TEST__ "dirfile/format1"; const char* format_data = "#\n"; const char* format1_data = "data RAW UINT8 11\n"; - int fd, r = 0; + int fd, error1, error2, r = 0; + const char *ptr; + char *reference; + gd_spf_t spf; + DIRFILE *D; mkdir(filedir, 0777); @@ -29,13 +33,13 @@ write(fd, format1_data, strlen(format1_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDWR | GD_VERBOSE); + D = gd_open(filedir, GD_RDWR | GD_VERBOSE); gd_include(D, "format1", 0, GD_VERBOSE); - int error1 = gd_error(D); - const char* ptr = gd_reference(D, NULL); - const char* reference = strdup(ptr); - int error2 = gd_error(D); - unsigned int spf = gd_spf(D, "data"); + error1 = gd_error(D); + ptr = gd_reference(D, NULL); + reference = strdup(ptr); + error2 = gd_error(D); + spf = gd_spf(D, "data"); gd_close(D); unlink(format1); @@ -47,6 +51,7 @@ CHECKPN(ptr); CHECKS(reference, "data"); CHECKU(spf, 11); + free(reference); return r; } diff -Nru libgetdata-0.7.0/test/include.c libgetdata-0.7.1/test/include.c --- libgetdata-0.7.0/test/include.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/include.c 2010-11-28 02:03:47.000000000 +0000 @@ -16,7 +16,9 @@ const char* format1 = __TEST__ "dirfile/format1"; const char* format_data = "#\n"; const char* format1_data = "data RAW UINT8 11\n"; - int fd, r = 0; + int fd, error, r = 0; + gd_spf_t spf; + DIRFILE *D; mkdir(filedir, 0777); @@ -28,10 +30,10 @@ write(fd, format1_data, strlen(format1_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDWR | GD_VERBOSE); + D = gd_open(filedir, GD_RDWR | GD_VERBOSE); gd_include(D, "format1", 0, 0); - int error = gd_error(D); - unsigned int spf = gd_spf(D, "data"); + error = gd_error(D); + spf = gd_spf(D, "data"); gd_close(D); unlink(format1); diff -Nru libgetdata-0.7.0/test/include_cb.c libgetdata-0.7.1/test/include_cb.c --- libgetdata-0.7.0/test/include_cb.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/include_cb.c 2010-11-28 02:04:56.000000000 +0000 @@ -26,7 +26,8 @@ const char* format1 = __TEST__ "dirfile/format1"; const char* format_data = "#\n"; const char* format1_data = "data ROW UINT8 11\n"; - int fd, r = 0; + int fd, error, r = 0; + DIRFILE *D; mkdir(filedir, 0777); @@ -38,9 +39,9 @@ write(fd, format1_data, strlen(format1_data)); close(fd); - DIRFILE* D = gd_cbopen(filedir, GD_RDWR, callback, NULL); + D = gd_cbopen(filedir, GD_RDWR, callback, NULL); gd_include(D, "format1", 0, 0); - int error = gd_error(D); + error = gd_error(D); gd_close(D); unlink(format1); diff -Nru libgetdata-0.7.0/test/include_creat.c libgetdata-0.7.1/test/include_creat.c --- libgetdata-0.7.0/test/include_creat.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/include_creat.c 2010-11-28 02:05:11.000000000 +0000 @@ -14,19 +14,20 @@ const char* filedir = __TEST__ "dirfile"; const char* format = __TEST__ "dirfile/format"; const char* format1 = __TEST__ "dirfile/format1"; - int fd, r = 0; + int fd, error, unlink_format1, r = 0; + DIRFILE *D; mkdir(filedir, 0777); fd = open(format, O_CREAT | O_EXCL | O_WRONLY, 0666); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDWR | GD_VERBOSE); + D = gd_open(filedir, GD_RDWR | GD_VERBOSE); gd_include(D, "format1", 0, GD_CREAT); - int error = gd_error(D); + error = gd_error(D); gd_close(D); - int unlink_format1 = unlink(format1); + unlink_format1 = unlink(format1); unlink(format); rmdir(filedir); diff -Nru libgetdata-0.7.0/test/include_ignore.c libgetdata-0.7.1/test/include_ignore.c --- libgetdata-0.7.0/test/include_ignore.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/include_ignore.c 2010-11-28 02:05:37.000000000 +0000 @@ -17,7 +17,10 @@ const char* format1 = __TEST__ "dirfile/format1"; const char* format_data = "data1 RAW UINT8 1\n"; const char* format1_data = "data RAW UINT8 11\nREFERENCE data\n"; - int fd, r = 0; + int fd, error1, error2, r = 0; + char *reference; + gd_spf_t spf; + DIRFILE *D; mkdir(filedir, 0777); @@ -29,12 +32,12 @@ write(fd, format1_data, strlen(format1_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDWR | GD_VERBOSE); + D = gd_open(filedir, GD_RDWR | GD_VERBOSE); gd_include(D, "format1", 0, GD_IGNORE_REFS | GD_VERBOSE); - int error1 = gd_error(D); - const char* reference = strdup(gd_reference(D, NULL)); - int error2 = gd_error(D); - unsigned int spf = gd_spf(D, "data"); + error1 = gd_error(D); + reference = strdup(gd_reference(D, NULL)); + error2 = gd_error(D); + spf = gd_spf(D, "data"); gd_close(D); unlink(format1); @@ -45,6 +48,7 @@ CHECKI(error2, 0); CHECKS(reference, "data1"); CHECKU(spf, 11); + free(reference); return r; } diff -Nru libgetdata-0.7.0/test/include_index.c libgetdata-0.7.1/test/include_index.c --- libgetdata-0.7.0/test/include_index.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/include_index.c 2010-11-28 02:05:46.000000000 +0000 @@ -14,7 +14,8 @@ const char* filedir = __TEST__ "dirfile"; const char* format = __TEST__ "dirfile/format"; const char* format_data = "#\n"; - int fd, r = 0; + int fd, error, r = 0; + DIRFILE *D; mkdir(filedir, 0777); @@ -22,9 +23,9 @@ write(fd, format_data, strlen(format_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDWR); + D = gd_open(filedir, GD_RDWR); gd_include(D, "format1", 1, 0); - int error = gd_error(D); + error = gd_error(D); gd_close(D); unlink(format); diff -Nru libgetdata-0.7.0/test/include_invalid.c libgetdata-0.7.1/test/include_invalid.c --- libgetdata-0.7.0/test/include_invalid.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/include_invalid.c 2010-11-28 02:05:53.000000000 +0000 @@ -14,7 +14,8 @@ const char* filedir = __TEST__ "dirfile"; const char* format1 = __TEST__ "dirfile/format1"; const char* format1_data = "data RAW UINT8 11\n"; - int fd, r = 0; + int fd, error, r = 0; + DIRFILE *D; mkdir(filedir, 0777); @@ -22,9 +23,9 @@ write(fd, format1_data, strlen(format1_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY); + D = gd_open(filedir, GD_RDONLY); gd_include(D, "format1", 0, 0); - int error = gd_error(D); + error = gd_error(D); gd_close(D); unlink(format1); diff -Nru libgetdata-0.7.0/test/include_nonexistent.c libgetdata-0.7.1/test/include_nonexistent.c --- libgetdata-0.7.0/test/include_nonexistent.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/include_nonexistent.c 2010-11-28 02:06:07.000000000 +0000 @@ -14,7 +14,8 @@ const char* filedir = __TEST__ "dirfile"; const char* format = __TEST__ "dirfile/format"; const char* format_data = "#\n"; - int fd, r = 0; + int fd, error, r = 0; + DIRFILE *D; mkdir(filedir, 0777); @@ -22,9 +23,9 @@ write(fd, format_data, strlen(format_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDWR); + D = gd_open(filedir, GD_RDWR); gd_include(D, "format1", 0, 0); - int error = gd_error(D); + error = gd_error(D); gd_close(D); unlink(format); diff -Nru libgetdata-0.7.0/test/include_pc.c libgetdata-0.7.1/test/include_pc.c --- libgetdata-0.7.0/test/include_pc.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/include_pc.c 2010-11-28 02:06:17.000000000 +0000 @@ -26,7 +26,8 @@ const char* format1 = __TEST__ "dirfile/format1"; const char* format_data = "data PAW UINT8 1\n"; const char* format1_data = "data ROW UINT8 11\n"; - int fd, r = 0; + int fd, error, r = 0; + DIRFILE *D; mkdir(filedir, 0777); @@ -38,10 +39,10 @@ write(fd, format1_data, strlen(format1_data)); close(fd); - DIRFILE* D = gd_cbopen(filedir, GD_RDWR, callback, NULL); + D = gd_cbopen(filedir, GD_RDWR, callback, NULL); gd_parser_callback(D, NULL, NULL); gd_include(D, "format1", 0, 0); - int error = gd_error(D); + error = gd_error(D); gd_close(D); unlink(format1); diff -Nru libgetdata-0.7.0/test/include_ref.c libgetdata-0.7.1/test/include_ref.c --- libgetdata-0.7.0/test/include_ref.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/include_ref.c 2010-11-28 02:08:05.000000000 +0000 @@ -17,7 +17,10 @@ const char* format1 = __TEST__ "dirfile/format1"; const char* format_data = "data1 RAW UINT8 1\n"; const char* format1_data = "data RAW UINT8 11\nREFERENCE data\n"; - int fd, r = 0; + int fd, error1, error2, r = 0; + char *reference; + gd_spf_t spf; + DIRFILE *D; mkdir(filedir, 0777); @@ -29,12 +32,12 @@ write(fd, format1_data, strlen(format1_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDWR | GD_VERBOSE); + D = gd_open(filedir, GD_RDWR | GD_VERBOSE); gd_include(D, "format1", 0, GD_VERBOSE); - int error1 = gd_error(D); - const char* reference = strdup(gd_reference(D, NULL)); - int error2 = gd_error(D); - unsigned int spf = gd_spf(D, "data"); + error1 = gd_error(D); + reference = strdup(gd_reference(D, NULL)); + error2 = gd_error(D); + spf = gd_spf(D, "data"); gd_close(D); unlink(format1); @@ -45,6 +48,7 @@ CHECKI(error2, 0); CHECKS(reference, "data"); CHECKU(spf, 11); + free(reference); return r; } diff -Nru libgetdata-0.7.0/test/include_syntax.c libgetdata-0.7.1/test/include_syntax.c --- libgetdata-0.7.0/test/include_syntax.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/include_syntax.c 2010-11-28 02:06:48.000000000 +0000 @@ -17,7 +17,8 @@ const char* format1 = __TEST__ "dirfile/format1"; const char* format_data = "#\n"; const char* format1_data = "data ROW UINT8 11\n"; - int fd, r = 0; + int fd, error, r = 0; + DIRFILE *D; mkdir(filedir, 0777); @@ -29,9 +30,9 @@ write(fd, format1_data, strlen(format1_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDWR); + D = gd_open(filedir, GD_RDWR); gd_include(D, "format1", 0, 0); - int error = gd_error(D); + error = gd_error(D); gd_close(D); unlink(format1); diff -Nru libgetdata-0.7.0/test/index.c libgetdata-0.7.1/test/index.c --- libgetdata-0.7.0/test/index.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/index.c 2010-11-28 02:07:06.000000000 +0000 @@ -17,8 +17,9 @@ const char* format = __TEST__ "dirfile/format"; const char* data = __TEST__ "dirfile/data"; const char* format_data = "data RAW FLOAT64 1\n"; - double d[1000]; - int i, r = 0; + double d[1000], f1, f2, f3; + int i, error, r = 0; + DIRFILE *D; mkdir(filedir, 0777); @@ -33,11 +34,11 @@ write(i, d, 1000 * sizeof(double)); close(i); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - double f1 = gd_framenum(D, "data", 1.09); - double f2 = gd_framenum(D, "data", 1.49); - double f3 = gd_framenum(D, "data", 1.79); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + f1 = gd_framenum(D, "data", 1.09); + f2 = gd_framenum(D, "data", 1.49); + f3 = gd_framenum(D, "data", 1.79); + error = gd_error(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/index_domain.c libgetdata-0.7.1/test/index_domain.c --- libgetdata-0.7.0/test/index_domain.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/index_domain.c 2010-11-28 02:07:38.000000000 +0000 @@ -17,8 +17,9 @@ const char* format = __TEST__ "dirfile/format"; const char* data = __TEST__ "dirfile/data"; const char* format_data = "data RAW FLOAT64 1\n"; - double d[1000]; - int i, r = 0; + double d[1000], f1; + int i, error, r = 0; + DIRFILE *D; mkdir(filedir, 0777); @@ -33,9 +34,9 @@ write(i, d, sizeof(double)); close(i); - DIRFILE* D = gd_open(filedir, GD_RDONLY); - double f1 = gd_framenum(D, "data", 1.09); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY); + f1 = gd_framenum(D, "data", 1.09); + error = gd_error(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/index_range.c libgetdata-0.7.1/test/index_range.c --- libgetdata-0.7.0/test/index_range.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/index_range.c 2010-11-28 02:07:49.000000000 +0000 @@ -17,8 +17,9 @@ const char* format = __TEST__ "dirfile/format"; const char* data = __TEST__ "dirfile/data"; const char* format_data = "data RAW FLOAT64 1\n"; - double d[1000]; - int i, r = 0; + double d[1000], f1; + int i, error, r = 0; + DIRFILE *D; mkdir(filedir, 0777); @@ -33,9 +34,9 @@ write(i, d, 1000 * sizeof(double)); close(i); - DIRFILE* D = gd_open(filedir, GD_RDONLY); - double f1 = gd_framenum(D, "data", 1.09); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY); + f1 = gd_framenum(D, "data", 1.09); + error = gd_error(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/legacy_get.c libgetdata-0.7.1/test/legacy_get.c --- libgetdata-0.7.0/test/legacy_get.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/legacy_get.c 2010-11-28 02:13:42.000000000 +0000 @@ -20,7 +20,7 @@ const char* format_data = "data RAW UINT8 8\n"; unsigned char c[8]; unsigned char data_data[256]; - int fd, i, r = 0; + int fd, i, n, error, r = 0; memset(c, 0, 8); mkdir(filedir, 0777); @@ -36,8 +36,7 @@ write(fd, data_data, 256); close(fd); - int error; - int n = GetData(filedir, "data", 5, 0, 1, 0, 'c', c, &error); + n = GetData(filedir, "data", 5, 0, 1, 0, 'c', c, &error); CHECKI(error, 0); CHECKI(n, 8); diff -Nru libgetdata-0.7.0/test/legacy_get_put.c libgetdata-0.7.1/test/legacy_get_put.c --- libgetdata-0.7.0/test/legacy_get_put.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/legacy_get_put.c 2010-11-28 02:13:57.000000000 +0000 @@ -22,7 +22,7 @@ const char* format_data = "data RAW UINT8 8\n"; uint8_t c[8]; unsigned char data_data[256]; - int fd, i, r = 0; + int fd, i, get_error, put_error, n, r = 0; memset(c, 0, 8); mkdir(filedir, 0777); @@ -41,10 +41,8 @@ write(fd, data_data, 256); close(fd); - int get_error; GetData(filedir, "data", 5, 0, 1, 0, 'c', c, &get_error); - int put_error; - int n = PutData(filedir, "data", 5, 0, 1, 0, 'c', c, &put_error); + n = PutData(filedir, "data", 5, 0, 1, 0, 'c', c, &put_error); unlink(data); unlink(format); diff -Nru libgetdata-0.7.0/test/legacy_get_rofs.c libgetdata-0.7.1/test/legacy_get_rofs.c --- libgetdata-0.7.0/test/legacy_get_rofs.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/legacy_get_rofs.c 2010-11-28 02:14:06.000000000 +0000 @@ -20,7 +20,7 @@ const char* format_data = "data RAW UINT8 8\n"; unsigned char c[8]; unsigned char data_data[256]; - int fd, i, r = 0; + int fd, i, n, error, r = 0; memset(c, 0, 8); mkdir(filedir, 0777); @@ -36,8 +36,7 @@ write(fd, data_data, 256); close(fd); - int error; - int n = GetData(filedir, "data", 5, 0, 1, 0, 'c', c, &error); + n = GetData(filedir, "data", 5, 0, 1, 0, 'c', c, &error); unlink(data); unlink(format); diff -Nru libgetdata-0.7.0/test/legacy_nframes.c libgetdata-0.7.1/test/legacy_nframes.c --- libgetdata-0.7.0/test/legacy_nframes.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/legacy_nframes.c 2010-11-28 02:14:24.000000000 +0000 @@ -20,6 +20,7 @@ const char* format_data = "data RAW UINT8 1\n"; int fd, error, r = 0; const size_t len = strlen(data); + size_t n; mkdir(filedir, 0777); @@ -31,7 +32,7 @@ write(fd, data, len); close(fd); - size_t n = GetNFrames(filedir, &error, NULL); + n = GetNFrames(filedir, &error, NULL); unlink(data); unlink(format); diff -Nru libgetdata-0.7.0/test/legacy_put.c libgetdata-0.7.1/test/legacy_put.c --- libgetdata-0.7.0/test/legacy_put.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/legacy_put.c 2010-11-28 02:14:57.000000000 +0000 @@ -20,7 +20,7 @@ const char* data = __TEST__ "dirfile/data"; const char* format_data = "data RAW UINT8 8\n"; uint8_t c[8], d; - int fd, i, r = 0; + int fd, i, n, error, r = 0; memset(c, 0, 8); mkdir(filedir, 0777); @@ -32,17 +32,7 @@ write(fd, format_data, strlen(format_data)); close(fd); - int error; - int n = PutData(filedir, "data", 5, 0, 1, 0, 'c', c, &error); - - /* Hmmm... the legacy API has no way to flush data to disk, so the following - * test may report a false negative */ -#if 0 - struct stat buf; - int stat_ret = stat(data, &buf); - CHECKI(stat_ret, 0); - CHECKI(buf.st_size, 40 + 8 * sizeof(uint8_t)); -#endif + n = PutData(filedir, "data", 5, 0, 1, 0, 'c', c, &error); fd = open(data, O_RDONLY | O_BINARY); i = 0; diff -Nru libgetdata-0.7.0/test/legacy_spf.c libgetdata-0.7.1/test/legacy_spf.c --- libgetdata-0.7.0/test/legacy_spf.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/legacy_spf.c 2010-11-28 02:15:09.000000000 +0000 @@ -18,7 +18,8 @@ const char* filedir = __TEST__ "dirfile"; const char* format = __TEST__ "dirfile/format"; const char* format_data = "data RAW UINT8 11\n"; - int fd, r = 0; + int fd, error, r = 0; + unsigned int spf; mkdir(filedir, 0777); @@ -26,8 +27,7 @@ write(fd, format_data, strlen(format_data)); close(fd); - int error; - unsigned int spf = GetSamplesPerFrame(filedir, "data", &error); + spf = GetSamplesPerFrame(filedir, "data", &error); unlink(format); rmdir(filedir); diff -Nru libgetdata-0.7.0/test/lzma_get.c libgetdata-0.7.1/test/lzma_get.c --- libgetdata-0.7.0/test/lzma_get.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/lzma_get.c 2010-11-28 02:15:30.000000000 +0000 @@ -22,7 +22,8 @@ uint16_t c[8]; char command[4096]; uint16_t data_data[256]; - int fd, r = 0; + int fd, i, n, error, r = 0; + DIRFILE *D; memset(c, 0, 8); mkdir(filedir, 0777); @@ -44,12 +45,12 @@ return 1; #ifdef USE_LZMA - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); #else - DIRFILE* D = gd_open(filedir, GD_RDONLY); + D = gd_open(filedir, GD_RDONLY); #endif - int n = gd_getdata(D, "data", 5, 0, 1, 0, GD_UINT16, c); - int error = gd_error(D); + n = gd_getdata(D, "data", 5, 0, 1, 0, GD_UINT16, c); + error = gd_error(D); gd_close(D); @@ -58,8 +59,6 @@ rmdir(filedir); #ifdef USE_LZMA - int i; - CHECKI(error, 0); CHECKI(n, 8); for (i = 0; i < 8; ++i) diff -Nru libgetdata-0.7.0/test/lzma_nframes.c libgetdata-0.7.1/test/lzma_nframes.c --- libgetdata-0.7.0/test/lzma_nframes.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/lzma_nframes.c 2010-11-28 02:15:55.000000000 +0000 @@ -20,7 +20,9 @@ const char* format_data = "data RAW UINT16 1\n"; char command[4096]; uint16_t data_data[256]; - int i, r = 0; + int i, error, r = 0; + DIRFILE *D; + size_t n; mkdir(filedir, 0777); @@ -41,12 +43,12 @@ return 1; #ifdef USE_LZMA - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); #else - DIRFILE* D = gd_open(filedir, GD_RDONLY); + D = gd_open(filedir, GD_RDONLY); #endif - size_t n = gd_nframes(D); - int error = gd_error(D); + n = gd_nframes(D); + error = gd_error(D); gd_close(D); unlink(xzdata); diff -Nru libgetdata-0.7.0/test/madd_bit.c libgetdata-0.7.1/test/madd_bit.c --- libgetdata-0.7.0/test/madd_bit.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/madd_bit.c 2010-11-28 02:21:22.000000000 +0000 @@ -14,17 +14,17 @@ { const char* filedir = __TEST__ "dirfile"; const char* format = __TEST__ "dirfile/format"; - int r = 0; + int ge_error, error, r = 0; gd_entry_t e; DIRFILE* D = gd_open(filedir, GD_RDWR | GD_CREAT | GD_VERBOSE); gd_add_phase(D, "new", "in", 3, 0); gd_madd_bit(D, "new", "meta", "input", 1, 1); - int error = gd_error(D); + error = gd_error(D); /* check */ gd_entry(D, "new/meta", &e); - int ge_error = gd_error(D); + ge_error = gd_error(D); CHECKI(ge_error, 0); if (!r) { CHECKI(e.field_type, GD_BIT_ENTRY); diff -Nru libgetdata-0.7.0/test/madd_bit_invalid.c libgetdata-0.7.1/test/madd_bit_invalid.c --- libgetdata-0.7.0/test/madd_bit_invalid.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/madd_bit_invalid.c 2010-11-28 02:21:30.000000000 +0000 @@ -11,11 +11,11 @@ int main(void) { const char* filedir = __TEST__ "dirfile"; - int r = 0; + int error, r = 0; DIRFILE* D = gd_open(filedir, GD_RDONLY); gd_madd_bit(D, "new", "meta", "input", 1, 1); - int error = gd_error(D); + error = gd_error(D); gd_close(D); CHECKI(error, GD_E_BAD_DIRFILE); diff -Nru libgetdata-0.7.0/test/madd.c libgetdata-0.7.1/test/madd.c --- libgetdata-0.7.0/test/madd.c 2010-11-07 00:25:28.000000000 +0000 +++ libgetdata-0.7.1/test/madd.c 2010-11-28 02:21:05.000000000 +0000 @@ -15,8 +15,9 @@ const char* filedir = __TEST__ "dirfile"; const char* format = __TEST__ "dirfile/format"; const char* data = __TEST__ "dirfile/data"; - int r = 0; + int error, ge_error, n, r = 0; gd_entry_t e; + DIRFILE *D; gd_entry_t E; memset(&E, 0, sizeof(E)); @@ -26,17 +27,17 @@ E.EN(raw,spf) = 2; E.EN(raw,data_type) = GD_UINT8; - DIRFILE* D = gd_open(filedir, GD_RDWR | GD_CREAT | GD_VERBOSE); + D = gd_open(filedir, GD_RDWR | GD_CREAT | GD_VERBOSE); gd_add(D, &E); E.field_type = GD_CONST_ENTRY; E.EN(scalar,const_type) = GD_UINT8; gd_madd(D, &E, "data"); - int error = gd_error(D); + error = gd_error(D); /* check */ - int n = gd_nfields(D); + n = gd_nfields(D); gd_entry(D, "data/data", &e); - int ge_error = gd_error(D); + ge_error = gd_error(D); CHECKI(ge_error, 0); if (!r) { CHECKI(e.field_type, GD_CONST_ENTRY); diff -Nru libgetdata-0.7.0/test/madd_carray.c libgetdata-0.7.1/test/madd_carray.c --- libgetdata-0.7.0/test/madd_carray.c 2010-11-07 00:25:31.000000000 +0000 +++ libgetdata-0.7.1/test/madd_carray.c 2010-11-28 02:21:41.000000000 +0000 @@ -16,14 +16,13 @@ const char* format = __TEST__ "dirfile/format"; uint8_t val[] = {3, 4, 5, 6, 7}; uint8_t data[5]; - int n; - int r = 0; + int error, n, r = 0; gd_entry_t e; DIRFILE* D = gd_open(filedir, GD_RDWR | GD_CREAT | GD_VERBOSE); gd_add_phase(D, "new", "in", 3, 0); gd_madd_carray(D, "new", "data", GD_UINT8, 5, GD_UINT8, &val); - int error = gd_error(D); + error = gd_error(D); /* check */ gd_entry(D, "new/data", &e); diff -Nru libgetdata-0.7.0/test/madd_clincom.c libgetdata-0.7.1/test/madd_clincom.c --- libgetdata-0.7.0/test/madd_clincom.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/madd_clincom.c 2010-11-28 02:22:26.000000000 +0000 @@ -14,26 +14,29 @@ { const char* filedir = __TEST__ "dirfile"; const char* format = __TEST__ "dirfile/format"; - int r = 0; + int error, ge_error, r = 0; gd_entry_t e; - - DIRFILE* D = gd_open(filedir, GD_RDWR | GD_CREAT | GD_VERBOSE); - gd_add_phase(D, "new", "in", 3, 0); const char* in_fields[2] = {"in1", "in2"}; #ifdef GD_NO_C99_API const double m[2][2] = {{1, 3.3}, {0.3, 18.3}}; const double b[2][2] = {{2, 3.8}, {2.1, 9.8}}; - gd_madd_clincom(D, "new", "meta", 2, in_fields, (double*)m, (double*)b); #else const double complex m[2] = {1 + _Complex_I * 3.3, 0.3 + _Complex_I * 18.3}; const double complex b[2] = {2 + _Complex_I * 3.8, 2.1 + _Complex_I * 9.8}; +#endif + + DIRFILE* D = gd_open(filedir, GD_RDWR | GD_CREAT | GD_VERBOSE); + gd_add_phase(D, "new", "in", 3, 0); +#ifdef GD_NO_C99_API + gd_madd_clincom(D, "new", "meta", 2, in_fields, (double*)m, (double*)b); +#else gd_madd_clincom(D, "new", "meta", 2, in_fields, m, b); #endif - int error = gd_error(D); + error = gd_error(D); /* check */ gd_entry(D, "new/meta", &e); - int ge_error = gd_error(D); + ge_error = gd_error(D); CHECKI(ge_error, 0); if (!r) { CHECKI(e.field_type, GD_LINCOM_ENTRY); diff -Nru libgetdata-0.7.0/test/madd_const.c libgetdata-0.7.1/test/madd_const.c --- libgetdata-0.7.0/test/madd_const.c 2010-11-07 00:25:33.000000000 +0000 +++ libgetdata-0.7.1/test/madd_const.c 2010-11-28 02:22:42.000000000 +0000 @@ -16,17 +16,17 @@ const char* filedir = __TEST__ "dirfile"; const char* format = __TEST__ "dirfile/format"; uint8_t val = 3; - int r = 0; + int error, ge_error, r = 0; gd_entry_t e; DIRFILE* D = gd_open(filedir, GD_RDWR | GD_CREAT | GD_VERBOSE); gd_add_phase(D, "new", "in", 3, 0); gd_madd_const(D, "new", "data", GD_UINT8, GD_UINT8, &val); - int error = gd_error(D); + error = gd_error(D); /* check */ gd_entry(D, "new/data", &e); - int ge_error = gd_error(D); + ge_error = gd_error(D); CHECKI(ge_error, 0); if (!r) { CHECKI(e.field_type, GD_CONST_ENTRY); diff -Nru libgetdata-0.7.0/test/madd_cpolynom.c libgetdata-0.7.1/test/madd_cpolynom.c --- libgetdata-0.7.0/test/madd_cpolynom.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/madd_cpolynom.c 2010-11-28 02:33:13.000000000 +0000 @@ -15,25 +15,27 @@ { const char* filedir = __TEST__ "dirfile"; const char* format = __TEST__ "dirfile/format"; - int r = 0; - int j; + int j, error, ge_error, r = 0; gd_entry_t e; - - DIRFILE* D = gd_open(filedir, GD_RDWR | GD_CREAT | GD_VERBOSE); - gd_add_phase(D, "new", "in", 3, 0); #ifdef GD_NO_C99_API const double a[4][2] = {{1, 29.03}, {0.3, 12.34}, {0.5, 99.55}, {1.8, 45.32}}; - gd_madd_cpolynom(D, "new", "meta", 3, "in", (double*)a); #else const double complex a[4] = {1 + _Complex_I * 29.03, 0.3 + _Complex_I * 12.34, 0.5 + _Complex_I * 99.55, 1.8 + _Complex_I * 45.32}; +#endif + + DIRFILE* D = gd_open(filedir, GD_RDWR | GD_CREAT | GD_VERBOSE); + gd_add_phase(D, "new", "in", 3, 0); +#ifdef GD_NO_C99_API + gd_madd_cpolynom(D, "new", "meta", 3, "in", (const double *)a); +#else gd_madd_cpolynom(D, "new", "meta", 3, "in", a); #endif - int error = gd_error(D); + error = gd_error(D); /* check */ gd_entry(D, "new/meta", &e); - int ge_error = gd_error(D); + ge_error = gd_error(D); CHECKI(ge_error, 0); if (!r) { CHECKI(e.field_type, GD_POLYNOM_ENTRY); diff -Nru libgetdata-0.7.0/test/madd_crecip89.c libgetdata-0.7.1/test/madd_crecip89.c --- libgetdata-0.7.0/test/madd_crecip89.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/madd_crecip89.c 2010-11-28 02:24:31.000000000 +0000 @@ -14,18 +14,18 @@ { const char* filedir = __TEST__ "dirfile"; const char* format = __TEST__ "dirfile/format"; - int r = 0; + int error, ge_error, r = 0; gd_entry_t e; double div[2] = {3.2, 3.1}; DIRFILE* D = gd_open(filedir, GD_RDWR | GD_CREAT | GD_VERBOSE); gd_add_phase(D, "new", "in", 3, 0); gd_madd_crecip(D, "new", "meta", "in1", div); - int error = gd_error(D); + error = gd_error(D); /* check */ gd_entry(D, "new/meta", &e); - int ge_error = gd_error(D); + ge_error = gd_error(D); CHECKI(ge_error, 0); if (!r) { CHECKI(e.field_type, GD_RECIP_ENTRY); diff -Nru libgetdata-0.7.0/test/madd_crecip.c libgetdata-0.7.1/test/madd_crecip.c --- libgetdata-0.7.0/test/madd_crecip.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/madd_crecip.c 2010-11-28 02:24:15.000000000 +0000 @@ -13,22 +13,22 @@ { const char* filedir = __TEST__ "dirfile"; const char* format = __TEST__ "dirfile/format"; - int r = 0; + int error, ge_error, r = 0; gd_entry_t e; - - DIRFILE* D = gd_open(filedir, GD_RDWR | GD_CREAT | GD_VERBOSE); - gd_add_phase(D, "new", "in", 3, 0); #ifdef GD_NO_C99_API const double v[] = {3.2, 3.1}; #else const double complex v = 3.2 + _Complex_I * 3.1; #endif + + DIRFILE* D = gd_open(filedir, GD_RDWR | GD_CREAT | GD_VERBOSE); + gd_add_phase(D, "new", "in", 3, 0); gd_madd_crecip(D, "new", "meta", "in1", v); - int error = gd_error(D); + error = gd_error(D); /* check */ gd_entry(D, "new/meta", &e); - int ge_error = gd_error(D); + ge_error = gd_error(D); CHECKI(ge_error, 0); if (!r) { CHECKI(e.field_type, GD_RECIP_ENTRY); diff -Nru libgetdata-0.7.0/test/madd_divide.c libgetdata-0.7.1/test/madd_divide.c --- libgetdata-0.7.0/test/madd_divide.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/madd_divide.c 2010-11-28 02:24:46.000000000 +0000 @@ -13,17 +13,17 @@ { const char* filedir = __TEST__ "dirfile"; const char* format = __TEST__ "dirfile/format"; - int r = 0; + int error, ge_error, r = 0; gd_entry_t e; DIRFILE* D = gd_open(filedir, GD_RDWR | GD_CREAT | GD_VERBOSE); gd_add_phase(D, "new", "in", 3, 0); gd_madd_divide(D, "new", "meta", "in1", "in2"); - int error = gd_error(D); + error = gd_error(D); /* check */ gd_entry(D, "new/meta", &e); - int ge_error = gd_error(D); + ge_error = gd_error(D); CHECKI(ge_error, 0); if (!r) { CHECKI(e.field_type, GD_DIVIDE_ENTRY); diff -Nru libgetdata-0.7.0/test/madd_lincom.c libgetdata-0.7.1/test/madd_lincom.c --- libgetdata-0.7.0/test/madd_lincom.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/madd_lincom.c 2010-11-28 02:25:08.000000000 +0000 @@ -15,20 +15,20 @@ { const char* filedir = __TEST__ "dirfile"; const char* format = __TEST__ "dirfile/format"; - int r = 0; + int error, ge_error, r = 0; gd_entry_t e; - - DIRFILE* D = gd_open(filedir, GD_RDWR | GD_CREAT | GD_VERBOSE); - gd_add_phase(D, "new", "in", 3, 0); const char* in_fields[2] = {"in1", "in2"}; const double m[2] = {1, 0.3}; const double b[2] = {0, 0.9}; + + DIRFILE* D = gd_open(filedir, GD_RDWR | GD_CREAT | GD_VERBOSE); + gd_add_phase(D, "new", "in", 3, 0); gd_madd_lincom(D, "new", "meta", 2, in_fields, m, b); - int error = gd_error(D); + error = gd_error(D); /* check */ gd_entry(D, "new/meta", &e); - int ge_error = gd_error(D); + ge_error = gd_error(D); CHECKI(ge_error, 0); if (!r) { CHECKI(e.field_type, GD_LINCOM_ENTRY); diff -Nru libgetdata-0.7.0/test/madd_lincom_invalid.c libgetdata-0.7.1/test/madd_lincom_invalid.c --- libgetdata-0.7.0/test/madd_lincom_invalid.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/madd_lincom_invalid.c 2010-11-28 02:25:16.000000000 +0000 @@ -11,14 +11,14 @@ int main(void) { const char* filedir = __TEST__ "dirfile"; - int r = 0; + int error, r = 0; DIRFILE* D = gd_open(filedir, GD_RDONLY); const char* in_fields[2] = {"in1", "in2"}; const double m[2] = {1, 0.3}; const double b[2] = {0, 0.9}; gd_madd_lincom(D, "new", "meta", 2, in_fields, m, b); - int error = gd_error(D); + error = gd_error(D); gd_close(D); CHECKI(error, GD_E_BAD_DIRFILE); diff -Nru libgetdata-0.7.0/test/madd_linterp.c libgetdata-0.7.1/test/madd_linterp.c --- libgetdata-0.7.0/test/madd_linterp.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/madd_linterp.c 2010-11-28 02:25:28.000000000 +0000 @@ -14,17 +14,17 @@ { const char* filedir = __TEST__ "dirfile"; const char* format = __TEST__ "dirfile/format"; - int r = 0; + int error, ge_error, r = 0; gd_entry_t e; DIRFILE* D = gd_open(filedir, GD_RDWR | GD_CREAT | GD_VERBOSE); gd_add_phase(D, "new", "in", 3, 0); gd_madd_linterp(D, "new", "meta", "in", "table"); - int error = gd_error(D); + error = gd_error(D); /* check */ gd_entry(D, "new/meta", &e); - int ge_error = gd_error(D); + ge_error = gd_error(D); CHECKI(ge_error, 0); if (!r) { CHECKI(e.field_type, GD_LINTERP_ENTRY); diff -Nru libgetdata-0.7.0/test/madd_linterp_invalid.c libgetdata-0.7.1/test/madd_linterp_invalid.c --- libgetdata-0.7.0/test/madd_linterp_invalid.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/madd_linterp_invalid.c 2010-11-28 02:25:36.000000000 +0000 @@ -11,11 +11,11 @@ int main(void) { const char* filedir = __TEST__ "dirfile"; - int r = 0; + int error, r = 0; DIRFILE* D = gd_open(filedir, GD_RDONLY); gd_madd_linterp(D, "new", "meta", "in", "table"); - int error = gd_error(D); + error = gd_error(D); gd_close(D); CHECKI(error, GD_E_BAD_DIRFILE); diff -Nru libgetdata-0.7.0/test/madd_multiply.c libgetdata-0.7.1/test/madd_multiply.c --- libgetdata-0.7.0/test/madd_multiply.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/madd_multiply.c 2010-11-28 02:26:16.000000000 +0000 @@ -14,17 +14,17 @@ { const char* filedir = __TEST__ "dirfile"; const char* format = __TEST__ "dirfile/format"; - int r = 0; + int error, ge_error, r = 0; gd_entry_t e; DIRFILE* D = gd_open(filedir, GD_RDWR | GD_CREAT | GD_VERBOSE); gd_add_phase(D, "new", "in", 3, 0); gd_madd_multiply(D, "new", "meta", "in1", "in2"); - int error = gd_error(D); + error = gd_error(D); /* check */ gd_entry(D, "new/meta", &e); - int ge_error = gd_error(D); + ge_error = gd_error(D); CHECKI(ge_error, 0); if (!r) { CHECKI(e.field_type, GD_MULTIPLY_ENTRY); diff -Nru libgetdata-0.7.0/test/madd_multiply_invalid.c libgetdata-0.7.1/test/madd_multiply_invalid.c --- libgetdata-0.7.0/test/madd_multiply_invalid.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/madd_multiply_invalid.c 2010-11-28 02:26:23.000000000 +0000 @@ -11,11 +11,11 @@ int main(void) { const char* filedir = __TEST__ "dirfile"; - int r = 0; + int error, r = 0; DIRFILE* D = gd_open(filedir, GD_RDONLY); gd_madd_multiply(D, "new", "meta", "in1", "in2"); - int error = gd_error(D); + error = gd_error(D); gd_close(D); CHECKI(error, GD_E_BAD_DIRFILE); diff -Nru libgetdata-0.7.0/test/madd_phase.c libgetdata-0.7.1/test/madd_phase.c --- libgetdata-0.7.0/test/madd_phase.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/madd_phase.c 2010-11-28 02:33:39.000000000 +0000 @@ -14,17 +14,17 @@ { const char* filedir = __TEST__ "dirfile"; const char* format = __TEST__ "dirfile/format"; - int r = 0; + int error, ge_error, r = 0; gd_entry_t e; - DIRFILE* D = gd_open(filedir, GD_RDWR | GD_CREAT | GD_VERBOSE); + DIRFILE *D = gd_open(filedir, GD_RDWR | GD_CREAT | GD_VERBOSE); gd_add_phase(D, "new", "in", 3, 0); gd_madd_phase(D, "new", "meta", "in", 3); - int error = gd_error(D); + error = gd_error(D); /* check */ gd_entry(D, "new", &e); - int ge_error = gd_error(D); + ge_error = gd_error(D); CHECKI(ge_error, 0); if (!r) { CHECKI(e.field_type, GD_PHASE_ENTRY); diff -Nru libgetdata-0.7.0/test/madd_phase_invalid.c libgetdata-0.7.1/test/madd_phase_invalid.c --- libgetdata-0.7.0/test/madd_phase_invalid.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/madd_phase_invalid.c 2010-11-28 02:26:43.000000000 +0000 @@ -11,11 +11,11 @@ int main(void) { const char* filedir = __TEST__ "dirfile"; - int r = 0; + int error, r = 0; DIRFILE* D = gd_open(filedir, GD_RDONLY); gd_madd_phase(D, "new", "meta", "in", 3); - int error = gd_error(D); + error = gd_error(D); gd_close(D); CHECKI(error, GD_E_BAD_DIRFILE); diff -Nru libgetdata-0.7.0/test/madd_polynom.c libgetdata-0.7.1/test/madd_polynom.c --- libgetdata-0.7.0/test/madd_polynom.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/madd_polynom.c 2010-11-28 02:27:02.000000000 +0000 @@ -15,19 +15,19 @@ { const char* filedir = __TEST__ "dirfile"; const char* format = __TEST__ "dirfile/format"; - int j, r = 0; + int j, error, ge_error, r = 0; gd_entry_t e; + const char* in_field = "in"; + const double a[4] = {1, 0.3, 0.5, 1.8}; DIRFILE* D = gd_open(filedir, GD_RDWR | GD_CREAT | GD_VERBOSE); gd_add_phase(D, "new", "in", 3, 0); - const char* in_field = "in"; - const double a[4] = {1, 0.3, 0.5, 1.8}; gd_madd_polynom(D, "new", "meta", 3, in_field, a); - int error = gd_error(D); + error = gd_error(D); /* check */ gd_entry(D, "new/meta", &e); - int ge_error = gd_error(D); + ge_error = gd_error(D); CHECKI(ge_error, 0); if (!r) { CHECKI(e.field_type, GD_POLYNOM_ENTRY); diff -Nru libgetdata-0.7.0/test/madd_recip.c libgetdata-0.7.1/test/madd_recip.c --- libgetdata-0.7.0/test/madd_recip.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/madd_recip.c 2010-11-28 02:27:41.000000000 +0000 @@ -13,17 +13,17 @@ { const char* filedir = __TEST__ "dirfile"; const char* format = __TEST__ "dirfile/format"; - int r = 0; + int error, ge_error, r = 0; gd_entry_t e; DIRFILE* D = gd_open(filedir, GD_RDWR | GD_CREAT | GD_VERBOSE); gd_add_phase(D, "new", "in", 3, 0); gd_madd_recip(D, "new", "meta", "in1", 3.2); - int error = gd_error(D); + error = gd_error(D); /* check */ gd_entry(D, "new/meta", &e); - int ge_error = gd_error(D); + ge_error = gd_error(D); CHECKI(ge_error, 0); if (!r) { CHECKI(e.field_type, GD_RECIP_ENTRY); diff -Nru libgetdata-0.7.0/test/madd_sbit.c libgetdata-0.7.1/test/madd_sbit.c --- libgetdata-0.7.0/test/madd_sbit.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/madd_sbit.c 2010-11-28 02:27:52.000000000 +0000 @@ -14,17 +14,17 @@ { const char* filedir = __TEST__ "dirfile"; const char* format = __TEST__ "dirfile/format"; - int r = 0; + int error, ge_error, r = 0; gd_entry_t e; DIRFILE* D = gd_open(filedir, GD_RDWR | GD_CREAT | GD_VERBOSE); gd_add_phase(D, "new", "in", 3, 0); gd_madd_sbit(D, "new", "meta", "input", 1, 1); - int error = gd_error(D); + error = gd_error(D); /* check */ gd_entry(D, "new/meta", &e); - int ge_error = gd_error(D); + ge_error = gd_error(D); CHECKI(ge_error, 0); if (!r) { CHECKI(e.field_type, GD_SBIT_ENTRY); diff -Nru libgetdata-0.7.0/test/madd_spec.c libgetdata-0.7.1/test/madd_spec.c --- libgetdata-0.7.0/test/madd_spec.c 2010-11-07 00:25:35.000000000 +0000 +++ libgetdata-0.7.1/test/madd_spec.c 2010-11-28 02:28:07.000000000 +0000 @@ -14,21 +14,21 @@ { const char* filedir = __TEST__ "dirfile"; const char* format = __TEST__ "dirfile/format"; - int r = 0; + int error, ge_error, n, r = 0; + unsigned char val; gd_entry_t e; DIRFILE* D = gd_open(filedir, GD_RDWR | GD_CREAT | GD_VERBOSE); gd_madd_spec(D, "meta CONST UINT8 2", "INDEX"); - int error = gd_error(D); - unsigned char val; + error = gd_error(D); /* check */ - int n = gd_nfields(D); + n = gd_nfields(D); CHECKI(n, 1); gd_entry(D, "INDEX/meta", &e); - int ge_error = gd_error(D); + ge_error = gd_error(D); CHECKI(ge_error, 0); if (!r) { CHECKI(e.field_type, GD_CONST_ENTRY); diff -Nru libgetdata-0.7.0/test/madd_spec_directive.c libgetdata-0.7.1/test/madd_spec_directive.c --- libgetdata-0.7.0/test/madd_spec_directive.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/madd_spec_directive.c 2010-11-28 02:28:15.000000000 +0000 @@ -13,15 +13,15 @@ { const char* filedir = __TEST__ "dirfile"; const char* format = __TEST__ "dirfile/format"; - int r = 0; + int error, n, m, r = 0; DIRFILE* D = gd_open(filedir, GD_RDWR | GD_CREAT); gd_madd_spec(D, "META INDEX RAW UINT8 2", "INDEX"); - int error = gd_error(D); + error = gd_error(D); /* check */ - int n = gd_nfields(D); - int m = gd_nmfields(D, "INDEX"); + n = gd_nfields(D); + m = gd_nmfields(D, "INDEX"); gd_close(D); diff -Nru libgetdata-0.7.0/test/madd_spec_invalid.c libgetdata-0.7.1/test/madd_spec_invalid.c --- libgetdata-0.7.0/test/madd_spec_invalid.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/madd_spec_invalid.c 2010-11-28 02:28:21.000000000 +0000 @@ -11,11 +11,11 @@ int main(void) { const char* filedir = __TEST__ "dirfile"; - int r = 0; + int error, r = 0; DIRFILE* D = gd_open(filedir, GD_RDONLY); gd_madd_spec(D, "data RAW UINT8 2", "INDEX"); - int error = gd_error(D); + error = gd_error(D); gd_close(D); CHECKI(error, GD_E_BAD_DIRFILE); diff -Nru libgetdata-0.7.0/test/madd_string.c libgetdata-0.7.1/test/madd_string.c --- libgetdata-0.7.0/test/madd_string.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/madd_string.c 2010-11-28 02:28:35.000000000 +0000 @@ -15,18 +15,18 @@ { const char* filedir = __TEST__ "dirfile"; const char* format = __TEST__ "dirfile/format"; - int r = 0; + int error, ge_error, r = 0; gd_entry_t e; char val[1000]; DIRFILE* D = gd_open(filedir, GD_RDWR | GD_CREAT | GD_VERBOSE); gd_add_phase(D, "new", "in", 3, 0); gd_madd_string(D, "new", "meta", "A string."); - int error = gd_error(D); + error = gd_error(D); /* check */ gd_entry(D, "new/meta", &e); - int ge_error = gd_error(D); + ge_error = gd_error(D); CHECKI(ge_error, 0); if (!r) { CHECKI(e.field_type, GD_STRING_ENTRY); diff -Nru libgetdata-0.7.0/test/Makefile.am libgetdata-0.7.1/test/Makefile.am --- libgetdata-0.7.0/test/Makefile.am 2010-11-01 22:05:28.000000000 +0000 +++ libgetdata-0.7.1/test/Makefile.am 2010-11-30 02:33:43.000000000 +0000 @@ -63,7 +63,7 @@ alter_polynom_ord alter_raw_spf alter_raw_type alter_recip \ alter_spec alter_spec_meta -ASCII_TESTS=ascii_get ascii_nframes ascii_put +ASCII_TESTS=ascii_get ascii_get_get ascii_nframes ascii_put BOF_TESTS=bof bof_lincom bof_phase @@ -331,6 +331,14 @@ check_PROGRAMS=$(TESTS) +# valgrind +valgrind.log: $(TESTS) + rm -f $@; \ + for x in $^; do ( \ + echo $$x:; \ + sed -e 's/exec "/exec valgrind --leak-check=full --track-origins=yes --track-fds=yes "/' $$x | sh; \ + echo $$x = $$? ); done &> $@; + # clean up after the tests check-local: check-TESTS $(MAKE) getdata-clean-dirs diff -Nru libgetdata-0.7.0/test/Makefile.in libgetdata-0.7.1/test/Makefile.in --- libgetdata-0.7.0/test/Makefile.in 2010-11-23 00:33:34.000000000 +0000 +++ libgetdata-0.7.1/test/Makefile.in 2010-12-06 23:08:43.000000000 +0000 @@ -105,8 +105,8 @@ alter_raw_spf$(EXEEXT) alter_raw_type$(EXEEXT) \ alter_recip$(EXEEXT) alter_spec$(EXEEXT) \ alter_spec_meta$(EXEEXT) -am__EXEEXT_3 = ascii_get$(EXEEXT) ascii_nframes$(EXEEXT) \ - ascii_put$(EXEEXT) +am__EXEEXT_3 = ascii_get$(EXEEXT) ascii_get_get$(EXEEXT) \ + ascii_nframes$(EXEEXT) ascii_put$(EXEEXT) am__EXEEXT_4 = bof$(EXEEXT) bof_lincom$(EXEEXT) bof_phase$(EXEEXT) @TEST_BZIP2_TRUE@am__EXEEXT_5 = bzip_get$(EXEEXT) \ @TEST_BZIP2_TRUE@ bzip_get_get$(EXEEXT) bzip_move_from$(EXEEXT) \ @@ -775,6 +775,10 @@ ascii_get_OBJECTS = ascii_get.$(OBJEXT) ascii_get_LDADD = $(LDADD) ascii_get_DEPENDENCIES = ../src/libgetdata.la +ascii_get_get_SOURCES = ascii_get_get.c +ascii_get_get_OBJECTS = ascii_get_get.$(OBJEXT) +ascii_get_get_LDADD = $(LDADD) +ascii_get_get_DEPENDENCIES = ../src/libgetdata.la ascii_nframes_SOURCES = ascii_nframes.c ascii_nframes_OBJECTS = ascii_nframes.$(OBJEXT) ascii_nframes_LDADD = $(LDADD) @@ -3280,44 +3284,44 @@ alter_polynom_coeff.c alter_polynom_input.c \ alter_polynom_ord.c alter_raw_spf.c alter_raw_type.c \ alter_recip.c alter_spec.c alter_spec_meta.c ascii_get.c \ - ascii_nframes.c ascii_put.c bof.c bof_lincom.c bof_phase.c \ - bzip_get.c bzip_get_get.c bzip_move_from.c bzip_nframes.c \ - close.c close_bad.c close_discard.c close_null.c \ - convert_complex128_complex64.c convert_complex128_float64.c \ - convert_complex128_int64.c convert_complex128_uint64.c \ - convert_complex64_complex128.c convert_complex64_float64.c \ - convert_complex64_int64.c convert_complex64_uint64.c \ - convert_float32_complex128.c convert_float32_complex64.c \ - convert_float32_float64.c convert_float32_int16.c \ - convert_float32_int32.c convert_float32_int64.c \ - convert_float32_int8.c convert_float32_uint16.c \ - convert_float32_uint32.c convert_float32_uint64.c \ - convert_float32_uint8.c convert_float64_complex128.c \ - convert_float64_complex64.c convert_float64_float32.c \ - convert_float64_int16.c convert_float64_int32.c \ - convert_float64_int64.c convert_float64_int8.c \ - convert_float64_uint16.c convert_float64_uint32.c \ - convert_float64_uint64.c convert_float64_uint8.c \ - convert_int16_complex128.c convert_int16_complex64.c \ - convert_int16_float32.c convert_int16_float64.c \ - convert_int16_int32.c convert_int16_int64.c \ - convert_int16_int8.c convert_int16_uint16.c \ - convert_int16_uint32.c convert_int16_uint64.c \ - convert_int16_uint8.c convert_int32_complex128.c \ - convert_int32_complex64.c convert_int32_float32.c \ - convert_int32_float64.c convert_int32_int16.c \ - convert_int32_int64.c convert_int32_int8.c \ - convert_int32_uint16.c convert_int32_uint32.c \ - convert_int32_uint64.c convert_int32_uint8.c \ - convert_int64_complex128.c convert_int64_complex64.c \ - convert_int64_float32.c convert_int64_float64.c \ - convert_int64_int16.c convert_int64_int32.c \ - convert_int64_int8.c convert_int64_uint16.c \ - convert_int64_uint32.c convert_int64_uint64.c \ - convert_int64_uint8.c convert_int8_complex128.c \ - convert_int8_complex64.c convert_int8_float32.c \ - convert_int8_float64.c convert_int8_int16.c \ - convert_int8_int32.c convert_int8_int64.c \ + ascii_get_get.c ascii_nframes.c ascii_put.c bof.c bof_lincom.c \ + bof_phase.c bzip_get.c bzip_get_get.c bzip_move_from.c \ + bzip_nframes.c close.c close_bad.c close_discard.c \ + close_null.c convert_complex128_complex64.c \ + convert_complex128_float64.c convert_complex128_int64.c \ + convert_complex128_uint64.c convert_complex64_complex128.c \ + convert_complex64_float64.c convert_complex64_int64.c \ + convert_complex64_uint64.c convert_float32_complex128.c \ + convert_float32_complex64.c convert_float32_float64.c \ + convert_float32_int16.c convert_float32_int32.c \ + convert_float32_int64.c convert_float32_int8.c \ + convert_float32_uint16.c convert_float32_uint32.c \ + convert_float32_uint64.c convert_float32_uint8.c \ + convert_float64_complex128.c convert_float64_complex64.c \ + convert_float64_float32.c convert_float64_int16.c \ + convert_float64_int32.c convert_float64_int64.c \ + convert_float64_int8.c convert_float64_uint16.c \ + convert_float64_uint32.c convert_float64_uint64.c \ + convert_float64_uint8.c convert_int16_complex128.c \ + convert_int16_complex64.c convert_int16_float32.c \ + convert_int16_float64.c convert_int16_int32.c \ + convert_int16_int64.c convert_int16_int8.c \ + convert_int16_uint16.c convert_int16_uint32.c \ + convert_int16_uint64.c convert_int16_uint8.c \ + convert_int32_complex128.c convert_int32_complex64.c \ + convert_int32_float32.c convert_int32_float64.c \ + convert_int32_int16.c convert_int32_int64.c \ + convert_int32_int8.c convert_int32_uint16.c \ + convert_int32_uint32.c convert_int32_uint64.c \ + convert_int32_uint8.c convert_int64_complex128.c \ + convert_int64_complex64.c convert_int64_float32.c \ + convert_int64_float64.c convert_int64_int16.c \ + convert_int64_int32.c convert_int64_int8.c \ + convert_int64_uint16.c convert_int64_uint32.c \ + convert_int64_uint64.c convert_int64_uint8.c \ + convert_int8_complex128.c convert_int8_complex64.c \ + convert_int8_float32.c convert_int8_float64.c \ + convert_int8_int16.c convert_int8_int32.c convert_int8_int64.c \ convert_int8_uint16.c convert_int8_uint32.c \ convert_int8_uint64.c convert_int8_uint8.c \ convert_uint16_complex128.c convert_uint16_complex64.c \ @@ -3503,44 +3507,44 @@ alter_polynom_coeff.c alter_polynom_input.c \ alter_polynom_ord.c alter_raw_spf.c alter_raw_type.c \ alter_recip.c alter_spec.c alter_spec_meta.c ascii_get.c \ - ascii_nframes.c ascii_put.c bof.c bof_lincom.c bof_phase.c \ - bzip_get.c bzip_get_get.c bzip_move_from.c bzip_nframes.c \ - close.c close_bad.c close_discard.c close_null.c \ - convert_complex128_complex64.c convert_complex128_float64.c \ - convert_complex128_int64.c convert_complex128_uint64.c \ - convert_complex64_complex128.c convert_complex64_float64.c \ - convert_complex64_int64.c convert_complex64_uint64.c \ - convert_float32_complex128.c convert_float32_complex64.c \ - convert_float32_float64.c convert_float32_int16.c \ - convert_float32_int32.c convert_float32_int64.c \ - convert_float32_int8.c convert_float32_uint16.c \ - convert_float32_uint32.c convert_float32_uint64.c \ - convert_float32_uint8.c convert_float64_complex128.c \ - convert_float64_complex64.c convert_float64_float32.c \ - convert_float64_int16.c convert_float64_int32.c \ - convert_float64_int64.c convert_float64_int8.c \ - convert_float64_uint16.c convert_float64_uint32.c \ - convert_float64_uint64.c convert_float64_uint8.c \ - convert_int16_complex128.c convert_int16_complex64.c \ - convert_int16_float32.c convert_int16_float64.c \ - convert_int16_int32.c convert_int16_int64.c \ - convert_int16_int8.c convert_int16_uint16.c \ - convert_int16_uint32.c convert_int16_uint64.c \ - convert_int16_uint8.c convert_int32_complex128.c \ - convert_int32_complex64.c convert_int32_float32.c \ - convert_int32_float64.c convert_int32_int16.c \ - convert_int32_int64.c convert_int32_int8.c \ - convert_int32_uint16.c convert_int32_uint32.c \ - convert_int32_uint64.c convert_int32_uint8.c \ - convert_int64_complex128.c convert_int64_complex64.c \ - convert_int64_float32.c convert_int64_float64.c \ - convert_int64_int16.c convert_int64_int32.c \ - convert_int64_int8.c convert_int64_uint16.c \ - convert_int64_uint32.c convert_int64_uint64.c \ - convert_int64_uint8.c convert_int8_complex128.c \ - convert_int8_complex64.c convert_int8_float32.c \ - convert_int8_float64.c convert_int8_int16.c \ - convert_int8_int32.c convert_int8_int64.c \ + ascii_get_get.c ascii_nframes.c ascii_put.c bof.c bof_lincom.c \ + bof_phase.c bzip_get.c bzip_get_get.c bzip_move_from.c \ + bzip_nframes.c close.c close_bad.c close_discard.c \ + close_null.c convert_complex128_complex64.c \ + convert_complex128_float64.c convert_complex128_int64.c \ + convert_complex128_uint64.c convert_complex64_complex128.c \ + convert_complex64_float64.c convert_complex64_int64.c \ + convert_complex64_uint64.c convert_float32_complex128.c \ + convert_float32_complex64.c convert_float32_float64.c \ + convert_float32_int16.c convert_float32_int32.c \ + convert_float32_int64.c convert_float32_int8.c \ + convert_float32_uint16.c convert_float32_uint32.c \ + convert_float32_uint64.c convert_float32_uint8.c \ + convert_float64_complex128.c convert_float64_complex64.c \ + convert_float64_float32.c convert_float64_int16.c \ + convert_float64_int32.c convert_float64_int64.c \ + convert_float64_int8.c convert_float64_uint16.c \ + convert_float64_uint32.c convert_float64_uint64.c \ + convert_float64_uint8.c convert_int16_complex128.c \ + convert_int16_complex64.c convert_int16_float32.c \ + convert_int16_float64.c convert_int16_int32.c \ + convert_int16_int64.c convert_int16_int8.c \ + convert_int16_uint16.c convert_int16_uint32.c \ + convert_int16_uint64.c convert_int16_uint8.c \ + convert_int32_complex128.c convert_int32_complex64.c \ + convert_int32_float32.c convert_int32_float64.c \ + convert_int32_int16.c convert_int32_int64.c \ + convert_int32_int8.c convert_int32_uint16.c \ + convert_int32_uint32.c convert_int32_uint64.c \ + convert_int32_uint8.c convert_int64_complex128.c \ + convert_int64_complex64.c convert_int64_float32.c \ + convert_int64_float64.c convert_int64_int16.c \ + convert_int64_int32.c convert_int64_int8.c \ + convert_int64_uint16.c convert_int64_uint32.c \ + convert_int64_uint64.c convert_int64_uint8.c \ + convert_int8_complex128.c convert_int8_complex64.c \ + convert_int8_float32.c convert_int8_float64.c \ + convert_int8_int16.c convert_int8_int32.c convert_int8_int64.c \ convert_int8_uint16.c convert_int8_uint32.c \ convert_int8_uint64.c convert_int8_uint8.c \ convert_uint16_complex128.c convert_uint16_complex64.c \ @@ -3733,6 +3737,7 @@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DIFF = @DIFF@ +DLLTOOL = @DLLTOOL@ DL_LIBRARY_PATH = @DL_LIBRARY_PATH@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ @@ -3778,6 +3783,7 @@ LZMA_CPPFLAGS = @LZMA_CPPFLAGS@ LZMA_LDFLAGS = @LZMA_LDFLAGS@ MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ @@ -3812,6 +3818,7 @@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ absolute_docdir = @absolute_docdir@ +ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ @@ -3848,7 +3855,6 @@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ @@ -3926,7 +3932,7 @@ alter_polynom_ord alter_raw_spf alter_raw_type alter_recip \ alter_spec alter_spec_meta -ASCII_TESTS = ascii_get ascii_nframes ascii_put +ASCII_TESTS = ascii_get ascii_get_get ascii_nframes ascii_put BOF_TESTS = bof bof_lincom bof_phase @TEST_BZIP2_TRUE@BZIP_TESTS = bzip_get bzip_get_get bzip_move_from bzip_nframes CVLIST_TESTS = cvlist cvlist_array cvlist_array_meta cvlist_invalid cvlist_meta \ @@ -4407,6 +4413,9 @@ ascii_get$(EXEEXT): $(ascii_get_OBJECTS) $(ascii_get_DEPENDENCIES) @rm -f ascii_get$(EXEEXT) $(LINK) $(ascii_get_OBJECTS) $(ascii_get_LDADD) $(LIBS) +ascii_get_get$(EXEEXT): $(ascii_get_get_OBJECTS) $(ascii_get_get_DEPENDENCIES) + @rm -f ascii_get_get$(EXEEXT) + $(LINK) $(ascii_get_get_OBJECTS) $(ascii_get_get_LDADD) $(LIBS) ascii_nframes$(EXEEXT): $(ascii_nframes_OBJECTS) $(ascii_nframes_DEPENDENCIES) @rm -f ascii_nframes$(EXEEXT) $(LINK) $(ascii_nframes_OBJECTS) $(ascii_nframes_LDADD) $(LIBS) @@ -6325,6 +6334,7 @@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/alter_spec.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/alter_spec_meta.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ascii_get.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ascii_get_get.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ascii_nframes.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ascii_put.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bof.Po@am__quote@ @@ -7257,6 +7267,14 @@ tags uninstall uninstall-am +# valgrind +valgrind.log: $(TESTS) + rm -f $@; \ + for x in $^; do ( \ + echo $$x:; \ + sed -e 's/exec "/exec valgrind --leak-check=full --track-origins=yes --track-fds=yes "/' $$x | sh; \ + echo $$x = $$? ); done &> $@; + # clean up after the tests check-local: check-TESTS $(MAKE) getdata-clean-dirs diff -Nru libgetdata-0.7.0/test/move.c libgetdata-0.7.1/test/move.c --- libgetdata-0.7.0/test/move.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/move.c 2010-11-28 02:28:51.000000000 +0000 @@ -17,8 +17,9 @@ const char* format1 = __TEST__ "dirfile/format1"; const char* format_data = "INCLUDE format1\ndata RAW UINT8 11"; const char* format1_data = "#\n"; - int fd, r = 0; + int fd, ret, error, ge_ret, r = 0; gd_entry_t E; + DIRFILE *D; mkdir(filedir, 0777); @@ -30,10 +31,10 @@ write(fd, format1_data, strlen(format1_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDWR | GD_UNENCODED | GD_VERBOSE); - int ret = gd_move(D, "data", 1, 0); - int error = gd_error(D); - int ge_ret = gd_entry(D, "data", &E); + D = gd_open(filedir, GD_RDWR | GD_UNENCODED | GD_VERBOSE); + ret = gd_move(D, "data", 1, 0); + error = gd_error(D); + ge_ret = gd_entry(D, "data", &E); gd_close(D); unlink(format1); @@ -44,6 +45,7 @@ CHECKI(error, GD_E_OK); CHECKI(ge_ret, 0); CHECKI(E.fragment_index, 1); + gd_free_entry_strings(&E); return r; } diff -Nru libgetdata-0.7.0/test/move_data_enc_ar.c libgetdata-0.7.1/test/move_data_enc_ar.c --- libgetdata-0.7.0/test/move_data_enc_ar.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/move_data_enc_ar.c 2010-11-28 02:33:57.000000000 +0000 @@ -23,9 +23,10 @@ const char* format1_data = "ENCODING none\n"; int r = 0; uint16_t d; - int fd, i; + int fd, i, ret, error, ge_ret, unlink_data, unlink_txtdata; FILE* stream; gd_entry_t E; + DIRFILE *D; mkdir(filedir, 0777); @@ -42,10 +43,10 @@ fprintf(stream, "%i\n", i * 0x201); fclose(stream); - DIRFILE* D = gd_open(filedir, GD_RDWR | GD_UNENCODED | GD_VERBOSE); - int ret = gd_move(D, "data", 1, 1); - int error = gd_error(D); - int ge_ret = gd_entry(D, "data", &E); + D = gd_open(filedir, GD_RDWR | GD_UNENCODED | GD_VERBOSE); + ret = gd_move(D, "data", 1, 1); + error = gd_error(D); + ge_ret = gd_entry(D, "data", &E); gd_close(D); fd = open(data, O_RDONLY | O_BINARY); @@ -64,8 +65,8 @@ unlink(format1); unlink(format); - int unlink_data = unlink(data); - int unlink_txtdata = unlink(txtdata); + unlink_data = unlink(data); + unlink_txtdata = unlink(txtdata); rmdir(filedir); CHECKI(ret, 0); @@ -74,6 +75,7 @@ CHECKI(E.fragment_index, 1); CHECKI(unlink_data, 0); CHECKI(unlink_txtdata, -1); + gd_free_entry_strings(&E); return 0; } diff -Nru libgetdata-0.7.0/test/move_data_enc_ra.c libgetdata-0.7.1/test/move_data_enc_ra.c --- libgetdata-0.7.0/test/move_data_enc_ra.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/move_data_enc_ra.c 2010-11-28 02:29:49.000000000 +0000 @@ -24,9 +24,10 @@ int r = 0; uint16_t d; char line[100]; - int fd, i; + int fd, i, ret, error, ge_ret, unlink_data, unlink_txtdata; FILE* stream; gd_entry_t E; + DIRFILE *D; mkdir(filedir, 0777); @@ -45,10 +46,10 @@ write(fd, data_data, 256); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDWR | GD_UNENCODED | GD_VERBOSE); - int ret = gd_move(D, "data", 1, 1); - int error = gd_error(D); - int ge_ret = gd_entry(D, "data", &E); + D = gd_open(filedir, GD_RDWR | GD_UNENCODED | GD_VERBOSE); + ret = gd_move(D, "data", 1, 1); + error = gd_error(D); + ge_ret = gd_entry(D, "data", &E); gd_close(D); stream = fopen(txtdata, "rt"); @@ -69,8 +70,8 @@ unlink(format1); unlink(format); - int unlink_data = unlink(data); - int unlink_txtdata = unlink(txtdata); + unlink_data = unlink(data); + unlink_txtdata = unlink(txtdata); rmdir(filedir); CHECKI(ret, 0); @@ -79,6 +80,7 @@ CHECKI(E.fragment_index, 1); CHECKI(unlink_data, -1); CHECKI(unlink_txtdata, 0); + gd_free_entry_strings(&E); return r; } diff -Nru libgetdata-0.7.0/test/move_data_endian.c libgetdata-0.7.1/test/move_data_endian.c --- libgetdata-0.7.0/test/move_data_endian.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/move_data_endian.c 2010-11-28 02:30:03.000000000 +0000 @@ -25,8 +25,9 @@ const char* format1_data = "ENDIAN big\n"; #endif uint16_t d, data_data[128]; - int fd, i, r = 0; + int fd, i, ret, error, ge_ret, r = 0; gd_entry_t E; + DIRFILE *D; mkdir(filedir, 0777); @@ -45,10 +46,10 @@ write(fd, data_data, 256); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDWR | GD_UNENCODED | GD_VERBOSE); - int ret = gd_move(D, "data", 1, 1); - int error = gd_error(D); - int ge_ret = gd_entry(D, "data", &E); + D = gd_open(filedir, GD_RDWR | GD_UNENCODED | GD_VERBOSE); + ret = gd_move(D, "data", 1, 1); + error = gd_error(D); + ge_ret = gd_entry(D, "data", &E); gd_close(D); fd = open(data, O_RDONLY | O_BINARY); @@ -69,6 +70,7 @@ CHECKI(error, GD_E_OK); CHECKI(ge_ret, 0); CHECKI(E.fragment_index, 1); + gd_free_entry_strings(&E); return r; } diff -Nru libgetdata-0.7.0/test/move_data_foffs.c libgetdata-0.7.1/test/move_data_foffs.c --- libgetdata-0.7.0/test/move_data_foffs.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/move_data_foffs.c 2010-11-28 02:30:26.000000000 +0000 @@ -20,8 +20,9 @@ const char* format_data = "/INCLUDE format1\ndata RAW UINT8 11"; const char* format1_data = "FRAMEOFFSET 1\n"; uint8_t d, data_data[256]; - int fd, i, r = 0; + int fd, i, ret, error, ge_ret, r = 0; gd_entry_t E; + DIRFILE *D; mkdir(filedir, 0777); @@ -36,14 +37,14 @@ write(fd, format1_data, strlen(format1_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDWR | GD_UNENCODED | GD_VERBOSE); + D = gd_open(filedir, GD_RDWR | GD_UNENCODED | GD_VERBOSE); fd = open(data, O_CREAT | O_EXCL | O_WRONLY | O_BINARY, 0666); write(fd, data_data, 256); close(fd); - int ret = gd_move(D, "data", 1, 1); - int error = gd_error(D); - int ge_ret = gd_entry(D, "data", &E); + ret = gd_move(D, "data", 1, 1); + error = gd_error(D); + ge_ret = gd_entry(D, "data", &E); gd_close(D); fd = open(data, O_RDONLY | O_BINARY); @@ -63,6 +64,7 @@ CHECKI(error, GD_E_OK); CHECKI(ge_ret, 0); CHECKI(E.fragment_index, 1); + gd_free_entry_strings(&E); return r; } diff -Nru libgetdata-0.7.0/test/move_data_nop.c libgetdata-0.7.1/test/move_data_nop.c --- libgetdata-0.7.0/test/move_data_nop.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/move_data_nop.c 2010-11-28 02:30:40.000000000 +0000 @@ -19,8 +19,9 @@ const char* format_data = "/INCLUDE format1\ndata RAW UINT8 11"; const char* format1_data = "#\n"; unsigned char data_data[256]; - int fd, r = 0; + int fd, ret, error, ge_ret, r = 0; gd_entry_t E; + DIRFILE *D; mkdir(filedir, 0777); @@ -35,14 +36,14 @@ write(fd, format1_data, strlen(format1_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDWR | GD_UNENCODED | GD_VERBOSE); + D = gd_open(filedir, GD_RDWR | GD_UNENCODED | GD_VERBOSE); fd = open(data, O_CREAT | O_EXCL | O_WRONLY | O_BINARY, 0666); write(fd, data_data, 256); close(fd); - int ret = gd_move(D, "data", 1, 1); - int error = gd_error(D); - int ge_ret = gd_entry(D, "data", &E); + ret = gd_move(D, "data", 1, 1); + error = gd_error(D); + ge_ret = gd_entry(D, "data", &E); gd_close(D); unlink(format1); @@ -54,6 +55,7 @@ CHECKI(error, GD_E_OK); CHECKI(ge_ret, 0); CHECKI(E.fragment_index, 1); + gd_free_entry_strings(&E); return r; } diff -Nru libgetdata-0.7.0/test/move_index.c libgetdata-0.7.1/test/move_index.c --- libgetdata-0.7.0/test/move_index.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/move_index.c 2010-11-28 02:30:52.000000000 +0000 @@ -17,8 +17,9 @@ const char* format1 = __TEST__ "dirfile/format1"; const char* format_data = "INCLUDE format1\ndata RAW UINT8 11"; const char* format1_data = "#\n"; - int fd, r = 0; + int fd, ret, error, ge_ret, r = 0; gd_entry_t E; + DIRFILE *D; mkdir(filedir, 0777); @@ -30,10 +31,10 @@ write(fd, format1_data, strlen(format1_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDWR | GD_UNENCODED); - int ret = gd_move(D, "data", 2, 0); - int error = gd_error(D); - int ge_ret = gd_entry(D, "data", &E); + D = gd_open(filedir, GD_RDWR | GD_UNENCODED); + ret = gd_move(D, "data", 2, 0); + error = gd_error(D); + ge_ret = gd_entry(D, "data", &E); gd_close(D); unlink(format1); @@ -44,6 +45,7 @@ CHECKI(error, GD_E_BAD_INDEX); CHECKI(ge_ret, 0); CHECKI(E.fragment_index, 0); + gd_free_entry_strings(&E); return r; } diff -Nru libgetdata-0.7.0/test/move_meta.c libgetdata-0.7.1/test/move_meta.c --- libgetdata-0.7.0/test/move_meta.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/move_meta.c 2010-11-28 02:31:04.000000000 +0000 @@ -18,8 +18,9 @@ const char* format_data = "INCLUDE format1\ndata RAW UINT8 11\n" "data/meta CONST UINT8 11\n"; const char* format1_data = "#\n"; - int fd, r = 0; + int fd, ret, error, ge_ret, r = 0; gd_entry_t E; + DIRFILE *D; mkdir(filedir, 0777); @@ -31,10 +32,10 @@ write(fd, format1_data, strlen(format1_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDWR | GD_UNENCODED | GD_VERBOSE); - int ret = gd_move(D, "data", 1, 0); - int error = gd_error(D); - int ge_ret = gd_entry(D, "data/meta", &E); + D = gd_open(filedir, GD_RDWR | GD_UNENCODED | GD_VERBOSE); + ret = gd_move(D, "data", 1, 0); + error = gd_error(D); + ge_ret = gd_entry(D, "data/meta", &E); gd_close(D); unlink(format1); @@ -45,6 +46,7 @@ CHECKI(error, GD_E_OK); CHECKI(ge_ret, 0); CHECKI(E.fragment_index, 1); + gd_free_entry_strings(&E); return r; } diff -Nru libgetdata-0.7.0/test/move_protect.c libgetdata-0.7.1/test/move_protect.c --- libgetdata-0.7.0/test/move_protect.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/move_protect.c 2010-11-28 02:31:17.000000000 +0000 @@ -17,8 +17,9 @@ const char* format1 = __TEST__ "dirfile/format1"; const char* format_data = "INCLUDE format1\ndata RAW UINT8 11"; const char* format1_data = "/PROTECT all\n"; - int fd, r = 0; + int fd, ret, error, ge_ret, r = 0; gd_entry_t E; + DIRFILE *D; mkdir(filedir, 0777); @@ -30,10 +31,10 @@ write(fd, format1_data, strlen(format1_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDWR | GD_UNENCODED); - int ret = gd_move(D, "data", 1, 0); - int error = gd_error(D); - int ge_ret = gd_entry(D, "data", &E); + D = gd_open(filedir, GD_RDWR | GD_UNENCODED); + ret = gd_move(D, "data", 1, 0); + error = gd_error(D); + ge_ret = gd_entry(D, "data", &E); gd_close(D); unlink(format1); @@ -44,6 +45,7 @@ CHECKI(error, GD_E_PROTECTED); CHECKI(ge_ret, 0); CHECKI(E.fragment_index, 0); + gd_free_entry_strings(&E); return r; } diff -Nru libgetdata-0.7.0/test/move_subdir.c libgetdata-0.7.1/test/move_subdir.c --- libgetdata-0.7.0/test/move_subdir.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/move_subdir.c 2010-11-28 02:31:37.000000000 +0000 @@ -20,8 +20,9 @@ const char* new_data = __TEST__ "dirfile/subdir/data"; const char* format_data = "INCLUDE subdir/format1\ndata RAW UINT8 11\n"; const char* format1_data = "#\n"; - int fd, r = 0; + int fd, ret, error, ge_ret, unlink_data, unlink_new_data, r = 0; gd_entry_t E; + DIRFILE *D; mkdir(filedir, 0777); mkdir(subdir, 0777); @@ -38,14 +39,14 @@ write(fd, format_data, strlen(format_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDWR | GD_UNENCODED | GD_VERBOSE); - int ret = gd_move(D, "data", 1, 1); - int error = gd_error(D); - int ge_ret = gd_entry(D, "data", &E); + D = gd_open(filedir, GD_RDWR | GD_UNENCODED | GD_VERBOSE); + ret = gd_move(D, "data", 1, 1); + error = gd_error(D); + ge_ret = gd_entry(D, "data", &E); gd_close(D); - int unlink_data = unlink(data); - int unlink_new_data = unlink(new_data); + unlink_data = unlink(data); + unlink_new_data = unlink(new_data); unlink(format1); unlink(format); rmdir(subdir); @@ -57,6 +58,7 @@ CHECKI(E.fragment_index, 1); CHECKI(unlink_data, -1); CHECKI(unlink_new_data, 0); + gd_free_entry_strings(&E); return r; } diff -Nru libgetdata-0.7.0/test/name.c libgetdata-0.7.1/test/name.c --- libgetdata-0.7.0/test/name.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/name.c 2010-11-28 03:01:06.000000000 +0000 @@ -19,7 +19,10 @@ const char* format_data = "cata RAW UINT8 8\ndata RAW UINT8 8\n" "eata RAW UINT8 8\n"; unsigned char data_data[256]; - int fd, r = 0; + int fd, ret, error, unlink_data, unlink_zata, r = 0; + const char **fl; + char *field_list[4]; + DIRFILE *D; mkdir(filedir, 0777); @@ -34,12 +37,10 @@ write(fd, data_data, 256); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDWR | GD_VERBOSE); - int ret = gd_rename(D, "data", "zata", 0); - int error = gd_error(D); - const char** fl = gd_field_list(D); - - const char* field_list[4]; + D = gd_open(filedir, GD_RDWR | GD_VERBOSE); + ret = gd_rename(D, "data", "zata", 0); + error = gd_error(D); + fl = gd_field_list(D); field_list[0] = strdup(fl[0]); field_list[1] = strdup(fl[1]); @@ -48,8 +49,8 @@ gd_close(D); - int unlink_data = unlink(data); - int unlink_zata = unlink(zata); + unlink_data = unlink(data); + unlink_zata = unlink(zata); unlink(format); rmdir(filedir); @@ -61,6 +62,10 @@ CHECKS(field_list[3], "zata"); CHECKI(unlink_data, 0); CHECKI(unlink_zata, -1); + free(field_list[0]); + free(field_list[1]); + free(field_list[2]); + free(field_list[3]); return r; } diff -Nru libgetdata-0.7.0/test/name_move.c libgetdata-0.7.1/test/name_move.c --- libgetdata-0.7.0/test/name_move.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/name_move.c 2010-11-28 03:13:12.000000000 +0000 @@ -19,7 +19,10 @@ const char* format_data = "cata RAW UINT8 8\ndata RAW UINT8 8\n" "eata RAW UINT8 8\n"; unsigned char data_data[256]; - int fd, r = 0; + int fd, ret, error, unlink_data, unlink_zata, r = 0; + const char **fl; + char *field_list[4]; + DIRFILE *D; mkdir(filedir, 0777); @@ -34,12 +37,10 @@ write(fd, data_data, 256); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDWR | GD_VERBOSE); - int ret = gd_rename(D, "data", "zata", 1); - int error = gd_error(D); - const char** fl = gd_field_list(D); - - const char* field_list[4]; + D = gd_open(filedir, GD_RDWR | GD_VERBOSE); + ret = gd_rename(D, "data", "zata", 1); + error = gd_error(D); + fl = gd_field_list(D); field_list[0] = strdup(fl[0]); field_list[1] = strdup(fl[1]); @@ -48,8 +49,8 @@ gd_close(D); - int unlink_data = unlink(data); - int unlink_zata = unlink(zata); + unlink_data = unlink(data); + unlink_zata = unlink(zata); unlink(format); rmdir(filedir); @@ -61,6 +62,10 @@ CHECKS(field_list[3], "zata"); CHECKI(unlink_data, -1); CHECKI(unlink_zata, 0); + free(field_list[0]); + free(field_list[1]); + free(field_list[2]); + free(field_list[3]); return r; } diff -Nru libgetdata-0.7.0/test/nfields.c libgetdata-0.7.1/test/nfields.c --- libgetdata-0.7.0/test/nfields.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/nfields.c 2010-11-28 03:01:35.000000000 +0000 @@ -27,7 +27,9 @@ "const CONST UINT8 1\n" "string STRING value\n" "string2 STRING value\n"; - int fd, r = 0; + int fd, error, r = 0; + unsigned int nfields; + DIRFILE *D; mkdir(filedir, 0777); @@ -35,9 +37,9 @@ write(fd, format_data, strlen(format_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - unsigned int nfields = gd_nfields(D); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + nfields = gd_nfields(D); + error = gd_error(D); gd_close(D); unlink(format); diff -Nru libgetdata-0.7.0/test/nfields_type.c libgetdata-0.7.1/test/nfields_type.c --- libgetdata-0.7.0/test/nfields_type.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/nfields_type.c 2010-11-28 03:02:05.000000000 +0000 @@ -27,7 +27,9 @@ "const CONST UINT8 1\n" "string STRING value\n" "string2 STRING value\n"; - int fd, r = 0; + int fd, error, r = 0; + unsigned int nfields; + DIRFILE *D; mkdir(filedir, 0777); @@ -35,9 +37,9 @@ write(fd, format_data, strlen(format_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - unsigned int nfields = gd_nfields_by_type(D, GD_STRING_ENTRY); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + nfields = gd_nfields_by_type(D, GD_STRING_ENTRY); + error = gd_error(D); gd_close(D); unlink(format); diff -Nru libgetdata-0.7.0/test/nfragments.c libgetdata-0.7.1/test/nfragments.c --- libgetdata-0.7.0/test/nfragments.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/nfragments.c 2010-11-28 03:02:21.000000000 +0000 @@ -16,7 +16,8 @@ const char* format1 = __TEST__ "dirfile/format1"; const char* format_data = "INCLUDE format1\n"; const char* format1_data = "data RAW UINT8 11\n"; - int fd, r = 0; + int fd, nfragments, r = 0; + DIRFILE *D; mkdir(filedir, 0777); @@ -28,8 +29,8 @@ write(fd, format1_data, strlen(format1_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int nfragments = gd_nfragments(D); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + nfragments = gd_nfragments(D); gd_close(D); unlink(format1); diff -Nru libgetdata-0.7.0/test/nframes64.c libgetdata-0.7.1/test/nframes64.c --- libgetdata-0.7.0/test/nframes64.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/nframes64.c 2010-11-28 03:03:29.000000000 +0000 @@ -17,8 +17,10 @@ const char* format = __TEST__ "dirfile/format"; const char* data = __TEST__ "dirfile/data"; const char* format_data = "data RAW UINT8 1\n"; - int fd; + int fd, r = 0; + size_t n; const size_t len = strlen(data); + DIRFILE *D; mkdir(filedir, 0777); @@ -30,13 +32,15 @@ write(fd, data, len); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - size_t n = gd_nframes64(D); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + n = gd_nframes64(D); gd_close(D); unlink(data); unlink(format); rmdir(filedir); - return !(n == len); + CHECKU(n, len); + + return r; } diff -Nru libgetdata-0.7.0/test/nframes.c libgetdata-0.7.1/test/nframes.c --- libgetdata-0.7.0/test/nframes.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/nframes.c 2010-11-28 03:02:35.000000000 +0000 @@ -15,8 +15,10 @@ const char* format = __TEST__ "dirfile/format"; const char* data = __TEST__ "dirfile/data"; const char* format_data = "data RAW UINT16 1\n"; - int fd, r = 0; + int fd, error, r = 0; const size_t len = strlen(data); + off_t n; + DIRFILE *D; mkdir(filedir, 0777); @@ -28,9 +30,9 @@ write(fd, data, len); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - off_t n = gd_nframes(D); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + n = gd_nframes(D); + error = gd_error(D); gd_close(D); unlink(data); diff -Nru libgetdata-0.7.0/test/nframes_empty.c libgetdata-0.7.1/test/nframes_empty.c --- libgetdata-0.7.0/test/nframes_empty.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/nframes_empty.c 2010-11-28 03:04:18.000000000 +0000 @@ -12,20 +12,23 @@ { const char* filedir = __TEST__ "dirfile"; const char* format = __TEST__ "dirfile/format"; + int error, r = 0; + DIRFILE *D; + size_t n; mkdir(filedir, 0777); close(open(format, O_CREAT | O_EXCL | O_WRONLY, 0666)); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - size_t n = gd_nframes(D); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + n = gd_nframes(D); + error = gd_error(D); gd_close(D); unlink(format); rmdir(filedir); - if (n != 0) - return 1; + CHECKU(n, 0); + CHECKI(error, GD_E_OK); - return (error != GD_E_OK); + return r; } diff -Nru libgetdata-0.7.0/test/nframes_invalid.c libgetdata-0.7.1/test/nframes_invalid.c --- libgetdata-0.7.0/test/nframes_invalid.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/nframes_invalid.c 2010-11-28 03:04:47.000000000 +0000 @@ -11,14 +11,14 @@ int main(void) { const char* filedir = __TEST__ "dirfile"; - + int r = 0; DIRFILE* D = gd_open(filedir, GD_RDONLY); size_t n = gd_nframes(D); int error = gd_error(D); gd_close(D); - if (n != 0) - return 1; + CHECKU(n, 0); + CHECKI(error, GD_E_BAD_DIRFILE); - return (error != GD_E_BAD_DIRFILE); + return r; } diff -Nru libgetdata-0.7.0/test/nframes_off64.c libgetdata-0.7.1/test/nframes_off64.c --- libgetdata-0.7.0/test/nframes_off64.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/nframes_off64.c 2010-11-28 03:13:42.000000000 +0000 @@ -24,8 +24,10 @@ const char* format = __TEST__ "dirfile/format"; const char* data = __TEST__ "dirfile/data"; const char* format_data = "data RAW UINT8 1\n"; - int fd; + int fd, r = 0; + size_t n; const size_t len = strlen(data); + DIRFILE *D; mkdir(filedir, 0777); @@ -37,14 +39,16 @@ write(fd, data, len); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - size_t n = gd_nframes(D); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + n = gd_nframes(D); gd_close(D); unlink(data); unlink(format); rmdir(filedir); - return !(n == len); + CHECKU(n, len); + + return r; #endif } diff -Nru libgetdata-0.7.0/test/nframes_spf.c libgetdata-0.7.1/test/nframes_spf.c --- libgetdata-0.7.0/test/nframes_spf.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/nframes_spf.c 2010-11-28 06:29:59.000000000 +0000 @@ -26,9 +26,8 @@ const char* filedir = __TEST__ "dirfile"; const char* format = __TEST__ "dirfile/format"; const char* data = __TEST__ "dirfile/data"; - int fd; - int i; - const int len = strlen(data); + int fd, i, r = 0; + const size_t len = strlen(data); mkdir(filedir, 0777); @@ -36,13 +35,16 @@ write(fd, data, len); close(fd); - for (i = 1; i < len + 1; ++i) { + for (i = 1; i < (int)len + 1; ++i) { + DIRFILE *D; + gd_spf_t spf; + size_t n; + write_format(format, i); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - unsigned int spf = gd_spf(D, "data"); - size_t n = gd_nframes(D); - if (n != len / spf) - return 1; + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + spf = gd_spf(D, "data"); + n = gd_nframes(D); + CHECKUi(i, n, len / spf); gd_close(D); } @@ -50,5 +52,5 @@ unlink(format); rmdir(filedir); - return 0; + return r; } diff -Nru libgetdata-0.7.0/test/nmeta.c libgetdata-0.7.1/test/nmeta.c --- libgetdata-0.7.0/test/nmeta.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/nmeta.c 2010-11-28 03:06:54.000000000 +0000 @@ -27,7 +27,9 @@ "const CONST UINT8 1\n" "string STRING value\n" "string2 STRING value\n"; - int fd; + int fd, error, r = 0; + unsigned int nfields; + DIRFILE *D; mkdir(filedir, 0777); @@ -35,16 +37,16 @@ write(fd, format_data, strlen(format_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - unsigned int nfields = gd_nmfields(D, "raw1"); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + nfields = gd_nmfields(D, "raw1"); + error = gd_error(D); gd_close(D); unlink(format); rmdir(filedir); - if (error) - return 1; + CHECKI(error, 0); + CHECKU(nfields, 6); - return (nfields != 6); + return r; } diff -Nru libgetdata-0.7.0/test/nmeta_invalid.c libgetdata-0.7.1/test/nmeta_invalid.c --- libgetdata-0.7.0/test/nmeta_invalid.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/nmeta_invalid.c 2010-11-28 03:07:25.000000000 +0000 @@ -11,14 +11,14 @@ int main(void) { const char* filedir = __TEST__ "dirfile"; - + int r = 0; DIRFILE* D = gd_open(filedir, GD_RDONLY); unsigned int n = gd_nmfields(D, "raw1"); int error = gd_error(D); gd_close(D); - if (n != 0) - return 1; + CHECKU(n, 0); + CHECKI(error, GD_E_BAD_DIRFILE); - return (error != GD_E_BAD_DIRFILE); + return r; } diff -Nru libgetdata-0.7.0/test/nmeta_parent.c libgetdata-0.7.1/test/nmeta_parent.c --- libgetdata-0.7.0/test/nmeta_parent.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/nmeta_parent.c 2010-11-28 03:08:04.000000000 +0000 @@ -27,7 +27,9 @@ "const CONST UINT8 1\n" "string STRING value\n" "string2 STRING value\n"; - int fd; + int fd, error, r = 0; + unsigned int nfields; + DIRFILE *D; mkdir(filedir, 0777); @@ -35,16 +37,16 @@ write(fd, format_data, strlen(format_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY); - unsigned int nfields = gd_nmfields(D, "raw9"); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY); + nfields = gd_nmfields(D, "raw9"); + error = gd_error(D); gd_close(D); unlink(format); rmdir(filedir); - if (nfields != 0) - return 1; + CHECKU(nfields, 0); + CHECKI(error, GD_E_BAD_CODE); - return (error != GD_E_BAD_CODE); + return r; } diff -Nru libgetdata-0.7.0/test/nmeta_type.c libgetdata-0.7.1/test/nmeta_type.c --- libgetdata-0.7.0/test/nmeta_type.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/nmeta_type.c 2010-11-28 03:14:29.000000000 +0000 @@ -27,7 +27,9 @@ "const CONST UINT8 1\n" "string STRING value\n" "string2 STRING value\n"; - int fd; + int fd, error, r = 0; + unsigned int nfields; + DIRFILE *D; mkdir(filedir, 0777); @@ -35,16 +37,16 @@ write(fd, format_data, strlen(format_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - unsigned int nfields = gd_nmfields_by_type(D, "raw1", GD_STRING_ENTRY); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + nfields = gd_nmfields_by_type(D, "raw1", GD_STRING_ENTRY); + error = gd_error(D); gd_close(D); unlink(format); rmdir(filedir); - if (error) - return 1; + CHECKI(error, 0); + CHECKU(nfields, 2); - return (nfields != 2); + return r; } diff -Nru libgetdata-0.7.0/test/nmeta_type_invalid.c libgetdata-0.7.1/test/nmeta_type_invalid.c --- libgetdata-0.7.0/test/nmeta_type_invalid.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/nmeta_type_invalid.c 2010-11-28 03:09:17.000000000 +0000 @@ -11,14 +11,14 @@ int main(void) { const char* filedir = __TEST__ "dirfile"; - + int r = 0; DIRFILE* D = gd_open(filedir, GD_RDONLY); unsigned int n = gd_nmfields_by_type(D, "raw1", GD_STRING_ENTRY); int error = gd_error(D); gd_close(D); - if (n != 0) - return 1; + CHECKU(n, 0); + CHECKI(error, GD_E_BAD_DIRFILE); - return (error != GD_E_BAD_DIRFILE); + return r; } diff -Nru libgetdata-0.7.0/test/nmeta_type_parent.c libgetdata-0.7.1/test/nmeta_type_parent.c --- libgetdata-0.7.0/test/nmeta_type_parent.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/nmeta_type_parent.c 2010-11-28 03:10:02.000000000 +0000 @@ -27,7 +27,9 @@ "const CONST UINT8 1\n" "string STRING value\n" "string2 STRING value\n"; - int fd; + int fd, error, r = 0; + unsigned int nfields; + DIRFILE *D; mkdir(filedir, 0777); @@ -35,16 +37,16 @@ write(fd, format_data, strlen(format_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY); - unsigned int nfields = gd_nmfields_by_type(D, "raw9", GD_STRING_ENTRY); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY); + nfields = gd_nmfields_by_type(D, "raw9", GD_STRING_ENTRY); + error = gd_error(D); gd_close(D); unlink(format); rmdir(filedir); - if (nfields != 0) - return 1; + CHECKU(nfields, 0); + CHECKI(error, GD_E_BAD_CODE); - return (error != GD_E_BAD_CODE); + return r; } diff -Nru libgetdata-0.7.0/test/nmeta_vectors.c libgetdata-0.7.1/test/nmeta_vectors.c --- libgetdata-0.7.0/test/nmeta_vectors.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/nmeta_vectors.c 2010-11-28 03:14:56.000000000 +0000 @@ -27,7 +27,9 @@ "const CONST UINT8 1\n" "string STRING value\n" "string2 STRING value\n"; - int fd; + int fd, error, r = 0; + unsigned int nfields; + DIRFILE *D; mkdir(filedir, 0777); @@ -35,16 +37,16 @@ write(fd, format_data, strlen(format_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - unsigned int nfields = gd_nmvectors(D, "raw1"); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + nfields = gd_nmvectors(D, "raw1"); + error = gd_error(D); gd_close(D); unlink(format); rmdir(filedir); - if (error) - return 1; + CHECKI(error, 0); + CHECKU(nfields, 3); - return (nfields != 3); + return r; } diff -Nru libgetdata-0.7.0/test/nmeta_vectors_del.c libgetdata-0.7.1/test/nmeta_vectors_del.c --- libgetdata-0.7.0/test/nmeta_vectors_del.c 2010-11-01 22:08:45.000000000 +0000 +++ libgetdata-0.7.1/test/nmeta_vectors_del.c 2010-11-28 03:11:24.000000000 +0000 @@ -26,7 +26,9 @@ "const CONST UINT8 1\n" "string STRING value\n" "string2 STRING value\n"; - int fd, r = 0; + int fd, error, error2, error3, r = 0; + unsigned int nvec, nvec2, nvec3; + DIRFILE *D; mkdir(filedir, 0777); @@ -34,15 +36,15 @@ write(fd, format_data, strlen(format_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDWR | GD_VERBOSE); - unsigned int nvec = gd_nmvectors(D, "raw1"); - int error = gd_error(D); + D = gd_open(filedir, GD_RDWR | GD_VERBOSE); + nvec = gd_nmvectors(D, "raw1"); + error = gd_error(D); gd_delete(D, "raw1/linterp3", 0); - unsigned int nvec2 = gd_nmvectors(D, "raw1"); - int error2 = gd_error(D); + nvec2 = gd_nmvectors(D, "raw1"); + error2 = gd_error(D); gd_delete(D, "raw1/string", 0); - unsigned int nvec3 = gd_nmvectors(D, "raw1"); - int error3 = gd_error(D); + nvec3 = gd_nmvectors(D, "raw1"); + error3 = gd_error(D); gd_discard(D); unlink(format); diff -Nru libgetdata-0.7.0/test/nmeta_vectors_invalid.c libgetdata-0.7.1/test/nmeta_vectors_invalid.c --- libgetdata-0.7.0/test/nmeta_vectors_invalid.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/nmeta_vectors_invalid.c 2010-11-28 03:15:14.000000000 +0000 @@ -11,14 +11,14 @@ int main(void) { const char* filedir = __TEST__ "dirfile"; - + int r = 0; DIRFILE* D = gd_open(filedir, GD_RDONLY); unsigned int n = gd_nmvectors(D, "raw1"); int error = gd_error(D); gd_close(D); - if (n != 0) - return 1; + CHECKU(n, 0); + CHECKI(error, GD_E_BAD_DIRFILE); - return (error != GD_E_BAD_DIRFILE); + return r; } diff -Nru libgetdata-0.7.0/test/nmeta_vectors_parent.c libgetdata-0.7.1/test/nmeta_vectors_parent.c --- libgetdata-0.7.0/test/nmeta_vectors_parent.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/nmeta_vectors_parent.c 2010-11-28 03:12:23.000000000 +0000 @@ -27,7 +27,9 @@ "const CONST UINT8 1\n" "string STRING value\n" "string2 STRING value\n"; - int fd; + int fd, error, r = 0; + unsigned int nfields; + DIRFILE *D; mkdir(filedir, 0777); @@ -35,16 +37,16 @@ write(fd, format_data, strlen(format_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY); - unsigned int nfields = gd_nmvectors(D, "raw9"); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY); + nfields = gd_nmvectors(D, "raw9"); + error = gd_error(D); gd_close(D); unlink(format); rmdir(filedir); - if (nfields != 0) - return 1; + CHECKU(nfields, 0); + CHECKI(error, GD_E_BAD_CODE); - return (error != GD_E_BAD_CODE); + return r; } diff -Nru libgetdata-0.7.0/test/nvectors.c libgetdata-0.7.1/test/nvectors.c --- libgetdata-0.7.0/test/nvectors.c 2010-11-01 09:00:40.000000000 +0000 +++ libgetdata-0.7.1/test/nvectors.c 2010-11-28 03:15:27.000000000 +0000 @@ -28,7 +28,9 @@ "carray CARRAY UINT8 1\n" "string STRING value\n" "string2 STRING value\n"; - int fd, r = 0; + int fd, error, r = 0; + unsigned int nfields; + DIRFILE *D; mkdir(filedir, 0777); @@ -36,9 +38,9 @@ write(fd, format_data, strlen(format_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - unsigned int nfields = gd_nvectors(D); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + nfields = gd_nvectors(D); + error = gd_error(D); gd_close(D); unlink(format); diff -Nru libgetdata-0.7.0/test/open.c libgetdata-0.7.1/test/open.c --- libgetdata-0.7.0/test/open.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/open.c 2010-11-28 03:16:03.000000000 +0000 @@ -12,13 +12,14 @@ { const char* filedir = __TEST__ "dirfile"; const char* format = __TEST__ "dirfile/format"; - int r = 0; + int error, r = 0; + DIRFILE *D; mkdir(filedir, 0777); close(open(format, O_CREAT | O_EXCL | O_WRONLY, 0666)); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + error = gd_error(D); gd_close(D); unlink(format); diff -Nru libgetdata-0.7.0/test/open_cb_abort.c libgetdata-0.7.1/test/open_cb_abort.c --- libgetdata-0.7.0/test/open_cb_abort.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/open_cb_abort.c 2010-11-28 03:16:12.000000000 +0000 @@ -28,7 +28,8 @@ "BADDIRECTIVE BADTYPE\n" "BADDIRECTIVE BADTYPE\n" "BADDIRECTIVE BADTYPE\n"; - int fd, r = 0; + int fd, error, r = 0; + DIRFILE *D; mkdir(filedir, 0777); @@ -36,8 +37,8 @@ write(fd, format_data, strlen(format_data)); close(fd); - DIRFILE* D = gd_cbopen(filedir, GD_RDONLY, callback, NULL); - int error = gd_error(D); + D = gd_cbopen(filedir, GD_RDONLY, callback, NULL); + error = gd_error(D); gd_close(D); unlink(format); diff -Nru libgetdata-0.7.0/test/open_cb_cont.c libgetdata-0.7.1/test/open_cb_cont.c --- libgetdata-0.7.0/test/open_cb_cont.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/open_cb_cont.c 2010-11-28 03:16:23.000000000 +0000 @@ -27,7 +27,8 @@ "BADDIRECTIVE BADTYPE\n" "BADDIRECTIVE BADTYPE\n" "BADDIRECTIVE BADTYPE\n"; - int fd, r = 0; + int fd, error, r = 0; + DIRFILE *D; mkdir(filedir, 0777); @@ -35,8 +36,8 @@ write(fd, format_data, strlen(format_data)); close(fd); - DIRFILE* D = gd_cbopen(filedir, GD_RDONLY, callback, NULL); - int error = gd_error(D); + D = gd_cbopen(filedir, GD_RDONLY, callback, NULL); + error = gd_error(D); gd_close(D); unlink(format); diff -Nru libgetdata-0.7.0/test/open_cb_ignore.c libgetdata-0.7.1/test/open_cb_ignore.c --- libgetdata-0.7.0/test/open_cb_ignore.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/open_cb_ignore.c 2010-11-28 03:16:33.000000000 +0000 @@ -24,7 +24,8 @@ const char* filedir = __TEST__ "dirfile"; const char* format = __TEST__ "dirfile/format"; const char* format_data = "BADDIRECTIVE BADTYPE\n"; - int fd, r = 0; + int fd, error, r = 0; + DIRFILE *D; mkdir(filedir, 0777); @@ -32,8 +33,8 @@ write(fd, format_data, strlen(format_data)); close(fd); - DIRFILE* D = gd_cbopen(filedir, GD_RDONLY, callback, NULL); - int error = gd_error(D); + D = gd_cbopen(filedir, GD_RDONLY, callback, NULL); + error = gd_error(D); gd_close(D); unlink(format); diff -Nru libgetdata-0.7.0/test/open_cb_invalid.c libgetdata-0.7.1/test/open_cb_invalid.c --- libgetdata-0.7.0/test/open_cb_invalid.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/open_cb_invalid.c 2010-11-28 03:16:41.000000000 +0000 @@ -28,7 +28,8 @@ "BADDIRECTIVE BADTYPE\n" "BADDIRECTIVE BADTYPE\n" "BADDIRECTIVE BADTYPE\n"; - int fd, r = 0; + int fd, error, r = 0; + DIRFILE *D; mkdir(filedir, 0777); @@ -36,8 +37,8 @@ write(fd, format_data, strlen(format_data)); close(fd); - DIRFILE* D = gd_cbopen(filedir, GD_RDONLY, callback, NULL); - int error = gd_error(D); + D = gd_cbopen(filedir, GD_RDONLY, callback, NULL); + error = gd_error(D); gd_close(D); unlink(format); diff -Nru libgetdata-0.7.0/test/open_cb_rescan.c libgetdata-0.7.1/test/open_cb_rescan.c --- libgetdata-0.7.0/test/open_cb_rescan.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/open_cb_rescan.c 2010-11-28 03:16:50.000000000 +0000 @@ -29,7 +29,8 @@ const char* filedir = __TEST__ "dirfile"; const char* format = __TEST__ "dirfile/format"; const char* format_data = "BADDIRECTIVE BADTYPE\n"; - int fd, r = 0; + int fd, error, r = 0; + DIRFILE *D; mkdir(filedir, 0777); @@ -37,8 +38,8 @@ write(fd, format_data, strlen(format_data)); close(fd); - DIRFILE* D = gd_cbopen(filedir, GD_RDONLY, callback, NULL); - int error = gd_error(D); + D = gd_cbopen(filedir, GD_RDONLY, callback, NULL); + error = gd_error(D); gd_close(D); unlink(format); diff -Nru libgetdata-0.7.0/test/open_eaccess.c libgetdata-0.7.1/test/open_eaccess.c --- libgetdata-0.7.0/test/open_eaccess.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/open_eaccess.c 2010-11-28 03:17:02.000000000 +0000 @@ -13,13 +13,13 @@ { const char* filedir = __TEST__ "dirfile"; const char* format = __TEST__ "dirfile/format"; - int r = 0; + int fd, error, r = 0; + DIRFILE *D; mkdir(filedir, 0777); close(open(format, O_CREAT | O_EXCL | O_WRONLY, 0000)); /* ensure filesystem honours access */ - int fd; if ((fd = open(format, O_RDONLY)) >= 0 || errno != EACCES) { if (fd >= 0) close(fd); @@ -28,8 +28,8 @@ return 77; } - DIRFILE* D = gd_open(filedir, GD_RDONLY); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY); + error = gd_error(D); gd_close(D); unlink(format); diff -Nru libgetdata-0.7.0/test/open_nonexistent.c libgetdata-0.7.1/test/open_nonexistent.c --- libgetdata-0.7.0/test/open_nonexistent.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/open_nonexistent.c 2010-11-27 04:21:41.000000000 +0000 @@ -8,6 +8,7 @@ int error = gd_error(D); CHECKI(error, GD_E_OPEN); + gd_discard(D); return r; } diff -Nru libgetdata-0.7.0/test/open_notdirfile.c libgetdata-0.7.1/test/open_notdirfile.c --- libgetdata-0.7.0/test/open_notdirfile.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/open_notdirfile.c 2010-11-28 03:17:33.000000000 +0000 @@ -11,15 +11,17 @@ int main(void) { const char* filedir = __TEST__ "dirfile"; - int r = 0; + int error, r = 0; + DIRFILE *D; mkdir(filedir, 0777); - DIRFILE* D = gd_open(filedir, GD_RDONLY); + D = gd_open(filedir, GD_RDONLY); rmdir(filedir); - int error = gd_error(D); + error = gd_error(D); CHECKI(error, GD_E_OPEN); + gd_discard(D); return r; } diff -Nru libgetdata-0.7.0/test/parent.c libgetdata-0.7.1/test/parent.c --- libgetdata-0.7.0/test/parent.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/parent.c 2010-11-28 03:35:34.000000000 +0000 @@ -19,7 +19,8 @@ const char* format_data = "/INCLUDE format1\na CONST UINT8 1\n"; const char* format1_data = "b CONST UINT8 11\n/INCLUDE format2 UINT8 11"; const char* format2_data = "c CONST UINT8 11\n"; - int fd, r = 0; + int fd, parent, error, r = 0; + DIRFILE *D; mkdir(filedir, 0777); @@ -35,9 +36,9 @@ write(fd, format2_data, strlen(format2_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDWR | GD_VERBOSE); - int parent = gd_parent_fragment(D, 2); - int error = gd_error(D); + D = gd_open(filedir, GD_RDWR | GD_VERBOSE); + parent = gd_parent_fragment(D, 2); + error = gd_error(D); gd_close(D); unlink(format2); diff -Nru libgetdata-0.7.0/test/parse_badline.c libgetdata-0.7.1/test/parse_badline.c --- libgetdata-0.7.0/test/parse_badline.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/parse_badline.c 2010-11-28 03:35:43.000000000 +0000 @@ -14,7 +14,8 @@ const char* filedir = __TEST__ "dirfile"; const char* format = __TEST__ "dirfile/format"; const char* format_data = "BADDIRECTIVE BADTYPE\n"; - int fd, r = 0; + int fd, error, r = 0; + DIRFILE *D; mkdir(filedir, 0777); @@ -22,8 +23,8 @@ write(fd, format_data, strlen(format_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY); + error = gd_error(D); gd_close(D); unlink(format); diff -Nru libgetdata-0.7.0/test/parse_bit4.c libgetdata-0.7.1/test/parse_bit4.c --- libgetdata-0.7.0/test/parse_bit4.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/parse_bit4.c 2010-11-28 03:36:48.000000000 +0000 @@ -14,7 +14,8 @@ const char* filedir = __TEST__ "dirfile"; const char* format = __TEST__ "dirfile/format"; const char* format_data = "data BIT in1 3 4\n"; - int fd, r = 0; + int fd, error, r = 0; + DIRFILE *D; mkdir(filedir, 0777); @@ -22,8 +23,8 @@ write(fd, format_data, strlen(format_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + error = gd_error(D); gd_close(D); unlink(format); diff -Nru libgetdata-0.7.0/test/parse_bit_bitnum.c libgetdata-0.7.1/test/parse_bit_bitnum.c --- libgetdata-0.7.0/test/parse_bit_bitnum.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/parse_bit_bitnum.c 2010-11-28 03:36:55.000000000 +0000 @@ -14,7 +14,8 @@ const char* filedir = __TEST__ "dirfile"; const char* format = __TEST__ "dirfile/format"; const char* format_data = "data BIT in1 -1\n"; - int fd, r = 0; + int fd, error, r = 0; + DIRFILE *D; mkdir(filedir, 0777); @@ -22,8 +23,8 @@ write(fd, format_data, strlen(format_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY); + error = gd_error(D); gd_close(D); unlink(format); diff -Nru libgetdata-0.7.0/test/parse_bit_bitsize.c libgetdata-0.7.1/test/parse_bit_bitsize.c --- libgetdata-0.7.0/test/parse_bit_bitsize.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/parse_bit_bitsize.c 2010-11-28 03:37:02.000000000 +0000 @@ -14,7 +14,8 @@ const char* filedir = __TEST__ "dirfile"; const char* format = __TEST__ "dirfile/format"; const char* format_data = "data BIT in1 63 2\n"; - int fd, r = 0; + int fd, error, r = 0; + DIRFILE *D; mkdir(filedir, 0777); @@ -22,8 +23,8 @@ write(fd, format_data, strlen(format_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY); + error = gd_error(D); gd_close(D); unlink(format); diff -Nru libgetdata-0.7.0/test/parse_bit.c libgetdata-0.7.1/test/parse_bit.c --- libgetdata-0.7.0/test/parse_bit.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/parse_bit.c 2010-11-28 03:36:25.000000000 +0000 @@ -14,7 +14,8 @@ const char* filedir = __TEST__ "dirfile"; const char* format = __TEST__ "dirfile/format"; const char* format_data = "data BIT in1 3\n"; - int fd, r = 0; + int fd, error, r = 0; + DIRFILE *D; mkdir(filedir, 0777); @@ -22,8 +23,8 @@ write(fd, format_data, strlen(format_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + error = gd_error(D); gd_close(D); unlink(format); diff -Nru libgetdata-0.7.0/test/parse_bit_ncols.c libgetdata-0.7.1/test/parse_bit_ncols.c --- libgetdata-0.7.0/test/parse_bit_ncols.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/parse_bit_ncols.c 2010-11-28 03:37:07.000000000 +0000 @@ -14,7 +14,8 @@ const char* filedir = __TEST__ "dirfile"; const char* format = __TEST__ "dirfile/format"; const char* format_data = "data BIT in1\n"; - int fd, r = 0; + int fd, error, r = 0; + DIRFILE *D; mkdir(filedir, 0777); @@ -22,8 +23,8 @@ write(fd, format_data, strlen(format_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY); + error = gd_error(D); gd_close(D); unlink(format); diff -Nru libgetdata-0.7.0/test/parse_bit_numbits.c libgetdata-0.7.1/test/parse_bit_numbits.c --- libgetdata-0.7.0/test/parse_bit_numbits.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/parse_bit_numbits.c 2010-11-28 03:37:15.000000000 +0000 @@ -14,7 +14,8 @@ const char* filedir = __TEST__ "dirfile"; const char* format = __TEST__ "dirfile/format"; const char* format_data = "data BIT in1 1 0\n"; - int fd, r = 0; + int fd, error, r = 0; + DIRFILE *D; mkdir(filedir, 0777); @@ -22,8 +23,8 @@ write(fd, format_data, strlen(format_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY); + error = gd_error(D); gd_close(D); unlink(format); diff -Nru libgetdata-0.7.0/test/parse_bit_scalar.c libgetdata-0.7.1/test/parse_bit_scalar.c --- libgetdata-0.7.0/test/parse_bit_scalar.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/parse_bit_scalar.c 2010-11-28 03:40:33.000000000 +0000 @@ -14,7 +14,8 @@ const char* filedir = __TEST__ "dirfile"; const char* format = __TEST__ "dirfile/format"; const char* format_data = "const CONST INT32 3\ndata BIT in1 const\n"; - int fd, r = 0; + int fd, error, r = 0; + DIRFILE *D; mkdir(filedir, 0777); @@ -22,8 +23,8 @@ write(fd, format_data, strlen(format_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + error = gd_error(D); gd_close(D); unlink(format); diff -Nru libgetdata-0.7.0/test/parse_carray.c libgetdata-0.7.1/test/parse_carray.c --- libgetdata-0.7.0/test/parse_carray.c 2010-10-30 23:34:13.000000000 +0000 +++ libgetdata-0.7.1/test/parse_carray.c 2010-11-28 03:40:39.000000000 +0000 @@ -14,7 +14,8 @@ const char* filedir = __TEST__ "dirfile"; const char* format = __TEST__ "dirfile/format"; const char* format_data = "c CARRAY UINT8 1 2 3 4\n"; - int fd, r = 0; + int fd, error, r = 0; + DIRFILE *D; mkdir(filedir, 0777); @@ -22,8 +23,8 @@ write(fd, format_data, strlen(format_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + error = gd_error(D); gd_close(D); unlink(format); diff -Nru libgetdata-0.7.0/test/parse_carray_long.c libgetdata-0.7.1/test/parse_carray_long.c --- libgetdata-0.7.0/test/parse_carray_long.c 2010-10-30 23:39:33.000000000 +0000 +++ libgetdata-0.7.1/test/parse_carray_long.c 2010-11-28 03:40:46.000000000 +0000 @@ -14,7 +14,8 @@ const char* filedir = __TEST__ "dirfile"; const char* format = __TEST__ "dirfile/format"; const char* format_data = "c CARRAY UINT8 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41\n"; - int fd, r = 0; + int fd, error, r = 0; + DIRFILE *D; mkdir(filedir, 0777); @@ -22,8 +23,8 @@ write(fd, format_data, strlen(format_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + error = gd_error(D); gd_close(D); unlink(format); diff -Nru libgetdata-0.7.0/test/parse_const.c libgetdata-0.7.1/test/parse_const.c --- libgetdata-0.7.0/test/parse_const.c 2010-10-30 23:31:39.000000000 +0000 +++ libgetdata-0.7.1/test/parse_const.c 2010-11-28 05:27:17.000000000 +0000 @@ -14,7 +14,8 @@ const char* filedir = __TEST__ "dirfile"; const char* format = __TEST__ "dirfile/format"; const char* format_data = "const CONST UINT8 1\n"; - int fd, r = 0; + int fd, error, r = 0; + DIRFILE *D; mkdir(filedir, 0777); @@ -22,8 +23,8 @@ write(fd, format_data, strlen(format_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + error = gd_error(D); gd_close(D); unlink(format); diff -Nru libgetdata-0.7.0/test/parse_const_ncols.c libgetdata-0.7.1/test/parse_const_ncols.c --- libgetdata-0.7.0/test/parse_const_ncols.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/parse_const_ncols.c 2010-11-28 03:40:57.000000000 +0000 @@ -14,7 +14,8 @@ const char* filedir = __TEST__ "dirfile"; const char* format = __TEST__ "dirfile/format"; const char* format_data = "const RAW UINT8\n"; - int fd, r = 0; + int fd, error, r = 0; + DIRFILE *D; mkdir(filedir, 0777); @@ -22,8 +23,8 @@ write(fd, format_data, strlen(format_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY); + error = gd_error(D); gd_close(D); unlink(format); diff -Nru libgetdata-0.7.0/test/parse_divide.c libgetdata-0.7.1/test/parse_divide.c --- libgetdata-0.7.0/test/parse_divide.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/parse_divide.c 2010-11-28 03:41:02.000000000 +0000 @@ -14,7 +14,8 @@ const char* filedir = __TEST__ "dirfile"; const char* format = __TEST__ "dirfile/format"; const char* format_data = "data DIVIDE in1 in2\n"; - int fd, r = 0; + int fd, error, r = 0; + DIRFILE *D; mkdir(filedir, 0777); @@ -22,8 +23,8 @@ write(fd, format_data, strlen(format_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + error = gd_error(D); gd_close(D); unlink(format); diff -Nru libgetdata-0.7.0/test/parse_duplicate.c libgetdata-0.7.1/test/parse_duplicate.c --- libgetdata-0.7.0/test/parse_duplicate.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/parse_duplicate.c 2010-11-28 03:57:13.000000000 +0000 @@ -14,7 +14,8 @@ const char* filedir = __TEST__ "dirfile"; const char* format = __TEST__ "dirfile/format"; const char* format_data = "data RAW UINT8 1\ndata RAW UINT8 1\n"; - int fd, r = 0; + int fd, error, r = 0; + DIRFILE *D; mkdir(filedir, 0777); @@ -22,8 +23,8 @@ write(fd, format_data, strlen(format_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY); + error = gd_error(D); gd_close(D); unlink(format); diff -Nru libgetdata-0.7.0/test/parse_duplicate_ignore.c libgetdata-0.7.1/test/parse_duplicate_ignore.c --- libgetdata-0.7.0/test/parse_duplicate_ignore.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/parse_duplicate_ignore.c 2010-11-28 03:57:29.000000000 +0000 @@ -14,7 +14,8 @@ const char* filedir = __TEST__ "dirfile"; const char* format = __TEST__ "dirfile/format"; const char* format_data = "data RAW UINT8 1\ndata RAW UINT8 1\n"; - int fd, r = 0; + int fd, error, r = 0; + DIRFILE *D; mkdir(filedir, 0777); @@ -22,8 +23,8 @@ write(fd, format_data, strlen(format_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_IGNORE_DUPS); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY | GD_IGNORE_DUPS | GD_VERBOSE); + error = gd_error(D); gd_close(D); unlink(format); diff -Nru libgetdata-0.7.0/test/parse_endian_bad.c libgetdata-0.7.1/test/parse_endian_bad.c --- libgetdata-0.7.0/test/parse_endian_bad.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/parse_endian_bad.c 2010-11-28 04:25:50.000000000 +0000 @@ -14,7 +14,8 @@ const char* filedir = __TEST__ "dirfile"; const char* format = __TEST__ "dirfile/format"; const char* format_data = "ENDIAN badendianness\n"; - int fd, r = 0; + int fd, error, r = 0; + DIRFILE *D; mkdir(filedir, 0777); @@ -22,8 +23,8 @@ write(fd, format_data, strlen(format_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY); + error = gd_error(D); gd_close(D); unlink(format); diff -Nru libgetdata-0.7.0/test/parse_endian_big.c libgetdata-0.7.1/test/parse_endian_big.c --- libgetdata-0.7.0/test/parse_endian_big.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/parse_endian_big.c 2010-11-28 04:25:56.000000000 +0000 @@ -14,7 +14,8 @@ const char* filedir = __TEST__ "dirfile"; const char* format = __TEST__ "dirfile/format"; const char* format_data = "ENDIAN big\n"; - int fd, r = 0; + int fd, error, r = 0; + DIRFILE *D; mkdir(filedir, 0777); @@ -22,8 +23,8 @@ write(fd, format_data, strlen(format_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + error = gd_error(D); gd_close(D); unlink(format); diff -Nru libgetdata-0.7.0/test/parse_endian_force.c libgetdata-0.7.1/test/parse_endian_force.c --- libgetdata-0.7.0/test/parse_endian_force.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/parse_endian_force.c 2010-11-28 04:26:34.000000000 +0000 @@ -14,7 +14,8 @@ const char* filedir = __TEST__ "dirfile"; const char* format = __TEST__ "dirfile/format"; const char* format_data = "ENDIAN badendianness\n"; - int fd, r = 0; + int fd, error, r = 0; + DIRFILE *D; mkdir(filedir, 0777); @@ -22,8 +23,8 @@ write(fd, format_data, strlen(format_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_FORCE_ENDIAN | GD_VERBOSE); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY | GD_FORCE_ENDIAN | GD_VERBOSE); + error = gd_error(D); gd_close(D); unlink(format); diff -Nru libgetdata-0.7.0/test/parse_endian_little.c libgetdata-0.7.1/test/parse_endian_little.c --- libgetdata-0.7.0/test/parse_endian_little.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/parse_endian_little.c 2010-11-28 04:26:41.000000000 +0000 @@ -14,7 +14,8 @@ const char* filedir = __TEST__ "dirfile"; const char* format = __TEST__ "dirfile/format"; const char* format_data = "ENDIAN little\n"; - int fd, r = 0; + int fd, error, r = 0; + DIRFILE *D; mkdir(filedir, 0777); @@ -22,8 +23,8 @@ write(fd, format_data, strlen(format_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + error = gd_error(D); gd_close(D); unlink(format); diff -Nru libgetdata-0.7.0/test/parse_endian_slash.c libgetdata-0.7.1/test/parse_endian_slash.c --- libgetdata-0.7.0/test/parse_endian_slash.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/parse_endian_slash.c 2010-11-28 04:32:22.000000000 +0000 @@ -14,7 +14,8 @@ const char* filedir = __TEST__ "dirfile"; const char* format = __TEST__ "dirfile/format"; const char* format_data = "/ENDIAN big\n"; - int fd, r = 0; + int fd, error, r = 0; + DIRFILE *D; mkdir(filedir, 0777); @@ -22,8 +23,8 @@ write(fd, format_data, strlen(format_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + error = gd_error(D); gd_close(D); unlink(format); diff -Nru libgetdata-0.7.0/test/parse_eol.c libgetdata-0.7.1/test/parse_eol.c --- libgetdata-0.7.0/test/parse_eol.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/parse_eol.c 2010-11-28 04:32:34.000000000 +0000 @@ -14,7 +14,8 @@ const char* filedir = __TEST__ "dirfile"; const char* format = __TEST__ "dirfile/format"; const char* format_data = "data RAW UINT8 1\\\n"; - int fd, r = 0; + int fd, error, r = 0; + DIRFILE *D; mkdir(filedir, 0777); @@ -22,8 +23,8 @@ write(fd, format_data, strlen(format_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY); + error = gd_error(D); gd_close(D); unlink(format); diff -Nru libgetdata-0.7.0/test/parse_foffs.c libgetdata-0.7.1/test/parse_foffs.c --- libgetdata-0.7.0/test/parse_foffs.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/parse_foffs.c 2010-11-28 04:32:47.000000000 +0000 @@ -14,7 +14,8 @@ const char* filedir = __TEST__ "dirfile"; const char* format = __TEST__ "dirfile/format"; const char* format_data = "FRAMEOFFSET 73\n"; - int fd, r = 0; + int fd, error, r = 0; + DIRFILE *D; mkdir(filedir, 0777); @@ -22,8 +23,8 @@ write(fd, format_data, strlen(format_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + error = gd_error(D); gd_close(D); unlink(format); diff -Nru libgetdata-0.7.0/test/parse_foffs_include.c libgetdata-0.7.1/test/parse_foffs_include.c --- libgetdata-0.7.0/test/parse_foffs_include.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/parse_foffs_include.c 2010-11-28 04:33:12.000000000 +0000 @@ -25,9 +25,9 @@ const char* format2 = __TEST__ "dirfile/format2"; const char* format2_data = "data2 RAW UINT8 1\nFRAMEOFFSET 2"; - int fd; - int r = 0; + int fd, error, error2, error3, r = 0; uint8_t data_data[4] = { 0, 1, 2, 3 }; + DIRFILE *D; mkdir(filedir, 0777); @@ -51,20 +51,20 @@ write(fd, data_data, 4); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int error = gd_error(D); + error = gd_error(D); CHECKI(error, 0); gd_getdata(D, "data1", 3, 0, 1, 0, GD_UINT8, data_data); - int error2 = gd_error(D); + error2 = gd_error(D); CHECKI(error2, 0); CHECKU(data_data[0], 2); gd_getdata(D, "data2", 3, 0, 1, 0, GD_UINT8, data_data); - int error3 = gd_error(D); + error3 = gd_error(D); CHECKI(error3, 0); CHECKU(data_data[0], 1); diff -Nru libgetdata-0.7.0/test/parse_foffs_slash.c libgetdata-0.7.1/test/parse_foffs_slash.c --- libgetdata-0.7.0/test/parse_foffs_slash.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/parse_foffs_slash.c 2010-11-28 04:33:17.000000000 +0000 @@ -14,7 +14,8 @@ const char* filedir = __TEST__ "dirfile"; const char* format = __TEST__ "dirfile/format"; const char* format_data = "/FRAMEOFFSET 73\n"; - int fd, r = 0; + int fd, error, r = 0; + DIRFILE *D; mkdir(filedir, 0777); @@ -22,8 +23,8 @@ write(fd, format_data, strlen(format_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + error = gd_error(D); gd_close(D); unlink(format); diff -Nru libgetdata-0.7.0/test/parse_include.c libgetdata-0.7.1/test/parse_include.c --- libgetdata-0.7.0/test/parse_include.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/parse_include.c 2010-11-28 05:27:46.000000000 +0000 @@ -17,6 +17,8 @@ const char* format_data = "INCLUDE format1\n"; const char* format1_data = "data RAW UINT8 11\n"; int fd, r = 0; + DIRFILE *D; + gd_spf_t spf; mkdir(filedir, 0777); @@ -28,8 +30,8 @@ write(fd, format1_data, strlen(format1_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - unsigned int spf = gd_spf(D, "data"); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + spf = gd_spf(D, "data"); gd_close(D); unlink(format1); diff -Nru libgetdata-0.7.0/test/parse_include_nonexistent.c libgetdata-0.7.1/test/parse_include_nonexistent.c --- libgetdata-0.7.0/test/parse_include_nonexistent.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/parse_include_nonexistent.c 2010-11-28 04:33:39.000000000 +0000 @@ -14,7 +14,8 @@ const char* filedir = __TEST__ "dirfile"; const char* format = __TEST__ "dirfile/format"; const char* format_data = "INCLUDE non_existent_file\n"; - int fd, r = 0; + int fd, error, r = 0; + DIRFILE *D; mkdir(filedir, 0777); @@ -22,8 +23,8 @@ write(fd, format_data, strlen(format_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY); + error = gd_error(D); gd_close(D); unlink(format); diff -Nru libgetdata-0.7.0/test/parse_include_slash.c libgetdata-0.7.1/test/parse_include_slash.c --- libgetdata-0.7.0/test/parse_include_slash.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/parse_include_slash.c 2010-11-28 05:28:12.000000000 +0000 @@ -17,6 +17,8 @@ const char* format_data = "/INCLUDE format1\n"; const char* format1_data = "data RAW UINT8 11\n"; int fd, r = 0; + DIRFILE *D; + gd_spf_t spf; mkdir(filedir, 0777); @@ -28,8 +30,8 @@ write(fd, format1_data, strlen(format1_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - unsigned int spf = gd_spf(D, "data"); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + spf = gd_spf(D, "data"); gd_close(D); unlink(format1); diff -Nru libgetdata-0.7.0/test/parse_index.c libgetdata-0.7.1/test/parse_index.c --- libgetdata-0.7.0/test/parse_index.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/parse_index.c 2010-11-28 04:34:36.000000000 +0000 @@ -14,7 +14,8 @@ const char* filedir = __TEST__ "dirfile"; const char* format = __TEST__ "dirfile/format"; const char* format_data = "INDEX RAW UINT8 1\n"; - int fd, r = 0; + int fd, error, r = 0; + DIRFILE *D; mkdir(filedir, 0777); @@ -22,8 +23,8 @@ write(fd, format_data, strlen(format_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY); + error = gd_error(D); gd_close(D); unlink(format); diff -Nru libgetdata-0.7.0/test/parse_lincom.c libgetdata-0.7.1/test/parse_lincom.c --- libgetdata-0.7.0/test/parse_lincom.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/parse_lincom.c 2010-11-28 04:34:42.000000000 +0000 @@ -14,7 +14,8 @@ const char* filedir = __TEST__ "dirfile"; const char* format = __TEST__ "dirfile/format"; const char* format_data = "lincom LINCOM 2 in1 1 0 in2 1 0\n"; - int fd, r = 0; + int fd, error, r = 0; + DIRFILE *D; mkdir(filedir, 0777); @@ -22,8 +23,8 @@ write(fd, format_data, strlen(format_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + error = gd_error(D); gd_close(D); unlink(format); diff -Nru libgetdata-0.7.0/test/parse_lincom_ncols1.c libgetdata-0.7.1/test/parse_lincom_ncols1.c --- libgetdata-0.7.0/test/parse_lincom_ncols1.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/parse_lincom_ncols1.c 2010-11-28 04:34:48.000000000 +0000 @@ -14,7 +14,8 @@ const char* filedir = __TEST__ "dirfile"; const char* format = __TEST__ "dirfile/format"; const char* format_data = "lincom LINCOM\n"; - int fd, r = 0; + int fd, error, r = 0; + DIRFILE *D; mkdir(filedir, 0777); @@ -22,8 +23,8 @@ write(fd, format_data, strlen(format_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY); + error = gd_error(D); gd_close(D); unlink(format); diff -Nru libgetdata-0.7.0/test/parse_lincom_ncols2.c libgetdata-0.7.1/test/parse_lincom_ncols2.c --- libgetdata-0.7.0/test/parse_lincom_ncols2.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/parse_lincom_ncols2.c 2010-11-28 04:34:54.000000000 +0000 @@ -14,7 +14,8 @@ const char* filedir = __TEST__ "dirfile"; const char* format = __TEST__ "dirfile/format"; const char* format_data = "lincom LINCOM 2 in1 1 0\n"; - int fd, r = 0; + int fd, error, r = 0; + DIRFILE *D; mkdir(filedir, 0777); @@ -22,8 +23,8 @@ write(fd, format_data, strlen(format_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY); + error = gd_error(D); gd_close(D); unlink(format); diff -Nru libgetdata-0.7.0/test/parse_lincom_nfields.c libgetdata-0.7.1/test/parse_lincom_nfields.c --- libgetdata-0.7.0/test/parse_lincom_nfields.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/parse_lincom_nfields.c 2010-11-28 04:35:02.000000000 +0000 @@ -14,7 +14,8 @@ const char* filedir = __TEST__ "dirfile"; const char* format = __TEST__ "dirfile/format"; const char* format_data = "lincom LINCOM 4 in1 1 0 in2 1 0 in1 1 0 in2 1 0\n"; - int fd, r = 0; + int fd, error, r = 0; + DIRFILE *D; mkdir(filedir, 0777); @@ -22,8 +23,8 @@ write(fd, format_data, strlen(format_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY); + error = gd_error(D); gd_close(D); unlink(format); diff -Nru libgetdata-0.7.0/test/parse_lincom_nofields.c libgetdata-0.7.1/test/parse_lincom_nofields.c --- libgetdata-0.7.0/test/parse_lincom_nofields.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/parse_lincom_nofields.c 2010-11-28 04:35:08.000000000 +0000 @@ -14,7 +14,8 @@ const char* filedir = __TEST__ "dirfile"; const char* format = __TEST__ "dirfile/format"; const char* format_data = "lincom LINCOM 0\n"; - int fd, r = 0; + int fd, error, r = 0; + DIRFILE *D; mkdir(filedir, 0777); @@ -22,8 +23,8 @@ write(fd, format_data, strlen(format_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY); + error = gd_error(D); gd_close(D); unlink(format); diff -Nru libgetdata-0.7.0/test/parse_lincom_non.c libgetdata-0.7.1/test/parse_lincom_non.c --- libgetdata-0.7.0/test/parse_lincom_non.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/parse_lincom_non.c 2010-11-28 04:35:16.000000000 +0000 @@ -14,7 +14,8 @@ const char* filedir = __TEST__ "dirfile"; const char* format = __TEST__ "dirfile/format"; const char* format_data = "lincom LINCOM in1 1 0 in2 1 0\n"; - int fd, r = 0; + int fd, error, r = 0; + DIRFILE *D; mkdir(filedir, 0777); @@ -22,8 +23,8 @@ write(fd, format_data, strlen(format_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + error = gd_error(D); gd_close(D); unlink(format); diff -Nru libgetdata-0.7.0/test/parse_lincom_non_ncols.c libgetdata-0.7.1/test/parse_lincom_non_ncols.c --- libgetdata-0.7.0/test/parse_lincom_non_ncols.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/parse_lincom_non_ncols.c 2010-11-28 04:35:22.000000000 +0000 @@ -14,7 +14,8 @@ const char* filedir = __TEST__ "dirfile"; const char* format = __TEST__ "dirfile/format"; const char* format_data = "lincom LINCOM in1 1 0 in2\n"; - int fd, r = 0; + int fd, error, r = 0; + DIRFILE *D; mkdir(filedir, 0777); @@ -22,8 +23,8 @@ write(fd, format_data, strlen(format_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY); + error = gd_error(D); gd_close(D); unlink(format); diff -Nru libgetdata-0.7.0/test/parse_lincom_scalar.c libgetdata-0.7.1/test/parse_lincom_scalar.c --- libgetdata-0.7.0/test/parse_lincom_scalar.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/parse_lincom_scalar.c 2010-11-28 04:35:28.000000000 +0000 @@ -16,7 +16,8 @@ const char* format_data = "const CONST FLOAT64 3.2\n" "lincom LINCOM 1 in1 const 0\n"; - int fd, r = 0; + int fd, error, r = 0; + DIRFILE *D; mkdir(filedir, 0777); @@ -24,8 +25,8 @@ write(fd, format_data, strlen(format_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + error = gd_error(D); gd_close(D); unlink(format); diff -Nru libgetdata-0.7.0/test/parse_linterp.c libgetdata-0.7.1/test/parse_linterp.c --- libgetdata-0.7.0/test/parse_linterp.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/parse_linterp.c 2010-11-28 04:35:33.000000000 +0000 @@ -14,7 +14,8 @@ const char* filedir = __TEST__ "dirfile"; const char* format = __TEST__ "dirfile/format"; const char* format_data = "data LINTERP in1 lut\n"; - int fd, r = 0; + int fd, error, r = 0; + DIRFILE *D; mkdir(filedir, 0777); @@ -22,8 +23,8 @@ write(fd, format_data, strlen(format_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + error = gd_error(D); gd_close(D); unlink(format); diff -Nru libgetdata-0.7.0/test/parse_linterp_ncols.c libgetdata-0.7.1/test/parse_linterp_ncols.c --- libgetdata-0.7.0/test/parse_linterp_ncols.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/parse_linterp_ncols.c 2010-11-28 04:35:43.000000000 +0000 @@ -14,7 +14,8 @@ const char* filedir = __TEST__ "dirfile"; const char* format = __TEST__ "dirfile/format"; const char* format_data = "data LINTERP in1\n"; - int fd, r = 0; + int fd, error, r = 0; + DIRFILE *D; mkdir(filedir, 0777); @@ -22,8 +23,8 @@ write(fd, format_data, strlen(format_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY); + error = gd_error(D); gd_close(D); unlink(format); diff -Nru libgetdata-0.7.0/test/parse_meta.c libgetdata-0.7.1/test/parse_meta.c --- libgetdata-0.7.0/test/parse_meta.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/parse_meta.c 2010-11-28 04:35:49.000000000 +0000 @@ -16,7 +16,8 @@ const char* format_data = "parent RAW UINT8 1\n" "META parent child CONST UINT8 1\n"; - int fd, r = 0; + int fd, error, r = 0; + DIRFILE *D; mkdir(filedir, 0777); @@ -24,8 +25,8 @@ write(fd, format_data, strlen(format_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + error = gd_error(D); gd_close(D); unlink(format); diff -Nru libgetdata-0.7.0/test/parse_meta_implicit2.c libgetdata-0.7.1/test/parse_meta_implicit2.c --- libgetdata-0.7.0/test/parse_meta_implicit2.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/parse_meta_implicit2.c 2010-11-28 04:36:13.000000000 +0000 @@ -16,7 +16,8 @@ const char* format_data = "parent RAW UINT8 1\n" "parent/child/extra CONST UINT8 1\n"; - int fd, r = 0; + int fd, error, r = 0; + DIRFILE *D; mkdir(filedir, 0777); @@ -24,8 +25,8 @@ write(fd, format_data, strlen(format_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY); + error = gd_error(D); gd_close(D); unlink(format); diff -Nru libgetdata-0.7.0/test/parse_meta_implicit.c libgetdata-0.7.1/test/parse_meta_implicit.c --- libgetdata-0.7.0/test/parse_meta_implicit.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/parse_meta_implicit.c 2010-11-28 04:36:04.000000000 +0000 @@ -16,9 +16,9 @@ const char* format_data = "parent RAW UINT8 1\n" "parent/child CONST UINT8 1\n"; - int fd; signed char c; - int r = 0; + int fd, error, error2, r = 0; + DIRFILE *D; mkdir(filedir, 0777); @@ -26,12 +26,12 @@ write(fd, format_data, strlen(format_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + error = gd_error(D); CHECKI(error,0); gd_get_constant(D, "parent/child", GD_INT8, &c); - int error2 = gd_error(D); + error2 = gd_error(D); CHECKI(error2,0); CHECKI(c,1); diff -Nru libgetdata-0.7.0/test/parse_meta_index2.c libgetdata-0.7.1/test/parse_meta_index2.c --- libgetdata-0.7.0/test/parse_meta_index2.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/parse_meta_index2.c 2010-11-28 04:36:24.000000000 +0000 @@ -16,7 +16,8 @@ const char* format_data = "parent RAW UINT8 1\n" "META parent INDEX CONST UINT8 1\n"; - int fd, r = 0; + int fd, error, r = 0; + DIRFILE *D; mkdir(filedir, 0777); @@ -24,8 +25,8 @@ write(fd, format_data, strlen(format_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + error = gd_error(D); gd_close(D); unlink(format); diff -Nru libgetdata-0.7.0/test/parse_meta_index.c libgetdata-0.7.1/test/parse_meta_index.c --- libgetdata-0.7.0/test/parse_meta_index.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/parse_meta_index.c 2010-11-28 04:36:19.000000000 +0000 @@ -15,7 +15,8 @@ const char* format = __TEST__ "dirfile/format"; const char* format_data = "META INDEX child CONST UINT8 1\n"; - int fd, r = 0; + int fd, error, r = 0; + DIRFILE *D; mkdir(filedir, 0777); @@ -23,8 +24,8 @@ write(fd, format_data, strlen(format_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + error = gd_error(D); gd_close(D); unlink(format); diff -Nru libgetdata-0.7.0/test/parse_meta_parent.c libgetdata-0.7.1/test/parse_meta_parent.c --- libgetdata-0.7.0/test/parse_meta_parent.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/parse_meta_parent.c 2010-11-28 04:36:30.000000000 +0000 @@ -14,7 +14,8 @@ const char* filedir = __TEST__ "dirfile"; const char* format = __TEST__ "dirfile/format"; const char* format_data = "META parent child CONST UINT8 1\n"; - int fd, r = 0; + int fd, error, r = 0; + DIRFILE *D; mkdir(filedir, 0777); @@ -22,8 +23,8 @@ write(fd, format_data, strlen(format_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY); + error = gd_error(D); gd_close(D); unlink(format); diff -Nru libgetdata-0.7.0/test/parse_meta_raw.c libgetdata-0.7.1/test/parse_meta_raw.c --- libgetdata-0.7.0/test/parse_meta_raw.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/parse_meta_raw.c 2010-11-28 04:36:38.000000000 +0000 @@ -16,7 +16,8 @@ const char* format_data = "parent RAW UINT8 1\n" "META parent child RAW UINT8 1\n"; - int fd, r = 0; + int fd, error, r = 0; + DIRFILE *D; mkdir(filedir, 0777); @@ -24,8 +25,8 @@ write(fd, format_data, strlen(format_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY); + error = gd_error(D); gd_close(D); unlink(format); diff -Nru libgetdata-0.7.0/test/parse_multiply.c libgetdata-0.7.1/test/parse_multiply.c --- libgetdata-0.7.0/test/parse_multiply.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/parse_multiply.c 2010-11-28 04:36:44.000000000 +0000 @@ -14,7 +14,8 @@ const char* filedir = __TEST__ "dirfile"; const char* format = __TEST__ "dirfile/format"; const char* format_data = "data MULTIPLY in1 in2\n"; - int fd, r = 0; + int fd, error, r = 0; + DIRFILE *D; mkdir(filedir, 0777); @@ -22,8 +23,8 @@ write(fd, format_data, strlen(format_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + error = gd_error(D); gd_close(D); unlink(format); diff -Nru libgetdata-0.7.0/test/parse_multiply_ncols.c libgetdata-0.7.1/test/parse_multiply_ncols.c --- libgetdata-0.7.0/test/parse_multiply_ncols.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/parse_multiply_ncols.c 2010-11-28 04:36:51.000000000 +0000 @@ -14,7 +14,8 @@ const char* filedir = __TEST__ "dirfile"; const char* format = __TEST__ "dirfile/format"; const char* format_data = "data MULTIPLY in1\n"; - int fd, r = 0; + int fd, error, r = 0; + DIRFILE *D; mkdir(filedir, 0777); @@ -22,8 +23,8 @@ write(fd, format_data, strlen(format_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY); + error = gd_error(D); gd_close(D); unlink(format); diff -Nru libgetdata-0.7.0/test/parse_name.c libgetdata-0.7.1/test/parse_name.c --- libgetdata-0.7.0/test/parse_name.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/parse_name.c 2010-11-28 04:36:59.000000000 +0000 @@ -14,7 +14,8 @@ const char* filedir = __TEST__ "dirfile"; const char* format = __TEST__ "dirfile/format"; const char* format_data = "d/ta RAW UINT8 1\n"; - int fd, r = 0; + int fd, error, r = 0; + DIRFILE *D; mkdir(filedir, 0777); @@ -22,8 +23,8 @@ write(fd, format_data, strlen(format_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY); + error = gd_error(D); gd_close(D); unlink(format); diff -Nru libgetdata-0.7.0/test/parse_name_dot.c libgetdata-0.7.1/test/parse_name_dot.c --- libgetdata-0.7.0/test/parse_name_dot.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/parse_name_dot.c 2010-11-28 04:37:11.000000000 +0000 @@ -14,7 +14,8 @@ const char* filedir = __TEST__ "dirfile"; const char* format = __TEST__ "dirfile/format"; const char* format_data = "d.ta RAW UINT8 1\n"; - int fd, r = 0; + int fd, error, r = 0; + DIRFILE *D; mkdir(filedir, 0777); @@ -22,8 +23,8 @@ write(fd, format_data, strlen(format_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + error = gd_error(D); gd_close(D); unlink(format); diff -Nru libgetdata-0.7.0/test/parse_name_ext.c libgetdata-0.7.1/test/parse_name_ext.c --- libgetdata-0.7.0/test/parse_name_ext.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/parse_name_ext.c 2010-11-28 04:37:16.000000000 +0000 @@ -15,7 +15,8 @@ const char* filedir = __TEST__ "dirfile"; const char* format = __TEST__ "dirfile/format"; const char* format_data = "data.txt RAW UINT8 1\n"; - int fd, r = 0; + int fd, error, r = 0; + DIRFILE *D; mkdir(filedir, 0777); @@ -23,8 +24,8 @@ write(fd, format_data, strlen(format_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + error = gd_error(D); gd_close(D); unlink(format); diff -Nru libgetdata-0.7.0/test/parse_name_pedantic.c libgetdata-0.7.1/test/parse_name_pedantic.c --- libgetdata-0.7.0/test/parse_name_pedantic.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/parse_name_pedantic.c 2010-11-28 04:37:22.000000000 +0000 @@ -14,7 +14,8 @@ const char* filedir = __TEST__ "dirfile"; const char* format = __TEST__ "dirfile/format"; const char* format_data = "d.ta RAW UINT8 1\n"; - int fd, r = 0; + int fd, error, r = 0; + DIRFILE *D; mkdir(filedir, 0777); @@ -22,8 +23,8 @@ write(fd, format_data, strlen(format_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_PEDANTIC); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY | GD_PEDANTIC); + error = gd_error(D); gd_close(D); unlink(format); diff -Nru libgetdata-0.7.0/test/parse_ncols.c libgetdata-0.7.1/test/parse_ncols.c --- libgetdata-0.7.0/test/parse_ncols.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/parse_ncols.c 2010-11-28 04:37:30.000000000 +0000 @@ -14,7 +14,8 @@ const char* filedir = __TEST__ "dirfile"; const char* format = __TEST__ "dirfile/format"; const char* format_data = "ENDIAN\n"; - int fd, r = 0; + int fd, error, r = 0; + DIRFILE *D; mkdir(filedir, 0777); @@ -22,8 +23,8 @@ write(fd, format_data, strlen(format_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY); + error = gd_error(D); gd_close(D); unlink(format); diff -Nru libgetdata-0.7.0/test/parse_phase.c libgetdata-0.7.1/test/parse_phase.c --- libgetdata-0.7.0/test/parse_phase.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/parse_phase.c 2010-11-28 04:37:37.000000000 +0000 @@ -14,7 +14,8 @@ const char* filedir = __TEST__ "dirfile"; const char* format = __TEST__ "dirfile/format"; const char* format_data = "data PHASE in1 1\n"; - int fd, r = 0; + int fd, error, r = 0; + DIRFILE *D; mkdir(filedir, 0777); @@ -22,8 +23,8 @@ write(fd, format_data, strlen(format_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + error = gd_error(D); gd_close(D); unlink(format); diff -Nru libgetdata-0.7.0/test/parse_phase_ncols.c libgetdata-0.7.1/test/parse_phase_ncols.c --- libgetdata-0.7.0/test/parse_phase_ncols.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/parse_phase_ncols.c 2010-11-28 04:37:43.000000000 +0000 @@ -14,7 +14,8 @@ const char* filedir = __TEST__ "dirfile"; const char* format = __TEST__ "dirfile/format"; const char* format_data = "data PHASE in1\n"; - int fd, r = 0; + int fd, error, r = 0; + DIRFILE *D; mkdir(filedir, 0777); @@ -22,8 +23,8 @@ write(fd, format_data, strlen(format_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY); + error = gd_error(D); gd_close(D); unlink(format); diff -Nru libgetdata-0.7.0/test/parse_phase_scalar.c libgetdata-0.7.1/test/parse_phase_scalar.c --- libgetdata-0.7.0/test/parse_phase_scalar.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/parse_phase_scalar.c 2010-11-28 04:37:49.000000000 +0000 @@ -14,7 +14,8 @@ const char* filedir = __TEST__ "dirfile"; const char* format = __TEST__ "dirfile/format"; const char* format_data = "const CONST INT32 1\ndata PHASE in1 const\n"; - int fd, r = 0; + int fd, error, r = 0; + DIRFILE *D; mkdir(filedir, 0777); @@ -22,8 +23,8 @@ write(fd, format_data, strlen(format_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + error = gd_error(D); gd_close(D); unlink(format); diff -Nru libgetdata-0.7.0/test/parse_polynom.c libgetdata-0.7.1/test/parse_polynom.c --- libgetdata-0.7.0/test/parse_polynom.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/parse_polynom.c 2010-11-28 04:37:54.000000000 +0000 @@ -14,7 +14,8 @@ const char* filedir = __TEST__ "dirfile"; const char* format = __TEST__ "dirfile/format"; const char* format_data = "polynom POLYNOM in 1 2 3 4\n"; - int fd, r = 0; + int fd, error, r = 0; + DIRFILE *D; mkdir(filedir, 0777); @@ -22,8 +23,8 @@ write(fd, format_data, strlen(format_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + error = gd_error(D); gd_close(D); unlink(format); diff -Nru libgetdata-0.7.0/test/parse_polynom_ncols1.c libgetdata-0.7.1/test/parse_polynom_ncols1.c --- libgetdata-0.7.0/test/parse_polynom_ncols1.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/parse_polynom_ncols1.c 2010-11-28 04:38:00.000000000 +0000 @@ -14,7 +14,8 @@ const char* filedir = __TEST__ "dirfile"; const char* format = __TEST__ "dirfile/format"; const char* format_data = "polynom POLYNOM in 1\n"; - int fd, r = 0; + int fd, error, r = 0; + DIRFILE *D; mkdir(filedir, 0777); @@ -22,8 +23,8 @@ write(fd, format_data, strlen(format_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY); + error = gd_error(D); gd_close(D); unlink(format); diff -Nru libgetdata-0.7.0/test/parse_polynom_ncols2.c libgetdata-0.7.1/test/parse_polynom_ncols2.c --- libgetdata-0.7.0/test/parse_polynom_ncols2.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/parse_polynom_ncols2.c 2010-11-28 04:38:05.000000000 +0000 @@ -14,7 +14,8 @@ const char* filedir = __TEST__ "dirfile"; const char* format = __TEST__ "dirfile/format"; const char* format_data = "polynom POLYNOM in 1 2 3 4 5 6 7 8 9\n"; - int fd, r = 0; + int fd, error, r = 0; + DIRFILE *D; mkdir(filedir, 0777); @@ -22,8 +23,8 @@ write(fd, format_data, strlen(format_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + error = gd_error(D); gd_close(D); unlink(format); diff -Nru libgetdata-0.7.0/test/parse_polynom_scalar.c libgetdata-0.7.1/test/parse_polynom_scalar.c --- libgetdata-0.7.0/test/parse_polynom_scalar.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/parse_polynom_scalar.c 2010-11-28 04:38:12.000000000 +0000 @@ -16,7 +16,8 @@ const char* format_data = "const CONST FLOAT64 3.2\n" "polynom POLYNOM in const 0\n"; - int fd, r = 0; + int fd, error, r = 0; + DIRFILE *D; mkdir(filedir, 0777); @@ -24,8 +25,8 @@ write(fd, format_data, strlen(format_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + error = gd_error(D); gd_close(D); unlink(format); diff -Nru libgetdata-0.7.0/test/parse_protect_all.c libgetdata-0.7.1/test/parse_protect_all.c --- libgetdata-0.7.0/test/parse_protect_all.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/parse_protect_all.c 2010-11-28 04:38:23.000000000 +0000 @@ -14,7 +14,8 @@ const char* filedir = __TEST__ "dirfile"; const char* format = __TEST__ "dirfile/format"; const char* format_data = "PROTECT all\n"; - int fd, r = 0; + int fd, error, r = 0; + DIRFILE *D; mkdir(filedir, 0777); @@ -22,8 +23,8 @@ write(fd, format_data, strlen(format_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + error = gd_error(D); gd_close(D); unlink(format); diff -Nru libgetdata-0.7.0/test/parse_protect_bad.c libgetdata-0.7.1/test/parse_protect_bad.c --- libgetdata-0.7.0/test/parse_protect_bad.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/parse_protect_bad.c 2010-11-28 04:38:30.000000000 +0000 @@ -14,7 +14,8 @@ const char* filedir = __TEST__ "dirfile"; const char* format = __TEST__ "dirfile/format"; const char* format_data = "PROTECT badprotection\n"; - int fd, r = 0; + int fd, error, r = 0; + DIRFILE *D; mkdir(filedir, 0777); @@ -22,8 +23,8 @@ write(fd, format_data, strlen(format_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY); + error = gd_error(D); gd_close(D); unlink(format); diff -Nru libgetdata-0.7.0/test/parse_protect_data.c libgetdata-0.7.1/test/parse_protect_data.c --- libgetdata-0.7.0/test/parse_protect_data.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/parse_protect_data.c 2010-11-28 04:38:36.000000000 +0000 @@ -14,7 +14,8 @@ const char* filedir = __TEST__ "dirfile"; const char* format = __TEST__ "dirfile/format"; const char* format_data = "PROTECT data\n"; - int fd, r = 0; + int fd, error, r = 0; + DIRFILE *D; mkdir(filedir, 0777); @@ -22,8 +23,8 @@ write(fd, format_data, strlen(format_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + error = gd_error(D); gd_close(D); unlink(format); diff -Nru libgetdata-0.7.0/test/parse_protect_format.c libgetdata-0.7.1/test/parse_protect_format.c --- libgetdata-0.7.0/test/parse_protect_format.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/parse_protect_format.c 2010-11-28 04:38:44.000000000 +0000 @@ -14,7 +14,8 @@ const char* filedir = __TEST__ "dirfile"; const char* format = __TEST__ "dirfile/format"; const char* format_data = "PROTECT format\n"; - int fd, r = 0; + int fd, error, r = 0; + DIRFILE *D; mkdir(filedir, 0777); @@ -22,8 +23,8 @@ write(fd, format_data, strlen(format_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + error = gd_error(D); gd_close(D); unlink(format); diff -Nru libgetdata-0.7.0/test/parse_protect_none.c libgetdata-0.7.1/test/parse_protect_none.c --- libgetdata-0.7.0/test/parse_protect_none.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/parse_protect_none.c 2010-11-28 04:38:50.000000000 +0000 @@ -14,7 +14,8 @@ const char* filedir = __TEST__ "dirfile"; const char* format = __TEST__ "dirfile/format"; const char* format_data = "PROTECT none\n"; - int fd, r = 0; + int fd, error, r = 0; + DIRFILE *D; mkdir(filedir, 0777); @@ -22,8 +23,8 @@ write(fd, format_data, strlen(format_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + error = gd_error(D); gd_close(D); unlink(format); diff -Nru libgetdata-0.7.0/test/parse_quote.c libgetdata-0.7.1/test/parse_quote.c --- libgetdata-0.7.0/test/parse_quote.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/parse_quote.c 2010-11-28 04:38:56.000000000 +0000 @@ -14,7 +14,8 @@ const char* filedir = __TEST__ "dirfile"; const char* format = __TEST__ "dirfile/format"; const char* format_data = "\"da ta\" RAW UINT8 1\n"; - int fd, r = 0; + int fd, error, r = 0; + DIRFILE *D; mkdir(filedir, 0777); @@ -22,8 +23,8 @@ write(fd, format_data, strlen(format_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + error = gd_error(D); gd_close(D); unlink(format); diff -Nru libgetdata-0.7.0/test/parse_quote_mismatch.c libgetdata-0.7.1/test/parse_quote_mismatch.c --- libgetdata-0.7.0/test/parse_quote_mismatch.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/parse_quote_mismatch.c 2010-11-28 04:39:09.000000000 +0000 @@ -14,7 +14,8 @@ const char* filedir = __TEST__ "dirfile"; const char* format = __TEST__ "dirfile/format"; const char* format_data = "data RAW UINT8 \"1\n"; - int fd, r = 0; + int fd, error, r = 0; + DIRFILE *D; mkdir(filedir, 0777); @@ -22,8 +23,8 @@ write(fd, format_data, strlen(format_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY); + error = gd_error(D); gd_close(D); unlink(format); diff -Nru libgetdata-0.7.0/test/parse_raw.c libgetdata-0.7.1/test/parse_raw.c --- libgetdata-0.7.0/test/parse_raw.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/parse_raw.c 2010-11-28 04:39:15.000000000 +0000 @@ -14,7 +14,8 @@ const char* filedir = __TEST__ "dirfile"; const char* format = __TEST__ "dirfile/format"; const char* format_data = "data RAW UINT8 1\n"; - int fd, r = 0; + int fd, error, r = 0; + DIRFILE *D; mkdir(filedir, 0777); @@ -22,8 +23,8 @@ write(fd, format_data, strlen(format_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + error = gd_error(D); gd_close(D); unlink(format); diff -Nru libgetdata-0.7.0/test/parse_raw_char.c libgetdata-0.7.1/test/parse_raw_char.c --- libgetdata-0.7.0/test/parse_raw_char.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/parse_raw_char.c 2010-11-28 04:39:22.000000000 +0000 @@ -14,7 +14,8 @@ const char* filedir = __TEST__ "dirfile"; const char* format = __TEST__ "dirfile/format"; const char* format_data = "data RAW c 1\n"; - int fd, r = 0; + int fd, error, r = 0; + DIRFILE *D; mkdir(filedir, 0777); @@ -22,8 +23,8 @@ write(fd, format_data, strlen(format_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + error = gd_error(D); gd_close(D); unlink(format); diff -Nru libgetdata-0.7.0/test/parse_raw_ncols.c libgetdata-0.7.1/test/parse_raw_ncols.c --- libgetdata-0.7.0/test/parse_raw_ncols.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/parse_raw_ncols.c 2010-11-28 04:39:28.000000000 +0000 @@ -14,7 +14,8 @@ const char* filedir = __TEST__ "dirfile"; const char* format = __TEST__ "dirfile/format"; const char* format_data = "data RAW UINT8\n"; - int fd, r = 0; + int fd, error, r = 0; + DIRFILE *D; mkdir(filedir, 0777); @@ -22,8 +23,8 @@ write(fd, format_data, strlen(format_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY); + error = gd_error(D); gd_close(D); unlink(format); diff -Nru libgetdata-0.7.0/test/parse_raw_scalar.c libgetdata-0.7.1/test/parse_raw_scalar.c --- libgetdata-0.7.0/test/parse_raw_scalar.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/parse_raw_scalar.c 2010-11-28 04:39:56.000000000 +0000 @@ -14,7 +14,8 @@ const char* filedir = __TEST__ "dirfile"; const char* format = __TEST__ "dirfile/format"; const char* format_data = "const CONST INT8 1\ndata RAW UINT8 const\n"; - int fd, r = 0; + int fd, error, r = 0; + DIRFILE *D; mkdir(filedir, 0777); @@ -22,8 +23,8 @@ write(fd, format_data, strlen(format_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + error = gd_error(D); gd_close(D); unlink(format); diff -Nru libgetdata-0.7.0/test/parse_raw_spf.c libgetdata-0.7.1/test/parse_raw_spf.c --- libgetdata-0.7.0/test/parse_raw_spf.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/parse_raw_spf.c 2010-11-28 04:40:02.000000000 +0000 @@ -14,7 +14,8 @@ const char* filedir = __TEST__ "dirfile"; const char* format = __TEST__ "dirfile/format"; const char* format_data = "data RAW UINT8 0\n"; - int fd, r = 0; + int fd, error, r = 0; + DIRFILE *D; mkdir(filedir, 0777); @@ -22,8 +23,8 @@ write(fd, format_data, strlen(format_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY); + error = gd_error(D); gd_close(D); unlink(format); diff -Nru libgetdata-0.7.0/test/parse_raw_type.c libgetdata-0.7.1/test/parse_raw_type.c --- libgetdata-0.7.0/test/parse_raw_type.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/parse_raw_type.c 2010-11-28 04:40:08.000000000 +0000 @@ -14,7 +14,8 @@ const char* filedir = __TEST__ "dirfile"; const char* format = __TEST__ "dirfile/format"; const char* format_data = "data RAW BADTYPE 11\n"; - int fd, r = 0; + int fd, error, r = 0; + DIRFILE *D; mkdir(filedir, 0777); @@ -22,8 +23,8 @@ write(fd, format_data, strlen(format_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY); + error = gd_error(D); gd_close(D); unlink(format); diff -Nru libgetdata-0.7.0/test/parse_recip.c libgetdata-0.7.1/test/parse_recip.c --- libgetdata-0.7.0/test/parse_recip.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/parse_recip.c 2010-11-28 04:40:26.000000000 +0000 @@ -14,7 +14,8 @@ const char* filedir = __TEST__ "dirfile"; const char* format = __TEST__ "dirfile/format"; const char* format_data = "data RECIP in2 1\n"; - int fd, r = 0; + int fd, error, r = 0; + DIRFILE *D; mkdir(filedir, 0777); @@ -22,8 +23,8 @@ write(fd, format_data, strlen(format_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + error = gd_error(D); gd_close(D); unlink(format); diff -Nru libgetdata-0.7.0/test/parse_ref.c libgetdata-0.7.1/test/parse_ref.c --- libgetdata-0.7.0/test/parse_ref.c 2010-10-16 03:17:15.000000000 +0000 +++ libgetdata-0.7.1/test/parse_ref.c 2010-11-28 04:40:37.000000000 +0000 @@ -14,7 +14,8 @@ const char* filedir = __TEST__ "dirfile"; const char* format = __TEST__ "dirfile/format"; const char* format_data = "REFERENCE data\ndata RAW UINT8 1"; - int fd, r = 0; + int fd, error, r = 0; + DIRFILE *D; mkdir(filedir, 0777); @@ -22,8 +23,8 @@ write(fd, format_data, strlen(format_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + error = gd_error(D); gd_close(D); unlink(format); diff -Nru libgetdata-0.7.0/test/parse_ref_nonexistent.c libgetdata-0.7.1/test/parse_ref_nonexistent.c --- libgetdata-0.7.0/test/parse_ref_nonexistent.c 2010-10-16 03:17:16.000000000 +0000 +++ libgetdata-0.7.1/test/parse_ref_nonexistent.c 2010-11-28 04:40:43.000000000 +0000 @@ -14,7 +14,8 @@ const char* filedir = __TEST__ "dirfile"; const char* format = __TEST__ "dirfile/format"; const char* format_data = "REFERENCE data\n"; - int fd, r = 0; + int fd, error, r = 0; + DIRFILE *D; mkdir(filedir, 0777); @@ -22,8 +23,8 @@ write(fd, format_data, strlen(format_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY); + error = gd_error(D); gd_close(D); unlink(format); diff -Nru libgetdata-0.7.0/test/parse_sbit.c libgetdata-0.7.1/test/parse_sbit.c --- libgetdata-0.7.0/test/parse_sbit.c 2010-10-16 03:17:16.000000000 +0000 +++ libgetdata-0.7.1/test/parse_sbit.c 2010-11-28 04:40:59.000000000 +0000 @@ -14,7 +14,8 @@ const char* filedir = __TEST__ "dirfile"; const char* format = __TEST__ "dirfile/format"; const char* format_data = "data SBIT in1 3\n"; - int fd, r = 0; + int fd, error, r = 0; + DIRFILE *D; mkdir(filedir, 0777); @@ -22,8 +23,8 @@ write(fd, format_data, strlen(format_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + error = gd_error(D); gd_close(D); unlink(format); diff -Nru libgetdata-0.7.0/test/parse_sort.c libgetdata-0.7.1/test/parse_sort.c --- libgetdata-0.7.0/test/parse_sort.c 2010-10-16 03:17:16.000000000 +0000 +++ libgetdata-0.7.1/test/parse_sort.c 2010-11-28 05:29:14.000000000 +0000 @@ -27,6 +27,8 @@ "j RAW UINT8 1\n" "e RAW UINT8 1\n"; int fd, r = 0; + const char **field_list; + DIRFILE *D; mkdir(filedir, 0777); @@ -34,8 +36,8 @@ write(fd, format_data, strlen(format_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - const char** field_list = gd_field_list(D); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + field_list = gd_field_list(D); if (gd_error(D)) r = 1; diff -Nru libgetdata-0.7.0/test/parse_string.c libgetdata-0.7.1/test/parse_string.c --- libgetdata-0.7.0/test/parse_string.c 2010-10-16 03:17:16.000000000 +0000 +++ libgetdata-0.7.1/test/parse_string.c 2010-11-28 04:41:32.000000000 +0000 @@ -14,7 +14,8 @@ const char* filedir = __TEST__ "dirfile"; const char* format = __TEST__ "dirfile/format"; const char* format_data = "string STRING value\n"; - int fd, r = 0; + int fd, error, r = 0; + DIRFILE *D; mkdir(filedir, 0777); @@ -22,8 +23,8 @@ write(fd, format_data, strlen(format_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + error = gd_error(D); gd_close(D); unlink(format); diff -Nru libgetdata-0.7.0/test/parse_string_ncols.c libgetdata-0.7.1/test/parse_string_ncols.c --- libgetdata-0.7.0/test/parse_string_ncols.c 2010-10-16 03:17:16.000000000 +0000 +++ libgetdata-0.7.1/test/parse_string_ncols.c 2010-11-28 04:41:47.000000000 +0000 @@ -14,7 +14,8 @@ const char* filedir = __TEST__ "dirfile"; const char* format = __TEST__ "dirfile/format"; const char* format_data = "string STRING\n"; - int fd, r = 0; + int fd, error, r = 0; + DIRFILE *D; mkdir(filedir, 0777); @@ -22,8 +23,8 @@ write(fd, format_data, strlen(format_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY); + error = gd_error(D); gd_close(D); unlink(format); diff -Nru libgetdata-0.7.0/test/parse_string_null.c libgetdata-0.7.1/test/parse_string_null.c --- libgetdata-0.7.0/test/parse_string_null.c 2010-10-16 03:17:16.000000000 +0000 +++ libgetdata-0.7.1/test/parse_string_null.c 2010-11-28 04:41:52.000000000 +0000 @@ -14,7 +14,8 @@ const char* filedir = __TEST__ "dirfile"; const char* format = __TEST__ "dirfile/format"; const char* format_data = "string STRING \"\"\n"; - int fd, r = 0; + int fd, error, r = 0; + DIRFILE *D; mkdir(filedir, 0777); @@ -22,8 +23,8 @@ write(fd, format_data, strlen(format_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + error = gd_error(D); gd_close(D); unlink(format); diff -Nru libgetdata-0.7.0/test/parse_version.c libgetdata-0.7.1/test/parse_version.c --- libgetdata-0.7.0/test/parse_version.c 2010-10-16 03:17:16.000000000 +0000 +++ libgetdata-0.7.1/test/parse_version.c 2010-11-28 04:42:00.000000000 +0000 @@ -15,7 +15,8 @@ const char* filedir = __TEST__ "dirfile"; const char* format = __TEST__ "dirfile/format"; const char* format_data = "VERSION 999999\nBADDIRECTIVE BADTYPE\n"; - int fd, r = 0; + int fd, error, r = 0; + DIRFILE *D; mkdir(filedir, 0777); @@ -23,8 +24,8 @@ write(fd, format_data, strlen(format_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY); + error = gd_error(D); gd_close(D); unlink(format); diff -Nru libgetdata-0.7.0/test/parse_version_include.c libgetdata-0.7.1/test/parse_version_include.c --- libgetdata-0.7.0/test/parse_version_include.c 2010-10-16 03:17:16.000000000 +0000 +++ libgetdata-0.7.1/test/parse_version_include.c 2010-11-28 04:42:07.000000000 +0000 @@ -16,7 +16,8 @@ const char* format1 = __TEST__ "dirfile/format1"; const char* format_data = "VERSION 999999\nINCLUDE format1\n"; const char* format1_data = "BADDIRECTIVE BADTYPE\n"; - int fd, r = 0; + int fd, error, r = 0; + DIRFILE *D; mkdir(filedir, 0777); @@ -28,8 +29,8 @@ write(fd, format1_data, strlen(format1_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE | GD_PERMISSIVE); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE | GD_PERMISSIVE); + error = gd_error(D); gd_close(D); unlink(format1); diff -Nru libgetdata-0.7.0/test/parse_version_permissive.c libgetdata-0.7.1/test/parse_version_permissive.c --- libgetdata-0.7.0/test/parse_version_permissive.c 2010-10-16 03:17:16.000000000 +0000 +++ libgetdata-0.7.1/test/parse_version_permissive.c 2010-11-28 04:42:13.000000000 +0000 @@ -15,7 +15,8 @@ const char* filedir = __TEST__ "dirfile"; const char* format = __TEST__ "dirfile/format"; const char* format_data = "VERSION 999999\nBADDIRECTIVE BADTYPE\n"; - int fd, r = 0; + int fd, error, r = 0; + DIRFILE *D; mkdir(filedir, 0777); @@ -23,8 +24,8 @@ write(fd, format_data, strlen(format_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_PERMISSIVE | GD_VERBOSE); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY | GD_PERMISSIVE | GD_VERBOSE); + error = gd_error(D); gd_close(D); unlink(format); diff -Nru libgetdata-0.7.0/test/parse_version_slash.c libgetdata-0.7.1/test/parse_version_slash.c --- libgetdata-0.7.0/test/parse_version_slash.c 2010-10-16 03:17:16.000000000 +0000 +++ libgetdata-0.7.1/test/parse_version_slash.c 2010-11-28 04:42:21.000000000 +0000 @@ -15,7 +15,8 @@ const char* filedir = __TEST__ "dirfile"; const char* format = __TEST__ "dirfile/format"; const char* format_data = "/VERSION 999999\nBADDIRECTIVE BADTYPE\n"; - int fd, r = 0; + int fd, error, r = 0; + DIRFILE *D; mkdir(filedir, 0777); @@ -23,8 +24,8 @@ write(fd, format_data, strlen(format_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY); + error = gd_error(D); gd_close(D); unlink(format); diff -Nru libgetdata-0.7.0/test/parse_whitespace.c libgetdata-0.7.1/test/parse_whitespace.c --- libgetdata-0.7.0/test/parse_whitespace.c 2010-10-16 03:17:16.000000000 +0000 +++ libgetdata-0.7.1/test/parse_whitespace.c 2010-11-28 04:42:27.000000000 +0000 @@ -14,7 +14,8 @@ const char* filedir = __TEST__ "dirfile"; const char* format = __TEST__ "dirfile/format"; const char* format_data = "da\\ ta RAW UINT8 1\n"; - int fd, r = 0; + int fd, error, r = 0; + DIRFILE *D; mkdir(filedir, 0777); @@ -22,8 +23,8 @@ write(fd, format_data, strlen(format_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + error = gd_error(D); gd_close(D); unlink(format); diff -Nru libgetdata-0.7.0/test/protect_alter.c libgetdata-0.7.1/test/protect_alter.c --- libgetdata-0.7.0/test/protect_alter.c 2010-10-16 03:17:16.000000000 +0000 +++ libgetdata-0.7.1/test/protect_alter.c 2010-11-28 04:42:53.000000000 +0000 @@ -17,7 +17,8 @@ const char* data = __TEST__ "dirfile/data"; const char* format_data = "data RAW UINT8 8\nPROTECT format\n"; unsigned char data_data[256]; - int fd, r = 0; + int fd, ret, p, error, r = 0; + DIRFILE *D; mkdir(filedir, 0777); @@ -32,10 +33,10 @@ write(fd, data_data, 256); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDWR | GD_VERBOSE); - int ret = gd_alter_protection(D, GD_PROTECT_DATA, 0); - int error = gd_error(D); - int p = gd_protection(D, 0); + D = gd_open(filedir, GD_RDWR | GD_VERBOSE); + ret = gd_alter_protection(D, GD_PROTECT_DATA, 0); + error = gd_error(D); + p = gd_protection(D, 0); gd_close(D); diff -Nru libgetdata-0.7.0/test/protect_get.c libgetdata-0.7.1/test/protect_get.c --- libgetdata-0.7.0/test/protect_get.c 2010-10-16 03:17:16.000000000 +0000 +++ libgetdata-0.7.1/test/protect_get.c 2010-11-28 04:43:07.000000000 +0000 @@ -16,7 +16,8 @@ const char* data = __TEST__ "dirfile/data"; const char* format_data = "data RAW UINT8 8\nPROTECT format\n"; unsigned char data_data[256]; - int fd, r = 0; + int fd, p, error, r = 0; + DIRFILE *D; mkdir(filedir, 0777); @@ -31,9 +32,9 @@ write(fd, data_data, 256); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int p = gd_protection(D, 0); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + p = gd_protection(D, 0); + error = gd_error(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/put64.c libgetdata-0.7.1/test/put64.c --- libgetdata-0.7.0/test/put64.c 2010-10-16 03:17:16.000000000 +0000 +++ libgetdata-0.7.1/test/put64.c 2010-11-28 04:43:22.000000000 +0000 @@ -19,8 +19,9 @@ const char* data = __TEST__ "dirfile/data"; const char* format_data = "data RAW UINT8 8\n"; uint8_t c[8], d; - int fd, i; + int fd, n, error, i; struct stat buf; + DIRFILE *D; memset(c, 0, 8); mkdir(filedir, 0777); @@ -32,9 +33,9 @@ write(fd, format_data, strlen(format_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDWR | GD_UNENCODED | GD_VERBOSE); - int n = gd_putdata64(D, "data", 5, 0, 1, 0, GD_UINT8, c); - int error = gd_error(D); + D = gd_open(filedir, GD_RDWR | GD_UNENCODED | GD_VERBOSE); + n = gd_putdata64(D, "data", 5, 0, 1, 0, GD_UINT8, c); + error = gd_error(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/put_bad_code.c libgetdata-0.7.1/test/put_bad_code.c --- libgetdata-0.7.0/test/put_bad_code.c 2010-10-16 03:17:16.000000000 +0000 +++ libgetdata-0.7.1/test/put_bad_code.c 2010-11-28 04:43:31.000000000 +0000 @@ -15,7 +15,8 @@ const char* format = __TEST__ "dirfile/format"; const char* format_data = "#\n"; unsigned char c = 0; - int fd, r = 0; + int fd, n, error, r = 0; + DIRFILE *D; mkdir(filedir, 0777); @@ -23,10 +24,10 @@ write(fd, format_data, strlen(format_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDWR | GD_UNENCODED); - int n = gd_putdata(D, "no-such-field", 5, 0, 1, 0, GD_UINT8, &c); + D = gd_open(filedir, GD_RDWR | GD_UNENCODED); + n = gd_putdata(D, "no-such-field", 5, 0, 1, 0, GD_UINT8, &c); - int error = gd_error(D); + error = gd_error(D); gd_close(D); unlink(format); diff -Nru libgetdata-0.7.0/test/put_bit.c libgetdata-0.7.1/test/put_bit.c --- libgetdata-0.7.0/test/put_bit.c 2010-10-16 03:17:16.000000000 +0000 +++ libgetdata-0.7.1/test/put_bit.c 2010-11-28 04:43:53.000000000 +0000 @@ -19,7 +19,8 @@ const char* format_data = "bit BIT data 2 3\ndata RAW UINT8 8\n"; uint8_t c[8]; uint8_t d = 0xA5; - int fd, i, r = 0; + int fd, i, n, error, r = 0; + DIRFILE *D; mkdir(filedir, 0777); @@ -35,9 +36,9 @@ write(fd, &d, sizeof(uint8_t)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDWR | GD_UNENCODED | GD_VERBOSE); - int n = gd_putdata(D, "bit", 5, 0, 1, 0, GD_INT8, c); - int error = gd_error(D); + D = gd_open(filedir, GD_RDWR | GD_UNENCODED | GD_VERBOSE); + n = gd_putdata(D, "bit", 5, 0, 1, 0, GD_INT8, c); + error = gd_error(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/put_bof.c libgetdata-0.7.1/test/put_bof.c --- libgetdata-0.7.0/test/put_bof.c 2010-10-16 03:17:16.000000000 +0000 +++ libgetdata-0.7.1/test/put_bof.c 2010-11-28 04:44:21.000000000 +0000 @@ -16,7 +16,8 @@ const char* format = __TEST__ "dirfile/format"; const char* format_data = "data RAW UINT8 8\nFRAMEOFFSET 10000"; uint8_t c[8]; - int fd, r = 0; + int fd, n, error, r = 0; + DIRFILE *D; mkdir(filedir, 0777); @@ -24,9 +25,9 @@ write(fd, format_data, strlen(format_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDWR | GD_UNENCODED); - int n = gd_putdata(D, "data", 5, 0, 1, 0, GD_UINT8, c); - int error = gd_error(D); + D = gd_open(filedir, GD_RDWR | GD_UNENCODED); + n = gd_putdata(D, "data", 5, 0, 1, 0, GD_UINT8, c); + error = gd_error(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/put_carray.c libgetdata-0.7.1/test/put_carray.c --- libgetdata-0.7.0/test/put_carray.c 2010-10-31 23:35:45.000000000 +0000 +++ libgetdata-0.7.1/test/put_carray.c 2010-11-28 05:02:09.000000000 +0000 @@ -16,14 +16,15 @@ const char* filedir = __TEST__ "dirfile"; const char* format = __TEST__ "dirfile/format"; uint8_t val[] = {0, 0, 0, 0, 0, 0, 0, 0}; - int r = 0, i; + int error, r = 0, i; + DIRFILE *D; - DIRFILE* D = gd_open(filedir, GD_RDWR | GD_CREAT | GD_VERBOSE); + D = gd_open(filedir, GD_RDWR | GD_CREAT | GD_VERBOSE); gd_add_carray(D, "data", GD_UINT8, 8, GD_UINT8, &val, 0); for (i = 0; i < 8; ++i) val[i] = i * (i + 1); gd_put_carray(D, "data", GD_UINT8, &val); - int error = gd_error(D); + error = gd_error(D); gd_close(D); /* check */ diff -Nru libgetdata-0.7.0/test/put_carray_slice.c libgetdata-0.7.1/test/put_carray_slice.c --- libgetdata-0.7.0/test/put_carray_slice.c 2010-10-31 23:41:40.000000000 +0000 +++ libgetdata-0.7.1/test/put_carray_slice.c 2010-11-28 05:03:28.000000000 +0000 @@ -16,14 +16,14 @@ const char* filedir = __TEST__ "dirfile"; const char* format = __TEST__ "dirfile/format"; uint8_t val[] = {0, 0, 0, 0, 0, 0, 0, 0}; - int r = 0, i; + int r = 0, error, i; DIRFILE* D = gd_open(filedir, GD_RDWR | GD_CREAT | GD_VERBOSE); gd_add_carray(D, "data", GD_UINT8, 8, GD_UINT8, &val, 0); for (i = 0; i < 8; ++i) val[i] = i * (i + 1); gd_put_carray_slice(D, "data", 2, 3, GD_UINT8, &val); - int error = gd_error(D); + error = gd_error(D); gd_close(D); /* check */ diff -Nru libgetdata-0.7.0/test/put_char.c libgetdata-0.7.1/test/put_char.c --- libgetdata-0.7.0/test/put_char.c 2010-11-03 08:48:50.000000000 +0000 +++ libgetdata-0.7.1/test/put_char.c 2010-11-28 05:03:38.000000000 +0000 @@ -16,7 +16,8 @@ const char* format = __TEST__ "dirfile/format"; const char* format_data = "data RAW UINT8 8\n"; uint8_t c[8]; - int fd, i, r = 0; + int fd, i, n, error, r = 0; + DIRFILE *D; memset(c, 0, 8); mkdir(filedir, 0777); @@ -28,9 +29,9 @@ write(fd, format_data, strlen(format_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDWR | GD_UNENCODED); - int n = gd_putdata(D, "data", 5, 0, 1, 0, (gd_type_t)'c', c); - int error = gd_error(D); + D = gd_open(filedir, GD_RDWR | GD_UNENCODED); + n = gd_putdata(D, "data", 5, 0, 1, 0, (gd_type_t)'c', c); + error = gd_error(D); gd_close(D); unlink(format); diff -Nru libgetdata-0.7.0/test/put_complex128.c libgetdata-0.7.1/test/put_complex128.c --- libgetdata-0.7.0/test/put_complex128.c 2010-10-16 03:17:16.000000000 +0000 +++ libgetdata-0.7.1/test/put_complex128.c 2010-11-28 05:03:56.000000000 +0000 @@ -25,8 +25,9 @@ double complex c[8], d; const double complex zero = 0; #endif - int fd, i, r = 0; + int fd, i, n, error, r = 0; struct stat buf; + DIRFILE *D; memset(c, 0, 8); mkdir(filedir, 0777); @@ -44,9 +45,9 @@ write(fd, format_data, strlen(format_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDWR | GD_UNENCODED | GD_VERBOSE); - int n = gd_putdata(D, "data", 5, 0, 1, 0, GD_COMPLEX128, c); - int error = gd_error(D); + D = gd_open(filedir, GD_RDWR | GD_UNENCODED | GD_VERBOSE); + n = gd_putdata(D, "data", 5, 0, 1, 0, GD_COMPLEX128, c); + error = gd_error(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/put_complex64.c libgetdata-0.7.1/test/put_complex64.c --- libgetdata-0.7.0/test/put_complex64.c 2010-10-16 03:17:16.000000000 +0000 +++ libgetdata-0.7.1/test/put_complex64.c 2010-11-28 05:04:09.000000000 +0000 @@ -25,8 +25,9 @@ float complex c[8], d; const float complex zero = 0; #endif - int fd, i, r = 0; struct stat buf; + int fd, i, n, error, r = 0; + DIRFILE *D; memset(c, 0, 8); mkdir(filedir, 0777); @@ -44,9 +45,9 @@ write(fd, format_data, strlen(format_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDWR | GD_UNENCODED | GD_VERBOSE); - int n = gd_putdata(D, "data", 5, 0, 1, 0, GD_COMPLEX64, c); - int error = gd_error(D); + D = gd_open(filedir, GD_RDWR | GD_UNENCODED | GD_VERBOSE); + n = gd_putdata(D, "data", 5, 0, 1, 0, GD_COMPLEX64, c); + error = gd_error(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/put_const.c libgetdata-0.7.1/test/put_const.c --- libgetdata-0.7.0/test/put_const.c 2010-10-16 03:17:16.000000000 +0000 +++ libgetdata-0.7.1/test/put_const.c 2010-11-28 05:04:16.000000000 +0000 @@ -16,13 +16,13 @@ const char* filedir = __TEST__ "dirfile"; const char* format = __TEST__ "dirfile/format"; uint8_t val = 0; - int r = 0; + int error, r = 0; DIRFILE* D = gd_open(filedir, GD_RDWR | GD_CREAT | GD_VERBOSE); gd_add_const(D, "data", GD_UINT8, GD_UINT8, &val, 0); val = 23; gd_put_constant(D, "data", GD_UINT8, &val); - int error = gd_error(D); + error = gd_error(D); gd_close(D); /* check */ diff -Nru libgetdata-0.7.0/test/put_const_protect.c libgetdata-0.7.1/test/put_const_protect.c --- libgetdata-0.7.0/test/put_const_protect.c 2010-10-16 03:17:16.000000000 +0000 +++ libgetdata-0.7.1/test/put_const_protect.c 2010-11-28 05:04:24.000000000 +0000 @@ -17,7 +17,8 @@ const char* format = __TEST__ "dirfile/format"; const char* format_data = "data CONST UINT8 8\nPROTECT all\n"; uint8_t d = 3; - int fd, r = 0; + int fd, n, error, r = 0; + DIRFILE *D; mkdir(filedir, 0777); @@ -25,9 +26,9 @@ write(fd, format_data, strlen(format_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDWR | GD_UNENCODED); - int n = gd_put_constant(D, "data", GD_UINT8, &d); - int error = gd_error(D); + D = gd_open(filedir, GD_RDWR | GD_UNENCODED); + n = gd_put_constant(D, "data", GD_UINT8, &d); + error = gd_error(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/put_divide.c libgetdata-0.7.1/test/put_divide.c --- libgetdata-0.7.0/test/put_divide.c 2010-10-16 03:17:16.000000000 +0000 +++ libgetdata-0.7.1/test/put_divide.c 2010-11-28 05:04:31.000000000 +0000 @@ -17,8 +17,9 @@ const char* data = __TEST__ "dirfile/data"; const char* format_data = "div DIVIDE data data\ndata RAW INT8 8\n"; int8_t c[8]; - int fd, i, r = 0; struct stat buf; + int fd, i, n, error, r = 0; + DIRFILE *D; memset(c, 0, 8); mkdir(filedir, 0777); @@ -30,9 +31,9 @@ write(fd, format_data, strlen(format_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDWR | GD_UNENCODED); - int n = gd_putdata(D, "div", 5, 0, 1, 0, GD_INT8, c); - int error = gd_error(D); + D = gd_open(filedir, GD_RDWR | GD_UNENCODED); + n = gd_putdata(D, "div", 5, 0, 1, 0, GD_INT8, c); + error = gd_error(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/put_endian16.c libgetdata-0.7.1/test/put_endian16.c --- libgetdata-0.7.0/test/put_endian16.c 2010-10-16 03:17:16.000000000 +0000 +++ libgetdata-0.7.1/test/put_endian16.c 2010-11-28 05:04:43.000000000 +0000 @@ -28,8 +28,9 @@ const char* data = __TEST__ "dirfile/data"; char format_data[1000]; uint16_t c = 0x201, d = 0; - int fd, r = 0; const int big_endian = BigEndian(); + int fd, n, error, r = 0; + DIRFILE *D; mkdir(filedir, 0777); @@ -40,9 +41,9 @@ write(fd, format_data, strlen(format_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDWR | GD_UNENCODED | GD_VERBOSE); - int n = gd_putdata(D, "data", 5, 0, 1, 0, GD_UINT16, &c); - int error = gd_error(D); + D = gd_open(filedir, GD_RDWR | GD_UNENCODED | GD_VERBOSE); + n = gd_putdata(D, "data", 5, 0, 1, 0, GD_UINT16, &c); + error = gd_error(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/put_endian32.c libgetdata-0.7.1/test/put_endian32.c --- libgetdata-0.7.0/test/put_endian32.c 2010-10-16 03:17:16.000000000 +0000 +++ libgetdata-0.7.1/test/put_endian32.c 2010-11-28 05:04:50.000000000 +0000 @@ -28,8 +28,9 @@ const char* data = __TEST__ "dirfile/data"; char format_data[1000]; uint32_t c = 0x2000001, d = 0; - int fd, r = 0; const int big_endian = BigEndian(); + int fd, n, error, r = 0; + DIRFILE *D; mkdir(filedir, 0777); @@ -40,9 +41,9 @@ write(fd, format_data, strlen(format_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDWR | GD_UNENCODED | GD_VERBOSE); - int n = gd_putdata(D, "data", 5, 0, 1, 0, GD_UINT32, &c); - int error = gd_error(D); + D = gd_open(filedir, GD_RDWR | GD_UNENCODED | GD_VERBOSE); + n = gd_putdata(D, "data", 5, 0, 1, 0, GD_UINT32, &c); + error = gd_error(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/put_endian64.c libgetdata-0.7.1/test/put_endian64.c --- libgetdata-0.7.0/test/put_endian64.c 2010-10-16 03:17:16.000000000 +0000 +++ libgetdata-0.7.1/test/put_endian64.c 2010-11-28 05:04:56.000000000 +0000 @@ -28,8 +28,9 @@ const char* data = __TEST__ "dirfile/data"; char format_data[1000]; uint64_t c = 0x0203000000040001LLU, d = 0; - int fd, r = 0; const int big_endian = BigEndian(); + int fd, n, error, r = 0; + DIRFILE *D; mkdir(filedir, 0777); @@ -40,9 +41,9 @@ write(fd, format_data, strlen(format_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDWR | GD_UNENCODED | GD_VERBOSE); - int n = gd_putdata(D, "data", 5, 0, 1, 0, GD_UINT64, &c); - int error = gd_error(D); + D = gd_open(filedir, GD_RDWR | GD_UNENCODED | GD_VERBOSE); + n = gd_putdata(D, "data", 5, 0, 1, 0, GD_UINT64, &c); + error = gd_error(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/put_endian8.c libgetdata-0.7.1/test/put_endian8.c --- libgetdata-0.7.0/test/put_endian8.c 2010-10-16 03:17:16.000000000 +0000 +++ libgetdata-0.7.1/test/put_endian8.c 2010-11-28 05:05:02.000000000 +0000 @@ -28,8 +28,9 @@ const char* data = __TEST__ "dirfile/data"; char format_data[1000]; uint8_t c = 0x21, d = 0; - int fd, r = 0; const int big_endian = BigEndian(); + int fd, n, error, r = 0; + DIRFILE *D; mkdir(filedir, 0777); @@ -40,9 +41,9 @@ write(fd, format_data, strlen(format_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDWR | GD_UNENCODED | GD_VERBOSE); - int n = gd_putdata(D, "data", 5, 0, 1, 0, GD_UINT8, &c); - int error = gd_error(D); + D = gd_open(filedir, GD_RDWR | GD_UNENCODED | GD_VERBOSE); + n = gd_putdata(D, "data", 5, 0, 1, 0, GD_UINT8, &c); + error = gd_error(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/put_endian_complex128_arm.c libgetdata-0.7.1/test/put_endian_complex128_arm.c --- libgetdata-0.7.0/test/put_endian_complex128_arm.c 2010-10-16 03:17:16.000000000 +0000 +++ libgetdata-0.7.1/test/put_endian_complex128_arm.c 2010-11-28 05:05:14.000000000 +0000 @@ -17,7 +17,6 @@ const char* format = __TEST__ "dirfile/format"; const char* data = __TEST__ "dirfile/data"; const char* format_data = "data RAW COMPLEX128 1\nENDIAN little arm\n"; - int fd, r = 0; unsigned int i; #ifdef GD_NO_C99_API const double c[] = {1.5, 2.25}; @@ -29,6 +28,8 @@ 0x00, 0x00, 0x02, 0x40, 0x00, 0x00, 0x00, 0x00 }; unsigned char u[2 * sizeof(double)]; + int fd, n, error, r = 0; + DIRFILE *D; mkdir(filedir, 0777); @@ -36,13 +37,13 @@ write(fd, format_data, strlen(format_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDWR | GD_UNENCODED | GD_VERBOSE); + D = gd_open(filedir, GD_RDWR | GD_UNENCODED | GD_VERBOSE); #ifdef GD_NO_C99_API - int n = gd_putdata(D, "data", 5, 0, 1, 0, GD_COMPLEX128, c); + n = gd_putdata(D, "data", 5, 0, 1, 0, GD_COMPLEX128, c); #else - int n = gd_putdata(D, "data", 5, 0, 1, 0, GD_COMPLEX128, &c); + n = gd_putdata(D, "data", 5, 0, 1, 0, GD_COMPLEX128, &c); #endif - int error = gd_error(D); + error = gd_error(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/put_endian_complex128_big.c libgetdata-0.7.1/test/put_endian_complex128_big.c --- libgetdata-0.7.0/test/put_endian_complex128_big.c 2010-10-16 03:17:16.000000000 +0000 +++ libgetdata-0.7.1/test/put_endian_complex128_big.c 2010-11-28 05:05:24.000000000 +0000 @@ -17,7 +17,6 @@ const char* format = __TEST__ "dirfile/format"; const char* data = __TEST__ "dirfile/data"; const char* format_data = "data RAW COMPLEX128 1\nENDIAN big\n"; - int fd, r = 0; unsigned int i; #ifdef GD_NO_C99_API const double c[] = {1.5, 2.25}; @@ -29,6 +28,8 @@ 0x40, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; unsigned char u[2 * sizeof(double)]; + int fd, n, error, r = 0; + DIRFILE *D; mkdir(filedir, 0777); @@ -36,13 +37,13 @@ write(fd, format_data, strlen(format_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDWR | GD_UNENCODED | GD_VERBOSE); + D = gd_open(filedir, GD_RDWR | GD_UNENCODED | GD_VERBOSE); #ifdef GD_NO_C99_API - int n = gd_putdata(D, "data", 5, 0, 1, 0, GD_COMPLEX128, c); + n = gd_putdata(D, "data", 5, 0, 1, 0, GD_COMPLEX128, c); #else - int n = gd_putdata(D, "data", 5, 0, 1, 0, GD_COMPLEX128, &c); + n = gd_putdata(D, "data", 5, 0, 1, 0, GD_COMPLEX128, &c); #endif - int error = gd_error(D); + error = gd_error(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/put_endian_complex128_little.c libgetdata-0.7.1/test/put_endian_complex128_little.c --- libgetdata-0.7.0/test/put_endian_complex128_little.c 2010-10-16 03:17:16.000000000 +0000 +++ libgetdata-0.7.1/test/put_endian_complex128_little.c 2010-11-28 05:05:36.000000000 +0000 @@ -17,7 +17,6 @@ const char* format = __TEST__ "dirfile/format"; const char* data = __TEST__ "dirfile/data"; const char* format_data = "data RAW COMPLEX128 1\nENDIAN little\n"; - int fd, r = 0; unsigned int i; #ifdef GD_NO_C99_API const double c[] = {1.5, 2.25}; @@ -29,6 +28,8 @@ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x40 }; unsigned char u[2 * sizeof(double)]; + int fd, n, error, r = 0; + DIRFILE *D; mkdir(filedir, 0777); @@ -36,13 +37,13 @@ write(fd, format_data, strlen(format_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDWR | GD_UNENCODED | GD_VERBOSE); + D = gd_open(filedir, GD_RDWR | GD_UNENCODED | GD_VERBOSE); #ifdef GD_NO_C99_API - int n = gd_putdata(D, "data", 5, 0, 1, 0, GD_COMPLEX128, c); + n = gd_putdata(D, "data", 5, 0, 1, 0, GD_COMPLEX128, c); #else - int n = gd_putdata(D, "data", 5, 0, 1, 0, GD_COMPLEX128, &c); + n = gd_putdata(D, "data", 5, 0, 1, 0, GD_COMPLEX128, &c); #endif - int error = gd_error(D); + error = gd_error(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/put_endian_complex64_arm.c libgetdata-0.7.1/test/put_endian_complex64_arm.c --- libgetdata-0.7.0/test/put_endian_complex64_arm.c 2010-10-16 03:17:16.000000000 +0000 +++ libgetdata-0.7.1/test/put_endian_complex64_arm.c 2010-11-28 05:05:49.000000000 +0000 @@ -17,7 +17,6 @@ const char* format = __TEST__ "dirfile/format"; const char* data = __TEST__ "dirfile/data"; const char* format_data = "data RAW COMPLEX64 1\nENDIAN little arm\n"; - int fd, r = 0; unsigned int i; #ifdef GD_NO_C99_API const float c[] = {1.5, 2.25}; @@ -28,6 +27,8 @@ 0x00, 0x00, 0xC0, 0x3F, 0x00, 0x00, 0x10, 0x40 }; unsigned char u[2 * sizeof(float)]; + int fd, n, error, r = 0; + DIRFILE *D; mkdir(filedir, 0777); @@ -35,13 +36,13 @@ write(fd, format_data, strlen(format_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDWR | GD_UNENCODED | GD_VERBOSE); + D = gd_open(filedir, GD_RDWR | GD_UNENCODED | GD_VERBOSE); #ifdef GD_NO_C99_API - int n = gd_putdata(D, "data", 5, 0, 1, 0, GD_COMPLEX64, c); + n = gd_putdata(D, "data", 5, 0, 1, 0, GD_COMPLEX64, c); #else - int n = gd_putdata(D, "data", 5, 0, 1, 0, GD_COMPLEX64, &c); + n = gd_putdata(D, "data", 5, 0, 1, 0, GD_COMPLEX64, &c); #endif - int error = gd_error(D); + error = gd_error(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/put_endian_complex64_big.c libgetdata-0.7.1/test/put_endian_complex64_big.c --- libgetdata-0.7.0/test/put_endian_complex64_big.c 2010-10-16 03:17:16.000000000 +0000 +++ libgetdata-0.7.1/test/put_endian_complex64_big.c 2010-11-28 05:06:51.000000000 +0000 @@ -17,7 +17,6 @@ const char* format = __TEST__ "dirfile/format"; const char* data = __TEST__ "dirfile/data"; const char* format_data = "data RAW COMPLEX64 1\nENDIAN big\n"; - int fd, r = 0; unsigned int i; #ifdef GD_NO_C99_API const float c[] = {1.5, 2.25}; @@ -28,6 +27,8 @@ 0x3F, 0xC0, 0x00, 0x00, 0x40, 0x10, 0x00, 0x00 }; unsigned char u[2 * sizeof(float)]; + int fd, n, error, r = 0; + DIRFILE *D; mkdir(filedir, 0777); @@ -35,13 +36,13 @@ write(fd, format_data, strlen(format_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDWR | GD_UNENCODED | GD_VERBOSE); + D = gd_open(filedir, GD_RDWR | GD_UNENCODED | GD_VERBOSE); #ifdef GD_NO_C99_API - int n = gd_putdata(D, "data", 5, 0, 1, 0, GD_COMPLEX64, c); + n = gd_putdata(D, "data", 5, 0, 1, 0, GD_COMPLEX64, c); #else - int n = gd_putdata(D, "data", 5, 0, 1, 0, GD_COMPLEX64, &c); + n = gd_putdata(D, "data", 5, 0, 1, 0, GD_COMPLEX64, &c); #endif - int error = gd_error(D); + error = gd_error(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/put_endian_complex64_little.c libgetdata-0.7.1/test/put_endian_complex64_little.c --- libgetdata-0.7.0/test/put_endian_complex64_little.c 2010-10-16 03:17:16.000000000 +0000 +++ libgetdata-0.7.1/test/put_endian_complex64_little.c 2010-11-28 05:07:02.000000000 +0000 @@ -17,7 +17,6 @@ const char* format = __TEST__ "dirfile/format"; const char* data = __TEST__ "dirfile/data"; const char* format_data = "data RAW COMPLEX64 1\nENDIAN little\n"; - int fd, r = 0; unsigned int i; #ifdef GD_NO_C99_API const float c[] = {1.5, 2.25}; @@ -28,6 +27,8 @@ 0x00, 0x00, 0xC0, 0x3F, 0x00, 0x00, 0x10, 0x40 }; unsigned char u[2 * sizeof(float)]; + int fd, n, error, r = 0; + DIRFILE *D; mkdir(filedir, 0777); @@ -35,13 +36,13 @@ write(fd, format_data, strlen(format_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDWR | GD_UNENCODED | GD_VERBOSE); + D = gd_open(filedir, GD_RDWR | GD_UNENCODED | GD_VERBOSE); #ifdef GD_NO_C99_API - int n = gd_putdata(D, "data", 5, 0, 1, 0, GD_COMPLEX64, c); + n = gd_putdata(D, "data", 5, 0, 1, 0, GD_COMPLEX64, c); #else - int n = gd_putdata(D, "data", 5, 0, 1, 0, GD_COMPLEX64, &c); + n = gd_putdata(D, "data", 5, 0, 1, 0, GD_COMPLEX64, &c); #endif - int error = gd_error(D); + error = gd_error(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/put_endian_float32_arm.c libgetdata-0.7.1/test/put_endian_float32_arm.c --- libgetdata-0.7.0/test/put_endian_float32_arm.c 2010-10-16 03:17:16.000000000 +0000 +++ libgetdata-0.7.1/test/put_endian_float32_arm.c 2010-11-28 05:07:11.000000000 +0000 @@ -17,11 +17,12 @@ const char* format = __TEST__ "dirfile/format"; const char* data = __TEST__ "dirfile/data"; const char* format_data = "data RAW FLOAT32 1\nENDIAN little arm\n"; - int fd, r = 0; unsigned int i; const float c = 1.5; unsigned char x[sizeof(float)] = { 0x00, 0x00, 0xC0, 0x3F }; unsigned char u[sizeof(float)]; + int fd, n, error, r = 0; + DIRFILE *D; mkdir(filedir, 0777); @@ -29,9 +30,9 @@ write(fd, format_data, strlen(format_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDWR | GD_UNENCODED | GD_VERBOSE); - int n = gd_putdata(D, "data", 5, 0, 1, 0, GD_FLOAT32, &c); - int error = gd_error(D); + D = gd_open(filedir, GD_RDWR | GD_UNENCODED | GD_VERBOSE); + n = gd_putdata(D, "data", 5, 0, 1, 0, GD_FLOAT32, &c); + error = gd_error(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/put_endian_float32_big.c libgetdata-0.7.1/test/put_endian_float32_big.c --- libgetdata-0.7.0/test/put_endian_float32_big.c 2010-10-16 03:17:16.000000000 +0000 +++ libgetdata-0.7.1/test/put_endian_float32_big.c 2010-11-28 05:07:18.000000000 +0000 @@ -17,11 +17,12 @@ const char* format = __TEST__ "dirfile/format"; const char* data = __TEST__ "dirfile/data"; const char* format_data = "data RAW FLOAT32 1\nENDIAN big\n"; - int fd, r = 0; unsigned int i; const float c = 1.5; unsigned char x[sizeof(float)] = { 0x3F, 0xC0, 0x00, 0x00 }; unsigned char u[sizeof(float)]; + int fd, n, error, r = 0; + DIRFILE *D; mkdir(filedir, 0777); @@ -29,9 +30,9 @@ write(fd, format_data, strlen(format_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDWR | GD_UNENCODED | GD_VERBOSE); - int n = gd_putdata(D, "data", 5, 0, 1, 0, GD_FLOAT32, &c); - int error = gd_error(D); + D = gd_open(filedir, GD_RDWR | GD_UNENCODED | GD_VERBOSE); + n = gd_putdata(D, "data", 5, 0, 1, 0, GD_FLOAT32, &c); + error = gd_error(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/put_endian_float32_little.c libgetdata-0.7.1/test/put_endian_float32_little.c --- libgetdata-0.7.0/test/put_endian_float32_little.c 2010-10-16 03:17:16.000000000 +0000 +++ libgetdata-0.7.1/test/put_endian_float32_little.c 2010-11-28 05:07:24.000000000 +0000 @@ -17,11 +17,12 @@ const char* format = __TEST__ "dirfile/format"; const char* data = __TEST__ "dirfile/data"; const char* format_data = "data RAW FLOAT32 1\nENDIAN little\n"; - int fd, r = 0; unsigned int i; const float c = 1.5; unsigned char x[sizeof(float)] = { 0x00, 0x00, 0xC0, 0x3F }; unsigned char u[sizeof(float)]; + int fd, n, error, r = 0; + DIRFILE *D; mkdir(filedir, 0777); @@ -29,9 +30,9 @@ write(fd, format_data, strlen(format_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDWR | GD_UNENCODED | GD_VERBOSE); - int n = gd_putdata(D, "data", 5, 0, 1, 0, GD_FLOAT32, &c); - int error = gd_error(D); + D = gd_open(filedir, GD_RDWR | GD_UNENCODED | GD_VERBOSE); + n = gd_putdata(D, "data", 5, 0, 1, 0, GD_FLOAT32, &c); + error = gd_error(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/put_endian_float64_arm.c libgetdata-0.7.1/test/put_endian_float64_arm.c --- libgetdata-0.7.0/test/put_endian_float64_arm.c 2010-10-16 03:17:16.000000000 +0000 +++ libgetdata-0.7.1/test/put_endian_float64_arm.c 2010-11-28 05:29:32.000000000 +0000 @@ -17,13 +17,14 @@ const char* format = __TEST__ "dirfile/format"; const char* data = __TEST__ "dirfile/data"; const char* format_data = "data RAW FLOAT64 1\nENDIAN little arm\n"; - int fd, r = 0; unsigned int i; const double c = 1.5; unsigned char x[sizeof(double)] = { 0x00, 0x00, 0xF8, 0x3F, 0x00, 0x00, 0x00, 0x00 }; unsigned char u[sizeof(double)]; + int fd, n, error, r = 0; + DIRFILE *D; mkdir(filedir, 0777); @@ -31,9 +32,9 @@ write(fd, format_data, strlen(format_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDWR | GD_UNENCODED | GD_VERBOSE); - int n = gd_putdata(D, "data", 5, 0, 1, 0, GD_FLOAT64, &c); - int error = gd_error(D); + D = gd_open(filedir, GD_RDWR | GD_UNENCODED | GD_VERBOSE); + n = gd_putdata(D, "data", 5, 0, 1, 0, GD_FLOAT64, &c); + error = gd_error(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/put_endian_float64_big.c libgetdata-0.7.1/test/put_endian_float64_big.c --- libgetdata-0.7.0/test/put_endian_float64_big.c 2010-10-16 03:17:16.000000000 +0000 +++ libgetdata-0.7.1/test/put_endian_float64_big.c 2010-11-28 05:07:44.000000000 +0000 @@ -17,13 +17,14 @@ const char* format = __TEST__ "dirfile/format"; const char* data = __TEST__ "dirfile/data"; const char* format_data = "data RAW FLOAT64 1\nENDIAN big\n"; - int fd, r = 0; unsigned int i; const double c = 1.5; unsigned char x[sizeof(double)] = { 0x3F, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; unsigned char u[sizeof(double)]; + int fd, n, error, r = 0; + DIRFILE *D; mkdir(filedir, 0777); @@ -31,9 +32,9 @@ write(fd, format_data, strlen(format_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDWR | GD_UNENCODED | GD_VERBOSE); - int n = gd_putdata(D, "data", 5, 0, 1, 0, GD_FLOAT64, &c); - int error = gd_error(D); + D = gd_open(filedir, GD_RDWR | GD_UNENCODED | GD_VERBOSE); + n = gd_putdata(D, "data", 5, 0, 1, 0, GD_FLOAT64, &c); + error = gd_error(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/put_endian_float64_little.c libgetdata-0.7.1/test/put_endian_float64_little.c --- libgetdata-0.7.0/test/put_endian_float64_little.c 2010-10-16 03:17:16.000000000 +0000 +++ libgetdata-0.7.1/test/put_endian_float64_little.c 2010-11-28 05:07:53.000000000 +0000 @@ -17,13 +17,14 @@ const char* format = __TEST__ "dirfile/format"; const char* data = __TEST__ "dirfile/data"; const char* format_data = "data RAW FLOAT64 1\nENDIAN little\n"; - int fd, r = 0; unsigned int i; const double c = 1.5; unsigned char x[sizeof(double)] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF8, 0x3F }; unsigned char u[sizeof(double)]; + int fd, n, error, r = 0; + DIRFILE *D; mkdir(filedir, 0777); @@ -31,9 +32,9 @@ write(fd, format_data, strlen(format_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDWR | GD_UNENCODED | GD_VERBOSE); - int n = gd_putdata(D, "data", 5, 0, 1, 0, GD_FLOAT64, &c); - int error = gd_error(D); + D = gd_open(filedir, GD_RDWR | GD_UNENCODED | GD_VERBOSE); + n = gd_putdata(D, "data", 5, 0, 1, 0, GD_FLOAT64, &c); + error = gd_error(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/put_ff.c libgetdata-0.7.1/test/put_ff.c --- libgetdata-0.7.0/test/put_ff.c 2010-10-16 03:17:16.000000000 +0000 +++ libgetdata-0.7.1/test/put_ff.c 2010-11-28 05:08:16.000000000 +0000 @@ -17,7 +17,8 @@ const char* data = __TEST__ "dirfile/data"; const char* format_data = "data RAW UINT8 8\n"; uint8_t c[8], d; - int fd, i, r = 0; + int fd, i, n, error, r = 0; + DIRFILE *D; struct stat buf; memset(c, 0, 8); @@ -30,9 +31,9 @@ write(fd, format_data, strlen(format_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDWR | GD_UNENCODED | GD_VERBOSE); - int n = gd_putdata(D, "data", 5, 0, 1, 0, GD_UINT8, c); - int error = gd_error(D); + D = gd_open(filedir, GD_RDWR | GD_UNENCODED | GD_VERBOSE); + n = gd_putdata(D, "data", 5, 0, 1, 0, GD_UINT8, c); + error = gd_error(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/put_float32.c libgetdata-0.7.1/test/put_float32.c --- libgetdata-0.7.0/test/put_float32.c 2010-10-16 03:17:16.000000000 +0000 +++ libgetdata-0.7.1/test/put_float32.c 2010-11-28 05:08:24.000000000 +0000 @@ -18,8 +18,9 @@ const char* data = __TEST__ "dirfile/data"; const char* format_data = "data RAW FLOAT32 8\n"; float c[8], d; - int fd, i, r = 0; struct stat buf; + int fd, i, n, error, r = 0; + DIRFILE *D; memset(c, 0, 8); mkdir(filedir, 0777); @@ -31,9 +32,9 @@ write(fd, format_data, strlen(format_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDWR | GD_UNENCODED | GD_VERBOSE); - int n = gd_putdata(D, "data", 5, 0, 1, 0, GD_FLOAT32, c); - int error = gd_error(D); + D = gd_open(filedir, GD_RDWR | GD_UNENCODED | GD_VERBOSE); + n = gd_putdata(D, "data", 5, 0, 1, 0, GD_FLOAT32, c); + error = gd_error(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/put_float64.c libgetdata-0.7.1/test/put_float64.c --- libgetdata-0.7.0/test/put_float64.c 2010-10-16 03:17:16.000000000 +0000 +++ libgetdata-0.7.1/test/put_float64.c 2010-11-28 05:08:31.000000000 +0000 @@ -18,8 +18,9 @@ const char* data = __TEST__ "dirfile/data"; const char* format_data = "data RAW FLOAT64 8\n"; double c[8], d; - int fd, i, r = 0; struct stat buf; + int fd, i, n, error, r = 0; + DIRFILE *D; memset(c, 0, 8); mkdir(filedir, 0777); @@ -31,9 +32,9 @@ write(fd, format_data, strlen(format_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDWR | GD_UNENCODED | GD_VERBOSE); - int n = gd_putdata(D, "data", 5, 0, 1, 0, GD_FLOAT64, c); - int error = gd_error(D); + D = gd_open(filedir, GD_RDWR | GD_UNENCODED | GD_VERBOSE); + n = gd_putdata(D, "data", 5, 0, 1, 0, GD_FLOAT64, c); + error = gd_error(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/put_foffs.c libgetdata-0.7.1/test/put_foffs.c --- libgetdata-0.7.0/test/put_foffs.c 2010-10-16 03:17:16.000000000 +0000 +++ libgetdata-0.7.1/test/put_foffs.c 2010-11-28 05:08:40.000000000 +0000 @@ -18,8 +18,9 @@ const char* data = __TEST__ "dirfile/data"; const char* format_data = "data RAW UINT8 8\nFRAMEOFFSET 2\n"; uint8_t c[8], d; - int fd, i, r = 0; struct stat buf; + int fd, i, n, error, r = 0; + DIRFILE *D; mkdir(filedir, 0777); @@ -30,9 +31,9 @@ write(fd, format_data, strlen(format_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDWR | GD_UNENCODED | GD_VERBOSE); - int n = gd_putdata(D, "data", 5, 0, 1, 0, GD_UINT8, c); - int error = gd_error(D); + D = gd_open(filedir, GD_RDWR | GD_UNENCODED | GD_VERBOSE); + n = gd_putdata(D, "data", 5, 0, 1, 0, GD_UINT8, c); + error = gd_error(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/put_fs.c libgetdata-0.7.1/test/put_fs.c --- libgetdata-0.7.0/test/put_fs.c 2010-10-16 03:17:16.000000000 +0000 +++ libgetdata-0.7.1/test/put_fs.c 2010-11-28 05:29:50.000000000 +0000 @@ -17,8 +17,9 @@ const char* data = __TEST__ "dirfile/data"; const char* format_data = "data RAW UINT8 8\n"; uint8_t c[8], d; - int fd, i, r = 0; struct stat buf; + int fd, i, n, error, r = 0; + DIRFILE *D; memset(c, 0, 8); mkdir(filedir, 0777); @@ -30,9 +31,9 @@ write(fd, format_data, strlen(format_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDWR | GD_UNENCODED | GD_VERBOSE); - int n = gd_putdata(D, "data", 5, 0, 0, 8, GD_UINT8, c); - int error = gd_error(D); + D = gd_open(filedir, GD_RDWR | GD_UNENCODED | GD_VERBOSE); + n = gd_putdata(D, "data", 5, 0, 0, 8, GD_UINT8, c); + error = gd_error(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/put_int16.c libgetdata-0.7.1/test/put_int16.c --- libgetdata-0.7.0/test/put_int16.c 2010-10-16 03:17:16.000000000 +0000 +++ libgetdata-0.7.1/test/put_int16.c 2010-11-28 05:09:06.000000000 +0000 @@ -17,8 +17,9 @@ const char* data = __TEST__ "dirfile/data"; const char* format_data = "data RAW INT16 8\n"; int16_t c[8], d; - int fd, i, r = 0; struct stat buf; + int fd, i, n, error, r = 0; + DIRFILE *D; memset(c, 0, 8); mkdir(filedir, 0777); @@ -30,9 +31,9 @@ write(fd, format_data, strlen(format_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDWR | GD_UNENCODED | GD_VERBOSE); - int n = gd_putdata(D, "data", 5, 0, 1, 0, GD_INT16, c); - int error = gd_error(D); + D = gd_open(filedir, GD_RDWR | GD_UNENCODED | GD_VERBOSE); + n = gd_putdata(D, "data", 5, 0, 1, 0, GD_INT16, c); + error = gd_error(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/put_int32.c libgetdata-0.7.1/test/put_int32.c --- libgetdata-0.7.0/test/put_int32.c 2010-10-16 03:17:16.000000000 +0000 +++ libgetdata-0.7.1/test/put_int32.c 2010-11-28 05:09:18.000000000 +0000 @@ -17,8 +17,9 @@ const char* data = __TEST__ "dirfile/data"; const char* format_data = "data RAW INT32 8\n"; int32_t c[8], d; - int fd, i, r = 0; struct stat buf; + int fd, i, n, error, r = 0; + DIRFILE *D; memset(c, 0, 8); mkdir(filedir, 0777); @@ -30,9 +31,9 @@ write(fd, format_data, strlen(format_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDWR | GD_UNENCODED | GD_VERBOSE); - int n = gd_putdata(D, "data", 5, 0, 1, 0, GD_INT32, c); - int error = gd_error(D); + D = gd_open(filedir, GD_RDWR | GD_UNENCODED | GD_VERBOSE); + n = gd_putdata(D, "data", 5, 0, 1, 0, GD_INT32, c); + error = gd_error(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/put_int64.c libgetdata-0.7.1/test/put_int64.c --- libgetdata-0.7.0/test/put_int64.c 2010-10-16 03:17:16.000000000 +0000 +++ libgetdata-0.7.1/test/put_int64.c 2010-11-28 05:09:24.000000000 +0000 @@ -17,8 +17,9 @@ const char* data = __TEST__ "dirfile/data"; const char* format_data = "data RAW INT64 8\n"; int64_t c[8], d; - int fd, i, r = 0; struct stat buf; + int fd, i, n, error, r = 0; + DIRFILE *D; memset(c, 0, 8); mkdir(filedir, 0777); @@ -30,9 +31,9 @@ write(fd, format_data, strlen(format_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDWR | GD_UNENCODED | GD_VERBOSE); - int n = gd_putdata(D, "data", 5, 0, 1, 0, GD_INT64, c); - int error = gd_error(D); + D = gd_open(filedir, GD_RDWR | GD_UNENCODED | GD_VERBOSE); + n = gd_putdata(D, "data", 5, 0, 1, 0, GD_INT64, c); + error = gd_error(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/put_int8.c libgetdata-0.7.1/test/put_int8.c --- libgetdata-0.7.0/test/put_int8.c 2010-10-16 03:17:16.000000000 +0000 +++ libgetdata-0.7.1/test/put_int8.c 2010-11-28 05:10:15.000000000 +0000 @@ -17,8 +17,9 @@ const char* data = __TEST__ "dirfile/data"; const char* format_data = "data RAW INT8 8\n"; int8_t c[8], d; - int fd, i, r = 0; struct stat buf; + int fd, i, n, error, r = 0; + DIRFILE *D; memset(c, 0, 8); mkdir(filedir, 0777); @@ -30,9 +31,9 @@ write(fd, format_data, strlen(format_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDWR | GD_UNENCODED | GD_VERBOSE); - int n = gd_putdata(D, "data", 5, 0, 1, 0, GD_INT8, c); - int error = gd_error(D); + D = gd_open(filedir, GD_RDWR | GD_UNENCODED | GD_VERBOSE); + n = gd_putdata(D, "data", 5, 0, 1, 0, GD_INT8, c); + error = gd_error(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/put_lincom1.c libgetdata-0.7.1/test/put_lincom1.c --- libgetdata-0.7.0/test/put_lincom1.c 2010-10-16 03:17:16.000000000 +0000 +++ libgetdata-0.7.1/test/put_lincom1.c 2010-11-28 05:10:49.000000000 +0000 @@ -17,8 +17,9 @@ const char* data = __TEST__ "dirfile/data"; const char* format_data = "lincom LINCOM 1 data 0.5 3.0\ndata RAW INT8 8\n"; int8_t c[8], d; - int fd, i, r = 0; struct stat buf; + int fd, i, n, error, r = 0; + DIRFILE *D; memset(c, 0, 8); mkdir(filedir, 0777); @@ -30,9 +31,9 @@ write(fd, format_data, strlen(format_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDWR | GD_UNENCODED | GD_VERBOSE); - int n = gd_putdata(D, "lincom", 5, 0, 1, 0, GD_INT8, c); - int error = gd_error(D); + D = gd_open(filedir, GD_RDWR | GD_UNENCODED | GD_VERBOSE); + n = gd_putdata(D, "lincom", 5, 0, 1, 0, GD_INT8, c); + error = gd_error(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/put_lincom2.c libgetdata-0.7.1/test/put_lincom2.c --- libgetdata-0.7.0/test/put_lincom2.c 2010-10-16 03:17:16.000000000 +0000 +++ libgetdata-0.7.1/test/put_lincom2.c 2010-11-28 05:10:58.000000000 +0000 @@ -17,8 +17,9 @@ const char* data = __TEST__ "dirfile/data"; const char* format_data = "lincom LINCOM 2 data 0.5 3.0 data 1.0 2.0\ndata RAW INT8 8\n"; int8_t c[8]; - int fd, i, r = 0; struct stat buf; + int fd, i, n, error, r = 0; + DIRFILE *D; memset(c, 0, 8); mkdir(filedir, 0777); @@ -30,9 +31,9 @@ write(fd, format_data, strlen(format_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDWR | GD_UNENCODED); - int n = gd_putdata(D, "lincom", 5, 0, 1, 0, GD_INT8, c); - int error = gd_error(D); + D = gd_open(filedir, GD_RDWR | GD_UNENCODED); + n = gd_putdata(D, "lincom", 5, 0, 1, 0, GD_INT8, c); + error = gd_error(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/put_lincom_noin.c libgetdata-0.7.1/test/put_lincom_noin.c --- libgetdata-0.7.0/test/put_lincom_noin.c 2010-10-16 03:17:16.000000000 +0000 +++ libgetdata-0.7.1/test/put_lincom_noin.c 2010-11-28 05:11:05.000000000 +0000 @@ -16,7 +16,8 @@ const char* format = __TEST__ "dirfile/format"; const char* format_data = "lincom LINCOM 1 data 0.5 3.0\n"; int8_t c[8]; - int fd, i, r = 0; + int fd, i, n, error, r = 0; + DIRFILE *D; memset(c, 0, 8); mkdir(filedir, 0777); @@ -28,9 +29,9 @@ write(fd, format_data, strlen(format_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDWR | GD_UNENCODED); - int n = gd_putdata(D, "lincom", 5, 0, 1, 0, GD_INT8, c); - int error = gd_error(D); + D = gd_open(filedir, GD_RDWR | GD_UNENCODED); + n = gd_putdata(D, "lincom", 5, 0, 1, 0, GD_INT8, c); + error = gd_error(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/put_linterp.c libgetdata-0.7.1/test/put_linterp.c --- libgetdata-0.7.0/test/put_linterp.c 2010-10-16 03:17:16.000000000 +0000 +++ libgetdata-0.7.1/test/put_linterp.c 2010-11-28 05:11:18.000000000 +0000 @@ -19,8 +19,10 @@ const char* table = __TEST__ "dirfile/table"; const char* format_data = "linterp LINTERP data ./table\ndata RAW INT8 8\n"; int8_t c[8], d; - int fd, i, r = 0; struct stat buf; + int fd, i, n, error, r = 0; + DIRFILE *D; + FILE *t; memset(c, 0, 8); mkdir(filedir, 0777); @@ -32,14 +34,14 @@ write(fd, format_data, strlen(format_data)); close(fd); - FILE* t = fopen(table, "wt"); + t = fopen(table, "wt"); for (i = 0; i < 10; ++i) fprintf(t, "%i %i\n", i * 6, i * 3); fclose(t); - DIRFILE* D = gd_open(filedir, GD_RDWR | GD_UNENCODED | GD_VERBOSE); - int n = gd_putdata(D, "linterp", 5, 0, 1, 0, GD_INT8, c); - int error = gd_error(D); + D = gd_open(filedir, GD_RDWR | GD_UNENCODED | GD_VERBOSE); + n = gd_putdata(D, "linterp", 5, 0, 1, 0, GD_INT8, c); + error = gd_error(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/put_linterp_noin.c libgetdata-0.7.1/test/put_linterp_noin.c --- libgetdata-0.7.0/test/put_linterp_noin.c 2010-10-16 03:17:16.000000000 +0000 +++ libgetdata-0.7.1/test/put_linterp_noin.c 2010-11-28 05:11:38.000000000 +0000 @@ -18,7 +18,9 @@ const char* table = __TEST__ "dirfile/table"; const char* format_data = "linterp LINTERP data ./table\n"; int8_t c[8]; - int fd, i, r = 0; + int fd, i, n, error, r = 0; + DIRFILE *D; + FILE *t; memset(c, 0, 8); mkdir(filedir, 0777); @@ -30,14 +32,14 @@ write(fd, format_data, strlen(format_data)); close(fd); - FILE* t = fopen(table, "wt"); + t = fopen(table, "wt"); for (i = 0; i < 10; ++i) fprintf(t, "%i %i\n", i * 6, i * 3); fclose(t); - DIRFILE* D = gd_open(filedir, GD_RDWR | GD_UNENCODED); - int n = gd_putdata(D, "linterp", 5, 0, 1, 0, GD_INT8, c); - int error = gd_error(D); + D = gd_open(filedir, GD_RDWR | GD_UNENCODED); + n = gd_putdata(D, "linterp", 5, 0, 1, 0, GD_INT8, c); + error = gd_error(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/put_linterp_nomono.c libgetdata-0.7.1/test/put_linterp_nomono.c --- libgetdata-0.7.0/test/put_linterp_nomono.c 2010-10-16 03:17:16.000000000 +0000 +++ libgetdata-0.7.1/test/put_linterp_nomono.c 2010-11-28 05:12:06.000000000 +0000 @@ -19,7 +19,9 @@ const char* table = __TEST__ "dirfile/table"; const char* format_data = "linterp LINTERP data ./table\ndata RAW INT8 8\n"; int8_t c[8]; - int fd, i, r = 0; + int fd, i, n, error, r = 0; + DIRFILE *D; + FILE *t; memset(c, 0, 8); mkdir(filedir, 0777); @@ -31,14 +33,14 @@ write(fd, format_data, strlen(format_data)); close(fd); - FILE* t = fopen(table, "wt"); + t = fopen(table, "wt"); for (i = 0; i < 10; ++i) fprintf(t, "%i %i\n", i * 6, (i - 5) * (i - 5)); fclose(t); - DIRFILE* D = gd_open(filedir, GD_RDWR | GD_UNENCODED); - int n = gd_putdata(D, "linterp", 5, 0, 1, 0, GD_INT8, c); - int error = gd_error(D); + D = gd_open(filedir, GD_RDWR | GD_UNENCODED); + n = gd_putdata(D, "linterp", 5, 0, 1, 0, GD_INT8, c); + error = gd_error(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/put_linterp_notab.c libgetdata-0.7.1/test/put_linterp_notab.c --- libgetdata-0.7.0/test/put_linterp_notab.c 2010-10-16 03:17:16.000000000 +0000 +++ libgetdata-0.7.1/test/put_linterp_notab.c 2010-11-28 05:12:15.000000000 +0000 @@ -17,7 +17,8 @@ const char* data = __TEST__ "dirfile/data"; const char* format_data = "linterp LINTERP data ./table\ndata RAW INT8 8\n"; int8_t c[8]; - int fd, i, r = 0; + int fd, i, n, error, r = 0; + DIRFILE *D; memset(c, 0, 8); mkdir(filedir, 0777); @@ -29,9 +30,9 @@ write(fd, format_data, strlen(format_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDWR | GD_UNENCODED); - int n = gd_putdata(D, "linterp", 5, 0, 1, 0, GD_INT8, c); - int error = gd_error(D); + D = gd_open(filedir, GD_RDWR | GD_UNENCODED); + n = gd_putdata(D, "linterp", 5, 0, 1, 0, GD_INT8, c); + error = gd_error(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/put_linterp_reverse.c libgetdata-0.7.1/test/put_linterp_reverse.c --- libgetdata-0.7.0/test/put_linterp_reverse.c 2010-10-16 03:17:16.000000000 +0000 +++ libgetdata-0.7.1/test/put_linterp_reverse.c 2010-11-28 05:12:41.000000000 +0000 @@ -19,8 +19,10 @@ const char* table = __TEST__ "dirfile/table"; const char* format_data = "linterp LINTERP data ./table\ndata RAW INT8 8\n"; int8_t c[8], d; - int fd, i, r = 0; struct stat buf; + int fd, i, n, error, r = 0; + DIRFILE *D; + FILE *t; memset(c, 0, 8); mkdir(filedir, 0777); @@ -32,14 +34,14 @@ write(fd, format_data, strlen(format_data)); close(fd); - FILE* t = fopen(table, "wt"); + t = fopen(table, "wt"); for (i = 0; i < 10; ++i) fprintf(t, "%i %i\n", i, 100 - i); fclose(t); - DIRFILE* D = gd_open(filedir, GD_RDWR | GD_UNENCODED | GD_VERBOSE); - int n = gd_putdata(D, "linterp", 5, 0, 1, 0, GD_INT8, c); - int error = gd_error(D); + D = gd_open(filedir, GD_RDWR | GD_UNENCODED | GD_VERBOSE); + n = gd_putdata(D, "linterp", 5, 0, 1, 0, GD_INT8, c); + error = gd_error(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/put_multiply.c libgetdata-0.7.1/test/put_multiply.c --- libgetdata-0.7.0/test/put_multiply.c 2010-10-16 03:17:16.000000000 +0000 +++ libgetdata-0.7.1/test/put_multiply.c 2010-11-28 05:13:05.000000000 +0000 @@ -17,8 +17,9 @@ const char* data = __TEST__ "dirfile/data"; const char* format_data = "mult MULTIPLY data data\ndata RAW INT8 8\n"; int8_t c[8]; - int fd, i, r = 0; struct stat buf; + int fd, i, n, error, r = 0; + DIRFILE *D; memset(c, 0, 8); mkdir(filedir, 0777); @@ -30,9 +31,9 @@ write(fd, format_data, strlen(format_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDWR | GD_UNENCODED); - int n = gd_putdata(D, "mult", 5, 0, 1, 0, GD_INT8, c); - int error = gd_error(D); + D = gd_open(filedir, GD_RDWR | GD_UNENCODED); + n = gd_putdata(D, "mult", 5, 0, 1, 0, GD_INT8, c); + error = gd_error(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/put_null.c libgetdata-0.7.1/test/put_null.c --- libgetdata-0.7.0/test/put_null.c 2010-10-16 03:17:16.000000000 +0000 +++ libgetdata-0.7.1/test/put_null.c 2010-11-28 05:13:12.000000000 +0000 @@ -15,7 +15,8 @@ const char* filedir = __TEST__ "dirfile"; const char* format = __TEST__ "dirfile/format"; const char* format_data = "data RAW UINT8 8\n"; - int fd, r = 0; + int fd, n, error, r = 0; + DIRFILE *D; mkdir(filedir, 0777); @@ -23,9 +24,9 @@ write(fd, format_data, strlen(format_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDWR | GD_UNENCODED); - int n = gd_putdata(D, "data", 5, 0, 1, 0, GD_NULL, NULL); - int error = gd_error(D); + D = gd_open(filedir, GD_RDWR | GD_UNENCODED); + n = gd_putdata(D, "data", 5, 0, 1, 0, GD_NULL, NULL); + error = gd_error(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/put_off64.c libgetdata-0.7.1/test/put_off64.c --- libgetdata-0.7.0/test/put_off64.c 2010-10-16 03:17:16.000000000 +0000 +++ libgetdata-0.7.1/test/put_off64.c 2010-11-28 05:13:21.000000000 +0000 @@ -26,8 +26,9 @@ const char* data = __TEST__ "dirfile/data"; const char* format_data = "data RAW UINT8 8\n"; uint8_t c[8], d; - int fd, i, r = 0; struct stat buf; + int fd, i, n, error, r = 0; + DIRFILE *D; memset(c, 0, 8); mkdir(filedir, 0777); @@ -39,9 +40,9 @@ write(fd, format_data, strlen(format_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDWR | GD_UNENCODED | GD_VERBOSE); - int n = gd_putdata(D, "data", 5, 0, 1, 0, GD_UINT8, c); - int error = gd_error(D); + D = gd_open(filedir, GD_RDWR | GD_UNENCODED | GD_VERBOSE); + n = gd_putdata(D, "data", 5, 0, 1, 0, GD_UINT8, c); + error = gd_error(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/put_phase.c libgetdata-0.7.1/test/put_phase.c --- libgetdata-0.7.0/test/put_phase.c 2010-10-16 03:17:16.000000000 +0000 +++ libgetdata-0.7.1/test/put_phase.c 2010-11-28 05:13:27.000000000 +0000 @@ -17,8 +17,9 @@ const char* data = __TEST__ "dirfile/data"; const char* format_data = "phase PHASE data -2\ndata RAW INT8 8\n"; int8_t c[8], d; - int fd, i, r = 0; struct stat buf; + int fd, i, n, error, r = 0; + DIRFILE *D; memset(c, 0, 8); mkdir(filedir, 0777); @@ -30,9 +31,9 @@ write(fd, format_data, strlen(format_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDWR | GD_UNENCODED | GD_VERBOSE); - int n = gd_putdata(D, "phase", 5, 0, 1, 0, GD_INT8, c); - int error = gd_error(D); + D = gd_open(filedir, GD_RDWR | GD_UNENCODED | GD_VERBOSE); + n = gd_putdata(D, "phase", 5, 0, 1, 0, GD_INT8, c); + error = gd_error(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/put_phase_noin.c libgetdata-0.7.1/test/put_phase_noin.c --- libgetdata-0.7.0/test/put_phase_noin.c 2010-10-16 03:17:16.000000000 +0000 +++ libgetdata-0.7.1/test/put_phase_noin.c 2010-11-28 05:13:41.000000000 +0000 @@ -16,7 +16,8 @@ const char* format = __TEST__ "dirfile/format"; const char* format_data = "phase PHASE data -2\n"; int8_t c[8]; - int fd, i, r = 0; + int fd, i, n, error, r = 0; + DIRFILE *D; memset(c, 0, 8); mkdir(filedir, 0777); @@ -28,9 +29,9 @@ write(fd, format_data, strlen(format_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDWR | GD_UNENCODED); - int n = gd_putdata(D, "phase", 5, 0, 1, 0, GD_INT8, c); - int error = gd_error(D); + D = gd_open(filedir, GD_RDWR | GD_UNENCODED); + n = gd_putdata(D, "phase", 5, 0, 1, 0, GD_INT8, c); + error = gd_error(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/put_polynom1.c libgetdata-0.7.1/test/put_polynom1.c --- libgetdata-0.7.0/test/put_polynom1.c 2010-10-16 03:17:16.000000000 +0000 +++ libgetdata-0.7.1/test/put_polynom1.c 2010-11-28 05:13:54.000000000 +0000 @@ -17,8 +17,9 @@ const char* data = __TEST__ "dirfile/data"; const char* format_data = "polynom POLYNOM data 3.0 0.5\ndata RAW INT8 8\n"; int8_t c[8], d; - int fd, i, r = 0; struct stat buf; + int fd, i, n, error, r = 0; + DIRFILE *D; memset(c, 0, 8); mkdir(filedir, 0777); @@ -30,9 +31,9 @@ write(fd, format_data, strlen(format_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDWR | GD_UNENCODED | GD_VERBOSE); - int n = gd_putdata(D, "polynom", 5, 0, 1, 0, GD_INT8, c); - int error = gd_error(D); + D = gd_open(filedir, GD_RDWR | GD_UNENCODED | GD_VERBOSE); + n = gd_putdata(D, "polynom", 5, 0, 1, 0, GD_INT8, c); + error = gd_error(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/put_polynom2.c libgetdata-0.7.1/test/put_polynom2.c --- libgetdata-0.7.0/test/put_polynom2.c 2010-10-16 03:17:16.000000000 +0000 +++ libgetdata-0.7.1/test/put_polynom2.c 2010-11-28 05:14:17.000000000 +0000 @@ -17,8 +17,9 @@ const char* data = __TEST__ "dirfile/data"; const char* format_data = "polynom POLYNOM data 3.0 2.0 1.0 0.5\ndata RAW INT8 8\n"; int8_t c[8]; - int fd, i, r = 0; struct stat buf; + int fd, i, n, error, r = 0; + DIRFILE *D; memset(c, 0, 8); mkdir(filedir, 0777); @@ -30,9 +31,9 @@ write(fd, format_data, strlen(format_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDWR | GD_UNENCODED); - int n = gd_putdata(D, "polynom", 5, 0, 1, 0, GD_INT8, c); - int error = gd_error(D); + D = gd_open(filedir, GD_RDWR | GD_UNENCODED); + n = gd_putdata(D, "polynom", 5, 0, 1, 0, GD_INT8, c); + error = gd_error(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/put_polynom_noin.c libgetdata-0.7.1/test/put_polynom_noin.c --- libgetdata-0.7.0/test/put_polynom_noin.c 2010-10-16 03:17:16.000000000 +0000 +++ libgetdata-0.7.1/test/put_polynom_noin.c 2010-11-28 05:14:25.000000000 +0000 @@ -16,7 +16,8 @@ const char* format = __TEST__ "dirfile/format"; const char* format_data = "polynom POLYNOM data 0.5 3.0\n"; int8_t c[8]; - int fd, i, r = 0; + int fd, i, n, error, r = 0; + DIRFILE *D; memset(c, 0, 8); mkdir(filedir, 0777); @@ -28,9 +29,9 @@ write(fd, format_data, strlen(format_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDWR | GD_UNENCODED); - int n = gd_putdata(D, "polynom", 5, 0, 1, 0, GD_INT8, c); - int error = gd_error(D); + D = gd_open(filedir, GD_RDWR | GD_UNENCODED); + n = gd_putdata(D, "polynom", 5, 0, 1, 0, GD_INT8, c); + error = gd_error(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/put_protect.c libgetdata-0.7.1/test/put_protect.c --- libgetdata-0.7.0/test/put_protect.c 2010-10-16 03:17:16.000000000 +0000 +++ libgetdata-0.7.1/test/put_protect.c 2010-11-28 05:14:34.000000000 +0000 @@ -16,7 +16,8 @@ const char* format = __TEST__ "dirfile/format"; const char* format_data = "data RAW UINT8 8\nPROTECT all\n"; uint8_t c[8]; - int fd, i, r = 0; + int fd, i, n, error, r = 0; + DIRFILE *D; memset(c, 0, 8); mkdir(filedir, 0777); @@ -28,9 +29,9 @@ write(fd, format_data, strlen(format_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDWR | GD_UNENCODED); - int n = gd_putdata(D, "data", 5, 0, 1, 0, GD_UINT8, c); - int error = gd_error(D); + D = gd_open(filedir, GD_RDWR | GD_UNENCODED); + n = gd_putdata(D, "data", 5, 0, 1, 0, GD_UINT8, c); + error = gd_error(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/put_rdonly.c libgetdata-0.7.1/test/put_rdonly.c --- libgetdata-0.7.0/test/put_rdonly.c 2010-10-16 03:17:16.000000000 +0000 +++ libgetdata-0.7.1/test/put_rdonly.c 2010-11-28 05:15:48.000000000 +0000 @@ -16,7 +16,8 @@ const char* data = __TEST__ "dirfile/data"; const char* format_data = "data RAW UINT8 8\n"; unsigned char c[8]; - int fd, r = 0; + int fd, n, error, unlink_data, r = 0; + DIRFILE *D; memset(c, 0, 8); mkdir(filedir, 0777); @@ -25,13 +26,13 @@ write(fd, format_data, strlen(format_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_UNENCODED); - int n = gd_putdata(D, "data", 5, 0, 1, 0, GD_UINT8, c); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY | GD_UNENCODED); + n = gd_putdata(D, "data", 5, 0, 1, 0, GD_UINT8, c); + error = gd_error(D); gd_close(D); - int unlink_data = unlink(data); + unlink_data = unlink(data); unlink(format); rmdir(filedir); diff -Nru libgetdata-0.7.0/test/put_recip.c libgetdata-0.7.1/test/put_recip.c --- libgetdata-0.7.0/test/put_recip.c 2010-10-16 03:17:16.000000000 +0000 +++ libgetdata-0.7.1/test/put_recip.c 2010-11-28 05:15:55.000000000 +0000 @@ -17,8 +17,9 @@ const char* data = __TEST__ "dirfile/data"; const char* format_data = "div RECIP data 1000.\ndata RAW INT8 8\n"; int8_t c[8], d; - int fd, i, r = 0; struct stat buf; + int fd, i, n, error, r = 0; + DIRFILE *D; memset(c, 0, 8); mkdir(filedir, 0777); @@ -30,9 +31,9 @@ write(fd, format_data, strlen(format_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDWR | GD_UNENCODED | GD_VERBOSE); - int n = gd_putdata(D, "div", 5, 0, 1, 0, GD_INT8, c); - int error = gd_error(D); + D = gd_open(filedir, GD_RDWR | GD_UNENCODED | GD_VERBOSE); + n = gd_putdata(D, "div", 5, 0, 1, 0, GD_INT8, c); + error = gd_error(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/put_recurse.c libgetdata-0.7.1/test/put_recurse.c --- libgetdata-0.7.0/test/put_recurse.c 2010-10-16 03:17:16.000000000 +0000 +++ libgetdata-0.7.1/test/put_recurse.c 2010-11-28 05:16:05.000000000 +0000 @@ -16,8 +16,9 @@ const char* format_data = "in1 RAW UINT8 11\n" "lincom LINCOM 1 lincom 1 0\n"; - int fd, r = 0; unsigned char c[8]; + int fd, n, error, r = 0; + DIRFILE *D; mkdir(filedir, 0777); @@ -25,9 +26,9 @@ write(fd, format_data, strlen(format_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDWR | GD_UNENCODED); - int n = gd_putdata(D, "lincom", 5, 0, 1, 0, GD_UINT8, c); - int error = gd_error(D); + D = gd_open(filedir, GD_RDWR | GD_UNENCODED); + n = gd_putdata(D, "lincom", 5, 0, 1, 0, GD_UINT8, c); + error = gd_error(D); gd_close(D); unlink(format); diff -Nru libgetdata-0.7.0/test/put_repr.c libgetdata-0.7.1/test/put_repr.c --- libgetdata-0.7.0/test/put_repr.c 2010-10-16 03:17:16.000000000 +0000 +++ libgetdata-0.7.1/test/put_repr.c 2010-11-28 05:16:17.000000000 +0000 @@ -19,7 +19,8 @@ const char* data = __TEST__ "dirfile/data"; const char* format_data = "data RAW COMPLEX64 8\n"; float c[8]; - int fd, i, r = 0; + int fd, i, n, error, r = 0; + DIRFILE *D; memset(c, 0, 8); mkdir(filedir, 0777); @@ -31,9 +32,9 @@ write(fd, format_data, strlen(format_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDWR | GD_UNENCODED); - int n = gd_putdata(D, "data.r", 5, 0, 1, 0, GD_FLOAT32, c); - int error = gd_error(D); + D = gd_open(filedir, GD_RDWR | GD_UNENCODED); + n = gd_putdata(D, "data.r", 5, 0, 1, 0, GD_FLOAT32, c); + error = gd_error(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/put_rofs.c libgetdata-0.7.1/test/put_rofs.c --- libgetdata-0.7.0/test/put_rofs.c 2010-10-16 03:17:16.000000000 +0000 +++ libgetdata-0.7.1/test/put_rofs.c 2010-11-28 05:16:25.000000000 +0000 @@ -16,7 +16,8 @@ const char* data = __TEST__ "dirfile/data"; const char* format_data = "data RAW UINT8 1\n"; unsigned char c = 0; - int fd, r = 0; + int fd, n, error, r = 0; + DIRFILE *D; mkdir(filedir, 0777); @@ -26,10 +27,10 @@ close(open(data, O_CREAT | O_EXCL | O_WRONLY | O_BINARY, 0444)); - DIRFILE* D = gd_open(filedir, GD_RDWR | GD_UNENCODED); - int n = gd_putdata(D, "data", 5, 0, 1, 0, GD_UINT8, &c); + D = gd_open(filedir, GD_RDWR | GD_UNENCODED); + n = gd_putdata(D, "data", 5, 0, 1, 0, GD_UINT8, &c); - int error = gd_error(D); + error = gd_error(D); gd_close(D); unlink(data); diff -Nru libgetdata-0.7.0/test/put_sbit.c libgetdata-0.7.1/test/put_sbit.c --- libgetdata-0.7.0/test/put_sbit.c 2010-10-16 03:17:16.000000000 +0000 +++ libgetdata-0.7.1/test/put_sbit.c 2010-11-28 05:16:31.000000000 +0000 @@ -19,7 +19,8 @@ const char* format_data = "bit SBIT data 2 3\ndata RAW INT8 8\n"; int8_t c[8]; int8_t d = 0xA5; - int fd, i, r = 0; + int fd, i, n, error, r = 0; + DIRFILE *D; mkdir(filedir, 0777); @@ -35,9 +36,9 @@ write(fd, &d, sizeof(int8_t)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDWR | GD_UNENCODED | GD_VERBOSE); - int n = gd_putdata(D, "bit", 5, 0, 1, 0, GD_INT8, c); - int error = gd_error(D); + D = gd_open(filedir, GD_RDWR | GD_UNENCODED | GD_VERBOSE); + n = gd_putdata(D, "bit", 5, 0, 1, 0, GD_INT8, c); + error = gd_error(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/put_sf.c libgetdata-0.7.1/test/put_sf.c --- libgetdata-0.7.0/test/put_sf.c 2010-10-16 03:17:16.000000000 +0000 +++ libgetdata-0.7.1/test/put_sf.c 2010-11-28 05:16:38.000000000 +0000 @@ -17,8 +17,9 @@ const char* data = __TEST__ "dirfile/data"; const char* format_data = "data RAW UINT8 8\n"; uint8_t c[8], d; - int fd, i, r = 0; struct stat buf; + int fd, i, n, error, r = 0; + DIRFILE *D; memset(c, 0, 8); mkdir(filedir, 0777); @@ -30,9 +31,9 @@ write(fd, format_data, strlen(format_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDWR | GD_UNENCODED | GD_VERBOSE); - int n = gd_putdata(D, "data", 0, 40, 1, 0, GD_UINT8, c); - int error = gd_error(D); + D = gd_open(filedir, GD_RDWR | GD_UNENCODED | GD_VERBOSE); + n = gd_putdata(D, "data", 0, 40, 1, 0, GD_UINT8, c); + error = gd_error(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/put_ss.c libgetdata-0.7.1/test/put_ss.c --- libgetdata-0.7.0/test/put_ss.c 2010-10-16 03:17:16.000000000 +0000 +++ libgetdata-0.7.1/test/put_ss.c 2010-11-28 05:16:48.000000000 +0000 @@ -17,8 +17,9 @@ const char* data = __TEST__ "dirfile/data"; const char* format_data = "data RAW UINT8 8\n"; uint8_t c[8], d; - int fd, i, r = 0; struct stat buf; + int fd, i, n, error, r = 0; + DIRFILE *D; memset(c, 0, 8); mkdir(filedir, 0777); @@ -30,9 +31,9 @@ write(fd, format_data, strlen(format_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDWR | GD_UNENCODED | GD_VERBOSE); - int n = gd_putdata(D, "data", 0, 40, 0, 8, GD_UINT8, c); - int error = gd_error(D); + D = gd_open(filedir, GD_RDWR | GD_UNENCODED | GD_VERBOSE); + n = gd_putdata(D, "data", 0, 40, 0, 8, GD_UINT8, c); + error = gd_error(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/put_string.c libgetdata-0.7.1/test/put_string.c --- libgetdata-0.7.0/test/put_string.c 2010-10-16 03:17:16.000000000 +0000 +++ libgetdata-0.7.1/test/put_string.c 2010-11-28 05:16:56.000000000 +0000 @@ -16,12 +16,12 @@ const char* filedir = __TEST__ "dirfile"; const char* format = __TEST__ "dirfile/format"; char string[1024] = ""; - int r = 0; + int error, r = 0; DIRFILE* D = gd_open(filedir, GD_RDWR | GD_CREAT | GD_VERBOSE); gd_add_string(D, "data", "some string", 0); gd_put_string(D, "data", "some other string"); - int error = gd_error(D); + error = gd_error(D); gd_close(D); /* check */ diff -Nru libgetdata-0.7.0/test/put_string_protect.c libgetdata-0.7.1/test/put_string_protect.c --- libgetdata-0.7.0/test/put_string_protect.c 2010-10-16 03:17:16.000000000 +0000 +++ libgetdata-0.7.1/test/put_string_protect.c 2010-11-28 05:17:04.000000000 +0000 @@ -15,7 +15,8 @@ const char* filedir = __TEST__ "dirfile"; const char* format = __TEST__ "dirfile/format"; const char* format_data = "data STRING UINT8\nPROTECT all\n"; - int fd, r = 0; + int fd, n, error, r = 0; + DIRFILE *D; mkdir(filedir, 0777); @@ -23,9 +24,9 @@ write(fd, format_data, strlen(format_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDWR | GD_UNENCODED); - int n = gd_put_string(D, "data", "some string"); - int error = gd_error(D); + D = gd_open(filedir, GD_RDWR | GD_UNENCODED); + n = gd_put_string(D, "data", "some string"); + error = gd_error(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/put_type.c libgetdata-0.7.1/test/put_type.c --- libgetdata-0.7.0/test/put_type.c 2010-10-16 03:17:16.000000000 +0000 +++ libgetdata-0.7.1/test/put_type.c 2010-11-28 05:17:11.000000000 +0000 @@ -15,7 +15,8 @@ const char* filedir = __TEST__ "dirfile"; const char* format = __TEST__ "dirfile/format"; const char* format_data = "data RAW UINT8 8\n"; - int fd, r = 0; + int fd, n, error, r = 0; + DIRFILE *D; mkdir(filedir, 0777); @@ -23,9 +24,9 @@ write(fd, format_data, strlen(format_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDWR | GD_UNENCODED); - int n = gd_putdata(D, "data", 5, 0, 1, 0, GD_UNKNOWN, NULL); - int error = gd_error(D); + D = gd_open(filedir, GD_RDWR | GD_UNENCODED); + n = gd_putdata(D, "data", 5, 0, 1, 0, GD_UNKNOWN, NULL); + error = gd_error(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/put_uint16.c libgetdata-0.7.1/test/put_uint16.c --- libgetdata-0.7.0/test/put_uint16.c 2010-10-16 03:17:16.000000000 +0000 +++ libgetdata-0.7.1/test/put_uint16.c 2010-11-28 05:17:18.000000000 +0000 @@ -18,8 +18,9 @@ const char* data = __TEST__ "dirfile/data"; const char* format_data = "data RAW UINT16 8\n"; uint16_t c[8], d; - int fd, i, r = 0; struct stat buf; + int fd, i, n, error, r = 0; + DIRFILE *D; memset(c, 0, 8); mkdir(filedir, 0777); @@ -31,9 +32,9 @@ write(fd, format_data, strlen(format_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDWR | GD_UNENCODED | GD_VERBOSE); - int n = gd_putdata(D, "data", 5, 0, 1, 0, GD_UINT16, c); - int error = gd_error(D); + D = gd_open(filedir, GD_RDWR | GD_UNENCODED | GD_VERBOSE); + n = gd_putdata(D, "data", 5, 0, 1, 0, GD_UINT16, c); + error = gd_error(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/put_uint32.c libgetdata-0.7.1/test/put_uint32.c --- libgetdata-0.7.0/test/put_uint32.c 2010-10-16 03:17:16.000000000 +0000 +++ libgetdata-0.7.1/test/put_uint32.c 2010-11-28 05:26:20.000000000 +0000 @@ -17,8 +17,9 @@ const char* data = __TEST__ "dirfile/data"; const char* format_data = "data RAW UINT32 8\n"; uint32_t c[8], d, i; - int fd, r = 0; struct stat buf; + int fd, n, error, r = 0; + DIRFILE *D; memset(c, 0, 8); mkdir(filedir, 0777); @@ -30,9 +31,9 @@ write(fd, format_data, strlen(format_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDWR | GD_UNENCODED | GD_VERBOSE); - int n = gd_putdata(D, "data", 5, 0, 1, 0, GD_UINT32, c); - int error = gd_error(D); + D = gd_open(filedir, GD_RDWR | GD_UNENCODED | GD_VERBOSE); + n = gd_putdata(D, "data", 5, 0, 1, 0, GD_UINT32, c); + error = gd_error(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/put_uint64.c libgetdata-0.7.1/test/put_uint64.c --- libgetdata-0.7.0/test/put_uint64.c 2010-10-16 03:17:16.000000000 +0000 +++ libgetdata-0.7.1/test/put_uint64.c 2010-11-28 05:26:32.000000000 +0000 @@ -17,8 +17,9 @@ const char* data = __TEST__ "dirfile/data"; const char* format_data = "data RAW UINT64 8\n"; uint64_t c[8], d, i; - int fd, r = 0; struct stat buf; + int fd, n, error, r = 0; + DIRFILE *D; memset(c, 0, 8); mkdir(filedir, 0777); @@ -30,9 +31,9 @@ write(fd, format_data, strlen(format_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDWR | GD_UNENCODED | GD_VERBOSE); - int n = gd_putdata(D, "data", 5, 0, 1, 0, GD_UINT64, c); - int error = gd_error(D); + D = gd_open(filedir, GD_RDWR | GD_UNENCODED | GD_VERBOSE); + n = gd_putdata(D, "data", 5, 0, 1, 0, GD_UINT64, c); + error = gd_error(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/ref.c libgetdata-0.7.1/test/ref.c --- libgetdata-0.7.0/test/ref.c 2010-10-16 03:17:16.000000000 +0000 +++ libgetdata-0.7.1/test/ref.c 2010-11-28 05:38:42.000000000 +0000 @@ -24,9 +24,10 @@ const char* data1 = __TEST__ "dirfile/data1"; const char* data2 = __TEST__ "dirfile/data2"; - int fd; - int r = 0; uint8_t data_data[4] = { 0, 1, 2, 3 }; + int fd, error, error2, r = 0; + DIRFILE *D; + off_t nf; mkdir(filedir, 0777); @@ -42,14 +43,14 @@ write(fd, data_data, 3); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int error = gd_error(D); + error = gd_error(D); CHECKI(error,0); - off_t nf = gd_nframes(D); + nf = gd_nframes(D); - int error2 = gd_error(D); + error2 = gd_error(D); CHECKI(error2,0); CHECKI(nf,3); diff -Nru libgetdata-0.7.0/test/ref_none.c libgetdata-0.7.1/test/ref_none.c --- libgetdata-0.7.0/test/ref_none.c 2010-10-16 03:17:16.000000000 +0000 +++ libgetdata-0.7.1/test/ref_none.c 2010-11-28 05:39:01.000000000 +0000 @@ -23,9 +23,10 @@ const char* data1 = __TEST__ "dirfile/data1"; const char* data2 = __TEST__ "dirfile/data2"; - int fd; - int r = 0; uint8_t data_data[4] = { 0, 1, 2, 3 }; + int fd, error, error2, r = 0; + DIRFILE *D; + off_t nf; mkdir(filedir, 0777); @@ -41,14 +42,14 @@ write(fd, data_data, 3); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int error = gd_error(D); + error = gd_error(D); CHECKI(error, 0); - off_t nf = gd_nframes(D); + nf = gd_nframes(D); - int error2 = gd_error(D); + error2 = gd_error(D); CHECKI(error2, 0); CHECKI(nf,4); diff -Nru libgetdata-0.7.0/test/ref_two.c libgetdata-0.7.1/test/ref_two.c --- libgetdata-0.7.0/test/ref_two.c 2010-10-16 03:17:16.000000000 +0000 +++ libgetdata-0.7.1/test/ref_two.c 2010-11-28 05:39:08.000000000 +0000 @@ -25,9 +25,10 @@ const char* data1 = __TEST__ "dirfile/data1"; const char* data2 = __TEST__ "dirfile/data2"; - int fd; - int r = 0; uint8_t data_data[4] = { 0, 1, 2, 3 }; + int fd, error, error2, r = 0; + DIRFILE *D; + off_t nf; mkdir(filedir, 0777); @@ -43,14 +44,14 @@ write(fd, data_data, 3); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int error = gd_error(D); + error = gd_error(D); CHECKI(error, 0); - off_t nf = gd_nframes(D); + nf = gd_nframes(D); - int error2 = gd_error(D); + error2 = gd_error(D); CHECKI(error2, 0); CHECKI(nf,3); diff -Nru libgetdata-0.7.0/test/repr_a.c libgetdata-0.7.1/test/repr_a.c --- libgetdata-0.7.0/test/repr_a.c 2010-10-16 03:17:16.000000000 +0000 +++ libgetdata-0.7.1/test/repr_a.c 2010-11-28 05:34:55.000000000 +0000 @@ -23,7 +23,8 @@ #else double complex data_data[100]; #endif - int i, r = 0; + int i, n, error, r = 0; + DIRFILE *D; mkdir(filedir, 0777); @@ -45,9 +46,9 @@ write(i, data_data, 200 * sizeof(double)); close(i); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int n = gd_getdata(D, "data.a", 5, 0, 8, 0, GD_FLOAT64, &c); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + n = gd_getdata(D, "data.a", 5, 0, 8, 0, GD_FLOAT64, &c); + error = gd_error(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/repr_float32.c libgetdata-0.7.1/test/repr_float32.c --- libgetdata-0.7.0/test/repr_float32.c 2010-10-16 03:17:16.000000000 +0000 +++ libgetdata-0.7.1/test/repr_float32.c 2010-11-28 05:35:17.000000000 +0000 @@ -23,7 +23,8 @@ double complex data_data[256]; #endif float c[8]; - int fd, i, r = 0; + int fd, i, n, error, r = 0; + DIRFILE *D; memset(c, 0, 8); mkdir(filedir, 0777); @@ -44,9 +45,9 @@ write(fd, data_data, 512 * sizeof(double)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int n = gd_getdata(D, "data", 5, 0, 1, 0, GD_FLOAT32, c); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + n = gd_getdata(D, "data", 5, 0, 1, 0, GD_FLOAT32, c); + error = gd_error(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/repr_float64.c libgetdata-0.7.1/test/repr_float64.c --- libgetdata-0.7.0/test/repr_float64.c 2010-10-16 03:17:16.000000000 +0000 +++ libgetdata-0.7.1/test/repr_float64.c 2010-11-28 05:35:26.000000000 +0000 @@ -23,7 +23,8 @@ double complex data_data[256]; #endif double c[8]; - int fd, i, r = 0; + int fd, i, n, error, r = 0; + DIRFILE *D; memset(c, 0, 8); mkdir(filedir, 0777); @@ -44,9 +45,9 @@ write(fd, data_data, 512 * sizeof(double)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int n = gd_getdata(D, "data", 5, 0, 1, 0, GD_FLOAT64, c); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + n = gd_getdata(D, "data", 5, 0, 1, 0, GD_FLOAT64, c); + error = gd_error(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/repr_i.c libgetdata-0.7.1/test/repr_i.c --- libgetdata-0.7.0/test/repr_i.c 2010-10-16 03:17:16.000000000 +0000 +++ libgetdata-0.7.1/test/repr_i.c 2010-11-28 05:35:39.000000000 +0000 @@ -23,7 +23,8 @@ #else double complex data_data[100]; #endif - int i, r = 0; + int i, n, error, r = 0; + DIRFILE *D; mkdir(filedir, 0777); @@ -45,9 +46,9 @@ write(i, data_data, 200 * sizeof(double)); close(i); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int n = gd_getdata(D, "data.i", 5, 0, 8, 0, GD_FLOAT64, &c); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + n = gd_getdata(D, "data.i", 5, 0, 8, 0, GD_FLOAT64, &c); + error = gd_error(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/repr_int16.c libgetdata-0.7.1/test/repr_int16.c --- libgetdata-0.7.0/test/repr_int16.c 2010-10-16 03:17:16.000000000 +0000 +++ libgetdata-0.7.1/test/repr_int16.c 2010-11-28 05:36:15.000000000 +0000 @@ -22,7 +22,8 @@ double complex data_data[256]; #endif int16_t c[8]; - int fd, i, r = 0; + int fd, i, n, error, r = 0; + DIRFILE *D; memset(c, 0, 8); mkdir(filedir, 0777); @@ -43,10 +44,10 @@ write(fd, data_data, 512 * sizeof(double)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int n = gd_getdata(D, "data", 5, 0, 1, 0, GD_INT16, c); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + n = gd_getdata(D, "data", 5, 0, 1, 0, GD_INT16, c); - int error = gd_error(D); + error = gd_error(D); CHECKI(error, 0); CHECKI(n,8); for (i = 0; i < 8; ++i) diff -Nru libgetdata-0.7.0/test/repr_int32.c libgetdata-0.7.1/test/repr_int32.c --- libgetdata-0.7.0/test/repr_int32.c 2010-10-16 03:17:16.000000000 +0000 +++ libgetdata-0.7.1/test/repr_int32.c 2010-11-28 05:36:24.000000000 +0000 @@ -22,7 +22,8 @@ double complex data_data[256]; #endif int32_t c[8]; - int fd, i, r = 0; + int fd, i, n, error, r = 0; + DIRFILE *D; memset(c, 0, 8); mkdir(filedir, 0777); @@ -43,10 +44,10 @@ write(fd, data_data, 512 * sizeof(double)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int n = gd_getdata(D, "data", 5, 0, 1, 0, GD_INT32, c); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + n = gd_getdata(D, "data", 5, 0, 1, 0, GD_INT32, c); - int error = gd_error(D); + error = gd_error(D); CHECKI(error,0); CHECKI(n,8); for (i = 0; i < 8; ++i) diff -Nru libgetdata-0.7.0/test/repr_int64.c libgetdata-0.7.1/test/repr_int64.c --- libgetdata-0.7.0/test/repr_int64.c 2010-10-16 03:17:16.000000000 +0000 +++ libgetdata-0.7.1/test/repr_int64.c 2010-11-28 05:36:32.000000000 +0000 @@ -22,7 +22,8 @@ double complex data_data[256]; #endif uint64_t c[8], i; - int fd, r = 0; + int fd, n, error, r = 0; + DIRFILE *D; memset(c, 0, 8); mkdir(filedir, 0777); @@ -43,10 +44,10 @@ write(fd, data_data, 512 * sizeof(double)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int n = gd_getdata(D, "data", 5, 0, 1, 0, GD_UINT64, c); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + n = gd_getdata(D, "data", 5, 0, 1, 0, GD_UINT64, c); - int error = gd_error(D); + error = gd_error(D); CHECKI(error,0); CHECKI(n,8); for (i = 0; i < 8; ++i) diff -Nru libgetdata-0.7.0/test/repr_int8.c libgetdata-0.7.1/test/repr_int8.c --- libgetdata-0.7.0/test/repr_int8.c 2010-10-16 03:17:16.000000000 +0000 +++ libgetdata-0.7.1/test/repr_int8.c 2010-11-28 05:36:39.000000000 +0000 @@ -22,7 +22,8 @@ double complex data_data[256]; #endif int8_t c[8]; - int fd, i, r = 0; + int fd, i, n, error, r = 0; + DIRFILE *D; memset(c, 0, 8); mkdir(filedir, 0777); @@ -43,10 +44,10 @@ write(fd, data_data, 512 * sizeof(double)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int n = gd_getdata(D, "data", 5, 0, 1, 0, GD_INT8, c); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + n = gd_getdata(D, "data", 5, 0, 1, 0, GD_INT8, c); - int error = gd_error(D); + error = gd_error(D); CHECKI(error, 0); CHECKI(n,8); for (i = 0; i < 8; ++i) diff -Nru libgetdata-0.7.0/test/repr_m.c libgetdata-0.7.1/test/repr_m.c --- libgetdata-0.7.0/test/repr_m.c 2010-10-16 03:17:16.000000000 +0000 +++ libgetdata-0.7.1/test/repr_m.c 2010-11-28 05:36:48.000000000 +0000 @@ -23,7 +23,8 @@ #else double complex data_data[100]; #endif - int i, r = 0; + int i, n, error, r = 0; + DIRFILE *D; mkdir(filedir, 0777); @@ -45,9 +46,9 @@ write(i, data_data, 200 * sizeof(double)); close(i); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int n = gd_getdata(D, "data.m", 5, 0, 8, 0, GD_FLOAT64, &c); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + n = gd_getdata(D, "data.m", 5, 0, 8, 0, GD_FLOAT64, &c); + error = gd_error(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/repr_r.c libgetdata-0.7.1/test/repr_r.c --- libgetdata-0.7.0/test/repr_r.c 2010-10-16 03:17:16.000000000 +0000 +++ libgetdata-0.7.1/test/repr_r.c 2010-11-28 05:36:58.000000000 +0000 @@ -23,7 +23,8 @@ #else double complex data_data[100]; #endif - int i, r = 0; + int i, n, error, r = 0; + DIRFILE *D; mkdir(filedir, 0777); @@ -45,9 +46,9 @@ write(i, data_data, 200 * sizeof(double)); close(i); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int n = gd_getdata(D, "data.r", 5, 0, 8, 0, GD_FLOAT64, &c); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + n = gd_getdata(D, "data.r", 5, 0, 8, 0, GD_FLOAT64, &c); + error = gd_error(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/repr_real_a.c libgetdata-0.7.1/test/repr_real_a.c --- libgetdata-0.7.0/test/repr_real_a.c 2010-10-16 03:17:16.000000000 +0000 +++ libgetdata-0.7.1/test/repr_real_a.c 2010-11-28 05:37:07.000000000 +0000 @@ -19,7 +19,8 @@ const char* format_data = "data RAW FLOAT64 1\n"; double c[8]; double data_data[100]; - int i, r = 0; + int i, n, error, r = 0; + DIRFILE *D; mkdir(filedir, 0777); @@ -34,9 +35,9 @@ write(i, data_data, 100 * sizeof(double)); close(i); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int n = gd_getdata(D, "data.a", 5, 0, 8, 0, GD_FLOAT64, &c); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + n = gd_getdata(D, "data.a", 5, 0, 8, 0, GD_FLOAT64, &c); + error = gd_error(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/repr_real_i.c libgetdata-0.7.1/test/repr_real_i.c --- libgetdata-0.7.0/test/repr_real_i.c 2010-10-16 03:17:16.000000000 +0000 +++ libgetdata-0.7.1/test/repr_real_i.c 2010-11-28 05:37:16.000000000 +0000 @@ -19,7 +19,8 @@ const char* format_data = "data RAW FLOAT64 1\n"; double c[8]; double data_data[100]; - int i, r = 0; + int i, n, error, r = 0; + DIRFILE *D; mkdir(filedir, 0777); @@ -34,9 +35,9 @@ write(i, data_data, 100 * sizeof(double)); close(i); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int n = gd_getdata(D, "data.i", 5, 0, 8, 0, GD_FLOAT64, &c); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + n = gd_getdata(D, "data.i", 5, 0, 8, 0, GD_FLOAT64, &c); + error = gd_error(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/repr_real_m.c libgetdata-0.7.1/test/repr_real_m.c --- libgetdata-0.7.0/test/repr_real_m.c 2010-10-16 03:17:16.000000000 +0000 +++ libgetdata-0.7.1/test/repr_real_m.c 2010-11-28 05:37:24.000000000 +0000 @@ -19,7 +19,8 @@ const char* format_data = "data RAW FLOAT64 1\n"; double c[8]; double data_data[100]; - int i, r = 0; + int i, n, error, r = 0; + DIRFILE *D; mkdir(filedir, 0777); @@ -34,9 +35,9 @@ write(i, data_data, 100 * sizeof(double)); close(i); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int n = gd_getdata(D, "data.m", 5, 0, 8, 0, GD_FLOAT64, &c); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + n = gd_getdata(D, "data.m", 5, 0, 8, 0, GD_FLOAT64, &c); + error = gd_error(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/repr_real_r.c libgetdata-0.7.1/test/repr_real_r.c --- libgetdata-0.7.0/test/repr_real_r.c 2010-10-16 03:17:16.000000000 +0000 +++ libgetdata-0.7.1/test/repr_real_r.c 2010-11-28 05:37:43.000000000 +0000 @@ -19,7 +19,8 @@ const char* format_data = "data RAW FLOAT64 1\n"; double c[8]; double data_data[100]; - int i, r = 0; + int i, n, error, r = 0; + DIRFILE *D; mkdir(filedir, 0777); @@ -34,9 +35,9 @@ write(i, data_data, 100 * sizeof(double)); close(i); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int n = gd_getdata(D, "data.r", 5, 0, 8, 0, GD_FLOAT64, &c); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + n = gd_getdata(D, "data.r", 5, 0, 8, 0, GD_FLOAT64, &c); + error = gd_error(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/repr_uint16.c libgetdata-0.7.1/test/repr_uint16.c --- libgetdata-0.7.0/test/repr_uint16.c 2010-10-16 03:17:16.000000000 +0000 +++ libgetdata-0.7.1/test/repr_uint16.c 2010-11-28 05:37:53.000000000 +0000 @@ -22,7 +22,8 @@ double complex data_data[256]; #endif uint16_t c[8], i; - int fd, r = 0; + int fd, n, error, r = 0; + DIRFILE *D; memset(c, 0, 8); mkdir(filedir, 0777); @@ -43,10 +44,10 @@ write(fd, data_data, 512 * sizeof(double)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int n = gd_getdata(D, "data", 5, 0, 1, 0, GD_UINT16, c); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + n = gd_getdata(D, "data", 5, 0, 1, 0, GD_UINT16, c); - int error = gd_error(D); + error = gd_error(D); CHECKI(error, 0); CHECKI(n,8); for (i = 0; i < 8; ++i) diff -Nru libgetdata-0.7.0/test/repr_uint32.c libgetdata-0.7.1/test/repr_uint32.c --- libgetdata-0.7.0/test/repr_uint32.c 2010-10-16 03:17:16.000000000 +0000 +++ libgetdata-0.7.1/test/repr_uint32.c 2010-11-28 05:38:00.000000000 +0000 @@ -22,7 +22,8 @@ double complex data_data[256]; #endif uint32_t c[8], i; - int fd, r = 0; + int fd, n, error, r = 0; + DIRFILE *D; memset(c, 0, 8); mkdir(filedir, 0777); @@ -43,10 +44,10 @@ write(fd, data_data, 512 * sizeof(double)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int n = gd_getdata(D, "data", 5, 0, 1, 0, GD_UINT32, c); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + n = gd_getdata(D, "data", 5, 0, 1, 0, GD_UINT32, c); - int error = gd_error(D); + error = gd_error(D); CHECKI(error,0); CHECKI(n,8); for (i = 0; i < 8; ++i) diff -Nru libgetdata-0.7.0/test/repr_uint64.c libgetdata-0.7.1/test/repr_uint64.c --- libgetdata-0.7.0/test/repr_uint64.c 2010-10-16 03:17:16.000000000 +0000 +++ libgetdata-0.7.1/test/repr_uint64.c 2010-11-28 05:38:07.000000000 +0000 @@ -22,7 +22,8 @@ double complex data_data[256]; #endif uint64_t c[8], i; - int fd, r = 0; + int fd, n, error, r = 0; + DIRFILE *D; memset(c, 0, 8); mkdir(filedir, 0777); @@ -43,10 +44,10 @@ write(fd, data_data, 512 * sizeof(double)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int n = gd_getdata(D, "data", 5, 0, 1, 0, GD_UINT64, c); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + n = gd_getdata(D, "data", 5, 0, 1, 0, GD_UINT64, c); - int error = gd_error(D); + error = gd_error(D); CHECKI(error,0); CHECKI(n,8); for (i = 0; i < 8; ++i) diff -Nru libgetdata-0.7.0/test/repr_uint8.c libgetdata-0.7.1/test/repr_uint8.c --- libgetdata-0.7.0/test/repr_uint8.c 2010-10-16 03:17:16.000000000 +0000 +++ libgetdata-0.7.1/test/repr_uint8.c 2010-11-28 05:38:16.000000000 +0000 @@ -22,7 +22,8 @@ double complex data_data[256]; #endif uint8_t c[8], i; - int fd, r = 0; + int fd, n, error, r = 0; + DIRFILE *D; memset(c, 0, 8); mkdir(filedir, 0777); @@ -43,10 +44,10 @@ write(fd, data_data, 512 * sizeof(double)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int n = gd_getdata(D, "data", 5, 0, 1, 0, GD_UINT8, c); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + n = gd_getdata(D, "data", 5, 0, 1, 0, GD_UINT8, c); - int error = gd_error(D); + error = gd_error(D); CHECKI(error,0); CHECKI(n,8); for (i = 0; i < 8; ++i) diff -Nru libgetdata-0.7.0/test/slim_get.c libgetdata-0.7.1/test/slim_get.c --- libgetdata-0.7.0/test/slim_get.c 2010-10-16 03:17:16.000000000 +0000 +++ libgetdata-0.7.1/test/slim_get.c 2010-11-28 05:40:08.000000000 +0000 @@ -22,7 +22,8 @@ uint16_t c[8]; char command[4096]; uint16_t data_data[256]; - int fd, r = 0; + int fd, i, n, error, r = 0; + DIRFILE *D; memset(c, 0, 8); mkdir(filedir, 0777); @@ -46,12 +47,12 @@ } #ifdef USE_SLIM - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); #else - DIRFILE* D = gd_open(filedir, GD_RDONLY); + D = gd_open(filedir, GD_RDONLY); #endif - int n = gd_getdata(D, "data", 5, 0, 1, 0, GD_UINT16, c); - int error = gd_error(D); + n = gd_getdata(D, "data", 5, 0, 1, 0, GD_UINT16, c); + error = gd_error(D); gd_close(D); @@ -60,8 +61,6 @@ rmdir(filedir); #ifdef USE_SLIM - int i; - CHECKI(error,0); CHECKI(n,8); for (i = 0; i < 8; ++i) diff -Nru libgetdata-0.7.0/test/slim_nframes.c libgetdata-0.7.1/test/slim_nframes.c --- libgetdata-0.7.0/test/slim_nframes.c 2010-10-16 03:17:16.000000000 +0000 +++ libgetdata-0.7.1/test/slim_nframes.c 2010-11-28 05:41:08.000000000 +0000 @@ -20,7 +20,9 @@ const char* format_data = "data RAW UINT16 1\n"; char command[4096]; uint16_t data_data[256]; - int i, r = 0; + int i, error, r = 0; + size_t n; + DIRFILE *D; mkdir(filedir, 0777); @@ -43,12 +45,12 @@ } #ifdef USE_SLIM - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); #else - DIRFILE* D = gd_open(filedir, GD_RDONLY); + * D = gd_open(filedir, GD_RDONLY); #endif - size_t n = gd_nframes(D); - int error = gd_error(D); + n = gd_nframes(D); + error = gd_error(D); gd_close(D); unlink(slimdata); diff -Nru libgetdata-0.7.0/test/spf.c libgetdata-0.7.1/test/spf.c --- libgetdata-0.7.0/test/spf.c 2010-10-16 03:17:16.000000000 +0000 +++ libgetdata-0.7.1/test/spf.c 2010-11-28 06:11:43.000000000 +0000 @@ -14,7 +14,9 @@ const char* filedir = __TEST__ "dirfile"; const char* format = __TEST__ "dirfile/format"; const char* format_data = "data RAW UINT8 11\n"; - int fd, r = 0; + int fd, error, r = 0; + gd_spf_t spf; + DIRFILE *D; mkdir(filedir, 0777); @@ -22,9 +24,9 @@ write(fd, format_data, strlen(format_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - unsigned int spf = gd_spf(D, "data"); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + spf = gd_spf(D, "data"); + error = gd_error(D); gd_close(D); unlink(format); diff -Nru libgetdata-0.7.0/test/spf_divide.c libgetdata-0.7.1/test/spf_divide.c --- libgetdata-0.7.0/test/spf_divide.c 2010-10-16 03:17:16.000000000 +0000 +++ libgetdata-0.7.1/test/spf_divide.c 2010-11-28 05:43:27.000000000 +0000 @@ -17,6 +17,8 @@ "in2 RAW UINT8 13\n" "div DIVIDE in1 in2\n"; int fd, r = 0; + DIRFILE *D; + gd_spf_t spf; mkdir(filedir, 0777); @@ -24,8 +26,8 @@ write(fd, format_data, strlen(format_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - unsigned int spf = gd_spf(D, "div"); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + spf = gd_spf(D, "div"); gd_close(D); unlink(format); diff -Nru libgetdata-0.7.0/test/spf_lincom.c libgetdata-0.7.1/test/spf_lincom.c --- libgetdata-0.7.0/test/spf_lincom.c 2010-10-16 03:17:16.000000000 +0000 +++ libgetdata-0.7.1/test/spf_lincom.c 2010-11-28 05:44:26.000000000 +0000 @@ -18,6 +18,8 @@ "in2 RAW UINT8 13\n" "lincom LINCOM 2 in1 1 0 in2 1 0\n"; int fd, r = 0; + gd_spf_t spf; + DIRFILE *D; mkdir(filedir, 0777); @@ -25,8 +27,8 @@ write(fd, format_data, strlen(format_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - unsigned int spf = gd_spf(D, "lincom"); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + spf = gd_spf(D, "lincom"); gd_close(D); unlink(format); diff -Nru libgetdata-0.7.0/test/spf_multiply.c libgetdata-0.7.1/test/spf_multiply.c --- libgetdata-0.7.0/test/spf_multiply.c 2010-10-16 03:17:16.000000000 +0000 +++ libgetdata-0.7.1/test/spf_multiply.c 2010-11-28 05:45:12.000000000 +0000 @@ -18,6 +18,8 @@ "in2 RAW UINT8 13\n" "lincom MULTIPLY in1 in2\n"; int fd, r = 0; + gd_spf_t spf; + DIRFILE *D; mkdir(filedir, 0777); @@ -25,8 +27,8 @@ write(fd, format_data, strlen(format_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - unsigned int spf = gd_spf(D, "lincom"); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + spf = gd_spf(D, "lincom"); gd_close(D); unlink(format); diff -Nru libgetdata-0.7.0/test/spf_polynom.c libgetdata-0.7.1/test/spf_polynom.c --- libgetdata-0.7.0/test/spf_polynom.c 2010-10-16 03:17:16.000000000 +0000 +++ libgetdata-0.7.1/test/spf_polynom.c 2010-11-28 05:45:27.000000000 +0000 @@ -17,6 +17,8 @@ "in RAW UINT8 11\n" "polynom POLYNOM in 1 2 1 3\n"; int fd, r = 0; + gd_spf_t spf; + DIRFILE *D; mkdir(filedir, 0777); @@ -24,8 +26,8 @@ write(fd, format_data, strlen(format_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - unsigned int spf = gd_spf(D, "polynom"); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + spf = gd_spf(D, "polynom"); gd_close(D); unlink(format); diff -Nru libgetdata-0.7.0/test/spf_recip.c libgetdata-0.7.1/test/spf_recip.c --- libgetdata-0.7.0/test/spf_recip.c 2010-10-16 03:17:16.000000000 +0000 +++ libgetdata-0.7.1/test/spf_recip.c 2010-11-28 06:05:28.000000000 +0000 @@ -16,6 +16,8 @@ "in2 RAW UINT8 13\n" "div RECIP in2 3.\n"; int fd, r = 0; + gd_spf_t spf; + DIRFILE *D; mkdir(filedir, 0777); @@ -23,8 +25,8 @@ write(fd, format_data, strlen(format_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - unsigned int spf = gd_spf(D, "div"); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + spf = gd_spf(D, "div"); gd_close(D); unlink(format); diff -Nru libgetdata-0.7.0/test/spf_recurse.c libgetdata-0.7.1/test/spf_recurse.c --- libgetdata-0.7.0/test/spf_recurse.c 2010-10-16 03:17:16.000000000 +0000 +++ libgetdata-0.7.1/test/spf_recurse.c 2010-11-28 06:06:10.000000000 +0000 @@ -16,7 +16,9 @@ const char* format_data = "in1 RAW UINT8 11\n" "lincom LINCOM 2 lincom 1 0 in1 1 0\n"; - int fd, r = 0; + int fd, error, r = 0; + gd_spf_t spf; + DIRFILE *D; mkdir(filedir, 0777); @@ -24,9 +26,9 @@ write(fd, format_data, strlen(format_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY); - unsigned int spf = gd_spf(D, "lincom"); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY); + spf = gd_spf(D, "lincom"); + error = gd_error(D); gd_close(D); unlink(format); diff -Nru libgetdata-0.7.0/test/svlist.c libgetdata-0.7.1/test/svlist.c --- libgetdata-0.7.0/test/svlist.c 2010-10-16 03:17:16.000000000 +0000 +++ libgetdata-0.7.1/test/svlist.c 2010-11-28 06:07:50.000000000 +0000 @@ -19,7 +19,9 @@ "data2 STRING valu2\n" "data3 STRING valu3\n" "data4 CONST UINT8 1\n"; - int fd, i, r = 0; + int fd, i, error, r = 0; + const char **field_list; + DIRFILE *D; mkdir(filedir, 0777); @@ -27,10 +29,10 @@ write(fd, format_data, strlen(format_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - const char** field_list = gd_strings(D); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + field_list = gd_strings(D); - int error = gd_error(D); + error = gd_error(D); CHECKI(error, 0); CHECKPN(field_list); diff -Nru libgetdata-0.7.0/test/svlist_meta.c libgetdata-0.7.1/test/svlist_meta.c --- libgetdata-0.7.0/test/svlist_meta.c 2010-10-16 03:17:16.000000000 +0000 +++ libgetdata-0.7.1/test/svlist_meta.c 2010-11-28 06:08:13.000000000 +0000 @@ -20,7 +20,9 @@ "META parent data2 STRING valu2\n" "META parent data3 STRING valu3\n" "META parent data4 CONST UINT8 1\n"; - int fd, i, r = 0; + int fd, i, error, r = 0; + const char **field_list; + DIRFILE *D; mkdir(filedir, 0777); @@ -28,13 +30,13 @@ write(fd, format_data, strlen(format_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); gd_nfields(D); gd_nmfields(D, "parent"); gd_nmfields_by_type(D, "parent", GD_STRING_ENTRY); - const char** field_list = gd_mstrings(D, "parent"); + field_list = gd_mstrings(D, "parent"); - int error = gd_error(D); + error = gd_error(D); CHECKI(error, 0); CHECKPN(field_list); diff -Nru libgetdata-0.7.0/test/trunc.c libgetdata-0.7.1/test/trunc.c --- libgetdata-0.7.0/test/trunc.c 2010-10-16 03:17:16.000000000 +0000 +++ libgetdata-0.7.1/test/trunc.c 2010-11-28 06:08:49.000000000 +0000 @@ -14,8 +14,9 @@ const char* filedir = __TEST__ "dirfile"; const char* format = __TEST__ "dirfile/format"; const char* data = __TEST__ "dirfile/data"; - int fd, r = 0; + int fd, error, unlink_data, stat_format, r = 0; struct stat buf; + DIRFILE *D; mkdir(filedir, 0777); @@ -25,14 +26,14 @@ close(open(data, O_CREAT | O_EXCL | O_WRONLY | O_BINARY, 0666)); - DIRFILE* D = gd_open(filedir, GD_RDWR | GD_TRUNC | GD_VERBOSE); - int error = gd_error(D); + D = gd_open(filedir, GD_RDWR | GD_TRUNC | GD_VERBOSE); + error = gd_error(D); gd_close(D); - int unlink_data = unlink(data); + unlink_data = unlink(data); CHECKI(unlink_data, -1); - int stat_format = stat(format, &buf); + stat_format = stat(format, &buf); CHECKI(stat_format, 0); CHECK((buf.st_size > 0),buf.st_size,"%lli","%s",(long long)buf.st_size,"> 0"); diff -Nru libgetdata-0.7.0/test/trunc_rdonly.c libgetdata-0.7.1/test/trunc_rdonly.c --- libgetdata-0.7.0/test/trunc_rdonly.c 2010-10-16 03:17:16.000000000 +0000 +++ libgetdata-0.7.1/test/trunc_rdonly.c 2010-11-28 06:09:00.000000000 +0000 @@ -14,7 +14,8 @@ const char* filedir = __TEST__ "dirfile"; const char* format = __TEST__ "dirfile/format"; const char* data = __TEST__ "dirfile/data"; - int fd, r = 0; + int fd, error, unlink_data, r = 0; + DIRFILE *D; mkdir(filedir, 0777); @@ -24,11 +25,11 @@ close(open(data, O_CREAT | O_EXCL | O_WRONLY | O_BINARY, 0666)); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_TRUNC); - int error = gd_error(D); + D = gd_open(filedir, GD_RDONLY | GD_TRUNC); + error = gd_error(D); gd_close(D); - int unlink_data = unlink(data); + unlink_data = unlink(data); CHECKI(unlink_data, 0); unlink(format); diff -Nru libgetdata-0.7.0/test/trunc_rofs.c libgetdata-0.7.1/test/trunc_rofs.c --- libgetdata-0.7.0/test/trunc_rofs.c 2010-10-16 03:17:16.000000000 +0000 +++ libgetdata-0.7.1/test/trunc_rofs.c 2010-11-28 06:09:23.000000000 +0000 @@ -13,7 +13,8 @@ { const char* filedir = __TEST__ "dirfile"; const char* format = __TEST__ "dirfile/format"; - int r = 0; + int error, r = 0; + DIRFILE *D; mkdir(filedir, 0777); close(open(format, O_CREAT | O_EXCL | O_WRONLY, 0666)); @@ -25,13 +26,14 @@ return 77; } - DIRFILE* D = gd_open(filedir, GD_RDWR | GD_TRUNC); + D = gd_open(filedir, GD_RDWR | GD_TRUNC); + error = gd_error(D); + gd_discard(D); chmod(filedir, 0777); unlink(format); rmdir(filedir); - int error = gd_error(D); CHECKI(error, GD_E_TRUNC); return r; } diff -Nru libgetdata-0.7.0/test/unclude.c libgetdata-0.7.1/test/unclude.c --- libgetdata-0.7.0/test/unclude.c 2010-10-16 03:17:16.000000000 +0000 +++ libgetdata-0.7.1/test/unclude.c 2010-11-28 06:10:24.000000000 +0000 @@ -19,7 +19,9 @@ const char* format_data = "/INCLUDE format1\na CONST UINT8 1\n"; const char* format1_data = "b CONST UINT8 11\n/INCLUDE format2\n"; const char* format2_data = "c CONST UINT8 11\n"; - int fd, r = 0; + int fd, ret, error, unlink_format1, unlink_format2, r = 0; + unsigned int nfields, nfragments; + DIRFILE *D; mkdir(filedir, 0777); @@ -35,15 +37,15 @@ write(fd, format2_data, strlen(format2_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDWR | GD_VERBOSE); - int ret = gd_uninclude(D, 1, 0); - int error = gd_error(D); - unsigned int nfields = gd_nfields(D); - unsigned int nfragments = gd_nfragments(D); + D = gd_open(filedir, GD_RDWR | GD_VERBOSE); + ret = gd_uninclude(D, 1, 0); + error = gd_error(D); + nfields = gd_nfields(D); + nfragments = gd_nfragments(D); gd_close(D); - int unlink_format2 = unlink(format2); - int unlink_format1 = unlink(format1); + unlink_format2 = unlink(format2); + unlink_format1 = unlink(format1); unlink(format); rmdir(filedir); diff -Nru libgetdata-0.7.0/test/unclude_del.c libgetdata-0.7.1/test/unclude_del.c --- libgetdata-0.7.0/test/unclude_del.c 2010-10-16 03:17:16.000000000 +0000 +++ libgetdata-0.7.1/test/unclude_del.c 2010-11-28 06:10:58.000000000 +0000 @@ -19,7 +19,9 @@ const char* format_data = "/INCLUDE format1\na CONST UINT8 1\n"; const char* format1_data = "b CONST UINT8 11\n/INCLUDE format2\n"; const char* format2_data = "c CONST UINT8 11\n"; - int fd, r = 0; + int fd, ret, error, unlink_format1, unlink_format2, r = 0; + unsigned int nfields, nfragments; + DIRFILE *D; mkdir(filedir, 0777); @@ -35,15 +37,15 @@ write(fd, format2_data, strlen(format2_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDWR | GD_VERBOSE); - int ret = gd_uninclude(D, 2, 1); - int error = gd_error(D); - unsigned int nfields = gd_nfields(D); - unsigned int nfragments = gd_nfragments(D); + D = gd_open(filedir, GD_RDWR | GD_VERBOSE); + ret = gd_uninclude(D, 2, 1); + error = gd_error(D); + nfields = gd_nfields(D); + nfragments = gd_nfragments(D); gd_close(D); - int unlink_format2 = unlink(format2); - int unlink_format1 = unlink(format1); + unlink_format2 = unlink(format2); + unlink_format1 = unlink(format1); unlink(format); rmdir(filedir); diff -Nru libgetdata-0.7.0/test/unclude_move.c libgetdata-0.7.1/test/unclude_move.c --- libgetdata-0.7.0/test/unclude_move.c 2010-10-16 03:17:16.000000000 +0000 +++ libgetdata-0.7.1/test/unclude_move.c 2010-11-28 06:12:35.000000000 +0000 @@ -19,7 +19,9 @@ const char* format_data = "/INCLUDE format1\na CONST UINT8 1\n"; const char* format1_data = "b CONST UINT8 11\n/INCLUDE format2\n"; const char* format2_data = "c CONST UINT8 11\n"; - int fd, r = 0; + int fd, ret1, ret2, error1, error2, r = 0; + unsigned int nfields, nfragments; + DIRFILE *D; mkdir(filedir, 0777); @@ -35,13 +37,13 @@ write(fd, format2_data, strlen(format2_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDWR | GD_VERBOSE); - int ret1 = gd_uninclude(D, 2, 0); - int error1 = gd_error(D); - int ret2 = gd_include(D, "format2", 0, 0); - int error2 = gd_error(D); - unsigned int nfields = gd_nfields(D); - unsigned int nfragments = gd_nfragments(D); + D = gd_open(filedir, GD_RDWR | GD_VERBOSE); + ret1 = gd_uninclude(D, 2, 0); + error1 = gd_error(D); + ret2 = gd_include(D, "format2", 0, 0); + error2 = gd_error(D); + nfields = gd_nfields(D); + nfragments = gd_nfragments(D); gd_close(D); unlink(format2); diff -Nru libgetdata-0.7.0/test/version_0.c libgetdata-0.7.1/test/version_0.c --- libgetdata-0.7.0/test/version_0.c 2010-10-16 03:17:16.000000000 +0000 +++ libgetdata-0.7.1/test/version_0.c 2010-11-28 06:13:26.000000000 +0000 @@ -18,7 +18,8 @@ const char* format_data = "FRAMEOFFSET RAW c 8\na&b RAW c 8"; unsigned char c[8]; unsigned char data_data[256]; - int fd, i, r = 0; + int fd, i, n, error, v, l, e, r = 0; + DIRFILE *D; memset(c, 0, 8); mkdir(filedir, 0777); @@ -34,13 +35,13 @@ write(fd, data_data, 256); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int n = gd_getdata(D, "FRAMEOFFSET", 5, 0, 1, 0, GD_UINT8, c); - int error = gd_error(D); - - int v = gd_dirfile_standards(D, GD_VERSION_CURRENT); - int l = gd_dirfile_standards(D, GD_VERSION_LATEST); - int e = gd_dirfile_standards(D, GD_VERSION_EARLIEST); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + n = gd_getdata(D, "FRAMEOFFSET", 5, 0, 1, 0, GD_UINT8, c); + error = gd_error(D); + + v = gd_dirfile_standards(D, GD_VERSION_CURRENT); + l = gd_dirfile_standards(D, GD_VERSION_LATEST); + e = gd_dirfile_standards(D, GD_VERSION_EARLIEST); gd_close(D); diff -Nru libgetdata-0.7.0/test/version_0_write.c libgetdata-0.7.1/test/version_0_write.c --- libgetdata-0.7.0/test/version_0_write.c 2010-10-16 03:17:16.000000000 +0000 +++ libgetdata-0.7.1/test/version_0_write.c 2010-11-28 06:14:05.000000000 +0000 @@ -14,7 +14,8 @@ const char* filedir = __TEST__ "dirfile"; const char* format = __TEST__ "dirfile/format"; const char* format_data = "FRAMEOFFSET RAW c 8\na&b RAW c 8"; - int fd, r = 0; + int fd, e, q, c, r = 0; + DIRFILE *D; mkdir(filedir, 0777); @@ -22,13 +23,13 @@ write(fd, format_data, strlen(format_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDWR | GD_VERBOSE); - int e = gd_dirfile_standards(D, 0); - int q = gd_rewrite_fragment(D, 0); + D = gd_open(filedir, GD_RDWR | GD_VERBOSE); + e = gd_dirfile_standards(D, 0); + q = gd_rewrite_fragment(D, 0); gd_close(D); D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int c = gd_dirfile_standards(D, GD_VERSION_CURRENT); + c = gd_dirfile_standards(D, GD_VERSION_CURRENT); gd_close(D); unlink(format); diff -Nru libgetdata-0.7.0/test/version_1.c libgetdata-0.7.1/test/version_1.c --- libgetdata-0.7.0/test/version_1.c 2010-10-16 03:17:16.000000000 +0000 +++ libgetdata-0.7.1/test/version_1.c 2010-11-28 06:14:19.000000000 +0000 @@ -18,7 +18,8 @@ const char* format_data = "INCLUDE RAW c 8\nFRAMEOFFSET 1\na&b RAW c 8\n"; unsigned char c[8]; unsigned char data_data[256]; - int fd, i, r = 0; + int fd, i, n, error, v, l, e, r = 0; + DIRFILE *D; memset(c, 0, 8); mkdir(filedir, 0777); @@ -34,13 +35,13 @@ write(fd, data_data, 256); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int n = gd_getdata(D, "INCLUDE", 5, 0, 1, 0, GD_UINT8, c); - int error = gd_error(D); - - int v = gd_dirfile_standards(D, GD_VERSION_CURRENT); - int l = gd_dirfile_standards(D, GD_VERSION_LATEST); - int e = gd_dirfile_standards(D, GD_VERSION_EARLIEST); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + n = gd_getdata(D, "INCLUDE", 5, 0, 1, 0, GD_UINT8, c); + error = gd_error(D); + + v = gd_dirfile_standards(D, GD_VERSION_CURRENT); + l = gd_dirfile_standards(D, GD_VERSION_LATEST); + e = gd_dirfile_standards(D, GD_VERSION_EARLIEST); gd_close(D); diff -Nru libgetdata-0.7.0/test/version_1_write.c libgetdata-0.7.1/test/version_1_write.c --- libgetdata-0.7.0/test/version_1_write.c 2010-10-16 03:17:16.000000000 +0000 +++ libgetdata-0.7.1/test/version_1_write.c 2010-11-28 06:14:35.000000000 +0000 @@ -14,7 +14,8 @@ const char* filedir = __TEST__ "dirfile"; const char* format = __TEST__ "dirfile/format"; const char* format_data = "INCLUDE RAW c 8\nFRAMEOFFSET 1\na&b RAW c 8\n"; - int fd, r = 0; + int fd, e, q, c, r = 0; + DIRFILE *D; mkdir(filedir, 0777); @@ -22,13 +23,13 @@ write(fd, format_data, strlen(format_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDWR | GD_VERBOSE); - int e = gd_dirfile_standards(D, 1); - int q = gd_rewrite_fragment(D, 0); + D = gd_open(filedir, GD_RDWR | GD_VERBOSE); + e = gd_dirfile_standards(D, 1); + q = gd_rewrite_fragment(D, 0); gd_close(D); D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int c = gd_dirfile_standards(D, GD_VERSION_EARLIEST); + c = gd_dirfile_standards(D, GD_VERSION_EARLIEST); gd_close(D); unlink(format); diff -Nru libgetdata-0.7.0/test/version_2.c libgetdata-0.7.1/test/version_2.c --- libgetdata-0.7.0/test/version_2.c 2010-10-16 03:17:16.000000000 +0000 +++ libgetdata-0.7.1/test/version_2.c 2010-11-28 06:14:44.000000000 +0000 @@ -21,7 +21,8 @@ "m MULTIPLY INCLUDE INCLUDE\n"; uint16_t c[8]; unsigned char data_data[256]; - int fd, i, r = 0; + int fd, i, n, error, v, l, e, r = 0; + DIRFILE *D; memset(c, 0, 8); mkdir(filedir, 0777); @@ -37,13 +38,13 @@ write(fd, data_data, 256); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int n = gd_getdata(D, "m", 5, 0, 1, 0, GD_UINT16, c); - int error = gd_error(D); - - int v = gd_dirfile_standards(D, GD_VERSION_CURRENT); - int l = gd_dirfile_standards(D, GD_VERSION_LATEST); - int e = gd_dirfile_standards(D, GD_VERSION_EARLIEST); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + n = gd_getdata(D, "m", 5, 0, 1, 0, GD_UINT16, c); + error = gd_error(D); + + v = gd_dirfile_standards(D, GD_VERSION_CURRENT); + l = gd_dirfile_standards(D, GD_VERSION_LATEST); + e = gd_dirfile_standards(D, GD_VERSION_EARLIEST); gd_close(D); diff -Nru libgetdata-0.7.0/test/version_2_write.c libgetdata-0.7.1/test/version_2_write.c --- libgetdata-0.7.0/test/version_2_write.c 2010-10-16 03:17:16.000000000 +0000 +++ libgetdata-0.7.1/test/version_2_write.c 2010-11-28 06:14:53.000000000 +0000 @@ -17,7 +17,8 @@ "INCLUDE RAW c 8\n" "a&b RAW c 8\n" "m MULTIPLY INCLUDE INCLUDE\n"; - int fd, r = 0; + int fd, e, q, c, r = 0; + DIRFILE *D; mkdir(filedir, 0777); @@ -25,13 +26,13 @@ write(fd, format_data, strlen(format_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDWR | GD_VERBOSE); - int e = gd_dirfile_standards(D, 2); - int q = gd_rewrite_fragment(D, 0); + D = gd_open(filedir, GD_RDWR | GD_VERBOSE); + e = gd_dirfile_standards(D, 2); + q = gd_rewrite_fragment(D, 0); gd_close(D); D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int c = gd_dirfile_standards(D, GD_VERSION_EARLIEST); + c = gd_dirfile_standards(D, GD_VERSION_EARLIEST); gd_close(D); unlink(format); diff -Nru libgetdata-0.7.0/test/version_3.c libgetdata-0.7.1/test/version_3.c --- libgetdata-0.7.0/test/version_3.c 2010-10-16 03:17:16.000000000 +0000 +++ libgetdata-0.7.1/test/version_3.c 2010-11-28 06:15:07.000000000 +0000 @@ -20,7 +20,8 @@ const char* format_data1 = "m MULTIPLY ENDIAN ENDIAN\na&b RAW c 8\n"; uint16_t c[8]; unsigned char data_data[256]; - int fd, i, r = 0; + int fd, i, n, error, v, l, e, r = 0; + DIRFILE *D; memset(c, 0, 8); mkdir(filedir, 0777); @@ -40,13 +41,13 @@ write(fd, data_data, 256); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int n = gd_getdata(D, "m", 5, 0, 1, 0, GD_UINT16, c); - int error = gd_error(D); - - int v = gd_dirfile_standards(D, GD_VERSION_CURRENT); - int l = gd_dirfile_standards(D, GD_VERSION_LATEST); - int e = gd_dirfile_standards(D, GD_VERSION_EARLIEST); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + n = gd_getdata(D, "m", 5, 0, 1, 0, GD_UINT16, c); + error = gd_error(D); + + v = gd_dirfile_standards(D, GD_VERSION_CURRENT); + l = gd_dirfile_standards(D, GD_VERSION_LATEST); + e = gd_dirfile_standards(D, GD_VERSION_EARLIEST); gd_close(D); diff -Nru libgetdata-0.7.0/test/version_3_write.c libgetdata-0.7.1/test/version_3_write.c --- libgetdata-0.7.0/test/version_3_write.c 2010-10-16 03:17:16.000000000 +0000 +++ libgetdata-0.7.1/test/version_3_write.c 2010-11-28 06:18:11.000000000 +0000 @@ -16,7 +16,8 @@ const char* format1 = __TEST__ "dirfile/RAW"; const char* format_data = "ENDIAN RAW c 8\nINCLUDE RAW\n"; const char* format_data1 = "m MULTIPLY ENDIAN ENDIAN\na&b RAW c 8\n"; - int fd, r = 0; + int fd, e, q, c, r = 0; + DIRFILE *D; mkdir(filedir, 0777); @@ -28,13 +29,13 @@ write(fd, format_data1, strlen(format_data1)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDWR | GD_VERBOSE); - int e = gd_dirfile_standards(D, 3); - int q = gd_rewrite_fragment(D, GD_ALL_FRAGMENTS); + D = gd_open(filedir, GD_RDWR | GD_VERBOSE); + e = gd_dirfile_standards(D, 3); + q = gd_rewrite_fragment(D, GD_ALL_FRAGMENTS); gd_close(D); D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int c = gd_dirfile_standards(D, GD_VERSION_EARLIEST); + c = gd_dirfile_standards(D, GD_VERSION_EARLIEST); gd_close(D); unlink(format); diff -Nru libgetdata-0.7.0/test/version_4.c libgetdata-0.7.1/test/version_4.c --- libgetdata-0.7.0/test/version_4.c 2010-10-16 03:17:16.000000000 +0000 +++ libgetdata-0.7.1/test/version_4.c 2010-11-28 06:18:46.000000000 +0000 @@ -20,7 +20,8 @@ const char* format_data1 = "VERSION PHASE ENDIAN 1\na&b RAW c 8\n"; uint16_t c[8]; unsigned char data_data[256]; - int fd, i, r = 0; + int fd, i, n, error, v, l, e, r = 0; + DIRFILE *D; memset(c, 0, 8); mkdir(filedir, 0777); @@ -40,13 +41,13 @@ write(fd, data_data, 256); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int n = gd_getdata(D, "VERSION", 5, 0, 1, 0, GD_UINT16, c); - int error = gd_error(D); - - int v = gd_dirfile_standards(D, GD_VERSION_CURRENT); - int l = gd_dirfile_standards(D, GD_VERSION_LATEST); - int e = gd_dirfile_standards(D, GD_VERSION_EARLIEST); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + n = gd_getdata(D, "VERSION", 5, 0, 1, 0, GD_UINT16, c); + error = gd_error(D); + + v = gd_dirfile_standards(D, GD_VERSION_CURRENT); + l = gd_dirfile_standards(D, GD_VERSION_LATEST); + e = gd_dirfile_standards(D, GD_VERSION_EARLIEST); gd_close(D); diff -Nru libgetdata-0.7.0/test/version_4_write.c libgetdata-0.7.1/test/version_4_write.c --- libgetdata-0.7.0/test/version_4_write.c 2010-10-16 03:17:16.000000000 +0000 +++ libgetdata-0.7.1/test/version_4_write.c 2010-11-28 06:18:55.000000000 +0000 @@ -16,7 +16,8 @@ const char* format1 = __TEST__ "dirfile/RAW"; const char* format_data = "ENDIAN RAW c 8\nINCLUDE RAW\n"; const char* format_data1 = "VERSION PHASE ENDIAN 1\na&b RAW c 8\n"; - int fd, r = 0; + int fd, e, q, c, r = 0; + DIRFILE *D; mkdir(filedir, 0777); @@ -28,13 +29,13 @@ write(fd, format_data1, strlen(format_data1)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDWR | GD_VERBOSE); - int e = gd_dirfile_standards(D, 4); - int q = gd_rewrite_fragment(D, GD_ALL_FRAGMENTS); + D = gd_open(filedir, GD_RDWR | GD_VERBOSE); + e = gd_dirfile_standards(D, 4); + q = gd_rewrite_fragment(D, GD_ALL_FRAGMENTS); gd_close(D); D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int c = gd_dirfile_standards(D, GD_VERSION_EARLIEST); + c = gd_dirfile_standards(D, GD_VERSION_EARLIEST); gd_close(D); unlink(format); diff -Nru libgetdata-0.7.0/test/version_5.c libgetdata-0.7.1/test/version_5.c --- libgetdata-0.7.0/test/version_5.c 2010-10-20 00:21:22.000000000 +0000 +++ libgetdata-0.7.1/test/version_5.c 2010-11-28 06:19:03.000000000 +0000 @@ -26,7 +26,8 @@ "ENCODING PHASE a.r 0\n"; uint16_t c[8]; unsigned char data_data[256]; - int fd, i, r = 0; + int fd, i, n, error, v, l, e, r = 0; + DIRFILE *D; memset(c, 0, 8); mkdir(filedir, 0777); @@ -42,13 +43,13 @@ write(fd, data_data, 256); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int n = gd_getdata(D, "a.r", 5, 0, 1, 0, GD_UINT16, c); - int error = gd_error(D); - - int v = gd_dirfile_standards(D, GD_VERSION_CURRENT); - int l = gd_dirfile_standards(D, GD_VERSION_LATEST); - int e = gd_dirfile_standards(D, GD_VERSION_EARLIEST); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + n = gd_getdata(D, "a.r", 5, 0, 1, 0, GD_UINT16, c); + error = gd_error(D); + + v = gd_dirfile_standards(D, GD_VERSION_CURRENT); + l = gd_dirfile_standards(D, GD_VERSION_LATEST); + e = gd_dirfile_standards(D, GD_VERSION_EARLIEST); gd_close(D); diff -Nru libgetdata-0.7.0/test/version_5_strict.c libgetdata-0.7.1/test/version_5_strict.c --- libgetdata-0.7.0/test/version_5_strict.c 2010-10-16 03:17:16.000000000 +0000 +++ libgetdata-0.7.1/test/version_5_strict.c 2010-11-28 06:20:09.000000000 +0000 @@ -33,7 +33,8 @@ int ll[7] = {0, 0, 0, 0, 0, 0, 0}; uint16_t d[8]; unsigned char data_data[256]; - int fd, i, r = 0; + int fd, n, error, m, error2, i, r = 0; + DIRFILE *D; memset(c, 0, 8); mkdir(filedir, 0777); @@ -49,12 +50,12 @@ write(fd, data_data, 256); close(fd); - DIRFILE* D = gd_cbopen(filedir, GD_RDONLY | GD_PEDANTIC, cb, ll); - int n = gd_getdata(D, "ar", 5, 0, 1, 0, GD_UINT16, c); - int error = gd_error(D); + D = gd_cbopen(filedir, GD_RDONLY | GD_PEDANTIC, cb, ll); + n = gd_getdata(D, "ar", 5, 0, 1, 0, GD_UINT16, c); + error = gd_error(D); - int m = gd_getdata(D, "FILEFRAM", 5, 0, 8, 0, GD_UINT16, d); - int error2 = gd_error(D); + m = gd_getdata(D, "FILEFRAM", 5, 0, 8, 0, GD_UINT16, d); + error2 = gd_error(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/version_5_write.c libgetdata-0.7.1/test/version_5_write.c --- libgetdata-0.7.0/test/version_5_write.c 2010-10-16 03:17:16.000000000 +0000 +++ libgetdata-0.7.1/test/version_5_write.c 2010-11-28 06:26:21.000000000 +0000 @@ -18,7 +18,8 @@ "/ENDIAN big\n" "a.r RAW UINT8 8\n" "ENCODING PHASE a.r 0\n"; - int fd, r = 0; + int fd, e, q, c, r = 0; + DIRFILE *D; mkdir(filedir, 0777); @@ -26,13 +27,13 @@ write(fd, format_data, strlen(format_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDWR | GD_VERBOSE); - int e = gd_dirfile_standards(D, 5); - int q = gd_rewrite_fragment(D, 0); + D = gd_open(filedir, GD_RDWR | GD_VERBOSE); + e = gd_dirfile_standards(D, 5); + q = gd_rewrite_fragment(D, 0); gd_close(D); D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int c = gd_dirfile_standards(D, GD_VERSION_CURRENT); + c = gd_dirfile_standards(D, GD_VERSION_CURRENT); gd_close(D); unlink(format); diff -Nru libgetdata-0.7.0/test/version_6.c libgetdata-0.7.1/test/version_6.c --- libgetdata-0.7.0/test/version_6.c 2010-10-16 03:17:16.000000000 +0000 +++ libgetdata-0.7.1/test/version_6.c 2010-11-28 06:22:41.000000000 +0000 @@ -18,7 +18,8 @@ const char* format_data = "/VERSION 6\na\\#r RAW UINT8 8\n"; uint16_t c[8]; unsigned char data_data[256]; - int fd, i, r = 0; + int fd, i, n, error, v, l, e, r = 0; + DIRFILE *D; memset(c, 0, 8); mkdir(filedir, 0777); @@ -34,13 +35,13 @@ write(fd, data_data, 256); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int n = gd_getdata(D, "a#r", 5, 0, 1, 0, GD_UINT16, c); - int error = gd_error(D); - - int v = gd_dirfile_standards(D, GD_VERSION_CURRENT); - int l = gd_dirfile_standards(D, GD_VERSION_LATEST); - int e = gd_dirfile_standards(D, GD_VERSION_EARLIEST); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + n = gd_getdata(D, "a#r", 5, 0, 1, 0, GD_UINT16, c); + error = gd_error(D); + + v = gd_dirfile_standards(D, GD_VERSION_CURRENT); + l = gd_dirfile_standards(D, GD_VERSION_LATEST); + e = gd_dirfile_standards(D, GD_VERSION_EARLIEST); gd_close(D); diff -Nru libgetdata-0.7.0/test/version_6_strict.c libgetdata-0.7.1/test/version_6_strict.c --- libgetdata-0.7.0/test/version_6_strict.c 2010-10-16 03:17:16.000000000 +0000 +++ libgetdata-0.7.1/test/version_6_strict.c 2010-11-28 06:22:50.000000000 +0000 @@ -36,7 +36,8 @@ int ll[10] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; uint16_t d[8]; unsigned char data_data[256]; - int fd, i, r = 0; + int fd, n, error, m, error2, i, r = 0; + DIRFILE *D; memset(c, 0, 8); mkdir(filedir, 0777); @@ -52,12 +53,12 @@ write(fd, data_data, 256); close(fd); - DIRFILE* D = gd_cbopen(filedir, GD_RDONLY | GD_PEDANTIC, cb, ll); - int n = gd_getdata(D, "ar", 5, 0, 1, 0, GD_UINT16, c); - int error = gd_error(D); + D = gd_cbopen(filedir, GD_RDONLY | GD_PEDANTIC, cb, ll); + n = gd_getdata(D, "ar", 5, 0, 1, 0, GD_UINT16, c); + error = gd_error(D); - int m = gd_getdata(D, "FILEFRAM", 5, 0, 8, 0, GD_UINT16, d); - int error2 = gd_error(D); + m = gd_getdata(D, "FILEFRAM", 5, 0, 8, 0, GD_UINT16, d); + error2 = gd_error(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/version_6_write.c libgetdata-0.7.1/test/version_6_write.c --- libgetdata-0.7.0/test/version_6_write.c 2010-10-16 03:17:16.000000000 +0000 +++ libgetdata-0.7.1/test/version_6_write.c 2010-11-28 06:23:00.000000000 +0000 @@ -14,7 +14,8 @@ const char* filedir = __TEST__ "dirfile"; const char* format = __TEST__ "dirfile/format"; const char* format_data = "/VERSION 6\na\\#r RAW UINT8 8\n"; - int fd, r = 0; + int fd, e, q, c, r = 0; + DIRFILE *D; mkdir(filedir, 0777); @@ -22,13 +23,13 @@ write(fd, format_data, strlen(format_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDWR | GD_VERBOSE); - int e = gd_dirfile_standards(D, 6); - int q = gd_rewrite_fragment(D, 0); + D = gd_open(filedir, GD_RDWR | GD_VERBOSE); + e = gd_dirfile_standards(D, 6); + q = gd_rewrite_fragment(D, 0); gd_close(D); D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int c = gd_dirfile_standards(D, GD_VERSION_CURRENT); + c = gd_dirfile_standards(D, GD_VERSION_CURRENT); gd_close(D); unlink(format); diff -Nru libgetdata-0.7.0/test/version_7.c libgetdata-0.7.1/test/version_7.c --- libgetdata-0.7.0/test/version_7.c 2010-10-16 03:17:16.000000000 +0000 +++ libgetdata-0.7.1/test/version_7.c 2010-11-28 06:23:11.000000000 +0000 @@ -18,7 +18,8 @@ const char* format_data = "/VERSION 7\nar RAW UINT8 8\nar/q SBIT ar 0 10\n"; uint16_t c[8]; unsigned char data_data[256]; - int fd, i, r = 0; + int fd, i, n, error, v, l, e, r = 0; + DIRFILE *D; memset(c, 0, 8); mkdir(filedir, 0777); @@ -34,13 +35,13 @@ write(fd, data_data, 256); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int n = gd_getdata(D, "ar/q", 5, 0, 1, 0, GD_UINT16, c); - int error = gd_error(D); - - int v = gd_dirfile_standards(D, GD_VERSION_CURRENT); - int l = gd_dirfile_standards(D, GD_VERSION_LATEST); - int e = gd_dirfile_standards(D, GD_VERSION_EARLIEST); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + n = gd_getdata(D, "ar/q", 5, 0, 1, 0, GD_UINT16, c); + error = gd_error(D); + + v = gd_dirfile_standards(D, GD_VERSION_CURRENT); + l = gd_dirfile_standards(D, GD_VERSION_LATEST); + e = gd_dirfile_standards(D, GD_VERSION_EARLIEST); gd_close(D); diff -Nru libgetdata-0.7.0/test/version_7_strict.c libgetdata-0.7.1/test/version_7_strict.c --- libgetdata-0.7.0/test/version_7_strict.c 2010-10-16 03:17:16.000000000 +0000 +++ libgetdata-0.7.1/test/version_7_strict.c 2010-11-28 06:23:32.000000000 +0000 @@ -32,7 +32,8 @@ uint16_t c[8]; int ll[7] = {0, 0, 0, 0, 0, 0, 0}; unsigned char data_data[256]; - int fd, i, r = 0; + int fd, i, n, error, r = 0; + DIRFILE *D; memset(c, 0, 8); mkdir(filedir, 0777); @@ -48,9 +49,9 @@ write(fd, data_data, 256); close(fd); - DIRFILE* D = gd_cbopen(filedir, GD_RDONLY | GD_PEDANTIC, cb, ll); - int n = gd_getdata(D, "ar", 5, 0, 1, 0, GD_UINT16, c); - int error = gd_error(D); + D = gd_cbopen(filedir, GD_RDONLY | GD_PEDANTIC, cb, ll); + n = gd_getdata(D, "ar", 5, 0, 1, 0, GD_UINT16, c); + error = gd_error(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/version_7_write.c libgetdata-0.7.1/test/version_7_write.c --- libgetdata-0.7.0/test/version_7_write.c 2010-10-30 20:47:29.000000000 +0000 +++ libgetdata-0.7.1/test/version_7_write.c 2010-11-28 06:23:41.000000000 +0000 @@ -14,7 +14,8 @@ const char* filedir = __TEST__ "dirfile"; const char* format = __TEST__ "dirfile/format"; const char* format_data = "/VERSION 7\nar RAW UINT8 8\nar/q SBIT ar 0 10\n"; - int fd, r = 0; + int fd, e, q, c, r = 0; + DIRFILE *D; mkdir(filedir, 0777); @@ -22,13 +23,13 @@ write(fd, format_data, strlen(format_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDWR | GD_VERBOSE); - int e = gd_dirfile_standards(D, 7); - int q = gd_rewrite_fragment(D, 0); + D = gd_open(filedir, GD_RDWR | GD_VERBOSE); + e = gd_dirfile_standards(D, 7); + q = gd_rewrite_fragment(D, 0); gd_close(D); D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int c = gd_dirfile_standards(D, GD_VERSION_CURRENT); + c = gd_dirfile_standards(D, GD_VERSION_CURRENT); gd_close(D); unlink(format); diff -Nru libgetdata-0.7.0/test/version_8.c libgetdata-0.7.1/test/version_8.c --- libgetdata-0.7.0/test/version_8.c 2010-10-16 03:17:16.000000000 +0000 +++ libgetdata-0.7.1/test/version_8.c 2010-11-28 06:23:52.000000000 +0000 @@ -22,7 +22,8 @@ "r RECIP ar 1.\n"; double c[8]; unsigned char data_data[256]; - int fd, i, r = 0; + int fd, i, n, error, v, l, e, r = 0; + DIRFILE *D; memset(c, 0, 8); mkdir(filedir, 0777); @@ -38,13 +39,13 @@ write(fd, data_data, 256); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int n = gd_getdata(D, "r", 5, 0, 1, 0, GD_FLOAT64, c); - int error = gd_error(D); - - int v = gd_dirfile_standards(D, GD_VERSION_CURRENT); - int l = gd_dirfile_standards(D, GD_VERSION_LATEST); - int e = gd_dirfile_standards(D, GD_VERSION_EARLIEST); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + n = gd_getdata(D, "r", 5, 0, 1, 0, GD_FLOAT64, c); + error = gd_error(D); + + v = gd_dirfile_standards(D, GD_VERSION_CURRENT); + l = gd_dirfile_standards(D, GD_VERSION_LATEST); + e = gd_dirfile_standards(D, GD_VERSION_EARLIEST); gd_close(D); diff -Nru libgetdata-0.7.0/test/version_8_strict.c libgetdata-0.7.1/test/version_8_strict.c --- libgetdata-0.7.0/test/version_8_strict.c 2010-10-16 03:17:16.000000000 +0000 +++ libgetdata-0.7.1/test/version_8_strict.c 2010-11-28 06:24:20.000000000 +0000 @@ -39,7 +39,8 @@ uint16_t c[8]; int ll[NLINES]; unsigned char data_data[256]; - int fd, i, r = 0; + int fd, i, n, error, r = 0; + DIRFILE *D; memset(c, 0, 8); memset(ll, 0, NLINES * sizeof(int)); @@ -56,9 +57,9 @@ write(fd, data_data, 256); close(fd); - DIRFILE* D = gd_cbopen(filedir, GD_RDONLY | GD_PEDANTIC, cb, ll); - int n = gd_getdata(D, "ar", 5, 0, 1, 0, GD_UINT16, c); - int error = gd_error(D); + D = gd_cbopen(filedir, GD_RDONLY | GD_PEDANTIC, cb, ll); + n = gd_getdata(D, "ar", 5, 0, 1, 0, GD_UINT16, c); + error = gd_error(D); gd_close(D); diff -Nru libgetdata-0.7.0/test/version_8_write.c libgetdata-0.7.1/test/version_8_write.c --- libgetdata-0.7.0/test/version_8_write.c 2010-10-16 03:17:16.000000000 +0000 +++ libgetdata-0.7.1/test/version_8_write.c 2010-11-28 06:24:29.000000000 +0000 @@ -18,7 +18,8 @@ "ar RAW UINT8 8\n" "FRAMEOFFSET DIVIDE ar ar\n" "r RECIP ar 1.\n"; - int fd, r = 0; + int fd, e, q, c, r = 0; + DIRFILE *D; mkdir(filedir, 0777); @@ -26,13 +27,13 @@ write(fd, format_data, strlen(format_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDWR | GD_VERBOSE); - int e = gd_dirfile_standards(D, 8); - int q = gd_rewrite_fragment(D, 0); + D = gd_open(filedir, GD_RDWR | GD_VERBOSE); + e = gd_dirfile_standards(D, 8); + q = gd_rewrite_fragment(D, 0); gd_close(D); D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - int c = gd_dirfile_standards(D, GD_VERSION_CURRENT); + c = gd_dirfile_standards(D, GD_VERSION_CURRENT); gd_close(D); unlink(format); diff -Nru libgetdata-0.7.0/test/vlist.c libgetdata-0.7.1/test/vlist.c --- libgetdata-0.7.0/test/vlist.c 2010-10-16 03:17:16.000000000 +0000 +++ libgetdata-0.7.1/test/vlist.c 2010-11-28 06:24:46.000000000 +0000 @@ -19,7 +19,9 @@ "data2 RAW UINT8 1\n" "data3 RAW UINT8 1\n" "data4 CONST UINT8 1\n"; - int fd, i, r = 0; + int fd, i, error, r = 0; + const char **field_list; + DIRFILE *D; mkdir(filedir, 0777); @@ -27,10 +29,10 @@ write(fd, format_data, strlen(format_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - const char** field_list = gd_vector_list(D); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + field_list = gd_vector_list(D); - int error = gd_error(D); + error = gd_error(D); CHECKI(error,0); CHECKPN(field_list); diff -Nru libgetdata-0.7.0/test/vlist_meta.c libgetdata-0.7.1/test/vlist_meta.c --- libgetdata-0.7.0/test/vlist_meta.c 2010-10-16 03:17:16.000000000 +0000 +++ libgetdata-0.7.1/test/vlist_meta.c 2010-11-28 06:25:09.000000000 +0000 @@ -20,7 +20,9 @@ "META parent data2 LINTERP UINT8 1\n" "META parent data3 LINTERP UINT8 1\n" "META parent data4 CONST UINT8 1\n"; - int fd, i, r = 0; + int fd, i, error, r = 0; + const char **field_list; + DIRFILE *D; mkdir(filedir, 0777); @@ -28,10 +30,10 @@ write(fd, format_data, strlen(format_data)); close(fd); - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); - const char** field_list = gd_mvector_list(D, "parent"); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + field_list = gd_mvector_list(D, "parent"); - int error = gd_error(D); + error = gd_error(D); CHECKI(error,0); CHECKPN(field_list); diff -Nru libgetdata-0.7.0/test/xz_get.c libgetdata-0.7.1/test/xz_get.c --- libgetdata-0.7.0/test/xz_get.c 2010-10-16 03:17:16.000000000 +0000 +++ libgetdata-0.7.1/test/xz_get.c 2010-11-28 06:25:34.000000000 +0000 @@ -22,7 +22,8 @@ uint16_t c[8]; char command[4096]; uint16_t data_data[256]; - int fd, r = 0; + int fd, i, n, error, r = 0; + DIRFILE *D; memset(c, 0, 8); mkdir(filedir, 0777); @@ -44,12 +45,12 @@ return 1; #ifdef USE_LZMA - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); #else - DIRFILE* D = gd_open(filedir, GD_RDONLY); + D = gd_open(filedir, GD_RDONLY); #endif - int n = gd_getdata(D, "data", 5, 0, 1, 0, GD_UINT16, c); - int error = gd_error(D); + n = gd_getdata(D, "data", 5, 0, 1, 0, GD_UINT16, c); + error = gd_error(D); gd_close(D); @@ -58,8 +59,6 @@ rmdir(filedir); #ifdef USE_LZMA - int i; - CHECKI(error,0); CHECKI(n,8); for (i = 0; i < 8; ++i) diff -Nru libgetdata-0.7.0/test/xz_nframes.c libgetdata-0.7.1/test/xz_nframes.c --- libgetdata-0.7.0/test/xz_nframes.c 2010-10-16 03:17:16.000000000 +0000 +++ libgetdata-0.7.1/test/xz_nframes.c 2010-11-28 06:25:55.000000000 +0000 @@ -20,7 +20,9 @@ const char* format_data = "data RAW UINT16 1\n"; char command[4096]; uint16_t data_data[256]; - int i, r = 0; + int i, error, r = 0; + DIRFILE *D; + size_t n; mkdir(filedir, 0777); @@ -41,12 +43,12 @@ return 1; #ifdef USE_LZMA - DIRFILE* D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); #else - DIRFILE* D = gd_open(filedir, GD_RDONLY); + D = gd_open(filedir, GD_RDONLY); #endif - size_t n = gd_nframes(D); - int error = gd_error(D); + n = gd_nframes(D); + error = gd_error(D); gd_close(D); unlink(xzdata); diff -Nru libgetdata-0.7.0/util/dirfile2ascii.c libgetdata-0.7.1/util/dirfile2ascii.c --- libgetdata-0.7.0/util/dirfile2ascii.c 2010-09-13 21:20:41.000000000 +0000 +++ libgetdata-0.7.1/util/dirfile2ascii.c 2010-11-30 01:47:58.000000000 +0000 @@ -32,6 +32,7 @@ #include #include #include +#include "nan.h" #include "getdata.h" #ifndef HAVE_OFF64_T @@ -53,6 +54,7 @@ uint64_t *u64; } u; char format[F_LEN]; + size_t n_read; }; void version(void) @@ -100,7 +102,8 @@ " If not specified, F = 0 is assumed.\n" " -n, --num-frames=N read at most N frames. If not specified, or " "if N = 0,\n" - " all frames to the end-of-field are read.\n" + " all frames to the end of the dirfile are " + "read.\n" " -p, --precision=FMT use FMT to format output. FMT may contain any " "of the\n" " flag characters, a field width, and/or a " @@ -113,7 +116,15 @@ " default).\n" " -s, --skip=S if S > 0, output only one sample for every S " "frames.\n" - " -v, --verbose write verbosely to standard error.\n\n" + " -v, --verbose write verbosely to standard error.\n" + " -z, --fill=STRING print STRING to fill up columns which run past " + "the end\n" + " of their corresponding field. The default " + "is to\n" + " fill floating point columns with \"NaN\" and " + "integer\n" + " columns with \"0\" (without quotation marks)." + "\n\n" "Any number of fields may be specified. Each specified field is printed " "in a\n" @@ -142,35 +153,40 @@ char *tmp; char *delimiter = " "; char *precision = ""; + char *zero = NULL; char *dirfile_name = NULL; DIRFILE *dirfile; size_t nf = 0; off64_t ff = 0; - size_t n_read, n_want; + size_t n_want; + gd_spf_t j; gd_spf_t max_spf = 0; gd_spf_t min_spf = UINT16_MAX; - int c; - int numfields = -1; + int c, i; + int numfields = 0; struct field fields[BUF_LEN]; int verbose = 0; int interpolate = 0; size_t skip = 0; int skipping = 0; + size_t k, z; int average = 0; int optind = 0; + const double NaN = NAN; const struct option longopts[] = { #if 0 { "boxcar", 0, NULL, 'b' }, #endif { "delimieter", 1, NULL, 'd' }, - { "help", 0, NULL, '?' }, + { "fill", 1, NULL, 'z' }, { "first-frame", 1, NULL, 'f' }, + { "help", 0, NULL, '?' }, { "num-frames", 1, NULL, 'n' }, { "precision", 1, NULL, 'p' }, { "quiet", 0, NULL, 'q' }, { "skip", 1, NULL, 's' }, { "verbose", 0, NULL, 'v' }, - { "version", 0, NULL, 2 } + { "version", 0, NULL, 2 } }; /* handy things to know about conversion specifiers */ @@ -209,12 +225,11 @@ type_data[(int)'X'].f = PRIX64; while ((c = getopt_long(argc, argv, - "-f:n:d:x:X:g:G:e:E:a:A:F:i:o:p:s:bvqh?", longopts, &optind)) != -1) + "-f:n:d:x:X:g:G:e:E:a:A:F:i:o:p:s:u:z:bvqh?", longopts, &optind)) != -1) { switch (c) { case 1: /* The case of no option */ - if (numfields == -1) { /* This is the dirfile */ - numfields = 0; + if (dirfile_name == NULL) { dirfile_name = optarg; } else { /* Standard output field */ if (numfields > BUF_LEN) { @@ -278,6 +293,9 @@ case 's': skip = strtoll(optarg, NULL, 0); break; + case 'z': + zero = optarg; + break; case 'b': average = 1; fprintf(stderr, "Warning: Ignoring -b found on command line.\n"); @@ -290,6 +308,11 @@ } } + if (dirfile_name == NULL) { + fprintf(stderr, "Error: No dirfile specified.\n"); + exit(-4); + } + if (numfields < 1) { fprintf(stderr, "Error: At least one field must be specified.\n"); exit(-3); @@ -301,7 +324,6 @@ ff = 0; } - size_t z; for (z = 0; z < strlen(precision); z++) { if (strchr(VALID_PRECISION_CHARS, precision[z]) == NULL) { fprintf(stderr, @@ -345,7 +367,6 @@ } /* Get spfs and sanity checks for all fields */ - int i; for (i = 0; i < numfields; i++) { fields[i].spf = gd_spf(dirfile, fields[i].name); if (gd_error(dirfile)) { @@ -355,7 +376,7 @@ exit(3); } - if (!max_spf && fields[i].spf != max_spf) + if (max_spf && fields[i].spf != max_spf) interpolate = 1; if (fields[i].spf > max_spf) @@ -389,8 +410,8 @@ exit(4); } - n_read = gd_getdata(dirfile, fields[i].name, ff, 0, nf, 0, GD_FLOAT64, - fields[i].u.dbl); + fields[i].n_read = gd_getdata(dirfile, fields[i].name, ff, 0, nf, 0, + GD_FLOAT64, fields[i].u.dbl); } else if (type_data[fields[i].type].t == READ_AS_INT) { fields[i].u.i64 = (int64_t *)malloc(sizeof(int64_t) * n_want); if (fields[i].u.i64 == NULL) { @@ -398,8 +419,8 @@ gd_close(dirfile); exit(4); } - n_read = gd_getdata(dirfile, fields[i].name, ff, 0, nf, 0, GD_INT64, - fields[i].u.i64); + fields[i].n_read = gd_getdata(dirfile, fields[i].name, ff, 0, nf, 0, + GD_INT64, fields[i].u.i64); } else { fields[i].u.u64 = (uint64_t *)malloc(sizeof(uint64_t) * n_want); if (fields[i].u.u64 == NULL) { @@ -407,8 +428,8 @@ gd_close(dirfile); exit(4); } - n_read = gd_getdata(dirfile, fields[i].name, ff, 0, nf, 0, GD_UINT64, - fields[i].u.u64); + fields[i].n_read = gd_getdata(dirfile, fields[i].name, ff, 0, nf, 0, + GD_UINT64, fields[i].u.u64); } if (gd_error(dirfile)) { @@ -416,6 +437,20 @@ char_buffer, BUF_LEN)); gd_close(dirfile); exit(5); + } else if (!zero && n_want > fields[i].n_read) { + if (verbose) + fprintf(stderr, "Short read on field %i, padding %zu frames\n", + i, n_want - fields[i].n_read); + if (type_data[fields[i].type].t == READ_AS_DOUBLE) { + for (k = fields[i].n_read; k < n_want; ++k) + fields[i].u.dbl[k] = NaN; + } else if (type_data[fields[i].type].t == READ_AS_INT) { + memset(fields[i].u.i64 + fields[i].n_read, 0, + (n_want - fields[i].n_read) * sizeof(int64_t)); + } else { + memset(fields[i].u.u64 + fields[i].n_read, 0, + (n_want - fields[i].n_read) * sizeof(uint64_t)); + } } } @@ -424,13 +459,13 @@ snprintf(fields[i].format, F_LEN, "%%%s%s", precision, type_data[fields[i].type].f); - size_t k; - gd_spf_t j; for (k = 0; k < nf; k += skip) { for (j = 0; j < (skipping ? 1 : max_spf); j++) { for (i = 0; i < numfields; i++) { if (fields[i].spf == max_spf || skipping) { - if (type_data[fields[i].type].t == READ_AS_DOUBLE) + if (zero && k * fields[i].spf + j >= fields[i].n_read) + printf("%s", zero); + else if (type_data[fields[i].type].t == READ_AS_DOUBLE) printf(fields[i].format, fields[i].u.dbl[k * fields[i].spf + j]); else if (type_data[fields[i].type].t == READ_AS_INT) printf(fields[i].format, fields[i].u.i64[k * fields[i].spf + j]); @@ -456,7 +491,9 @@ else offset = 0; - if (type_data[fields[i].type].t == READ_AS_DOUBLE) { + if (zero && k * fields[i].spf + j >= fields[i].n_read) { + printf("%s", zero); + } else if (type_data[fields[i].type].t == READ_AS_DOUBLE) { slope = (fields[i].u.dbl[k * fields[i].spf + next_samp - offset] - fields[i].u.dbl[k * fields[i].spf + prev_samp - offset]) / ((double)next_samp - (double)prev_samp); diff -Nru libgetdata-0.7.0/util/Makefile.in libgetdata-0.7.1/util/Makefile.in --- libgetdata-0.7.0/util/Makefile.in 2010-11-23 00:33:34.000000000 +0000 +++ libgetdata-0.7.1/util/Makefile.in 2010-12-06 23:08:43.000000000 +0000 @@ -105,6 +105,7 @@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DIFF = @DIFF@ +DLLTOOL = @DLLTOOL@ DL_LIBRARY_PATH = @DL_LIBRARY_PATH@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ @@ -150,6 +151,7 @@ LZMA_CPPFLAGS = @LZMA_CPPFLAGS@ LZMA_LDFLAGS = @LZMA_LDFLAGS@ MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ @@ -184,6 +186,7 @@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ absolute_docdir = @absolute_docdir@ +ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ @@ -220,7 +223,6 @@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@