tech-userlevel archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: strtok_r strange failure
On Wed, Feb 05, 2014 at 09:09:33AM +0000, Emmanuel Dreyfus wrote:
> On Wed, Feb 05, 2014 at 09:16:01AM +0100, Rhialto wrote:
> > First thought: header file not included, so strtok_r is not declared and
> > defaults to returning int.
>
> Worse than that: heander included, but missing _POSIX_C_SOURCE=199506
> so that strtok_t() is not defined. Wow, this is tough.
The compiler should have output a warning for the int -> pointer assignment.
For historic reasons that one isn't an error.
The 'no prototype' warning isn't enabled by default.
David
--
David Laight: david%l8s.co.uk@localhost
Home |
Main Index |
Thread Index |
Old Index