From owner-svn-src-head@FreeBSD.ORG Wed Jun 5 09:46:57 2013 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 8F6CA830; Wed, 5 Jun 2013 09:46:57 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail107.syd.optusnet.com.au (mail107.syd.optusnet.com.au [211.29.132.53]) by mx1.freebsd.org (Postfix) with ESMTP id 994851E7D; Wed, 5 Jun 2013 09:46:56 +0000 (UTC) Received: from c122-106-156-23.carlnfd1.nsw.optusnet.com.au (c122-106-156-23.carlnfd1.nsw.optusnet.com.au [122.106.156.23]) by mail107.syd.optusnet.com.au (Postfix) with ESMTPS id 42865D40EE2; Wed, 5 Jun 2013 19:46:48 +1000 (EST) Date: Wed, 5 Jun 2013 19:46:47 +1000 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Chris Rees Subject: Re: svn commit: r251404 - in head/lib/msun: . src In-Reply-To: Message-ID: <20130605190925.X1394@besplex.bde.org> References: <201306050533.r555X2dQ047208@svn.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.0 cv=e/de0tV/ c=1 sm=1 a=R6bvxTt4exwA:10 a=kj9zAlcOel0A:10 a=PO7r1zJSAAAA:8 a=JzwRw_2MAAAA:8 a=rZKycl_GVckA:10 a=6I5d2MoRAAAA:8 a=gPIDfWKbdn5japZPCskA:9 a=CjuIK1q_8ugA:10 a=SV7veod9ZcQA:10 a=bGgsVW87oxRvdTD6:21 a=LmhdNDzX00al9zQ-:21 a=ebeQFi2P/qHVC0Yw9JDJ4g==:117 Cc: svn-src-head@FreeBSD.org, David Schultz , src-committers@FreeBSD.org, svn-src-all@FreeBSD.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Jun 2013 09:46:57 -0000 On Wed, 5 Jun 2013, Chris Rees wrote: > On 5 Jun 2013 06:33, "David Schultz" wrote: >> ... >> Log: >> Style fixes. >> >> Submitted by: bde >> ... > ============================================================================== >> --- head/lib/msun/Makefile Wed Jun 5 01:22:59 2013 (r251403) >> +++ head/lib/msun/Makefile Wed Jun 5 05:33:01 2013 (r251404) >> @@ -21,6 +21,10 @@ ARCH_SUBDIR= ${MACHINE_CPUARCH} >> .include "${ARCH_SUBDIR}/Makefile.inc" >> >> .PATH: ${.CURDIR}/${ARCH_SUBDIR} >> +.if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64" >> +.PATH: ${.CURDIR}/x86 >> +CFLAGS+= -I${.CURDIR}/x86 >> +.endif > > Since you're doing style fixes, it is worth noting that quoting strings in > Makefiles is nearly always incorrect, and only works in our make because of > an extension. Ugh. make's tutorial even says that strings are required in both of the above contexts (for .include "file" and for strings in comparison operations). From /usr/share/doc/psd/12.make: @ added ability to use variables in the filenames. An include @ directive in a makefile looks either like this: @ @ #include @ @ or this @ @ #include "file" @ @ The difference between the two is where PMake searches for @ the file: the first way, PMake will look for the file only @ ... @ The arithmetic and string operators may only be used to test @ the value of a variable. The lefthand side must contain the @ variable expansion, while the righthand side contains either @ a string, enclosed in double-quotes, or a number. The stan- @ dard C numeric conventions (except for specifying an octal @ number) apply to both sides. E.g. @ @ #if $(OS) == 4.3 @ @ #if $(MACHINE) == "sun3" @ @ #if $(LOAD_ADDR) < 0xc000 @ @ are all valid conditionals. In addition, the numeric value @ of a variable can be tested as a boolean as follows: The tutorial doesn't seem to have been updated for the new make (or the old make). bmake duplicates the ~20-year old source file except for about 20 lines of trivial changes, but doesn't seem to build or install its version. I tried building a target named "foo bar". It failed completely. >> # long double format >> .if ${LDBL_PREC} == 64 >> @@ -35,10 +39,6 @@ CFLAGS+= -I${.CURDIR}/ld128 >> .PATH: ${.CURDIR}/src >> .PATH: ${.CURDIR}/man >> >> -.if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64" >> -.PATH: ${.CURDIR}/x86 >> -.endif >> - >> LIB= m >> SHLIBDIR?= /lib >> SHLIB_MAJOR= 5 It is also worth noting that this part is not (primarily) a style fix. It is to add a -I path to unbreak the use of the uninstalled fenv.h. There are still many old and new style bugs in the choice of vs "fenv.h" in include directives. >> [800+ quoted lines deleted] Please don't quote the whole thing. > ============================================================================== >> --- head/lib/msun/src/e_log2.c Wed Jun 5 01:22:59 2013 (r251403) >> +++ head/lib/msun/src/e_log2.c Wed Jun 5 05:33:01 2013 (r251404) >> @@ -24,6 +24,8 @@ __FBSDID("$FreeBSD$"); >> * in not-quite-routine extra precision. >> */ >> >> +#include >> + >> #include "math.h" >> #include "math_private.h" >> #include "k_log.h" Since you quoted so much, it is worth noting that this isn't a style fix. It fixes (implements) log2l() on arches where long double is the same as double. Bruce