From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by sourceware.org (Postfix) with ESMTPS id B0F223858D38 for ; Wed, 24 Jan 2024 18:08:18 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org B0F223858D38 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=systematicsw.ab.ca Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=systematicsw.ab.ca ARC-Filter: OpenARC Filter v1.0.0 sourceware.org B0F223858D38 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=216.40.44.17 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1706119700; cv=none; b=TkfuKUjjGpN09n1FsLrlleQc18Dzf9xGvUUZT/Fl7z3WZeEZsmXEP5fz64TtQWvrOdUFFzGq6/DUPcqD7kZ7dMxsXwcgIBKMhYaIfjhiyY30JhsCpP+QfjSi5OCe2x6ilkzRCgftQFgCJkNo1aix4ihf59nQhGsVikTh3/DV9Ho= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1706119700; c=relaxed/simple; bh=LxqYb7Ygmzzh4ergXhrw/Mn0sV3CoMC8lpHJ3QmHwsw=; h=Message-ID:Date:MIME-Version:From:Subject:To; b=lxAwVMVJCYq7czq1j0I5Pp3/R0ADaJUz3OsCJUUc/rwxqyhTUIINk5uLsLx6oerUDc0I0fEls/S5kDWO+TFwe94Ah0cqRgmRYK0J8LnPRKDfeCrlJ0kHxb0YvskV32cebkfkyR9/Cr3CP3LUFwnMHaY/v36YRM3ZmYu5G4kj76A= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from omf03.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay05.hostedemail.com (Postfix) with ESMTP id 7E92340106 for ; Wed, 24 Jan 2024 18:08:17 +0000 (UTC) Received: from [HIDDEN] (Authenticated sender: Brian.Inglis@SystematicSW.ab.ca) by omf03.hostedemail.com (Postfix) with ESMTPA id E70D760011 for ; Wed, 24 Jan 2024 18:08:15 +0000 (UTC) Message-ID: <9bd70eeb-1ab2-4f29-8b2c-28b0704fea46@systematicsw.ab.ca> Date: Wed, 24 Jan 2024 11:08:14 -0700 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird From: brian.inglis@systematicsw.ab.ca Reply-To: newlib@sourceware.org Subject: Re: Hide non-standard itoa/utoa() in stdlib.h or drop these functions? Content-Language: en-CA To: newlib@sourceware.org References: <83962310-aec8-a718-bafb-6e10703693b8@t-online.de> <90bedd49-bed9-0c6d-fd89-a94241b0dd4f@t-online.de> Autocrypt: addr=brian.inglis@systematicsw.ab.ca; keydata= xjMEXopx8xYJKwYBBAHaRw8BAQdAnCK0qv/xwUCCZQoA9BHRYpstERrspfT0NkUWQVuoePbN LkJyaWFuIEluZ2xpcyA8QnJpYW4uSW5nbGlzQFN5c3RlbWF0aWNTdy5hYi5jYT7ClgQTFggA PhYhBMM5/lbU970GBS2bZB62lxu92I8YBQJeinHzAhsDBQkJZgGABQsJCAcCBhUKCQgLAgQW AgMBAh4BAheAAAoJEB62lxu92I8Y0ioBAI8xrggNxziAVmr+Xm6nnyjoujMqWcq3oEhlYGAO WacZAQDFtdDx2koSVSoOmfaOyRTbIWSf9/Cjai29060fsmdsDM44BF6KcfMSCisGAQQBl1UB BQEBB0Awv8kHI2PaEgViDqzbnoe8B9KMHoBZLS92HdC7ZPh8HQMBCAfCfgQYFggAJhYhBMM5 /lbU970GBS2bZB62lxu92I8YBQJeinHzAhsMBQkJZgGAAAoJEB62lxu92I8YZwUBAJw/74rF IyaSsGI7ewCdCy88Lce/kdwX7zGwid+f8NZ3AQC/ezTFFi5obXnyMxZJN464nPXiggtT9gN5 RSyTY8X+AQ== Organization: Systematic Software In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: E70D760011 X-Spam-Status: No, score=-0.8 required=5.0 tests=BAYES_00,BODY_8BITS,KAM_DMARC_STATUS,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE,UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.6 X-Stat-Signature: dpca8h1m3awc93zbu8ka4jzqj6x4tw6e X-Rspamd-Server: rspamout04 X-Session-Marker: 427269616E2E496E676C69734053797374656D6174696353572E61622E6361 X-Session-ID: U2FsdGVkX1+i4xttTG2RIhnqZmZBpjpDbxf8usjP3O4= X-HE-Tag: 1706119695-861970 X-HE-Meta: U2FsdGVkX1+kjkwOD9zrXetOatepR74MnHbs2iqfMGCWY6/qbX64w1p8OHZSpSU0DOUSOPF+Y70YIGtUyJyAnsxugzXOcxXQNtVim5Xa/l4HqzYy/MiPq0Rb2EhrvVwubXx9zXHBx0/fQ3JzsdseWi3hwor71rhasosjAkXZrGm2c6CA2rohYE6Cfk1F4R9ixNrZeo9nvOxUUiPtvRef7Gvqri7UKiHa+LLDUDx3engAFD4vi/18a3BzWH1VGfLQfCHiYH7BFH2o8t1veB715B+8juzkoyz+Nv/RiXjI5PHxwAdc4GncjtKF9HEB92Zz3ruurJBQa/xJmuCkfCL2Gsd37Cn9MbNri8CMzv9POqyiP8zoWLhAt14rmM4nm5smXWhmSksD/99Vfs7Fjx1afQv6Dqd+5+PI54qebyeTWDE= X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On 2024-01-24 04:16, Corinna Vinschen wrote: > On Jan 24 10:42, Christian Franke wrote: >> brian.inglis@systematicsw.ab.ca wrote: >>> On 2024-01-23 02:03, Corinna Vinschen wrote: >>>> On Jan 22 19:46, Christian Franke wrote: >>>>> The functions itoa() and utoa() are non-standard, not exported >>>>> by Cygwin and >>>>> also unavailable on FreeBSD and Linux (glibc and musl libc). >>>>> Busybox for >>>>> example could not be build OOTB using newlib's stdlib.h because >>>>> there are >>>>> conflicts with local functions with same names but different >>>>> signatures. >>>>> [...] >>>> Does anybody actually *need* itoa/utoa as long as we have __itoa/__utoa? >>> >>> Unix 1st ed Manual defined itoa as did K&R on p60 (/p64 2ed); at least >>> IBM and QNX and "some compilers" provide itoa and others: >>> >>>     https://cplusplus.com/reference/cstdlib/itoa/ >>> >>> other libraries also provide {,u}{,l}ltoa. >> >> This page suggests that at least the K&R version was different (no radix >> parameter): >> https://en.wikibooks.org/wiki/C_Programming/stdlib.h/itoa > > Also, the fact that it has been mentioned in K&R was apparently no > incentive to standarize it later on. That's why its existence on > various systems is a bit erratic. > >>> Newlib provided the function and man pages, which should be updated to >>> reflect the changed situation, as they will have been used, and users >>> will want to know what happened and what to do e.g. use prefixed >>> functions, #define, sprintf(3), etc. > > Mind, I never said to remove the underscored functins. So the > functionality still exists, it's just called __foo instead of foo. > >>> Downstream systems should note the change in their lists of supported >>> functions, and in their release notes. > > We don't have any influence on downstream, but if downstream wants the > API, it's easy to provide it by aliasing foo to __foo in a downstream > header. We do have some - Cygwin, RTEMS - others should note! -- Take care. Thanks, Brian Inglis Calgary, Alberta, Canada La perfection est atteinte Perfection is achieved non pas lorsqu'il n'y a plus rien à ajouter not when there is no more to add mais lorsqu'il n'y a plus rien à retirer but when there is no more to cut -- Antoine de Saint-Exupéry