Changeset 171 for trunk/src/sh_getopt.c
- Timestamp:
- Jul 8, 2008, 11:16:14 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/sh_getopt.c
r170 r171 315 315 static void sh_getopt_print_log_facilities (void) 316 316 { 317 fputs (_("Compiled-in log facilities:"), stdout); 317 int num = 0; 318 319 fputs (_("Compiled-in log facilities:\n"), stdout); 318 320 319 321 #ifndef DEFAULT_CONSOLE 320 printf (_(" console (/dev/console)")); 322 if (num > 0) fputc ('\n', stdout); 323 printf (_(" console (/dev/console)")); ++num; 321 324 #else 325 if (num > 0) fputc ('\n', stdout); 322 326 if (0 == strcmp (DEFAULT_CONSOLE, _("NULL"))) 323 printf (_(" console (/dev/console)"));327 { printf (_("console (/dev/console)")); ++num; } 324 328 else 325 printf (_(" console (%s)"), DEFAULT_CONSOLE); 326 #endif 327 fputs (_(", syslog"), stdout); 328 printf (_(", logfile (%s)"), DEFAULT_ERRFILE); 329 { printf (_("console (%s)"), DEFAULT_CONSOLE); ++num; } 330 #endif 331 if (num > 0) fputc ('\n', stdout); 332 fputs (_(" syslog"), stdout); ++num; 333 if (num > 0) fputc ('\n', stdout); 334 printf (_(" logfile (%s)"), DEFAULT_ERRFILE); ++num; 329 335 330 336 #if defined(WITH_EXTERNAL) 331 fputs (_(", external program"), stdout); 337 if (num > 0) fputc ('\n', stdout); 338 fputs (_(" external program"), stdout); ++num; 332 339 #endif 333 340 334 341 #if defined(WITH_MESSAGE_QUEUE) 335 fputs (_(", message queue"), stdout); 342 if (num > 0) fputc ('\n', stdout); 343 fputs (_(" message queue"), stdout); ++num; 336 344 #endif 337 345 338 346 #if defined(WITH_DATABASE) 339 fputs (_(", database"), stdout); 347 if (num > 0) fputc ('\n', stdout); 348 fputs (_(" database"), stdout); ++num; 340 349 #ifdef WITH_ODBC 341 350 fputs (_(" (odbc)"), stdout); … … 353 362 354 363 #if defined(SH_WITH_CLIENT) || defined(SH_WITH_SERVER) 355 fputs (_(", server"), stdout); 364 if (num > 0) fputc ('\n', stdout); 365 fputs (_(" server"), stdout); ++num; 356 366 #endif 357 367 358 368 #if defined(SH_WITH_MAIL) 359 fputs (_(", email"), stdout); 369 if (num > 0) fputc ('\n', stdout); 370 fputs (_(" email"), stdout); ++num; 360 371 #endif 361 372 362 373 #ifdef HAVE_LIBPRELUDE 374 if (num > 0) fputc ('\n', stdout); ++num; 363 375 #ifdef HAVE_LIBPRELUDE_8 364 fputs (_(" ,prelude (0.8)"), stdout);376 fputs (_(" prelude (0.8)"), stdout); 365 377 #else 366 fputs (_(", prelude (0.9+)"), stdout); 367 #endif 368 #endif 369 370 fputc ('\n', stdout); 371 return; 372 } 373 374 static void sh_getopt_print_options (void) 375 { 376 int num = 0; 377 378 379 #if defined(SH_STANDALONE) 380 if (num > 0) fputc ('\n', stdout); 381 fputs (_("Standalone executable"), stdout); ++num; 382 #endif 383 #if defined(SH_WITH_CLIENT) 384 if (num > 0) fputc ('\n', stdout); 385 printf (_("Client executable (port %d)"), SH_DEFAULT_PORT); ++num; 386 #endif 387 #if defined(SH_WITH_CLIENT) 388 if (num > 0) fputc ('\n', stdout); 389 printf (_("Server executable (port %d, user %s)"), 390 SH_DEFAULT_PORT, DEFAULT_IDENT); 391 ++num; 392 #endif 393 394 fputs (_(", compiled-in options:"), stdout); 395 396 #if defined(HAVE_EGD_RANDOM) 397 if (num > 0) fputc ('\n', stdout); 398 printf (_(" use entropy gathering daemon (%s)"), EGD_SOCKET_NAME); ++num; 399 #endif 400 #if defined(HAVE_UNIX_RANDOM) 401 if (num > 0) fputc ('\n', stdout); 402 fputs (_(" use unix entropy gatherer"), stdout); ++num; 403 #endif 404 #if defined(HAVE_URANDOM) 405 if (num > 0) fputc ('\n', stdout); 406 printf (_(" use entropy device (%s)"), NAME_OF_DEV_RANDOM); ++num; 407 #endif 408 409 #ifdef WITH_GPG 410 if (num > 0) fputc ('\n', stdout); 411 printf (_(" GnuPG signatures (%s)"), DEFAULT_GPG_PATH); ++num; 412 #ifdef HAVE_GPG_CHECKSUM 413 if (num > 0) fputc ('\n', stdout); 414 printf (_(" -- GnuPG checksum: %s"), GPG_HASH); ++num; 415 #endif 416 #ifdef USE_FINGERPRINT 417 if (num > 0) fputc ('\n', stdout); 418 printf (_(" -- Key fingerprint: %s"), SH_GPG_FP); ++num; 419 #endif 420 #endif 421 422 #if defined(SL_DEBUG) 423 if (num > 0) fputc ('\n', stdout); 424 fputs (_(" debug build (don't use for production)"), stdout); ++num; 425 #endif 426 #if defined(SCREW_IT_UP) 427 if (num > 0) fputc ('\n', stdout); 428 fputs (_(" anti-debugger"), stdout); ++num; 429 #endif 430 #if defined(SH_USE_XML) 431 if (num > 0) fputc ('\n', stdout); 432 fputs (_(" xml log format"), stdout); ++num; 433 #endif 434 #if defined(HAVE_NTIME) 435 if (num > 0) fputc ('\n', stdout); 436 fputs (_(" use time server"), stdout); ++num; 437 #endif 438 439 #if defined(SH_WITH_CLIENT) || defined(SH_STANDALONE) 440 #if defined(HAVE_LIBZ) 441 if (num > 0) fputc ('\n', stdout); 442 fputs (_(" optionally store full text for files"), stdout); ++num; 443 #endif 444 #if defined(USE_XATTR) 445 if (num > 0) fputc ('\n', stdout); 446 fputs (_(" check SELinux attributes"), stdout); ++num; 447 #endif 448 #if defined(USE_ACL) 449 if (num > 0) fputc ('\n', stdout); 450 fputs (_(" check Posix ACLs"), stdout); ++num; 451 #endif 452 #if defined(RELOAD_DATABASE) 453 if (num > 0) fputc ('\n', stdout); 454 fputs (_(" fetch database on reload"), stdout); ++num; 455 #endif 456 #endif 457 458 #if defined(SH_WITH_SERVER) 459 460 #if !defined(HAVE_GETPEEREID) && !defined(SO_PEERCRED) && !defined(HAVE_STRUCT_CMSGCRED) && !defined(HAVE_STRUCT_FCRED) && !(defined(HAVE_STRUCT_SOCKCRED) && defined(LOCAL_CREDS)) 461 if (num > 0) fputc ('\n', stdout); 462 fputs (_(" command socket authentication: use SetSocketPassword"), stdout); 463 ++num; 464 #else 465 if (num > 0) fputc ('\n', stdout); 466 fputs (_(" command socket authentication: use SetSocketAllowUID"), stdout); 467 ++num; 468 #endif 469 470 #if defined(SH_USE_LIBWRAP) 471 if (num > 0) fputc ('\n', stdout); 472 fputs (_(" support tcp wrapper"), stdout); ++num; 473 #endif 474 #if defined(INET_SYSLOG) 475 if (num > 0) fputc ('\n', stdout); 476 fputs (_(" support listening on 514/udp (syslog)"), stdout); ++num; 378 fputs (_(" prelude (0.9+)"), stdout); 477 379 #endif 478 380 #endif … … 484 386 } 485 387 388 static void sh_getopt_print_options (void) 389 { 390 int num = 0; 391 392 393 #if defined(SH_STANDALONE) 394 if (num > 0) fputc ('\n', stdout); 395 fputs (_("Standalone executable"), stdout); ++num; 396 #endif 397 #if defined(SH_WITH_CLIENT) 398 if (num > 0) fputc ('\n', stdout); 399 printf (_("Client executable (port %d)"), SH_DEFAULT_PORT); ++num; 400 #endif 401 #if defined(SH_WITH_CLIENT) 402 if (num > 0) fputc ('\n', stdout); 403 printf (_("Server executable (port %d, user %s)"), 404 SH_DEFAULT_PORT, DEFAULT_IDENT); 405 ++num; 406 #endif 407 408 fputs (_(", compiled-in options:"), stdout); 409 410 #if defined(USE_DL_PREFIX) 411 if (num > 0) fputc ('\n', stdout); 412 printf (_(" using system malloc")); ++num; 413 #else 414 if (num > 0) fputc ('\n', stdout); 415 printf (_(" using dnmalloc")); ++num; 416 #endif 417 418 #if defined(HAVE_EGD_RANDOM) 419 if (num > 0) fputc ('\n', stdout); 420 printf (_(" using entropy gathering daemon (%s)"), EGD_SOCKET_NAME); ++num; 421 #endif 422 #if defined(HAVE_UNIX_RANDOM) 423 if (num > 0) fputc ('\n', stdout); 424 fputs (_(" using unix entropy gatherer"), stdout); ++num; 425 #endif 426 #if defined(HAVE_URANDOM) 427 if (num > 0) fputc ('\n', stdout); 428 printf (_(" using entropy device (%s)"), NAME_OF_DEV_RANDOM); ++num; 429 #endif 430 431 #ifdef WITH_GPG 432 if (num > 0) fputc ('\n', stdout); 433 printf (_(" GnuPG signatures (%s)"), DEFAULT_GPG_PATH); ++num; 434 #ifdef HAVE_GPG_CHECKSUM 435 if (num > 0) fputc ('\n', stdout); 436 printf (_(" -- GnuPG checksum: %s"), GPG_HASH); ++num; 437 #endif 438 #ifdef USE_FINGERPRINT 439 if (num > 0) fputc ('\n', stdout); 440 printf (_(" -- Key fingerprint: %s"), SH_GPG_FP); ++num; 441 #endif 442 #endif 443 444 #if defined(SL_DEBUG) 445 if (num > 0) fputc ('\n', stdout); 446 fputs (_(" debug build (do not use for production)"), stdout); ++num; 447 #endif 448 #if defined(SCREW_IT_UP) 449 if (num > 0) fputc ('\n', stdout); 450 fputs (_(" anti-debugger"), stdout); ++num; 451 #endif 452 #if defined(SH_USE_XML) 453 if (num > 0) fputc ('\n', stdout); 454 fputs (_(" xml log format"), stdout); ++num; 455 #endif 456 #if defined(HAVE_NTIME) 457 if (num > 0) fputc ('\n', stdout); 458 fputs (_(" using time server"), stdout); ++num; 459 #endif 460 461 #if defined(SH_WITH_CLIENT) || defined(SH_STANDALONE) 462 #if defined(HAVE_LIBZ) 463 if (num > 0) fputc ('\n', stdout); 464 fputs (_(" optionally store full text for files"), stdout); ++num; 465 #endif 466 #if defined(USE_XATTR) 467 if (num > 0) fputc ('\n', stdout); 468 fputs (_(" check SELinux attributes"), stdout); ++num; 469 #endif 470 #if defined(USE_ACL) 471 if (num > 0) fputc ('\n', stdout); 472 fputs (_(" check Posix ACLs"), stdout); ++num; 473 #endif 474 #if defined(RELOAD_DATABASE) 475 if (num > 0) fputc ('\n', stdout); 476 fputs (_(" fetch database on reload"), stdout); ++num; 477 #endif 478 #endif 479 480 #if defined(SH_WITH_SERVER) 481 482 #if !defined(HAVE_GETPEEREID) && !defined(SO_PEERCRED) && !defined(HAVE_STRUCT_CMSGCRED) && !defined(HAVE_STRUCT_FCRED) && !(defined(HAVE_STRUCT_SOCKCRED) && defined(LOCAL_CREDS)) 483 if (num > 0) fputc ('\n', stdout); 484 fputs (_(" command socket authentication: use SetSocketPassword"), stdout); 485 ++num; 486 #else 487 if (num > 0) fputc ('\n', stdout); 488 fputs (_(" command socket authentication: use SetSocketAllowUID"), stdout); 489 ++num; 490 #endif 491 492 #if defined(SH_USE_LIBWRAP) 493 if (num > 0) fputc ('\n', stdout); 494 fputs (_(" support tcp wrapper"), stdout); ++num; 495 #endif 496 #if defined(INET_SYSLOG) 497 if (num > 0) fputc ('\n', stdout); 498 fputs (_(" support listening on 514/udp (syslog)"), stdout); ++num; 499 #endif 500 #endif 501 502 if (num == 0) 503 fputs (_(" none"), stdout); 504 fputc ('\n', stdout); 505 return; 506 } 507 486 508 static void sh_getopt_print_modules (void) 487 509 { … … 489 511 int num = 0; 490 512 491 fputs (_("Compiled-in modules: "), stdout);513 fputs (_("Compiled-in modules:\n"), stdout); 492 514 #ifdef SH_USE_UTMP 493 515 if (num > 0) fputc (',', stdout);
Note:
See TracChangeset
for help on using the changeset viewer.