summaryrefslogtreecommitdiff
path: root/src/regress/lib/libc/telldir/main.c
diff options
context:
space:
mode:
authorschwarze <>2013-11-03 00:20:24 +0000
committerschwarze <>2013-11-03 00:20:24 +0000
commit92310eb0400efc52093dc7597258a25953dee16b (patch)
treea810c2294cbdd73eebd2912a27cc02faacfdbc8a /src/regress/lib/libc/telldir/main.c
parent6a2690b2e5b6471dbc355f99a21bf3488b96c21a (diff)
downloadopenbsd-92310eb0400efc52093dc7597258a25953dee16b.tar.gz
openbsd-92310eb0400efc52093dc7597258a25953dee16b.tar.bz2
openbsd-92310eb0400efc52093dc7597258a25953dee16b.zip
Add a second test, shortseek(), to make sure that seekdir() also works
correctly when moving the directory pointer by small distances. This is currently failing, i will send an updated libc/gen patch to fix this right afterwards. Move the functions createfiles() and delfiles() to utils.{h,c} for reuse. Minor cleanup in telldir.c.
Diffstat (limited to 'src/regress/lib/libc/telldir/main.c')
-rw-r--r--src/regress/lib/libc/telldir/main.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/regress/lib/libc/telldir/main.c b/src/regress/lib/libc/telldir/main.c
new file mode 100644
index 0000000000..23ffa65dbf
--- /dev/null
+++ b/src/regress/lib/libc/telldir/main.c
@@ -0,0 +1,14 @@
1/* $OpenBSD: main.c,v 1.1 2013/11/03 00:20:24 schwarze Exp $ */
2
3/* Written by Ingo Schwarze, 2013, Public domain. */
4
5void shortseek(void);
6void longseek(void);
7
8int
9main(void)
10{
11 shortseek();
12 longseek();
13 return(0);
14}