From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lj1-f178.google.com (mail-lj1-f178.google.com [209.85.208.178]) by sourceware.org (Postfix) with ESMTPS id 37E173985479 for ; Tue, 1 Jun 2021 19:35:57 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 37E173985479 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=rtems.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-lj1-f178.google.com with SMTP id c11so5287135ljd.6 for ; Tue, 01 Jun 2021 12:35:57 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:reply-to:from:date:message-id :subject:to; bh=38ZPBznypYtKXFykjM7zL+ImJkqep8Ce4M8JYMFySQE=; b=CwDw7uB2tWHJ3fAl+bryMB4u1UKr0AGv86u1fWmJ4/mN28i9ah34W6DhHczYS2Hdyh 2jIFP7FpyKEOjvyl2lu4YyQ7RxlY3inh93q12F8locDAb2JTMZg5okMPZ/jC5K+TmK3P Pcs66Q35Dvo5tQ1iweFLurx35IzUVzTdxAxzgZVAez1Yo90lkrNyq2al9WAxl6eROywB m5pLivoeGKzxm6PgPJVwsQHh/KhjMT3d62JRsqjaI4nH8VrHkHL2FAn3mEEK3h1RccvJ lZQ3nEF00CEFobMDLVQWfeAWOd1GE6gtIEbTRGACSM5DZBZq7c1g41Zh9HnTWlT9GN9m S+9g== X-Gm-Message-State: AOAM533cyWA7jm9jgVZTqvU/IM97HbrgqAWm1jG98F6PIBoWasEKvBXz GmQvdpe5+pzzPVYY3zeFsata9h0A1zubEw== X-Google-Smtp-Source: ABdhPJxr65YRaAUf283cg3pwVwJOQi7t41E9na7VKeA4fY/qrqYky1aQca66iWhwN1JxtrVrAxbM7Q== X-Received: by 2002:a2e:9c93:: with SMTP id x19mr8256889lji.260.1622576155250; Tue, 01 Jun 2021 12:35:55 -0700 (PDT) Received: from mail-lj1-f178.google.com (mail-lj1-f178.google.com. [209.85.208.178]) by smtp.gmail.com with ESMTPSA id o11sm1773238lfr.64.2021.06.01.12.35.54 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 01 Jun 2021 12:35:55 -0700 (PDT) Received: by mail-lj1-f178.google.com with SMTP id a4so20826866ljd.5 for ; Tue, 01 Jun 2021 12:35:54 -0700 (PDT) X-Received: by 2002:a2e:b0c8:: with SMTP id g8mr3795421ljl.453.1622576154518; Tue, 01 Jun 2021 12:35:54 -0700 (PDT) MIME-Version: 1.0 Reply-To: joel@rtems.org From: Joel Sherrill Date: Tue, 1 Jun 2021 14:35:43 -0500 X-Gmail-Original-Message-ID: Message-ID: Subject: Proper RTEMS value for _POSIX_VERSION and _POSIX2_VERSION To: Newlib X-Spam-Status: No, score=-3031.8 required=5.0 tests=BAYES_00, FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS, HTML_MESSAGE, KAM_DMARC_STATUS, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=no autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: newlib@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Newlib mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Jun 2021 19:35:58 -0000 Hi The RTEMS _POSIX_VERSION define is hard-coded to 199309L which reflects the POSIX version the initial RTEMS support was implemented to. Since then, RTEMS has picked up features from newer versions. https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/unistd.h.html RTEMS has never and is not fully conforming to the POSIX standard. Being a single process, there will always be capabilities missing. I don't think Cygwin is fully conforming either but has a series of conditional logic to set _POSIX_VERSION based on the value of __POSIX_VISIBLE https://sourceware.org/git/?p=newlib-cygwin.git;a=blob;f=newlib/libc/include/sys/features.h#l403 I am thinking RTEMS should use similar logic. Question: Does that sound more correct than the current hard-coded value? And since we don't have a POSIX shell, we still should not set _POSIX2_VERSION. RIght? Thanks for the advice.. --joel