make it more generic

pull/54/head
Zane C. Bowers-Hadley 2020-03-01 05:36:31 -06:00
rodzic ecf5527d9d
commit e282ed4db3
1 zmienionych plików z 4 dodań i 7 usunięć

11
csdr.c
Wyświetl plik

@ -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