pkgsrc-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: pkg/45043 (pkgtools/libnbcompat minix support)



The following reply was made to PR pkg/45043; it has been noted by GNATS.

From: Thomas Cort <tcort%minix3.org@localhost>
To: gnats-bugs%netbsd.org@localhost
Cc: 
Subject: Re: pkg/45043 (pkgtools/libnbcompat minix support)
Date: Tue, 19 Jul 2011 08:40:31 -0400

 After submitting the original patch, Minix's struct stat was enhanced to
 include the st_blksize member. That eliminates the st_blksize changes from
 the original patch. Additionally, Minix got a new C library and headers.
 The C library and headers were ported from NetBSD. An updated patch follows.
 
 Patch Summary:
 
  * Check for gar and ar since some Minix systems use GNU ar (gar) instead
    of ar.
 
  * If __UNCONST is defined, undefine it so that the local version can be
    used. The Minix version is defined somewhat differently...
    #define __UNCONST(a)        ((void *)(unsigned long)(const void *)(a))
 
  * Don't define FTS_WHITEOUT if __minix is defined. FTS_WHITEOUT isn't
    supported on Minix.
 
  * Change the prototype of timegm() (remove the 'const') to make it
    match the definition in <time.h>. The version without the const is 
    what is defined in <time.h> on Minix and NetBSD.
    See http://netbsd.gw.com/cgi-bin/man-cgi?timegm++NetBSD-current
 
 diff --git a/pkgtools/libnbcompat/files/configure 
b/pkgtools/libnbcompat/files/configure
 index abef6f2..458b209 100755
 diff --git a/pkgtools/libnbcompat/files/configure.ac 
b/pkgtools/libnbcompat/files/configure.ac
 index afb5ace..365e9f2 100644
 --- a/pkgtools/libnbcompat/files/configure.ac
 +++ b/pkgtools/libnbcompat/files/configure.ac
 @@ -18,7 +18,7 @@ AC_PROG_INSTALL
  AC_PROG_LN_S
  AC_PROG_RANLIB
  AC_PROG_AWK
 -AC_CHECK_PROG(AR, ar, ar)
 +AC_CHECK_PROGS(AR, [gar ar])
  
  AUTOCONF=${AUTOCONF-"$srcdir/missing --run autoconf"}
  AC_SUBST(AUTOCONF)
 diff --git a/pkgtools/libnbcompat/files/db/hash/hash.c 
b/pkgtools/libnbcompat/files/db/hash/hash.c
 index d3fa75f..005162e 100644
 --- a/pkgtools/libnbcompat/files/db/hash/hash.c
 +++ b/pkgtools/libnbcompat/files/db/hash/hash.c
 @@ -58,6 +58,9 @@ __RCSID("$NetBSD: hash.c,v 1.2 2008/10/30 19:27:20 joerg Exp 
$");
  #include "../pwrite.c"
  #endif
  
 +#ifdef __UNCONST
 +#undef __UNCONST
 +#endif
  #define __UNCONST(a)  ((void *)(size_t)(const void *)(a))
  
  static int   alloc_segs(HTAB *, int);
 diff --git a/pkgtools/libnbcompat/files/nbcompat/fts.h 
b/pkgtools/libnbcompat/files/nbcompat/fts.h
 index 141bb4c..d335aa7 100644
 --- a/pkgtools/libnbcompat/files/nbcompat/fts.h
 +++ b/pkgtools/libnbcompat/files/nbcompat/fts.h
 @@ -53,7 +53,9 @@ typedef struct {
  #define       FTS_PHYSICAL    0x010           /* physical walk */
  #define       FTS_SEEDOT      0x020           /* return dot and dot-dot */
  #define       FTS_XDEV        0x040           /* don't cross devices */
 +#ifndef __minix
  #define       FTS_WHITEOUT    0x080           /* return whiteout information 
*/
 +#endif
  #define       FTS_OPTIONMASK  0x0ff           /* valid user option mask */
  
  #define       FTS_NAMEONLY    0x100           /* (private) child names only */
 diff --git a/pkgtools/libnbcompat/files/timegm.c 
b/pkgtools/libnbcompat/files/timegm.c
 index 16ef642..eedfa77 100644
 --- a/pkgtools/libnbcompat/files/timegm.c
 +++ b/pkgtools/libnbcompat/files/timegm.c
 @@ -56,7 +56,7 @@ leap_days(int y1, int y2)
   * Code adapted from Python 2.4.1 sources (Lib/calendar.py).
   */
  time_t
 -timegm(const struct tm *tm)
 +timegm(struct tm *tm)
  {
        int year;
        time_t days;
 


Home | Main Index | Thread Index | Old Index