public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libc/17665] New: Excess declarations in unistd.h for XPG3/XPG4
@ 2014-11-29  9:42 jsm28 at gcc dot gnu.org
  2014-12-02 21:32 ` [Bug libc/17665] " cvs-commit at gcc dot gnu.org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: jsm28 at gcc dot gnu.org @ 2014-11-29  9:42 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=17665

            Bug ID: 17665
           Summary: Excess declarations in unistd.h for XPG3/XPG4
           Product: glibc
           Version: 2.21
            Status: NEW
          Severity: normal
          Priority: P2
         Component: libc
          Assignee: unassigned at sourceware dot org
          Reporter: jsm28 at gcc dot gnu.org
                CC: drepper.fsp at gmail dot com

For XPG3/XPG4 (defined __USE_XOPEN && !defined __USE_UNIX98), unistd.h declares
many functions that should only be declared for __USE_MISC (none of them are in
XPG4): sethostname sethostid getdomainname setdomainname vhangup revoke profil
acct getusershell endusershell setusershell daemon.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug libc/17665] Excess declarations in unistd.h for XPG3/XPG4
  2014-11-29  9:42 [Bug libc/17665] New: Excess declarations in unistd.h for XPG3/XPG4 jsm28 at gcc dot gnu.org
@ 2014-12-02 21:32 ` cvs-commit at gcc dot gnu.org
  2014-12-02 21:33 ` cvs-commit at gcc dot gnu.org
  2014-12-02 21:34 ` jsm28 at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2014-12-02 21:32 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=17665

--- Comment #1 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> ---
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".

The branch, master has been updated
       via  84e5e75640afe10758ea647e4704e9f66dc82df4 (commit)
      from  66cadc058dd7ce8106624df5732ea69a484621b9 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=84e5e75640afe10758ea647e4704e9f66dc82df4

commit 84e5e75640afe10758ea647e4704e9f66dc82df4
Author: Joseph Myers <joseph@codesourcery.com>
Date:   Tue Dec 2 21:31:24 2014 +0000

    Fix fgets_unlocked namespace issues (bug 17664).

    Various POSIX functions bring in res_init.o, res_hconf.o or
    mntent_r.o, which use fgets_unlocked, which is not a POSIX function.
    This patch arranges for them to use __fgets_unlocked instead.  (The
    IS_IN (libc) conditional in rec_hconf.c is needed because that file is
    also used in nscd.)

    Tested for x86_64 (testsuite, and that disassembly of installed shared
    libraries is unchanged by the patch except for an assertion line
    number).  Note that most of the linknamespace tests that failed
    because of fgets_unlocked from the resolver also fail because of other
    symbols brought in by the resolver, so the number of XFAILs this
    removes is limited.  Also note that fgets_unlocked failures for
    unistd.h for XPG3/XPG4 showed up that actually unistd.h is declaring
    too much for XPG3/XPG4 (bug 17665) - there is no actual need to make
    getusershell.c use __fgets_unlocked (at least as regards formal
    standards are concerned; maybe it should still change for
    namespace-cleanness of _DEFAULT_SOURCE) because the functions there
    aren't actually in any of the supported standards; the correct fix for
    those failures will be to stop the *usershell* functions appearing in
    unistd.h for XPG3/XPG4.

        [BZ #17664]
        * misc/mntent_r.c (__getmntent_r): Use __fgets_unlocked instead of
        fgets_unlocked.
        * resolv/res_hconf.c [IS_IN (libc)] (fgets_unlocked): Define to
        __fgets_unlocked.
        * resolv/res_init.c (__res_vinit): Use __fgets_unlocked instead of
        fgets_unlocked.
        * conform/Makefile (test-xfail-XPG4/sys/statvfs.h/linknamespace):
        Remove variable.
        (test-xfail-POSIX/sys/mman.h/linknamespace): Likewise.
        (test-xfail-UNIX98/sys/mman.h/linknamespace): Likewise.
        (test-xfail-UNIX98/sys/statvfs.h/linknamespace): Likewise.
        (test-xfail-XOPEN2K/sys/mman.h/linknamespace): Likewise.
        (test-xfail-XOPEN2K/sys/statvfs.h/linknamespace): Likewise.
        (test-xfail-POSIX2008/sys/mman.h/linknamespace): Likewise.
        (test-xfail-POSIX2008/sys/statvfs.h/linknamespace): Likewise.
        (test-xfail-XOPEN2K8/sys/mman.h/linknamespace): Likewise.
        (test-xfail-XOPEN2K8/sys/statvfs.h/linknamespace): Likewise.

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog          |   19 +++++++++++++++++++
 NEWS               |    2 +-
 conform/Makefile   |   10 ----------
 misc/mntent_r.c    |    4 ++--
 resolv/res_hconf.c |    4 ++++
 resolv/res_init.c  |    2 +-
 6 files changed, 27 insertions(+), 14 deletions(-)

-- 
You are receiving this mail because:
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug libc/17665] Excess declarations in unistd.h for XPG3/XPG4
  2014-11-29  9:42 [Bug libc/17665] New: Excess declarations in unistd.h for XPG3/XPG4 jsm28 at gcc dot gnu.org
  2014-12-02 21:32 ` [Bug libc/17665] " cvs-commit at gcc dot gnu.org
@ 2014-12-02 21:33 ` cvs-commit at gcc dot gnu.org
  2014-12-02 21:34 ` jsm28 at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2014-12-02 21:33 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=17665

--- Comment #2 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> ---
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".

The branch, master has been updated
       via  266865c0e7b79d4196e2cc393693463f03c90bd8 (commit)
      from  84e5e75640afe10758ea647e4704e9f66dc82df4 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=266865c0e7b79d4196e2cc393693463f03c90bd8

commit 266865c0e7b79d4196e2cc393693463f03c90bd8
Author: Joseph Myers <joseph@codesourcery.com>
Date:   Tue Dec 2 21:32:48 2014 +0000

    Remove excess declarations from unistd.h for XPG3/XPG4 (bug 17665).

    For XPG3/XPG4 (defined __USE_XOPEN && !defined __USE_UNIX98), unistd.h
    declares many functions that should only be declared for __USE_MISC
    (none of them are in XPG3/XPG4): sethostname sethostid getdomainname
    setdomainname vhangup revoke profil acct getusershell endusershell
    setusershell daemon.  The whole block with the [__USE_MISC ||
    (__USE_XOPEN && !__USE_UNIX98)] conditional contains only functions
    that are not in XPG3/XPG4, so this patch simply changes the
    conditional.

    Tested for x86_64 (testsuite, and that installed stripped shared
    libraries are unchanged by this patch).

        [BZ #17665]
        * posix/unistd.h [__USE_MISC || (__USE_XOPEN && !__USE_UNIX98)]:
        Change conditional to [__USE_MISC].

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog      |    4 ++++
 NEWS           |    2 +-
 posix/unistd.h |    4 ++--
 3 files changed, 7 insertions(+), 3 deletions(-)

-- 
You are receiving this mail because:
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug libc/17665] Excess declarations in unistd.h for XPG3/XPG4
  2014-11-29  9:42 [Bug libc/17665] New: Excess declarations in unistd.h for XPG3/XPG4 jsm28 at gcc dot gnu.org
  2014-12-02 21:32 ` [Bug libc/17665] " cvs-commit at gcc dot gnu.org
  2014-12-02 21:33 ` cvs-commit at gcc dot gnu.org
@ 2014-12-02 21:34 ` jsm28 at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: jsm28 at gcc dot gnu.org @ 2014-12-02 21:34 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=17665

Joseph Myers <jsm28 at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--- Comment #3 from Joseph Myers <jsm28 at gcc dot gnu.org> ---
Fixed for 2.21.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2014-12-02 21:34 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-11-29  9:42 [Bug libc/17665] New: Excess declarations in unistd.h for XPG3/XPG4 jsm28 at gcc dot gnu.org
2014-12-02 21:32 ` [Bug libc/17665] " cvs-commit at gcc dot gnu.org
2014-12-02 21:33 ` cvs-commit at gcc dot gnu.org
2014-12-02 21:34 ` jsm28 at gcc dot gnu.org

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).