Skip to content

Commit e282ed4

Browse files
committed
make it more generic
1 parent ecf5527 commit e282ed4

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

csdr.c

+4-7
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ char usage[]=
188188

189189
int env_csdr_fixed_bufsize = 1024;
190190
int env_csdr_fixed_big_bufsize = 1024*16;
191-
#if __FreeBSD__
191+
#if !__linux__
192192
int env_csdr_dynamic_bufsize_on = 1;
193193
#else
194194
int env_csdr_dynamic_bufsize_on = 0;
@@ -373,8 +373,7 @@ int initialize_buffers()
373373

374374
if(the_bufsize<=4096) //this is hacky, should be done correctly
375375
{
376-
#if __FreeBSD__
377-
#else
376+
#if __linux__
378377
fcntl(STDIN_FILENO, F_SETPIPE_SZ, 4096);
379378
fcntl(STDOUT_FILENO, F_SETPIPE_SZ, 4096);
380379
#endif
@@ -387,8 +386,7 @@ int sendbufsize(int size)
387386
{
388387
if(size<=4096)
389388
{
390-
#if __FreeBSD__
391-
#else
389+
#if __linux__
392390
fcntl(STDOUT_FILENO, F_SETPIPE_SZ, 4096);
393391
#endif
394392
}
@@ -436,8 +434,7 @@ int main(int argc, char *argv[])
436434
if(argc<=1) return badsyntax(0);
437435
if(!strcmp(argv[1],"--help")) return badsyntax(0);
438436

439-
#if __FreeBSD__
440-
#else
437+
#if __linux__
441438
fcntl(STDIN_FILENO, F_SETPIPE_SZ, 65536*32);
442439
fcntl(STDOUT_FILENO, F_SETPIPE_SZ, 65536*32);
443440
#endif

0 commit comments

Comments
 (0)