From owner-p4-projects@FreeBSD.ORG Sat Jun 30 22:27:36 2007 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id A9CA416A469; Sat, 30 Jun 2007 22:27:36 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 6CA0E16A468 for ; Sat, 30 Jun 2007 22:27:36 +0000 (UTC) (envelope-from peter@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [69.147.83.41]) by mx1.freebsd.org (Postfix) with ESMTP id 5D4DA13C4BE for ; Sat, 30 Jun 2007 22:27:36 +0000 (UTC) (envelope-from peter@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.8/8.13.8) with ESMTP id l5UMRaN7002323 for ; Sat, 30 Jun 2007 22:27:36 GMT (envelope-from peter@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.8/8.13.8/Submit) id l5UMRZHZ002320 for perforce@freebsd.org; Sat, 30 Jun 2007 22:27:35 GMT (envelope-from peter@freebsd.org) Date: Sat, 30 Jun 2007 22:27:35 GMT Message-Id: <200706302227.l5UMRZHZ002320@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to peter@freebsd.org using -f From: Peter Wemm To: Perforce Change Reviews Cc: Subject: PERFORCE change 122593 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Jun 2007 22:27:37 -0000 http://perforce.freebsd.org/chv.cgi?CH=122593 Change 122593 by peter@peter_overcee on 2007/06/30 22:27:01 I may remove this later depending on whether it turns out safe to use getosreldate() or not. A caching lookup of kern.osreldate that ignores $OSVERSION. Affected files ... .. //depot/projects/hammer/lib/libc/gen/Makefile.inc#28 edit .. //depot/projects/hammer/lib/libc/gen/__getosreldate.c#1 add .. //depot/projects/hammer/lib/libc/include/libc_private.h#10 edit Differences ... ==== //depot/projects/hammer/lib/libc/gen/Makefile.inc#28 (text+ko) ==== @@ -4,7 +4,8 @@ # machine-independent gen sources .PATH: ${.CURDIR}/${MACHINE_ARCH}/gen ${.CURDIR}/gen -SRCS+= __xuname.c _pthread_stubs.c _rand48.c _spinlock_stub.c _thread_init.c \ +SRCS+= __getosreldate.c __xuname.c \ + _pthread_stubs.c _rand48.c _spinlock_stub.c _thread_init.c \ alarm.c arc4random.c assert.c basename.c check_utility_compat.c \ clock.c closedir.c confstr.c \ crypt.c ctermid.c daemon.c devname.c dirname.c disklabel.c \ ==== //depot/projects/hammer/lib/libc/include/libc_private.h#10 (text+ko) ==== @@ -169,4 +169,10 @@ */ extern void (*__cleanup)(void); +/* + * Get kern.osreldate to detect ABI revisions. Explicitly + * ignores value of $OSVERSION and caches result. + */ +extern int __getosreldate(void); + #endif /* _LIBC_PRIVATE_H_ */