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:01:02
  Branch: rpm-5_1                          Handle: 2009031816010100

  Modified files:           (Branch: rpm-5_1)
    rpm                     CHANGES
    rpm/rpmio               yarn.c

  Log:
    - yarn: use EINVAL, not -1, for --without-pthreads portability.

  Summary:
    Revision    Changes     Path
    1.2288.2.205+1  -0      rpm/CHANGES
    2.7.2.4     +7  -7      rpm/rpmio/yarn.c
  ____________________________________________________________________________

  patch -p0 <<'@@ .'
  Index: rpm/CHANGES
  ============================================================================
  $ cvs diff -u -r1.2288.2.204 -r1.2288.2.205 CHANGES
  --- rpm/CHANGES       18 Mar 2009 15:51:40 -0000      1.2288.2.204
  +++ rpm/CHANGES       18 Mar 2009 16:01:01 -0000      1.2288.2.205
  @@ -1,4 +1,5 @@
   5.1.7 -> 5.1.8:
  +    - 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.
       - jbj: yarn: use the pool allocator.
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/rpmio/yarn.c
  ============================================================================
  $ cvs diff -u -r2.7.2.3 -r2.7.2.4 yarn.c
  --- rpm/rpmio/yarn.c  18 Mar 2009 15:51:40 -0000      2.7.2.3
  +++ rpm/rpmio/yarn.c  18 Mar 2009 16:01:01 -0000      2.7.2.4
  @@ -56,16 +56,16 @@
   #define      pthread_t       int
   #define      pthread_self()  0
   #define      pthread_equal(_t1, _t2) ((_t1) == (_t2))
  -#define      pthread_create(__newthread, __attr, __start_routine, arg)       
(-1)
  -#define      pthread_join(__thread, __value_ptr)                             
(-1)
  -#define      pthread_cancel(__th)                                            
(-1)
  +#define      pthread_create(__newthread, __attr, __start_routine, arg)       
(EINVAL)
  +#define      pthread_join(__thread, __value_ptr)                             
(EINVAL)
  +#define      pthread_cancel(__th)                                            
(EINVAL)
   #define      pthread_cleanup_pop(__execute)
   #define      pthread_cleanup_push(__routine, __arg)
   
   #define      pthread_attr_t  int
  -#define      pthread_attr_init(__attr)                               (-1)
  -#define      pthread_attr_destroy(__attr)                            (-1)
  -#define      pthread_attr_setdetachstate(__attr, __detachstate)      (-1)
  +#define      pthread_attr_init(__attr)                               (EINVAL)
  +#define      pthread_attr_destroy(__attr)                            (EINVAL)
  +#define      pthread_attr_setdetachstate(__attr, __detachstate)      (EINVAL)
   
   #define      pthread_mutex_t int
   #define      PTHREAD_MUTEX_INITIALIZER       0
  @@ -79,7 +79,7 @@
   #define      PTHREAD_COND_INITIALIZER        0
   #define      pthread_cond_destroy(__cond)            (0)     /* FreeLock */
   #define      pthread_cond_init(__cond, __attr)       (0)     /* NewLock */
  -#define      pthread_cond_wait(__cond, __mutex)      (sleep(60U))    /* 
WaitFor */
  +#define      pthread_cond_wait(__cond, __mutex)      (EINVAL)/* WaitFor */
   #define      pthread_cond_broadcast(__cond)          (0)     /* Twist */
   
   #endif       /* WITH_PTHREADS */
  @@ .
______________________________________________________________________
RPM Package Manager                                    http://rpm5.org
CVS Sources Repository                                rpm-cvs@rpm5.org

Reply via email to