]> git.ipfire.org Git - thirdparty/man-pages.git/blame - man3/seekdir.3
pthread_attr_init.3: Use correct printf() specifier for "size_t" in example program
[thirdparty/man-pages.git] / man3 / seekdir.3
CommitLineData
fea681da
MK
1.\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk)
2.\"
93015253 3.\" %%%LICENSE_START(VERBATIM)
fea681da
MK
4.\" Permission is granted to make and distribute verbatim copies of this
5.\" manual provided the copyright notice and this permission notice are
6.\" preserved on all copies.
7.\"
8.\" Permission is granted to copy and distribute modified versions of this
9.\" manual under the conditions for verbatim copying, provided that the
10.\" entire resulting derived work is distributed under the terms of a
11.\" permission notice identical to this one.
c13182ef 12.\"
fea681da
MK
13.\" Since the Linux kernel and libraries are constantly changing, this
14.\" manual page may be incorrect or out-of-date. The author(s) assume no
15.\" responsibility for errors or omissions, or for damages resulting from
16.\" the use of the information contained herein. The author(s) may not
17.\" have taken the same level of care in the production of this manual,
18.\" which is licensed free of charge, as they might when working
19.\" professionally.
c13182ef 20.\"
fea681da
MK
21.\" Formatted or processed versions of this manual, if unaccompanied by
22.\" the source, must acknowledge the copyright and authors of this work.
4b72fb64 23.\" %%%LICENSE_END
fea681da
MK
24.\"
25.\" References consulted:
26.\" Linux libc source code
27.\" Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991)
28.\" 386BSD man pages
29.\" Modified Sat Jul 24 18:25:21 1993 by Rik Faith (faith@cs.unc.edu)
73f4bf1e 30.\"
97986708 31.TH SEEKDIR 3 2016-03-15 "" "Linux Programmer's Manual"
fea681da
MK
32.SH NAME
33seekdir \- set the position of the next readdir() call in the directory
34stream.
35.SH SYNOPSIS
36.nf
37.B #include <dirent.h>
68e4db0a 38.PP
73f4bf1e 39.BI "void seekdir(DIR *" dirp ", long " loc );
fea681da 40.fi
68e4db0a 41.PP
cc4615cc
MK
42.in -4n
43Feature Test Macro Requirements for glibc (see
44.BR feature_test_macros (7)):
45.in
68e4db0a 46.PP
cc4615cc 47.BR seekdir ():
a30128b4
MK
48 _XOPEN_SOURCE
49 || /* Glibc since 2.19: */ _DEFAULT_SOURCE
50 || /* Glibc versions <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE
fea681da 51.SH DESCRIPTION
60a90ecd
MK
52The
53.BR seekdir ()
54function sets the location in the directory stream
55from which the next
56.BR readdir (2)
57call will start.
73f4bf1e
MK
58The
59.I loc
60argument should be a value returned by a previous call to
60a90ecd 61.BR telldir (3).
47297adb 62.SH RETURN VALUE
60a90ecd
MK
63The
64.BR seekdir ()
65function returns no value.
bbb97a01 66.SH ATTRIBUTES
79e5ca24
PH
67For an explanation of the terms used in this section, see
68.BR attributes (7).
69.TS
70allbox;
71lb lb lb
72l l l.
73Interface Attribute Value
74T{
bbb97a01 75.BR seekdir ()
79e5ca24
PH
76T} Thread safety MT-Safe
77.TE
47297adb 78.SH CONFORMING TO
ada74aab 79POSIX.1-2001, POSIX.1-2008, 4.3BSD.
fc3c831d
MK
80.SH NOTES
81In glibc up to version 2.1.1, the type of the
73f4bf1e 82.I loc
fc3c831d
MK
83argument was
84.IR off_t .
85POSIX.1-2001 specifies
86.IR long ,
87and this is the type used since glibc 2.1.2.
73f4bf1e
MK
88See
89.BR telldir (3)
90for information on why you should be careful in making any
91assumptions about the value in this argument.
47297adb 92.SH SEE ALSO
fea681da
MK
93.BR lseek (2),
94.BR closedir (3),
95.BR opendir (3),
96.BR readdir (3),
97.BR rewinddir (3),
98.BR scandir (3),
99.BR telldir (3)