RPM Package Manager, CVS Repository http://rpm5.org/cvs/ ____________________________________________________________________________
Server: rpm5.org Name: Jeff Johnson Root: /v/rpm/cvs Email: j...@rpm5.org Module: rpm Date: 18-Mar-2009 17:08:13 Branch: rpm-5_1 Handle: 2009031816081201 Modified files: (Branch: rpm-5_1) rpm CHANGES rpm/rpmio yarn.c Log: - yarn: trick up a __FILE__:__LINE__ from caller when failing too. Summary: Revision Changes Path 1.2288.2.206+1 -0 rpm/CHANGES 2.7.2.5 +4 -3 rpm/rpmio/yarn.c ____________________________________________________________________________ patch -p0 <<'@@ .' Index: rpm/CHANGES ============================================================================ $ cvs diff -u -r1.2288.2.205 -r1.2288.2.206 CHANGES --- rpm/CHANGES 18 Mar 2009 16:01:01 -0000 1.2288.2.205 +++ rpm/CHANGES 18 Mar 2009 16:08:12 -0000 1.2288.2.206 @@ -1,4 +1,5 @@ 5.1.7 -> 5.1.8: + - jbj: yarn: trick up a __FILE__:__LINE__ from caller when failing too. - jbj: yarn: use EINVAL, not -1, for --without-pthreads portability. - jbj: yarn: glibc pthreads (at least) returns errno's, strrerror decodes. - jbj: yarn: fix: assert fail instead of exit on error. @@ . patch -p0 <<'@@ .' Index: rpm/rpmio/yarn.c ============================================================================ $ cvs diff -u -r2.7.2.4 -r2.7.2.5 yarn.c --- rpm/rpmio/yarn.c 18 Mar 2009 16:01:01 -0000 2.7.2.4 +++ rpm/rpmio/yarn.c 18 Mar 2009 16:08:13 -0000 2.7.2.5 @@ -187,17 +187,18 @@ /* immediately exit -- use for errors that shouldn't ever happen */ /*...@exits@*/ -static void fail(int err) +static void _fail(int err, const char * fn, unsigned ln) /*...@globals fileSystem, internalState @*/ /*...@modifies fileSystem, internalState @*/ { - fprintf(stderr, "%s: pthread error: %s(%d) -- aborting\n", yarnPrefix, - strerror(err), err); + fprintf(stderr, "%s: pthread error: %s(%d) -- aborting at %s:%u\n", yarnPrefix, + strerror(err), err, fn, ln); if (yarnAbort != NULL) yarnAbort(err); assert(0); exit(err == ENOMEM || err == EAGAIN ? err : EINVAL); } +#define fail(_err) _fail((_err), __FILE__, __LINE__) /* memory handling routines provided by user -- if none are provided, malloc() and free() are used, which are therefore assumed to be thread-safe */ @@ . ______________________________________________________________________ RPM Package Manager http://rpm5.org CVS Sources Repository rpm-cvs@rpm5.org