DMARC-Filter: OpenDMARC Filter v1.4.2 delorie.com 52ECoUN11334120 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 52ECoUN11334120 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=cclyCrJG X-Recipient: archive-cygwin AT delorie DOT com DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 7EFE53857BB3 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com; s=default; t=1741956629; bh=tFVdeb4AxGpfXNj1gzGyDW9f3XngkM3+Rh8Ma1DhL2w=; h=Subject:To:References:Date:In-Reply-To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=cclyCrJGYJ/R0obdeKChHTuumYRKKyVeRfnGyqGv49RDIFZp17U1WZe3Ab/TweRn1 55twPpQ3Cz3yfFMHLHWt/0pIakOpPNn9c0q1oT/f8hBySqPMJbgVeQYkoGEAdEbIxR +StnRHfdWGdqG7s6XIzDyxUVkXjDwMQT5V9jcjX0= X-Original-To: cygwin AT cygwin DOT com Delivered-To: cygwin AT cygwin DOT com DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org D85D83857B98 ARC-Filter: OpenARC Filter v1.0.0 sourceware.org D85D83857B98 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1741956568; cv=none; b=Go8OsT6nEwTmAsUFd8MYO+carAayoZozlg509P7nvwD7z202NpfzyFRaECae9WRoOCRcYdvFI6LfzWnHFjsPzVWMzB43h4+1YBzUj7v527ixllfjDqzTSxL55fVnJL/s/7SyHM0I+HhEB4ol41m+iGjJOH+VIV4J/N8PRimRUUQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1741956568; c=relaxed/simple; bh=9ACmz3PPBYvA9FollHlbjNRS69StlcBaj9B+H/ZS+Xo=; h=Subject:To:From:Message-ID:Date:MIME-Version; b=a3U1cFs6Y7tFSmWuMk/7Mg6Rts/TiLQtgd/+RBm8B7giRM7rgBJGPtsIqgfcX8ALFp1gzz3Fk55aLVwU2bZQigvK1XqcBFnpd9XZ2UAkbwiogkgalRSdRlFEpmeJW8QkvCavLQea0ALEk7dA0hHoys86zWKZVbzzOHXMrfdtZx0= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D85D83857B98 Subject: Re: cygwin-devel vs libbsd-devel: arc4random_stir() macro in stdlib.h breaks bsd/stdlib.h To: cygwin AT cygwin DOT com References: <8a442ec3-23e8-c09c-f9be-5a9fe7e6d801 AT t-online DOT de> Message-ID: Date: Fri, 14 Mar 2025 13:48:08 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:128.0) Gecko/20100101 SeaMonkey/2.53.20 MIME-Version: 1.0 In-Reply-To: X-TOI-EXPURGATEID: 150726::1741956488-ECFF740E-55A67288/0/0 CLEAN NORMAL X-TOI-MSGID: b7e627ca-8d5b-4b9e-81d1-07198350c9cf 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: Christian Franke via Cygwin Reply-To: cygwin AT cygwin DOT com Cc: Christian Franke 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 52ECoUN11334120 Corinna Vinschen via Cygwin wrote: > On Mar 13 08:59, Christian Franke via Cygwin wrote: >> Problem introduced in a8891c93: >> >> $ cygcheck -f /usr/include/stdlib.h >> cygwin-devel-3.6.0-0.430.ga942476236b5 >> >> $ cygcheck -f /usr/include/bsd/stdlib.h >> libbsd-devel-0.12.2-2 >> >> $ gcc -c -xc - <<<'#include ' >> In file included from :1: >> /usr/include/bsd/stdlib.h:62:26: error: macro "arc4random_stir" passed 1 >> arguments, but takes just 0 >>    62 | void arc4random_stir(void); >>       |                          ^ >> In file included from /usr/include/stdlib.h:26, >>                  from /usr/include/bsd/stdlib.h:32: >> /usr/include/cygwin/stdlib.h:26: note: macro "arc4random_stir" defined here >>    26 | #define arc4random_stir() > Should work again with cygwin-3.6.0-0.431.gad29c33229e5 > This fixes the problem, thanks. There are possibly still inconsistencies: $ gcc -E -xc - <<<'#include ' | grep arc4random_stir void arc4random_stir(void); $ gcc -E -xc - <<<'#include ' | grep arc4random_stir void arc4random_stir(void); // from cygwin/stdlib.h void arc4random_stir(void); // from bsd/stdlib.h $ gcc -E -xc - <<<'#include ' | grep arc4random_addrandom $ gcc -E -xc - <<<'#include ' | grep arc4random_addrandom void arc4random_addrandom(unsigned char *dat, int datlen); $ gcc -E -xc - <<<'#include ' | grep arc4random_buf void arc4random_buf (void *, size_t); // from stdlib.h void arc4random_buf(void *_buf, size_t n); // from bsd/stdlib.h $ nm /usr/lib/libcygwin.a | grep ' arc4random' 0000000000000000 T arc4random 0000000000000000 T arc4random_addrandom 0000000000000000 T arc4random_buf 0000000000000000 T arc4random_stir 0000000000000000 T arc4random_uniform $ nm /usr/lib/libbsd.dll.a | grep ' arc4random' || echo not found not found I guess: - arc4random_addrandom() should be removed from libcygwin.a or added to cygwin/stdlib.h. - all arc4random*() should be hidden for __CYGWIN__ in bsd/stdlib.h. -- Regards, Christian -- 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