kopia lustrzana https://github.com/ha7ilm/csdr
make it more generic
rodzic
ecf5527d9d
commit
e282ed4db3
11
csdr.c
11
csdr.c
|
@ -188,7 +188,7 @@ char usage[]=
|
|||
|
||||
int env_csdr_fixed_bufsize = 1024;
|
||||
int env_csdr_fixed_big_bufsize = 1024*16;
|
||||
#if __FreeBSD__
|
||||
#if !__linux__
|
||||
int env_csdr_dynamic_bufsize_on = 1;
|
||||
#else
|
||||
int env_csdr_dynamic_bufsize_on = 0;
|
||||
|
@ -373,8 +373,7 @@ int initialize_buffers()
|
|||
|
||||
if(the_bufsize<=4096) //this is hacky, should be done correctly
|
||||
{
|
||||
#if __FreeBSD__
|
||||
#else
|
||||
#if __linux__
|
||||
fcntl(STDIN_FILENO, F_SETPIPE_SZ, 4096);
|
||||
fcntl(STDOUT_FILENO, F_SETPIPE_SZ, 4096);
|
||||
#endif
|
||||
|
@ -387,8 +386,7 @@ int sendbufsize(int size)
|
|||
{
|
||||
if(size<=4096)
|
||||
{
|
||||
#if __FreeBSD__
|
||||
#else
|
||||
#if __linux__
|
||||
fcntl(STDOUT_FILENO, F_SETPIPE_SZ, 4096);
|
||||
#endif
|
||||
}
|
||||
|
@ -436,8 +434,7 @@ int main(int argc, char *argv[])
|
|||
if(argc<=1) return badsyntax(0);
|
||||
if(!strcmp(argv[1],"--help")) return badsyntax(0);
|
||||
|
||||
#if __FreeBSD__
|
||||
#else
|
||||
#if __linux__
|
||||
fcntl(STDIN_FILENO, F_SETPIPE_SZ, 65536*32);
|
||||
fcntl(STDOUT_FILENO, F_SETPIPE_SZ, 65536*32);
|
||||
#endif
|
||||
|
|
Ładowanie…
Reference in New Issue