RPM Community Forums

Mailing List Message of <rpm-cvs>

[CVS] RPM: rpm/ CHANGES rpm/lib/ rpmds.c rpm/misc/ librpmmisc.c rpm/rp...

From: Anders F. Björklund <afb@rpm5.org>
Date: Fri 14 Dec 2007 - 14:03:11 CET
Message-Id: <20071214130311.B2D2634845A@rpm5.org>
  RPM Package Manager, CVS Repository
  http://rpm5.org/cvs/
  ____________________________________________________________________________

  Server: rpm5.org                         Name:   Anders F. Björklund
  Root:   /v/rpm/cvs                       Email:  afb@rpm5.org
  Module: rpm                              Date:   14-Dec-2007 14:03:11
  Branch: HEAD                             Handle: 2007121413031001

  Modified files:
    rpm                     CHANGES
    rpm/lib                 rpmds.c
    rpm/misc                librpmmisc.c
    rpm/rpmio               fts.c rpmdav.c rpmio.c rpmsq.c

  Log:
    various windows/cygwin hacks...

  Summary:
    Revision    Changes     Path
    1.1987      +1  -0      rpm/CHANGES
    2.89        +2  -0      rpm/lib/rpmds.c
    1.2         +2  -0      rpm/misc/librpmmisc.c
    1.28        +13 -0      rpm/rpmio/fts.c
    2.53        +5  -3      rpm/rpmio/rpmdav.c
    1.115       +4  -0      rpm/rpmio/rpmio.c
    1.31        +22 -0      rpm/rpmio/rpmsq.c
  ____________________________________________________________________________

  patch -p0 <<'@@ .'
  Index: rpm/CHANGES
  ============================================================================
  $ cvs diff -u -r1.1986 -r1.1987 CHANGES
  --- rpm/CHANGES	14 Dec 2007 03:35:48 -0000	1.1986
  +++ rpm/CHANGES	14 Dec 2007 13:03:10 -0000	1.1987
  @@ -1,4 +1,5 @@
   5.0b1 -> 5.0b2:
  +    - afb: made it compile on Cygwin too.
       - jbj: add Foo:Bar:Baz indices for now.
       - jbj: permit arbitrary tags to be indexed by "Name", not Tag_0x12345678.
       - jbj: permit tag aliases in rpmdb index names (Filedigests <-> Filemd5s).
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/lib/rpmds.c
  ============================================================================
  $ cvs diff -u -r2.88 -r2.89 rpmds.c
  --- rpm/lib/rpmds.c	8 Dec 2007 05:15:11 -0000	2.88
  +++ rpm/lib/rpmds.c	14 Dec 2007 13:03:10 -0000	2.89
  @@ -2577,6 +2577,7 @@
   	    }
   	    /*@switchbreak@*/ break;
   	case CONFSTR:
  +#ifndef __CYGWIN__
   	    clen = confstr(c->call_name, (char *) NULL, 0);
   	    EVR = xmalloc(clen+1);
   	    *EVR = '\0';
  @@ -2585,6 +2586,7 @@
   		exit (EXIT_FAILURE);
   	    }
   	    EVR[clen] = '\0';
  +#endif
   	    /*@switchbreak@*/ break;
   	}
   	if (EVR == NULL)
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/misc/librpmmisc.c
  ============================================================================
  $ cvs diff -u -r1.1 -r1.2 librpmmisc.c
  --- rpm/misc/librpmmisc.c	27 Jun 2007 09:45:15 -0000	1.1
  +++ rpm/misc/librpmmisc.c	14 Dec 2007 13:03:11 -0000	1.2
  @@ -70,6 +70,8 @@
   
   #include "fnmatch.h"
   #include "fnmatch.c"
  +#ifndef __CYGWIN__
   #include "glob.h"
   #include "glob.c"
  +#endif
   
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/rpmio/fts.c
  ============================================================================
  $ cvs diff -u -r1.27 -r1.28 fts.c
  --- rpm/rpmio/fts.c	10 Dec 2007 09:25:42 -0000	1.27
  +++ rpm/rpmio/fts.c	14 Dec 2007 13:03:11 -0000	1.28
  @@ -74,6 +74,19 @@
   #   define __fxstat64(_stat_ver, _fd, _sbp)	fstat64((_fd), (_sbp))
   #endif
   #endif
  +#if defined(__CYGWIN__) || defined(__MINGW32__)
  +#   include <sys/stat.h>
  +#if defined(__CYGWIN__)
  +#   define __errno_location()	(__errno())
  +#elif !defined(_UWIN)
  +#   define __errno_location()	(_errno())
  +#else
  +#   define __errno_location()	(&errno)
  +#endif
  +#   define stat64		stat
  +#   define _STAT_VER		0
  +#   define __fxstat64(_stat_ver, _fd, _sbp)	fstat((_fd), (_sbp))
  +#endif
   #if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__DragonFly__)
   #   define __errno_location()  (&errno)
   #   define stat64              stat
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/rpmio/rpmdav.c
  ============================================================================
  $ cvs diff -u -r2.52 -r2.53 rpmdav.c
  --- rpm/rpmio/rpmdav.c	15 Nov 2007 17:27:59 -0000	2.52
  +++ rpm/rpmio/rpmdav.c	14 Dec 2007 13:03:11 -0000	2.53
  @@ -1668,11 +1668,11 @@
       /* XXX glob(3) uses REAL_DIR_ENTRY(dp) test on d_ino */
   /*@-type@*/
       dp->d_ino = i + 1;		/* W2DO? */
  -#if !defined(__DragonFly__)
  +#if !defined(__DragonFly__) && !defined(__CYGWIN__)
       dp->d_reclen = 0;		/* W2DO? */
   #endif
   
  -#if !(defined(hpux) || defined(__hpux) || defined(sun) || defined(RPM_OS_AIX))
  +#if !(defined(hpux) || defined(__hpux) || defined(sun) || defined(RPM_OS_AIX) || defined(__CYGWIN__))
   #if !defined(__APPLE__) && !defined(__FreeBSD_kernel__) && !defined(__FreeBSD__) && !defined(__NetBSD__) && !defined(__DragonFly__)
       dp->d_off = 0;		/* W2DO? */
   #endif
  @@ -1790,9 +1790,11 @@
       /* XXX glob(3) uses REAL_DIR_ENTRY(dp) test on d_ino */
   /*@-type@*/
       dp->d_ino = i + 1;		/* W2DO? */
  +#if !defined(__DragonFly__) && !defined(__CYGWIN__)
       dp->d_reclen = 0;		/* W2DO? */
  +#endif
   
  -#if !(defined(hpux) || defined(__hpux) || defined(sun) || defined(RPM_OS_AIX))
  +#if !(defined(hpux) || defined(__hpux) || defined(sun) || defined(RPM_OS_AIX) || defined(__CYGWIN__))
   #if !defined(__APPLE__) && !defined(__FreeBSD_kernel__) && !defined(__FreeBSD__) && !defined(__NetBSD__) && !defined(__DragonFly__)
       dp->d_off = 0;		/* W2DO? */
   #endif
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/rpmio/rpmio.c
  ============================================================================
  $ cvs diff -u -r1.114 -r1.115 rpmio.c
  --- rpm/rpmio/rpmio.c	8 Dec 2007 09:10:25 -0000	1.114
  +++ rpm/rpmio/rpmio.c	14 Dec 2007 13:03:11 -0000	1.115
  @@ -13,6 +13,10 @@
   # include <sys/socket.h>
   #endif
   
  +#ifndef NI_MAXHOST
  +#define NI_MAXHOST      1025
  +#endif
  +
   #if defined(__LCLINT__)
   struct addrinfo
   {
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/rpmio/rpmsq.c
  ============================================================================
  $ cvs diff -u -r1.30 -r1.31 rpmsq.c
  --- rpm/rpmio/rpmsq.c	15 Nov 2007 17:27:59 -0000	1.30
  +++ rpm/rpmio/rpmsq.c	14 Dec 2007 13:03:11 -0000	1.31
  @@ -164,6 +164,28 @@
   #define sigpause(sig) __RPM_sigpause(sig)
   #endif
   
  +/* portability fallback for insque(3)/remque(3) */
  +#if defined(__CYGWIN__) || defined(__MINGW32__)
  +struct qelem {
  +  struct qelem *q_forw;
  +  struct qelem *q_back;
  +};
  +
  +static	void insque(struct qelem * elem, struct qelem * pred)
  +{
  +  elem -> q_forw = pred -> q_forw;
  +  pred -> q_forw -> q_back = elem;
  +  elem -> q_back = pred;
  +  pred -> q_forw = elem;
  +}
  +
  +static	void remque(struct qelem * elem)
  +{
  +  elem -> q_forw -> q_back = elem -> q_back;
  +  elem -> q_back -> q_forw = elem -> q_forw;
  +}
  +#endif
  +
   #if defined(HAVE_PTHREAD_H)
   
   #include <pthread.h>
  @@ .
Received on Fri Dec 14 14:03:11 2007
Driven by Jeff Johnson and the RPM project team.
Hosted by OpenPKG and Ralf S. Engelschall.
Powered by FreeBSD and OpenPKG.