Changeset 2009 in ProjectBuilder
- Timestamp:
- Oct 5, 2015, 1:16:16 AM (10 years ago)
- Location:
- projects/buffer/pbconf/1.19
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
projects/buffer/pbconf/1.19/buffer.pb
r2008 r2009 18 18 # 19 19 # We use the PBURL macro for that 20 #pburl buffer = http://hello-penguin.com/software/buffer/buffer-1.19.tar.gz20 pburl buffer = http://hello-penguin.com/software/buffer/buffer-1.19.tar.gz 21 21 # Local copy in case of... 22 22 #pburl buffer = ftp://ftp.mondorescue.org/src/buffer-1.19.tgz -
projects/buffer/pbconf/1.19/buffer/pbpatch/01-debian-patches.all
r1188 r2009 20 20 * Now tries to fill this with blocks. 21 21 * reader waits for writer to terminate and then frees the shared mem and sems. 22 @@ -109,6 +109, 9@@22 @@ -109,6 +109,10 @@ 23 23 * Initial revision 24 24 * … … 27 27 +#include <string.h> 28 28 +#include <limits.h> 29 +#include <sys/time.h> 29 30 #include <unistd.h> 30 31 #include <stdio.h> 31 32 #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 @@ 54 34 #define K *1024 55 35 #define M *1024*1024 … … 66 46 void byee(); 67 47 void start_reader_and_writer(); 68 @@ -162,7 +174,7 @@ void write_block_to_stdout();48 @@ -162,7 +174,7 @@ 69 49 void pr_out(); 70 50 void end_writer(); … … 75 55 #define PRINT_EVERY 10 K 76 56 77 @@ -253,7 +265,9 @@ char *progname = "buffer";57 @@ -253,7 +265,9 @@ 78 58 79 59 char print_total = 0; … … 86 66 int 87 67 main( argc, argv ) 88 @@ -265,6 +279,8 @@ main( argc, argv )68 @@ -265,6 +279,8 @@ 89 69 set_handlers(); 90 70 … … 95 75 start_reader_and_writer(); 96 76 97 @@ -290,7 +306,7 @@ parse_args( argc, argv )77 @@ -290,7 +306,7 @@ 98 78 99 79 while( (c = getopt( argc, argv, "BS:Zdm:s:b:p:u:ti:o:z:" )) != -1 ){ … … 104 84 break; 105 85 case 'u': /* pause after write for given microseconds */ 106 @@ -387,8 +403,8 @@ parse_args( argc, argv )86 @@ -387,8 +403,8 @@ 107 87 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", 108 88 progname ); … … 115 95 fprintf( stderr, "-b num = number of blocks in queue\n" ); 116 96 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 @@ 118 98 byee( -1 ); 119 99 } … … 127 107 if (zflag) showevery = blocksize; 128 108 129 @@ -510,9 +531,9 @@ buffer_allocate()109 @@ -510,9 +531,9 @@ 130 110 get_buffer(); 131 111 … … 139 119 #ifdef SYS5 140 120 memset( (char *)pbuffer, '\0', buffer_size ); 141 @@ -531,7 +552,17 @@ buffer_allocate()121 @@ -531,7 +552,17 @@ 142 122 pbuffer->blocks_free_lock = 1; 143 123 /* start this off so lock() can be called on it for each block … … 157 137 /* Detattach the shared memory so the fork doesnt do anything odd */ 158 138 shmdt( (char *)pbuffer ); 159 @@ -651,7 +682,7 @@ get_next_free_block()139 @@ -651,7 +682,7 @@ 160 140 int 161 141 fill_block() … … 166 146 int toread; 167 147 static char eof_reached = 0; 168 @@ -710,7 +741,7 @@ writer()148 @@ -710,7 +741,7 @@ 169 149 { 170 150 int filled = 0; … … 175 155 if( debug ) 176 156 fprintf( stderr, "\tW: Entering writer\n blocks = %d\n maxfilled = %d\n", 177 @@ -745,7 +776,7 @@ writer()157 @@ -745,7 +776,7 @@ 178 158 } 179 159 … … 184 164 185 165 if( debug ) 186 @@ -786,14 +817,14 @@ write_blocks_to_stdout( filled, first_bl166 @@ -786,14 +817,14 @@ 187 167 void 188 168 write_block_to_stdout() … … 202 182 next_k = showevery; 203 183 } 204 @@ -801,7 +832,7 @@ write_block_to_stdout()184 @@ -801,7 +832,7 @@ 205 185 if( (written = write( fdout, curr_block->data, curr_block->bytes )) != curr_block->bytes ){ 206 186 report_proc(); … … 211 191 } 212 192 213 @@ -828,7 +859,7 @@ write_block_to_stdout()193 @@ -828,7 +859,7 @@ 214 194 } 215 195 if( showevery ){ … … 220 200 if( outk >= next_k ){ 221 201 pr_out(); 222 @@ -917,13 +948,12 @@ int202 @@ -917,13 +948,12 @@ 223 203 do_size( arg ) 224 204 char *arg; … … 238 218 case 'M': 239 219 ret = ret K K; 240 @@ -944,7 +974,36 @@ do_size( arg )220 @@ -944,7 +974,36 @@ 241 221 void 242 222 pr_out() … … 279 259 --- buffer-1.19.orig/buffer.man 2000-01-04 03:44:32.000000000 +0100 280 260 +++ 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. T261 @@ -37,7 +37,8 @@ 282 262 Use the given file as the output file. The default is stdout. 283 263 .TP … … 289 269 .TP 290 270 .B \-s size 291 @@ -71,9 +72,9 @@ After every write pause for this many mi271 @@ -71,9 +72,9 @@ 292 272 throughput on some drives.) 293 273 .TP … … 301 281 .B \-t 302 282 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 @@ 304 284 .B \-Z 305 285 If reading/writing directly to a character device (like a tape drive) … … 529 509 #include <sys/stat.h> 530 510 #include <sys/ipc.h> 531 @@ -103,7 +119,7 @@ new_sems( nsems )511 @@ -103,7 +119,7 @@ 532 512 return sem; 533 513 } … … 538 518 int sem_id; 539 519 struct sembuf *pbuf; 540 @@ -15 7,10 +173,13 @@ void520 @@ -156,10 +157,13 @@ 541 521 remove_sems( sem_id ) 542 522 int sem_id; … … 547 527 return; 548 528 549 - if( semctl( sem_id, 0, IPC_RMID, (union semun)0) == -1 ){529 - if( semctl( sem_id, 0, IPC_RMID, NULL ) == -1 ){ 550 530 + arg.val = 0; 551 531 + if( semctl( sem_id, 0, IPC_RMID, arg ) == -1 ){ -
projects/buffer/pbconf/1.19/pbfilter/rpm.pbf
r2008 r2009 22 22 #filter PBOBS = 23 23 24 filter PBBREQ = BuildRequires: gcc \nBuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)24 filter PBBREQ = BuildRequires: gcc$/BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
Note:
See TracChangeset
for help on using the changeset viewer.