mailing list of musl libc
 help / color / mirror / code / Atom feed
From: Rich Felker <dalias@libc.org>
To: musl@lists.openwall.com
Subject: Re: [PATCH v3] remaining steps for time64 switchover
Date: Fri, 1 Nov 2019 21:40:25 -0400	[thread overview]
Message-ID: <20191102014025.GR16318@brightrain.aerifal.cx> (raw)
In-Reply-To: <20191102013911.GA26175@brightrain.aerifal.cx>

[-- Attachment #1: Type: text/plain, Size: 886 bytes --]

On Fri, Nov 01, 2019 at 09:39:11PM -0400, Rich Felker wrote:
> A couple errors in the v2 patchset motivated me to factor the changes
> to sys/socket.h and arch/generic/ioctl.h out of the main switchover
> commit, so that the latter only touches arch dirs, and acts uniformly
> on them. The final result with all patches applied is almost the same,
> except now the powerpc and mips[n32] socket.h bits omit the time64
> socket options, letting the top-level header's defaults take effect.
> 
> All archs I have toolchains handy for, which includes the oddballs
> (mips, powerpc) and a few 64-bit ones, have been tested to build
> successfully and get the right values of the sockopt and ioctl macros,
> utilizing a horrible hack (uncommitted of course) dropped into the
> source tree while building.

And for reference, here's the hack (attached), valid for checking
everything but x32.

[-- Attachment #2: time64_check.c --]
[-- Type: text/plain, Size: 394 bytes --]

#include <sys/socket.h>
#include <sys/ioctl.h>

#if __LONG_MAX == 0x7fffffff
#define OP !=
#else
#define OP ==
#endif

#define sizeof(x) 16

#if \
SO_RCVTIMEO OP 66 || \
SO_SNDTIMEO OP 67 || \
SO_TIMESTAMP OP 63 || \
SO_TIMESTAMPNS OP 64 || \
SO_TIMESTAMPING OP 65 || \
SIOCGSTAMP OP _IOR(0x89, 6, char[16]) || \
SIOCGSTAMPNS OP _IOR(0x89, 7, char[16]) || \
0
#error bad time64 macros
#endif



  reply	other threads:[~2019-11-02  1:40 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-02  1:39 Rich Felker
2019-11-02  1:40 ` Rich Felker [this message]
2019-11-02 16:34 ` Rich Felker
2019-11-02 21:37   ` Rich Felker

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191102014025.GR16318@brightrain.aerifal.cx \
    --to=dalias@libc.org \
    --cc=musl@lists.openwall.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).