You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spamassassin.apache.org by km...@apache.org on 2018/09/17 11:14:25 UTC
svn commit: r1841066 - in /spamassassin/trunk/spamc: Makefile.win getopt.c
Author: kmcgrail
Date: Mon Sep 17 11:14:25 2018
New Revision: 1841066
URL: http://svn.apache.org/viewvc?rev=1841066&view=rev
Log:
spamc fixes to compile for windows - bug 7617
Modified:
spamassassin/trunk/spamc/Makefile.win
spamassassin/trunk/spamc/getopt.c
Modified: spamassassin/trunk/spamc/Makefile.win
URL: http://svn.apache.org/viewvc/spamassassin/trunk/spamc/Makefile.win?rev=1841066&r1=1841065&r2=1841066&view=diff
==============================================================================
--- spamassassin/trunk/spamc/Makefile.win (original)
+++ spamassassin/trunk/spamc/Makefile.win Mon Sep 17 11:14:25 2018
@@ -19,8 +19,11 @@ all: spamc$(EXEEXT)
$(SRCDIR)/spamc$(EXEEXT):
- cd $(SRCDIR)
- $(MAKE) spamc$(EXEEXT)
+# Bug #7617: Both commands must be on the same line because for every
+# line a new sub-shell is spawned. The change of directory would be
+# "forgotten" before the next command is executed, if the commands
+# were on different lines.
+ cd $(SRCDIR) && $(MAKE) spamc$(EXEEXT)
spamc$(EXEEXT): $(SPAMC_FILES) $(LIBSPAMC_FILES)
Modified: spamassassin/trunk/spamc/getopt.c
URL: http://svn.apache.org/viewvc/spamassassin/trunk/spamc/getopt.c?rev=1841066&r1=1841065&r2=1841066&view=diff
==============================================================================
--- spamassassin/trunk/spamc/getopt.c (original)
+++ spamassassin/trunk/spamc/getopt.c Mon Sep 17 11:14:25 2018
@@ -21,7 +21,7 @@
#include <string.h>
#include <assert.h>
#include <stdlib.h>
-#include <err.h>
+#include <errno.h>
#include "getopt.h"
#ifdef WIN32
@@ -246,7 +246,8 @@ spamc_getopt_long(int argc, char * const
if((bp = strchr(longopt, '='))) {
opt = strdup(bp+1);
if (opt == NULL) {
- err(1, NULL);
+ fprintf(stderr, "%s: %s\n", argv[0], strerror(errno));
+ exit(1);
}
longoptlen -= strlen(bp);
}