public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libc/10456] New: missing include in string.h
@ 2009-07-28 22:58 alex at vanhout-narvaez dot com
  2009-07-28 23:06 ` [Bug libc/10456] " alex at vanhout-narvaez dot com
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: alex at vanhout-narvaez dot com @ 2009-07-28 22:58 UTC (permalink / raw)
  To: glibc-bugs

In string.h in version 2.10.1 on line 546 & 550 there is a referance to __locale_t. 
__locale_t is defined in xlocale.h.

xlocale.h is only included when __USE_XOPEN2K8 is true.

Lines 544-552 thus including line 546 are only used when __USE_GNU is true.
Given that xlocale.h is only included when __USE_XOPEN2K8 is true this lead to
an error when __USE_XOPEN2K8 is false and __USE-GNU is false.

Fix:
Afther line 544 add:
#include <xlocale.h>
To have __locale_t defined when referenced.

Regards,
Alex

Regards,
Alex

========Dump form build GCC 4.4.1=================================
In file included from ../../src/gcc-4.4.1/gcc/system.h:198,
                 from ../../src/gcc-4.4.1/gcc/genmodes.c:22:
/usr/include/string.h:546: error: expected declaration specifiers or '...'
before '__locale_t'
/usr/include/string.h:547: error: nonnull argument with out-of-range operand
number (argument 1, operand 3)
/usr/include/string.h:550: error: expected declaration specifiers or '...'
before '__locale_t'
/usr/include/string.h:551: error: nonnull argument with out-of-range operand
number (argument 1, operand 4)
In file included from /usr/include/sys/resource.h:25,
                 from /usr/include/sys/wait.h:32,
                 from ../../src/gcc-4.4.1/gcc/system.h:327,
                 from ../../src/gcc-4.4.1/gcc/genmodes.c:22:
/usr/include/bits/resource.h:127: error: two or more data types in declaration
specifiers
In file included from ../../src/gcc-4.4.1/gcc/genmodes.c:22:
../../src/gcc-4.4.1/gcc/system.h:426: error: conflicting types for 'getrlimit'
/usr/include/sys/resource.h:51: note: previous declaration of 'getrlimit' was here
../../src/gcc-4.4.1/gcc/system.h:435: error: conflicting types for 'setrlimit'
/usr/include/sys/resource.h:70: note: previous declaration of 'setrlimit' was here
make[3]: *** [build/genmodes.o] Error 1
make[3]: Leaving directory `/bouwplek/gcc441/gcc'
make[2]: *** [all-stage1-gcc] Error 2
make[2]: Leaving directory `/bouwplek/gcc441'
make[1]: *** [stage1-bubble] Error 2
make[1]: Leaving directory `/bouwplek/gcc441'
make: *** [all] Error 2
=================================================================

-- 
           Summary: missing include in string.h
           Product: glibc
           Version: 2.10
            Status: NEW
          Severity: normal
          Priority: P2
         Component: libc
        AssignedTo: drepper at redhat dot com
        ReportedBy: alex at vanhout-narvaez dot com
                CC: glibc-bugs at sources dot redhat dot com
 GCC build triplet: i686-pc-linux-gnu
  GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu


http://sourceware.org/bugzilla/show_bug.cgi?id=10456

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


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

* [Bug libc/10456] missing include in string.h
  2009-07-28 22:58 [Bug libc/10456] New: missing include in string.h alex at vanhout-narvaez dot com
@ 2009-07-28 23:06 ` alex at vanhout-narvaez dot com
  2009-07-29  5:43 ` jakub at redhat dot com
  2009-08-19 12:21 ` alex at vanhout-narvaez dot com
  2 siblings, 0 replies; 7+ messages in thread
From: alex at vanhout-narvaez dot com @ 2009-07-28 23:06 UTC (permalink / raw)
  To: glibc-bugs


------- Additional Comments From alex at vanhout-narvaez dot com  2009-07-28 23:06 -------
Sorry,

Taken my time to create a complete bug report, Typing error. :-(


It should read: 
Given that xlocale.h is only included when __USE_XOPEN2K8 is true this lead to
an error when __USE_XOPEN2K8 is false and __USE_GNU is TRUE.

Regards,
Alex

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|missing include in string.h |missing include in string.h


http://sourceware.org/bugzilla/show_bug.cgi?id=10456

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


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

* [Bug libc/10456] missing include in string.h
  2009-07-28 22:58 [Bug libc/10456] New: missing include in string.h alex at vanhout-narvaez dot com
  2009-07-28 23:06 ` [Bug libc/10456] " alex at vanhout-narvaez dot com
@ 2009-07-29  5:43 ` jakub at redhat dot com
  2009-08-19 12:21 ` alex at vanhout-narvaez dot com
  2 siblings, 0 replies; 7+ messages in thread
From: jakub at redhat dot com @ 2009-07-29  5:43 UTC (permalink / raw)
  To: glibc-bugs


------- Additional Comments From jakub at redhat dot com  2009-07-29 05:43 -------
When __USE_GNU is defined, __USE_XOPEN2K8 is always defined as well, unless you
are expplicitly defining or undefining these macros, which you must not do.
Use _GNU_SOURCE, _XOPEN_SOURCE {500,600,700,...}, etc. macros before including
first header instead.  See
info libc 'Feature Test Macros'

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


http://sourceware.org/bugzilla/show_bug.cgi?id=10456

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


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

* [Bug libc/10456] missing include in string.h
  2009-07-28 22:58 [Bug libc/10456] New: missing include in string.h alex at vanhout-narvaez dot com
  2009-07-28 23:06 ` [Bug libc/10456] " alex at vanhout-narvaez dot com
  2009-07-29  5:43 ` jakub at redhat dot com
@ 2009-08-19 12:21 ` alex at vanhout-narvaez dot com
  2 siblings, 0 replies; 7+ messages in thread
From: alex at vanhout-narvaez dot com @ 2009-08-19 12:21 UTC (permalink / raw)
  To: glibc-bugs


------- Additional Comments From alex at vanhout-narvaez dot com  2009-08-19 12:21 -------
(In reply to comment #2)
> When __USE_GNU is defined, __USE_XOPEN2K8 is always defined as well, unless you
> are expplicitly defining or undefining these macros, which you must not do.
> Use _GNU_SOURCE, _XOPEN_SOURCE {500,600,700,...}, etc. macros before including
> first header instead.  See
> info libc 'Feature Test Macros'

This was a dump form building GCC 4.4.1. I am knowledgeable enough to provide a
simple solution, but can not tell if this is an error in GCC 4.4.1 or glibc. If
was not something I put together myself that I can easily fix.



-- 


http://sourceware.org/bugzilla/show_bug.cgi?id=10456

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


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

* [Bug libc/10456] missing include in string.h
       [not found] <bug-10456-131@http.sourceware.org/bugzilla/>
  2014-05-10  0:07 ` org.sourceware at pooryorick dot com
  2014-05-10  0:13 ` org.sourceware at pooryorick dot com
@ 2014-07-01  7:30 ` fweimer at redhat dot com
  2 siblings, 0 replies; 7+ messages in thread
From: fweimer at redhat dot com @ 2014-07-01  7:30 UTC (permalink / raw)
  To: glibc-bugs

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

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

* [Bug libc/10456] missing include in string.h
       [not found] <bug-10456-131@http.sourceware.org/bugzilla/>
  2014-05-10  0:07 ` org.sourceware at pooryorick dot com
@ 2014-05-10  0:13 ` org.sourceware at pooryorick dot com
  2014-07-01  7:30 ` fweimer at redhat dot com
  2 siblings, 0 replies; 7+ messages in thread
From: org.sourceware at pooryorick dot com @ 2014-05-10  0:13 UTC (permalink / raw)
  To: glibc-bugs

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

--- Comment #5 from Poor Yorick <org.sourceware at pooryorick dot com> ---
Just noticed that http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52922 contains a
good explanation of this.

-- 
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/10456] missing include in string.h
       [not found] <bug-10456-131@http.sourceware.org/bugzilla/>
@ 2014-05-10  0:07 ` org.sourceware at pooryorick dot com
  2014-05-10  0:13 ` org.sourceware at pooryorick dot com
  2014-07-01  7:30 ` fweimer at redhat dot com
  2 siblings, 0 replies; 7+ messages in thread
From: org.sourceware at pooryorick dot com @ 2014-05-10  0:07 UTC (permalink / raw)
  To: glibc-bugs

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

Poor Yorick <org.sourceware at pooryorick dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |org.sourceware at pooryorick dot c
                   |                            |om

--- Comment #4 from Poor Yorick <org.sourceware at pooryorick dot com> ---
running a gcc-4.4.1 on Red Hat Enterprise Linux 6 that was compiled on Red-Hat
Enterprise Linux 5 resulted in a situation where gcc used its own modified
versin of the RHEL5 features.h, resulting in the following error:

   #/usr/include/time.h:226: error: expected declaration specifiers or '...'    
   #before '__locale_t 

In this situation, __USE_XOPEN2K8 indeed was unset while __USE_GNU was set.

-- 
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-07-01  7:30 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-07-28 22:58 [Bug libc/10456] New: missing include in string.h alex at vanhout-narvaez dot com
2009-07-28 23:06 ` [Bug libc/10456] " alex at vanhout-narvaez dot com
2009-07-29  5:43 ` jakub at redhat dot com
2009-08-19 12:21 ` alex at vanhout-narvaez dot com
     [not found] <bug-10456-131@http.sourceware.org/bugzilla/>
2014-05-10  0:07 ` org.sourceware at pooryorick dot com
2014-05-10  0:13 ` org.sourceware at pooryorick dot com
2014-07-01  7:30 ` 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).