diff options
-rw-r--r-- | src/Makefile | 15 | ||||
-rw-r--r-- | src/Makefile.osx | 34 | ||||
-rw-r--r-- | src/ivy-glib.pc.in | 6 | ||||
-rw-r--r-- | src/version.h | 2 | ||||
-rw-r--r-- | tools/ivyprobe.c | 37 | ||||
-rw-r--r-- | tools/ivythroughput.cpp | 37 |
6 files changed, 49 insertions, 82 deletions
diff --git a/src/Makefile b/src/Makefile index a2b8298..193ffc8 100644 --- a/src/Makefile +++ b/src/Makefile @@ -17,7 +17,7 @@ # change this in version.h too !!!! MAJOR=3 -MINOR=14 +MINOR=15 PERHAPS64 := $(shell getconf LONG_BIT | perl -ne "print /64/ ? '64' : '';") LIB = /lib$(PERHAPS64) @@ -241,8 +241,7 @@ libtclivy.so.$(MAJOR).$(MINOR): $(TCLOBJ) distclean: clean clean: - -rm -f $(TARGETS) $(TARGETLIBS) *.o *.a *.so *.so.* *~ - -rm -f ivy-glib.pc + -rm -f $(TARGETS) $(TARGETLIBS) *.o *.a *.so *.so.* *~ *.pc @(cd $(TOOLS_DIR) && $(MAKE) clean) @@ -331,9 +330,11 @@ tools_omp: libomp rpm:: /usr/bin/rpmize -pkgconf: - sed -e 's,@PREFIX@,$(PREFIX),; s,@DESTDIR@,$(DESTDIR),; s,@MAJOR@,$(MAJOR),; s,@MINOR@,$(MINOR),; s,@PCREINC@,$(PCREINC),; s,@REGEXP@,$(REGEXP),; s,@PCRELIB@,$(PCRELIB),; s,@EXTRALIB@,$(EXTRALIB),' ivy-glib.pc.in > ivy-glib.pc +pkgconf: + for f in *.pc.in ; do \ + sed -e 's,@PREFIX@,$(PREFIX),; s,@MAJOR@,$(MAJOR),; s,@MINOR@,$(MINOR),; s,@PCREINC@,$(PCREINC),; s,@REGEXP@,$(REGEXP),; s,@PCRELIB@,$(PCRELIB),; s,@EXTRALIB@,$(EXTRALIB),' $$f > $$(echo $$f | cut -f 1,2 -d .); \ + done -installpkgconf: +installpkgconf: pkgconf test -d $(DESTDIR)$(PREFIX)/lib/pkgconfig || mkdir -p $(DESTDIR)$(PREFIX)/lib/pkgconfig - install -m 644 ivy-glib.pc $(DESTDIR)$(PREFIX)/lib/pkgconfig + install -m 644 *.pc $(DESTDIR)$(PREFIX)/lib/pkgconfig diff --git a/src/Makefile.osx b/src/Makefile.osx index 974fb94..7e4aad6 100644 --- a/src/Makefile.osx +++ b/src/Makefile.osx @@ -1,3 +1,26 @@ +# +# Ivy, C interface +# +# Copyright (C) 1997-2014 +# Centre d'Études de la Navigation Aérienne +# +# Makefile.osx +# +# Authors: François-Régis Colin <fcolin@cena.fr> +# Stéphane Chatty <chatty@cena.fr> +# Yannick Jestin <jestin@cena.fr> +# Piotr Esden-Tempski <piotr@esden.net> +# +# Please refer to file version.h for the +# copyright notice regarding this software +# + +# change this in version.h too !!!! +MAJOR=3 +MINOR=15 + +LIB=/lib + LBITS := $(shell getconf LONG_BIT) ifeq ($(LBITS),64) FPIC = -fPIC @@ -148,15 +171,16 @@ install: installlibs installbins includes installpkgconf # ------------------------------------------------------------------------------------------ clean: - -rm -f *.o *.a *.dylib *.dylib.* *~ - -rm -f ivy-glib.pc + -rm -f *.o *.a *.dylib *.dylib.* *~ *.pc @(cd $(TOOLS_DIR) && $(MAKE) -f Makefile.osx clean) # ------------------------------------------------------------------------------------------ pkgconf: - sed -e 's,@PREFIX@,$(PREFIX),; s,@DESTDIR@,$(DESTDIR),; s,@MAJOR@,$(MAJOR),; s,@MINOR@,$(MINOR),; s,@PCREINC@,$(PCREINC),; s,@REGEXP@,$(REGEXP),; s,@PCRELIB@,$(PCRELIB),; s,@EXTRALIB@,$(EXTRALIB),' ivy-glib.pc.in > ivy-glib.pc + for f in *.pc.in ; do \ + sed -e 's,@PREFIX@,$(PREFIX),; s,@MAJOR@,$(MAJOR),; s,@MINOR@,$(MINOR),; s,@PCREINC@,$(PCREINC),; s,@REGEXP@,$(REGEXP),; s,@PCRELIB@,$(PCRELIB),; s,@EXTRALIB@,$(EXTRALIB),' $$f > $$(echo $$f | cut -f 1,2 -d .); \ + done -installpkgconf: +installpkgconf: pkgconf test -d $(DESTDIR)$(PREFIX)/lib/pkgconfig || mkdir -p $(DESTDIR)$(PREFIX)/lib/pkgconfig - install -m 644 ivy-glib.pc $(DESTDIR)$(PREFIX)/lib/pkgconfig + install -m 644 *.pc $(DESTDIR)$(PREFIX)/lib/pkgconfig diff --git a/src/ivy-glib.pc.in b/src/ivy-glib.pc.in index e2186a9..5794064 100644 --- a/src/ivy-glib.pc.in +++ b/src/ivy-glib.pc.in @@ -1,4 +1,4 @@ -prefix=@DESTDIR@/@PREFIX@ +prefix=@PREFIX@ exec_prefix=${prefix} libdir=${exec_prefix}/lib includedir=${prefix}/include @@ -7,5 +7,5 @@ Name: ivy-glib Description: A software bus (Glib main loop) Requires: glib-2.0 Version: @MAJOR@.@MINOR@ -Libs: -L${libdir} -lglibivy @PCREINC@ -Cflags: -I${includedir} @REGEXP@ @PCRELIB@ @EXTRALIB@ +Libs: -L${libdir} -lglibivy @PCRELIB@ @EXTRALIB@ +Cflags: -I${includedir} @REGEXP@ @PCREINC@ diff --git a/src/version.h b/src/version.h index a75a7fa..11548f7 100644 --- a/src/version.h +++ b/src/version.h @@ -26,4 +26,4 @@ * */ #define IVYMAJOR_VERSION 3 -#define IVYMINOR_VERSION 14 +#define IVYMINOR_VERSION 15 diff --git a/tools/ivyprobe.c b/tools/ivyprobe.c index 8b164a1..0074192 100644 --- a/tools/ivyprobe.c +++ b/tools/ivyprobe.c @@ -171,15 +171,7 @@ void HandleStdin (Channel channel, IVY_HANDLE fd, void *data) printf("Error compiling '%s', %s, not bound\n", arg, errbuf); } else { IvyBindingFree( binding ); - -#if defined(__GNUC__) && __GNUC_PREREQ(4,7) -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wformat-security" -#endif - IvyBindMsg (Callback, NULL, arg); -#if defined(__GNUC__) && __GNUC_PREREQ(4,7) -#pragma GCC diagnostic pop -#endif + IvyBindMsg (Callback, NULL, "%s", arg); } } @@ -243,14 +235,7 @@ void HandleStdin (Channel channel, IVY_HANDLE fd, void *data) } } else { cmd = strtok (buf, "\n"); -#if defined(__GNUC__) && __GNUC_PREREQ(4,7) -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wformat-security" -#endif - err = IvySendMsg (cmd); -#if defined(__GNUC__) && __GNUC_PREREQ(4,7) -#pragma GCC diagnostic pop -#endif + err = IvySendMsg ("%s", cmd); printf("-> Sent to %d peer%s\n", err, err == 1 ? "" : "s"); } } @@ -355,14 +340,7 @@ void BindMsgOfFile( const char * regex_file ) if ( size > 1 ) { line[size-1] = '\0'; /* supress \n */ -#if defined(__GNUC__) && __GNUC_PREREQ(4,7) -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wformat-security" -#endif - IvyBindMsg (Callback, NULL, line); -#if defined(__GNUC__) && __GNUC_PREREQ(4,7) -#pragma GCC diagnostic pop -#endif + IvyBindMsg (Callback, NULL, "%s", line); } } } @@ -455,14 +433,7 @@ int main(int argc, char *argv[]) for (; optind < argc; optind++) { printf("Binding to '%s'\n", argv[optind] ); -#if defined(__GNUC__) && __GNUC_PREREQ(4,7) -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wformat-security" -#endif - IvyBindMsg (Callback, NULL, argv[optind]); -#if defined(__GNUC__) && __GNUC_PREREQ(4,7) -#pragma GCC diagnostic pop -#endif + IvyBindMsg (Callback, NULL, "%s", argv[optind]); } diff --git a/tools/ivythroughput.cpp b/tools/ivythroughput.cpp index 68543e9..6773892 100644 --- a/tools/ivythroughput.cpp +++ b/tools/ivythroughput.cpp @@ -281,10 +281,6 @@ void emetteur (const char* bus, KindOfTest kod, int testDuration, # | | | __/ | (__ | __/ | | \ |_ | __/ | |_| | | | # |_| \___| \___| \___| |_| \__| \___| \__,_| |_| */ -#if defined(__GNUC__) && __GNUC_PREREQ(4,7) -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wformat-security" -#endif void recepteur_tp (const char* bus, KindOfTest kod, unsigned int inst, const ListOfString& regexps, unsigned int exitAfter) { @@ -305,7 +301,7 @@ void recepteur_tp (const char* bus, KindOfTest kod, unsigned int inst, debugInt++; string reg = *iter; if (regexpAreUniq) { ((reg += "(") += stream.str()) += ")?";} - IvyBindMsg (recepteurCB, (void *) long(inst), reg.c_str()); + IvyBindMsg (recepteurCB, (void *) long(inst), "%s", reg.c_str()); } IvyBindMsg (startOfSeqCB, NULL, "^start(OfSequence)"); IvyBindMsg (endOfSeqCB, NULL, "^end(OfSequence)"); @@ -320,9 +316,6 @@ void recepteur_tp (const char* bus, KindOfTest kod, unsigned int inst, IvyStart (bus); IvyMainLoop (); } -#if defined(__GNUC__) && __GNUC_PREREQ(4,7) -#pragma GCC diagnostic pop -#endif void recepteur_ml (const char* bus, KindOfTest kod, unsigned int inst, const ListOfString& regexps) @@ -346,15 +339,7 @@ void recepteur_ml (const char* bus, KindOfTest kod, unsigned int inst, debugInt++; string reg = *iter; if (regexpAreUniq) { (reg += " ") += stream.str();} -#if defined(__GNUC__) && __GNUC_PREREQ(4,7) -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wformat-security" -#endif - bindIdList.push_back (IvyBindMsg (recepteurCB, (void *) long(inst), reg.c_str())); -#if defined(__GNUC__) && __GNUC_PREREQ(4,7) -#pragma GCC diagnostic pop -#endif - + bindIdList.push_back (IvyBindMsg (recepteurCB, (void *) long(inst), "%s", reg.c_str())); } IvyBindMsg (startOfSeqCB, NULL, "^start(OfSequence)"); IvyBindMsg (endOfSeqCB, NULL, "^end(OfSequence)"); @@ -555,14 +540,7 @@ void sendAllMessageCB (TimerId id, void *user_data, unsigned long delta) IvySendMsg ("startOfSequence"); ListOfString::iterator iter; for (iter=messages->begin(); iter != messages->end(); iter++) { -#if defined(__GNUC__) && __GNUC_PREREQ(4,7) -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wformat-security" -#endif - envoyes += IvySendMsg ((*iter).c_str()); -#if defined(__GNUC__) && __GNUC_PREREQ(4,7) -#pragma GCC diagnostic pop -#endif + envoyes += IvySendMsg ("%s", (*iter).c_str()); } IvySendMsg ("endOfSequence"); @@ -641,15 +619,8 @@ void desabonneEtReabonneCB (TimerId id, void *user_data, unsigned long delta) ListOfString::const_iterator iter2; for (iter2=mds->regexps->begin(); iter2 != mds->regexps->end(); iter2++) { string reg = *iter2; -#if defined(__GNUC__) && __GNUC_PREREQ(4,7) -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wformat-security" -#endif mds->bindIdList->push_back (IvyBindMsg (recepteurCB, (void *) long(mds->inst), - reg.c_str())); -#if defined(__GNUC__) && __GNUC_PREREQ(4,7) -#pragma GCC diagnostic pop -#endif + "%s", reg.c_str())); } // CHANGE REGEXP |