This is the mail archive of the newlib@sources.redhat.com mailing list for the newlib project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: newlib 1.10.0 vs Linux string.h difference



On Thursday, August 22, 2002, at 10:57 AM, Joel Sherrill <joel@OARcorp.com> wrote:

Hi,

Eric Norum ran across a problem some libstdc++-v3 code in gcc 3.2
which compiles native but doesn't with newlib because of a minor
difference in the two string.h implementations.  I don't know whether
this is a bug in newlib or not and wanted comments:

The file:

#include <string.h>

int f(char *c1) {
  char *c;
  c=strdup(c1);
}

I'd just like to add that the problem shows up in the C++ header bits/locale_facets.tcc which uses strdup. This makes it impossible to compile some otherwise-valid C++ programs with -ansi and the newlib headers.

--
Eric Norum <eric.norum@usask.ca>
Department of Electrical Engineering
University of Saskatchewan
Saskatoon, Canada.
Phone: (306) 966-5394 FAX: (306) 966-5407


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]