From owner-freebsd-standards@FreeBSD.ORG Sun Apr 6 15:43:30 2003 Return-Path: Delivered-To: freebsd-standards@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8B9A237B401; Sun, 6 Apr 2003 15:43:30 -0700 (PDT) Received: from h00609772adf0.ne.client2.attbi.com (h00609772adf0.ne.client2.attbi.com [24.61.43.152]) by mx1.FreeBSD.org (Postfix) with ESMTP id A779843F85; Sun, 6 Apr 2003 15:43:29 -0700 (PDT) (envelope-from rodrigc@attbi.com) Received: from h00609772adf0.ne.client2.attbi.com (localhost.ne.attbi.com [127.0.0.1])h36MhScJ028038; Sun, 6 Apr 2003 18:43:28 -0400 (EDT) (envelope-from rodrigc@h00609772adf0.ne.client2.attbi.com) Received: (from rodrigc@localhost)h36MhRSC028037; Sun, 6 Apr 2003 18:43:27 -0400 (EDT) Date: Sun, 6 Apr 2003 18:43:27 -0400 From: Craig Rodrigues To: freebsd-standards@freebsd.org Message-ID: <20030406224327.GA27960@attbi.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4i cc: freebsd-current@freebsd.org Subject: [PATCH] Adding WCHAR_MIN to X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 Apr 2003 22:43:30 -0000 Hi, Can someone provide feedback regarding the following patches? "Deprecate , add " http://www.freebsd.org/cgi/query-pr.cgi?pr=50523 "Define WCHAR_MIN and WCHAR_MAX in " http://www.freebsd.org/cgi/query-pr.cgi?pr=50582 I submitted these patches based on some previous discussions about : http://docs.freebsd.org/cgi/getmsg.cgi?fetch=77248+0+archive/2003/freebsd-standards/20030223.freebsd-standards -- Craig Rodrigues http://home.attbi.com/~rodrigc rodrigc@attbi.com From owner-freebsd-standards@FreeBSD.ORG Mon Apr 7 02:27:33 2003 Return-Path: Delivered-To: freebsd-standards@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6401A37B401 for ; Mon, 7 Apr 2003 02:27:33 -0700 (PDT) Received: from cs.huji.ac.il (cs.huji.ac.il [132.65.16.30]) by mx1.FreeBSD.org (Postfix) with ESMTP id A440B43F3F for ; Mon, 7 Apr 2003 02:27:31 -0700 (PDT) (envelope-from alsbergt@cs.huji.ac.il) Received: from lurch.cs.huji.ac.il ([132.65.80.139] ident=exim) by cs.huji.ac.il with esmtp id 192SuX-000FGc-00 for freebsd-standards@freebsd.org; Mon, 07 Apr 2003 12:27:29 +0300 Received: from alsbergt by lurch.cs.huji.ac.il with local (Exim 4.12) id 192SuX-0002aC-00 for freebsd-standards@freebsd.org; Mon, 07 Apr 2003 12:27:29 +0300 Date: Mon, 7 Apr 2003 12:27:29 +0300 From: Tom Alsberg To: FreeBSD Stable List Message-ID: <20030407092729.GA9910@cs.huji.ac.il> Mail-Followup-To: Tom Alsberg , FreeBSD Stable List Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Face: "5"j@Y1Peoz1; ftTv>\|['ox-csmV+:_RDNdi/2lSe2x?0:HVAeVW~ajwQ7RfDlcb^18eJ; t,O,s5-aNdU/DJ2E8h1s,..4}N9$27u`pWmH|; s!zlqqVwr9R^_ji=1\3}Z6gQBYyQ]{gd5-V8s^fYf{$V2*_&S>eA|SH@Y\hOVUjd[5eah{EO@gCr.ydSpJHJIU[QsH~bC?$C@O:SzF=CaUxp80-iknM(]q(W List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Apr 2003 09:27:33 -0000 Hi there. I am unable to build the java/jdk14 port. I downloaded the patches and source distribution, and get some weird HotSpot error. I am not sure what the problem could be. Following is the relevant output of make on the port. Any ideas? -- Tom # Start of jdk build bsd i586 1.4.1-p3 build started: 03-04-07 12:16 Syntax error: "(" unexpected gmake[1]: Entering directory `/v0/pobj/r+d/ports/java/jdk14/work/j2se/make' [: -ne: unexpected operator gmake[1]: Leaving directory `/v0/pobj/r+d/ports/java/jdk14/work/j2se/make' if [ -r ./../../patch/make/Makefile ]; then \ ( cd ./../../patch/make; gmake sanity MAKEFLAGS= EXTERNALSANITYCONTROL=true CONTROL_TOPDIR=/v0/pobj/r+d/ports/java/jdk14/work/control CONTROL_TOPDIR_NAME=control ALT_J2SE_TOPDIR=./../../j2se ALT_OUTPUTDIR=/v0/pobj/r+d/ports/java/jdk14/work/control/build/bsd-i586 ALT_RTPATCH_DIR= ALT_BASE_IMAGE_ZIP= ALT_BASE_IMAGE_DIR= ALT_NEW_IMAGE_DIR= ; ); \ fi Build Machine Information: build machine = Build Directory Structure: CWD = /v0/pobj/r+d/ports/java/jdk14/work/control/make TOPDIR = ./../.. CONTROL_TOPDIR = ./../../control GENERICS_TOPDIR = ./../../generics HOTSPOT_TOPDIR = ./../../hotspot J2SE_TOPDIR = ./../../j2se MOTIF_TOPDIR = ./../../motif COBUNDLE_TOPDIR = ./../../cobundle Hotspot Settings: HOTSPOT_BUILD_JOBS = Bootstrap Settings: BOOTDIR = /usr/local/linux-sun-jdk1.4.1 BOOTSTRAP J2SDK VERSION: Abort trap (core dumped) OUTPUTDIR = /v0/pobj/r+d/ports/java/jdk14/work/control/build/bsd-i586 Build Tool Settings: UNIXCOMMAND_PATH = /bin/ COMPILER_PATH = /usr/bin/ DEVTOOLS_PATH = /usr/local/bin/ USRBIN_PATH = /usr/bin/ MOTIF_DIR = /usr/local/X11R6 CC_VER = 2.95.4 PATH = /usr/local/pgsql/bin:/cs/system/alsbergt/bin/freebsd:/cs/system/alsbergt/exec-prefix/i386/freebsd/generic/bin:/cs/system/alsbergt/exec-prefix/i386/freebsd/generic/sbin:/cs/system/alsbergt/prefix/bin:/cs/system/alsbergt/prefix/sbin:/cs/system/alsbergt/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/etc:/usr/X11R6/bin:/usr/local/X11R6/bin:/usr/local/pgsql/bin:/usr/local/mosml/bin:/usr/games:/usr/local/mathematica/bin:/SBIN:/cs/system/guest/qmh/bin:/cs/system/register/bin Build Directives: USE_ONLY_BOOTDIR_TOOLS = USE_HOTSPOT_INTERPRETER_MODE = PEDANTIC = DEV_ONLY = J2RE_ONLY = NO_DOCS = YES NO_IMAGES = TOOLS_ONLY = true INSANE = Build Platform Settings: PLATFORM = bsd ARCH = i586 LIBARCH = i386 ARCH_FAMILY = i586 ARCH_DATA_MODEL = 32 OS_VERSION = 4.8-RC TRUE_PLATFORM = FreeBSD (4.x STABLE way) FREE_SPACE = 3894824 GNU Make Settings: MAKE = gmake MAKE VERSION = MAKECMDGOALS = sanity MAKEFLAGS = SHELL = /bin/sh Target Build Versions: JDK_VERSION = 1.4.1 MILESTONE = p3 BUILD_NUMBER = alsbergt_07_apr_2003_12_16 BUNDLE_DATE = 07_apr_2003 External File/Binary Locations: HOTSPOT_SERVER_PATH = /v0/pobj/r+d/ports/java/jdk14/work/control/build/bsd-i586/hotspot-i586/server HOTSPOT_CLIENT_PATH = /v0/pobj/r+d/ports/java/jdk14/work/control/build/bsd-i586/hotspot-i586/client OPT_JAVAWS = /java/re/javaws/1.2/promoted/pit_tested/bundles/javaws-1_2-bsd-i586-i.zip MOZILLA_PATH = /java/devtools MOZILLA_HEADERS_PATH = /java/devtools/share/plugin MOZILLA_LIBS_PATH = /java/devtools/bsd/plugin MOTIF_DIR = /usr/local/X11R6 CACERTS_FILE = ./../src/share/lib/security/cacerts WARNING: Your build environment has the variable NO_DOCS defined. This will result in a development-only build of the J2SE workspace, lacking the documentation build. WARNING: You do not have access to the Java Web Start binary. These binaries may be optional for this build. Please check your access to /java/re/javaws/1.2/promoted/pit_tested/bundles/javaws-1_2-bsd-i586-i.zip and/or check your value of ALT_JAVAWS_PATH. This will make your images target build incomplete. Sanity check passed. /bin/mkdir -p ../build/bsd-i586/hotspot-i586/tmp (cd ./../build/bsd-i586/hotspot-i586/tmp; \ gmake -f /v0/pobj/r+d/ports/java/jdk14/work/hotspot/build/bsd/Makefile product \ HOTSPOT_BUILD_VERSION=1.4.1-p3-alsbergt_07_apr_2003_12_16 GAMMADIR=/v0/pobj/r+d/ports/java/jdk14/work/hotspot ; ) gmake[1]: Entering directory `/v0/pobj/r+d/ports/java/jdk14/work/control/build/bsd-i586/hotspot-i586/tmp' sh /v0/pobj/r+d/ports/java/jdk14/work/hotspot/build/bsd/makefiles/buildATree.sh compiler2 /v0/pobj/r+d/ports/java/jdk14/work/hotspot bsd i486 (cd bsd_i486_compiler2/product; gmake) gmake[2]: Entering directory `/v0/pobj/r+d/ports/java/jdk14/work/control/build/bsd-i586/hotspot-i586/tmp/bsd_i486_compiler2/product' # # HotSpot Virtual Machine Error, Internal Error # Please report this error at # http://java.sun.com/cgi-bin/bugreport.cgi # # Java VM: Java HotSpot(TM) Client VM (1.4.1_02-b06 mixed mode) # # Error ID: 4F533F4C494E55580E43505002D7 # gmake[2]: *** [../generated/MakeDeps.class] Abort trap (core dumped) gmake[2]: Leaving directory `/v0/pobj/r+d/ports/java/jdk14/work/control/build/bsd-i586/hotspot-i586/tmp/bsd_i486_compiler2/product' gmake[1]: *** [product] Error 2 gmake[1]: Leaving directory `/v0/pobj/r+d/ports/java/jdk14/work/control/build/bsd-i586/hotspot-i586/tmp' gmake: *** [product] Error 2 *** Error code 2 -- Tom Alsberg - hacker (being the best description fitting this space) Web page: http://www.cs.huji.ac.il/~alsbergt/ DISCLAIMER: The above message does not even necessarily represent what my fingers have typed on the keyboard, save anything further. From owner-freebsd-standards@FreeBSD.ORG Tue Apr 8 01:51:15 2003 Return-Path: Delivered-To: freebsd-standards@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E0F0B37B401 for ; Tue, 8 Apr 2003 01:51:15 -0700 (PDT) Received: from snark.ratmir.ru (snark.ratmir.ru [213.24.248.177]) by mx1.FreeBSD.org (Postfix) with ESMTP id CAE9943F75 for ; Tue, 8 Apr 2003 01:51:14 -0700 (PDT) (envelope-from freebsd@snark.ratmir.ru) Received: from snark.ratmir.ru (freebsd@localhost [127.0.0.1]) by snark.ratmir.ru (8.12.9/8.12.9) with ESMTP id h388pDDR024195 for ; Tue, 8 Apr 2003 12:51:13 +0400 (MSD) (envelope-from freebsd@snark.ratmir.ru) Received: (from freebsd@localhost) by snark.ratmir.ru (8.12.9/8.12.9/Submit) id h388pDNR024194 for freebsd-standards@freebsd.org; Tue, 8 Apr 2003 12:51:13 +0400 (MSD) Date: Tue, 8 Apr 2003 12:51:12 +0400 From: Alex Semenyaka To: freebsd-standards@freebsd.org Message-ID: <20030408085112.GA22222@snark.ratmir.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.4i Subject: /bin/sh arithmetics: BIG NUMBERS X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Apr 2003 08:51:16 -0000 Collegues, I need your opinion. Several days ago I've send to -hackers mailing list a patch for /bin/sh which introduce 64-bit arithmetic operations instead of 32-bit ones we have now. There were now principal objections there but Giorgos Keramidas adviced me to ask here about the FreeBSD's standards compliance of this. I hope that it IS ok withem but I want to be absolutely sure. Argumentation "pro": 1) POSIX and SUSv3 _require_ at least long type for integers in the shell, and explicitly _allow_ to use integer in the range beyond the long type range. SUSv2 _requires_ long and _allows_ extensions as well (but there are no explicit words about wider range as in SUSv3). It is the theoretical aspect. 2) ksh, zsh and bash handle longer integers properly. The last two have 64-bit arithmetics and first one has float inside. That is the compatibility aspect. 3) These days we have a lot of 64-bit stuff in the system: from ipfw counters to file sizes. Moreover we really have such big numbers in everyday FreeBSD usage. But now /bin/sh silently produce just wrong results dealing with such numbers due to overflow. So old scripts which worked from 1997 or such now can produce meaningless results and it will not be even noticed. I can suggest to write new ones with bash or zsh but some people continue to use their old stuff (don't touch while works, you know). So it IS better to change our basic shell and extend it's abilities. That is the practical aspect. Any "contras"? SY, Alex From owner-freebsd-standards@FreeBSD.ORG Tue Apr 8 03:30:36 2003 Return-Path: Delivered-To: freebsd-standards@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 56D7037B401; Tue, 8 Apr 2003 03:30:36 -0700 (PDT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id EB04943FCB; Tue, 8 Apr 2003 03:30:35 -0700 (PDT) (envelope-from tjr@FreeBSD.org) Received: from freefall.freebsd.org (tjr@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.9/8.12.9) with ESMTP id h38AUZUp017324; Tue, 8 Apr 2003 03:30:35 -0700 (PDT) (envelope-from tjr@freefall.freebsd.org) Received: (from tjr@localhost) by freefall.freebsd.org (8.12.9/8.12.9/Submit) id h38AUYZx017257; Tue, 8 Apr 2003 03:30:34 -0700 (PDT) Date: Tue, 8 Apr 2003 03:30:34 -0700 (PDT) From: "Tim J. Robbins" Message-Id: <200304081030.h38AUYZx017257@freefall.freebsd.org> To: tim@robbins.dropbear.id.au, tjr@FreeBSD.org, freebsd-standards@FreeBSD.org Subject: Re: standards/46791: freopen() does not handle filename == NULL correctly X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Apr 2003 10:30:36 -0000 Synopsis: freopen() does not handle filename == NULL correctly State-Changed-From-To: patched->closed State-Changed-By: tjr State-Changed-When: Tue Apr 8 03:29:48 PDT 2003 State-Changed-Why: I am not going to MFC this. http://www.freebsd.org/cgi/query-pr.cgi?pr=46791 From owner-freebsd-standards@FreeBSD.ORG Tue Apr 8 15:05:54 2003 Return-Path: Delivered-To: freebsd-standards@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0261237B401 for ; Tue, 8 Apr 2003 15:05:54 -0700 (PDT) Received: from espresso.bsdmike.org (espresso.bsdmike.org [65.39.129.122]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5F2B143FCB for ; Tue, 8 Apr 2003 15:05:53 -0700 (PDT) (envelope-from mike@espresso.bsdmike.org) Received: by espresso.bsdmike.org (Postfix, from userid 1002) id 56C8D9C68; Tue, 8 Apr 2003 17:51:43 -0400 (EDT) Date: Tue, 8 Apr 2003 17:51:43 -0400 From: Mike Barcroft To: Alex Semenyaka Message-ID: <20030408175143.C14397@espresso.bsdmike.org> References: <20030408085112.GA22222@snark.ratmir.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20030408085112.GA22222@snark.ratmir.ru>; from alexs@ratmir.ru on Tue, Apr 08, 2003 at 12:51:12PM +0400 Organization: The FreeBSD Project cc: freebsd-standards@freebsd.org Subject: Re: /bin/sh arithmetics: BIG NUMBERS X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Apr 2003 22:05:54 -0000 Alex Semenyaka writes: > Collegues, > > I need your opinion. Several days ago I've send to -hackers mailing list a > patch for /bin/sh which introduce 64-bit arithmetic operations instead of > 32-bit ones we have now. There were now principal objections there but > Giorgos Keramidas adviced me to ask here about the > FreeBSD's standards compliance of this. I hope that it IS ok withem but > I want to be absolutely sure. > > Argumentation "pro": > > 1) POSIX and SUSv3 _require_ at least long type for integers in the shell, and > explicitly _allow_ to use integer in the range beyond the long type range. > SUSv2 _requires_ long and _allows_ extensions as well (but there are no > explicit words about wider range as in SUSv3). It is the theoretical aspect. > 2) ksh, zsh and bash handle longer integers properly. The last two have > 64-bit arithmetics and first one has float inside. That is the compatibility > aspect. > 3) These days we have a lot of 64-bit stuff in the system: from ipfw counters > to file sizes. Moreover we really have such big numbers in everyday FreeBSD > usage. But now /bin/sh silently produce just wrong results dealing with > such numbers due to overflow. So old scripts which worked from 1997 or such > now can produce meaningless results and it will not be even noticed. > I can suggest to write new ones with bash or zsh but some people continue > to use their old stuff (don't touch while works, you know). So it IS better > to change our basic shell and extend it's abilities. That is the practical > aspect. Sounds like its standards conformant. > Any "contras"? I would suspect there's a performance penalty on i386. Have you done any benchmarking? Best regards, Mike Barcroft From owner-freebsd-standards@FreeBSD.ORG Wed Apr 9 00:21:16 2003 Return-Path: Delivered-To: freebsd-standards@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4E12C37B401 for ; Wed, 9 Apr 2003 00:21:16 -0700 (PDT) Received: from cs.huji.ac.il (cs.huji.ac.il [132.65.16.30]) by mx1.FreeBSD.org (Postfix) with ESMTP id E176E43F3F for ; Wed, 9 Apr 2003 00:21:13 -0700 (PDT) (envelope-from alsbergt@cs.huji.ac.il) Received: from lurch.cs.huji.ac.il ([132.65.80.139] ident=exim) by cs.huji.ac.il with esmtp id 1939tQ-0003IS-00 for freebsd-standards@freebsd.org; Wed, 09 Apr 2003 10:21:12 +0300 Received: from alsbergt by lurch.cs.huji.ac.il with local (Exim 4.12) id 1939tQ-0005Ka-00 for freebsd-standards@freebsd.org; Wed, 09 Apr 2003 10:21:12 +0300 Date: Wed, 9 Apr 2003 10:21:12 +0300 From: Tom Alsberg To: FreeBSD Stable List Message-ID: <20030409072112.GA20418@cs.huji.ac.il> Mail-Followup-To: Tom Alsberg , FreeBSD Stable List References: <20030407092729.GA9910@cs.huji.ac.il> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20030407092729.GA9910@cs.huji.ac.il> X-Face: "5"j@Y1Peoz1; ftTv>\|['ox-csmV+:_RDNdi/2lSe2x?0:HVAeVW~ajwQ7RfDlcb^18eJ; t,O,s5-aNdU/DJ2E8h1s,..4}N9$27u`pWmH|; s!zlqqVwr9R^_ji=1\3}Z6gQBYyQ]{gd5-V8s^fYf{$V2*_&S>eA|SH@Y\hOVUjd[5eah{EO@gCr.ydSpJHJIU[QsH~bC?$C@O:SzF=CaUxp80-iknM(]q(W List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Apr 2003 07:21:16 -0000 Sorry for posting this here. Something wrecked in my mail aliases. -- Tom On Mon, Apr 07, 2003 at 12:27:29PM +0300, Tom Alsberg wrote: > Hi there. > I am unable to build the java/jdk14 port. I downloaded the patches > and source distribution, and get some weird HotSpot error. > I am not sure what the problem could be. Following is the relevant > output of make on the port. > > Any ideas? > -- Tom > > # Start of jdk build > bsd i586 1.4.1-p3 build started: 03-04-07 12:16 > Syntax error: "(" unexpected > gmake[1]: Entering directory `/v0/pobj/r+d/ports/java/jdk14/work/j2se/make' > [: -ne: unexpected operator > gmake[1]: Leaving directory `/v0/pobj/r+d/ports/java/jdk14/work/j2se/make' > if [ -r ./../../patch/make/Makefile ]; then \ > ( cd ./../../patch/make; gmake sanity MAKEFLAGS= EXTERNALSANITYCONTROL=true CONTROL_TOPDIR=/v0/pobj/r+d/ports/java/jdk14/work/control CONTROL_TOPDIR_NAME=control ALT_J2SE_TOPDIR=./../../j2se ALT_OUTPUTDIR=/v0/pobj/r+d/ports/java/jdk14/work/control/build/bsd-i586 ALT_RTPATCH_DIR= ALT_BASE_IMAGE_ZIP= ALT_BASE_IMAGE_DIR= ALT_NEW_IMAGE_DIR= ; ); \ > fi > > Build Machine Information: > build machine = > > Build Directory Structure: > CWD = /v0/pobj/r+d/ports/java/jdk14/work/control/make > TOPDIR = ./../.. > CONTROL_TOPDIR = ./../../control > GENERICS_TOPDIR = ./../../generics > HOTSPOT_TOPDIR = ./../../hotspot > J2SE_TOPDIR = ./../../j2se > MOTIF_TOPDIR = ./../../motif > COBUNDLE_TOPDIR = ./../../cobundle > > Hotspot Settings: > HOTSPOT_BUILD_JOBS = > > Bootstrap Settings: > BOOTDIR = /usr/local/linux-sun-jdk1.4.1 > BOOTSTRAP J2SDK VERSION: Abort trap (core dumped) > OUTPUTDIR = /v0/pobj/r+d/ports/java/jdk14/work/control/build/bsd-i586 > > Build Tool Settings: > UNIXCOMMAND_PATH = /bin/ > COMPILER_PATH = /usr/bin/ > DEVTOOLS_PATH = /usr/local/bin/ > USRBIN_PATH = /usr/bin/ > MOTIF_DIR = /usr/local/X11R6 > CC_VER = 2.95.4 > PATH = /usr/local/pgsql/bin:/cs/system/alsbergt/bin/freebsd:/cs/system/alsbergt/exec-prefix/i386/freebsd/generic/bin:/cs/system/alsbergt/exec-prefix/i386/freebsd/generic/sbin:/cs/system/alsbergt/prefix/bin:/cs/system/alsbergt/prefix/sbin:/cs/system/alsbergt/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/etc:/usr/X11R6/bin:/usr/local/X11R6/bin:/usr/local/pgsql/bin:/usr/local/mosml/bin:/usr/games:/usr/local/mathematica/bin:/SBIN:/cs/system/guest/qmh/bin:/cs/system/register/bin > > Build Directives: > USE_ONLY_BOOTDIR_TOOLS = > USE_HOTSPOT_INTERPRETER_MODE = > PEDANTIC = > DEV_ONLY = > J2RE_ONLY = > NO_DOCS = YES > NO_IMAGES = > TOOLS_ONLY = true > INSANE = > > Build Platform Settings: > PLATFORM = bsd > ARCH = i586 > LIBARCH = i386 > ARCH_FAMILY = i586 > ARCH_DATA_MODEL = 32 > OS_VERSION = 4.8-RC > TRUE_PLATFORM = FreeBSD (4.x STABLE way) > FREE_SPACE = 3894824 > > GNU Make Settings: > MAKE = gmake > MAKE VERSION = > MAKECMDGOALS = sanity > MAKEFLAGS = > SHELL = /bin/sh > > Target Build Versions: > JDK_VERSION = 1.4.1 > MILESTONE = p3 > BUILD_NUMBER = alsbergt_07_apr_2003_12_16 > BUNDLE_DATE = 07_apr_2003 > > External File/Binary Locations: > HOTSPOT_SERVER_PATH = /v0/pobj/r+d/ports/java/jdk14/work/control/build/bsd-i586/hotspot-i586/server > HOTSPOT_CLIENT_PATH = /v0/pobj/r+d/ports/java/jdk14/work/control/build/bsd-i586/hotspot-i586/client > OPT_JAVAWS = /java/re/javaws/1.2/promoted/pit_tested/bundles/javaws-1_2-bsd-i586-i.zip > MOZILLA_PATH = /java/devtools > MOZILLA_HEADERS_PATH = /java/devtools/share/plugin > MOZILLA_LIBS_PATH = /java/devtools/bsd/plugin > MOTIF_DIR = /usr/local/X11R6 > CACERTS_FILE = ./../src/share/lib/security/cacerts > > WARNING: Your build environment has the variable NO_DOCS > defined. This will result in a development-only > build of the J2SE workspace, lacking the documentation > build. > > WARNING: You do not have access to the Java Web Start binary. > These binaries may be optional for this build. Please > check your access to > /java/re/javaws/1.2/promoted/pit_tested/bundles/javaws-1_2-bsd-i586-i.zip > and/or check your value of ALT_JAVAWS_PATH. > This will make your images target build incomplete. > > Sanity check passed. > /bin/mkdir -p ../build/bsd-i586/hotspot-i586/tmp > (cd ./../build/bsd-i586/hotspot-i586/tmp; \ > gmake -f /v0/pobj/r+d/ports/java/jdk14/work/hotspot/build/bsd/Makefile product \ > HOTSPOT_BUILD_VERSION=1.4.1-p3-alsbergt_07_apr_2003_12_16 GAMMADIR=/v0/pobj/r+d/ports/java/jdk14/work/hotspot ; ) > gmake[1]: Entering directory `/v0/pobj/r+d/ports/java/jdk14/work/control/build/bsd-i586/hotspot-i586/tmp' > sh /v0/pobj/r+d/ports/java/jdk14/work/hotspot/build/bsd/makefiles/buildATree.sh compiler2 /v0/pobj/r+d/ports/java/jdk14/work/hotspot bsd i486 > (cd bsd_i486_compiler2/product; gmake) > gmake[2]: Entering directory `/v0/pobj/r+d/ports/java/jdk14/work/control/build/bsd-i586/hotspot-i586/tmp/bsd_i486_compiler2/product' > # > # HotSpot Virtual Machine Error, Internal Error > # Please report this error at > # http://java.sun.com/cgi-bin/bugreport.cgi > # > # Java VM: Java HotSpot(TM) Client VM (1.4.1_02-b06 mixed mode) > # > # Error ID: 4F533F4C494E55580E43505002D7 > # > gmake[2]: *** [../generated/MakeDeps.class] Abort trap (core dumped) > gmake[2]: Leaving directory `/v0/pobj/r+d/ports/java/jdk14/work/control/build/bsd-i586/hotspot-i586/tmp/bsd_i486_compiler2/product' > gmake[1]: *** [product] Error 2 > gmake[1]: Leaving directory `/v0/pobj/r+d/ports/java/jdk14/work/control/build/bsd-i586/hotspot-i586/tmp' > gmake: *** [product] Error 2 > *** Error code 2 > > -- > Tom Alsberg - hacker (being the best description fitting this space) > Web page: http://www.cs.huji.ac.il/~alsbergt/ > DISCLAIMER: The above message does not even necessarily represent what > my fingers have typed on the keyboard, save anything further. -- Tom Alsberg - hacker (being the best description fitting this space) Web page: http://www.cs.huji.ac.il/~alsbergt/ DISCLAIMER: The above message does not even necessarily represent what my fingers have typed on the keyboard, save anything further. From owner-freebsd-standards@FreeBSD.ORG Fri Apr 11 12:44:31 2003 Return-Path: Delivered-To: freebsd-standards@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 899D837B401 for ; Fri, 11 Apr 2003 12:44:31 -0700 (PDT) Received: from harmony.village.org (rover.bsdimp.com [204.144.255.66]) by mx1.FreeBSD.org (Postfix) with ESMTP id C111B43F93 for ; Fri, 11 Apr 2003 12:44:30 -0700 (PDT) (envelope-from imp@bsdimp.com) Received: from localhost (warner@rover2.village.org [10.0.0.1]) by harmony.village.org (8.12.8/8.12.3) with ESMTP id h3BJiTA7029969 for ; Fri, 11 Apr 2003 13:44:29 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Fri, 11 Apr 2003 13:44:16 -0600 (MDT) Message-Id: <20030411.134416.71552075.imp@bsdimp.com> To: standards@freebsd.org From: "M. Warner Losh" X-Mailer: Mew version 2.1 on Emacs 21.2 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Subject: Non-compliant FreeBSD behavior? X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Apr 2003 19:44:31 -0000 A number of places I've seen says that the BUGGY section should be identical to the else part. That is, setting O_NONBLOCK via fcntl should result in the same behavior as setting it using FIONBIO. However, I've observed that for both threaded and unthreaded programs the BUGGY part doesn't work, while the other part does. Is there something subtle I'm missing? What do the standards have to say about this? Warner #include #include #include #include #include #include #include #include int main(void) { int fd; struct in_addr addr; struct sockaddr_in sa; int flags; fd = socket(PF_INET, SOCK_STREAM, 0); inet_aton("1.2.3.4", &addr); sa.sin_len = sizeof(sa); sa.sin_family = AF_INET; sa.sin_port = htons(1234); memcpy(&sa.sin_addr, &addr, sizeof(addr)); #if BUGGY flags = fcntl(fd, F_GETFL, NULL); flags |= O_NONBLOCK; if (fcntl(fd, F_SETFL, &flags) == -1) err(1, "fcntl"); #else flags = 1; if (ioctl(fd, FIONBIO, &flags)) err(1, "ioctl"); #endif if (connect(fd, (struct sockaddr *) &sa, sizeof(sa))) err(1, "connect"); exit(0); } From owner-freebsd-standards@FreeBSD.ORG Fri Apr 11 15:30:41 2003 Return-Path: Delivered-To: freebsd-standards@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3702D37B401 for ; Fri, 11 Apr 2003 15:30:41 -0700 (PDT) Received: from khavrinen.lcs.mit.edu (khavrinen.lcs.mit.edu [18.24.4.193]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7494343FCB for ; Fri, 11 Apr 2003 15:30:40 -0700 (PDT) (envelope-from wollman@khavrinen.lcs.mit.edu) Received: from khavrinen.lcs.mit.edu (localhost [IPv6:::1]) by khavrinen.lcs.mit.edu (8.12.9/8.12.9) with ESMTP id h3BMUSmA068708 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 11 Apr 2003 18:30:29 -0400 (EDT) (envelope-from wollman@khavrinen.lcs.mit.edu) Received: (from wollman@localhost) by khavrinen.lcs.mit.edu (8.12.9/8.12.9/Submit) id h3BMUS1G068705; Fri, 11 Apr 2003 18:30:28 -0400 (EDT) (envelope-from wollman) Date: Fri, 11 Apr 2003 18:30:28 -0400 (EDT) From: Garrett Wollman Message-Id: <200304112230.h3BMUS1G068705@khavrinen.lcs.mit.edu> To: "M. Warner Losh" In-Reply-To: <20030411.134416.71552075.imp@bsdimp.com> References: <20030411.134416.71552075.imp@bsdimp.com> cc: standards@freebsd.org Subject: Non-compliant FreeBSD behavior? X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Apr 2003 22:30:41 -0000 < said: > something subtle I'm missing? What do the standards have to say about > this? The standards do not say anything about FIONBIO or ioctl() in general[1]. As far as O_NONBLOCK goes: # The I/O mode of a socket is described by the O_NONBLOCK file status # flag which pertains to the open file description for the socket. This # flag is initially off when a socket is created, but may be set and # cleared by the use of the F_SETFL command of the fcntl( ) function. # When the O_NONBLOCK flag is set, functions that would normally block # until they are complete shall either return immediately with an error, # or shall complete asynchronously to the execution of the calling # process. Data transfer operations (the read( ), write( ), send( ), and # recv( ) functions) shall complete immediately, transfer only as much # as is available, and then return without blocking, or return an error # indicating that no transfer could be made without blocking. The # connect( ) function initiates a connection and shall return without # blocking when O_NONBLOCK is set; it shall return the error # [EINPROGRESS] to indicate that the connection was initiated # successfully, but that it has not yet completed. In addition to this definition, O_NONBLOCK is also defined for SEWERS endpoints, POSIX message queues, opening fifos and special files, and reading from and writing to pipes and fifos. FreeBSD's network stack does not mention O_NONBLOCK anywhere, but the fcntl() implementation automatically turns fcntl(fd, F_SETFL, O_NONBLOCK) operations into ioctl(fd, FIONBIO, &one) operations. soo_ioctl() should then be called indirectly to set the SS_NBIO status flag on the socket itself. At the moment I can't seem to find where connect() actually blocks. -GAWollman [1] Actually, ioctl() is defined, as a SEWERS-specific function, which might as well be completely undefined considering how little of SEWERS is actually defined in the standard. From owner-freebsd-standards@FreeBSD.ORG Fri Apr 11 16:05:00 2003 Return-Path: Delivered-To: freebsd-standards@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7D01A37B405 for ; Fri, 11 Apr 2003 16:05:00 -0700 (PDT) Received: from harmony.village.org (rover.bsdimp.com [204.144.255.66]) by mx1.FreeBSD.org (Postfix) with ESMTP id 713DB43F93 for ; Fri, 11 Apr 2003 16:04:59 -0700 (PDT) (envelope-from imp@bsdimp.com) Received: from localhost (warner@rover2.village.org [10.0.0.1]) by harmony.village.org (8.12.8/8.12.3) with ESMTP id h3BN4uA7031439; Fri, 11 Apr 2003 17:04:57 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Fri, 11 Apr 2003 17:04:40 -0600 (MDT) Message-Id: <20030411.170440.58437770.imp@bsdimp.com> To: wollman@lcs.mit.edu From: "M. Warner Losh" In-Reply-To: <200304112230.h3BMUS1G068705@khavrinen.lcs.mit.edu> References: <20030411.134416.71552075.imp@bsdimp.com> <200304112230.h3BMUS1G068705@khavrinen.lcs.mit.edu> X-Mailer: Mew version 2.1 on Emacs 21.2 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit cc: standards@freebsd.org Subject: Re: Non-compliant FreeBSD behavior? X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Apr 2003 23:05:01 -0000 In message: <200304112230.h3BMUS1G068705@khavrinen.lcs.mit.edu> Garrett Wollman writes: : < said: : > something subtle I'm missing? What do the standards have to say about : > this? ... : At the moment I can't seem to find where connect() actually blocks. What you are missing is an extra & in my code, so I'm passing a pointer rather than an int... Warner From owner-freebsd-standards@FreeBSD.ORG Sat Apr 12 01:40:12 2003 Return-Path: Delivered-To: freebsd-standards@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C5EA337B407 for ; Sat, 12 Apr 2003 01:40:11 -0700 (PDT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 70AF143FE0 for ; Sat, 12 Apr 2003 01:40:08 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.9/8.12.9) with ESMTP id h3C8e8Up041422 for ; Sat, 12 Apr 2003 01:40:08 -0700 (PDT) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.9/8.12.9/Submit) id h3C8e8ii041421; Sat, 12 Apr 2003 01:40:08 -0700 (PDT) Resent-Date: Sat, 12 Apr 2003 01:40:08 -0700 (PDT) Resent-Message-Id: <200304120840.h3C8e8ii041421@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-standards@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, "Sergey A.Osokin" Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A4D7237B401 for ; Sat, 12 Apr 2003 01:33:35 -0700 (PDT) Received: from freebsd.org.ru (freebsd.org.ru [194.84.67.5]) by mx1.FreeBSD.org (Postfix) with ESMTP id 69BED43F3F for ; Sat, 12 Apr 2003 01:33:34 -0700 (PDT) (envelope-from osa@freebsd.org.ru) Received: by freebsd.org.ru (Postfix, from userid 1000) id 376DFB9; Sat, 12 Apr 2003 12:33:32 +0400 (MSD) Message-Id: <20030412083332.376DFB9@freebsd.org.ru> Date: Sat, 12 Apr 2003 12:33:32 +0400 (MSD) From: "Sergey A.Osokin" To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Subject: standards/50848: [PATCH] Implementation of pthread_[get|set]concurrency X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: "Sergey A.Osokin" List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 Apr 2003 08:40:12 -0000 >Number: 50848 >Category: standards >Synopsis: [PATCH] Implementation of pthread_[get|set]concurrency >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-standards >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Sat Apr 12 01:40:07 PDT 2003 >Closed-Date: >Last-Modified: >Originator: Sergey A. Osokin >Release: FreeBSD 5.0-CURRENT i386 >Organization: n/a >Environment: System: FreeBSD 5.0-CURRENT #30: Mon Mar 31 15:10:23 MSD 2003 i386 >Description: Implementation of pthread_[get|set]concurrency SUSv2 tell: "If an implementation does not support multiplexing of user threads on top of several kernel scheduled entities, the pthread_setconcurrency() and pthread_getconcurrency() functions will be provided for source code compatibility but they will have no effect when called." >How-To-Repeat: >Fix: Index: src/lib/libc_r/uthread/Makefile.inc =================================================================== RCS file: /home/ncvs/src/lib/libc_r/uthread/Makefile.inc,v retrieving revision 1.35 diff -u -r1.35 Makefile.inc --- src/lib/libc_r/uthread/Makefile.inc 11 Feb 2003 07:28:28 -0000 1.35 +++ src/lib/libc_r/uthread/Makefile.inc 11 Apr 2003 22:02:33 -0000 @@ -37,6 +37,7 @@ uthread_cancel.c \ uthread_clean.c \ uthread_close.c \ + uthread_concurrency.c \ uthread_cond.c \ uthread_condattr_destroy.c \ uthread_condattr_init.c \ Index: src/lib/libc_r/man/Makefile.inc =================================================================== RCS file: /home/ncvs/src/lib/libc_r/man/Makefile.inc,v retrieving revision 1.19 diff -u -r1.19 Makefile.inc --- src/lib/libc_r/man/Makefile.inc 24 Feb 2003 22:59:01 -0000 1.19 +++ src/lib/libc_r/man/Makefile.inc 11 Apr 2003 22:02:34 -0000 @@ -10,6 +10,7 @@ pthread_cancel.3 \ pthread_cleanup_pop.3 \ pthread_cleanup_push.3 \ + pthread_getconcurrency.3 \ pthread_condattr.3 \ pthread_cond_broadcast.3 \ pthread_cond_destroy.3 \ @@ -85,6 +86,7 @@ pthread_attr.3 pthread_attr_setstack.3 \ pthread_attr.3 pthread_attr_setstackaddr.3 \ pthread_attr.3 pthread_attr_setstacksize.3 \ + pthread_getconcurrency.3 pthread_setconcurrency.3 \ pthread_condattr.3 pthread_condattr_init.3 \ pthread_condattr.3 pthread_condattr_destroy.3 \ pthread_multi_np.3 pthread_single_np.3 \ --- /dev/null Fri Apr 11 18:07:14 2003 +++ src/lib/libc_r/uthread/uthread_concurrency.c Sat Apr 12 01:30:30 2003 @@ -0,0 +1,54 @@ +/* + * Copyright (c) 2003 Sergey Osokin . + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by Sergey Osokin. + * 4. Neither the name of the author nor the names of any co-contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY SERGEY OSOKIN AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#include + +__weak_reference(_pthread_getconcurrency, pthread_getconcurrency); +__weak_reference(_pthread_setconcurrency, pthread_setconcurrency); + +int +_pthread_getconcurrency(void) +{ + return 0; +} + +int +_pthread_setconcurrency(int new_level) +{ + if (new_level < 0) { + errno = EINVAL; + return (-1); + } + return 0; +} --- /dev/null Fri Apr 11 18:07:14 2003 +++ src/lib/libc_r/man/pthread_getconcurrency.3 Fri Apr 11 20:24:04 2003 @@ -0,0 +1,108 @@ +.\" Copyright (c) 2003 Sergey Osokin +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" $FreeBSD$ +.Dd April 11, 2003 +.Dt PTHREAD_GETCONCURRENCY 3 +.Os +.Sh NAME +.Nm pthread_getconcurrency, +.Nm pthread_setconcurrency +.Nd get or set level of concurrency +.Sh LIBRARY +.Lb libc_r +.Sh SYNOPSIS +.In pthread.h +.Ft int +.Fn pthread_getconcurrency "void" +.Ft int +.Fn pthread_setconcurrency "int new_level" +.Sh DESCRIPTION +The +.Fn pthread_getconcurrency +function allows an application to inform the threads implementation +of its desired concurrency level, +.Va new_level . +The actual level of concurrency provided by the implementation +as a result of this function call is unspecified. If new_level is +zero, it causes the implementation to maintain the concurrency +level at its discretion as if +.Fn pthread_setconcurrency +was never called. The +.Fn pthread_getconcurrency +function returns the value set by a previous call to the +.Fn pthread_setconcurrency +function. If the +.Fn pthread_setconcurrency +function was not previously called, this function returns zero to +indicate that the implementation is maintaining the concurrency +level. When an application calls +.Fn pthread_setconcurrency +it is informing the implementation of its desired concurrency +level. The implementation uses this as a hint, not a requirement. +.Sh RETURN VALUES +If successful, the +.Fn pthread_setconcurrency +function returns zero. Otherwise, an error number is returned +to indicate the error. The +.Fn pthread_getconcurrency +function always returns the concurrency level set by a previous +call to +.Fn pthread_setconcurrency . +If the +.Fn pthread_setconcurrency +function has never been called, +.Fn pthread_getconcurrency +returns zero. +.Sh ERRORS +The +.Fn pthread_setconcurrency +function will fail if: +.Bl -tag -width Er +.It Bq Er EINVAL +The value specified by +.Va new_level +is negative. +.El +.Bl -tag -width Er +.It Bq Er EAGAIN +The value specific by +.Va new_level +would cause a system resource to be exceeded. +.Sh APPLICATION USAGE +Use of these functions changes the state of the underlying +concurrency upon which the application depends. Library +developers are advised to not use the +.Fn pthread_getconcurrency +and +.Fn pthread_setconcurrency +functions since their use may conflict with an applications +use of these functions. +.Sh STANDARDS +The +.Fn pthread_getconcurrency +and +.Fn pthread_setconcurrency +functions conform to +.St -susv2 Index: src/lib/libpthread/man/Makefile.inc =================================================================== RCS file: /home/ncvs/src/lib/libpthread/man/Makefile.inc,v retrieving revision 1.16 diff -u -r1.16 Makefile.inc --- src/lib/libpthread/man/Makefile.inc 3 Mar 2003 22:40:20 -0000 1.16 +++ src/lib/libpthread/man/Makefile.inc 11 Apr 2003 22:02:34 -0000 @@ -9,6 +9,7 @@ pthread_cancel.3 \ pthread_cleanup_pop.3 \ pthread_cleanup_push.3 \ + pthread_getconcurrency.3 \ pthread_condattr.3 \ pthread_cond_broadcast.3 \ pthread_cond_destroy.3 \ @@ -73,6 +74,7 @@ pthread_attr.3 pthread_attr_setscope.3 \ pthread_attr.3 pthread_attr_setstackaddr.3 \ pthread_attr.3 pthread_attr_setstacksize.3 \ + pthread_getconcurrency.3 pthread_setconcurrency.3 \ pthread_condattr.3 pthread_condattr_init.3 \ pthread_condattr.3 pthread_condattr_destroy.3 \ pthread_mutexattr.3 pthread_mutexattr_init.3 \ Index: src/lib/libpthread/thread/Makefile.inc =================================================================== RCS file: /home/ncvs/src/lib/libpthread/thread/Makefile.inc,v retrieving revision 1.38 diff -u -r1.38 Makefile.inc --- src/lib/libpthread/thread/Makefile.inc 3 Mar 2003 22:40:20 -0000 1.38 +++ src/lib/libpthread/thread/Makefile.inc 11 Apr 2003 22:02:35 -0000 @@ -31,6 +31,7 @@ thr_cancel.c \ thr_clean.c \ thr_close.c \ + thr_concurrency.c \ thr_cond.c \ thr_condattr_destroy.c \ thr_condattr_init.c \ --- /dev/null Fri Apr 11 18:07:14 2003 +++ src/lib/libpthread/thread/thr_concurrency.c Sat Apr 12 01:32:38 2003 @@ -0,0 +1,54 @@ +/* + * Copyright (c) 2003 Sergey Osokin . + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by Sergey Osokin. + * 4. Neither the name of the author nor the names of any co-contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY SERGEY OSOKIN AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#include + +__weak_reference(_pthread_getconcurrency, pthread_getconcurrency); +__weak_reference(_pthread_setconcurrency, pthread_setconcurrency); + +int +_pthread_getconcurrency(void) +{ + return 0; +} + +int +_pthread_setconcurrency(int new_level) +{ + if (new_level < 0) { + errno = EINVAL; + return (-1); + } + return 0; +} --- /dev/null Fri Apr 11 18:07:14 2003 +++ src/lib/libpthread/man/pthread_getconcurrency.3 Fri Apr 11 20:41:04 2003 @@ -0,0 +1,108 @@ +.\" Copyright (c) 2003 Sergey Osokin +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" $FreeBSD$ +.Dd April 11, 2003 +.Dt PTHREAD_GETCONCURRENCY 3 +.Os +.Sh NAME +.Nm pthread_getconcurrency, +.Nm pthread_setconcurrency +.Nd get or set level of concurrency +.Sh LIBRARY +.Lb libc_r +.Sh SYNOPSIS +.In pthread.h +.Ft int +.Fn pthread_getconcurrency "void" +.Ft int +.Fn pthread_setconcurrency "int new_level" +.Sh DESCRIPTION +The +.Fn pthread_getconcurrency +function allows an application to inform the threads implementation +of its desired concurrency level, +.Va new_level . +The actual level of concurrency provided by the implementation +as a result of this function call is unspecified. If new_level is +zero, it causes the implementation to maintain the concurrency +level at its discretion as if +.Fn pthread_setconcurrency +was never called. The +.Fn pthread_getconcurrency +function returns the value set by a previous call to the +.Fn pthread_setconcurrency +function. If the +.Fn pthread_setconcurrency +function was not previously called, this function returns zero to +indicate that the implementation is maintaining the concurrency +level. When an application calls +.Fn pthread_setconcurrency +it is informing the implementation of its desired concurrency +level. The implementation uses this as a hint, not a requirement. +.Sh RETURN VALUES +If successful, the +.Fn pthread_setconcurrency +function returns zero. Otherwise, an error number is returned +to indicate the error. The +.Fn pthread_getconcurrency +function always returns the concurrency level set by a previous +call to +.Fn pthread_setconcurrency . +If the +.Fn pthread_setconcurrency +function has never been called, +.Fn pthread_getconcurrency +returns zero. +.Sh ERRORS +The +.Fn pthread_setconcurrency +function will fail if: +.Bl -tag -width Er +.It Bq Er EINVAL +The value specified by +.Va new_level +is negative. +.El +.Bl -tag -width Er +.It Bq Er EAGAIN +The value specific by +.Va new_level +would cause a system resource to be exceeded. +.Sh APPLICATION USAGE +Use of these functions changes the state of the underlying +concurrency upon which the application depends. Library +developers are advised to not use the +.Fn pthread_getconcurrency +and +.Fn pthread_setconcurrency +functions since their use may conflict with an applications +use of these functions. +.Sh STANDARDS +The +.Fn pthread_getconcurrency +and +.Fn pthread_setconcurrency +functions conform to +.St -susv2 Index: src/lib/libthr/thread/Makefile.inc =================================================================== RCS file: /home/ncvs/src/lib/libthr/thread/Makefile.inc,v retrieving revision 1.1 diff -u -r1.1 Makefile.inc --- src/lib/libthr/thread/Makefile.inc 1 Apr 2003 03:46:28 -0000 1.1 +++ src/lib/libthr/thread/Makefile.inc 11 Apr 2003 22:02:36 -0000 @@ -8,6 +8,7 @@ thr_autoinit.c \ thr_cancel.c \ thr_clean.c \ + thr_concurrency.c \ thr_cond.c \ thr_condattr_destroy.c \ thr_condattr_init.c \ --- /dev/null Fri Apr 11 18:07:14 2003 +++ src/lib/libthr/thread/thr_concurrency.c Sat Apr 12 01:38:12 2003 @@ -0,0 +1,54 @@ +/* + * Copyright (c) 2003 Sergey Osokin . + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by Sergey Osokin. + * 4. Neither the name of the author nor the names of any co-contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY SERGEY OSOKIN AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#include + +__weak_reference(_pthread_getconcurrency, pthread_getconcurrency); +__weak_reference(_pthread_setconcurrency, pthread_setconcurrency); + +int +_pthread_getconcurrency(void) +{ + return 0; +} + +int +_pthread_setconcurrency(int new_level) +{ + if (new_level < 0) { + errno = EINVAL; + return (-1); + } + return 0; +} >Release-Note: >Audit-Trail: >Unformatted: From owner-freebsd-standards@FreeBSD.ORG Sat Apr 12 23:30:13 2003 Return-Path: Delivered-To: freebsd-standards@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4CD5E37B401 for ; Sat, 12 Apr 2003 23:30:13 -0700 (PDT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5C79E43FCB for ; Sat, 12 Apr 2003 23:30:12 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.9/8.12.9) with ESMTP id h3D6UCUp059110 for ; Sat, 12 Apr 2003 23:30:12 -0700 (PDT) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.9/8.12.9/Submit) id h3D6UCBM059109; Sat, 12 Apr 2003 23:30:12 -0700 (PDT) Resent-Date: Sat, 12 Apr 2003 23:30:12 -0700 (PDT) Resent-Message-Id: <200304130630.h3D6UCBM059109@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-standards@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, "lamer." Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7505037B401 for ; Sat, 12 Apr 2003 23:21:42 -0700 (PDT) Received: from velocity.beatit.no (velocity.beatit.no [212.20.196.86]) by mx1.FreeBSD.org (Postfix) with SMTP id 9C97643F85 for ; Sat, 12 Apr 2003 23:21:40 -0700 (PDT) (envelope-from lamer@properfucked.net) Received: (qmail 17609 invoked from network); 13 Apr 2003 06:21:37 -0000 Received: from ti500720a080-1655.bb.online.no (HELO nynaeve.telaranrhiod) (@80.213.70.119) by velocity.beatit.no with SMTP; 13 Apr 2003 06:21:37 -0000 Message-Id: <20030413080947.B43406-100000@nynaeve.telaranrhiod> Date: Sun, 13 Apr 2003 08:22:07 +0200 (CEST) From: "lamer." To: FreeBSD-gnats-submit@FreeBSD.org Subject: standards/50889: NULL defined as 0 instead of (void *)0 X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 Apr 2003 06:30:13 -0000 >Number: 50889 >Category: standards >Synopsis: NULL defined as 0 instead of (void *)0 >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-standards >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Sat Apr 12 23:30:11 PDT 2003 >Closed-Date: >Last-Modified: >Originator: Frank. >Release: FreeBSD 4.7-RELEASE i386 >Organization: None. >Environment: System: FreeBSD nynaeve.telaranrhiod 4.7-RELEASE FreeBSD 4.7-RELEASE #3: Mon Dec 9 19:44:33 CET 2002 root@nynaeve.telaranrhiod:/usr/src/sys/compile/NYNAEVE i386 >Description: In the assorted standard headerfiles ({stdlib,stdio,unistd,time,string}.h etc.) the NULL pointer constant seems to be defined as 0. Though this works fine in most cases, it "breaks" on code using NULL as the right operand with the comma operator as C99 (and C89) explicitly states that a constant expression shall not contain comma operators. So something like void *p = ((void)0, 0); is not strictly valid because 0 can only be interpreted as the null pointer constant when it is the result of an integer constant expression. Thus, to define NULL as simply 0, gives a warning (with strictly conforming C compilers atleast) on code like "return whatever, NULL;" Defining NULL as (void *)0 will make it a more generally usable macro as the comma expression will retain the (void *) type of its right operand. :) Ref.: 6.6.3 of ISO/IEC 9899:1999(E) (no idea about the paragraph numbers with C89). >How-To-Repeat: #include void *gah() { return (void)0, NULL; } void *pah() { return puts("go."), NULL; } etc. If using GCC, compile with -pedantic for a warning to show on the gah() function (this may be considered as a GNU extension). >Fix: >Release-Note: >Audit-Trail: >Unformatted: