merge
authorAleš Křenek <ljocha@ics.muni.cz>
Fri, 23 Mar 2007 13:18:40 +0000 (13:18 +0000)
committerAleš Křenek <ljocha@ics.muni.cz>
Fri, 23 Mar 2007 13:18:40 +0000 (13:18 +0000)
org.glite.lb.common/Makefile
org.glite.lb.common/build.xml
org.glite.lb.common/src/log_msg.c
org.glite.lb.ws-interface/Makefile
org.glite.lb.ws-interface/src/doc.xml

index ab6dccf..c20a7b3 100644 (file)
@@ -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
index e3add29..940412d 100755 (executable)
 
        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
        
                                <include name="at3" />
                                <include name="*.T" />
                                <include name="*.pm" />
+                               <include name="check_version.pl" />
                        </fileset>
                </copy> 
                <antcall target="lbmakefiles" />
index 595ed19..9d01165 100644 (file)
@@ -6,6 +6,8 @@
 #include <sys/un.h>
 #include <stdio.h>
 #include <math.h>
+#include <sys/stat.h>
+#include <unistd.h>
 
 #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");
index e2e4105..50f02be 100644 (file)
@@ -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 $@
index fd65f12..78cb6a5 100644 (file)
@@ -1,5 +1,2 @@
 <?xml version="1.0"?>
-<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
-           "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd">
-<book>
-</book>
+<book/>