public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libc/15312] New: SEEK_HOLE and SEEK_DATA not exported as expected
@ 2013-03-27 14:28 sourceware.org@jan-o-sch.net
2013-03-27 14:50 ` [Bug libc/15312] " aj at suse dot de
` (5 more replies)
0 siblings, 6 replies; 7+ messages in thread
From: sourceware.org@jan-o-sch.net @ 2013-03-27 14:28 UTC (permalink / raw)
To: glibc-bugs
http://sourceware.org/bugzilla/show_bug.cgi?id=15312
Bug #: 15312
Summary: SEEK_HOLE and SEEK_DATA not exported as expected
Product: glibc
Version: 2.17
Status: NEW
Severity: normal
Priority: P2
Component: libc
AssignedTo: unassigned@sourceware.org
ReportedBy: sourceware.org@jan-o-sch.net
CC: drepper.fsp@gmail.com
Classification: Unclassified
The man pages for lseek(2) state one should include <sys/types.h> and
<unistd.h>. Doing so does not export SEEK_HOLE and SEEK_DATA.
Freshly built from git version 2.17.90, top commit
28831a9a671b109e49d0a4ddce00a08d734bfc97.
The following dummy source should build but doesn't:
--
#include <sys/types.h>
#include <unistd.h>
void
main(void)
{
lseek(0, 0, SEEK_DATA);
lseek(0, 0, SEEK_HOLE);
}
--
Errors:
/tmp/test.c: In function 'main':
/tmp/test.c:7: error: 'SEEK_DATA' undeclared (first use in this function)
/tmp/test.c:7: error: (Each undeclared identifier is reported only once
/tmp/test.c:7: error: for each function it appears in.)
/tmp/test.c:8: error: 'SEEK_HOLE' undeclared (first use in this function)
Including <linux/fs.h> is a work-around, but that should really be included
internally.
--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug libc/15312] SEEK_HOLE and SEEK_DATA not exported as expected
2013-03-27 14:28 [Bug libc/15312] New: SEEK_HOLE and SEEK_DATA not exported as expected sourceware.org@jan-o-sch.net
@ 2013-03-27 14:50 ` aj at suse dot de
2013-03-27 15:05 ` sourceware.org@jan-o-sch.net
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: aj at suse dot de @ 2013-03-27 14:50 UTC (permalink / raw)
To: glibc-bugs
http://sourceware.org/bugzilla/show_bug.cgi?id=15312
Andreas Jaeger <aj at suse dot de> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
CC| |aj at suse dot de,
| |mtk.manpages at gmail dot
| |com
Resolution| |INVALID
--- Comment #1 from Andreas Jaeger <aj at suse dot de> 2013-03-27 14:50:43 UTC ---
Please report this to the man pages project, I've added the man pages
maintainer to this report as well.
For details on reporting man-pages bugs:
https://www.kernel.org/doc/man-pages/reporting_bugs.html
marking as INVALID since it's not a bug in glibc itself but in the man-pages.
--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug libc/15312] SEEK_HOLE and SEEK_DATA not exported as expected
2013-03-27 14:28 [Bug libc/15312] New: SEEK_HOLE and SEEK_DATA not exported as expected sourceware.org@jan-o-sch.net
2013-03-27 14:50 ` [Bug libc/15312] " aj at suse dot de
@ 2013-03-27 15:05 ` sourceware.org@jan-o-sch.net
2013-03-27 15:12 ` aj at suse dot de
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: sourceware.org@jan-o-sch.net @ 2013-03-27 15:05 UTC (permalink / raw)
To: glibc-bugs
http://sourceware.org/bugzilla/show_bug.cgi?id=15312
--- Comment #2 from Jan Schmidt <sourceware.org@jan-o-sch.net> 2013-03-27 15:04:55 UTC ---
So you really want a user space app to include <linux/fs.h> directly!?
--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug libc/15312] SEEK_HOLE and SEEK_DATA not exported as expected
2013-03-27 14:28 [Bug libc/15312] New: SEEK_HOLE and SEEK_DATA not exported as expected sourceware.org@jan-o-sch.net
2013-03-27 14:50 ` [Bug libc/15312] " aj at suse dot de
2013-03-27 15:05 ` sourceware.org@jan-o-sch.net
@ 2013-03-27 15:12 ` aj at suse dot de
2013-03-27 17:55 ` sourceware.org@jan-o-sch.net
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: aj at suse dot de @ 2013-03-27 15:12 UTC (permalink / raw)
To: glibc-bugs
http://sourceware.org/bugzilla/show_bug.cgi?id=15312
--- Comment #3 from Andreas Jaeger <aj at suse dot de> 2013-03-27 15:12:27 UTC ---
No, I want the man pages clear enough that you know to add a define for
_GNU_SOURCE.
Try the following
#define _GNU_SOURCE 1
#include <sys/types.h>
#include <unistd.h>
void
main(void)
{
lseek(0, 0, SEEK_DATA);
lseek(0, 0, SEEK_HOLE);
}
have a look at /usr/include/unistd.h and read the glibc info pages about
feature test macros to learn about _GNU_SOURCE.
--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug libc/15312] SEEK_HOLE and SEEK_DATA not exported as expected
2013-03-27 14:28 [Bug libc/15312] New: SEEK_HOLE and SEEK_DATA not exported as expected sourceware.org@jan-o-sch.net
` (2 preceding siblings ...)
2013-03-27 15:12 ` aj at suse dot de
@ 2013-03-27 17:55 ` sourceware.org@jan-o-sch.net
2013-03-27 20:51 ` mtk.manpages at gmail dot com
2014-06-13 18:35 ` fweimer at redhat dot com
5 siblings, 0 replies; 7+ messages in thread
From: sourceware.org@jan-o-sch.net @ 2013-03-27 17:55 UTC (permalink / raw)
To: glibc-bugs
http://sourceware.org/bugzilla/show_bug.cgi?id=15312
--- Comment #4 from Jan Schmidt <sourceware.org@jan-o-sch.net> 2013-03-27 17:55:05 UTC ---
Ok, thanks.
--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug libc/15312] SEEK_HOLE and SEEK_DATA not exported as expected
2013-03-27 14:28 [Bug libc/15312] New: SEEK_HOLE and SEEK_DATA not exported as expected sourceware.org@jan-o-sch.net
` (3 preceding siblings ...)
2013-03-27 17:55 ` sourceware.org@jan-o-sch.net
@ 2013-03-27 20:51 ` mtk.manpages at gmail dot com
2014-06-13 18:35 ` fweimer at redhat dot com
5 siblings, 0 replies; 7+ messages in thread
From: mtk.manpages at gmail dot com @ 2013-03-27 20:51 UTC (permalink / raw)
To: glibc-bugs
http://sourceware.org/bugzilla/show_bug.cgi?id=15312
--- Comment #5 from Michael Kerrisk <mtk.manpages at gmail dot com> 2013-03-27 20:50:59 UTC ---
(In reply to comment #3)
> No, I want the man pages clear enough that you know to add a define for
Thanks, Andreas, for adding me. I've added this text to the lseek(2) page:
The _GNU_SOURCE feature test macro must be defined in order to
obtain the definitions of SEEK_DATA and SEEK_HOLE from
<unistd.h>.
> have a look at /usr/include/unistd.h and read the glibc info pages about
> feature test macros to learn about _GNU_SOURCE.
Or, for even more detail:
http://man7.org/linux/man-pages/man7/feature_test_macros.7.html
--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug libc/15312] SEEK_HOLE and SEEK_DATA not exported as expected
2013-03-27 14:28 [Bug libc/15312] New: SEEK_HOLE and SEEK_DATA not exported as expected sourceware.org@jan-o-sch.net
` (4 preceding siblings ...)
2013-03-27 20:51 ` mtk.manpages at gmail dot com
@ 2014-06-13 18:35 ` fweimer at redhat dot com
5 siblings, 0 replies; 7+ messages in thread
From: fweimer at redhat dot com @ 2014-06-13 18:35 UTC (permalink / raw)
To: glibc-bugs
https://sourceware.org/bugzilla/show_bug.cgi?id=15312
Florian Weimer <fweimer at redhat dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Flags| |security-
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2014-06-13 18:35 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-03-27 14:28 [Bug libc/15312] New: SEEK_HOLE and SEEK_DATA not exported as expected sourceware.org@jan-o-sch.net
2013-03-27 14:50 ` [Bug libc/15312] " aj at suse dot de
2013-03-27 15:05 ` sourceware.org@jan-o-sch.net
2013-03-27 15:12 ` aj at suse dot de
2013-03-27 17:55 ` sourceware.org@jan-o-sch.net
2013-03-27 20:51 ` mtk.manpages at gmail dot com
2014-06-13 18:35 ` fweimer at redhat dot com
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).