{"id":18097,"url":"https://patchwork.libcamera.org/api/1.1/covers/18097/?format=json","web_url":"https://patchwork.libcamera.org/cover/18097/","project":{"id":1,"url":"https://patchwork.libcamera.org/api/1.1/projects/1/?format=json","name":"libcamera","link_name":"libcamera","list_id":"libcamera_core","list_email":"libcamera-devel@lists.libcamera.org","web_url":"","scm_url":"","webscm_url":""},"msgid":"<20230108214357.12641-1-laurent.pinchart@ideasonboard.com>","date":"2023-01-08T21:43:55","name":"[libcamera-devel,v1,0/2] libcamera Fix compilation with uClibc","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/1.1/people/2/?format=json","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"mbox":"https://patchwork.libcamera.org/cover/18097/mbox/","series":[{"id":3702,"url":"https://patchwork.libcamera.org/api/1.1/series/3702/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=3702","date":"2023-01-08T21:43:55","name":"libcamera Fix compilation with uClibc","version":1,"mbox":"https://patchwork.libcamera.org/series/3702/mbox/"}],"comments":"https://patchwork.libcamera.org/api/covers/18097/comments/","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id 12ADDC322E\n\tfor <parsemail@patchwork.libcamera.org>;\n\tSun,  8 Jan 2023 21:44:03 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 6EBB961F09;\n\tSun,  8 Jan 2023 22:44:02 +0100 (CET)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 7F24461F09\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSun,  8 Jan 2023 22:44:01 +0100 (CET)","from pendragon.ideasonboard.com (213-243-189-158.bb.dnainternet.fi\n\t[213.243.189.158])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id D4E326CF\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSun,  8 Jan 2023 22:44:00 +0100 (CET)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1673214242;\n\tbh=zbC0kfQiM9AaXVSfuuTuR8MbtN5g/ZBQEEMcK3ezzMQ=;\n\th=To:Date:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post:\n\tList-Help:List-Subscribe:From:Reply-To:From;\n\tb=se2nGJVe6n17ikJGdo54LWjKju+0RY1owgzr2o+Y96gFCQUCKudvEae1vNlO1RTFl\n\tNCi3/Au2eKVBSbZzD6DozCKOMamT7GnPl7QUAobxD6wrCff3vk5zLR1kxafbN3jneX\n\tTUkdG8EFJUm8TKD2rhKms/si5pLgSpCqgpEmn5WYPOvblKomgy1VFNMVl4Tn2TKBLy\n\tH8YIy7I4yMnUDvg53p3yCjySYktd45F57jxhYSSvHfUJy8bz3PhCTzeQ81iMVLJcda\n\t5xJAA7AbVwLq3HpAV8iXRfGmL6g4592V3l7V+T4CIH74Nl1XqNU4utv5ho6ZoctleY\n\toO2k8+aA0a0ew==","v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1673214241;\n\tbh=zbC0kfQiM9AaXVSfuuTuR8MbtN5g/ZBQEEMcK3ezzMQ=;\n\th=From:To:Subject:Date:From;\n\tb=GmcIp5IXdS8H2O0xH1J8b/xvR48kI9lo2krxq48/agMDDoxn1hvqayW3aGVplQSEr\n\tEgrTzB8BRBzyq2B/1LEL4RcF5O1b7kkUZtDVrjaq5uzxLICOey+kY+TymFWhvmgZF+\n\tBtdnCAWNF2SZmOHPKAC8opuHSl3RoITvVtRZfoHc="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"GmcIp5IX\"; dkim-atps=neutral","To":"libcamera-devel@lists.libcamera.org","Date":"Sun,  8 Jan 2023 23:43:55 +0200","Message-Id":"<20230108214357.12641-1-laurent.pinchart@ideasonboard.com>","X-Mailer":"git-send-email 2.38.2","MIME-Version":"1.0","Content-Transfer-Encoding":"8bit","Subject":"[libcamera-devel] [PATCH v1 0/2] libcamera Fix compilation with\n\tuClibc","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","From":"Laurent Pinchart via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>","Reply-To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"},"content":"Hello,\n\nThis patch series fixes compilation errors with uClibc that were\nintroduced in commit e8ae254970cf (\"libcamera: yaml_parser: Use C\nlocale\").\n\nuClibc can be compiled with different levels of locale support:\n\n- Full locale object (locale_t) support, with strto*_l() functions\n- Locale support without locale object and strto*_l() functions\n- Hardcoded \"C\" locale\n\nIn the second and third cases, compilation of libcamera fails due to\nmissing newlocale(), freelocale() and strtod_l() functions.\n\nPatch 1/2 first moves the strtod_l() and the locale_t RAII wrapper from\nyaml_parser.h to utils.h, as the fix exceeds the scope of an\nimplementation private to the YAML parser. Patch 2/2 then fixes the\nissue by using strtod() when locale object support isn't available.\n\nThis fixes compilation with all the cases described above, but leaves a\nruntime issue in the second case if the locale has different numeric\nparsing rules. As this is a corner case (locale support without locale\nobject support) of a corner case (uClibc), I don't expect it to be an\nissue in practice. If it turns out to cause problems, a reimplementation\nof strtod() in libcamera may be needed.\n\nLaurent Pinchart (2):\n  base: utils: Add and use strtod() helper\n  libcamera: base: utils: Support C libraries lacking locale support\n\n include/libcamera/base/utils.h |  2 ++\n meson.build                    |  4 +++\n src/libcamera/base/utils.cpp   | 58 ++++++++++++++++++++++++++++++++++\n src/libcamera/yaml_parser.cpp  | 34 +-------------------\n 4 files changed, 65 insertions(+), 33 deletions(-)\n\n\nbase-commit: c15ff6b59de877ab8ee19b09e9315e5eaffdb818"}