From owner-freebsd-current Tue Jun 25 9:33:45 2002 Delivered-To: freebsd-current@freebsd.org Received: from mailman.zeta.org.au (mailman.zeta.org.au [203.26.10.16]) by hub.freebsd.org (Postfix) with ESMTP id 8E88137B400; Tue, 25 Jun 2002 09:33:40 -0700 (PDT) Received: from bde.zeta.org.au (bde.zeta.org.au [203.2.228.102]) by mailman.zeta.org.au (8.9.3/8.8.7) with ESMTP id CAA21593; Wed, 26 Jun 2002 02:33:35 +1000 Date: Wed, 26 Jun 2002 02:38:56 +1000 (EST) From: Bruce Evans X-X-Sender: bde@gamplex.bde.org To: Alexander Kabaev Cc: freebsd-current@freebsd.org, Subject: Re: sys/stat.h and _POSIX_SOURCE In-Reply-To: <20020625113221.609f5b73.ak03@gte.com> Message-ID: <20020626021810.V27555-100000@gamplex.bde.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Tue, 25 Jun 2002, Alexander Kabaev wrote: > The last commit to sys/sys/stat.h made by Kirk broke compilation of > _POSIX_SOURCE programs. It uses sizeof(struct timespec) to pad the > st_createtimespec field to 16 bytes, but struct timespec is not visible > when _POSIX_SOURCE is defined. Oops. The patch was supposed to fix _POSIX_SOURCE problems as well as the things mentioned in the log message, but added this new one. The correct fix probably involves using in the _POSIX_SOURCE case and in the !_POSIX_SOURCE case. I already use the latter (instead of ) locally. I had hoped to completely avoid using the former because it's better to have actual struct members named st_[acm]time than #defines of these names as __st_[acm]timespec.__tv_sec. The latter is bad for debugging and might not be standards conformant. Bruce To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message