This is the mail archive of the newlib@sourceware.org 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: [PATCH v3] Merge parts of <sys/time.h> from FreeBSD



On 7/6/2015 10:08 AM, Corinna Vinschen wrote:
Hi Marco,

On Jul  5 16:33, Marco Atzeri wrote:
On 3/13/2015 1:24 PM, Corinna Vinschen wrote:
Hi Sebastian,

On Mar 13 11:00, Sebastian Huber wrote:
Merge parts of the latest <sys/time.h> from FreeBSD to Newlib.  This has
two reasons.

This patch also allowed to remove a Cygwin specific piece of code.
I now pushed your patch as well as the Cygwin ones.

Thanks,
Corinna



with the current settings, on cygwin with _GNU_SOURCE on
/usr/include/sys/time.h

bintime_mul(struct bintime *_bt, u_int _x)
is included but

u_int is not defined

Thanks, but you forgot to paste this detail from your mail to the
Cygwin list:

u_int is defined in
  /usr/include/sys/types.h
and
  /usr/include/sys/time.h
includes it, but it is coveread by a

  # ifndef        _POSIX_SOURCE

Also your project defines _POSIX_SOURCE.

So while u_int is guarded !_POSIX_SOURCE, the bintime_mul inline function
using it is guarded __BSD_VISIBLE.

Sebastian, the easy way out would be to redefine bintime_mul to use
and "unsigned int" as second parameter.

this is cheating, and not solving the root problem.

OTOH, shouldn't the affected types in sys/types.h guarded __BSD_VISIBLE,
too, instead?  They are on FreeBSD, afaics.

I triggered the problem in an unusual way, however
functions and type should be guarded in the same way,
to avoid further lurking issue along the road.


Thanks,
Corinna

Ciao
Marco

Marco


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