pkgsrc/mail/yatsvrs/patches/patch-al
taca fe2216dcb8 - Add --enable-shadow since this package could work on platform
which have shadow password (SunOS at least).
- Reduce warning with GCC 3.3.1.
- Bump package revision.
2003-10-05 04:25:14 +00:00

63 lines
1.4 KiB
Text

$NetBSD: patch-al,v 1.2 2003/10/05 04:25:15 taca Exp $
--- yatconfd/yatconfd.c.orig 2001-06-26 20:25:22.000000000 +0900
+++ yatconfd/yatconfd.c
@@ -259,7 +259,7 @@ int main (argc, argv)
Msg2Cli(SUCCESS, "%.512s @%.256s",
szGreeting , SysData.szMyHost);
#else
- Msg2Cli(SUCCESS, "%.512s <%u.%u@%.256s>",
+ Msg2Cli(SUCCESS, "%.512s <%u.%ld@%.256s>",
szGreeting,
SysData.pid, SysData.timeStart, SysData.szMyHost);
#endif
@@ -360,32 +360,26 @@ int main (argc, argv)
static void SigHandler(iSig)
int iSig;
{
- CONST char * pMsg;
int codeErr;
- /* POSIX シグナルでは,シグナルハンドラが呼び出されている間はシグナ
- ルは呼ばれない */
- /*
- static int fSigHandled = 0;
- if (fSigHandled)
+#if 0
+ static int fSigHandled = 0;
+ if (fSigHandled)
return ;
- fSigHandled = 1;
- SigBlock();
- */
+ fSigHandled = 1;
+ SigBlock();
+#endif
switch (iSig) {
case SIGALRM:
- pMsg = NULL;
codeErr = ERRYS_TIMEOUT;
+ WARNING(codeErr, 0, NULL);
break;
- case SIGHUP:
- case SIGTERM:
default:
codeErr = ERRYS_SIGNAL;
- pMsg = "#%d";
+ WARNING(codeErr, 0, "#%d", iSig);
break;
}
- WARNING(codeErr, 0, pMsg, iSig);
UnLockAll();
@@ -396,7 +390,7 @@ static void SigHandler(iSig)
}
#endif
- ErrSetData(codeErr, 0, pMsg, iSig);
+ ErrSetData(codeErr, 0, (codeErr == ERRYS_SIGNAL)? "#%d": NULL, iSig);
Msg2Cli(FAILURE, NULL);
exit(1);