OpenPKG CVS Repository
  http://cvs.openpkg.org/
  ____________________________________________________________________________

  Server: cvs.openpkg.org                  Name:   Christoph Schug
  Root:   /v/openpkg/cvs                   Email:  [EMAIL PROTECTED]
  Module: openpkg-src                      Date:   05-Aug-2007 08:08:10
  Branch: HEAD                             Handle: 2007080507080900

  Modified files:
    openpkg-src/pv          pv.patch pv.spec

  Log:
    upgrading package: pv 0.9.9 -> 1.0.1

  Summary:
    Revision    Changes     Path
    1.5         +47 -43     openpkg-src/pv/pv.patch
    1.34        +2  -2      openpkg-src/pv/pv.spec
  ____________________________________________________________________________

  patch -p0 <<'@@ .'
  Index: openpkg-src/pv/pv.patch
  ============================================================================
  $ cvs diff -u -r1.4 -r1.5 pv.patch
  --- openpkg-src/pv/pv.patch   5 Feb 2007 08:02:57 -0000       1.4
  +++ openpkg-src/pv/pv.patch   5 Aug 2007 06:08:09 -0000       1.5
  @@ -1,15 +1,16 @@
  -Index: src/main/file.c
  ---- src/main/file.c.orig     2007-02-05 01:06:47 +0100
  -+++ src/main/file.c  2007-02-05 08:53:41 +0100
  -@@ -27,20 +27,20 @@
  +Index: src/pv/file.c
  +--- src/pv/file.c.orig       2007-08-04 22:37:30 +0200
  ++++ src/pv/file.c    2007-08-05 08:03:14 +0200
  +@@ -30,27 +30,27 @@
     */
  - void main_getsize(opts_t opts)
  + void pv_calc_total_size(opts_t opts)
    {
   -    struct stat64 sb;
   +    struct stat sb;
  -     int i, fd;
  +     int rc, i, j, fd;
    
        opts->size = 0;
  +     rc = 0;
    
        if (opts->argc < 1) {
   -            if (fstat64(STDIN_FILENO, &sb) == 0)
  @@ -20,34 +21,37 @@
    
        for (i = 0; i < opts->argc; i++) {
                if (strcmp(opts->argv[i], "-") == 0) {
  --                    if (fstat64(STDIN_FILENO, &sb) == 0) {
  -+                    if (fstat(STDIN_FILENO, &sb) == 0) {
  -                             opts->size = sb.st_size;
  -                     } else {
  +-                    rc = fstat64(STDIN_FILENO, &sb);
  ++                    rc = fstat(STDIN_FILENO, &sb);
  +                     if (rc != 0) {
                                opts->size = 0;
  -@@ -48,16 +48,16 @@
  +                             return;
                        }
  +             } else {
  +-                    rc = stat64(opts->argv[i], &sb);
  ++                    rc = stat(opts->argv[i], &sb);
  +                     if (rc == 0)
  +                             rc = access(opts->argv[i], R_OK);
                }
  - 
  --            if (stat64(opts->argv[i], &sb) == 0) {
  -+            if (stat(opts->argv[i], &sb) == 0) {
  -                     if (S_ISBLK(sb.st_mode)) {
  -                             /*
  -                              * Get the size of block devices by opening
  -                              * them and seeking to the end.
  -                              */
  +@@ -72,12 +72,12 @@
  +                      * them and seeking to the end.
  +                      */
  +                     if (strcmp(opts->argv[i], "-") == 0) {
  +-                            fd = open64("/dev/stdin", O_RDONLY);
  ++                            fd = open("/dev/stdin", O_RDONLY);
  +                     } else {
   -                            fd = open64(opts->argv[i], O_RDONLY);
   +                            fd = open(opts->argv[i], O_RDONLY);
  -                             if (fd >= 0) {
  -                                     opts->size +=
  --                                        lseek64(fd, 0, SEEK_END);
  -+                                        lseek(fd, 0, SEEK_END);
  -                                     close(fd);
  -                             }
  -                     } else {
  -@@ -76,8 +76,8 @@
  +                     }
  +                     if (fd >= 0) {
  +-                            opts->size += lseek64(fd, 0, SEEK_END);
  ++                            opts->size += lseek(fd, 0, SEEK_END);
  +                             close(fd);
  +                     }
  +             } else {
  +@@ -95,8 +95,8 @@
     */
  - int main_nextfd(opts_t opts, int filenum, int oldfd)
  + int pv_next_file(opts_t opts, int filenum, int oldfd)
    {
   -    struct stat64 isb;
   -    struct stat64 osb;
  @@ -56,7 +60,7 @@
        int fd;
    
        if (oldfd > 0) {
  -@@ -99,7 +99,7 @@
  +@@ -118,7 +118,7 @@
        if (strcmp(opts->argv[filenum], "-") == 0) {
                fd = STDIN_FILENO;
        } else {
  @@ -65,7 +69,7 @@
                if (fd < 0) {
                        fprintf(stderr, "%s: %s: %s: %s\n",
                                opts->program_name,
  -@@ -109,7 +109,7 @@
  +@@ -128,7 +128,7 @@
                }
        }
    
  @@ -74,7 +78,7 @@
                fprintf(stderr, "%s: %s: %s: %s\n",
                        opts->program_name,
                        _("failed to stat file"),
  -@@ -118,7 +118,7 @@
  +@@ -137,7 +137,7 @@
                return -1;
        }
    
  @@ -83,10 +87,10 @@
                fprintf(stderr, "%s: %s: %s\n",
                        opts->program_name,
                        _("failed to stat output file"), strerror(errno));
  -Index: src/main/main.c
  ---- src/main/main.c.orig     2007-02-05 01:06:47 +0100
  -+++ src/main/main.c  2007-02-05 08:54:34 +0100
  -@@ -68,7 +68,7 @@
  +Index: src/pv/loop.c
  +--- src/pv/loop.c.orig       2007-08-04 22:37:30 +0200
  ++++ src/pv/loop.c    2007-08-05 08:04:05 +0200
  +@@ -37,7 +37,7 @@
        struct timeval start_time, next_update, next_reset, cur_time;
        struct timeval init_time;
        long double elapsed, tilreset;
  @@ -95,12 +99,12 @@
        int fd, n;
    
        fd = -1;
  -@@ -105,7 +105,7 @@
  -             fd = main_nextfd(opts, n, -1);
  -             if (fd < 0)
  -                     return 1;
  --            if (fstat64(fd, &sb) == 0) {
  -+            if (fstat(fd, &sb) == 0) {
  -                     main_transfer_bufsize(sb.st_blksize * 32, 0);
  -             }
  +@@ -73,7 +73,7 @@
  +             return 1;
        }
  + 
  +-    if (fstat64(fd, &sb) == 0) {
  ++    if (fstat(fd, &sb) == 0) {
  +             pv_set_buffer_size(sb.st_blksize * 32, 0);
  +     }
  + 
  @@ .
  patch -p0 <<'@@ .'
  Index: openpkg-src/pv/pv.spec
  ============================================================================
  $ cvs diff -u -r1.33 -r1.34 pv.spec
  --- openpkg-src/pv/pv.spec    5 Feb 2007 08:02:57 -0000       1.33
  +++ openpkg-src/pv/pv.spec    5 Aug 2007 06:08:09 -0000       1.34
  @@ -32,8 +32,8 @@
   Class:        EVAL
   Group:        System
   License:      GPL
  -Version:      0.9.9
  -Release:      20070205
  +Version:      1.0.1
  +Release:      20070805
   
   #   list of sources
   Source0:      
http://switch.dl.sourceforge.net/pipeviewer/pv-%{version}.tar.gz
  @@ .
______________________________________________________________________
OpenPKG                                             http://openpkg.org
CVS Repository Commit List                     openpkg-cvs@openpkg.org

Reply via email to