From 270561f3887360d242c2b0af3fb4717f4668cace Mon Sep 17 00:00:00 2001 From: aeb Date: Thu, 22 Jun 2000 16:22:00 +0000 Subject: [PATCH] - Set library version info in configure.in, use in src/Makefile.am. - Enable compiler warnings. git-svn-id: svn://svn.linux1394.org/libraw1394/trunk@32 53a565d1-3bb7-0310-b661-cf11e63c67ab --- configure.in | 11 +++++++++++ src/Makefile.am | 2 +- src/main.c | 3 ++- src/testlibraw.c | 2 ++ 4 files changed, 16 insertions(+), 2 deletions(-) diff --git a/configure.in b/configure.in index 4767479..21290d3 100644 --- a/configure.in +++ b/configure.in @@ -8,4 +8,15 @@ AC_PROG_CC AM_PROG_LIBTOOL AC_PROG_INSTALL +# set the libtool so version numbers +lt_major=4 +lt_revision=0 +lt_age=0 + +AC_SUBST(lt_major) +AC_SUBST(lt_revision) +AC_SUBST(lt_age) + + +CFLAGS="$CFLAGS -Wall -Wunused" AC_OUTPUT([ Makefile src/Makefile debian/Makefile ]) diff --git a/src/Makefile.am b/src/Makefile.am index ae204e1..78fb027 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -3,7 +3,7 @@ lib_LTLIBRARIES = libraw1394.la -libraw1394_la_LDFLAGS = -version-info 4:0:0 +libraw1394_la_LDFLAGS = -version-info @lt_major@:@lt_revision@:@lt_age@ libraw1394_la_SOURCES = \ main.c \ diff --git a/src/main.c b/src/main.c index 9b88983..5a3c0f9 100644 --- a/src/main.c +++ b/src/main.c @@ -13,6 +13,7 @@ #include #include #include +#include #include "raw1394.h" #include "kernel-raw1394.h" @@ -84,7 +85,7 @@ struct raw1394_handle *raw1394_get_handle(void) } handle->generation = init_rawdevice(handle); - if (handle->generation < 0) { + if (handle->generation == -1) { close(handle->fd); free(handle); return NULL; diff --git a/src/testlibraw.c b/src/testlibraw.c index 17d6f0d..80dfb12 100644 --- a/src/testlibraw.c +++ b/src/testlibraw.c @@ -53,6 +53,8 @@ int my_fcp_handler(raw1394handle_t handle, nodeid_t nodeid, int response, } printf("\n"); + + return 0; }