comparison rogue3/main.c @ 29:da77eb183951

rogue3: allow load and user count checks to be compiled out
author edwarj4
date Tue, 29 Dec 2009 12:45:38 +0000
parents a86ae56e1ed6
children 09da55b986ca
comparison
equal deleted inserted replaced
28:03c99f5ee38a 29:da77eb183951
426 int 426 int
427 too_much() 427 too_much()
428 { 428 {
429 double avec[3]; 429 double avec[3];
430 430
431 #ifdef MAXLOAD
431 if (md_loadav(avec) == 0) 432 if (md_loadav(avec) == 0)
432 return (avec[2] > (MAXLOAD / 10.0)); 433 return (avec[2] > (MAXLOAD / 10.0));
433 else 434 #endif
434 return (md_ucount() > MAXUSERS); 435 #ifdef MAXUSERS
436 return (md_ucount() > MAXUSERS);
437 #endif
438 return 0;
435 } 439 }
436 440
437 /* 441 /*
438 * see if a user is an author of the program 442 * see if a user is an author of the program
439 */ 443 */