summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2005-10-04 21:42:39 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:39:24 -0500
commit1e0823d0a580ec61ae5a4e4826586e24f64eee0b (patch)
tree3dcc1ed8ed49266e7a8c908496d5578357582011 /source4
parent3d6279402caa862db4a7bc4697c667fbd1faa83d (diff)
downloadsamba-1e0823d0a580ec61ae5a4e4826586e24f64eee0b.tar.gz
samba-1e0823d0a580ec61ae5a4e4826586e24f64eee0b.tar.bz2
samba-1e0823d0a580ec61ae5a4e4826586e24f64eee0b.zip
r10719: Remove __FUNCTION__ macro as it might not be available at all systems
(pointed out by John E. Malmberg) (This used to be commit 3169bbc15703b39943a11939e9dcccb2a9b4ad5d)
Diffstat (limited to 'source4')
-rw-r--r--source4/build/tests/os2_delete.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/source4/build/tests/os2_delete.c b/source4/build/tests/os2_delete.c
index dad27e8f2c..288e4a5d8f 100644
--- a/source4/build/tests/os2_delete.c
+++ b/source4/build/tests/os2_delete.c
@@ -22,7 +22,7 @@
#define TESTDIR "test.dir"
-#define FAILED() (fprintf(stderr, "Failed at %s:%d - %s\n", __FUNCTION__, __LINE__, strerror(errno)), exit(1), 1)
+#define FAILED(d) (fprintf(stderr, "Failed for %s - %s\n", d, strerror(errno)), exit(1), 1)
#ifndef MIN
#define MIN(a,b) ((a)<(b)?(a):(b))
@@ -32,7 +32,7 @@ static void cleanup(void)
{
/* I'm a lazy bastard */
system("rm -rf " TESTDIR);
- mkdir(TESTDIR, 0700) == 0 || FAILED();
+ mkdir(TESTDIR, 0700) == 0 || FAILED("mkdir");
}
static void create_files()
@@ -41,7 +41,7 @@ static void create_files()
for (i=0;i<NUM_FILES;i++) {
char fname[40];
sprintf(fname, TESTDIR "/test%u.txt", i);
- close(open(fname, O_CREAT|O_RDWR, 0600)) == 0 || FAILED();
+ close(open(fname, O_CREAT|O_RDWR, 0600)) == 0 || FAILED("close");
}
}
@@ -68,7 +68,7 @@ static int os2_delete(DIR *d)
for (j=0; j<MIN(i, DELETE_SIZE); j++) {
char fname[40];
sprintf(fname, TESTDIR "/%s", names[j]);
- unlink(fname) == 0 || FAILED();
+ unlink(fname) == 0 || FAILED("unlink");
}
/* seek to just after the deletion */
@@ -91,9 +91,9 @@ int main(void)
/* skip past . and .. */
de = readdir(d);
- strcmp(de->d_name, ".") == 0 || FAILED();
+ strcmp(de->d_name, ".") == 0 || FAILED("match .");
de = readdir(d);
- strcmp(de->d_name, "..") == 0 || FAILED();
+ strcmp(de->d_name, "..") == 0 || FAILED("match ..");
while (1) {
int n = os2_delete(d);
@@ -104,7 +104,7 @@ int main(void)
printf("Deleted %d files of %d\n", total_deleted, NUM_FILES);
- rmdir(TESTDIR) == 0 || FAILED();
+ rmdir(TESTDIR) == 0 || FAILED("rmdir");
return 0;
}