public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libc/28182] New: _TIME_BITS=64 in C++ has issues with fcntl and ioctl
@ 2021-08-03 17:34 gerbilsoft at gerbilsoft dot com
2021-08-04 3:56 ` [Bug libc/28182] _TIME_BITS=64 in C++ has issues with fcntl, ioctl, prctl fweimer at redhat dot com
2021-08-06 14:44 ` fweimer at redhat dot com
0 siblings, 2 replies; 3+ messages in thread
From: gerbilsoft at gerbilsoft dot com @ 2021-08-03 17:34 UTC (permalink / raw)
To: glibc-bugs
https://sourceware.org/bugzilla/show_bug.cgi?id=28182
Bug ID: 28182
Summary: _TIME_BITS=64 in C++ has issues with fcntl and ioctl
Product: glibc
Version: 2.34
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: libc
Assignee: unassigned at sourceware dot org
Reporter: gerbilsoft at gerbilsoft dot com
CC: drepper.fsp at gmail dot com
Target Milestone: ---
Attempting to compile a 32-bit C++ program that uses fcntl.h or sys/ioctl.h if
_TIME_BITS=64 results in an error related to exception handling.
Sample code:
#include <fcntl.h>
int main(void)
{
return 0;
}
Compile with: g++ -m32 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
-D_LARGEFILE64_SOURCE -D_TIME_BITS=64 -c test.cpp
Results:
In file included from /usr/include/features.h:488,
from /usr/include/fcntl.h:25,
from test.cpp:1:
/usr/include/fcntl.h:191:41: error: expected initializer before ‘noexcept’
191 | __fcntl_time64) __THROW;
| ^~~~~~~
/usr/include/fcntl.h:193:41: error: expected initializer before ‘noexcept’
193 | __fcntl_time64) __THROW;
| ^~~~~~~
The same code does compile if built as C code instead of as C++.
Software versions:
OS: Gentoo Linux
Arch: amd64 (Intel Core i7-3520M)
Compiler: gcc-11.1.0
glibc: 2.34
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug libc/28182] _TIME_BITS=64 in C++ has issues with fcntl, ioctl, prctl
2021-08-03 17:34 [Bug libc/28182] New: _TIME_BITS=64 in C++ has issues with fcntl and ioctl gerbilsoft at gerbilsoft dot com
@ 2021-08-04 3:56 ` fweimer at redhat dot com
2021-08-06 14:44 ` fweimer at redhat dot com
1 sibling, 0 replies; 3+ messages in thread
From: fweimer at redhat dot com @ 2021-08-04 3:56 UTC (permalink / raw)
To: glibc-bugs
https://sourceware.org/bugzilla/show_bug.cgi?id=28182
Florian Weimer <fweimer at redhat dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |fweimer at redhat dot com
Ever confirmed|0 |1
Last reconfirmed| |2021-08-04
Assignee|unassigned at sourceware dot org |fweimer at redhat dot com
Status|UNCONFIRMED |ASSIGNED
Summary|_TIME_BITS=64 in C++ has |_TIME_BITS=64 in C++ has
|issues with fcntl and ioctl |issues with fcntl, ioctl,
| |prctl
Flags| |security-
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug libc/28182] _TIME_BITS=64 in C++ has issues with fcntl, ioctl, prctl
2021-08-03 17:34 [Bug libc/28182] New: _TIME_BITS=64 in C++ has issues with fcntl and ioctl gerbilsoft at gerbilsoft dot com
2021-08-04 3:56 ` [Bug libc/28182] _TIME_BITS=64 in C++ has issues with fcntl, ioctl, prctl fweimer at redhat dot com
@ 2021-08-06 14:44 ` fweimer at redhat dot com
1 sibling, 0 replies; 3+ messages in thread
From: fweimer at redhat dot com @ 2021-08-06 14:44 UTC (permalink / raw)
To: glibc-bugs
https://sourceware.org/bugzilla/show_bug.cgi?id=28182
Florian Weimer <fweimer at redhat dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |2.35
Resolution|--- |FIXED
Status|ASSIGNED |RESOLVED
--- Comment #1 from Florian Weimer <fweimer at redhat dot com> ---
Fixed for 2.35 via:
commit c87fcacc50505d550f1bb038382bcc7ea73a5926
Author: Florian Weimer <fweimer@redhat.com>
Date: Fri Aug 6 09:51:38 2021 +0200
Linux: Fix fcntl, ioctl, prctl redirects for _TIME_BITS=64 (bug 28182)
__REDIRECT and __THROW are not compatible with C++ due to the ordering of
the
__asm__ alias and the throw specifier. __REDIRECT_NTH has to be used
instead.
Fixes commit 8a40aff86ba5f64a3a84883e539cb67b ("io: Add time64 alias
for fcntl"), commit 82c395d91ea4f69120d453aeec398e30 ("misc: Add
time64 alias for ioctl"), commit b39ffab860cd743a82c91946619f1b8158
("Linux: Add time64 alias for prctl").
Reviewed-by: Carlos O'Donell <carlos@redhat.com>
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-08-06 14:44 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-03 17:34 [Bug libc/28182] New: _TIME_BITS=64 in C++ has issues with fcntl and ioctl gerbilsoft at gerbilsoft dot com
2021-08-04 3:56 ` [Bug libc/28182] _TIME_BITS=64 in C++ has issues with fcntl, ioctl, prctl fweimer at redhat dot com
2021-08-06 14:44 ` 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).