Public bug reported:

The version of /usr/include/time.h included with  libc6-dev-2.12.1-0ubuntu10 
contains an inconsistency between :
 line 212: # ifdef __USE_XOPEN2K8    (which introduces a block where __locale_t 
is defined)
 line 223: # ifdef __USE_GNU              (which introduces a block where 
__locale_t is used)

therefore, a compilation error occurs when __USE_GNU is defined and not
__USE_XOPEN2K8, which unfortunately I have when compiling user's
functions for my application code (ansys). To demonstrate the problem ,
the simple code :

#include "stdio.h"
#define __USE_GNU
#include "time.h"
int main() {return 0;}

will not compile with gcc -ansi

It seems that this problem is due to the modification of the glibc
source code by Ulrich Drepper on 2009-02-26  (as found on the site
http://sourceware.org/git/?p=glibc.git&a=search&h=HEAD&st=commit&s=time.h
which is the "ressource" to track evolutions from the official gnu C
library site www.gnu.org/software/libc/resources.html)

I post this bug here, as indicated by glibc maintainers, for those (as
me) who use glibc through a linux distribution (ubuntu10.10 on x86_64,
for me)

ProblemType: Bug
DistroRelease: Ubuntu 10.10
Package: libc6-dev 2.12.1-0ubuntu10
ProcVersionSignature: Ubuntu 2.6.35-23.41-generic 2.6.35.7
Uname: Linux 2.6.35-23-generic x86_64
NonfreeKernelModules: nvidia wl
Architecture: amd64
Date: Tue Dec 14 19:32:50 2010
InstallationMedia: Ubuntu 10.04 LTS "Lucid Lynx" - Release amd64 (20100429)
ProcEnviron:
 PATH=(custom, no user)
 LANG=fr_FR.utf8
 SHELL=/bin/bash
SourcePackage: eglibc

** Affects: eglibc (Ubuntu)
     Importance: Undecided
         Status: New


** Tags: amd64 apport-bug maverick

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/690311

Title:
  time.h inconsistency may create a compilation error

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to