Changeset 2009 for projects


Ignore:
Timestamp:
Oct 5, 2015, 1:16:16 AM (3 years ago)
Author:
bruno
Message:
  • Fix fedora build using the upstream buffer code and adapting patches
Location:
projects/buffer/pbconf/1.19
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • projects/buffer/pbconf/1.19/buffer.pb

    r2008 r2009  
    1818#
    1919# We use the PBURL macro for that
    20 #pburl buffer = http://hello-penguin.com/software/buffer/buffer-1.19.tar.gz
     20pburl buffer = http://hello-penguin.com/software/buffer/buffer-1.19.tar.gz
    2121# Local copy in case of...
    2222#pburl buffer = ftp://ftp.mondorescue.org/src/buffer-1.19.tgz
  • projects/buffer/pbconf/1.19/buffer/pbpatch/01-debian-patches.all

    r1188 r2009  
    2020  * Now tries to fill this with blocks.
    2121  * reader waits for writer to terminate and then frees the shared mem and sems.
    22 @@ -109,6 +109,9 @@
     22@@ -109,6 +109,10 @@
    2323  * Initial revision
    2424  *
     
    2727+#include <string.h>
    2828+#include <limits.h>
     29+#include <sys/time.h>
    2930 #include <unistd.h>
    3031 #include <stdio.h>
    3132 #include <signal.h>
    32 @@ -120,17 +123,16 @@
    33  #include <sys/shm.h>
    34  #include <sys/sem.h>
    35  #include <sys/wait.h>
    36 +#include <sys/time.h>
    37  #include "sem.h"
    38  
    39  #ifndef lint
    40  static char *rcsid = "$Header: /a/swan/home/swan/staff/csg/lmjm/src/buffer/RCS/buffer.c,v 1.19 1995/08/24 17:46:28 lmjm Exp lmjm $";
    41  #endif
    42  
    43 -#ifndef __alpha
    44 -#ifndef __ia64
    45 +#ifndef __linux
    46  extern char *shmat();
    47 -#endif /* __ia64 */
    48 -#endif /* __alpha */
    49 +#endif /* __linux */
    50  
    51  /* General macros */
    52  #define TRUE 1
    53 @@ -139,6 +143,14 @@ extern char *shmat();
     33@@ -139,6 +143,14 @@
    5434 #define K *1024
    5535 #define M *1024*1024
     
    6646 void byee();
    6747 void start_reader_and_writer();
    68 @@ -162,7 +174,7 @@ void write_block_to_stdout();
     48@@ -162,7 +174,7 @@
    6949 void pr_out();
    7050 void end_writer();
     
    7555 #define PRINT_EVERY 10 K
    7656 
    77 @@ -253,7 +265,9 @@ char *progname = "buffer";
     57@@ -253,7 +265,9 @@
    7858 
    7959 char print_total = 0;
     
    8666 int
    8767 main( argc, argv )
    88 @@ -265,6 +279,8 @@ main( argc, argv )
     68@@ -265,6 +279,8 @@
    8969    set_handlers();
    9070 
     
    9575    start_reader_and_writer();
    9676 
    97 @@ -290,7 +306,7 @@ parse_args( argc, argv )
     77@@ -290,7 +306,7 @@
    9878 
    9979    while( (c = getopt( argc, argv, "BS:Zdm:s:b:p:u:ti:o:z:" )) != -1 ){
     
    10484            break;
    10585        case 'u': /* pause after write for given microseconds */
    106 @@ -387,8 +403,8 @@ parse_args( argc, argv )
     86@@ -387,8 +403,8 @@
    10787            fprintf( stderr, "Usage: %s [-B] [-t] [-S size] [-m memsize] [-b blocks] [-p percent] [-s blocksize] [-u pause] [-i infile] [-o outfile] [-z size]\n",
    10888                progname );
     
    11595            fprintf( stderr, "-b num = number of blocks in queue\n" );
    11696            fprintf( stderr, "-p percent = don't start writing until percent blocks filled\n" );
    117 @@ -400,6 +416,11 @@ parse_args( argc, argv )
     97@@ -400,6 +416,11 @@
    11898            byee( -1 );
    11999        }
     
    127107    if (zflag) showevery = blocksize;
    128108 
    129 @@ -510,9 +531,9 @@ buffer_allocate()
     109@@ -510,9 +531,9 @@
    130110    get_buffer();
    131111 
     
    139119 #ifdef SYS5
    140120    memset( (char *)pbuffer, '\0', buffer_size );
    141 @@ -531,7 +552,17 @@ buffer_allocate()
     121@@ -531,7 +552,17 @@
    142122    pbuffer->blocks_free_lock = 1;
    143123    /* start this off so lock() can be called on it for each block
     
    157137    /* Detattach the shared memory so the fork doesnt do anything odd */
    158138    shmdt( (char *)pbuffer );
    159 @@ -651,7 +682,7 @@ get_next_free_block()
     139@@ -651,7 +682,7 @@
    160140 int
    161141 fill_block()
     
    166146    int toread;
    167147    static char eof_reached = 0;
    168 @@ -710,7 +741,7 @@ writer()
     148@@ -710,7 +741,7 @@
    169149 {
    170150    int filled = 0;
     
    175155    if( debug )
    176156        fprintf( stderr, "\tW: Entering writer\n blocks = %d\n maxfilled = %d\n",
    177 @@ -745,7 +776,7 @@ writer()
     157@@ -745,7 +776,7 @@
    178158    }
    179159 
     
    184164 
    185165    if( debug )
    186 @@ -786,14 +817,14 @@ write_blocks_to_stdout( filled, first_bl
     166@@ -786,14 +817,14 @@
    187167 void
    188168 write_block_to_stdout()
     
    202182        next_k = showevery;
    203183    }
    204 @@ -801,7 +832,7 @@ write_block_to_stdout()
     184@@ -801,7 +832,7 @@
    205185    if( (written = write( fdout, curr_block->data, curr_block->bytes )) != curr_block->bytes ){
    206186        report_proc();
     
    211191    }
    212192 
    213 @@ -828,7 +859,7 @@ write_block_to_stdout()
     193@@ -828,7 +859,7 @@
    214194    }
    215195    if( showevery ){
     
    220200        if( outk >= next_k ){
    221201            pr_out();
    222 @@ -917,13 +948,12 @@ int
     202@@ -917,13 +948,12 @@
    223203 do_size( arg )
    224204    char *arg;
     
    238218    case 'M':
    239219        ret = ret K K;
    240 @@ -944,7 +974,36 @@ do_size( arg )
     220@@ -944,7 +974,36 @@
    241221 void
    242222 pr_out()
     
    279259--- buffer-1.19.orig/buffer.man 2000-01-04 03:44:32.000000000 +0100
    280260+++ buffer-1.19/buffer.man  2008-09-20 01:18:48.000000000 +0200
    281 @@ -37,7 +37,8 @@ Use the given file as the input file.  T
     261@@ -37,7 +37,8 @@
    282262 Use the given file as the output file.  The default is stdout.
    283263 .TP
     
    289269 .TP
    290270 .B \-s size
    291 @@ -71,9 +72,9 @@ After every write pause for this many mi
     271@@ -71,9 +72,9 @@
    292272 throughput on some drives.)
    293273 .TP
     
    301281 .B \-t
    302282 On exiting print to stderr a brief message showing the total number of
    303 @@ -82,7 +83,7 @@ bytes written.
     283@@ -82,7 +83,7 @@
    304284 .B \-Z
    305285 If reading/writing directly to a character device (like a tape drive)
     
    529509 #include <sys/stat.h>
    530510 #include <sys/ipc.h>
    531 @@ -103,7 +119,7 @@ new_sems( nsems )
     511@@ -103,7 +119,7 @@
    532512    return sem;
    533513 }
     
    538518    int sem_id;
    539519    struct sembuf *pbuf;
    540 @@ -157,10 +173,13 @@ void
     520@@ -156,10 +157,13 @@
    541521 remove_sems( sem_id )
    542522    int sem_id;
     
    547527        return;
    548528 
    549 -   if( semctl( sem_id, 0, IPC_RMID, (union semun)0 ) == -1 ){
     529-   if( semctl( sem_id, 0, IPC_RMID, NULL ) == -1 ){
    550530+   arg.val = 0;
    551531+   if( semctl( sem_id, 0, IPC_RMID, arg ) == -1 ){
  • projects/buffer/pbconf/1.19/pbfilter/rpm.pbf

    r2008 r2009  
    2222#filter PBOBS =
    2323
    24 filter PBBREQ = BuildRequires:  gcc\nBuildRoot:      %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
     24filter PBBREQ = BuildRequires:  gcc$/BuildRoot:      %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
Note: See TracChangeset for help on using the changeset viewer.