git://git.exim.org
/
users
/
heiko
/
exim.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Make {bounce,warn}_message_file expanded. Bug 2522
[users/heiko/exim.git]
/
test
/
src
/
mtpscript.c
diff --git
a/test/src/mtpscript.c
b/test/src/mtpscript.c
index 2acfa285fe4e208ec6cc9c5c467c324ee1517ff8..a595194336a1147a302c1ec0670684419020e3ba 100644
(file)
--- a/
test/src/mtpscript.c
+++ b/
test/src/mtpscript.c
@@
-19,6
+19,10
@@
complicated version that does it over a socket. */
#include <errno.h>
#include <unistd.h>
#include <errno.h>
#include <unistd.h>
+#ifndef CS
+# define CS (char *)
+#endif
+
static FILE *log;
static FILE *log;
@@
-86,9
+90,9
@@
signal(SIGALRM, sigalrm_handler);
/* Read the script, and do what it says. */
/* Read the script, and do what it says. */
-while (fgets(sbuffer, sizeof(sbuffer), script) != NULL)
+while (fgets(
CS
sbuffer, sizeof(sbuffer), script) != NULL)
{
{
- int n = (int)strlen(sbuffer);
+ int n = (int)strlen(
CS
sbuffer);
while (n > 0 && isspace(sbuffer[n-1])) n--;
sbuffer[n] = 0;
while (n > 0 && isspace(sbuffer[n-1])) n--;
sbuffer[n] = 0;
@@
-107,9
+111,9
@@
while (fgets(sbuffer, sizeof(sbuffer), script) != NULL)
before continuing. Do not write this to the log, as it may not get
written at the right place in a log that's being shared. */
before continuing. Do not write this to the log, as it may not get
written at the right place in a log that's being shared. */
- else if (strncmp(sbuffer, "*sleep ", 7) == 0)
+ else if (strncmp(
CS
sbuffer, "*sleep ", 7) == 0)
{
{
- sleep(atoi(sbuffer+7));
+ sleep(atoi(
CS
sbuffer+7));
}
/* Otherwise the script line is the start of an input line we are expecting
}
/* Otherwise the script line is the start of an input line we are expecting
@@
-119,7
+123,7
@@
while (fgets(sbuffer, sizeof(sbuffer), script) != NULL)
else
{
else
{
- int data = strcmp(sbuffer, ".") == 0;
+ int data = strcmp(
CS
sbuffer, ".") == 0;
fprintf(log, "%s\n", sbuffer);
fflush(log);
fprintf(log, "%s\n", sbuffer);
fflush(log);
@@
-130,23
+134,23
@@
while (fgets(sbuffer, sizeof(sbuffer), script) != NULL)
{
int n;
alarm(5);
{
int n;
alarm(5);
- if (fgets(ibuffer, sizeof(ibuffer), stdin) == NULL)
+ if (fgets(
CS
ibuffer, sizeof(ibuffer), stdin) == NULL)
{
fprintf(log, "%sxpected EOF read from client\n",
{
fprintf(log, "%sxpected EOF read from client\n",
- (strncmp(sbuffer, "*eof", 4) == 0)? "E" : "Une");
+ (strncmp(
CS
sbuffer, "*eof", 4) == 0)? "E" : "Une");
goto END_OFF;
}
alarm(0);
goto END_OFF;
}
alarm(0);
- n = (int)strlen(ibuffer);
+ n = (int)strlen(
CS
ibuffer);
while (n > 0 && isspace(ibuffer[n-1])) n--;
ibuffer[n] = 0;
fprintf(log, "<<< %s\n", ibuffer);
while (n > 0 && isspace(ibuffer[n-1])) n--;
ibuffer[n] = 0;
fprintf(log, "<<< %s\n", ibuffer);
- if (!data || strcmp(ibuffer, ".") == 0) break;
+ if (!data || strcmp(
CS
ibuffer, ".") == 0) break;
}
/* Check received what was expected */
}
/* Check received what was expected */
- if (strncmp(
sbuffer, ibuffer, (int)strlen(
sbuffer)) != 0)
+ if (strncmp(
CS sbuffer, CS ibuffer, (int)strlen(CS
sbuffer)) != 0)
{
fprintf(log, "Comparison failed - bailing out\n");
goto END_OFF;
{
fprintf(log, "Comparison failed - bailing out\n");
goto END_OFF;