From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from relay9-d.mail.gandi.net (relay9-d.mail.gandi.net [IPv6:2001:4b98:dc4:8::229]) by sourceware.org (Postfix) with ESMTPS id 0562E385782C for ; Wed, 14 Feb 2024 07:58:10 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 0562E385782C Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=starynkevitch.net Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=starynkevitch.net ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 0562E385782C Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2001:4b98:dc4:8::229 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1707897493; cv=none; b=f6Wl0+C28tfnPmZeBAzEKPlqZDuWdLDfHR51888FZ24QhBtgtZLDHBlevPr7kUMgkgHCflmW7okUvvhEgPHS4pSIrR/zCa7hbQU+xpp5VUUPhAdVZr77X1bOiOn4Cxj0JkOLCxZBvUbx4eXJcrRUjH3HBNEGSiW8TZPYhAglhN8= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1707897493; c=relaxed/simple; bh=NTVbvNAtXu7X1LlRKSXnTGIljVtxb42AH5ARG54jqsY=; h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:To:From; b=ou7GSZ2DjTY62uPnwSes4WptU6ay9GbRxGp6uuvAdztVoCsyHk7PySFmc/3KMrsZzk2Jq8KMkK6QaAoPu0qpUXtKToi6M0tEojA4Dk7ZJhMSBmvFLN8XdeYTfx9oAujlwu/+YIU+lN5IX7ICSHCBs1e5/Vg4Z4mhslSMPGEaX/g= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail.gandi.net (Postfix) with ESMTPSA id 17A00FF806; Wed, 14 Feb 2024 07:58:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=starynkevitch.net; s=gm1; t=1707897489; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=AbebZpl5sWmZh+cyUqAobZV8ka2+p8EmqeayP0S6RXk=; b=HONECBKM8IiSjvQArb8PR7qy0b70cQoxWp9r7nFkkuHruPJRGCGRJmb/Dsg/9S7G6U7M9K sIZF/VZK14WwiPooGhmkEuN0SvWSdCs+6VShXmO1x2cM4fzpf7NH0/knFIlKDehnLiJMka WQhFLwuYN1Mcd5NJVYtylaDNtzahJYVEp1edg+w7NTIc3Qv8s6cCNXlL1BjFBfcvjh0IqU APufN06rIV5J5iSfAfzly6HQUiXCB2U/0cnRvPXmT5osUxXKlZator2aiOqJgGhAwbbAdJ JeTCIBI7oQkraOSC+HA3SXrXA9qfzsCz6AXsA1vVrnf+wHokXuLyI4YKiySw3Q== Content-Type: multipart/alternative; boundary="------------9GwU0s05olf9lIQ1WEGaSVPz" Message-ID: <406d99f0-e577-4b01-b8ab-ca543672cbd6@starynkevitch.net> Date: Wed, 14 Feb 2024 08:58:07 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: errnos.h usage Content-Language: en-US, fr-FR To: Lucas Augusto Valentim Dantas References: From: Basile Starynkevitch Cc: libc-help@sourceware.org In-Reply-To: X-GND-Sasl: basile@starynkevitch.net X-Spam-Status: No, score=-2.5 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,HTML_MESSAGE,JMQ_SPF_NEUTRAL,KAM_SHORT,RCVD_IN_DNSWL_LOW,SPF_HELO_PASS,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: This is a multi-part message in MIME format. --------------9GwU0s05olf9lIQ1WEGaSVPz Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Hello from near Paris in France, On 2/14/24 05:59, Lucas Augusto Valentim Dantas via Libc-help wrote: > Hello, I have been playing around with Doom's source code, the 90s one, and I have noticed that it has a header included named errnos.h that I have recently learned that it was actually present in glibc beginning from 2.0.0 (I think) until 2.0.7. Could anyone shed light on why it was added to glibc and later removed? I can't explain why it was added. I can guess why it was removed. > > https://sources.debian.org/src/glibc/2.0.7t-1/sysdeps/unix/sysv/linux/errnos.h/ > https://github.com/id-Software/DOOM/blob/master/linuxdoom-1.10/i_video.c#L49 Maybe because errnos.h is no more in standard C or in POSIX. But errno.h is standard. See also https://man7.org/linux/man-pages/man3/errno.3.html > and https://www.open-std.org/jtc1/sc22/wg14/www/docs/n1570.pdf or buy from your ISO representative the formal C standard book. From my human (and perhaps wrong) memory, errnos.h existed on old operating systems and computers like Sun4/110 workstation with a SunOS3.5 (this was in the early 1990s, I worked then as a software developer at CEA ). I don't have that header file on my current Debian/Sid/amd64 desktop. Today, using errno actually requires the #include preprocessor directive, and on my Linux system it is a macro defined in /usr/include/errno.h as > rimski.x86_64 ~/misc-basile 8:45 .0 %grep errno_/usr/include/errno.h_ > * ISO C99 Standard: 7.5 Errors > #include > extern int *__errno_location (void) __THROW __attribute_const__; > # define errno (*__errno_location ()) > #endif /* errno.h */ And today my pet open source project is the RefPerSys inference engine (*REF*lective *PER*sistent *SYS*tem, GPLv3+ licensed) on https://github.com/RefPerSys/RefPerSys/ ; if you know someone who wants to contribute, please forward to him/her this email. Thanks for reading. Regards > -- Basile Starynkevitch (only mine opinions / les opinions sont miennes uniquement) 92340 Bourg-la-Reine, France web page: starynkevitch.net/Basile/ See/voir:https://github.com/RefPerSys/RefPerSys --------------9GwU0s05olf9lIQ1WEGaSVPz--