From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/12279 Path: news.gmane.org!.POSTED!not-for-mail From: Nicholas Wilson Newsgroups: gmane.linux.lib.musl.general Subject: Re: Feature request: building musl in a portable way Date: Fri, 22 Dec 2017 19:06:17 +0000 Message-ID: References: <20171221213822.GY1627@brightrain.aerifal.cx> <20171222174922.GC1627@brightrain.aerifal.cx> ,<20171222180832.GD1627@brightrain.aerifal.cx> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1513969479 12649 195.159.176.226 (22 Dec 2017 19:04:39 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 22 Dec 2017 19:04:39 +0000 (UTC) To: "musl@lists.openwall.com" Original-X-From: musl-return-12295-gllmg-musl=m.gmane.org@lists.openwall.com Fri Dec 22 20:04:35 2017 Return-path: Envelope-to: gllmg-musl@m.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by blaine.gmane.org with smtp (Exim 4.84_2) (envelope-from ) id 1eSScU-0002wh-20 for gllmg-musl@m.gmane.org; Fri, 22 Dec 2017 20:04:34 +0100 Original-Received: (qmail 24539 invoked by uid 550); 22 Dec 2017 19:06:34 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Original-Received: (qmail 24515 invoked from network); 22 Dec 2017 19:06:34 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=realvnc.onmicrosoft.com; s=selector1-realvnc-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=yVOczDtlMf2rZC82cOlMPc7MZzdrtqnSR/xiT+A8gEA=; b=gEIsoEf/vc/b+ydX81gl8yP0s0fzJ6mjcrI6a2Xi+AptMnZK/5K1GbhqFnHzK2lpyRYW5iYxAd4Y4hp5A2tjag5Tg5P0939cUF8TStWqD2vHxN+8QcjXnikydYw756s+aJWYDgvPdQnzfGPhrISmQB0ZEhqY64e4UuMkfxeb0Bg= Thread-Topic: [musl] Feature request: building musl in a portable way Thread-Index: AQHTenhf20VMeW9Ke0GWVLf9KN6PYaNOUxsAgAE2VgCAAAEnIYAAGtwAgAABHmqAAAQ9AIAADjDG In-Reply-To: <20171222180832.GD1627@brightrain.aerifal.cx> Accept-Language: en-GB, en-US Content-Language: en-GB X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=nicholas.wilson@realvnc.com; x-originating-ip: [2a00:23c3:744c:6800:8183:7221:9cd5:df06] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;AM6PR0502MB3878;6:2RfnzdKJwuOOnd+8tLx3g9AybFD49X0DQe+sSCbOCyqt+87bVa0uKB89759n6oPFFhbVC0ZRfttBo3G7JmH6j0aXHQ8B7DlijGD4e7FKr6gaKvSOUnPBbGWG5dABUPaeLLC36wwgl2kj2LB2G9MmW8HsF7gkfeK1fym9LliPwOEFFRRXzWVirr1y0/75CW0Ij7yk5r8T5HHyYdB0ZWgwPiIq0l3QfbNcCjYNMbJwFSJtEux0O3WvxeVCNvoct0uxDeCb515eV2QUTwiosJ4FT/SBrtOGQh2TnbpiPxpPiH3ZfWe+VOdzUES2SuQ2x9eJoOadAY8AimjKiiLTsmiuLfexddQx5yLAH7CmRlHKI58=;5:OvsypzGl1Gc3LvW8ypBfb7inrOxq1W1zmUvxyjdTI+5Z0ONI+KL4/5SJPswItdLEEJKjyzoVBHzp33HIDNNuDL9YWrIql9oRV+u43iQtwaRpvo1V39IpuVqYkSOErSdK0OfW2JZUxwk/3gSQACdTEg1g0+fQ90Rv4v59N0CG82s=;24:rZS5ts3xdjXhCN+Ycv2HOlDsdY609hE/oyjyHg2pXRFshRsUz/T+rl2hQWuqENXLDMJ4sPteEJxzVLWmfFzM4PyX8DiWiIVMeQ7eM6o+vcw=;7:PDH+CIXopxABS2x9pN/S5T8yI3kCFtnYe/eECiWdE2cRDPrj/VEbfJeDAKEn7fHXzFcL39PZ+SQM9QJzIeipD4Njjwqt oCALqfwBnY6BsGbH9P6F4xV8DEPOCszfXN7bQLAkbBhj78mvV5HAyVObSXS0zVKBJQNS5LHQfqhvpeK5ywXzQX8v/DqLOpQXD+ x-ms-exchange-antispam-srfa-diagnostics: SSOS; x-ms-office365-filtering-correlation-id: ea028517-9523-49a8-7727-08d5496f145d x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(4534020)(4602075)(4603075)(4627115)(201702281549075)(5600026)(4604075)(3008031)(2017052603307)(7153060);SRVR:AM6PR0502MB3878; x-ms-traffictypediagnostic: AM6PR0502MB3878: x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:; x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(6040470)(2401047)(8121501046)(5005006)(3002001)(93006095)(93001095)(3231023)(10201501046)(6041268)(20161123562045)(20161123558120)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(2016111802025)(20161123564045)(6043046)(6072148)(201708071742011);SRVR:AM6PR0502MB3878;BCL:0;PCL:0;RULEID:(100000803101)(100110400095);SRVR:AM6PR0502MB3878; x-forefront-prvs: 05299D545B x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(346002)(39380400002)(366004)(396003)(39840400004)(376002)(189003)(199004)(24454002)(76176011)(7696005)(229853002)(25786009)(6916009)(33656002)(99286004)(68736007)(305945005)(7736002)(2950100002)(5660300001)(74316002)(2351001)(3660700001)(9686003)(86362001)(55016002)(53936002)(5640700003)(3280700002)(6246003)(2906002)(2900100001)(106356001)(8936002)(6436002)(93886005)(316002)(478600001)(14454004)(6506007)(102836004)(2501003)(53546011)(6116002)(81166006)(5250100002)(81156014)(97736004)(105586002)(8676002)(1730700003);DIR:OUT;SFP:1101;SCL:1;SRVR:AM6PR0502MB3878;H:AM6PR0502MB3878.eurprd05.prod.outlook.com;FPR:;SPF:None;PTR:InfoNoRecords;MX:1;A:1;LANG:en; received-spf: None (protection.outlook.com: realvnc.com does not designate permitted sender hosts) spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM X-MS-Exchange-CrossTenant-Network-Message-Id: ea028517-9523-49a8-7727-08d5496f145d X-MS-Exchange-CrossTenant-originalarrivaltime: 22 Dec 2017 19:06:17.2941 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 9ad766d3-c6a5-4458-8c58-244e7c118728 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR0502MB3878 X-OriginatorOrg: realvnc.com Xref: news.gmane.org gmane.linux.lib.musl.general:12279 Archived-At: On 22 December 2017 18:08, Rich Felker wrote: > Wouldn't just exporting a TZ variable be easier? (Sorry ardi for hijacking your thread! Just a brief response.) That gives you the current timezone, true. But to make localtime() work, yo= u of course need historical timezone information - a list of timestamps whe= n the timezone offset changed. Getting that information from the browser is= actually rather hard. Of course the browser internally has the list of tim= ezone data, but it doesn't expose it via an API - all you can do is basical= ly call a JavaScript equivalent of localtime() and find the timezone offset= at specific points you sample. So we can't easily extract the current time= zone's full data, and use Musl's implementation. Our current solution is si= mple, and does a wholesale redirection of localtime() to a browser-based ve= rsion. Implementing localtime() in a browser is easy, but extracting zonein= fo is hard. Nick=