RPM Package Manager, CVS Repository
  http://rpm5.org/cvs/
  ____________________________________________________________________________

  Server: rpm5.org                         Name:   Jeff Johnson
  Root:   /v/rpm/cvs                       Email:  [EMAIL PROTECTED]
  Module: popt                             Date:   08-Mar-2008 18:26:30
  Branch: HEAD                             Handle: 2008030817263000

  Modified files:
    popt                    CHANGES configure.ac popt.c poptconfig.c
                            popthelp.c poptparse.c system.h test1.c

  Log:
    - jbj: test for <glob.h>, disable reading directory poptrc files if not.
    - jbj: add __attribute__(__unused__) (Wayne Davidson<[EMAIL PROTECTED]>).
    - jbj: permit equal after short option (Wayne Davidson<[EMAIL PROTECTED]>).

  Summary:
    Revision    Changes     Path
    1.65        +3  -0      popt/CHANGES
    1.38        +2  -2      popt/configure.ac
    1.116       +6  -3      popt/popt.c
    1.36        +7  -2      popt/poptconfig.c
    1.85        +5  -4      popt/popthelp.c
    1.29        +2  -1      popt/poptparse.c
    1.13        +5  -0      popt/system.h
    1.35        +2  -2      popt/test1.c
  ____________________________________________________________________________

  patch -p0 <<'@@ .'
  Index: popt/CHANGES
  ============================================================================
  $ cvs diff -u -r1.64 -r1.65 CHANGES
  --- popt/CHANGES      8 Mar 2008 03:47:53 -0000       1.64
  +++ popt/CHANGES      8 Mar 2008 17:26:30 -0000       1.65
  @@ -1,4 +1,7 @@
   1.13 -> 1.14:
  +    - jbj: test for <glob.h>, disable reading directory poptrc files if not.
  +    - jbj: add __attribute__(__unused__) (Wayne Davidson<[EMAIL PROTECTED]>).
  +    - jbj: permit equal after short option (Wayne Davidson<[EMAIL 
PROTECTED]>).
       - jbj: make sure that short options are printed only once with --usage.
       - jbj: don't display hidden short options with --usage.
       - jbj: updated sv.po (Translation Project).
  @@ .
  patch -p0 <<'@@ .'
  Index: popt/configure.ac
  ============================================================================
  $ cvs diff -u -r1.37 -r1.38 configure.ac
  --- popt/configure.ac 17 Feb 2008 22:05:01 -0000      1.37
  +++ popt/configure.ac 8 Mar 2008 17:26:30 -0000       1.38
  @@ -21,7 +21,7 @@
   AC_PROG_LIBTOOL
   
   if test "X$CC" = Xgcc; then
  -    CFLAGS="-Wall $CFLAGS"
  +    CFLAGS="-Wall -W $CFLAGS"
   fi
   
   AC_GCC_TRADITIONAL
  @@ -59,7 +59,7 @@
   fi
   AC_SUBST(TARGET)
   
  -AC_CHECK_HEADERS(float.h libintl.h mcheck.h unistd.h langinfo.h)
  +AC_CHECK_HEADERS(float.h glob.h libintl.h mcheck.h unistd.h langinfo.h)
   
   # For some systems we know that we have ld_version scripts.
   # Use it then as default.
  @@ .
  patch -p0 <<'@@ .'
  Index: popt/popt.c
  ============================================================================
  $ cvs diff -u -r1.115 -r1.116 popt.c
  --- popt/popt.c       17 Feb 2008 00:53:49 -0000      1.115
  +++ popt/popt.c       8 Mar 2008 17:26:30 -0000       1.116
  @@ -644,8 +644,8 @@
   /[EMAIL PROTECTED]@*/
   }
   
  -int poptSaveString(const char *** argvp, /[EMAIL PROTECTED]@*/ unsigned int 
argInfo,
  -             const char * val)
  +int poptSaveString(const char *** argvp,
  +             /[EMAIL PROTECTED]@*/ UNUSED(unsigned int argInfo), const char 
* val)
   {
       poptArgv argv;
       int argc = 0;
  @@ -937,6 +937,9 @@
            origOptString++;
            if (*origOptString != '\0')
                con->os->nextCharArg = origOptString;
  +#ifdef       NOTYET  /* XXX causes test 9 failure. */
  +             con->os->nextCharArg = origOptString + (*origOptString == '=');
  +#endif
        }
   
        if (opt == NULL) return POPT_ERROR_BADOPT;      /* XXX can't happen */
  @@ -1217,7 +1220,7 @@
   }
   
   int poptAddAlias(poptContext con, struct poptAlias alias,
  -             /[EMAIL PROTECTED]@*/ int flags)
  +             /[EMAIL PROTECTED]@*/ UNUSED(int flags))
   {
       struct poptItem_s item_buf;
       poptItem item = &item_buf;
  @@ .
  patch -p0 <<'@@ .'
  Index: popt/poptconfig.c
  ============================================================================
  $ cvs diff -u -r1.35 -r1.36 poptconfig.c
  --- popt/poptconfig.c 16 Feb 2008 20:57:38 -0000      1.35
  +++ popt/poptconfig.c 8 Mar 2008 17:26:30 -0000       1.36
  @@ -9,7 +9,10 @@
   #include "system.h"
   #include "poptint.h"
   #include <sys/stat.h>
  +#if defined(HAVE_GLOB_H)
   #include <glob.h>
  +#endif
  +
   /[EMAIL PROTECTED] poptContext @*/
   
   /[EMAIL PROTECTED]@*/        /* FIX: item->option.longName kept, not 
dependent. */
  @@ -170,7 +173,7 @@
       return 0;
   }
   
  -int poptReadDefaultConfig(poptContext con, /[EMAIL PROTECTED]@*/ int useEnv)
  +int poptReadDefaultConfig(poptContext con, /[EMAIL PROTECTED]@*/ UNUSED(int 
useEnv))
   {
       static const char _popt_sysconfdir[] = POPT_SYSCONFDIR "/popt";
       static const char _popt_etc[] = "/etc/popt";
  @@ -188,11 +191,12 @@
       rc = poptReadConfigFile(con, _popt_etc);
       if (rc) return rc;
   
  +#if defined(HAVE_GLOB_H)
       if (!stat("/etc/popt.d", &s) && S_ISDIR(s.st_mode)) {
           glob_t g;
   /[EMAIL PROTECTED] -nullpass -type @*/ /* FIX: annotations for glob/globfree 
*/
        if (!glob("/etc/popt.d/*", 0, NULL, &g)) {
  -            int i;
  +            unsigned i;
            for (i=0; i<g.gl_pathc; i++) {
                char *f=g.gl_pathv[i];
                if (strstr(f, ".rpmnew") || strstr(f, ".rpmsave"))
  @@ -210,6 +214,7 @@
        }
   /[EMAIL PROTECTED] =nullpass =type @*/
       }
  +#endif
   
       if ((home = getenv("HOME"))) {
        fn = malloc(strlen(home) + 20);
  @@ .
  patch -p0 <<'@@ .'
  Index: popt/popthelp.c
  ============================================================================
  $ cvs diff -u -r1.84 -r1.85 popthelp.c
  --- popt/popthelp.c   8 Mar 2008 03:47:53 -0000       1.84
  +++ popt/popthelp.c   8 Mar 2008 17:26:30 -0000       1.85
  @@ -34,9 +34,10 @@
    */
   /[EMAIL PROTECTED]@*/
   static void displayArgs(poptContext con,
  -             /[EMAIL PROTECTED]@*/ enum poptCallbackReason foo,
  +             /[EMAIL PROTECTED]@*/ UNUSED(enum poptCallbackReason foo),
                struct poptOption * key, 
  -             /[EMAIL PROTECTED]@*/ const char * arg, /[EMAIL PROTECTED]@*/ 
void * data)
  +             /[EMAIL PROTECTED]@*/ UNUSED(const char * arg),
  +             /[EMAIL PROTECTED]@*/ UNUSED(void * data))
        /[EMAIL PROTECTED] [EMAIL PROTECTED]/
        /[EMAIL PROTECTED] [EMAIL PROTECTED]/
   {
  @@ -645,7 +646,7 @@
       return len;
   }
   
  -void poptPrintHelp(poptContext con, FILE * fp, /[EMAIL PROTECTED]@*/ int 
flags)
  +void poptPrintHelp(poptContext con, FILE * fp, /[EMAIL PROTECTED]@*/ 
UNUSED(int flags))
   {
       columns_t columns = calloc((size_t)1, sizeof(*columns));
       int xx;
  @@ -866,7 +867,7 @@
       return len;
   }
   
  -void poptPrintUsage(poptContext con, FILE * fp, /[EMAIL PROTECTED]@*/ int 
flags)
  +void poptPrintUsage(poptContext con, FILE * fp, /[EMAIL PROTECTED]@*/ 
UNUSED(int flags))
   {
       columns_t columns = calloc((size_t)1, sizeof(*columns));
       struct poptDone_s done_buf;
  @@ .
  patch -p0 <<'@@ .'
  Index: popt/poptparse.c
  ============================================================================
  $ cvs diff -u -r1.28 -r1.29 poptparse.c
  --- popt/poptparse.c  16 Feb 2008 20:57:38 -0000      1.28
  +++ popt/poptparse.c  8 Mar 2008 17:26:30 -0000       1.29
  @@ -126,7 +126,8 @@
    * 2== line to long
    * 3== umm.... more?
    */
  -int poptConfigFileToString(FILE *fp, char ** argstrp, /[EMAIL PROTECTED]@*/ 
int flags)
  +int poptConfigFileToString(FILE *fp, char ** argstrp,
  +             /[EMAIL PROTECTED]@*/ UNUSED(int flags))
   {
       char line[999];
       char * argstr;
  @@ .
  patch -p0 <<'@@ .'
  Index: popt/system.h
  ============================================================================
  $ cvs diff -u -r1.12 -r1.13 system.h
  --- popt/system.h     4 Nov 2007 15:57:20 -0000       1.12
  +++ popt/system.h     8 Mar 2008 17:26:30 -0000       1.13
  @@ -82,4 +82,9 @@
   #define      getenv(_s)      __secure_getenv(_s)
   #endif
   
  +#ifndef __GNUC__
  +#define __attribute__(x) 
  +#endif
  +#define UNUSED(x) x __attribute__((__unused__))
  +
   #include "popt.h"
  @@ .
  patch -p0 <<'@@ .'
  Index: popt/test1.c
  ============================================================================
  $ cvs diff -u -r1.34 -r1.35 test1.c
  --- popt/test1.c      17 Feb 2008 00:53:49 -0000      1.34
  +++ popt/test1.c      8 Mar 2008 17:26:30 -0000       1.35
  @@ -6,8 +6,8 @@
   
   /[EMAIL PROTECTED]@*/
   static int pass2 = 0;
  -static void option_callback(/[EMAIL PROTECTED]@*/ poptContext con,
  -             /[EMAIL PROTECTED]@*/ enum poptCallbackReason reason,
  +static void option_callback(/[EMAIL PROTECTED]@*/ UNUSED(poptContext con),
  +             /[EMAIL PROTECTED]@*/ UNUSED(enum poptCallbackReason reason),
                const struct poptOption * opt,
                char * arg, void * data)
        /[EMAIL PROTECTED] fileSystem @*/
  @@ .
______________________________________________________________________
RPM Package Manager                                    http://rpm5.org
CVS Sources Repository                                rpm-cvs@rpm5.org

Reply via email to