DMARC-Filter: OpenDMARC Filter v1.4.2 delorie.com 59JGg7GI3269485 Authentication-Results: delorie.com; dmarc=pass (p=none dis=none) header.from=cygwin.com Authentication-Results: delorie.com; spf=pass smtp.mailfrom=cygwin.com DKIM-Filter: OpenDKIM Filter v2.11.0 delorie.com 59JGg7GI3269485 Authentication-Results: delorie.com; dkim=pass (1024-bit key, unprotected) header.d=cygwin.com header.i=@cygwin.com header.a=rsa-sha256 header.s=default header.b=rKlTvOXG X-Recipient: archive-cygwin AT delorie DOT com DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 00C553858C51 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com; s=default; t=1760892126; bh=MB6Va11ykAeFjcXXzLW2zHzqTQvWi505sa1IdDxFzw8=; h=Date:Subject:To:References:In-Reply-To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=rKlTvOXGApE3+Q1lQgOLXlRI4Fb2nYDM3Os0/0UOxl4Jq5NS5nAAzi8Ucy/WU6rpc bXEeUKYefk06+UWpmiudY1YDMYtaU5augSj9I1Habw6oTILy8do3WeS3j/9tJ5YfQF Eq6ASzt0W1x65w3x4UfnrFBxo8jB0/fs9DWYSt9A= X-Original-To: cygwin AT cygwin DOT com Delivered-To: cygwin AT cygwin DOT com DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 5BF8C3858D26 ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 5BF8C3858D26 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1760892102; cv=none; b=M7lII6I0YRF0FRY0E3FykE5HI0HHsbmLBc6ZivzgTBaLdJ/kY0pA86AkfvRDKPsXlATRbfUG4nVmx2Qyh/BUq+AT0Zigem5EXz6RW4+esfoDYkg85kSaj163eTXkHPIjF2e3nk6454Andb4KiiQ/Zojt5jDXnihlXPmyci0avss= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1760892102; c=relaxed/simple; bh=chaJqLkYbaVjx260+XLvJZ9wSl4Re3oXKnhKnlsaUNo=; h=Message-ID:Date:MIME-Version:From:Subject:To:DKIM-Signature; b=ZqgTQZnsVayav19O90pDANAkg9BCaVeq6ZlSpyWEtzoBclGGxFDpNQ277MU7yGLt+D2BW/ug9bMq0r3sfsV9vcOiv+bFPWlox2jTkI2OkvWo03Dc/iTQqIAdmsjcPK9uvX+hwYuXjH1EgBoKH+fu5/kPUgc+GBXF6b9vB6PsOrM= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 5BF8C3858D26 Message-ID: Date: Sun, 19 Oct 2025 10:41:39 -0600 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: the usage of "mkstemp" requires std=c... or std=gnu.. ? Content-Language: en-CA To: cygwin AT cygwin DOT com References: Organization: Systematic Software In-Reply-To: X-Rspamd-Server: rspamout04 X-Rspamd-Queue-Id: 7017717 X-Stat-Signature: 5drqxjrw8u6qkun9esugubta3tds6t8g X-Session-Marker: 427269616E2E496E676C69734053797374656D6174696353572E61622E6361 X-Session-ID: U2FsdGVkX18UJM9afR5d0hk0aVuCkj2nPVATlkoKoQw= X-HE-Tag: 1760892100-596072 X-HE-Meta: U2FsdGVkX19UtZigwZ08AtTU6YiClHU0rOjVrbZMoWtK/+GQBmSV8PbPMszD2Ohj9/1PfRB0X8Qr5ks5amD6IXz8725Mbe/mSqOYYIVs2bNYUjTOCYxYRutSXg0l7xdJ7X5KIiZne2qpnCc1p96/KHbkEI/x78RnrTs0xmSRWqPYmyKWw+MIuk1IMzBxE7dvhU+P/d2BlMdmgNk6BX79KRzKJWSKmSjU9JP4/FIXEwh6gntX9G3bDUU0vYvukbUaYwN8fTt1BB/9Je8ulhT6gIVivX9PqbaIWTWqfPzLKiRPRRDZFgmU1/n7xLZkS9A/6Ps1X0t7ROK19s2q/mXXScG8TH4m8PguWBvsqie3tUzdv0E3kJdCvwCtt8rRaTjc+hwboSPqr8vGFzJbROT9MLnK5UEyxv6NoirS7jD3VHw3ePoUJZCO5A== X-BeenThere: cygwin AT cygwin DOT com X-Mailman-Version: 2.1.30 Precedence: list List-Id: General Cygwin discussions and problem reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Brian Inglis via Cygwin Reply-To: cygwin AT cygwin DOT com Cc: Brian Inglis Content-Type: text/plain; charset="utf-8"; Format="flowed" Errors-To: cygwin-bounces~archive-cygwin=delorie DOT com AT cygwin DOT com Sender: "Cygwin" Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from base64 to 8bit by delorie.com id 59JGg7GI3269485 On 2025-10-18 13:50, Marco Atzeri via Cygwin wrote: > from > https://pubs.opengroup.org/onlinepubs/9799919799/functions/mkdtemp.html > Issue 7 >     Austin Group Interpretation 1003.1-2001 #143 is applied. >     SD5-XSH-ERN-168 is applied, clarifying file permissions upon creation. >     The mkstemp() function is moved from the XSI option to the Base. > I would expect --std=c++-20 should be enough, but > currently --std=gnu++-20 is required to build latest > version of libheif "Issue 8 Austin Group Defect 251 is applied, encouraging implementations to disallow the creation of filenames containing any bytes that have the encoded value of a character. Austin Group Defects 411, 1318, and 1350 are applied, adding mkostemp(). Austin Group Defect 652 is applied, adding the [EINVAL] error for mkstemp(). Austin Group Defect 1734 is applied, replacing the error conditions specified only for mkdtemp() with a reference to mkdir()." Those functions are not in Standard C or draft C 203Y (below); mkstemp is POSIX from 200112 and no longer in XSI; mkostemp/s requires || __POSIX_VISIBLE >= 202405 (from _POSIX_C_SOURCE >= 202405L) - in newlib, and also in glibc below; all require POSIX features enabled by some definition; from Linux 6.15 mkstemp(3): "Feature Test Macro Requirements for glibc (see feature_test_macros(7)): mkstemp(): _XOPEN_SOURCE >= 500 || /* glibc >= 2.12: */ _POSIX_C_SOURCE >= 200809L || /* glibc <= 2.19: */ _SVID_SOURCE || _BSD_SOURCE mkostemp(): _GNU_SOURCE" q $ grep -HwC1 'mk\(d\|os\|s\)temp' ~/src/standard-docs/C/N3220-C2023-FDIS.txt $ grep -HwC1 'mk\(d\|os\|s\)temp' ~/src/standard-docs/C/N3685-C203Y-WD.txt $ grep -HwC1 'mk\(d\|os\|s\)temp' /usr/include/stdlib.h /usr/include/stdlib.h-#if __BSD_VISIBLE || __POSIX_VISIBLE >= 200809 /usr/include/stdlib.h:char * mkdtemp (char *); /usr/include/stdlib.h-#endif /usr/include/stdlib.h-#if __GNU_VISIBLE /usr/include/stdlib.h:int mkostemp (char *, int); /usr/include/stdlib.h-int mkostemps (char *, int, int); -- /usr/include/stdlib.h-#if __MISC_VISIBLE || __POSIX_VISIBLE >= 200112 || __XSI_VISIBLE >= 4 /usr/include/stdlib.h:int mkstemp (char *); /usr/include/stdlib.h-#endif [I use C 203Y because there is almost no chance another C Standard will be released this decade; especially as current POSIX has not yet been adopted by ISO, as it has to be passed through the IEEE Partner Standards Development Org (PSDO) FDIS "fast-track" process with Edition 2 ballot close on 2026-01-24.] -- 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 à retrancher but when there is no more to cut -- Antoine de Saint-Exupéry -- Problem reports: https://cygwin.com/problems.html FAQ: https://cygwin.com/faq/ Documentation: https://cygwin.com/docs.html Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple