From 8e9ca0947fba84eee775427039108804f236e853 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Ale=C5=A1=20K=C5=99enek?= Date: Fri, 23 Mar 2007 13:18:40 +0000 Subject: [PATCH] merge --- org.glite.lb.common/Makefile | 30 ++++++++---------------------- org.glite.lb.common/build.xml | 7 +++++++ org.glite.lb.common/src/log_msg.c | 24 +++++++++++++++++++++--- org.glite.lb.ws-interface/Makefile | 9 ++++++--- org.glite.lb.ws-interface/src/doc.xml | 5 +---- 5 files changed, 43 insertions(+), 32 deletions(-) diff --git a/org.glite.lb.common/Makefile b/org.glite.lb.common/Makefile index ab6dccf..c20a7b3 100644 --- a/org.glite.lb.common/Makefile +++ b/org.glite.lb.common/Makefile @@ -1,7 +1,5 @@ # Default values top_srcdir=. -builddir=build -top_builddir=${top_srcdir}/${builddir} stagedir=. distdir=. globalprefix=glite @@ -10,7 +8,6 @@ package=glite-lb-common version=0.0.0 PREFIX=/opt/glite -glite_location=/opt/glite globus_prefix=/opt/globus nothrflavour=gcc32 thrflavour=gcc32pthr @@ -48,7 +45,6 @@ CFLAGS:=${DEBUG} -I${top_srcdir}/src -I${top_srcdir}/interface \ -I. \ -I${top_srcdir}/test \ -I${stagedir}/include \ - -I${glite_location}/include \ -I${expat_prefix}/include \ ${COVERAGE_FLAGS} \ -D_GNU_SOURCE \ @@ -59,7 +55,8 @@ CFLAGS:=${DEBUG} -I${top_srcdir}/src -I${top_srcdir}/interface \ # major version more frequently. This variable specifies how many steps ahead # we are. -VERSION_AHEAD=1 +VERSION_AHEAD=3 +CHECK_VERSION:=VERSION=${version} VERSION_AHEAD=${VERSION_AHEAD} perl ${top_srcdir}/project/check_version.pl GLOBUS_LIBS:=-L${globus_prefix}/lib \ -lglobus_common_${nothrflavour} \ @@ -69,8 +66,6 @@ GLOBUS_THRLIBS:=-L${globus_prefix}/lib \ -lglobus_common_${thrflavour} \ -lglobus_gssapi_gsi_${thrflavour} \ -GLITE_LIBS:=-L${glite_location}/lib - ifneq (${expat_prefix},/usr) EXPAT_LIBS:=-L${expat_prefix}/lib endif @@ -132,10 +127,9 @@ endif default: all -#all compile: check_version ${STATICLIB} ${LTLIB} ${THRSTATICLIB} ${THRLTLIB} ${TRIO_LIB} ${MAILDIR_LIB} -all compile: ${STATICLIB} ${LTLIB} ${THRSTATICLIB} ${THRLTLIB} ${TRIO_LIB} ${MAILDIR_LIB} +all compile: check_version ${STATICLIB} ${LTLIB} ${THRSTATICLIB} ${THRLTLIB} ${TRIO_LIB} ${MAILDIR_LIB} -# FIXME: to use libtool versioning correcty, we should have: +# In order to use libtool versioning correcty, we must have: # # current = major + minor + offset # revision = patch @@ -143,11 +137,9 @@ all compile: ${STATICLIB} ${LTLIB} ${THRSTATICLIB} ${THRLTLIB} ${TRIO_LIB} ${MAI # # where offset is a sum of maximal released minor's of all previous major's # -# version_info=-version-info `echo ${version} | cut -d. -f1,2 | tr . :` - -# counted minors: 1.1 -offset=1 +# counted minors: 1.1, 3.1 +offset=2 version_info:=-version-info ${shell \ perl -e '$$,=":"; @F=split "\\.","${version}"; print $$F[0]+$$F[1]+${offset},$$F[2],$$F[1]' } @@ -245,6 +237,7 @@ install: fi clean: + rm -rf *.o *.lo .libs lib* %.o: %.c @@ -277,11 +270,4 @@ il_int_test.o il_string_test.o il_test.o il_msg_test.o: %.o: %.cpp chmod -w $@ >/dev/null check_version: - @perl -ne '/#define GLITE_LB_CLIENT_INTERFACE "(\d+)\.\d+\.\d+"/; \ - $$iface=$$1; \ - $$_="${version}"; /(\d+)\.\d+\.\d+/; \ - if ($$iface + ${VERSION_AHEAD} != $$1) { \ - print "error: Major version of the interface ($$iface+${VERSION_AHEAD}) does not match implementation ($$1)\n" ;\ - exit 1; \ - } \ - ' ${stagedir}/include/glite/lb/interface_version.h + ${CHECK_VERSION} ${stagedir}/include/glite/lb/interface_version.h diff --git a/org.glite.lb.common/build.xml b/org.glite.lb.common/build.xml index e3add29..940412d 100755 --- a/org.glite.lb.common/build.xml +++ b/org.glite.lb.common/build.xml @@ -20,6 +20,12 @@ Revision history: $Log$ + Revision 1.8.20.1 2006/09/21 13:21:40 jpospi + use check_version.pl + + Revision 1.8 2005/08/03 09:30:17 akrenek + Merged the release 1.0 branch + Revision 1.7 2005/05/26 15:13:46 zurek inserted module.build.file @@ -114,6 +120,7 @@ + diff --git a/org.glite.lb.common/src/log_msg.c b/org.glite.lb.common/src/log_msg.c index 595ed19..9d01165 100644 --- a/org.glite.lb.common/src/log_msg.c +++ b/org.glite.lb.common/src/log_msg.c @@ -6,6 +6,8 @@ #include #include #include +#include +#include #include "context-int.h" @@ -119,8 +121,9 @@ int edg_wll_log_event_write( struct flock filelock; int filedesc, i, filelock_status=-1; + struct stat statbuf; - +try_again: if ( (outfile = fopen(event_file, "a")) == NULL ) { edg_wll_SetError(ctx, errno, "fopen()"); goto event_write_end; @@ -128,7 +131,6 @@ int edg_wll_log_event_write( if ( (filedesc = fileno(outfile)) == -1 ) { edg_wll_SetError(ctx, errno, "fileno()"); - fclose(outfile); goto cleanup; } @@ -149,7 +151,23 @@ int edg_wll_log_event_write( edg_wll_SetError(ctx, errno, "fcntl()"); goto cleanup; } - } else break; + } else { + /* check that the file still exists */ + if(stat(event_file, &statbuf)) { + if(errno == ENOENT) { + /* not there anymore - reopen it */ + fclose(outfile); + goto try_again; + } else { + /* could not stat the output file */ + edg_wll_SetError(ctx, errno, "stat()"); + goto cleanup; + } + } else { + /* file exists and is locked */ + break; + } + } } if (i == fcntl_attempts) { edg_wll_SetError(ctx, ETIMEDOUT, "timed out trying to lock event file"); diff --git a/org.glite.lb.ws-interface/Makefile b/org.glite.lb.ws-interface/Makefile index e2e4105..50f02be 100644 --- a/org.glite.lb.ws-interface/Makefile +++ b/org.glite.lb.ws-interface/Makefile @@ -20,8 +20,8 @@ SUFFIXES = .T VPATH=${top_srcdir}/src AT3=perl -I${top_srcdir}/project ${top_srcdir}/project/at3 XSLTPROC:=xsltproc --nonet -TIDY=tidy XMLLINT:=xmllint --nonet +TIDY=tidy -i -q --show-warnings no --tidy-mark no --wrap 0 docbookxls:=http://docbook.sourceforge.net/release/xsl/current/html/docbook.xsl STAGETO=interface @@ -75,10 +75,13 @@ clean: ${WSDL}: %.wsdl: %.xml puke-wsdl.xsl ${XSLTPROC} ../src/puke-wsdl.xsl $< >$@ - -${TIDY} -wrap 10000 -xml -m -i -q $@ - -perl -i -n -e 'if (/^\s*$$/) { $$empty .= "\n"; } elsif (/^\s*<(xsd:)?(enumeration|element|input|output|fault)/) { print $$_; $$empty = "";} else { print "$$empty$$_"; $$empty=""; }; ' $@ + -${TIDY} -xml -m $@ +# XXX: obsolete: +# -perl -i -n -e 'if (/^\s*$$/) { $$empty .= "\n"; } elsif (/^\s*<(xsd:)?(enumeration|element|input|output|fault)/) { print $$_; $$empty = "";} else { print "$$empty$$_"; $$empty=""; }; ' $@ LB.html: doc.xml LBTypes.xml LB.xml puke-ug.xsl ${XSLTPROC} --novalid ../src/puke-ug.xsl $< >doc-html.xml + -${TIDY} -xml -m doc-html.xml ${XMLLINT} --valid --noout doc-html.xml ${XSLTPROC} --stringparam chapter.autolabel 0 ${docbookxls} doc-html.xml >$@ + -${TIDY} -asxhtml -m $@ diff --git a/org.glite.lb.ws-interface/src/doc.xml b/org.glite.lb.ws-interface/src/doc.xml index fd65f12..78cb6a5 100644 --- a/org.glite.lb.ws-interface/src/doc.xml +++ b/org.glite.lb.ws-interface/src/doc.xml @@ -1,5 +1,2 @@ - - - + -- 1.8.2.3