Your message dated Sat, 18 Jun 2016 00:52:54 +0200
with message-id <[email protected]>
and subject line closing bugs reported against ancient GCC versions
has caused the Debian Bug report #485135,
regarding g++: unconditionally defines _GNU_SOURCE
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
485135: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=485135
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: libc6-dev
Version: 2.7-10
Severity: normal


Hi,

I want to use the XSI-compliant version of strerror_r(). The code below compiles
without any error using the gcc.

Trying to compile this code as C++ code using the g++ always fails because the
compiler always tries to use the GNU version of strerror_r() that returns an
char* instead of an int. Trying to define _XOPEN_SOURCE=600 does not change
anything.

I used the sample code below:
#include <string.h>
#include <stdio.h>
#include <errno.h>

int main(int argc, char **argv) {

  char buf[1024] = "";

  int rc = strerror_r(EINVAL, buf, sizeof(buf)-sizeof(char));

  printf("%d %s\n", rc, buf);

  return 0;
}

Also using the C++ includes cstring, cstdio and cerrno does not change anything.

The following C++ compilers are installed:
ii  g++                           4:4.2.3-10 The GNU C++ compiler
ii  g++-4.1                       4.1.2-19   The GNU C++ compiler
ii  g++-4.2                       4.2.4-1    The GNU C++ compiler

And g++ is a link to g++-4.2.

-- System Information:
Debian Release: lenny/sid
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: i386 (i686)

Kernel: Linux 2.6.24-1-686-bigmem (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages libc6-dev depends on:
ii  libc6                         2.7-10     GNU C Library: Shared libraries
ii  linux-libc-dev                2.6.24-7   Linux Kernel Headers for developme

Versions of packages libc6-dev recommends:
ii  gcc [c-compiler]              4:4.2.3-10 The GNU C compiler
ii  gcc-4.1 [c-compiler]          4.1.2-19   The GNU C compiler
ii  gcc-4.2 [c-compiler]          4.2.4-1    The GNU C compiler

-- no debconf information



--- End Message ---
--- Begin Message ---
This bug has been reported against an ancient version of
gpc (4.1), gcc/g++/gfortran (4.3), or gcj/gij/gobjc (4.4), that was last
released with Debian 6.0 (squeeze). But even squeeze-lts has now reached
end-of-life and is no longer supported.
The bug is assumed to be fixed (or no longer relevant) in newer GCC
releases and therefore I'm closing this report now. If the problem is
still reproducible in the currently supported versions (gcc-5, gcc-6 or
corresponding g++/gcj), feel free to provide more information, reopen
and reassign this bug report.


Andreas

--- End Message ---

Reply via email to