Changeset 170 for trunk/src/sh_unix.c
- Timestamp:
- Apr 30, 2008, 11:56:45 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/sh_unix.c
r169 r170 356 356 extern int OnlyStderr; 357 357 358 int safe_logger (int signal, int method, char * details)358 int safe_logger (int thesignal, int method, char * details) 359 359 { 360 360 unsigned int i = 0; … … 396 396 if (p && *p) 397 397 sl_strlcat(msg, p, 128); 398 if ( signal == 0)398 if (thesignal == 0) 399 399 { 400 400 if (details == NULL) { … … 408 408 { 409 409 sl_strlcat(msg, _("]: exit on signal "), 128); 410 p = safe_itoa( signal, str, 128);410 p = safe_itoa(thesignal, str, 128); 411 411 if (p && *p) 412 412 sl_strlcat(msg, p, 128); … … 461 461 } 462 462 463 void safe_fatal (c har * details,464 c har * file, int line)463 void safe_fatal (const char * details, 464 const char * file, int line) 465 465 { 466 466 char msg[128]; 467 467 char str[128]; 468 468 char * p; 469 int signal = 0;469 int thesignal = 0; 470 470 int method = 0; 471 471 … … 479 479 } 480 480 sl_strlcat(msg, details, 128); 481 (void) safe_logger ( signal, method, msg);481 (void) safe_logger (thesignal, method, msg); 482 482 _exit(EXIT_FAILURE); 483 483 } … … 1060 1060 } 1061 1061 1062 extern uid_t sl_trust_baduid( );1063 extern gid_t sl_trust_badgid( );1062 extern uid_t sl_trust_baduid(void); 1063 extern gid_t sl_trust_badgid(void); 1064 1064 1065 1065 #if defined(HOST_IS_CYGWIN) || defined(__cygwin__) || defined(__CYGWIN32__) || defined(__CYGWIN__) … … 1562 1562 struct hostent * he1; 1563 1563 int i; 1564 int ddot = 0;1564 int ddot; 1565 1565 int len; 1566 1566 char * p; … … 1632 1632 */ 1633 1633 len = sl_strlen(sh.host.name); 1634 ddot = 0; 1634 1635 for (i = 0; i < len; ++i) 1635 1636 if (sh.host.name[i] == '.') ++ddot; … … 1660 1661 struct hostent * he1; 1661 1662 int i; 1662 int ddot = 0;1663 int ddot; 1663 1664 int len; 1664 1665 char hostname[1024]; … … 1691 1692 */ 1692 1693 len = sl_strlen(sh.host.name); 1694 ddot = 0; 1693 1695 for (i = 0; i < len; ++i) 1694 1696 if (sh.host.name[i] == '.') ++ddot; … … 1772 1774 } 1773 1775 1774 int sh_unix_chroot( )1776 int sh_unix_chroot(void) 1775 1777 { 1776 1778 int status; … … 1794 1796 /* #ifdef SH_WITH_SERVER */ 1795 1797 #else 1796 int sh_unix_chroot( ) { return 0; }1798 int sh_unix_chroot(void) { return 0; } 1797 1799 #endif 1798 1800 … … 1850 1852 pid_t oldpid = getpid(); 1851 1853 #if defined(SH_WITH_SERVER) 1852 extern int sh_socket_open_int ( );1854 extern int sh_socket_open_int (void); 1853 1855 #endif 1854 1856 char errbuf[SH_ERRBUF_SIZE]; … … 3411 3413 UINT64 length_nolim = TIGER_NOLIM; 3412 3414 3413 if ( (theFile->check_mask & MODI_TXT) != 0&& fbuf.st_size < (10 * SH_TXT_MAX))3415 if (MODI_TXT_ENABLED(theFile->check_mask) && fbuf.st_size < (10 * SH_TXT_MAX)) 3414 3416 { 3415 3417 sl_init_content (rval_open, fbuf.st_size); … … 3464 3466 UINT64 length_nolim = TIGER_NOLIM; 3465 3467 3466 if ( (theFile->check_mask & MODI_TXT) != 0&& fbuf.st_size < (10 * SH_TXT_MAX))3468 if (MODI_TXT_ENABLED(theFile->check_mask) && fbuf.st_size < (10 * SH_TXT_MAX)) 3467 3469 { 3468 3470 sl_init_content (rval_open, fbuf.st_size); … … 4301 4303 SH_MUTEX_STATIC(mutex_mlock,PTHREAD_MUTEX_INITIALIZER); 4302 4304 4303 int sh_unix_mlock (c har * file, int line, void * in_addr, size_t len)4305 int sh_unix_mlock (const char * file, int line, void * in_addr, size_t len) 4304 4306 { 4305 4307 int num_pages;
Note:
See TracChangeset
for help on using the changeset viewer.