From: nsz Date: Sat, 13 Oct 2012 19:29:39 +0000 (+0200) Subject: cosmetic fixes X-Git-Url: http://nsz.repo.hu/git/?a=commitdiff_plain;h=ea9499b78cd897ed5bcaae77214c7259440acc05;p=libc-test cosmetic fixes --- diff --git a/src/misc/basename.c b/src/misc/basename.c index 071966a..a993587 100644 --- a/src/misc/basename.c +++ b/src/misc/basename.c @@ -5,7 +5,7 @@ #define T(path, want) \ { \ - char tmp[1000]; \ + char tmp[100]; \ char *got = basename(strcpy(tmp, path)); \ if (strcmp(want, got) != 0) \ error("basename(\"%s\") got \"%s\" want \"%s\"\n", path, got, want); \ @@ -13,7 +13,7 @@ int main() { - if (strcmp(".", basename(0)) != 0) + if (strcmp(basename(0), ".") != 0) error("basename(0) returned \"%s\"; expected \".\"\n", basename(0)); T("", "."); T("/usr/lib", "lib"); @@ -22,5 +22,7 @@ int main() T("/", "/"); T("///", "/"); T("//usr//lib//", "lib"); + T(".", "."); + T("..", ".."); return test_status; } diff --git a/src/misc/dirname.c b/src/misc/dirname.c index ae8b67b..7a15a0a 100644 --- a/src/misc/dirname.c +++ b/src/misc/dirname.c @@ -5,7 +5,7 @@ #define T(path, want) \ { \ - char tmp[1000]; \ + char tmp[100]; \ char *got = dirname(strcpy(tmp, path)); \ if (strcmp(want, got) != 0) \ error("dirname(\"%s\") got \"%s\" want \"%s\"\n", path, got, want); \ diff --git a/src/process/Makefile b/src/process/Makefile index 278e884..ee4552b 100644 --- a/src/process/Makefile +++ b/src/process/Makefile @@ -1,2 +1 @@ -TROOT=../.. -include $(TROOT)/Makefile.inc +include ../../Makefile.inc diff --git a/src/stdlib/Makefile b/src/stdlib/Makefile index 645640b..e8f62fa 100644 --- a/src/stdlib/Makefile +++ b/src/stdlib/Makefile @@ -1,3 +1,3 @@ include ../../Makefile.inc -LDFLAGS+=-lm +strtod_simple: LDFLAGS+=-lm diff --git a/src/string/Makefile b/src/string/Makefile index 4105e2a..ee4552b 100644 --- a/src/string/Makefile +++ b/src/string/Makefile @@ -1,2 +1 @@ include ../../Makefile.inc -