aboutsummaryrefslogtreecommitdiffstats
path: root/tests/fdpassing.c
diff options
context:
space:
mode:
authorMarcus Brinkmann <[email protected]>2006-09-19 10:46:58 +0000
committerMarcus Brinkmann <[email protected]>2006-09-19 10:46:58 +0000
commit2c22ab8151bd504d32ace8755945e6d323c06107 (patch)
tree0926cc5868299b5320435edc7a411e35aa8e83b9 /tests/fdpassing.c
parent2006-09-19 Marcus Brinkmann <[email protected]> (diff)
downloadlibassuan-2c22ab8151bd504d32ace8755945e6d323c06107.tar.gz
libassuan-2c22ab8151bd504d32ace8755945e6d323c06107.zip
2006-09-19 Marcus Brinkmann <[email protected]>
* tests/fdpassing.c (MOTD): New macro. * tests/Makefile.am (AM_CPPFLAGS): New variable. * tests/motd: New file.
Diffstat (limited to 'tests/fdpassing.c')
-rw-r--r--tests/fdpassing.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/tests/fdpassing.c b/tests/fdpassing.c
index b2f118b..da85bf7 100644
--- a/tests/fdpassing.c
+++ b/tests/fdpassing.c
@@ -32,6 +32,13 @@
#include "../src/assuan.h"
#include "common.h"
+#ifndef SRCDIR
+#define SRCDIR "/etc"
+#endif
+#define STRINGIFY2(str) #str
+#define STRINGIFY(str) STRINGIFY2(str)
+#define MOTD STRINGIFY(SRCDIR) "/motd"
+
/*
@@ -159,10 +166,10 @@ client (assuan_context_t ctx)
for (i=0; i < 6; i++)
{
- fp = fopen ("/etc/motd", "r");
+ fp = fopen (MOTD, "r");
if (!fp)
{
- log_error ("failed to open `%s': %s\n", "/etc/motd",
+ log_error ("failed to open `%s': %s\n", MOTD,
strerror (errno));
return -1;
}