diff options
author | wtc%google.com <devnull@localhost> | 2012-09-28 14:33:48 +0000 |
---|---|---|
committer | wtc%google.com <devnull@localhost> | 2012-09-28 14:33:48 +0000 |
commit | 31334fcac12c952ffede7a5b2f22591a056b0e42 (patch) | |
tree | 5a0688709df8fb494ea7726bca3c659717e5d43e | |
parent | e651e219b9ec4e71d593bc3ad6e6acbf108299d8 (diff) | |
parent | 144c95768d4fc108e78608f731ab2460ea2c55ab (diff) | |
download | nspr-hg-31334fcac12c952ffede7a5b2f22591a056b0e42.tar.gz |
Bug 795213: the variable used for the return value of GETADDRINFO() shouldNSPR_4_9_3_BETA1
have the type int. The patch is contributed by Nico Weber
<thakis@chromium.org>. r=wtc.
634 files changed, 5405 insertions, 28220 deletions
diff --git a/Makefile.in b/Makefile.in index c80d24a8..dfb06f93 100644 --- a/Makefile.in +++ b/Makefile.in @@ -1,41 +1,9 @@ #! gmake # -# ***** BEGIN LICENSE BLOCK ***** -# Version: MPL 1.1/GPL 2.0/LGPL 2.1 -# -# The contents of this file are subject to the Mozilla Public License Version -# 1.1 (the "License"); you may not use this file except in compliance with -# the License. You may obtain a copy of the License at -# http://www.mozilla.org/MPL/ -# -# Software distributed under the License is distributed on an "AS IS" basis, -# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License -# for the specific language governing rights and limitations under the -# License. -# -# The Original Code is the Netscape Portable Runtime (NSPR). -# -# The Initial Developer of the Original Code is -# Netscape Communications Corporation. -# Portions created by the Initial Developer are Copyright (C) 1998-2000 -# the Initial Developer. All Rights Reserved. -# -# Contributor(s): -# -# Alternatively, the contents of this file may be used under the terms of -# either the GNU General Public License Version 2 or later (the "GPL"), or -# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), -# in which case the provisions of the GPL or the LGPL are applicable instead -# of those above. If you wish to allow use of your version of this file only -# under the terms of either the GPL or the LGPL, and not to allow others to -# use your version of this file under the terms of the MPL, indicate your -# decision by deleting the provisions above and replace them with the notice -# and other provisions required by the GPL or the LGPL. If you do not delete -# the provisions above, a recipient may use your version of this file under -# the terms of any one of the MPL, the GPL or the LGPL. -# -# ***** END LICENSE BLOCK ***** +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. MOD_DEPTH = . @@ -45,8 +13,6 @@ VPATH = @srcdir@ include $(MOD_DEPTH)/config/autoconf.mk -MAKE := $(patsubst -j%,,$(MAKE)) -j1 - DIRS = config pr lib ifdef MOZILLA_CLIENT diff --git a/admin/explode.pl b/admin/explode.pl index 881f21b9..4869597a 100644 --- a/admin/explode.pl +++ b/admin/explode.pl @@ -1,40 +1,8 @@ #!/bin/perl # -# ***** BEGIN LICENSE BLOCK ***** -# Version: MPL 1.1/GPL 2.0/LGPL 2.1 -# -# The contents of this file are subject to the Mozilla Public License Version -# 1.1 (the "License"); you may not use this file except in compliance with -# the License. You may obtain a copy of the License at -# http://www.mozilla.org/MPL/ -# -# Software distributed under the License is distributed on an "AS IS" basis, -# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License -# for the specific language governing rights and limitations under the -# License. -# -# The Original Code is the Netscape Portable Runtime (NSPR). -# -# The Initial Developer of the Original Code is -# Netscape Communications Corporation. -# Portions created by the Initial Developer are Copyright (C) 1998-2001 -# the Initial Developer. All Rights Reserved. -# -# Contributor(s): -# -# Alternatively, the contents of this file may be used under the terms of -# either the GNU General Public License Version 2 or later (the "GPL"), or -# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), -# in which case the provisions of the GPL or the LGPL are applicable instead -# of those above. If you wish to allow use of your version of this file only -# under the terms of either the GPL or the LGPL, and not to allow others to -# use your version of this file under the terms of the MPL, indicate your -# decision by deleting the provisions above and replace them with the notice -# and other provisions required by the GPL or the LGPL. If you do not delete -# the provisions above, a recipient may use your version of this file under -# the terms of any one of the MPL, the GPL or the LGPL. -# -# ***** END LICENSE BLOCK ***** +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. # ----------------------------------------------------------------- # diff --git a/admin/makeTargetDirs.sh b/admin/makeTargetDirs.sh index 4250ce4a..46ad8947 100644 --- a/admin/makeTargetDirs.sh +++ b/admin/makeTargetDirs.sh @@ -1,40 +1,8 @@ #!/bin/sh # -# ***** BEGIN LICENSE BLOCK ***** -# Version: MPL 1.1/GPL 2.0/LGPL 2.1 -# -# The contents of this file are subject to the Mozilla Public License Version -# 1.1 (the "License"); you may not use this file except in compliance with -# the License. You may obtain a copy of the License at -# http://www.mozilla.org/MPL/ -# -# Software distributed under the License is distributed on an "AS IS" basis, -# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License -# for the specific language governing rights and limitations under the -# License. -# -# The Original Code is the Netscape Portable Runtime (NSPR). -# -# The Initial Developer of the Original Code is -# Netscape Communications Corporation. -# Portions created by the Initial Developer are Copyright (C) 1998-2001 -# the Initial Developer. All Rights Reserved. -# -# Contributor(s): -# -# Alternatively, the contents of this file may be used under the terms of -# either the GNU General Public License Version 2 or later (the "GPL"), or -# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), -# in which case the provisions of the GPL or the LGPL are applicable instead -# of those above. If you wish to allow use of your version of this file only -# under the terms of either the GPL or the LGPL, and not to allow others to -# use your version of this file under the terms of the MPL, indicate your -# decision by deleting the provisions above and replace them with the notice -# and other provisions required by the GPL or the LGPL. If you do not delete -# the provisions above, a recipient may use your version of this file under -# the terms of any one of the MPL, the GPL or the LGPL. -# -# ***** END LICENSE BLOCK ***** +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. # ----------------------------------------------------------------- # makeTargetDirs.sh -- Create target directories for building NSPR diff --git a/admin/repackage.sh b/admin/repackage.sh index c5421312..a3f004ee 100755 --- a/admin/repackage.sh +++ b/admin/repackage.sh @@ -1,39 +1,7 @@ #! /bin/sh -# ***** BEGIN LICENSE BLOCK ***** -# Version: MPL 1.1/GPL 2.0/LGPL 2.1 -# -# The contents of this file are subject to the Mozilla Public License Version -# 1.1 (the "License"); you may not use this file except in compliance with -# the License. You may obtain a copy of the License at -# http://www.mozilla.org/MPL/ -# -# Software distributed under the License is distributed on an "AS IS" basis, -# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License -# for the specific language governing rights and limitations under the -# License. -# -# The Original Code is the Netscape Portable Runtime (NSPR). -# -# The Initial Developer of the Original Code is -# Netscape Communications Corporation. -# Portions created by the Initial Developer are Copyright (C) 1998-2001 -# the Initial Developer. All Rights Reserved. -# -# Contributor(s): -# -# Alternatively, the contents of this file may be used under the terms of -# either the GNU General Public License Version 2 or later (the "GPL"), or -# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), -# in which case the provisions of the GPL or the LGPL are applicable instead -# of those above. If you wish to allow use of your version of this file only -# under the terms of either the GPL or the LGPL, and not to allow others to -# use your version of this file under the terms of the MPL, indicate your -# decision by deleting the provisions above and replace them with the notice -# and other provisions required by the GPL or the LGPL. If you do not delete -# the provisions above, a recipient may use your version of this file under -# the terms of any one of the MPL, the GPL or the LGPL. -# -# ***** END LICENSE BLOCK ***** +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. # ------------------------------------------------------------------ # repackage.sh -- Repackage NSPR from /s/b/c to mozilla.org format @@ -64,10 +32,10 @@ # # ------------------------------------------------------------------ -FROMTOP=/share/builds/components/nspr20/v4.8.4 -TOTOP=./v4.8.4 -NSPRDIR=nspr-4.8.4 -SOURCETAG=NSPR_4_8_4_RTM +FROMTOP=/share/builds/components/nspr20/v4.9.3 +TOTOP=./v4.9.3 +NSPRDIR=nspr-4.9.3 +SOURCETAG=NSPR_4_9_3_RTM # # enumerate Unix object directories on /s/b/c diff --git a/admin/symlinks.sh b/admin/symlinks.sh index f90582e2..8cd6a806 100644 --- a/admin/symlinks.sh +++ b/admin/symlinks.sh @@ -1,40 +1,8 @@ #!/bin/sh # -# ***** BEGIN LICENSE BLOCK ***** -# Version: MPL 1.1/GPL 2.0/LGPL 2.1 -# -# The contents of this file are subject to the Mozilla Public License Version -# 1.1 (the "License"); you may not use this file except in compliance with -# the License. You may obtain a copy of the License at -# http://www.mozilla.org/MPL/ -# -# Software distributed under the License is distributed on an "AS IS" basis, -# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License -# for the specific language governing rights and limitations under the -# License. -# -# The Original Code is the Netscape Portable Runtime (NSPR). -# -# The Initial Developer of the Original Code is -# Netscape Communications Corporation. -# Portions created by the Initial Developer are Copyright (C) 1998-2001 -# the Initial Developer. All Rights Reserved. -# -# Contributor(s): -# -# Alternatively, the contents of this file may be used under the terms of -# either the GNU General Public License Version 2 or later (the "GPL"), or -# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), -# in which case the provisions of the GPL or the LGPL are applicable instead -# of those above. If you wish to allow use of your version of this file only -# under the terms of either the GPL or the LGPL, and not to allow others to -# use your version of this file under the terms of the MPL, indicate your -# decision by deleting the provisions above and replace them with the notice -# and other provisions required by the GPL or the LGPL. If you do not delete -# the provisions above, a recipient may use your version of this file under -# the terms of any one of the MPL, the GPL or the LGPL. -# -# ***** END LICENSE BLOCK ***** +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. # ----------------------------------------------------------------- # symlinks.sh -- create links from NSPR builds diff --git a/build/autoconf/config.sub b/build/autoconf/config.sub index 72438295..cebf96cf 100755 --- a/build/autoconf/config.sub +++ b/build/autoconf/config.sub @@ -4,7 +4,7 @@ # 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 # Free Software Foundation, Inc. -timestamp='2009-12-04' +timestamp='2011-01-03' # This file is (in principle) common to ALL GNU software. # The presence of a machine in this file suggests that SOME GNU software @@ -1432,6 +1432,9 @@ case $os in -dicos*) os=-dicos ;; + -android*) + os=-android + ;; -none) ;; *) @@ -1686,6 +1689,9 @@ case $basic_machine in -vos*) vendor=stratus ;; + *-android*|*-linuxandroid*) + vendor=linux- + ;; esac basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` ;; diff --git a/build/autoconf/install-sh b/build/autoconf/install-sh index 0ff4b6a0..a4be13e5 100755 --- a/build/autoconf/install-sh +++ b/build/autoconf/install-sh @@ -1,4 +1,8 @@ #!/bin/sh +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. + # # install - install a program, script, or datafile diff --git a/build/cygwin-wrapper b/build/cygwin-wrapper index 679f0a11..3302df8b 100755 --- a/build/cygwin-wrapper +++ b/build/cygwin-wrapper @@ -1,4 +1,8 @@ #!/bin/sh +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. + # # Stupid wrapper to avoid win32 dospath/cygdrive issues # Try not to spawn programs from within this file. If the stuff in here looks royally diff --git a/config/Makefile.in b/config/Makefile.in index 463deb2b..8557f3ea 100644 --- a/config/Makefile.in +++ b/config/Makefile.in @@ -1,40 +1,8 @@ #! gmake # -# ***** BEGIN LICENSE BLOCK ***** -# Version: MPL 1.1/GPL 2.0/LGPL 2.1 -# -# The contents of this file are subject to the Mozilla Public License Version -# 1.1 (the "License"); you may not use this file except in compliance with -# the License. You may obtain a copy of the License at -# http://www.mozilla.org/MPL/ -# -# Software distributed under the License is distributed on an "AS IS" basis, -# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License -# for the specific language governing rights and limitations under the -# License. -# -# The Original Code is the Netscape Portable Runtime (NSPR). -# -# The Initial Developer of the Original Code is -# Netscape Communications Corporation. -# Portions created by the Initial Developer are Copyright (C) 1998-2000 -# the Initial Developer. All Rights Reserved. -# -# Contributor(s): -# -# Alternatively, the contents of this file may be used under the terms of -# either the GNU General Public License Version 2 or later (the "GPL"), or -# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), -# in which case the provisions of the GPL or the LGPL are applicable instead -# of those above. If you wish to allow use of your version of this file only -# under the terms of either the GPL or the LGPL, and not to allow others to -# use your version of this file under the terms of the MPL, indicate your -# decision by deleting the provisions above and replace them with the notice -# and other provisions required by the GPL or the LGPL. If you do not delete -# the provisions above, a recipient may use your version of this file under -# the terms of any one of the MPL, the GPL or the LGPL. -# -# ***** END LICENSE BLOCK ***** +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. MOD_DEPTH = .. topsrcdir = @top_srcdir@ @@ -52,7 +20,7 @@ VISIBILITY_FLAGS = # autoconf.mk must be deleted last (from the top-level directory) # because it is included by every makefile. -DIST_GARBAGE = nsprincl.mk nsprincl.sh nspr-config +DIST_GARBAGE = nsprincl.mk nsprincl.sh nspr-config nspr.pc RELEASE_BINS = nspr-config @@ -150,3 +118,7 @@ $(OBJDIR)/%$(PROG_SUFFIX): $(OBJDIR)/%.$(OBJ_SUFFIX) install:: nspr.m4 $(NSINSTALL) -D $(DESTDIR)$(datadir)/aclocal $(NSINSTALL) -t -m 0644 $< $(DESTDIR)$(datadir)/aclocal + +install:: nspr.pc + $(NSINSTALL) -D $(DESTDIR)$(libdir)/pkgconfig + $(NSINSTALL) -t -m 0644 $< $(DESTDIR)$(libdir)/pkgconfig diff --git a/config/autoconf.mk.in b/config/autoconf.mk.in index a1a4b78f..5f093c45 100644 --- a/config/autoconf.mk.in +++ b/config/autoconf.mk.in @@ -1,4 +1,8 @@ # -*- Mode: Makefile -*- +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. + INCLUDED_AUTOCONF_MK = 1 USE_AUTOCONF = 1 @@ -22,7 +26,10 @@ DIST = $(dist_prefix) RELEASE_OBJDIR_NAME = @RELEASE_OBJDIR_NAME@ OBJDIR_NAME = @OBJDIR_NAME@ OBJDIR = @OBJDIR@ -OBJ_SUFFIX = @OBJ_SUFFIX@ +# We do magic with OBJ_SUFFIX in config.mk, the following ensures we don't +# manually use it before config.mk inclusion +OBJ_SUFFIX = $(error config/config.mk needs to be included before using OBJ_SUFFIX) +_OBJ_SUFFIX = @OBJ_SUFFIX@ LIB_SUFFIX = @LIB_SUFFIX@ DLL_SUFFIX = @DLL_SUFFIX@ ASM_SUFFIX = @ASM_SUFFIX@ @@ -36,13 +43,14 @@ LIBNSPR = @LIBNSPR@ LIBPLC = @LIBPLC@ CROSS_COMPILE = @CROSS_COMPILE@ -BUILD_OPT = @MOZ_OPTIMIZE@ +MOZ_OPTIMIZE = @MOZ_OPTIMIZE@ +MOZ_DEBUG = @MOZ_DEBUG@ +MOZ_DEBUG_SYMBOLS = @MOZ_DEBUG_SYMBOLS@ USE_CPLUS = @USE_CPLUS@ USE_IPV6 = @USE_IPV6@ USE_N32 = @USE_N32@ USE_64 = @USE_64@ -GC_LEAK_DETECTOR = @GC_LEAK_DETECTOR@ ENABLE_STRIP = @ENABLE_STRIP@ USE_PTHREADS = @USE_PTHREADS@ @@ -81,7 +89,13 @@ DLLFLAGS = @DLLFLAGS@ EXEFLAGS = @EXEFLAGS@ OPTIMIZER = @OPTIMIZER@ +PROFILE_GEN_CFLAGS = @PROFILE_GEN_CFLAGS@ +PROFILE_GEN_LDFLAGS = @PROFILE_GEN_LDFLAGS@ +PROFILE_USE_CFLAGS = @PROFILE_USE_CFLAGS@ +PROFILE_USE_LDFLAGS = @PROFILE_USE_LDFLAGS@ + MKSHLIB = @MKSHLIB@ +WRAP_LDFLAGS = @WRAP_LDFLAGS@ DSO_CFLAGS = @DSO_CFLAGS@ DSO_LDOPTS = @DSO_LDOPTS@ diff --git a/config/config.mk b/config/config.mk index 10ebfdab..05db0761 100644 --- a/config/config.mk +++ b/config/config.mk @@ -1,40 +1,8 @@ #! gmake # -# ***** BEGIN LICENSE BLOCK ***** -# Version: MPL 1.1/GPL 2.0/LGPL 2.1 -# -# The contents of this file are subject to the Mozilla Public License Version -# 1.1 (the "License"); you may not use this file except in compliance with -# the License. You may obtain a copy of the License at -# http://www.mozilla.org/MPL/ -# -# Software distributed under the License is distributed on an "AS IS" basis, -# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License -# for the specific language governing rights and limitations under the -# License. -# -# The Original Code is the Netscape Portable Runtime (NSPR). -# -# The Initial Developer of the Original Code is -# Netscape Communications Corporation. -# Portions created by the Initial Developer are Copyright (C) 1998-2000 -# the Initial Developer. All Rights Reserved. -# -# Contributor(s): -# -# Alternatively, the contents of this file may be used under the terms of -# either the GNU General Public License Version 2 or later (the "GPL"), or -# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), -# in which case the provisions of the GPL or the LGPL are applicable instead -# of those above. If you wish to allow use of your version of this file only -# under the terms of either the GPL or the LGPL, and not to allow others to -# use your version of this file under the terms of the MPL, indicate your -# decision by deleting the provisions above and replace them with the notice -# and other provisions required by the GPL or the LGPL. If you do not delete -# the provisions above, a recipient may use your version of this file under -# the terms of any one of the MPL, the GPL or the LGPL. -# -# ***** END LICENSE BLOCK ***** +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. # Configuration information for building in the NSPR source module @@ -48,7 +16,7 @@ NSPR_CONFIG_MK = 1 # # For example: # -# BUILD_OPT=1 +# MOZ_OPTIMIZE=1 # USE_PTHREADS=1 # NS_USE_GCC= # @@ -74,6 +42,27 @@ NOMD_CCFLAGS = $(CCC_ONLY_FLAGS) $(OPTIMIZER) $(NOMD_OS_CFLAGS)\ LDFLAGS = $(OS_LDFLAGS) +# Enable profile-guided optimization +ifndef NO_PROFILE_GUIDED_OPTIMIZE +ifdef MOZ_PROFILE_GENERATE +CFLAGS += $(PROFILE_GEN_CFLAGS) +LDFLAGS += $(PROFILE_GEN_LDFLAGS) +DLLFLAGS += $(PROFILE_GEN_LDFLAGS) +ifeq (WINNT,$(OS_ARCH)) +AR_FLAGS += -LTCG +endif +endif # MOZ_PROFILE_GENERATE + +ifdef MOZ_PROFILE_USE +CFLAGS += $(PROFILE_USE_CFLAGS) +LDFLAGS += $(PROFILE_USE_LDFLAGS) +DLLFLAGS += $(PROFILE_USE_LDFLAGS) +ifeq (WINNT,$(OS_ARCH)) +AR_FLAGS += -LTCG +endif +endif # MOZ_PROFILE_USE +endif # NO_PROFILE_GUIDED_OPTIMIZE + define MAKE_OBJDIR if test ! -d $(@D); then rm -rf $(@D); $(NSINSTALL) -D $(@D); fi endef @@ -162,3 +151,19 @@ RELEASE_DIR = $(MOD_DEPTH)/dist/release/$(MOD_NAME) RELEASE_INCLUDE_DIR = $(RELEASE_DIR)/$(BUILD_NUMBER)/$(OBJDIR_NAME)/include RELEASE_BIN_DIR = $(RELEASE_DIR)/$(BUILD_NUMBER)/$(OBJDIR_NAME)/bin RELEASE_LIB_DIR = $(RELEASE_DIR)/$(BUILD_NUMBER)/$(OBJDIR_NAME)/lib + +# autoconf.mk sets OBJ_SUFFIX to an error to avoid use before including +# this file +OBJ_SUFFIX := $(_OBJ_SUFFIX) + +# PGO builds with GCC build objects with instrumentation in a first pass, +# then objects optimized, without instrumentation, in a second pass. If +# we overwrite the ojects from the first pass with those from the second, +# we end up not getting instrumentation data for better optimization on +# incremental builds. As a consequence, we use a different object suffix +# for the first pass. +ifdef MOZ_PROFILE_GENERATE +ifdef NS_USE_GCC +OBJ_SUFFIX := i_o +endif +endif diff --git a/config/gcc_hidden.h b/config/gcc_hidden.h index 58140c15..075e68c8 100644 --- a/config/gcc_hidden.h +++ b/config/gcc_hidden.h @@ -1,2 +1,6 @@ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + /* Begin all files as hidden visibility */ #pragma GCC visibility push(hidden) diff --git a/config/libc_r.h b/config/libc_r.h index 0f66d127..8f144e35 100644 --- a/config/libc_r.h +++ b/config/libc_r.h @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /* libc_r.h -- macros, defines, etc. to make using reentrant libc calls */ /* a bit easier. This was initially done for AIX pthreads, */ diff --git a/config/make-system-wrappers.pl b/config/make-system-wrappers.pl index 31c9af4a..fa0873a7 100644 --- a/config/make-system-wrappers.pl +++ b/config/make-system-wrappers.pl @@ -1,41 +1,8 @@ #!/usr/bin/perl # -# ***** BEGIN LICENSE BLOCK ***** -# Version: MPL 1.1/GPL 2.0/LGPL 2.1 -# -# The contents of this file are subject to the Mozilla Public License Version -# 1.1 (the "License"); you may not use this file except in compliance with -# the License. You may obtain a copy of the License at -# http://www.mozilla.org/MPL/ -# -# Software distributed under the License is distributed on an "AS IS" basis, -# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License -# for the specific language governing rights and limitations under the -# License. -# -# The Original Code is mozilla.org code. -# -# The Initial Developer of the Original Code is -# IBM Corporation. -# Portions created by the Initial Developer are Copyright (C) 2004 -# the Initial Developer. All Rights Reserved. -# -# Contributor(s): -# Brian Ryner <bryner@brianryner.com> -# -# Alternatively, the contents of this file may be used under the terms of -# either of the GNU General Public License Version 2 or later (the "GPL"), -# or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), -# in which case the provisions of the GPL or the LGPL are applicable instead -# of those above. If you wish to allow use of your version of this file only -# under the terms of either the GPL or the LGPL, and not to allow others to -# use your version of this file under the terms of the MPL, indicate your -# decision by deleting the provisions above and replace them with the notice -# and other provisions required by the GPL or the LGPL. If you do not delete -# the provisions above, a recipient may use your version of this file under -# the terms of any one of the MPL, the GPL or the LGPL. -# -# ***** END LICENSE BLOCK ***** +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. $output_dir = shift; diff --git a/config/nfspwd.pl b/config/nfspwd.pl index 947b822a..1e66be35 100644 --- a/config/nfspwd.pl +++ b/config/nfspwd.pl @@ -1,40 +1,8 @@ #! perl # -# ***** BEGIN LICENSE BLOCK ***** -# Version: MPL 1.1/GPL 2.0/LGPL 2.1 -# -# The contents of this file are subject to the Mozilla Public License Version -# 1.1 (the "License"); you may not use this file except in compliance with -# the License. You may obtain a copy of the License at -# http://www.mozilla.org/MPL/ -# -# Software distributed under the License is distributed on an "AS IS" basis, -# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License -# for the specific language governing rights and limitations under the -# License. -# -# The Original Code is the Netscape Portable Runtime (NSPR). -# -# The Initial Developer of the Original Code is -# Netscape Communications Corporation. -# Portions created by the Initial Developer are Copyright (C) 1998-2000 -# the Initial Developer. All Rights Reserved. -# -# Contributor(s): -# -# Alternatively, the contents of this file may be used under the terms of -# either the GNU General Public License Version 2 or later (the "GPL"), or -# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), -# in which case the provisions of the GPL or the LGPL are applicable instead -# of those above. If you wish to allow use of your version of this file only -# under the terms of either the GPL or the LGPL, and not to allow others to -# use your version of this file under the terms of the MPL, indicate your -# decision by deleting the provisions above and replace them with the notice -# and other provisions required by the GPL or the LGPL. If you do not delete -# the provisions above, a recipient may use your version of this file under -# the terms of any one of the MPL, the GPL or the LGPL. -# -# ***** END LICENSE BLOCK ***** +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. require "fastcwd.pl"; diff --git a/config/now.c b/config/now.c index 3af5f447..165b9244 100644 --- a/config/now.c +++ b/config/now.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include <stdio.h> #include <stdlib.h> diff --git a/config/nsinstall.c b/config/nsinstall.c index f18e1166..022c6f38 100644 --- a/config/nsinstall.c +++ b/config/nsinstall.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /* ** Netscape portable install command. diff --git a/config/nspr-config.in b/config/nspr-config.in index a7d2b4fc..2cb62a0f 100755 --- a/config/nspr-config.in +++ b/config/nspr-config.in @@ -1,4 +1,8 @@ #!/bin/sh +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. + prefix=@prefix@ diff --git a/config/nsprincl.mk.in b/config/nsprincl.mk.in index d56cc024..108ed34d 100644 --- a/config/nsprincl.mk.in +++ b/config/nsprincl.mk.in @@ -1,3 +1,7 @@ +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. + # Include in Makefiles to define NSPR variables NSPR_VERSION = @NSPR_VERSION@ diff --git a/config/nsprincl.sh.in b/config/nsprincl.sh.in index be4e1450..8e7a4273 100644 --- a/config/nsprincl.sh.in +++ b/config/nsprincl.sh.in @@ -1,3 +1,7 @@ +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. + # Include in shell scripts to define NSPR variables NSPR_VERSION=@NSPR_VERSION@ diff --git a/config/pathsub.h b/config/pathsub.h index bf3fca31..136d411e 100644 --- a/config/pathsub.h +++ b/config/pathsub.h @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #ifndef pathsub_h___ #define pathsub_h___ diff --git a/config/prdepend.h b/config/prdepend.h index 55444c40..e49e9267 100644 --- a/config/prdepend.h +++ b/config/prdepend.h @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /* * A dummy header file that is a dependency for all the object files. @@ -42,4 +10,3 @@ */ #error "Do not include this header file." - diff --git a/config/rules.mk b/config/rules.mk index eed1a192..cc017593 100644 --- a/config/rules.mk +++ b/config/rules.mk @@ -1,40 +1,8 @@ #! gmake # -# ***** BEGIN LICENSE BLOCK ***** -# Version: MPL 1.1/GPL 2.0/LGPL 2.1 -# -# The contents of this file are subject to the Mozilla Public License Version -# 1.1 (the "License"); you may not use this file except in compliance with -# the License. You may obtain a copy of the License at -# http://www.mozilla.org/MPL/ -# -# Software distributed under the License is distributed on an "AS IS" basis, -# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License -# for the specific language governing rights and limitations under the -# License. -# -# The Original Code is the Netscape Portable Runtime (NSPR). -# -# The Initial Developer of the Original Code is -# Netscape Communications Corporation. -# Portions created by the Initial Developer are Copyright (C) 1998-2000 -# the Initial Developer. All Rights Reserved. -# -# Contributor(s): -# -# Alternatively, the contents of this file may be used under the terms of -# either the GNU General Public License Version 2 or later (the "GPL"), or -# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), -# in which case the provisions of the GPL or the LGPL are applicable instead -# of those above. If you wish to allow use of your version of this file only -# under the terms of either the GPL or the LGPL, and not to allow others to -# use your version of this file under the terms of the MPL, indicate your -# decision by deleting the provisions above and replace them with the notice -# and other provisions required by the GPL or the LGPL. If you do not delete -# the provisions above, a recipient may use your version of this file under -# the terms of any one of the MPL, the GPL or the LGPL. -# -# ***** END LICENSE BLOCK ***** +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. ################################################################################ # We used to have a 4 pass build process. Now we do everything in one pass. @@ -141,7 +109,7 @@ endif ifndef TARGETS ifeq (,$(filter-out WINNT WINCE OS2,$(OS_ARCH))) TARGETS = $(LIBRARY) $(SHARED_LIBRARY) $(IMPORT_LIBRARY) -ifndef BUILD_OPT +ifdef MOZ_DEBUG_SYMBOLS ifdef MSC_VER ifneq (,$(filter-out 1100 1200,$(MSC_VER))) TARGETS += $(SHARED_LIB_PDB) @@ -166,6 +134,7 @@ endif ALL_TRASH = $(TARGETS) $(OBJS) $(RES) $(filter-out . .., $(OBJDIR)) LOGS TAGS $(GARBAGE) \ $(NOSUCHFILE) \ + $(OBJS:.$(OBJ_SUFFIX)=.i_o) \ so_locations ifndef RELEASE_LIBS_DEST @@ -280,6 +249,13 @@ $(NFSPWD): $(PROGRAM): $(OBJS) @$(MAKE_OBJDIR) ifeq ($(NS_USE_GCC)_$(OS_ARCH),_WINNT) +ifdef MOZ_PROFILE_USE +# In the second pass, we need to merge the pgc files into the pgd file. +# The compiler would do this for us automatically if they were in the right +# place, but they're in dist/bin. + python $(topsrcdir)/build/win32/pgomerge.py \ + $(notdir $(PROGRAM:.exe=)) $(DIST)/bin +endif # MOZ_PROFILE_USE $(CC) $(OBJS) -Fe$@ -link $(LDFLAGS) $(OS_LIBS) $(EXTRA_LIBS) ifdef MT @if test -f $@.manifest; then \ @@ -287,8 +263,13 @@ ifdef MT rm -f $@.manifest; \ fi endif # MSVC with manifest tool +ifdef MOZ_PROFILE_GENERATE +# touch it a few seconds into the future to work around FAT's +# 2-second granularity + touch -t `date +%Y%m%d%H%M.%S -d "now+5seconds"` pgo.relink +endif # MOZ_PROFILE_GENERATE else # WINNT && !GCC - $(CC) -o $@ $(CFLAGS) $(OBJS) $(LDFLAGS) + $(CC) -o $@ $(CFLAGS) $(OBJS) $(LDFLAGS) $(WRAP_LDFLAGS) endif # WINNT && !GCC ifdef ENABLE_STRIP $(STRIP) $@ @@ -306,7 +287,10 @@ $(IMPORT_LIBRARY): $(MAPFILE) $(IMPLIB) $@ $(MAPFILE) else ifeq (,$(filter-out WIN95 WINCE WINMO,$(OS_TARGET))) +# PDBs and import libraries need to depend on the shared library to +# order dependencies properly. $(IMPORT_LIBRARY): $(SHARED_LIBRARY) +$(SHARED_LIB_PDB): $(SHARED_LIBRARY) endif endif @@ -323,6 +307,10 @@ ifeq ($(OS_ARCH)$(OS_RELEASE), AIX4.1) -bM:SRE -bnoentry $(OS_LIBS) $(EXTRA_LIBS) else # AIX 4.1 ifeq ($(NS_USE_GCC)_$(OS_ARCH),_WINNT) +ifdef MOZ_PROFILE_USE + python $(topsrcdir)/build/win32/pgomerge.py \ + $(notdir $(SHARED_LIBRARY:.$(DLL_SUFFIX)=)) $(DIST)/bin +endif # MOZ_PROFILE_USE $(LINK_DLL) -MAP $(DLLBASE) $(DLL_LIBS) $(EXTRA_LIBS) $(OBJS) $(RES) ifdef MT @if test -f $@.manifest; then \ @@ -330,14 +318,58 @@ ifdef MT rm -f $@.manifest; \ fi endif # MSVC with manifest tool +ifdef MOZ_PROFILE_GENERATE + touch -t `date +%Y%m%d%H%M.%S -d "now+5seconds"` pgo.relink +endif # MOZ_PROFILE_GENERATE else # WINNT && !GCC - $(MKSHLIB) $(OBJS) $(RES) $(LDFLAGS) $(EXTRA_LIBS) + $(MKSHLIB) $(OBJS) $(RES) $(LDFLAGS) $(WRAP_LDFLAGS) $(EXTRA_LIBS) endif # WINNT && !GCC endif # AIX 4.1 ifdef ENABLE_STRIP $(STRIP) $@ endif +################################################################################ + +ifdef MOZ_PROFILE_USE +ifeq ($(NS_USE_GCC)_$(OS_ARCH),_WINNT) +# When building with PGO, we have to make sure to re-link +# in the MOZ_PROFILE_USE phase if we linked in the +# MOZ_PROFILE_GENERATE phase. We'll touch this pgo.relink +# file in the link rule in the GENERATE phase to indicate +# that we need a relink. +$(SHARED_LIBRARY): pgo.relink + +$(PROGRAM): pgo.relink + +endif # WINNT && !GCC +endif # MOZ_PROFILE_USE + +ifneq (,$(MOZ_PROFILE_GENERATE)$(MOZ_PROFILE_USE)) +ifdef NS_USE_GCC +# Force rebuilding libraries and programs in both passes because each +# pass uses different object files. +$(PROGRAM) $(SHARED_LIBRARY) $(LIBRARY): FORCE +.PHONY: FORCE +endif +endif + +################################################################################ + +ifdef MOZ_PROFILE_GENERATE +# Clean up profiling data during PROFILE_GENERATE phase +export:: +ifeq ($(OS_ARCH)_$(NS_USE_GCC), WINNT_) + $(foreach pgd,$(wildcard *.pgd),pgomgr -clear $(pgd);) +else +ifdef NS_USE_GCC + -$(RM) *.gcda +endif +endif +endif + +################################################################################ + ifeq ($(OS_ARCH),WINNT) $(RES): $(RESNAME) @$(MAKE_OBJDIR) @@ -460,6 +492,14 @@ $(filter $(OBJDIR)/%.$(OBJ_SUFFIX),$(OBJS)): $(OBJDIR)/%.$(OBJ_SUFFIX): $(DUMMY_ ################################################################################ # +# Disallow parallel builds with MSVC < 8 since it can't open the PDB file in +# parallel. +# +ifeq (,$(filter-out 1200 1300 1310,$(MSC_VER))) +.NOTPARALLEL: +endif + +# # Re-define the list of default suffixes, so gmake won't have to churn through # hundreds of built-in suffix rules for stuff we don't need. # @@ -12,6 +12,20 @@ ac_help= ac_default_prefix=/usr/local # Any additions from configure.in: ac_help="$ac_help + --with-android-ndk=DIR + location where the Android NDK can be found" +ac_help="$ac_help + --with-android-toolchain=DIR + location of the Android toolchain" +ac_help="$ac_help + --with-android-version=VER + Android platform version, default 5" +ac_help="$ac_help + --with-android-platform=DIR + location of platform dir" +ac_help="$ac_help + --with-gonk=DIR location of gonk dir" +ac_help="$ac_help --with-dist-prefix=DIST_PREFIX place build files in DIST_PREFIX [dist]" ac_help="$ac_help @@ -24,10 +38,12 @@ ac_help="$ac_help ac_help="$ac_help --with-mozilla Compile NSPR with Mozilla support" ac_help="$ac_help - --enable-optimize(=val) Enable code optimizations (val, ie. -O2) " + --enable-optimize[=OPT] Enable code optimizations (ie. -O2) " +ac_help="$ac_help + --enable-debug[=DBG] Enable debugging (using compiler flags DBG)" ac_help="$ac_help - --disable-debug Do not compile in debugging symbols - --enable-debug(=val) Enable debugging (debug flags val)" + --enable-debug-symbols[=DBG] Enable debugging symbols + (using compiler flags DBG)" ac_help="$ac_help --enable-win32-target=\$t Specify win32 flavor. (WIN95 or WINNT)" @@ -56,9 +72,32 @@ ac_help="$ac_help ac_help="$ac_help --disable-os2-high-mem Disable high-memory support on OS/2" ac_help="$ac_help +" +ac_help="$ac_help + --with-thumb[[=yes|no|toolchain-default]] + Use Thumb instruction set (-mthumb)" +ac_help="$ac_help + --with-thumb-interwork[[=yes|no|toolchain-default]] + Use Thumb/ARM instuctions interwork (-mthumb-interwork)" +ac_help="$ac_help + --with-arch=[[type|toolchain-default]] + Use specific CPU features (-march=type)" +ac_help="$ac_help + --with-fpu=[[type|toolchain-default]] + Use specific FPU type (-mfpu=type)" +ac_help="$ac_help + --with-float-abi=[[type|toolchain-default]] + Use specific arm float ABI (-mfloat-abi=type)" +ac_help="$ac_help + --with-soft-float[[=yes|no|toolchain-default]] + Use soft float library (-msoft-float)" +ac_help="$ac_help --with-symbian-sdk=SYMBIAN_SDK_DIR The path to the Symbian SDK" ac_help="$ac_help + --with-ccache[=path/to/ccache] + Enable compiling with ccache" +ac_help="$ac_help --enable-strip Enable stripping of shared libs and programs" ac_help="$ac_help --with-pthreads Use system pthreads library as thread subsystem" @@ -72,7 +111,9 @@ ac_help="$ac_help ac_help="$ac_help --enable-ipv6 Compile ipv6 support" ac_help="$ac_help - --enable-boehm Enable the Boehm Garbage Collector" + --enable-wrap-malloc Wrap malloc calls (gnu linker only)" +ac_help="$ac_help + --with-wrap-malloc=SHAREDLIB Location of malloc wrapper library" # Initialize some variables set by options. # The variables have the same names as the options, with @@ -631,7 +672,7 @@ else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; } fi echo $ac_n "checking host system type""... $ac_c" 1>&6 -echo "configure:635: checking host system type" >&5 +echo "configure:676: checking host system type" >&5 host_alias=$host case "$host_alias" in @@ -652,7 +693,7 @@ host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` echo "$ac_t""$host" 1>&6 echo $ac_n "checking target system type""... $ac_c" 1>&6 -echo "configure:656: checking target system type" >&5 +echo "configure:697: checking target system type" >&5 target_alias=$target case "$target_alias" in @@ -670,7 +711,7 @@ target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` echo "$ac_t""$target" 1>&6 echo $ac_n "checking build system type""... $ac_c" 1>&6 -echo "configure:674: checking build system type" >&5 +echo "configure:715: checking build system type" >&5 build_alias=$build case "$build_alias" in @@ -694,8 +735,8 @@ test "$host_alias" != "$target_alias" && MOD_MAJOR_VERSION=4 -MOD_MINOR_VERSION=8 -MOD_PATCH_VERSION=4 +MOD_MINOR_VERSION=9 +MOD_PATCH_VERSION=3 NSPR_MODNAME=nspr20 _HAVE_PTHREADS= USE_PTHREADS= @@ -723,6 +764,10 @@ MACOS_SDK_DIR= NEXT_ROOT= MT= MOZ_OS2_HIGH_MEMORY=1 +PROFILE_GEN_CFLAGS= +PROFILE_GEN_LDFLAGS= +PROFILE_USE_CFLAGS= +PROFILE_USE_LDFLAGS= RESOLVE_LINK_SYMBOLS= @@ -742,7 +787,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:746: checking for $ac_word" >&5 +echo "configure:791: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -797,6 +842,176 @@ if test -n "$_WIN32_MSVC"; then SKIP_LIBRARY_CHECKS=1 fi + +# Check whether --with-android-ndk or --without-android-ndk was given. +if test "${with_android_ndk+set}" = set; then + withval="$with_android_ndk" + android_ndk=$withval +fi + + +# Check whether --with-android-toolchain or --without-android-toolchain was given. +if test "${with_android_toolchain+set}" = set; then + withval="$with_android_toolchain" + android_toolchain=$withval +fi + + +# Check whether --with-android-version or --without-android-version was given. +if test "${with_android_version+set}" = set; then + withval="$with_android_version" + android_version=$withval +else + android_version=5 +fi + + +# Check whether --with-android-platform or --without-android-platform was given. +if test "${with_android_platform+set}" = set; then + withval="$with_android_platform" + android_platform=$withval +fi + + +case "$target" in +arm-linux*-android*|*-linuxandroid*) + android_tool_prefix="arm-linux-androideabi" + ;; +i?86-*android*) + android_tool_prefix="i686-android-linux" + ;; +mipsel-*android*) + android_tool_prefix="mipsel-linux-android" + ;; +*) + android_tool_prefix="$target_os" + ;; +esac + + +# Check whether --with-gonk or --without-gonk was given. +if test "${with_gonk+set}" = set; then + withval="$with_gonk" + gonkdir=$withval +fi + + +if test -n "$gonkdir" ; then + + if test -z "$HOST_CPPFLAGS" ; then + HOST_CPPFLAGS=" " + fi + if test -z "$HOST_CFLAGS" ; then + HOST_CFLAGS=" " + fi + if test -z "$HOST_CXXFLAGS" ; then + HOST_CXXFLAGS=" " + fi + if test -z "$HOST_LDFLAGS" ; then + HOST_LDFLAGS=" " + fi + + cat >> confdefs.h <<\EOF +#define ANDROID 1 +EOF + +else +case "$target" in +*-android*|*-linuxandroid*) + if test -z "$android_ndk" ; then + { echo "configure: error: You must specify --with-android-ndk=/path/to/ndk when targeting Android." 1>&2; exit 1; } + fi + + if test -z "$android_toolchain" ; then + echo $ac_n "checking for android toolchain directory""... $ac_c" 1>&6 +echo "configure:928: checking for android toolchain directory" >&5 + + kernel_name=`uname -s | tr "[:upper:]" "[:lower:]"` + + case "$target_cpu" in + arm) + target_name=arm-linux-androideabi-4.4.3 + ;; + i?86) + target_name=x86-4.4.3 + ;; + mipsel) + target_name=mipsel-linux-android-4.4.3 + ;; + esac + android_toolchain="$android_ndk"/toolchains/$target_name/prebuilt/$kernel_name-x86 + + if test -d "$android_toolchain" ; then + echo "$ac_t""$android_toolchain" 1>&6 + else + { echo "configure: error: not found. You have to specify --with-android-toolchain=/path/to/ndk/toolchain." 1>&2; exit 1; } + fi + fi + + if test -z "$android_platform" ; then + echo $ac_n "checking for android platform directory""... $ac_c" 1>&6 +echo "configure:954: checking for android platform directory" >&5 + + case "$target_cpu" in + arm) + target_name=arm + ;; + i?86) + target_name=x86 + ;; + mipsel) + target_name=mips + ;; + esac + + android_platform="$android_ndk"/platforms/android-"$android_version"/arch-"$target_name" + + if test -d "$android_platform" ; then + echo "$ac_t""$android_platform" 1>&6 + else + { echo "configure: error: not found. You have to specify --with-android-platform=/path/to/ndk/platform." 1>&2; exit 1; } + fi + fi + + AS="$android_toolchain"/bin/"$android_tool_prefix"-as + CC="$android_toolchain"/bin/"$android_tool_prefix"-gcc + CXX="$android_toolchain"/bin/"$android_tool_prefix"-g++ + CPP="$android_toolchain"/bin/"$android_tool_prefix"-cpp + LD="$android_toolchain"/bin/"$android_tool_prefix"-ld + AR="$android_toolchain"/bin/"$android_tool_prefix"-ar + RANLIB="$android_toolchain"/bin/"$android_tool_prefix"-ranlib + STRIP="$android_toolchain"/bin/"$android_tool_prefix"-strip + + CPPFLAGS="-I$android_platform/usr/include $CPPFLAGS" + CFLAGS="-mandroid -I$android_platform/usr/include -fno-short-enums -fno-exceptions $CFLAGS" + CXXFLAGS="-mandroid -I$android_platform/usr/include -fpic -fno-short-enums -fno-exceptions $CXXFLAGS" + LDFLAGS="-mandroid -L$android_platform/usr/lib -Wl,-rpath-link=$android_platform/usr/lib --sysroot=$android_platform $LDFLAGS" + + if test -z "$HOST_CPPFLAGS" ; then + HOST_CPPFLAGS=" " + fi + if test -z "$HOST_CFLAGS" ; then + HOST_CFLAGS=" " + fi + if test -z "$HOST_CXXFLAGS" ; then + HOST_CXXFLAGS=" " + fi + if test -z "$HOST_LDFLAGS" ; then + HOST_LDFLAGS=" " + fi + + cat >> confdefs.h <<\EOF +#define ANDROID 1 +EOF + + cat >> confdefs.h <<EOF +#define ANDROID_VERSION $android_version +EOF + + ;; +esac +fi + dist_prefix='${MOD_DEPTH}/dist' dist_bindir='${dist_prefix}/bin' dist_includedir='${dist_prefix}/include/nspr' @@ -864,29 +1079,51 @@ fi if test "${enable_optimize+set}" = set; then enableval="$enable_optimize" if test "$enableval" != "no"; then - MOZ_OPTIMIZE=1 - if test -n "$enableval" && test "$enableval" != "yes"; then - _OPTIMIZE_FLAGS=`echo $enableval | sed -e 's|\\\ | |g'` + MOZ_OPTIMIZE=1 + if test -n "$enableval" -a "$enableval" != "yes"; then + _OPTIMIZE_FLAGS=`echo $enableval | sed -e 's|\\\ | |g'` _SAVE_OPTIMIZE_FLAGS=$_OPTIMIZE_FLAGS - fi + fi else - MOZ_OPTIMIZE= - fi + MOZ_OPTIMIZE= + fi fi # Check whether --enable-debug or --disable-debug was given. if test "${enable_debug+set}" = set; then enableval="$enable_debug" - if test "$enableval" = "no"; then - MOZ_DEBUG= - else - MOZ_DEBUG=1 - if test -n "$enableval" && test "$enableval" != "yes"; then - _DEBUG_FLAGS=`echo $enableval | sed -e 's|\\\ | |g'` - _SAVE_DEBUG_FLAGS=$_DEBUG_FLAGS - fi - fi + if test "$enableval" != "no"; then + MOZ_DEBUG=1 + MOZ_DEBUG_SYMBOLS=1 + if test -n "$enableval" -a "$enableval" != "yes"; then + _DEBUG_FLAGS=`echo $enableval | sed -e 's|\\\ | |g'` + _SAVE_DEBUG_FLAGS=$_DEBUG_FLAGS + fi + else + MOZ_DEBUG= + fi +else + MOZ_DEBUG_SYMBOLS=1 +fi + + +# Check whether --enable-debug-symbols or --disable-debug-symbols was given. +if test "${enable_debug_symbols+set}" = set; then + enableval="$enable_debug_symbols" + if test "$enableval" != "no"; then + MOZ_DEBUG_SYMBOLS=1 + if test -n "$enableval" -a "$enableval" != "yes"; then + if test -z "$_SAVE_DEBUG_FLAGS"; then + _DEBUG_FLAGS=`echo $enableval | sed -e 's|\\\ | |g'` + _SAVE_DEBUG_FLAGS=$_DEBUG_FLAGS + else + { echo "configure: error: --enable-debug-symbols flags cannot be used with --enable-debug flags" 1>&2; exit 1; } + fi + fi + else + MOZ_DEBUG_SYMBOLS= + fi fi @@ -1067,7 +1304,7 @@ if test -z "$SKIP_PATH_CHECKS"; then # Extract the first word of "$WHOAMI whoami", so it can be a program name with args. set dummy $WHOAMI whoami; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1071: checking for $ac_word" >&5 +echo "configure:1308: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_WHOAMI'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1129,7 +1366,8 @@ EOF fi if test -z "$SKIP_COMPILER_CHECKS"; then -if test "$target" != "$host"; then + +if test "$target" != "$host" -o -n "$CROSS_COMPILE"; then echo "cross compiling from $host to $target" cross_compiling=yes @@ -1138,13 +1376,13 @@ if test "$target" != "$host"; then _SAVE_LDFLAGS="$LDFLAGS" echo $ac_n "checking for $host compiler""... $ac_c" 1>&6 -echo "configure:1142: checking for $host compiler" >&5 +echo "configure:1380: checking for $host compiler" >&5 for ac_prog in $HOST_CC gcc cc /usr/ucb/cc do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1148: checking for $ac_word" >&5 +echo "configure:1386: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_HOST_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1190,16 +1428,16 @@ test -n "$HOST_CC" || HOST_CC="""" LDFLAGS="$HOST_LDFLAGS" echo $ac_n "checking whether the $host compiler ($HOST_CC $HOST_CFLAGS $HOST_LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:1194: checking whether the $host compiler ($HOST_CC $HOST_CFLAGS $HOST_LDFLAGS) works" >&5 +echo "configure:1432: checking whether the $host compiler ($HOST_CC $HOST_CFLAGS $HOST_LDFLAGS) works" >&5 cat > conftest.$ac_ext <<EOF -#line 1196 "configure" +#line 1434 "configure" #include "confdefs.h" int main() { return(0); ; return 0; } EOF -if { (eval echo configure:1203: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1441: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_prog_host_cc_works=1 echo "$ac_t""yes" 1>&6 else @@ -1217,18 +1455,24 @@ rm -f conftest* case "$build:$target" in powerpc-apple-darwin8*:i?86-apple-darwin*) _SAVE_CFLAGS=$CFLAGS - _SAVE_CXXFLAGS=$CXXLAGS + _SAVE_CXXFLAGS=$CXXFLAGS CFLAGS="-isysroot /Developer/SDKs/MacOSX10.4u.sdk $CFLAGS" CXXFLAGS="-isysroot /Developer/SDKs/MacOSX10.4u.sdk $CXXFLAGS" - ;; - esac + ;; + *:arm*-apple-darwin*) + _SAVE_CFLAGS=$CFLAGS + _SAVE_CXXFLAGS=$CXXFLAGS + CFLAGS="-isysroot $MACOS_SDK_DIR $CFLAGS" + CXXFLAGS="-isysroot $MACOS_SDK_DIR $CXXFLAGS" + ;; + esac for ac_prog in $CC "${target_alias}-gcc" "${target}-gcc" do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1232: checking for $ac_word" >&5 +echo "configure:1476: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1262,7 +1506,7 @@ test -n "$CC" || CC="echo" # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1266: checking for $ac_word" >&5 +echo "configure:1510: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1292,7 +1536,7 @@ if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1296: checking for $ac_word" >&5 +echo "configure:1540: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1343,7 +1587,7 @@ fi # Extract the first word of "cl", so it can be a program name with args. set dummy cl; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1347: checking for $ac_word" >&5 +echo "configure:1591: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1375,7 +1619,7 @@ fi fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:1379: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 +echo "configure:1623: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 ac_ext=c # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. @@ -1386,12 +1630,12 @@ cross_compiling=$ac_cv_prog_cc_cross cat > conftest.$ac_ext << EOF -#line 1390 "configure" +#line 1634 "configure" #include "confdefs.h" main(){return(0);} EOF -if { (eval echo configure:1395: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1639: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ac_cv_prog_cc_works=yes # If we can't run a trivial program, we are probably using a cross compiler. if (./conftest; exit) 2>/dev/null; then @@ -1417,12 +1661,12 @@ if test $ac_cv_prog_cc_works = no; then { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:1421: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:1665: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 cross_compiling=$ac_cv_prog_cc_cross echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 -echo "configure:1426: checking whether we are using GNU C" >&5 +echo "configure:1670: checking whether we are using GNU C" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1431,7 +1675,7 @@ else yes; #endif EOF -if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1435: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then +if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1679: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gcc=yes else ac_cv_prog_gcc=no @@ -1450,7 +1694,7 @@ ac_test_CFLAGS="${CFLAGS+set}" ac_save_CFLAGS="$CFLAGS" CFLAGS= echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 -echo "configure:1454: checking whether ${CC-cc} accepts -g" >&5 +echo "configure:1698: checking whether ${CC-cc} accepts -g" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1487,7 +1731,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1491: checking for $ac_word" >&5 +echo "configure:1735: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1523,7 +1767,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1527: checking for $ac_word" >&5 +echo "configure:1771: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1555,7 +1799,7 @@ test -n "$CXX" || CXX="gcc" echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:1559: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5 +echo "configure:1803: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5 ac_ext=C # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. @@ -1566,12 +1810,12 @@ cross_compiling=$ac_cv_prog_cxx_cross cat > conftest.$ac_ext << EOF -#line 1570 "configure" +#line 1814 "configure" #include "confdefs.h" int main(){return(0);} EOF -if { (eval echo configure:1575: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1819: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ac_cv_prog_cxx_works=yes # If we can't run a trivial program, we are probably using a cross compiler. if (./conftest; exit) 2>/dev/null; then @@ -1597,12 +1841,12 @@ if test $ac_cv_prog_cxx_works = no; then { echo "configure: error: installation or configuration problem: C++ compiler cannot create executables." 1>&2; exit 1; } fi echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:1601: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:1845: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5 echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6 cross_compiling=$ac_cv_prog_cxx_cross echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6 -echo "configure:1606: checking whether we are using GNU C++" >&5 +echo "configure:1850: checking whether we are using GNU C++" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gxx'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1611,7 +1855,7 @@ else yes; #endif EOF -if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:1615: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then +if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:1859: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gxx=yes else ac_cv_prog_gxx=no @@ -1630,7 +1874,7 @@ ac_test_CXXFLAGS="${CXXFLAGS+set}" ac_save_CXXFLAGS="$CXXFLAGS" CXXFLAGS= echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6 -echo "configure:1634: checking whether ${CXX-g++} accepts -g" >&5 +echo "configure:1878: checking whether ${CXX-g++} accepts -g" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cxx_g'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1664,7 +1908,7 @@ fi fi case "$build:$target" in - powerpc-apple-darwin8*:i?86-apple-darwin*) + powerpc-apple-darwin8*:i?86-apple-darwin*|*:arm*-apple-darwin*) CFLAGS=$_SAVE_CFLAGS CXXFLAGS=$_SAVE_CXXFLAGS ;; @@ -1675,7 +1919,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1679: checking for $ac_word" >&5 +echo "configure:1923: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1710,7 +1954,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1714: checking for $ac_word" >&5 +echo "configure:1958: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1745,7 +1989,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1749: checking for $ac_word" >&5 +echo "configure:1993: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_AS'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1780,7 +2024,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1784: checking for $ac_word" >&5 +echo "configure:2028: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_LD'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1815,7 +2059,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1819: checking for $ac_word" >&5 +echo "configure:2063: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1850,7 +2094,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1854: checking for $ac_word" >&5 +echo "configure:2098: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_WINDRES'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1885,7 +2129,7 @@ else # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1889: checking for $ac_word" >&5 +echo "configure:2133: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1915,7 +2159,7 @@ if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1919: checking for $ac_word" >&5 +echo "configure:2163: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1966,7 +2210,7 @@ fi # Extract the first word of "cl", so it can be a program name with args. set dummy cl; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1970: checking for $ac_word" >&5 +echo "configure:2214: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1998,7 +2242,7 @@ fi fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:2002: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 +echo "configure:2246: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 ac_ext=c # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. @@ -2009,12 +2253,12 @@ cross_compiling=$ac_cv_prog_cc_cross cat > conftest.$ac_ext << EOF -#line 2013 "configure" +#line 2257 "configure" #include "confdefs.h" main(){return(0);} EOF -if { (eval echo configure:2018: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2262: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ac_cv_prog_cc_works=yes # If we can't run a trivial program, we are probably using a cross compiler. if (./conftest; exit) 2>/dev/null; then @@ -2040,12 +2284,12 @@ if test $ac_cv_prog_cc_works = no; then { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:2044: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:2288: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 cross_compiling=$ac_cv_prog_cc_cross echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 -echo "configure:2049: checking whether we are using GNU C" >&5 +echo "configure:2293: checking whether we are using GNU C" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2054,7 +2298,7 @@ else yes; #endif EOF -if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2058: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then +if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2302: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gcc=yes else ac_cv_prog_gcc=no @@ -2073,7 +2317,7 @@ ac_test_CFLAGS="${CFLAGS+set}" ac_save_CFLAGS="$CFLAGS" CFLAGS= echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 -echo "configure:2077: checking whether ${CC-cc} accepts -g" >&5 +echo "configure:2321: checking whether ${CC-cc} accepts -g" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2113,7 +2357,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2117: checking for $ac_word" >&5 +echo "configure:2361: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2145,7 +2389,7 @@ test -n "$CXX" || CXX="gcc" echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:2149: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5 +echo "configure:2393: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5 ac_ext=C # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. @@ -2156,12 +2400,12 @@ cross_compiling=$ac_cv_prog_cxx_cross cat > conftest.$ac_ext << EOF -#line 2160 "configure" +#line 2404 "configure" #include "confdefs.h" int main(){return(0);} EOF -if { (eval echo configure:2165: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2409: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ac_cv_prog_cxx_works=yes # If we can't run a trivial program, we are probably using a cross compiler. if (./conftest; exit) 2>/dev/null; then @@ -2187,12 +2431,12 @@ if test $ac_cv_prog_cxx_works = no; then { echo "configure: error: installation or configuration problem: C++ compiler cannot create executables." 1>&2; exit 1; } fi echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:2191: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:2435: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5 echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6 cross_compiling=$ac_cv_prog_cxx_cross echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6 -echo "configure:2196: checking whether we are using GNU C++" >&5 +echo "configure:2440: checking whether we are using GNU C++" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gxx'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2201,7 +2445,7 @@ else yes; #endif EOF -if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:2205: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then +if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:2449: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gxx=yes else ac_cv_prog_gxx=no @@ -2220,7 +2464,7 @@ ac_test_CXXFLAGS="${CXXFLAGS+set}" ac_save_CXXFLAGS="$CXXFLAGS" CXXFLAGS= echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6 -echo "configure:2224: checking whether ${CXX-g++} accepts -g" >&5 +echo "configure:2468: checking whether ${CXX-g++} accepts -g" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cxx_g'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2254,7 +2498,7 @@ fi fi fi echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 -echo "configure:2258: checking how to run the C preprocessor" >&5 +echo "configure:2502: checking how to run the C preprocessor" >&5 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= @@ -2269,13 +2513,13 @@ else # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. cat > conftest.$ac_ext <<EOF -#line 2273 "configure" +#line 2517 "configure" #include "confdefs.h" #include <assert.h> Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2279: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2523: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -2286,13 +2530,13 @@ else rm -rf conftest* CPP="${CC-cc} -E -traditional-cpp" cat > conftest.$ac_ext <<EOF -#line 2290 "configure" +#line 2534 "configure" #include "confdefs.h" #include <assert.h> Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2296: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2540: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -2303,13 +2547,13 @@ else rm -rf conftest* CPP="${CC-cc} -nologo -E" cat > conftest.$ac_ext <<EOF -#line 2307 "configure" +#line 2551 "configure" #include "confdefs.h" #include <assert.h> Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2313: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2557: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -2336,7 +2580,7 @@ echo "$ac_t""$CPP" 1>&6 # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2340: checking for $ac_word" >&5 +echo "configure:2584: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2368,7 +2612,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2372: checking for $ac_word" >&5 +echo "configure:2616: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_AS'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2409,7 +2653,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2413: checking for $ac_word" >&5 +echo "configure:2657: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_AR'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2450,7 +2694,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2454: checking for $ac_word" >&5 +echo "configure:2698: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_LD'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2491,7 +2735,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2495: checking for $ac_word" >&5 +echo "configure:2739: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_STRIP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2532,7 +2776,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2536: checking for $ac_word" >&5 +echo "configure:2780: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_WINDRES'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2600,7 +2844,7 @@ else fi echo $ac_n "checking for gcc -pipe support""... $ac_c" 1>&6 -echo "configure:2604: checking for gcc -pipe support" >&5 +echo "configure:2848: checking for gcc -pipe support" >&5 if test -n "$GNU_CC" && test -n "$GNU_CXX" && test -n "$GNU_AS"; then echo '#include <stdio.h>' > dummy-hello.c echo 'int main() { printf("Hello World\n"); return 0; }' >> dummy-hello.c @@ -2615,14 +2859,14 @@ if test -n "$GNU_CC" && test -n "$GNU_CXX" && test -n "$GNU_AS"; then _SAVE_CFLAGS=$CFLAGS CFLAGS="$CFLAGS -pipe" cat > conftest.$ac_ext <<EOF -#line 2619 "configure" +#line 2863 "configure" #include "confdefs.h" #include <stdio.h> int main() { printf("Hello World\n"); ; return 0; } EOF -if { (eval echo configure:2626: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2870: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* _res_gcc_pipe="yes" else @@ -2647,9 +2891,44 @@ else echo "$ac_t""no" 1>&6 fi + +_SAVE_CFLAGS="$CFLAGS" +CFLAGS="$CFLAGS -fprofile-generate -fprofile-correction" + +echo $ac_n "checking whether C compiler supports -fprofile-generate""... $ac_c" 1>&6 +echo "configure:2900: checking whether C compiler supports -fprofile-generate" >&5 +cat > conftest.$ac_ext <<EOF +#line 2902 "configure" +#include "confdefs.h" + +int main() { +return 0; +; return 0; } +EOF +if { (eval echo configure:2909: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + PROFILE_GEN_CFLAGS="-fprofile-generate" + result="yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + result="no" +fi +rm -f conftest* +echo "$ac_t""$result" 1>&6 + +if test $result = "yes"; then + PROFILE_GEN_LDFLAGS="-fprofile-generate" + PROFILE_USE_CFLAGS="-fprofile-use -fprofile-correction -Wcoverage-mismatch" + PROFILE_USE_LDFLAGS="-fprofile-use" +fi + +CFLAGS="$_SAVE_CFLAGS" + if test "$GNU_CC"; then echo $ac_n "checking for visibility(hidden) attribute""... $ac_c" 1>&6 -echo "configure:2653: checking for visibility(hidden) attribute" >&5 +echo "configure:2932: checking for visibility(hidden) attribute" >&5 if eval "test \"`echo '$''{'ac_cv_visibility_hidden'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2673,7 +2952,7 @@ echo "$ac_t""$ac_cv_visibility_hidden" 1>&6 EOF echo $ac_n "checking for visibility pragma support""... $ac_c" 1>&6 -echo "configure:2677: checking for visibility pragma support" >&5 +echo "configure:2956: checking for visibility pragma support" >&5 if eval "test \"`echo '$''{'ac_cv_visibility_pragma'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2726,7 +3005,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2730: checking for $ac_word" >&5 +echo "configure:3009: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_PERL'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2938,6 +3217,213 @@ if test "${enable_os2_high_mem+set}" = set; then fi + +case "$target" in +arm*-android*|arm*-linuxandroid*) + MOZ_THUMB=yes + MOZ_ARCH=armv7-a + MOZ_FPU=vfp + MOZ_FLOAT_ABI=softfp + MOZ_SOFT_FLOAT=yes + ;; +arm*-*) + if test -n "$MOZ_PLATFORM_MAEMO"; then + MOZ_THUMB=no + MOZ_ARCH=armv7-a + MOZ_FLOAT_ABI=softfp + fi + if test "$MOZ_PLATFORM_MAEMO" = 6; then + MOZ_THUMB=yes + fi + ;; +esac + +# Check whether --enable-thumb2 or --disable-thumb2 was given. +if test "${enable_thumb2+set}" = set; then + enableval="$enable_thumb2" + MOZ_THUMB=$enableval +fi + + +# Check whether --with-thumb or --without-thumb was given. +if test "${with_thumb+set}" = set; then + withval="$with_thumb" + if test -z "$GNU_CC"; then + { echo "configure: error: --with-thumb is not supported on non-GNU toolchain-defaults" 1>&2; exit 1; } + fi + MOZ_THUMB=$withval +fi + + +# Check whether --with-thumb-interwork or --without-thumb-interwork was given. +if test "${with_thumb_interwork+set}" = set; then + withval="$with_thumb_interwork" + if test -z "$GNU_CC"; then + { echo "configure: error: --with-thumb-interwork is not supported on non-GNU toolchain-defaults" 1>&2; exit 1; } + fi + MOZ_THUMB_INTERWORK=$withval +fi + + +# Check whether --with-arch or --without-arch was given. +if test "${with_arch+set}" = set; then + withval="$with_arch" + if test -z "$GNU_CC"; then + { echo "configure: error: --with-arch is not supported on non-GNU toolchain-defaults" 1>&2; exit 1; } + fi + MOZ_ARCH=$withval +fi + + +# Check whether --with-fpu or --without-fpu was given. +if test "${with_fpu+set}" = set; then + withval="$with_fpu" + if test -z "$GNU_CC"; then + { echo "configure: error: --with-fpu is not supported on non-GNU toolchain-defaults" 1>&2; exit 1; } + fi + MOZ_FPU=$withval +fi + + +# Check whether --with-float-abi or --without-float-abi was given. +if test "${with_float_abi+set}" = set; then + withval="$with_float_abi" + if test -z "$GNU_CC"; then + { echo "configure: error: --with-float-abi is not supported on non-GNU toolchain-defaults" 1>&2; exit 1; } + fi + MOZ_FLOAT_ABI=$withval +fi + + +# Check whether --with-soft-float or --without-soft-float was given. +if test "${with_soft_float+set}" = set; then + withval="$with_soft_float" + if test -z "$GNU_CC"; then + { echo "configure: error: --with-soft-float is not supported on non-GNU toolchain-defaults" 1>&2; exit 1; } + fi + MOZ_SOFT_FLOAT=$withval +fi + + +case "$MOZ_ARCH" in +toolchain-default|"") + arch_flag="" + ;; +*) + arch_flag="-march=$MOZ_ARCH" + ;; +esac + +case "$MOZ_THUMB" in +yes) + MOZ_THUMB2=1 + thumb_flag="-mthumb" + ;; +no) + MOZ_THUMB2= + thumb_flag="-marm" + ;; +*) + _SAVE_CFLAGS="$CFLAGS" + CFLAGS="$arch_flag" + cat > conftest.$ac_ext <<EOF +#line 3331 "configure" +#include "confdefs.h" + +int main() { +return sizeof(__thumb2__); +; return 0; } +EOF +if { (eval echo configure:3338: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + MOZ_THUMB2=1 +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + MOZ_THUMB2= +fi +rm -f conftest* + CFLAGS="$_SAVE_CFLAGS" + thumb_flag="" + ;; +esac + +case "$MOZ_THUMB_INTERWORK" in +yes) + thumb_interwork_flag="-mthumb-interwork" + ;; +no) + thumb_interwork_flag="-mno-thumb-interwork" + ;; +*) # toolchain-default + thumb_interwork_flag="" + ;; +esac + +case "$MOZ_FPU" in +toolchain-default|"") + fpu_flag="" + ;; +*) + fpu_flag="-mfpu=$MOZ_FPU" + ;; +esac + +case "$MOZ_FLOAT_ABI" in +toolchain-default|"") + float_abi_flag="" + ;; +*) + float_abi_flag="-mfloat-abi=$MOZ_FLOAT_ABI" + ;; +esac + +case "$MOZ_SOFT_FLOAT" in +yes) + soft_float_flag="-msoft-float" + ;; +no) + soft_float_flag="-mno-soft-float" + ;; +*) # toolchain-default + soft_float_flag="" + ;; +esac + +all_flags=`echo $arch_flag $thumb_flag $thumb_interwork_flag $fpu_flag $float_abi_flag $soft_float_flag` +if test -n "$all_flags"; then + _SAVE_CFLAGS="$CFLAGS" + CFLAGS="$all_flags" + echo $ac_n "checking whether the chosen combination of compiler flags ($all_flags) works""... $ac_c" 1>&6 +echo "configure:3400: checking whether the chosen combination of compiler flags ($all_flags) works" >&5 + cat > conftest.$ac_ext <<EOF +#line 3402 "configure" +#include "confdefs.h" + +int main() { +return 0; +; return 0; } +EOF +if { (eval echo configure:3409: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + echo "$ac_t""yes" 1>&6 +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + { echo "configure: error: no" 1>&2; exit 1; } +fi +rm -f conftest* + + CFLAGS="$_SAVE_CFLAGS $all_flags" + CXXFLAGS="$CXXFLAGS $all_flags" + ASFLAGS="$ASFLAGS $all_flags" + if test -n "$thumb_flag"; then + LDFLAGS="$LDFLAGS $thumb_flag" + fi +fi + case "$host" in *-mingw*) NSINSTALL=nsinstall @@ -2976,17 +3462,17 @@ EOF DSO_LDOPTS='-brtl -bnortllib -bM:SRE -bnoentry -bexpall -blibpath:/usr/lib:/lib' ac_safe=`echo "sys/atomic_op.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for sys/atomic_op.h""... $ac_c" 1>&6 -echo "configure:2980: checking for sys/atomic_op.h" >&5 +echo "configure:3466: checking for sys/atomic_op.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 2985 "configure" +#line 3471 "configure" #include "confdefs.h" #include <sys/atomic_op.h> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2990: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3476: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -3143,7 +3629,7 @@ EOF _DEBUG_FLAGS='-gdwarf-2 -O0' MKSHLIB='$(CCC) $(DSO_LDOPTS) -o $@' echo $ac_n "checking for gethostbyaddr in -lbind""... $ac_c" 1>&6 -echo "configure:3147: checking for gethostbyaddr in -lbind" >&5 +echo "configure:3633: checking for gethostbyaddr in -lbind" >&5 ac_lib_var=`echo bind'_'gethostbyaddr | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3151,7 +3637,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lbind $LIBS" cat > conftest.$ac_ext <<EOF -#line 3155 "configure" +#line 3641 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -3162,7 +3648,7 @@ int main() { gethostbyaddr() ; return 0; } EOF -if { (eval echo configure:3166: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3652: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3349,18 +3835,59 @@ EOF AS='$(CC) -x assembler-with-cpp' CFLAGS="$CFLAGS -Wall -fno-common" case "${target_cpu}" in + arm*) + CPU_ARCH=arm + ;; i*86*) if test -n "$USE_64"; then CPU_ARCH=x86_64 - CC="$CC -arch x86_64" else CPU_ARCH=i386 fi ;; + x86_64) + CPU_ARCH=x86_64 + ;; *) CPU_ARCH=ppc ;; esac + if test "`echo $CC | grep -c '\-arch '`" = "0"; then + CC="$CC -arch $CPU_ARCH" + fi + ac_safe=`echo "crt_externs.h" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for crt_externs.h""... $ac_c" 1>&6 +echo "configure:3861: checking for crt_externs.h" >&5 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 3866 "configure" +#include "confdefs.h" +#include <crt_externs.h> +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:3871: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + : +else + echo "$ac_t""no" 1>&6 +fi + DSO_CFLAGS=-fPIC DSO_LDOPTS='-dynamiclib -compatibility_version 1 -current_version 1 -all_load -install_name @executable_path/$@ -headerpad_max_install_names' _OPTIMIZE_FLAGS=-O2 @@ -3575,6 +4102,7 @@ EOF DSO_CFLAGS=+Z else DSO_CFLAGS=-fPIC + ASFLAGS="$ASFLAGS -x assembler-with-cpp" fi if test -n "$MOZILLA_CLIENT"; then @@ -3869,7 +4397,7 @@ EOF esac ;; -*-linux*|*-gnu*|*-k*bsd*-gnu) +*-linux*|*-gnu*|*-k*bsd*-gnu|*-android*|*-linuxandroid*) if test -z "$USE_NSPR_THREADS"; then USE_PTHREADS=1 IMPL_STRATEGY=_PTH @@ -3886,8 +4414,15 @@ EOF #define HAVE_FCNTL_FILE_LOCKING 1 EOF - case "${target_os}" in - linux*) + case "${target}" in + *-android*|*-linuxandroid*) + OS_TARGET=Android + cat >> confdefs.h <<\EOF +#define LINUX 1 +EOF + + ;; + *-linux*) cat >> confdefs.h <<\EOF #define LINUX 1 EOF @@ -3980,8 +4515,8 @@ EOF RESOLVE_LINK_SYMBOLS=1 if test -n "$GNU_CC"; then - CC="$CC -mno-cygwin" - CXX="$CXX -mno-cygwin" + CC="$CC -mwindows" + CXX="$CXX -mwindows" DLL_SUFFIX=dll MKSHLIB='$(CC) -shared -Wl,--export-all-symbols -Wl,--out-implib -Wl,$(IMPORT_LIBRARY) $(DLLBASE) -o $(subst $(OBJDIR)/,,$(SHARED_LIBRARY))' RC=$WINDRES @@ -4002,11 +4537,46 @@ EOF DLL_SUFFIX=dll # Determine compiler version - CC_VERSION=`"${CC}" -v 2>&1 | grep Version | sed -e 's|.* Version ||' -e 's| .*||'` - _CC_MAJOR_VERSION=`echo $CC_VERSION | awk -F\. '{ print $1 }'` - _CC_MINOR_VERSION=`echo $CC_VERSION | awk -F\. '{ print $2 }'` + + _MSVC_VER_FILTER='s|.* \([0-9]\+\.[0-9]\+\.[0-9]\+\(\.[0-9]\+\)\?\).*|\1|p' + + CC_VERSION=`"${CC}" -v 2>&1 | sed -ne "$_MSVC_VER_FILTER"` + _CC_MAJOR_VERSION=`echo ${CC_VERSION} | awk -F\. '{ print $1 }'` + _CC_MINOR_VERSION=`echo ${CC_VERSION} | awk -F\. '{ print $2 }'` + _CC_RELEASE=`echo ${CC_VERSION} | awk -F\. '{ print $3 }'` + _CC_BUILD=`echo ${CC_VERSION} | awk -F\. '{ print $4 }'` MSC_VER=${_CC_MAJOR_VERSION}${_CC_MINOR_VERSION} + if test "$_CC_MAJOR_VERSION" -eq "14"; then + if test $_CC_RELEASE -gt 50727; then + _USE_DYNAMICBASE=1 + elif test $_CC_BUILD -ge 762; then + _USE_DYNAMICBASE=1 + fi + cat >> confdefs.h <<\EOF +#define _CRT_SECURE_NO_DEPRECATE 1 +EOF + + cat >> confdefs.h <<\EOF +#define _CRT_NONSTDC_NO_DEPRECATE 1 +EOF + + elif test $_CC_MAJOR_VERSION -ge 15; then + _USE_DYNAMICBASE=1 + cat >> confdefs.h <<\EOF +#define _CRT_SECURE_NO_WARNINGS 1 +EOF + + cat >> confdefs.h <<\EOF +#define _CRT_NONSTDC_NO_WARNINGS 1 +EOF + + fi + + if test -n "$_USE_DYNAMICBASE"; then + DLLFLAGS="$DLLFLAGS -DYNAMICBASE" + fi + # Ensure that mt is Microsoft (R) Manifest Tool and not magnetic # tape manipulation utility (or something else) if test "$MSC_VER" -ge "1400"; then @@ -4029,8 +4599,14 @@ EOF CFLAGS="$CFLAGS -W3 -nologo -GF -Gy" DLLFLAGS="$DLLFLAGS -OUT:\"\$@\"" - _DEBUG_FLAGS=-Z7 + _DEBUG_FLAGS=-Zi _OPTIMIZE_FLAGS=-O2 + + PROFILE_GEN_CFLAGS="-GL" + PROFILE_GEN_LDFLAGS="-LTCG:PGINSTRUMENT" + PROFILE_USE_CFLAGS="-GL -wd4624 -wd4952" + PROFILE_USE_LDFLAGS="-LTCG:PGUPDATE" + if test -z "$MOZ_OPTIMIZE"; then CFLAGS="$CFLAGS -Od" fi @@ -4050,19 +4626,16 @@ EOF DEFINES="$DEFINES -U_DEBUG" fi - if test -n "$MOZ_OPTIMIZE"; then - if test -n "$MOZ_DEBUG_SYMBOLS"; then - _OPTIMIZE_FLAGS="$_OPTIMIZE_FLAGS -Zi" + if test -n "$MOZ_DEBUG_SYMBOLS"; then + if test -n "$MOZ_OPTIMIZE"; then DLLFLAGS="$DLLFLAGS -DEBUG -OPT:REF" LDFLAGS="$LDFLAGS -DEBUG -OPT:REF" + else + DLLFLAGS="$DLLFLAGS -DEBUG" + LDFLAGS="$LDFLAGS -DEBUG" fi fi - if test -n "$MOZ_DEBUG"; then - DLLFLAGS="$DLLFLAGS -DEBUG" - LDFLAGS="$LDFLAGS -DEBUG" - fi - OS_DLLFLAGS="-nologo -DLL -SUBSYSTEM:WINDOWS" if test "$MSC_VER" -le "1200" -a -z "$MOZ_DEBUG_SYMBOLS"; then OS_DLLFLAGS="$OS_DLLFLAGS -PDB:NONE" @@ -4180,8 +4753,7 @@ EOF EOF - AR='lib -NOLOGO -OUT:"$@"' - AR_FLAGS= + AR_FLAGS='-NOLOGO -OUT:"$@"' OBJ_SUFFIX=obj LIB_SUFFIX=lib @@ -4476,17 +5048,17 @@ EOF _OPTIMIZE_FLAGS="$_OPTIMIZE_FLAGS -Olimit 4000" ac_safe=`echo "machine/builtins.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for machine/builtins.h""... $ac_c" 1>&6 -echo "configure:4480: checking for machine/builtins.h" >&5 +echo "configure:5052: checking for machine/builtins.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 4485 "configure" +#line 5057 "configure" #include "confdefs.h" #include <machine/builtins.h> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4490: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:5062: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -5135,7 +5707,7 @@ case $target in ;; *) echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6 -echo "configure:5139: checking for dlopen in -ldl" >&5 +echo "configure:5711: checking for dlopen in -ldl" >&5 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -5143,7 +5715,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldl $LIBS" cat > conftest.$ac_ext <<EOF -#line 5147 "configure" +#line 5719 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -5154,7 +5726,7 @@ int main() { dlopen() ; return 0; } EOF -if { (eval echo configure:5158: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5730: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -5171,17 +5743,17 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 ac_safe=`echo "dlfcn.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for dlfcn.h""... $ac_c" 1>&6 -echo "configure:5175: checking for dlfcn.h" >&5 +echo "configure:5747: checking for dlfcn.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 5180 "configure" +#line 5752 "configure" #include "confdefs.h" #include <dlfcn.h> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:5185: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:5757: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -5214,13 +5786,13 @@ esac if test $ac_cv_prog_gcc = yes; then echo $ac_n "checking whether ${CC-cc} needs -traditional""... $ac_c" 1>&6 -echo "configure:5218: checking whether ${CC-cc} needs -traditional" >&5 +echo "configure:5790: checking whether ${CC-cc} needs -traditional" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gcc_traditional'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_pattern="Autoconf.*'x'" cat > conftest.$ac_ext <<EOF -#line 5224 "configure" +#line 5796 "configure" #include "confdefs.h" #include <sgtty.h> Autoconf TIOCGETP @@ -5238,7 +5810,7 @@ rm -f conftest* if test $ac_cv_prog_gcc_traditional = no; then cat > conftest.$ac_ext <<EOF -#line 5242 "configure" +#line 5814 "configure" #include "confdefs.h" #include <termio.h> Autoconf TCGETA @@ -5259,15 +5831,17 @@ echo "$ac_t""$ac_cv_prog_gcc_traditional" 1>&6 fi fi -for ac_func in lchown strerror +_SAVE_LIBS="$LIBS" +LIBS="$LIBS $OS_LIBS" +for ac_func in lchown strerror dladdr do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5266: checking for $ac_func" >&5 +echo "configure:5840: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 5271 "configure" +#line 5845 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -5290,7 +5864,7 @@ $ac_func(); ; return 0; } EOF -if { (eval echo configure:5294: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5868: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -5314,9 +5888,79 @@ else fi done +LIBS="$_SAVE_LIBS" +# Check whether --with-ccache or --without-ccache was given. +if test "${with_ccache+set}" = set; then + withval="$with_ccache" + CCACHE=$withval +else + CCACHE="no" +fi + + +if test "$CCACHE" != "no"; then + if test -n "$CCACHE"; then + if test "$CCACHE" = "yes"; then + CCACHE= + else + if test ! -e "$CCACHE"; then + { echo "configure: error: $CCACHE not found" 1>&2; exit 1; } + fi + fi + fi + for ac_prog in $CCACHE ccache +do +# Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:5920: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_path_CCACHE'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + case "$CCACHE" in + /*) + ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path. + ;; + ?:/*) + ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a dos path. + ;; + *) + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_path_CCACHE="$ac_dir/$ac_word" + break + fi + done + IFS="$ac_save_ifs" + ;; +esac +fi +CCACHE="$ac_cv_path_CCACHE" +if test -n "$CCACHE"; then + echo "$ac_t""$CCACHE" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + +test -n "$CCACHE" && break +done + + if test -z "$CCACHE" -o "$CCACHE" = ":"; then + { echo "configure: error: ccache not found" 1>&2; exit 1; } + elif test -x "$CCACHE"; then + CC="$CCACHE $CC" + CXX="$CCACHE $CXX" + else + { echo "configure: error: $CCACHE is not executable" 1>&2; exit 1; } + fi +fi + # Check whether --enable-strip or --disable-strip was given. if test "${enable_strip+set}" = set; then enableval="$enable_strip" @@ -5331,7 +5975,7 @@ hpux*) if test -z "$GNU_CC"; then echo $ac_n "checking for +Olit support""... $ac_c" 1>&6 -echo "configure:5335: checking for +Olit support" >&5 +echo "configure:5979: checking for +Olit support" >&5 if eval "test \"`echo '$''{'ac_cv_hpux_usable_olit_option'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -5367,10 +6011,13 @@ case "$target_os" in darwin*) _HAVE_PTHREADS=1 ;; +wince*) + _HAVE_PTHREADS= + ;; *) echo $ac_n "checking for pthread_create in -lpthreads""... $ac_c" 1>&6 -echo "configure:5374: checking for pthread_create in -lpthreads" >&5 +echo "configure:6021: checking for pthread_create in -lpthreads" >&5 echo " #include <pthread.h> void *foo(void *v) { return v; } @@ -5392,7 +6039,7 @@ echo " echo "$ac_t""no" 1>&6 echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6 -echo "configure:5396: checking for pthread_create in -lpthread" >&5 +echo "configure:6043: checking for pthread_create in -lpthread" >&5 echo " #include <pthread.h> void *foo(void *v) { return v; } @@ -5414,7 +6061,7 @@ echo " echo "$ac_t""no" 1>&6 echo $ac_n "checking for pthread_create in -lc_r""... $ac_c" 1>&6 -echo "configure:5418: checking for pthread_create in -lc_r" >&5 +echo "configure:6065: checking for pthread_create in -lc_r" >&5 echo " #include <pthread.h> void *foo(void *v) { return v; } @@ -5436,7 +6083,7 @@ echo " echo "$ac_t""no" 1>&6 echo $ac_n "checking for pthread_create in -lc""... $ac_c" 1>&6 -echo "configure:5440: checking for pthread_create in -lc" >&5 +echo "configure:6087: checking for pthread_create in -lc" >&5 echo " #include <pthread.h> void *foo(void *v) { return v; } @@ -5550,25 +6197,11 @@ if test "${enable_ipv6+set}" = set; then fi - -# Check whether --enable-boehm or --disable-boehm was given. -if test "${enable_boehm+set}" = set; then - enableval="$enable_boehm" - if test "$enableval" = "yes"; then - cat >> confdefs.h <<\EOF -#define GC_LEAK_DETECTOR 1 -EOF - - GC_LEAK_DETECTOR=1 - fi -fi - - if test -n "$USE_PTHREADS"; then rm -f conftest* ac_cv_have_dash_pthread=no echo $ac_n "checking whether ${CC-cc} accepts -pthread""... $ac_c" 1>&6 -echo "configure:5572: checking whether ${CC-cc} accepts -pthread" >&5 +echo "configure:6205: checking whether ${CC-cc} accepts -pthread" >&5 echo 'int main() { return 0; }' | cat > conftest.c ${CC-cc} -pthread -o conftest conftest.c > conftest.out 2>&1 if test $? -eq 0; then @@ -5591,7 +6224,7 @@ echo "configure:5572: checking whether ${CC-cc} accepts -pthread" >&5 ac_cv_have_dash_pthreads=no if test "$ac_cv_have_dash_pthread" = "no"; then echo $ac_n "checking whether ${CC-cc} accepts -pthreads""... $ac_c" 1>&6 -echo "configure:5595: checking whether ${CC-cc} accepts -pthreads" >&5 +echo "configure:6228: checking whether ${CC-cc} accepts -pthreads" >&5 echo 'int main() { return 0; }' | cat > conftest.c ${CC-cc} -pthreads -o conftest conftest.c > conftest.out 2>&1 if test $? -eq 0; then @@ -5879,7 +6512,7 @@ if test -n "$MOZ_OPTIMIZE"; then CXXFLAGS="$CXXFLAGS $_OPTIMIZE_FLAGS" fi -if test -n "$MOZ_DEBUG"; then +if test -n "$MOZ_DEBUG_SYMBOLS"; then CFLAGS="$CFLAGS $_DEBUG_FLAGS" CXXFLAGS="$CXXFLAGS $_DEBUG_FLAGS" fi @@ -5904,6 +6537,40 @@ cygwin*|msvc*|mks*) ;; esac +# Check whether --enable-wrap-malloc or --disable-wrap-malloc was given. +if test "${enable_wrap_malloc+set}" = set; then + enableval="$enable_wrap_malloc" + if test "$enableval" = "yes"; then + _WRAP_MALLOC=1 + fi +fi + + +if test -n "$_WRAP_MALLOC"; then + if test -n "$GNU_CC"; then + WRAP_LDFLAGS="${WRAP_LDFLAGS} -Wl,--wrap=malloc,--wrap=calloc,--wrap=valloc,--wrap=free,--wrap=realloc,--wrap=memalign" + WRAP_LDFLAGS="${WRAP_LDFLAGS} -Wl,--wrap=__builtin_new,--wrap=__builtin_vec_new,--wrap=__builtin_delete,--wrap=__builtin_vec_delete" + WRAP_LDFLAGS="${WRAP_LDFLAGS} -Wl,--wrap=strdup,--wrap=strndup" + WRAP_LDFLAGS="${WRAP_LDFLAGS} -Wl,--wrap=posix_memalign,--wrap=malloc_usable_size" + else + { echo "configure: error: --enable-wrap-malloc is not supported for non-GNU toolchains" 1>&2; exit 1; } + fi +fi + +# Check whether --with-wrap-malloc or --without-wrap-malloc was given. +if test "${with_wrap_malloc+set}" = set; then + withval="$with_wrap_malloc" + WRAP_LDFLAGS="${WRAP_LDFLAGS} $withval" +fi + + + + + + + + + @@ -6002,52 +6669,69 @@ esac MAKEFILES=" -Makefile -config/Makefile -config/autoconf.mk -config/nsprincl.mk -config/nsprincl.sh -config/nspr-config -lib/Makefile -lib/ds/Makefile -lib/libc/Makefile -lib/libc/include/Makefile -lib/libc/src/Makefile -lib/tests/Makefile -pkg/Makefile -pkg/linux/Makefile -pkg/solaris/Makefile -pkg/solaris/SUNWpr/Makefile -pkg/solaris/SUNWprd/Makefile -pr/Makefile -pr/include/Makefile -pr/include/md/Makefile -pr/include/obsolete/Makefile -pr/include/private/Makefile -pr/src/Makefile -pr/src/io/Makefile -pr/src/linking/Makefile -pr/src/malloc/Makefile -pr/src/md/Makefile -pr/src/md/${PR_MD_ARCH_DIR}/Makefile -pr/src/memory/Makefile -pr/src/misc/Makefile -pr/src/threads/Makefile -pr/tests/Makefile -pr/tests/dll/Makefile + Makefile + config/Makefile + config/autoconf.mk + config/nsprincl.mk + config/nsprincl.sh + config/nspr-config + config/nspr.pc + lib/Makefile + lib/ds/Makefile + lib/libc/Makefile + lib/libc/include/Makefile + lib/libc/src/Makefile + lib/tests/Makefile + pkg/Makefile + pr/Makefile + pr/include/Makefile + pr/include/md/Makefile + pr/include/obsolete/Makefile + pr/include/private/Makefile + pr/src/Makefile + pr/src/io/Makefile + pr/src/linking/Makefile + pr/src/malloc/Makefile + pr/src/md/Makefile + pr/src/md/${PR_MD_ARCH_DIR}/Makefile + pr/src/memory/Makefile + pr/src/misc/Makefile + pr/src/threads/Makefile + pr/tests/Makefile + pr/tests/dll/Makefile " +if test "$OS_TARGET" = "Linux"; then + MAKEFILES="$MAKEFILES + pkg/linux/Makefile + " +elif test "$OS_TARGET" = "SunOS"; then + MAKEFILES="$MAKEFILES + pkg/solaris/Makefile + pkg/solaris/SUNWpr/Makefile + pkg/solaris/SUNWprd/Makefile + " +fi if test -z "$USE_PTHREADS" && test -z "$USE_BTHREADS"; then - MAKEFILES="$MAKEFILES pr/src/threads/combined/Makefile" + MAKEFILES="$MAKEFILES + pr/src/threads/combined/Makefile + " elif test -n "$USE_PTHREADS"; then - MAKEFILES="$MAKEFILES pr/src/pthreads/Makefile" + MAKEFILES="$MAKEFILES + pr/src/pthreads/Makefile + " elif test -n "$USE_BTHREADS"; then - MAKEFILES="$MAKEFILES pr/src/bthreads/Makefile" + MAKEFILES="$MAKEFILES + pr/src/bthreads/Makefile + " fi if test -n "$USE_CPLUS"; then - MAKEFILES="$MAKEFILES pr/src/cplus/Makefile pr/src/cplus/tests/Makefile" + MAKEFILES="$MAKEFILES + pr/src/cplus/Makefile + pr/src/cplus/tests/Makefile + " fi echo $MAKEFILES > unallmakefiles @@ -6168,6 +6852,8 @@ trap 'rm -fr `echo "$MAKEFILES" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 EOF cat >> $CONFIG_STATUS <<EOF + + # Protect against being on the right side of a sed subst in config.status. sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g; s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF @@ -6227,6 +6913,7 @@ s%@STRIP@%$STRIP%g s%@WINDRES@%$WINDRES%g s%@CPP@%$CPP%g s%@PERL@%$PERL%g +s%@CCACHE@%$CCACHE%g s%@SHELL_OVERRIDE@%$SHELL_OVERRIDE%g s%@MOZILLA_CLIENT@%$MOZILLA_CLIENT%g s%@HOST_CFLAGS@%$HOST_CFLAGS%g @@ -6236,12 +6923,13 @@ s%@GCC_USE_GNU_LD@%$GCC_USE_GNU_LD%g s%@MSC_VER@%$MSC_VER%g s%@CROSS_COMPILE@%$CROSS_COMPILE%g s%@MOZ_OPTIMIZE@%$MOZ_OPTIMIZE%g +s%@MOZ_DEBUG@%$MOZ_DEBUG%g +s%@MOZ_DEBUG_SYMBOLS@%$MOZ_DEBUG_SYMBOLS%g s%@USE_CPLUS@%$USE_CPLUS%g s%@USE_IPV6@%$USE_IPV6%g s%@USE_N32@%$USE_N32%g s%@USE_64@%$USE_64%g s%@OBJECT_MODE@%$OBJECT_MODE%g -s%@GC_LEAK_DETECTOR@%$GC_LEAK_DETECTOR%g s%@ENABLE_STRIP@%$ENABLE_STRIP%g s%@USE_PTHREADS@%$USE_PTHREADS%g s%@USE_BTHREADS@%$USE_BTHREADS%g @@ -6262,6 +6950,7 @@ s%@OBJ_SUFFIX@%$OBJ_SUFFIX%g s%@LIB_SUFFIX@%$LIB_SUFFIX%g s%@DLL_SUFFIX@%$DLL_SUFFIX%g s%@ASM_SUFFIX@%$ASM_SUFFIX%g +s%@WRAP_LDFLAGS@%$WRAP_LDFLAGS%g s%@MKSHLIB@%$MKSHLIB%g s%@DSO_CFLAGS@%$DSO_CFLAGS%g s%@DSO_LDOPTS@%$DSO_LDOPTS%g @@ -6275,6 +6964,10 @@ s%@AR_FLAGS@%$AR_FLAGS%g s%@ASFLAGS@%$ASFLAGS%g s%@FILTER@%$FILTER%g s%@IMPLIB@%$IMPLIB%g +s%@PROFILE_GEN_CFLAGS@%$PROFILE_GEN_CFLAGS%g +s%@PROFILE_GEN_LDFLAGS@%$PROFILE_GEN_LDFLAGS%g +s%@PROFILE_USE_CFLAGS@%$PROFILE_USE_CFLAGS%g +s%@PROFILE_USE_LDFLAGS@%$PROFILE_USE_LDFLAGS%g s%@OS_LIBS@%$OS_LIBS%g s%@RESOLVE_LINK_SYMBOLS@%$RESOLVE_LINK_SYMBOLS%g s%@AIX_LINK_OPTS@%$AIX_LINK_OPTS%g @@ -6368,7 +7061,7 @@ for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then .) srcdir=. if test -z "$ac_dots"; then top_srcdir=. else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;; - /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;; + /* | ?:/*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;; *) # Relative path. srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix" top_srcdir="$ac_dots$ac_given_srcdir" ;; @@ -6384,7 +7077,7 @@ for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then *) ac_comsub= ;; esac - ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` + ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" ` sed -e "$ac_comsub s%@configure_input@%$configure_input%g s%@srcdir@%$srcdir%g @@ -6393,6 +7086,8 @@ s%@top_srcdir@%$top_srcdir%g fi; done rm -f conftest.s* + + EOF cat >> $CONFIG_STATUS <<EOF diff --git a/configure.in b/configure.in index 81a215a0..bfc1e212 100644 --- a/configure.in +++ b/configure.in @@ -1,43 +1,8 @@ dnl -*- Mode: Autoconf; tab-width: 4; indent-tabs-mode: nil; -*- dnl -dnl ***** BEGIN LICENSE BLOCK ***** -dnl Version: MPL 1.1/GPL 2.0/LGPL 2.1 -dnl -dnl The contents of this file are subject to the Mozilla Public License Version -dnl 1.1 (the "License"); you may not use this file except in compliance with -dnl the License. You may obtain a copy of the License at -dnl http://www.mozilla.org/MPL/ -dnl -dnl Software distributed under the License is distributed on an "AS IS" basis, -dnl WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License -dnl for the specific language governing rights and limitations under the -dnl License. -dnl -dnl The Original Code is the Netscape Portable Runtime (NSPR). -dnl -dnl The Initial Developer of the Original Code is -dnl Netscape Communications Corporation. -dnl Portions created by the Initial Developer are Copyright (C) 1998 -dnl the Initial Developer. All Rights Reserved. -dnl -dnl Contributor(s): -dnl Christopher Seawood <cls@seawood.org> -dnl Howard Chu <hyc@symas.com> -dnl Mark Mentovai <mark@moxienet.com> -dnl -dnl Alternatively, the contents of this file may be used under the terms of -dnl either the GNU General Public License Version 2 or later (the "GPL"), or -dnl the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), -dnl in which case the provisions of the GPL or the LGPL are applicable instead -dnl of those above. If you wish to allow use of your version of this file only -dnl under the terms of either the GPL or the LGPL, and not to allow others to -dnl use your version of this file under the terms of the MPL, indicate your -dnl decision by deleting the provisions above and replace them with the notice -dnl and other provisions required by the GPL or the LGPL. If you do not delete -dnl the provisions above, a recipient may use your version of this file under -dnl the terms of any one of the MPL, the GPL or the LGPL. -dnl -dnl ***** END LICENSE BLOCK ***** +dnl This Source Code Form is subject to the terms of the Mozilla Public +dnl License, v. 2.0. If a copy of the MPL was not distributed with this +dnl file, You can obtain one at http://mozilla.org/MPL/2.0/. AC_PREREQ(2.12) AC_INIT(config/libc_r.h) @@ -49,8 +14,8 @@ dnl ======================================================== dnl = Defaults dnl ======================================================== MOD_MAJOR_VERSION=4 -MOD_MINOR_VERSION=8 -MOD_PATCH_VERSION=4 +MOD_MINOR_VERSION=9 +MOD_PATCH_VERSION=3 NSPR_MODNAME=nspr20 _HAVE_PTHREADS= USE_PTHREADS= @@ -78,6 +43,10 @@ MACOS_SDK_DIR= NEXT_ROOT= MT= MOZ_OS2_HIGH_MEMORY=1 +PROFILE_GEN_CFLAGS= +PROFILE_GEN_LDFLAGS= +PROFILE_USE_CFLAGS= +PROFILE_USE_LDFLAGS= dnl Link in libraries necessary to resolve all symbols for shared libs RESOLVE_LINK_SYMBOLS= @@ -128,6 +97,166 @@ if test -n "$_WIN32_MSVC"; then fi dnl ======================================================== +dnl = Android uses a very custom (hacky) toolchain; we need to do this +dnl = here, so that the compiler checks can succeed +dnl ======================================================== + +AC_ARG_WITH(android-ndk, +[ --with-android-ndk=DIR + location where the Android NDK can be found], + android_ndk=$withval) + +AC_ARG_WITH(android-toolchain, +[ --with-android-toolchain=DIR + location of the Android toolchain], + android_toolchain=$withval) + +AC_ARG_WITH(android-version, +[ --with-android-version=VER + Android platform version, default 5], + android_version=$withval, + android_version=5) + +AC_ARG_WITH(android-platform, +[ --with-android-platform=DIR + location of platform dir], + android_platform=$withval) + +case "$target" in +arm-linux*-android*|*-linuxandroid*) + android_tool_prefix="arm-linux-androideabi" + ;; +i?86-*android*) + android_tool_prefix="i686-android-linux" + ;; +mipsel-*android*) + android_tool_prefix="mipsel-linux-android" + ;; +*) + android_tool_prefix="$target_os" + ;; +esac + +dnl ======================================================== +dnl = Gonk is a fork of Android used for Mozilla's B2G project. +dnl = Configuration is done largely by the top level config +dnl = and the specified gonk directory doesn't matter here. +dnl ======================================================== + +AC_ARG_WITH(gonk, +[ --with-gonk=DIR location of gonk dir], + gonkdir=$withval) + +if test -n "$gonkdir" ; then + dnl Most things are directly configured by env vars when building for gonk + + dnl prevent cross compile section from using these flags as host flags + if test -z "$HOST_CPPFLAGS" ; then + HOST_CPPFLAGS=" " + fi + if test -z "$HOST_CFLAGS" ; then + HOST_CFLAGS=" " + fi + if test -z "$HOST_CXXFLAGS" ; then + HOST_CXXFLAGS=" " + fi + if test -z "$HOST_LDFLAGS" ; then + HOST_LDFLAGS=" " + fi + + AC_DEFINE(ANDROID) +else +case "$target" in +*-android*|*-linuxandroid*) + if test -z "$android_ndk" ; then + AC_MSG_ERROR([You must specify --with-android-ndk=/path/to/ndk when targeting Android.]) + fi + + if test -z "$android_toolchain" ; then + AC_MSG_CHECKING([for android toolchain directory]) + + kernel_name=`uname -s | tr "[[:upper:]]" "[[:lower:]]"` + + case "$target_cpu" in + arm) + target_name=arm-linux-androideabi-4.4.3 + ;; + i?86) + target_name=x86-4.4.3 + ;; + mipsel) + target_name=mipsel-linux-android-4.4.3 + ;; + esac + android_toolchain="$android_ndk"/toolchains/$target_name/prebuilt/$kernel_name-x86 + + if test -d "$android_toolchain" ; then + AC_MSG_RESULT([$android_toolchain]) + else + AC_MSG_ERROR([not found. You have to specify --with-android-toolchain=/path/to/ndk/toolchain.]) + fi + fi + + if test -z "$android_platform" ; then + AC_MSG_CHECKING([for android platform directory]) + + case "$target_cpu" in + arm) + target_name=arm + ;; + i?86) + target_name=x86 + ;; + mipsel) + target_name=mips + ;; + esac + + android_platform="$android_ndk"/platforms/android-"$android_version"/arch-"$target_name" + + if test -d "$android_platform" ; then + AC_MSG_RESULT([$android_platform]) + else + AC_MSG_ERROR([not found. You have to specify --with-android-platform=/path/to/ndk/platform.]) + fi + fi + + dnl set up compilers + AS="$android_toolchain"/bin/"$android_tool_prefix"-as + CC="$android_toolchain"/bin/"$android_tool_prefix"-gcc + CXX="$android_toolchain"/bin/"$android_tool_prefix"-g++ + CPP="$android_toolchain"/bin/"$android_tool_prefix"-cpp + LD="$android_toolchain"/bin/"$android_tool_prefix"-ld + AR="$android_toolchain"/bin/"$android_tool_prefix"-ar + RANLIB="$android_toolchain"/bin/"$android_tool_prefix"-ranlib + STRIP="$android_toolchain"/bin/"$android_tool_prefix"-strip + + CPPFLAGS="-I$android_platform/usr/include $CPPFLAGS" + CFLAGS="-mandroid -I$android_platform/usr/include -fno-short-enums -fno-exceptions $CFLAGS" + CXXFLAGS="-mandroid -I$android_platform/usr/include -fpic -fno-short-enums -fno-exceptions $CXXFLAGS" + LDFLAGS="-mandroid -L$android_platform/usr/lib -Wl,-rpath-link=$android_platform/usr/lib --sysroot=$android_platform $LDFLAGS" + + dnl prevent cross compile section from using these flags as host flags + if test -z "$HOST_CPPFLAGS" ; then + HOST_CPPFLAGS=" " + fi + if test -z "$HOST_CFLAGS" ; then + HOST_CFLAGS=" " + fi + if test -z "$HOST_CXXFLAGS" ; then + HOST_CXXFLAGS=" " + fi + if test -z "$HOST_LDFLAGS" ; then + HOST_LDFLAGS=" " + fi + + AC_DEFINE(ANDROID) + AC_DEFINE_UNQUOTED(ANDROID_VERSION, $android_version) + ;; +esac +fi + +dnl ======================================================== dnl = dnl = Check options that may affect the compiler dnl = @@ -181,29 +310,47 @@ AC_ARG_WITH(mozilla, fi]) AC_ARG_ENABLE(optimize, - [ --enable-optimize(=val) Enable code optimizations (val, ie. -O2) ], + [ --enable-optimize[=OPT] Enable code optimizations (ie. -O2) ], [ if test "$enableval" != "no"; then - MOZ_OPTIMIZE=1 - if test -n "$enableval" && test "$enableval" != "yes"; then - _OPTIMIZE_FLAGS=`echo $enableval | sed -e 's|\\\ | |g'` + MOZ_OPTIMIZE=1 + if test -n "$enableval" -a "$enableval" != "yes"; then + _OPTIMIZE_FLAGS=`echo $enableval | sed -e 's|\\\ | |g'` _SAVE_OPTIMIZE_FLAGS=$_OPTIMIZE_FLAGS - fi + fi else - MOZ_OPTIMIZE= - fi ]) + MOZ_OPTIMIZE= + fi ]) AC_ARG_ENABLE(debug, - [ --disable-debug Do not compile in debugging symbols - --enable-debug(=val) Enable debugging (debug flags val)], - [ if test "$enableval" = "no"; then - MOZ_DEBUG= - else - MOZ_DEBUG=1 - if test -n "$enableval" && test "$enableval" != "yes"; then - _DEBUG_FLAGS=`echo $enableval | sed -e 's|\\\ | |g'` - _SAVE_DEBUG_FLAGS=$_DEBUG_FLAGS - fi - fi]) + [ --enable-debug[=DBG] Enable debugging (using compiler flags DBG)], + [ if test "$enableval" != "no"; then + MOZ_DEBUG=1 + MOZ_DEBUG_SYMBOLS=1 + if test -n "$enableval" -a "$enableval" != "yes"; then + _DEBUG_FLAGS=`echo $enableval | sed -e 's|\\\ | |g'` + _SAVE_DEBUG_FLAGS=$_DEBUG_FLAGS + fi + else + MOZ_DEBUG= + fi ], + MOZ_DEBUG_SYMBOLS=1) + +AC_ARG_ENABLE(debug-symbols, + [ --enable-debug-symbols[=DBG] Enable debugging symbols + (using compiler flags DBG)], + [ if test "$enableval" != "no"; then + MOZ_DEBUG_SYMBOLS=1 + if test -n "$enableval" -a "$enableval" != "yes"; then + if test -z "$_SAVE_DEBUG_FLAGS"; then + _DEBUG_FLAGS=`echo $enableval | sed -e 's|\\\ | |g'` + _SAVE_DEBUG_FLAGS=$_DEBUG_FLAGS + else + AC_MSG_ERROR([--enable-debug-symbols flags cannot be used with --enable-debug flags]) + fi + fi + else + MOZ_DEBUG_SYMBOLS= + fi ]) AC_ARG_ENABLE(win32-target, [ --enable-win32-target=\$t @@ -396,7 +543,11 @@ if test -z "$SKIP_COMPILER_CHECKS"; then dnl ======================================================== dnl Checks for compilers. dnl ======================================================== -if test "$target" != "$host"; then + +dnl Explicitly honor $CROSS_COMPILE to allow cross-compiling +dnl between toolkits on the same architecture, as when +dnl targeting the iOS Simulator from OS X. +if test "$target" != "$host" -o -n "$CROSS_COMPILE"; then echo "cross compiling from $host to $target" cross_compiling=yes @@ -438,11 +589,20 @@ if test "$target" != "$host"; then dnl versions of PPC OS X 10.4 aren't fat, so these target compiler dnl checks will fail. Fake a working SDK in that case. _SAVE_CFLAGS=$CFLAGS - _SAVE_CXXFLAGS=$CXXLAGS + _SAVE_CXXFLAGS=$CXXFLAGS CFLAGS="-isysroot /Developer/SDKs/MacOSX10.4u.sdk $CFLAGS" CXXFLAGS="-isysroot /Developer/SDKs/MacOSX10.4u.sdk $CXXFLAGS" - ;; - esac + ;; + *:arm*-apple-darwin*) + dnl The arm compiler doesn't appear to know about its root by default, + dnl so explicitly pass it one here. Later on we'll put this in CFLAGS + dnl anyway. + _SAVE_CFLAGS=$CFLAGS + _SAVE_CXXFLAGS=$CXXFLAGS + CFLAGS="-isysroot $MACOS_SDK_DIR $CFLAGS" + CXXFLAGS="-isysroot $MACOS_SDK_DIR $CXXFLAGS" + ;; + esac AC_CHECK_PROGS(CC, $CC "${target_alias}-gcc" "${target}-gcc", echo) unset ac_cv_prog_CC @@ -454,7 +614,7 @@ if test "$target" != "$host"; then fi case "$build:$target" in - powerpc-apple-darwin8*:i?86-apple-darwin*) + powerpc-apple-darwin8*:i?86-apple-darwin*|*:arm*-apple-darwin*) dnl Revert the changes made above. From this point on, the target dnl compiler will never be used without applying the SDK to CFLAGS dnl (see --with-macos-sdk below). @@ -556,6 +716,29 @@ else AC_MSG_RESULT([no]) fi +dnl ======================================================== +dnl Profile guided optimization +dnl ======================================================== +dnl Test for profiling options +dnl Under gcc 3.4+, use -fprofile-generate/-fprofile-use + +_SAVE_CFLAGS="$CFLAGS" +CFLAGS="$CFLAGS -fprofile-generate -fprofile-correction" + +AC_MSG_CHECKING([whether C compiler supports -fprofile-generate]) +AC_TRY_COMPILE([], [return 0;], + [ PROFILE_GEN_CFLAGS="-fprofile-generate" + result="yes" ], result="no") +AC_MSG_RESULT([$result]) + +if test $result = "yes"; then + PROFILE_GEN_LDFLAGS="-fprofile-generate" + PROFILE_USE_CFLAGS="-fprofile-use -fprofile-correction -Wcoverage-mismatch" + PROFILE_USE_LDFLAGS="-fprofile-use" +fi + +CFLAGS="$_SAVE_CFLAGS" + dnl =============================================================== dnl Check for .hidden assembler directive and visibility attribute. dnl Borrowed from glibc configure.in @@ -800,6 +983,171 @@ AC_ARG_ENABLE(os2-high-mem, fi ]) dnl ======================================================== +dnl = ARM toolchain tweaks +dnl ======================================================== + +dnl Defaults +case "$target" in +arm*-android*|arm*-linuxandroid*) + MOZ_THUMB=yes + MOZ_ARCH=armv7-a + MOZ_FPU=vfp + MOZ_FLOAT_ABI=softfp + MOZ_SOFT_FLOAT=yes + ;; +arm*-*) + if test -n "$MOZ_PLATFORM_MAEMO"; then + MOZ_THUMB=no + MOZ_ARCH=armv7-a + MOZ_FLOAT_ABI=softfp + fi + if test "$MOZ_PLATFORM_MAEMO" = 6; then + MOZ_THUMB=yes + fi + ;; +esac + +dnl Kept for compatibility with some buildbot mozconfig +AC_ARG_ENABLE(thumb2, [], MOZ_THUMB=$enableval) + +AC_ARG_WITH(thumb, +[ --with-thumb[[=yes|no|toolchain-default]]] +[ Use Thumb instruction set (-mthumb)], + if test -z "$GNU_CC"; then + AC_MSG_ERROR([--with-thumb is not supported on non-GNU toolchain-defaults]) + fi + MOZ_THUMB=$withval) + +AC_ARG_WITH(thumb-interwork, +[ --with-thumb-interwork[[=yes|no|toolchain-default]] + Use Thumb/ARM instuctions interwork (-mthumb-interwork)], + if test -z "$GNU_CC"; then + AC_MSG_ERROR([--with-thumb-interwork is not supported on non-GNU toolchain-defaults]) + fi + MOZ_THUMB_INTERWORK=$withval) + +AC_ARG_WITH(arch, +[ --with-arch=[[type|toolchain-default]] + Use specific CPU features (-march=type)], + if test -z "$GNU_CC"; then + AC_MSG_ERROR([--with-arch is not supported on non-GNU toolchain-defaults]) + fi + MOZ_ARCH=$withval) + +AC_ARG_WITH(fpu, +[ --with-fpu=[[type|toolchain-default]] + Use specific FPU type (-mfpu=type)], + if test -z "$GNU_CC"; then + AC_MSG_ERROR([--with-fpu is not supported on non-GNU toolchain-defaults]) + fi + MOZ_FPU=$withval) + +AC_ARG_WITH(float-abi, +[ --with-float-abi=[[type|toolchain-default]] + Use specific arm float ABI (-mfloat-abi=type)], + if test -z "$GNU_CC"; then + AC_MSG_ERROR([--with-float-abi is not supported on non-GNU toolchain-defaults]) + fi + MOZ_FLOAT_ABI=$withval) + +AC_ARG_WITH(soft-float, +[ --with-soft-float[[=yes|no|toolchain-default]] + Use soft float library (-msoft-float)], + if test -z "$GNU_CC"; then + AC_MSG_ERROR([--with-soft-float is not supported on non-GNU toolchain-defaults]) + fi + MOZ_SOFT_FLOAT=$withval) + +case "$MOZ_ARCH" in +toolchain-default|"") + arch_flag="" + ;; +*) + arch_flag="-march=$MOZ_ARCH" + ;; +esac + +case "$MOZ_THUMB" in +yes) + MOZ_THUMB2=1 + thumb_flag="-mthumb" + ;; +no) + MOZ_THUMB2= + thumb_flag="-marm" + ;; +*) + _SAVE_CFLAGS="$CFLAGS" + CFLAGS="$arch_flag" + AC_TRY_COMPILE([],[return sizeof(__thumb2__);], + MOZ_THUMB2=1, + MOZ_THUMB2=) + CFLAGS="$_SAVE_CFLAGS" + thumb_flag="" + ;; +esac + +case "$MOZ_THUMB_INTERWORK" in +yes) + thumb_interwork_flag="-mthumb-interwork" + ;; +no) + thumb_interwork_flag="-mno-thumb-interwork" + ;; +*) # toolchain-default + thumb_interwork_flag="" + ;; +esac + +case "$MOZ_FPU" in +toolchain-default|"") + fpu_flag="" + ;; +*) + fpu_flag="-mfpu=$MOZ_FPU" + ;; +esac + +case "$MOZ_FLOAT_ABI" in +toolchain-default|"") + float_abi_flag="" + ;; +*) + float_abi_flag="-mfloat-abi=$MOZ_FLOAT_ABI" + ;; +esac + +case "$MOZ_SOFT_FLOAT" in +yes) + soft_float_flag="-msoft-float" + ;; +no) + soft_float_flag="-mno-soft-float" + ;; +*) # toolchain-default + soft_float_flag="" + ;; +esac + +dnl Use echo to avoid accumulating space characters +all_flags=`echo $arch_flag $thumb_flag $thumb_interwork_flag $fpu_flag $float_abi_flag $soft_float_flag` +if test -n "$all_flags"; then + _SAVE_CFLAGS="$CFLAGS" + CFLAGS="$all_flags" + AC_MSG_CHECKING(whether the chosen combination of compiler flags ($all_flags) works) + AC_TRY_COMPILE([],[return 0;], + AC_MSG_RESULT([yes]), + AC_MSG_ERROR([no])) + + CFLAGS="$_SAVE_CFLAGS $all_flags" + CXXFLAGS="$CXXFLAGS $all_flags" + ASFLAGS="$ASFLAGS $all_flags" + if test -n "$thumb_flag"; then + LDFLAGS="$LDFLAGS $thumb_flag" + fi +fi + +dnl ======================================================== dnl Override of system specific host options dnl ======================================================== case "$host" in @@ -989,18 +1337,27 @@ case "$target" in AS='$(CC) -x assembler-with-cpp' CFLAGS="$CFLAGS -Wall -fno-common" case "${target_cpu}" in + arm*) + CPU_ARCH=arm + ;; i*86*) if test -n "$USE_64"; then CPU_ARCH=x86_64 - CC="$CC -arch x86_64" else CPU_ARCH=i386 fi ;; + x86_64) + CPU_ARCH=x86_64 + ;; *) CPU_ARCH=ppc ;; esac + if test "`echo $CC | grep -c '\-arch '`" = "0"; then + CC="$CC -arch $CPU_ARCH" + fi + AC_CHECK_HEADER(crt_externs.h) DSO_CFLAGS=-fPIC DSO_LDOPTS='-dynamiclib -compatibility_version 1 -current_version 1 -all_load -install_name @executable_path/$@ -headerpad_max_install_names' _OPTIMIZE_FLAGS=-O2 @@ -1200,6 +1557,7 @@ tools are selected during the Xcode/Developer Tools installation.]) DSO_CFLAGS=+Z else DSO_CFLAGS=-fPIC + ASFLAGS="$ASFLAGS -x assembler-with-cpp" fi if test -n "$MOZILLA_CLIENT"; then @@ -1411,7 +1769,7 @@ tools are selected during the Xcode/Developer Tools installation.]) esac ;; -*-linux*|*-gnu*|*-k*bsd*-gnu) +*-linux*|*-gnu*|*-k*bsd*-gnu|*-android*|*-linuxandroid*) if test -z "$USE_NSPR_THREADS"; then USE_PTHREADS=1 IMPL_STRATEGY=_PTH @@ -1419,8 +1777,12 @@ tools are selected during the Xcode/Developer Tools installation.]) AC_DEFINE(XP_UNIX) AC_DEFINE(_GNU_SOURCE) AC_DEFINE(HAVE_FCNTL_FILE_LOCKING) - case "${target_os}" in - linux*) + case "${target}" in + *-android*|*-linuxandroid*) + OS_TARGET=Android + AC_DEFINE(LINUX) + ;; + *-linux*) AC_DEFINE(LINUX) ;; esac @@ -1492,8 +1854,8 @@ tools are selected during the Xcode/Developer Tools installation.]) RESOLVE_LINK_SYMBOLS=1 if test -n "$GNU_CC"; then - CC="$CC -mno-cygwin" - CXX="$CXX -mno-cygwin" + CC="$CC -mwindows" + CXX="$CXX -mwindows" DLL_SUFFIX=dll MKSHLIB='$(CC) -shared -Wl,--export-all-symbols -Wl,--out-implib -Wl,$(IMPORT_LIBRARY) $(DLLBASE) -o $(subst $(OBJDIR)/,,$(SHARED_LIBRARY))' RC=$WINDRES @@ -1514,11 +1876,37 @@ tools are selected during the Xcode/Developer Tools installation.]) DLL_SUFFIX=dll # Determine compiler version - CC_VERSION=`"${CC}" -v 2>&1 | grep Version | sed -e 's|.* Version ||' -e 's| .*||'` - _CC_MAJOR_VERSION=`echo $CC_VERSION | awk -F\. '{ print $1 }'` - _CC_MINOR_VERSION=`echo $CC_VERSION | awk -F\. '{ print $2 }'` + changequote(,) + _MSVC_VER_FILTER='s|.* \([0-9]\+\.[0-9]\+\.[0-9]\+\(\.[0-9]\+\)\?\).*|\1|p' + changequote([,]) + CC_VERSION=`"${CC}" -v 2>&1 | sed -ne "$_MSVC_VER_FILTER"` + _CC_MAJOR_VERSION=`echo ${CC_VERSION} | awk -F\. '{ print $1 }'` + _CC_MINOR_VERSION=`echo ${CC_VERSION} | awk -F\. '{ print $2 }'` + _CC_RELEASE=`echo ${CC_VERSION} | awk -F\. '{ print $3 }'` + _CC_BUILD=`echo ${CC_VERSION} | awk -F\. '{ print $4 }'` MSC_VER=${_CC_MAJOR_VERSION}${_CC_MINOR_VERSION} + if test "$_CC_MAJOR_VERSION" -eq "14"; then + dnl -DYNAMICBASE is only supported on VC8SP1 or newer, + dnl so be very specific here! + dnl VC8 is 14.00.50727.42, VC8SP1 is 14.00.50727.762 + if test $_CC_RELEASE -gt 50727; then + _USE_DYNAMICBASE=1 + elif test $_CC_BUILD -ge 762; then + _USE_DYNAMICBASE=1 + fi + AC_DEFINE(_CRT_SECURE_NO_DEPRECATE) + AC_DEFINE(_CRT_NONSTDC_NO_DEPRECATE) + elif test $_CC_MAJOR_VERSION -ge 15; then + _USE_DYNAMICBASE=1 + AC_DEFINE(_CRT_SECURE_NO_WARNINGS) + AC_DEFINE(_CRT_NONSTDC_NO_WARNINGS) + fi + + if test -n "$_USE_DYNAMICBASE"; then + DLLFLAGS="$DLLFLAGS -DYNAMICBASE" + fi + # Ensure that mt is Microsoft (R) Manifest Tool and not magnetic # tape manipulation utility (or something else) if test "$MSC_VER" -ge "1400"; then @@ -1541,8 +1929,14 @@ tools are selected during the Xcode/Developer Tools installation.]) CFLAGS="$CFLAGS -W3 -nologo -GF -Gy" DLLFLAGS="$DLLFLAGS -OUT:\"\$@\"" - _DEBUG_FLAGS=-Z7 + _DEBUG_FLAGS=-Zi _OPTIMIZE_FLAGS=-O2 + + PROFILE_GEN_CFLAGS="-GL" + PROFILE_GEN_LDFLAGS="-LTCG:PGINSTRUMENT" + PROFILE_USE_CFLAGS="-GL -wd4624 -wd4952" + PROFILE_USE_LDFLAGS="-LTCG:PGUPDATE" + if test -z "$MOZ_OPTIMIZE"; then CFLAGS="$CFLAGS -Od" fi @@ -1559,19 +1953,16 @@ tools are selected during the Xcode/Developer Tools installation.]) DEFINES="$DEFINES -U_DEBUG" fi - if test -n "$MOZ_OPTIMIZE"; then - if test -n "$MOZ_DEBUG_SYMBOLS"; then - _OPTIMIZE_FLAGS="$_OPTIMIZE_FLAGS -Zi" + if test -n "$MOZ_DEBUG_SYMBOLS"; then + if test -n "$MOZ_OPTIMIZE"; then DLLFLAGS="$DLLFLAGS -DEBUG -OPT:REF" LDFLAGS="$LDFLAGS -DEBUG -OPT:REF" + else + DLLFLAGS="$DLLFLAGS -DEBUG" + LDFLAGS="$LDFLAGS -DEBUG" fi fi - if test -n "$MOZ_DEBUG"; then - DLLFLAGS="$DLLFLAGS -DEBUG" - LDFLAGS="$LDFLAGS -DEBUG" - fi - OS_DLLFLAGS="-nologo -DLL -SUBSYSTEM:WINDOWS" if test "$MSC_VER" -le "1200" -a -z "$MOZ_DEBUG_SYMBOLS"; then OS_DLLFLAGS="$OS_DLLFLAGS -PDB:NONE" @@ -1650,8 +2041,7 @@ tools are selected during the Xcode/Developer Tools installation.]) AC_DEFINE(WINCE) AC_DEFINE(_PR_GLOBAL_THREADS_ONLY) - AR='lib -NOLOGO -OUT:"$@"' - AR_FLAGS= + AR_FLAGS='-NOLOGO -OUT:"$@"' OBJ_SUFFIX=obj LIB_SUFFIX=lib @@ -2307,7 +2697,10 @@ dnl ======================================================== dnl Checks for library functions. dnl ======================================================== AC_PROG_GCC_TRADITIONAL -AC_CHECK_FUNCS(lchown strerror) +_SAVE_LIBS="$LIBS" +LIBS="$LIBS $OS_LIBS" +AC_CHECK_FUNCS(lchown strerror dladdr) +LIBS="$_SAVE_LIBS" dnl AC_FUNC_MEMCMP dnl AC_FUNC_MMAP @@ -2322,6 +2715,35 @@ dnl ======================================================== dnl Check options dnl ======================================================== +dnl ====================================================== +dnl = Enable compiling with ccache +dnl ====================================================== +AC_ARG_WITH(ccache, +[ --with-ccache[=path/to/ccache] + Enable compiling with ccache], + CCACHE=$withval, CCACHE="no") + +if test "$CCACHE" != "no"; then + if test -n "$CCACHE"; then + if test "$CCACHE" = "yes"; then + CCACHE= + else + if test ! -e "$CCACHE"; then + AC_MSG_ERROR([$CCACHE not found]) + fi + fi + fi + AC_PATH_PROGS(CCACHE, $CCACHE ccache) + if test -z "$CCACHE" -o "$CCACHE" = ":"; then + AC_MSG_ERROR([ccache not found]) + elif test -x "$CCACHE"; then + CC="$CCACHE $CC" + CXX="$CCACHE $CXX" + else + AC_MSG_ERROR([$CCACHE is not executable]) + fi +fi + dnl ======================================================== dnl = dnl = --enable-strip @@ -2403,6 +2825,9 @@ case "$target_os" in darwin*) _HAVE_PTHREADS=1 ;; +wince*) + _HAVE_PTHREADS= + ;; *) MOZ_CHECK_PTHREADS(pthreads, _HAVE_PTHREADS=1 _PTHREAD_LDFLAGS="-lpthreads", @@ -2482,14 +2907,6 @@ AC_ARG_ENABLE(ipv6, USE_IPV6= fi]) - -AC_ARG_ENABLE(boehm, - [ --enable-boehm Enable the Boehm Garbage Collector], - [ if test "$enableval" = "yes"; then - AC_DEFINE(GC_LEAK_DETECTOR) - GC_LEAK_DETECTOR=1 - fi]) - if test -n "$USE_PTHREADS"; then dnl See if -pthread is supported. rm -f conftest* @@ -2723,7 +3140,7 @@ if test -n "$MOZ_OPTIMIZE"; then CXXFLAGS="$CXXFLAGS $_OPTIMIZE_FLAGS" fi -if test -n "$MOZ_DEBUG"; then +if test -n "$MOZ_DEBUG_SYMBOLS"; then CFLAGS="$CFLAGS $_DEBUG_FLAGS" CXXFLAGS="$CXXFLAGS $_DEBUG_FLAGS" fi @@ -2752,6 +3169,33 @@ cygwin*|msvc*|mks*) esac dnl ======================================================== +dnl = Use malloc wrapper lib +dnl ======================================================== +AC_ARG_ENABLE(wrap-malloc, +[ --enable-wrap-malloc Wrap malloc calls (gnu linker only)], +[ if test "$enableval" = "yes"; then + _WRAP_MALLOC=1 + fi ]) + +if test -n "$_WRAP_MALLOC"; then + if test -n "$GNU_CC"; then + WRAP_LDFLAGS="${WRAP_LDFLAGS} -Wl,--wrap=malloc,--wrap=calloc,--wrap=valloc,--wrap=free,--wrap=realloc,--wrap=memalign" + WRAP_LDFLAGS="${WRAP_LDFLAGS} -Wl,--wrap=__builtin_new,--wrap=__builtin_vec_new,--wrap=__builtin_delete,--wrap=__builtin_vec_delete" + WRAP_LDFLAGS="${WRAP_LDFLAGS} -Wl,--wrap=strdup,--wrap=strndup" + WRAP_LDFLAGS="${WRAP_LDFLAGS} -Wl,--wrap=posix_memalign,--wrap=malloc_usable_size" + else + AC_MSG_ERROR([--enable-wrap-malloc is not supported for non-GNU toolchains]) + fi +fi + +dnl ======================================================== +dnl = Location of malloc wrapper lib +dnl ======================================================== +AC_ARG_WITH(wrap-malloc, +[ --with-wrap-malloc=SHAREDLIB Location of malloc wrapper library], + WRAP_LDFLAGS="${WRAP_LDFLAGS} $withval") + +dnl ======================================================== dnl Substitution of found variables. dnl ======================================================== AC_SUBST(SHELL_OVERRIDE) @@ -2772,13 +3216,14 @@ AC_SUBST(MSC_VER) AC_SUBST(CROSS_COMPILE) AC_SUBST(MOZ_OPTIMIZE) +AC_SUBST(MOZ_DEBUG) +AC_SUBST(MOZ_DEBUG_SYMBOLS) AC_SUBST(USE_CPLUS) AC_SUBST(USE_IPV6) AC_SUBST(USE_N32) AC_SUBST(USE_64) AC_SUBST(OBJECT_MODE) -AC_SUBST(GC_LEAK_DETECTOR) AC_SUBST(ENABLE_STRIP) AC_SUBST(USE_PTHREADS) @@ -2803,6 +3248,7 @@ AC_SUBST(OBJ_SUFFIX) AC_SUBST(LIB_SUFFIX) AC_SUBST(DLL_SUFFIX) AC_SUBST(ASM_SUFFIX) +AC_SUBST(WRAP_LDFLAGS) AC_SUBST(MKSHLIB) AC_SUBST(DSO_CFLAGS) AC_SUBST(DSO_LDOPTS) @@ -2826,6 +3272,11 @@ AC_SUBST(STRIP) AC_SUBST(FILTER) AC_SUBST(IMPLIB) +AC_SUBST(PROFILE_GEN_CFLAGS) +AC_SUBST(PROFILE_GEN_LDFLAGS) +AC_SUBST(PROFILE_USE_CFLAGS) +AC_SUBST(PROFILE_USE_LDFLAGS) + AC_SUBST(OS_LIBS) AC_SUBST(RESOLVE_LINK_SYMBOLS) AC_SUBST(AIX_LINK_OPTS) @@ -2855,55 +3306,69 @@ dnl ======================================================== dnl Generate output files. dnl ======================================================== MAKEFILES=" -Makefile -config/Makefile -config/autoconf.mk -config/nsprincl.mk -config/nsprincl.sh -config/nspr-config -lib/Makefile -lib/ds/Makefile -lib/libc/Makefile -lib/libc/include/Makefile -lib/libc/src/Makefile -lib/tests/Makefile -pkg/Makefile -pkg/linux/Makefile -pkg/solaris/Makefile -pkg/solaris/SUNWpr/Makefile -pkg/solaris/SUNWprd/Makefile -pr/Makefile -pr/include/Makefile -pr/include/md/Makefile -pr/include/obsolete/Makefile -pr/include/private/Makefile -pr/src/Makefile -pr/src/io/Makefile -pr/src/linking/Makefile -pr/src/malloc/Makefile -pr/src/md/Makefile -pr/src/md/${PR_MD_ARCH_DIR}/Makefile -pr/src/memory/Makefile -pr/src/misc/Makefile -pr/src/threads/Makefile -pr/tests/Makefile -pr/tests/dll/Makefile + Makefile + config/Makefile + config/autoconf.mk + config/nsprincl.mk + config/nsprincl.sh + config/nspr-config + config/nspr.pc + lib/Makefile + lib/ds/Makefile + lib/libc/Makefile + lib/libc/include/Makefile + lib/libc/src/Makefile + lib/tests/Makefile + pkg/Makefile + pr/Makefile + pr/include/Makefile + pr/include/md/Makefile + pr/include/obsolete/Makefile + pr/include/private/Makefile + pr/src/Makefile + pr/src/io/Makefile + pr/src/linking/Makefile + pr/src/malloc/Makefile + pr/src/md/Makefile + pr/src/md/${PR_MD_ARCH_DIR}/Makefile + pr/src/memory/Makefile + pr/src/misc/Makefile + pr/src/threads/Makefile + pr/tests/Makefile + pr/tests/dll/Makefile " -dnl lib/tests/Makefile -dnl pr/tests/w16gui/Makefile -dnl tools/Makefile +if test "$OS_TARGET" = "Linux"; then + MAKEFILES="$MAKEFILES + pkg/linux/Makefile + " +elif test "$OS_TARGET" = "SunOS"; then + MAKEFILES="$MAKEFILES + pkg/solaris/Makefile + pkg/solaris/SUNWpr/Makefile + pkg/solaris/SUNWprd/Makefile + " +fi if test -z "$USE_PTHREADS" && test -z "$USE_BTHREADS"; then - MAKEFILES="$MAKEFILES pr/src/threads/combined/Makefile" + MAKEFILES="$MAKEFILES + pr/src/threads/combined/Makefile + " elif test -n "$USE_PTHREADS"; then - MAKEFILES="$MAKEFILES pr/src/pthreads/Makefile" + MAKEFILES="$MAKEFILES + pr/src/pthreads/Makefile + " elif test -n "$USE_BTHREADS"; then - MAKEFILES="$MAKEFILES pr/src/bthreads/Makefile" + MAKEFILES="$MAKEFILES + pr/src/bthreads/Makefile + " fi if test -n "$USE_CPLUS"; then - MAKEFILES="$MAKEFILES pr/src/cplus/Makefile pr/src/cplus/tests/Makefile" + MAKEFILES="$MAKEFILES + pr/src/cplus/Makefile + pr/src/cplus/tests/Makefile + " fi echo $MAKEFILES > unallmakefiles diff --git a/lib/Makefile.in b/lib/Makefile.in index 9bdc078e..64dd43da 100644 --- a/lib/Makefile.in +++ b/lib/Makefile.in @@ -1,39 +1,7 @@ # -# ***** BEGIN LICENSE BLOCK ***** -# Version: MPL 1.1/GPL 2.0/LGPL 2.1 -# -# The contents of this file are subject to the Mozilla Public License Version -# 1.1 (the "License"); you may not use this file except in compliance with -# the License. You may obtain a copy of the License at -# http://www.mozilla.org/MPL/ -# -# Software distributed under the License is distributed on an "AS IS" basis, -# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License -# for the specific language governing rights and limitations under the -# License. -# -# The Original Code is the Netscape Portable Runtime (NSPR). -# -# The Initial Developer of the Original Code is -# Netscape Communications Corporation. -# Portions created by the Initial Developer are Copyright (C) 1998-2000 -# the Initial Developer. All Rights Reserved. -# -# Contributor(s): -# -# Alternatively, the contents of this file may be used under the terms of -# either the GNU General Public License Version 2 or later (the "GPL"), or -# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), -# in which case the provisions of the GPL or the LGPL are applicable instead -# of those above. If you wish to allow use of your version of this file only -# under the terms of either the GPL or the LGPL, and not to allow others to -# use your version of this file under the terms of the MPL, indicate your -# decision by deleting the provisions above and replace them with the notice -# and other provisions required by the GPL or the LGPL. If you do not delete -# the provisions above, a recipient may use your version of this file under -# the terms of any one of the MPL, the GPL or the LGPL. -# -# ***** END LICENSE BLOCK ***** +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. #! gmake diff --git a/lib/ds/Makefile.in b/lib/ds/Makefile.in index 82dca036..ce55f4d7 100644 --- a/lib/ds/Makefile.in +++ b/lib/ds/Makefile.in @@ -1,39 +1,7 @@ # -# ***** BEGIN LICENSE BLOCK ***** -# Version: MPL 1.1/GPL 2.0/LGPL 2.1 -# -# The contents of this file are subject to the Mozilla Public License Version -# 1.1 (the "License"); you may not use this file except in compliance with -# the License. You may obtain a copy of the License at -# http://www.mozilla.org/MPL/ -# -# Software distributed under the License is distributed on an "AS IS" basis, -# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License -# for the specific language governing rights and limitations under the -# License. -# -# The Original Code is the Netscape Portable Runtime (NSPR). -# -# The Initial Developer of the Original Code is -# Netscape Communications Corporation. -# Portions created by the Initial Developer are Copyright (C) 1998-2000 -# the Initial Developer. All Rights Reserved. -# -# Contributor(s): -# -# Alternatively, the contents of this file may be used under the terms of -# either the GNU General Public License Version 2 or later (the "GPL"), or -# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), -# in which case the provisions of the GPL or the LGPL are applicable instead -# of those above. If you wish to allow use of your version of this file only -# under the terms of either the GPL or the LGPL, and not to allow others to -# use your version of this file under the terms of the MPL, indicate your -# decision by deleting the provisions above and replace them with the notice -# and other provisions required by the GPL or the LGPL. If you do not delete -# the provisions above, a recipient may use your version of this file under -# the terms of any one of the MPL, the GPL or the LGPL. -# -# ***** END LICENSE BLOCK ***** +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. #! gmake diff --git a/lib/ds/plarena.c b/lib/ds/plarena.c index 2d274588..5b1e53af 100644 --- a/lib/ds/plarena.c +++ b/lib/ds/plarena.c @@ -1,40 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is Netscape - * Communications Corporation. Portions created by Netscape are - * Copyright (C) 1998-2000 Netscape Communications Corporation. All - * Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** - */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /* * Lifetime-based fast allocation, inspired by much prior art, including @@ -129,7 +96,15 @@ PR_IMPLEMENT(void) PL_InitArenaPool( pool->first.base = pool->first.avail = pool->first.limit = (PRUword)PL_ARENA_ALIGN(pool, &pool->first + 1); pool->current = &pool->first; - pool->arenasize = size; + /* + * Compute the net size so that each arena's gross size is |size|. + * sizeof(PLArena) + pool->mask is the header and alignment slop + * that PL_ArenaAllocate adds to the net size. + */ + if (size > sizeof(PLArena) + pool->mask) + pool->arenasize = size - (sizeof(PLArena) + pool->mask); + else + pool->arenasize = size; #ifdef PL_ARENAMETER memset(&pool->stats, 0, sizeof pool->stats); pool->stats.name = strdup(name); @@ -256,6 +231,21 @@ PR_IMPLEMENT(void *) PL_ArenaGrow( return newp; } +static void ClearArenaList(PLArena *a, PRInt32 pattern) +{ + + for (; a; a = a->next) { + PR_ASSERT(a->base <= a->avail && a->avail <= a->limit); + a->avail = a->base; + PL_CLEAR_UNUSED_PATTERN(a, pattern); + } +} + +PR_IMPLEMENT(void) PL_ClearArenaPool(PLArenaPool *pool, PRInt32 pattern) +{ + ClearArenaList(pool->first.next, pattern); +} + /* * Free tail arenas linked after head, which may not be the true list head. * Reset pool->current to point to head in case it pointed at a tail arena. @@ -270,12 +260,7 @@ static void FreeArenaList(PLArenaPool *pool, PLArena *head, PRBool reallyFree) return; #ifdef DEBUG - do { - PR_ASSERT(a->base <= a->avail && a->avail <= a->limit); - a->avail = a->base; - PL_CLEAR_UNUSED(a); - } while ((a = a->next) != 0); - a = *ap; + ClearArenaList(a, PL_FREE_PATTERN); #endif if (reallyFree) { @@ -304,8 +289,8 @@ PR_IMPLEMENT(void) PL_ArenaRelease(PLArenaPool *pool, char *mark) { PLArena *a; - for (a = pool->first.next; a; a = a->next) { - if (PR_UPTRDIFF(mark, a->base) < PR_UPTRDIFF(a->avail, a->base)) { + for (a = &pool->first; a; a = a->next) { + if (PR_UPTRDIFF(mark, a->base) <= PR_UPTRDIFF(a->avail, a->base)) { a->avail = (PRUword)PL_ARENA_ALIGN(pool, mark); FreeArenaList(pool, a, PR_FALSE); return; diff --git a/lib/ds/plarena.h b/lib/ds/plarena.h index 38f3e399..4d54cc46 100644 --- a/lib/ds/plarena.h +++ b/lib/ds/plarena.h @@ -1,40 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is Netscape - * Communications Corporation. Portions created by Netscape are - * Copyright (C) 1998-2000 Netscape Communications Corporation. All - * Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** - */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #ifndef plarena_h___ #define plarena_h___ @@ -138,11 +105,12 @@ struct PLArenaPool { #define PL_ARENA_MARK(pool) ((void *) (pool)->current->avail) #define PR_UPTRDIFF(p,q) ((PRUword)(p) - (PRUword)(q)) +#define PL_CLEAR_UNUSED_PATTERN(a, pattern) \ + (PR_ASSERT((a)->avail <= (a)->limit), \ + memset((void*)(a)->avail, (pattern), (a)->limit - (a)->avail)) #ifdef DEBUG #define PL_FREE_PATTERN 0xDA -#define PL_CLEAR_UNUSED(a) (PR_ASSERT((a)->avail <= (a)->limit), \ - memset((void*)(a)->avail, PL_FREE_PATTERN, \ - (a)->limit - (a)->avail)) +#define PL_CLEAR_UNUSED(a) PL_CLEAR_UNUSED_PATTERN((a), PL_FREE_PATTERN) #define PL_CLEAR_ARENA(a) memset((void*)(a), PL_FREE_PATTERN, \ (a)->limit - (PRUword)(a)) #else diff --git a/lib/ds/plarenas.h b/lib/ds/plarenas.h index e3eca358..b4705624 100644 --- a/lib/ds/plarenas.h +++ b/lib/ds/plarenas.h @@ -1,42 +1,9 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -#if defined(PLARENAS_H) -#else /* defined(PLARENAS_H) */ +#ifndef PLARENAS_H #define PLARENAS_H PR_BEGIN_EXTERN_C @@ -44,34 +11,13 @@ PR_BEGIN_EXTERN_C typedef struct PLArenaPool PLArenaPool; /* -** Allocate an arena pool as specified by the parameters. -** -** This is equivelant to allocating the space yourself and then -** calling PL_InitArenaPool(). -** -** This function may fail (and return a NULL) for a variety of -** reasons. The reason for a particular failure can be discovered -** by calling PR_GetError(). -*/ -#if 0 /* Not implemented */ -PR_EXTERN(PLArenaPool*) PL_AllocArenaPool( - const char *name, PRUint32 size, PRUint32 align); -#endif - -/* -** Destroy an arena pool previously allocated by PL_AllocArenaPool(). -** -** This function may fail if the arena is not empty and the caller -** wishes to check for empty upon descruction. -*/ -#if 0 /* Not implemented */ -PR_EXTERN(PRStatus) PL_DestroyArenaPool(PLArenaPool *pool, PRBool checkEmpty); -#endif - - -/* ** Initialize an arena pool with the given name for debugging and metering, -** with a minimum size per arena of size bytes. +** with a minimum gross size per arena of size bytes. The net size per arena +** is smaller than the gross size by a header of four pointers plus any +** necessary padding for alignment. +** +** Note: choose a gross size that's a power of two to avoid the heap allocator +** rounding the size up. **/ PR_EXTERN(void) PL_InitArenaPool( PLArenaPool *pool, const char *name, PRUint32 size, PRUint32 align); @@ -95,6 +41,7 @@ PR_EXTERN(void) PL_FinishArenaPool(PLArenaPool *pool); /* ** Compact all of the arenas in a pool so that no space is wasted. +** NOT IMPLEMENTED. Do not use. **/ PR_EXTERN(void) PL_CompactArenaPool(PLArenaPool *pool); @@ -108,8 +55,11 @@ PR_EXTERN(void *) PL_ArenaGrow( PR_EXTERN(void) PL_ArenaRelease(PLArenaPool *pool, char *mark); -PR_END_EXTERN_C +/* +** memset contents of all arenas in pool to pattern +*/ +PR_EXTERN(void) PL_ClearArenaPool(PLArenaPool *pool, PRInt32 pattern); -#endif /* defined(PLARENAS_H) */ +PR_END_EXTERN_C -/* plarenas */ +#endif /* PLARENAS_H */ diff --git a/lib/ds/plds.def b/lib/ds/plds.def index d72796a4..5c672abb 100644 --- a/lib/ds/plds.def +++ b/lib/ds/plds.def @@ -1,39 +1,7 @@ ;+# -;+# ***** BEGIN LICENSE BLOCK ***** -;+# Version: MPL 1.1/GPL 2.0/LGPL 2.1 -;+# -;+# The contents of this file are subject to the Mozilla Public License Version -;+# 1.1 (the "License"); you may not use this file except in compliance with -;+# the License. You may obtain a copy of the License at -;+# http://www.mozilla.org/MPL/ -;+# -;+# Software distributed under the License is distributed on an "AS IS" basis, -;+# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License -;+# for the specific language governing rights and limitations under the -;+# License. -;+# -;+# The Original Code is the Netscape Portable Runtime (NSPR). -;+# -;+# The Initial Developer of the Original Code is -;+# Netscape Communications Corporation. -;+# Portions created by the Initial Developer are Copyright (C) 2002-2003 -;+# the Initial Developer. All Rights Reserved. -;+# -;+# Contributor(s): -;+# -;+# Alternatively, the contents of this file may be used under the terms of -;+# either the GNU General Public License Version 2 or later (the "GPL"), or -;+# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), -;+# in which case the provisions of the GPL or the LGPL are applicable instead -;+# of those above. If you wish to allow use of your version of this file only -;+# under the terms of either the GPL or the LGPL, and not to allow others to -;+# use your version of this file under the terms of the MPL, indicate your -;+# decision by deleting the provisions above and replace them with the notice -;+# and other provisions required by the GPL or the LGPL. If you do not delete -;+# the provisions above, a recipient may use your version of this file under -;+# the terms of any one of the MPL, the GPL or the LGPL. -;+# -;+# ***** END LICENSE BLOCK ***** +;+# This Source Code Form is subject to the terms of the Mozilla Public +;+# License, v. 2.0. If a copy of the MPL was not distributed with this +;+# file, You can obtain one at http://mozilla.org/MPL/2.0/. ;+# ;+# OK, this file is meant to support SUN, LINUX, AIX, OS/2 and WINDOWS ;+# 1. For all unix platforms, the string ";-" means "remove this line" @@ -81,3 +49,8 @@ libVersionPoint; PL_HashTableLookupConst; PL_HashTableRawLookupConst; ;+} NSPR_4.0; +;+ +;+NSPR_4.8.5 { +;+ global: +PL_ClearArenaPool; +;+} NSPR_4.1; diff --git a/lib/ds/plds.rc b/lib/ds/plds.rc index 7a310df0..d8017e73 100644 --- a/lib/ds/plds.rc +++ b/lib/ds/plds.rc @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1999-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "prinit.h" #include <winver.h> diff --git a/lib/ds/plhash.c b/lib/ds/plhash.c index 4f69d04d..0011df33 100644 --- a/lib/ds/plhash.c +++ b/lib/ds/plhash.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /* * PL hash table package. diff --git a/lib/ds/plhash.h b/lib/ds/plhash.h index d752d16a..2c221aed 100644 --- a/lib/ds/plhash.h +++ b/lib/ds/plhash.h @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #ifndef plhash_h___ #define plhash_h___ diff --git a/lib/ds/plvrsion.c b/lib/ds/plvrsion.c index 486a6cb1..e251a5ac 100644 --- a/lib/ds/plvrsion.c +++ b/lib/ds/plvrsion.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "prinit.h" #include "prvrsion.h" diff --git a/lib/libc/Makefile.in b/lib/libc/Makefile.in index 9755225a..28027f9d 100644 --- a/lib/libc/Makefile.in +++ b/lib/libc/Makefile.in @@ -1,39 +1,7 @@ # -# ***** BEGIN LICENSE BLOCK ***** -# Version: MPL 1.1/GPL 2.0/LGPL 2.1 -# -# The contents of this file are subject to the Mozilla Public License Version -# 1.1 (the "License"); you may not use this file except in compliance with -# the License. You may obtain a copy of the License at -# http://www.mozilla.org/MPL/ -# -# Software distributed under the License is distributed on an "AS IS" basis, -# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License -# for the specific language governing rights and limitations under the -# License. -# -# The Original Code is the Netscape Portable Runtime (NSPR). -# -# The Initial Developer of the Original Code is -# Netscape Communications Corporation. -# Portions created by the Initial Developer are Copyright (C) 1998-2000 -# the Initial Developer. All Rights Reserved. -# -# Contributor(s): -# -# Alternatively, the contents of this file may be used under the terms of -# either the GNU General Public License Version 2 or later (the "GPL"), or -# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), -# in which case the provisions of the GPL or the LGPL are applicable instead -# of those above. If you wish to allow use of your version of this file only -# under the terms of either the GPL or the LGPL, and not to allow others to -# use your version of this file under the terms of the MPL, indicate your -# decision by deleting the provisions above and replace them with the notice -# and other provisions required by the GPL or the LGPL. If you do not delete -# the provisions above, a recipient may use your version of this file under -# the terms of any one of the MPL, the GPL or the LGPL. -# -# ***** END LICENSE BLOCK ***** +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. #! gmake diff --git a/lib/libc/include/Makefile.in b/lib/libc/include/Makefile.in index a64a66c5..642e0a18 100644 --- a/lib/libc/include/Makefile.in +++ b/lib/libc/include/Makefile.in @@ -1,39 +1,7 @@ # -# ***** BEGIN LICENSE BLOCK ***** -# Version: MPL 1.1/GPL 2.0/LGPL 2.1 -# -# The contents of this file are subject to the Mozilla Public License Version -# 1.1 (the "License"); you may not use this file except in compliance with -# the License. You may obtain a copy of the License at -# http://www.mozilla.org/MPL/ -# -# Software distributed under the License is distributed on an "AS IS" basis, -# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License -# for the specific language governing rights and limitations under the -# License. -# -# The Original Code is the Netscape Portable Runtime (NSPR). -# -# The Initial Developer of the Original Code is -# Netscape Communications Corporation. -# Portions created by the Initial Developer are Copyright (C) 1998-2000 -# the Initial Developer. All Rights Reserved. -# -# Contributor(s): -# -# Alternatively, the contents of this file may be used under the terms of -# either the GNU General Public License Version 2 or later (the "GPL"), or -# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), -# in which case the provisions of the GPL or the LGPL are applicable instead -# of those above. If you wish to allow use of your version of this file only -# under the terms of either the GPL or the LGPL, and not to allow others to -# use your version of this file under the terms of the MPL, indicate your -# decision by deleting the provisions above and replace them with the notice -# and other provisions required by the GPL or the LGPL. If you do not delete -# the provisions above, a recipient may use your version of this file under -# the terms of any one of the MPL, the GPL or the LGPL. -# -# ***** END LICENSE BLOCK ***** +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. #! gmake diff --git a/lib/libc/include/plbase64.h b/lib/libc/include/plbase64.h index d21ff5d7..7d17ea78 100644 --- a/lib/libc/include/plbase64.h +++ b/lib/libc/include/plbase64.h @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #ifndef _plbase64_h #define _plbase64_h diff --git a/lib/libc/include/plerror.h b/lib/libc/include/plerror.h index a2b8d0b2..cd85dd3f 100644 --- a/lib/libc/include/plerror.h +++ b/lib/libc/include/plerror.h @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /* ** File: plerror.h diff --git a/lib/libc/include/plgetopt.h b/lib/libc/include/plgetopt.h index fcdf23b6..19cafa60 100644 --- a/lib/libc/include/plgetopt.h +++ b/lib/libc/include/plgetopt.h @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /* ** File: plgetopt.h @@ -122,13 +90,14 @@ PR_EXTERN(void) PL_DestroyOptState(PLOptState *opt); * For a long option name, * - opt->longOptIndex will contain the non-negative index of the * PLLongOpt structure in the caller's array of PLLongOpt structures - 8 corresponding to the long option name, and + * corresponding to the long option name, and * For a single-character or long option, * - opt->longOption will contain the value of the single-character option * name, or the value of the longOption from the PLLongOpt structure * for that long option. See notes below. * - opt->value will point to the argument option string, or will - * be NULL if no argument option string was given. + * be NULL if option does not require argument. If option requires + * argument but it is not provided, PL_OPT_BAD is returned. * When opt->option is non-zero, * - opt->longOptIndex will be -1 * When this function returns PL_OPT_EOL, or PL_OPT_BAD, the contents of diff --git a/lib/libc/include/plstr.h b/lib/libc/include/plstr.h index 4d21cc46..57814c70 100644 --- a/lib/libc/include/plstr.h +++ b/lib/libc/include/plstr.h @@ -1,40 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * Roland Mainz <roland mainz@informatik.med.uni-giessen.de> - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #ifndef _plstr_h #define _plstr_h diff --git a/lib/libc/src/Makefile.in b/lib/libc/src/Makefile.in index 2cafb1a7..5b1f7f45 100644 --- a/lib/libc/src/Makefile.in +++ b/lib/libc/src/Makefile.in @@ -1,39 +1,7 @@ # -# ***** BEGIN LICENSE BLOCK ***** -# Version: MPL 1.1/GPL 2.0/LGPL 2.1 -# -# The contents of this file are subject to the Mozilla Public License Version -# 1.1 (the "License"); you may not use this file except in compliance with -# the License. You may obtain a copy of the License at -# http://www.mozilla.org/MPL/ -# -# Software distributed under the License is distributed on an "AS IS" basis, -# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License -# for the specific language governing rights and limitations under the -# License. -# -# The Original Code is the Netscape Portable Runtime (NSPR). -# -# The Initial Developer of the Original Code is -# Netscape Communications Corporation. -# Portions created by the Initial Developer are Copyright (C) 1998-2000 -# the Initial Developer. All Rights Reserved. -# -# Contributor(s): -# -# Alternatively, the contents of this file may be used under the terms of -# either the GNU General Public License Version 2 or later (the "GPL"), or -# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), -# in which case the provisions of the GPL or the LGPL are applicable instead -# of those above. If you wish to allow use of your version of this file only -# under the terms of either the GPL or the LGPL, and not to allow others to -# use your version of this file under the terms of the MPL, indicate your -# decision by deleting the provisions above and replace them with the notice -# and other provisions required by the GPL or the LGPL. If you do not delete -# the provisions above, a recipient may use your version of this file under -# the terms of any one of the MPL, the GPL or the LGPL. -# -# ***** END LICENSE BLOCK ***** +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. #! gmake diff --git a/lib/libc/src/base64.c b/lib/libc/src/base64.c index e3fd80d7..07a4902f 100644 --- a/lib/libc/src/base64.c +++ b/lib/libc/src/base64.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "plbase64.h" #include "prlog.h" /* For PR_NOT_REACHED */ diff --git a/lib/libc/src/plc.def b/lib/libc/src/plc.def index bb996a13..ac8aa7bf 100644 --- a/lib/libc/src/plc.def +++ b/lib/libc/src/plc.def @@ -1,39 +1,7 @@ ;+# -;+# ***** BEGIN LICENSE BLOCK ***** -;+# Version: MPL 1.1/GPL 2.0/LGPL 2.1 -;+# -;+# The contents of this file are subject to the Mozilla Public License Version -;+# 1.1 (the "License"); you may not use this file except in compliance with -;+# the License. You may obtain a copy of the License at -;+# http://www.mozilla.org/MPL/ -;+# -;+# Software distributed under the License is distributed on an "AS IS" basis, -;+# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License -;+# for the specific language governing rights and limitations under the -;+# License. -;+# -;+# The Original Code is the Netscape Portable Runtime (NSPR). -;+# -;+# The Initial Developer of the Original Code is -;+# Netscape Communications Corporation. -;+# Portions created by the Initial Developer are Copyright (C) 2002-2003 -;+# the Initial Developer. All Rights Reserved. -;+# -;+# Contributor(s): -;+# -;+# Alternatively, the contents of this file may be used under the terms of -;+# either the GNU General Public License Version 2 or later (the "GPL"), or -;+# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), -;+# in which case the provisions of the GPL or the LGPL are applicable instead -;+# of those above. If you wish to allow use of your version of this file only -;+# under the terms of either the GPL or the LGPL, and not to allow others to -;+# use your version of this file under the terms of the MPL, indicate your -;+# decision by deleting the provisions above and replace them with the notice -;+# and other provisions required by the GPL or the LGPL. If you do not delete -;+# the provisions above, a recipient may use your version of this file under -;+# the terms of any one of the MPL, the GPL or the LGPL. -;+# -;+# ***** END LICENSE BLOCK ***** +;+# This Source Code Form is subject to the terms of the Mozilla Public +;+# License, v. 2.0. If a copy of the MPL was not distributed with this +;+# file, You can obtain one at http://mozilla.org/MPL/2.0/. ;+# ;+# OK, this file is meant to support SUN, LINUX, AIX, OS/2 and WINDOWS ;+# 1. For all unix platforms, the string ";-" means "remove this line" diff --git a/lib/libc/src/plc.rc b/lib/libc/src/plc.rc index c20df277..144d2737 100644 --- a/lib/libc/src/plc.rc +++ b/lib/libc/src/plc.rc @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1999-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "prinit.h" diff --git a/lib/libc/src/plerror.c b/lib/libc/src/plerror.c index 90b713aa..bb8e08d2 100644 --- a/lib/libc/src/plerror.c +++ b/lib/libc/src/plerror.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /* ** File:plerror.c diff --git a/lib/libc/src/plgetopt.c b/lib/libc/src/plgetopt.c index 0fe4fafe..960decfe 100644 --- a/lib/libc/src/plgetopt.c +++ b/lib/libc/src/plgetopt.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /* ** File: plgetopt.c @@ -177,13 +145,13 @@ PR_IMPLEMENT(PLOptStatus) PL_GetNextOpt(PLOptState *opt) ** option. See if we can find a match in the list of possible ** options supplied. */ - if (internal->minus == 2) { char * foundEqual = strchr(internal->xargv,'='); PRIntn optNameLen = foundEqual ? (foundEqual - internal->xargv) : strlen(internal->xargv); const PLLongOpt *longOpt = internal->longOpts; + PLOptStatus result = PL_OPT_BAD; opt->option = 0; opt->value = NULL; @@ -197,19 +165,31 @@ PR_IMPLEMENT(PLOptStatus) PL_GetNextOpt(PLOptState *opt) /* option name match */ opt->longOptIndex = longOpt - internal->longOpts; opt->longOption = longOpt->longOption; + /* value is part of the current argv[] element if = was found */ + /* note: this sets value even for long options that do not + * require option if specified as --long=value */ if (foundEqual) { - opt->value = foundEqual[1] ? foundEqual + 1 : NULL; + opt->value = foundEqual + 1; } else if (longOpt->valueRequired) { - opt->value = internal->argv[++(internal->xargc)]; + /* value is the next argv[] element, if any */ + if (internal->xargc + 1 < internal->argc) + { + opt->value = internal->argv[++(internal->xargc)]; + } + /* missing value */ + else + { + break; /* return PL_OPT_BAD */ + } } - internal->xargv = &static_Nul; /* consume this */ - return PL_OPT_OK; + result = PL_OPT_OK; + break; } internal->xargv = &static_Nul; /* consume this */ - return PL_OPT_BAD; + return result; } if (internal->minus) { @@ -223,14 +203,27 @@ PR_IMPLEMENT(PLOptStatus) PL_GetNextOpt(PLOptState *opt) opt->longOption = opt->option & 0xff; /* ** if options indicates that there's an associated - ** value, this argv is finished and the next is the - ** option's value. + ** value, it must be provided, either as part of this + ** argv[] element or as the next one */ if (':' == internal->options[cop + 1]) { - if (0 != *internal->xargv) + /* value is part of the current argv[] element */ + if (0 != *internal->xargv) + { + opt->value = internal->xargv; + } + /* value is the next argv[] element, if any */ + else if (internal->xargc + 1 < internal->argc) + { + opt->value = internal->argv[++(internal->xargc)]; + } + /* missing value */ + else + { return PL_OPT_BAD; - opt->value = internal->argv[++(internal->xargc)]; + } + internal->xargv = &static_Nul; internal->minus = 0; } @@ -242,6 +235,7 @@ PR_IMPLEMENT(PLOptStatus) PL_GetNextOpt(PLOptState *opt) internal->xargv += 1; /* consume that option */ return PL_OPT_BAD; } + /* ** No '-', so it must be a standalone value. The option is nul. */ diff --git a/lib/libc/src/plvrsion.c b/lib/libc/src/plvrsion.c index e9903cb7..b25be1e0 100644 --- a/lib/libc/src/plvrsion.c +++ b/lib/libc/src/plvrsion.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "prinit.h" #include "prvrsion.h" diff --git a/lib/libc/src/strcase.c b/lib/libc/src/strcase.c index 7e280aa0..b938ba41 100644 --- a/lib/libc/src/strcase.c +++ b/lib/libc/src/strcase.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "plstr.h" #include <string.h> diff --git a/lib/libc/src/strcat.c b/lib/libc/src/strcat.c index f71b0974..05b7b46d 100644 --- a/lib/libc/src/strcat.c +++ b/lib/libc/src/strcat.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "plstr.h" #include <string.h> diff --git a/lib/libc/src/strchr.c b/lib/libc/src/strchr.c index 35ccedcc..523378b4 100644 --- a/lib/libc/src/strchr.c +++ b/lib/libc/src/strchr.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "plstr.h" #include <string.h> diff --git a/lib/libc/src/strcmp.c b/lib/libc/src/strcmp.c index 095e1784..2d8fbcd9 100644 --- a/lib/libc/src/strcmp.c +++ b/lib/libc/src/strcmp.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "plstr.h" #include <string.h> diff --git a/lib/libc/src/strcpy.c b/lib/libc/src/strcpy.c index b576b677..9d319aa1 100644 --- a/lib/libc/src/strcpy.c +++ b/lib/libc/src/strcpy.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "plstr.h" #include <string.h> diff --git a/lib/libc/src/strdup.c b/lib/libc/src/strdup.c index 27a553c6..c267147c 100644 --- a/lib/libc/src/strdup.c +++ b/lib/libc/src/strdup.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "plstr.h" #include "prmem.h" diff --git a/lib/libc/src/strlen.c b/lib/libc/src/strlen.c index e03f7d25..ba6c612d 100644 --- a/lib/libc/src/strlen.c +++ b/lib/libc/src/strlen.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "plstr.h" #include "prtypes.h" diff --git a/lib/libc/src/strpbrk.c b/lib/libc/src/strpbrk.c index afcb4f51..0d2be981 100644 --- a/lib/libc/src/strpbrk.c +++ b/lib/libc/src/strpbrk.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "plstr.h" #include <string.h> diff --git a/lib/libc/src/strstr.c b/lib/libc/src/strstr.c index 6bc03d37..a90d8226 100644 --- a/lib/libc/src/strstr.c +++ b/lib/libc/src/strstr.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "plstr.h" #include <string.h> diff --git a/lib/libc/src/strtok.c b/lib/libc/src/strtok.c index 400e9a4c..2daaea36 100644 --- a/lib/libc/src/strtok.c +++ b/lib/libc/src/strtok.c @@ -1,40 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 2001 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * Roland Mainz <roland mainz@informatik.med.uni-giessen.de> - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "plstr.h" diff --git a/lib/msgc/.cvsignore b/lib/msgc/.cvsignore deleted file mode 100644 index f3c7a7c5..00000000 --- a/lib/msgc/.cvsignore +++ /dev/null @@ -1 +0,0 @@ -Makefile diff --git a/lib/msgc/Makefile.in b/lib/msgc/Makefile.in deleted file mode 100644 index d7299b2b..00000000 --- a/lib/msgc/Makefile.in +++ /dev/null @@ -1,52 +0,0 @@ -# -# ***** BEGIN LICENSE BLOCK ***** -# Version: MPL 1.1/GPL 2.0/LGPL 2.1 -# -# The contents of this file are subject to the Mozilla Public License Version -# 1.1 (the "License"); you may not use this file except in compliance with -# the License. You may obtain a copy of the License at -# http://www.mozilla.org/MPL/ -# -# Software distributed under the License is distributed on an "AS IS" basis, -# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License -# for the specific language governing rights and limitations under the -# License. -# -# The Original Code is the Netscape Portable Runtime (NSPR). -# -# The Initial Developer of the Original Code is -# Netscape Communications Corporation. -# Portions created by the Initial Developer are Copyright (C) 1998-2000 -# the Initial Developer. All Rights Reserved. -# -# Contributor(s): -# -# Alternatively, the contents of this file may be used under the terms of -# either the GNU General Public License Version 2 or later (the "GPL"), or -# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), -# in which case the provisions of the GPL or the LGPL are applicable instead -# of those above. If you wish to allow use of your version of this file only -# under the terms of either the GPL or the LGPL, and not to allow others to -# use your version of this file under the terms of the MPL, indicate your -# decision by deleting the provisions above and replace them with the notice -# and other provisions required by the GPL or the LGPL. If you do not delete -# the provisions above, a recipient may use your version of this file under -# the terms of any one of the MPL, the GPL or the LGPL. -# -# ***** END LICENSE BLOCK ***** - -MOD_DEPTH = ../.. -topsrcdir = @top_srcdir@ -srcdir = @srcdir@ -VPATH = @srcdir@ - -include $(MOD_DEPTH)/config/autoconf.mk - -include $(topsrcdir)/config/config.mk - -DIRS = include src tests - -include $(topsrcdir)/config/rules.mk - -export:: $(TARGETS) - diff --git a/lib/msgc/include/.cvsignore b/lib/msgc/include/.cvsignore deleted file mode 100644 index f3c7a7c5..00000000 --- a/lib/msgc/include/.cvsignore +++ /dev/null @@ -1 +0,0 @@ -Makefile diff --git a/lib/msgc/include/Makefile.in b/lib/msgc/include/Makefile.in deleted file mode 100644 index 86e152a5..00000000 --- a/lib/msgc/include/Makefile.in +++ /dev/null @@ -1,57 +0,0 @@ -# -# ***** BEGIN LICENSE BLOCK ***** -# Version: MPL 1.1/GPL 2.0/LGPL 2.1 -# -# The contents of this file are subject to the Mozilla Public License Version -# 1.1 (the "License"); you may not use this file except in compliance with -# the License. You may obtain a copy of the License at -# http://www.mozilla.org/MPL/ -# -# Software distributed under the License is distributed on an "AS IS" basis, -# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License -# for the specific language governing rights and limitations under the -# License. -# -# The Original Code is the Netscape Portable Runtime (NSPR). -# -# The Initial Developer of the Original Code is -# Netscape Communications Corporation. -# Portions created by the Initial Developer are Copyright (C) 1998-2000 -# the Initial Developer. All Rights Reserved. -# -# Contributor(s): -# -# Alternatively, the contents of this file may be used under the terms of -# either the GNU General Public License Version 2 or later (the "GPL"), or -# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), -# in which case the provisions of the GPL or the LGPL are applicable instead -# of those above. If you wish to allow use of your version of this file only -# under the terms of either the GPL or the LGPL, and not to allow others to -# use your version of this file under the terms of the MPL, indicate your -# decision by deleting the provisions above and replace them with the notice -# and other provisions required by the GPL or the LGPL. If you do not delete -# the provisions above, a recipient may use your version of this file under -# the terms of any one of the MPL, the GPL or the LGPL. -# -# ***** END LICENSE BLOCK ***** - -#! gmake - -MOD_DEPTH = ../../.. -topsrcdir = @top_srcdir@ -srcdir = @srcdir@ -VPATH = @srcdir@ - -include $(MOD_DEPTH)/config/autoconf.mk -include $(topsrcdir)/config/config.mk - -EXPORT_HEADERS = prgc.h -HEADERS = $(EXPORT_HEADERS) gcint.h - -RELEASE_HEADERS = $(EXPORT_HEADERS) -RELEASE_HEADERS_DEST = $(RELEASE_INCLUDE_DIR) - -include $(topsrcdir)/config/rules.mk - -export:: $(EXPORT_HEADERS) - $(INSTALL) -m 444 $(EXPORT_HEADERS) $(dist_includedir) diff --git a/lib/msgc/include/gcint.h b/lib/msgc/include/gcint.h deleted file mode 100644 index 10048f06..00000000 --- a/lib/msgc/include/gcint.h +++ /dev/null @@ -1,129 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ - -#ifndef gcint_h___ -#define gcint_h___ - -#include "prmon.h" -#include "prgc.h" - -extern PRLogModuleInfo *_pr_msgc_lm; -extern GCInfo _pr_gcData; - -#if defined(_WIN32) && !defined(DEBUG) -#undef INLINE_LOCK -#endif - -#ifdef INLINE_LOCK -#define LOCK_GC() EnterCriticalSection(&_pr_gcData.lock->mutexHandle) -#define UNLOCK_GC() LeaveCriticalSection(&_pr_gcData.lock->mutexHandle) -#else -#define LOCK_GC() PR_EnterMonitor(_pr_gcData.lock) -#define UNLOCK_GC() PR_ExitMonitor (_pr_gcData.lock) -#define GC_IS_LOCKED() (PR_GetMonitorEntryCount(_pr_gcData.lock)!=0) -#endif - -#ifdef DEBUG -#define _GCTRACE(x, y) if (_pr_gcData.flags & x) GCTrace y -#else -#define _GCTRACE(x, y) -#endif - -extern GCBeginGCHook *_pr_beginGCHook; -extern void *_pr_beginGCHookArg; -extern GCBeginGCHook *_pr_endGCHook; -extern void *_pr_endGCHookArg; - -extern GCBeginFinalizeHook *_pr_beginFinalizeHook; -extern void *_pr_beginFinalizeHookArg; -extern GCBeginFinalizeHook *_pr_endFinalizeHook; -extern void *_pr_endFinalizeHookArg; - -extern int _pr_do_a_dump; -extern FILE *_pr_dump_file; - -extern PRLogModuleInfo *_pr_gc_lm; - -/* -** Root finders. Root finders are used by the GC to find pointers into -** the GC heap that are not contained in the GC heap. -*/ -typedef struct RootFinderStr RootFinder; - -struct RootFinderStr { - RootFinder *next; - GCRootFinder *func; - char *name; - void *arg; -}; -extern RootFinder *_pr_rootFinders; - -typedef struct CollectorTypeStr { - GCType gctype; - PRUint32 flags; -} CollectorType; - -#define GC_MAX_TYPES 256 -extern CollectorType *_pr_collectorTypes; - -#define _GC_TYPE_BUSY 0x1 -#define _GC_TYPE_FINAL 0x2 -#define _GC_TYPE_WEAK 0x4 - -/* Slot in _pr_gcTypes used for free memory */ -#define FREE_MEMORY_TYPEIX 255 - -extern void _PR_InitGC(PRWord flags); -extern void _MD_InitGC(void); -extern void PR_CALLBACK _PR_ScanFinalQueue(void *notused); - -/* -** Grow the GC Heap. -*/ -extern void *_MD_GrowGCHeap(PRUint32 *sizep); - -/* -** Extend the GC Heap. -*/ -extern PRBool _MD_ExtendGCHeap(char *base, PRInt32 oldSize, PRInt32 newSize); - -/* -** Free a GC segment. -*/ -extern void _MD_FreeGCSegment(void *base, PRInt32 len); - -#endif /* gcint_h___ */ diff --git a/lib/msgc/include/prgc.h b/lib/msgc/include/prgc.h deleted file mode 100644 index 859f7b1c..00000000 --- a/lib/msgc/include/prgc.h +++ /dev/null @@ -1,419 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ - -#ifndef prgc_h___ -#define prgc_h___ - -/* -** API to NSPR gc memory system. -*/ -#include "prtypes.h" -#include "prmon.h" -#include "prthread.h" -#include <stdio.h> - -#if defined(WIN16) -#define GCPTR __far -#else -#define GCPTR -#endif - - -PR_BEGIN_EXTERN_C - -/* -** Initialize the garbage collector. -** "flags" is the trace flags (see below). -** "initialHeapSize" is the initial size of the heap and may be zero -** if the default is desired. -** "segmentSize" is the size of each segment of memory added to the -** heap when the heap is grown. -*/ -PR_EXTERN(void) PR_InitGC( - PRWord flags, PRInt32 initialHeapSize, PRInt32 segmentSize, PRThreadScope scope); - -/* -** Shuts down gc and frees up all memory associated with it. -*/ -PR_EXTERN(void) PR_ShutdownGC(PRBool finalizeOnExit); - -/* -** This walk function will be called for every gc object in the -** heap as it is walked. If it returns non-zero, the walk is terminated. -*/ -typedef PRInt32 (*PRWalkFun)(void GCPTR* obj, void* data); - -/* -** GC Type record. This defines all of the GC operations used on a -** particular object type. These structures are passed to -** PR_RegisterType. -*/ -typedef struct GCType { - /* - ** Scan an object that is in the GC heap and call GCInfo.livePointer - ** on all of the pointers in it. If this slot is null then the object - ** won't be scanned (i.e. it has no embedded pointers). - */ - void (PR_CALLBACK *scan)(void GCPTR *obj); - - /* - ** Finalize an object that has no references. This is called by the - ** GC after it has determined where the object debris is but before - ** it has moved the debris to the logical "free list". The object is - ** marked alive for this call and removed from the list of objects - ** that need finalization (finalization only happens once for an - ** object). If this slot is null then the object doesn't need - ** finalization. - */ - void (PR_CALLBACK *finalize)(void GCPTR *obj); - - /* - ** Dump out an object during a PR_DumpGCHeap(). This is used as a - ** debugging tool. - */ - void (PR_CALLBACK *dump)(FILE *out, void GCPTR *obj, PRBool detailed, PRIntn indentLevel); - - /* - ** Add object to summary table. - */ - void (PR_CALLBACK *summarize)(void GCPTR *obj, PRUint32 bytes); - - /* - ** Free hook called by GC when the object is being freed. - */ - void (PR_CALLBACK *free)(void *obj); - - /* Weak pointer support: If the object has a weak pointer (Note: - at most one), this function is used to get the weak link's - offset from the start of the body of a gc object */ - PRUint32 (PR_CALLBACK *getWeakLinkOffset)(void *obj); - - /* Descriptive character for dumping this GCType */ - char kindChar; - - /* - ** Walker routine. This routine should apply fun(obj->ptr, data) - ** for every gc pointer within the object. - */ - PRInt32 (PR_CALLBACK *walk)(void GCPTR *obj, PRWalkFun fun, void* data); -} GCType; - -/* -** This data structure must be added as the hash table passed to -** the summarize method of GCType. -*/ -typedef struct PRSummaryEntry { - void* clazz; - PRInt32 instancesCount; - PRInt32 totalSize; -} PRSummaryEntry; - -/* -** This function pointer must be registered by users of nspr -** to produce the finally summary after all object in the -** heap have been visited. -*/ -typedef void (PR_CALLBACK *PRSummaryPrinter)(FILE *out, void* closure); - -PR_EXTERN(void) PR_CALLBACK PR_RegisterSummaryPrinter(PRSummaryPrinter fun, void* closure); - -typedef void PR_CALLBACK GCRootFinder(void *arg); -typedef void PR_CALLBACK GCBeginFinalizeHook(void *arg); -typedef void PR_CALLBACK GCEndFinalizeHook(void *arg); -typedef void PR_CALLBACK GCBeginGCHook(void *arg); -typedef void PR_CALLBACK GCEndGCHook(void *arg); - -typedef enum { PR_GCBEGIN, PR_GCEND } GCLockHookArg; - -typedef void PR_CALLBACK GCLockHookFunc(GCLockHookArg arg1, void *arg2); - -typedef struct GCLockHook GCLockHook; - -struct GCLockHook { - GCLockHookFunc* func; - void* arg; - GCLockHook* next; - GCLockHook* prev; -}; - - -/* -** Hooks which are called at the beginning and end of the GC process. -** The begin hooks are called before the root finding step. The hooks are -** called with threading disabled, so it is now allowed to re-enter the -** kernel. The end hooks are called after the gc has finished but before -** the finalizer has run. -*/ -PR_EXTERN(void) PR_CALLBACK PR_SetBeginGCHook(GCBeginGCHook *hook, void *arg); -PR_EXTERN(void) PR_CALLBACK PR_GetBeginGCHook(GCBeginGCHook **hook, void **arg); -PR_EXTERN(void) PR_CALLBACK PR_SetEndGCHook(GCBeginGCHook *hook, void *arg); -PR_EXTERN(void) PR_CALLBACK PR_GetEndGCHook(GCEndGCHook **hook, void **arg); - -/* -** Called before SuspendAll is called by dogc, so that GC thread can hold -** all the locks before hand to avoid any deadlocks -*/ - -/* -PR_EXTERN(void) PR_SetGCLockHook(GCLockHook *hook, void *arg); -PR_EXTERN(void) PR_GetGCLockHook(GCLockHook **hook, void **arg); -*/ - -PR_EXTERN(int) PR_RegisterGCLockHook(GCLockHookFunc *hook, void *arg); - -/* -** Hooks which are called at the beginning and end of the GC finalization -** process. After the GC has identified all of the dead objects in the -** heap, it looks for objects that need finalization. Before it calls the -** first finalization proc (see the GCType structure above) it calls the -** begin hook. When it has finalized the last object it calls the end -** hook. -*/ -PR_EXTERN(void) PR_SetBeginFinalizeHook(GCBeginFinalizeHook *hook, void *arg); -PR_EXTERN(void) PR_GetBeginFinalizeHook(GCBeginFinalizeHook **hook, void **arg); -PR_EXTERN(void) PR_SetEndFinalizeHook(GCBeginFinalizeHook *hook, void *arg); -PR_EXTERN(void) PR_GetEndFinalizeHook(GCEndFinalizeHook **hook, void **arg); - -/* -** Register a GC type. Return's the index into the GC internal type -** table. The returned value is passed to PR_AllocMemory. After the call, -** the "type" memory belongs to the GC (the caller must not free it or -** change it). -*/ -PR_EXTERN(PRInt32) PR_RegisterType(GCType *type); - -/* -** Register a root finder with the collector. The collector will call -** these functions to identify all of the roots before collection -** proceeds. "arg" is passed to the function when it is called. -*/ -PR_EXTERN(PRStatus) PR_RegisterRootFinder(GCRootFinder func, char *name, void *arg); - -/* -** Allocate some GC'able memory. The object must be at least bytes in -** size. The type index function for the object is specified. "flags" -** specifies some control flags. If PR_ALLOC_CLEAN is set then the memory -** is zero'd before being returned. If PR_ALLOC_DOUBLE is set then the -** allocated memory is double aligned. -** -** Any memory cell that you store a pointer to something allocated by -** this call must be findable by the GC. Use the PR_RegisterRootFinder to -** register new places where the GC will look for pointers into the heap. -** The GC already knows how to scan any NSPR threads or monitors. -*/ -PR_EXTERN(PRWord GCPTR *)PR_AllocMemory( - PRWord bytes, PRInt32 typeIndex, PRWord flags); -PR_EXTERN(PRWord GCPTR *)PR_AllocSimpleMemory( - PRWord bytes, PRInt32 typeIndex); - -/* -** This function can be used to cause PR_AllocMemory to always return -** NULL. This may be useful in low memory situations when we're trying to -** shutdown applets. -*/ -PR_EXTERN(void) PR_EnableAllocation(PRBool yesOrNo); - -/* flags bits */ -#define PR_ALLOC_CLEAN 0x1 -#define PR_ALLOC_DOUBLE 0x2 -#define PR_ALLOC_ZERO_HANDLE 0x4 /* XXX yes, it's a hack */ - -/* -** Force a garbage collection right now. Return when it completes. -*/ -PR_EXTERN(void) PR_GC(void); - -/* -** Force a finalization right now. Return when finalization has -** completed. Finalization completes when there are no more objects -** pending finalization. This does not mean there are no objects in the -** gc heap that will need finalization should a collection be done after -** this call. -*/ -PR_EXTERN(void) PR_ForceFinalize(void); - -/* -** Dump the GC heap out to the given file. This will stop the system dead -** in its tracks while it is occuring. -*/ -PR_EXTERN(void) PR_DumpGCHeap(FILE *out, PRBool detailed); - -/* -** Wrapper for PR_DumpGCHeap -*/ -PR_EXTERN(void) PR_DumpMemory(PRBool detailed); - -/* -** Dump summary of objects allocated. -*/ -PR_EXTERN(void) PR_DumpMemorySummary(void); - -/* -** Dump the application heaps. -*/ -PR_EXTERN(void) PR_DumpApplicationHeaps(void); - -/* -** Helper function used by dump routines to do the indentation in a -** consistent fashion. -*/ -PR_EXTERN(void) PR_DumpIndent(FILE *out, PRIntn indent); - -/* -** The GCInfo structure contains all of the GC state... -** -** busyMemory: -** The amount of GC heap memory that is busy at this instant. Busy -** doesn't mean alive, it just means that it has been -** allocated. Immediately after a collection busy means how much is -** alive. -** -** freeMemory: -** The amount of GC heap memory that is as yet unallocated. -** -** allocMemory: -** The sum of free and busy memory in the GC heap. -** -** maxMemory: -** The maximum size that the GC heap is allowed to grow. -** -** lowSeg: -** The lowest segment currently used in the GC heap. -** -** highSeg: -** The highest segment currently used in the GC heap. -** The lowSeg and highSeg members are used for a "quick test" of whether -** a pointer falls within the GC heap. [ see GC_IN_HEAP(...) ] -** -** lock: -** Monitor used for synchronization within the GC. -** -** finalizer: -** Thread in which the GC finalizer is running. -** -** liveBlock: -** Object scanning functions call through this function pointer to -** register a potential block of pointers with the collector. (This is -** currently not at all different than processRoot.) -** -** livePointer: -** Object scanning functions call through this function pointer to -** register a single pointer with the collector. -** -** processRootBlock: -** When a root finder identifies a root it should call through this -** function pointer so that the GC can process the root. The call takes -** a base address and count which the gc will examine for valid heap -** pointers. -** -** processRootPointer: -** When a root finder identifies a root it should call through this -** function pointer so that the GC can process the root. The call takes -** a single pointer value. -*/ -typedef struct GCInfoStr { - PRWord flags; /* trace flags (see below) */ - PRWord busyMemory; /* memory in use right now */ - PRWord freeMemory; /* memory free right now */ - PRWord allocMemory; /* sum of busy & free memory */ - PRWord maxMemory; /* max memory we are allowed to allocate */ - PRWord *lowSeg; /* lowest segment in the GC heap */ - PRWord *highSeg; /* highest segment in the GC heap */ - - PRMonitor *lock; - PRThread *finalizer; - - void (PR_CALLBACK *liveBlock)(void **base, PRInt32 count); - void (PR_CALLBACK *livePointer)(void *ptr); - void (PR_CALLBACK *processRootBlock)(void **base, PRInt32 count); - void (PR_CALLBACK *processRootPointer)(void *ptr); - FILE* dumpOutput; -#ifdef GCTIMINGHOOK - void (*gcTimingHook)(int32 gcTime); -#endif -} GCInfo; - -PR_EXTERN(GCInfo *) PR_GetGCInfo(void); -PR_EXTERN(PRBool) PR_GC_In_Heap(void GCPTR *object); - -/* -** Simple bounds check to see if a pointer is anywhere near the GC heap. -** Used to avoid calls to PR_ProcessRoot and GCInfo.livePointer by object -** scanning code. -*/ -#if !defined(XP_PC) || defined(_WIN32) -#define GC_IN_HEAP(_info, _p) (((PRWord*)(_p) >= (_info)->lowSeg) && \ - ((PRWord*)(_p) < (_info)->highSeg)) -#else -/* -** The simple bounds check, above, doesn't work in Win16, because we don't -** maintain: lowSeg == MIN(all segments) and highSeg == MAX(all segments). -** So we have to do a little better. -*/ -#define GC_IN_HEAP(_info, _p) PR_GC_In_Heap(_p) -#endif - -PR_EXTERN(PRWord) PR_GetObjectHeader(void *ptr); - -PR_EXTERN(PRWord) PR_SetObjectHeader(void *ptr, PRWord newUserBits); - -/************************************************************************/ - -/* Trace flags (passed to PR_InitGC or in environment GCLOG) */ -#define GC_TRACE 0x0001 -#define GC_ROOTS 0x0002 -#define GC_LIVE 0x0004 -#define GC_ALLOC 0x0008 -#define GC_MARK 0x0010 -#define GC_SWEEP 0x0020 -#define GC_DEBUG 0x0040 -#define GC_FINAL 0x0080 - -#if defined(DEBUG_kipp) || defined(DEBUG_warren) -#define GC_CHECK 0x0100 -#endif - -#ifdef DEBUG -#define GCTRACE(x, y) if (PR_GetGCInfo()->flags & x) GCTrace y -PR_EXTERN(void) GCTrace(char *fmt, ...); -#else -#define GCTRACE(x, y) -#endif - -PR_END_EXTERN_C - -#endif /* prgc_h___ */ diff --git a/lib/msgc/src/.cvsignore b/lib/msgc/src/.cvsignore deleted file mode 100644 index f3c7a7c5..00000000 --- a/lib/msgc/src/.cvsignore +++ /dev/null @@ -1 +0,0 @@ -Makefile diff --git a/lib/msgc/src/Makefile.in b/lib/msgc/src/Makefile.in deleted file mode 100644 index bcc58624..00000000 --- a/lib/msgc/src/Makefile.in +++ /dev/null @@ -1,93 +0,0 @@ -# -# ***** BEGIN LICENSE BLOCK ***** -# Version: MPL 1.1/GPL 2.0/LGPL 2.1 -# -# The contents of this file are subject to the Mozilla Public License Version -# 1.1 (the "License"); you may not use this file except in compliance with -# the License. You may obtain a copy of the License at -# http://www.mozilla.org/MPL/ -# -# Software distributed under the License is distributed on an "AS IS" basis, -# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License -# for the specific language governing rights and limitations under the -# License. -# -# The Original Code is the Netscape Portable Runtime (NSPR). -# -# The Initial Developer of the Original Code is -# Netscape Communications Corporation. -# Portions created by the Initial Developer are Copyright (C) 1998-2000 -# the Initial Developer. All Rights Reserved. -# -# Contributor(s): -# -# Alternatively, the contents of this file may be used under the terms of -# either the GNU General Public License Version 2 or later (the "GPL"), or -# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), -# in which case the provisions of the GPL or the LGPL are applicable instead -# of those above. If you wish to allow use of your version of this file only -# under the terms of either the GPL or the LGPL, and not to allow others to -# use your version of this file under the terms of the MPL, indicate your -# decision by deleting the provisions above and replace them with the notice -# and other provisions required by the GPL or the LGPL. If you do not delete -# the provisions above, a recipient may use your version of this file under -# the terms of any one of the MPL, the GPL or the LGPL. -# -# ***** END LICENSE BLOCK ***** - -#! gmake - -MOD_DEPTH = ../../.. -topsrcdir = @top_srcdir@ -srcdir = @srcdir@ -VPATH = @srcdir@ - -include $(MOD_DEPTH)/config/autoconf.mk - -include $(topsrcdir)/config/config.mk - -INCLUDES = -I$(dist_includedir) -I../include - -CSRCS = prgcapi.c prmsgc.c - -ifeq ($(OS_ARCH),WINNT) -CSRCS += win32gc.c -else -ifeq ($(OS_ARCH),OS2) -CSRCS += os2gc.c -else -CSRCS += unixgc.c -endif -endif - -NSPR_VERSION = $(MOD_MAJOR_VERSION) - -EXTRA_LIBS = $(LIBNSPR) - -ifdef RESOLVE_LINK_SYMBOLS -EXTRA_LIBS += $(OS_LIBS) -endif - -ifeq ($(OS_ARCH), WINNT) -#RES=$(OBJDIR)/ds.res -#RESNAME=$(MOD_DEPTH)/pr/src/nspr.rc -#OS_LIBS = user32.lib -endif # WINNT - -LIBRARY_NAME = msgc -LIBRARY_VERSION = $(MOD_MAJOR_VERSION) - -RELEASE_LIBS = $(TARGETS) - -include $(topsrcdir)/config/rules.mk - -# -# The Client build wants the shared libraries in $(dist_bindir), -# so we also install them there. -# - -export:: $(TARGETS) - $(INSTALL) -m 444 $(TARGETS) $(dist_libdir) -ifdef SHARED_LIBRARY - $(INSTALL) -m 444 $(SHARED_LIBRARY) $(dist_bindir) -endif diff --git a/lib/msgc/src/os2gc.c b/lib/msgc/src/os2gc.c deleted file mode 100644 index f99bb678..00000000 --- a/lib/msgc/src/os2gc.c +++ /dev/null @@ -1,83 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ - -/* - * GC related routines - * - */ -#include "prlog.h" - -#include <stdlib.h> - -/* Leave a bit of room for any malloc header bytes... */ -#define MAX_SEGMENT_SIZE (65536L - 4096L) - -/************************************************************************/ -/* -** Machine dependent GC Heap management routines: -** _MD_GrowGCHeap -*/ -/************************************************************************/ -void _MD_InitGC() {} - -void *_MD_GrowGCHeap(PRUint32 *sizep) -{ - void *addr; - - if ( *sizep > MAX_SEGMENT_SIZE ) - { - *sizep = MAX_SEGMENT_SIZE; - } - - addr = malloc((size_t)*sizep); - return addr; -} - - -PRBool _MD_ExtendGCHeap(char *base, PRInt32 oldSize, PRInt32 newSize) { - /* Not sure about this. Todd? */ - return PR_FALSE; -} - - -void _MD_FreeGCSegment(void *base, PRInt32 len) -{ - if (base) - { - free(base); - } -} diff --git a/lib/msgc/src/prgcapi.c b/lib/msgc/src/prgcapi.c deleted file mode 100644 index 324ac7b9..00000000 --- a/lib/msgc/src/prgcapi.c +++ /dev/null @@ -1,330 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ - -#include <stdarg.h> -#include <string.h> -#include <stdio.h> -#include "prenv.h" -#include "prmem.h" -#include "prmon.h" -#include "prlog.h" -#include "prthread.h" -#include "private/pprthred.h" -#include "gcint.h" - -/* -** Generic GC implementation independent code for the NSPR GC -*/ - -RootFinder *_pr_rootFinders; - -CollectorType *_pr_collectorTypes; - -/* GC State information */ -GCInfo _pr_gcData; - -GCBeginGCHook *_pr_beginGCHook; -void *_pr_beginGCHookArg; -GCBeginGCHook *_pr_endGCHook; -void *_pr_endGCHookArg; - -GCBeginFinalizeHook *_pr_beginFinalizeHook; -void *_pr_beginFinalizeHookArg; -GCBeginFinalizeHook *_pr_endFinalizeHook; -void *_pr_endFinalizeHookArg; - -FILE *_pr_dump_file; -int _pr_do_a_dump; -GCLockHook *_pr_GCLockHook; - -extern PRLogModuleInfo *_pr_msgc_lm; - -/************************************************************************/ - -static PRStatus PR_CALLBACK -pr_ScanOneThread(PRThread* t, void** addr, PRUword count, void* closure) -{ - _pr_gcData.processRootBlock(addr, count); - return PR_SUCCESS; -} - -/* -** Scan all of the threads C stack's and registers, looking for "root" -** pointers into the GC heap. These are the objects that the GC cannot -** move and are considered "live" by the GC. Caller has stopped all of -** the threads from running. -*/ -static void PR_CALLBACK ScanThreads(void *arg) -{ - PR_ScanStackPointers(pr_ScanOneThread, arg); -} - -/************************************************************************/ - -PR_IMPLEMENT(GCInfo *) PR_GetGCInfo(void) -{ - return &_pr_gcData; -} - - -PR_IMPLEMENT(PRInt32) PR_RegisterType(GCType *t) -{ - CollectorType *ct, *ect; - int rv = -1; - - LOCK_GC(); - ct = &_pr_collectorTypes[0]; - ect = &_pr_collectorTypes[FREE_MEMORY_TYPEIX]; - for (; ct < ect; ct++) { - if (ct->flags == 0) { - ct->gctype = *t; - ct->flags = _GC_TYPE_BUSY; - if (0 != ct->gctype.finalize) { - ct->flags |= _GC_TYPE_FINAL; - } - if (0 != ct->gctype.getWeakLinkOffset) { - ct->flags |= _GC_TYPE_WEAK; - } - rv = ct - &_pr_collectorTypes[0]; - break; - } - } - UNLOCK_GC(); - return rv; -} - -PR_IMPLEMENT(PRStatus) PR_RegisterRootFinder( - GCRootFinder f, char *name, void *arg) -{ - RootFinder *rf = PR_NEWZAP(RootFinder); - if (rf) { - rf->func = f; - rf->name = name; - rf->arg = arg; - - LOCK_GC(); - rf->next = _pr_rootFinders; - _pr_rootFinders = rf; - UNLOCK_GC(); - return PR_SUCCESS; - } - return PR_FAILURE; -} - - -PR_IMPLEMENT(int) PR_RegisterGCLockHook(GCLockHookFunc* f, void *arg) -{ - - GCLockHook *rf = 0; - - rf = (GCLockHook*) calloc(1, sizeof(GCLockHook)); - if (rf) { - rf->func = f; - rf->arg = arg; - - LOCK_GC(); - /* first dummy node */ - if (! _pr_GCLockHook) { - _pr_GCLockHook = (GCLockHook*) calloc(1, sizeof(GCLockHook)); - _pr_GCLockHook->next = _pr_GCLockHook; - _pr_GCLockHook->prev = _pr_GCLockHook; - } - - rf->next = _pr_GCLockHook; - rf->prev = _pr_GCLockHook->prev; - _pr_GCLockHook->prev->next = rf; - _pr_GCLockHook->prev = rf; - UNLOCK_GC(); - return 0; - } - return -1; -} - -/* -PR_IMPLEMENT(void) PR_SetGCLockHook(GCLockHook *hook, void *arg) -{ - LOCK_GC(); - _pr_GCLockHook = hook; - _pr_GCLockHookArg2 = arg; - UNLOCK_GC(); -} - -PR_IMPLEMENT(void) PR_GetGCLockHook(GCLockHook **hook, void **arg) -{ - LOCK_GC(); - *hook = _pr_GCLockHook; - *arg = _pr_GCLockHookArg2; - UNLOCK_GC(); -} -*/ - - -PR_IMPLEMENT(void) PR_SetBeginGCHook(GCBeginGCHook *hook, void *arg) -{ - LOCK_GC(); - _pr_beginGCHook = hook; - _pr_beginGCHookArg = arg; - UNLOCK_GC(); -} - -PR_IMPLEMENT(void) PR_GetBeginGCHook(GCBeginGCHook **hook, void **arg) -{ - LOCK_GC(); - *hook = _pr_beginGCHook; - *arg = _pr_beginGCHookArg; - UNLOCK_GC(); -} - -PR_IMPLEMENT(void) PR_SetEndGCHook(GCEndGCHook *hook, void *arg) -{ - LOCK_GC(); - _pr_endGCHook = hook; - _pr_endGCHookArg = arg; - UNLOCK_GC(); -} - -PR_IMPLEMENT(void) PR_GetEndGCHook(GCEndGCHook **hook, void **arg) -{ - LOCK_GC(); - *hook = _pr_endGCHook; - *arg = _pr_endGCHookArg; - UNLOCK_GC(); -} - -PR_IMPLEMENT(void) PR_SetBeginFinalizeHook(GCBeginFinalizeHook *hook, void *arg) -{ - LOCK_GC(); - _pr_beginFinalizeHook = hook; - _pr_beginFinalizeHookArg = arg; - UNLOCK_GC(); -} - -PR_IMPLEMENT(void) PR_GetBeginFinalizeHook(GCBeginFinalizeHook **hook, - void **arg) -{ - LOCK_GC(); - *hook = _pr_beginFinalizeHook; - *arg = _pr_beginFinalizeHookArg; - UNLOCK_GC(); -} - -PR_IMPLEMENT(void) PR_SetEndFinalizeHook(GCEndFinalizeHook *hook, void *arg) -{ - LOCK_GC(); - _pr_endFinalizeHook = hook; - _pr_endFinalizeHookArg = arg; - UNLOCK_GC(); -} - -PR_IMPLEMENT(void) PR_GetEndFinalizeHook(GCEndFinalizeHook **hook, void **arg) -{ - LOCK_GC(); - *hook = _pr_endFinalizeHook; - *arg = _pr_endFinalizeHookArg; - UNLOCK_GC(); -} - -#ifdef DEBUG -#include "prprf.h" - -PR_IMPLEMENT(void) GCTrace(char *fmt, ...) -{ - va_list ap; - char buf[400]; - - va_start(ap, fmt); - PR_vsnprintf(buf, sizeof(buf), fmt, ap); - va_end(ap); - PR_LOG(_pr_msgc_lm, PR_LOG_ALWAYS, ("%s", buf)); -} -#endif - -void _PR_InitGC(PRWord flags) -{ - static char firstTime = 1; - - if (!firstTime) return; - firstTime = 0; - - _MD_InitGC(); - - if (flags == 0) { - char *ev = PR_GetEnv("GCLOG"); - if (ev && ev[0]) { - flags = atoi(ev); - } - } - _pr_gcData.flags = flags; - - _pr_gcData.lock = PR_NewMonitor(); - - _pr_collectorTypes = (CollectorType*) PR_CALLOC(256 * sizeof(CollectorType)); - - PR_RegisterRootFinder(ScanThreads, "scan threads", 0); - PR_RegisterRootFinder(_PR_ScanFinalQueue, "scan final queue", 0); -} - -extern void pr_FinalizeOnExit(void); - -#ifdef DEBUG -#ifdef GC_STATS -PR_PUBLIC_API(void) PR_PrintGCAllocStats(void); -#endif -#endif - -PR_IMPLEMENT(void) -PR_ShutdownGC(PRBool finalizeOnExit) -{ - /* first finalize all the objects in the heap */ - if (finalizeOnExit) { - pr_FinalizeOnExit(); - } - -#ifdef DEBUG -#ifdef GC_STATS - PR_PrintGCAllocStats(); -#endif /* GC_STATS */ -#endif /* DEBUG */ - - /* then the chance for any future allocations */ - - /* finally delete the gc heap */ - - /* write me */ -} - -/******************************************************************************/ diff --git a/lib/msgc/src/prmsgc.c b/lib/msgc/src/prmsgc.c deleted file mode 100644 index 2c1e8539..00000000 --- a/lib/msgc/src/prmsgc.c +++ /dev/null @@ -1,3320 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ - -#include <string.h> -#include <stddef.h> -#include <stdarg.h> -#include <time.h> - -#ifdef WIN32 -#include <windef.h> -#include <winbase.h> -#endif - -#include "prclist.h" -#include "prbit.h" - -#include "prtypes.h" -#include "prenv.h" -#include "prgc.h" -#include "prthread.h" -#include "prlog.h" -#include "prlong.h" -#include "prinrval.h" -#include "prprf.h" -#include "gcint.h" - -#include "private/pprthred.h" - -typedef void (*PRFileDumper)(FILE *out, PRBool detailed); - -PR_EXTERN(void) -PR_DumpToFile(char* filename, char* msg, PRFileDumper dump, PRBool detailed); - -/* -** Mark&sweep garbage collector. Supports objects that require -** finalization, objects that can have a single weak link, and special -** objects that require care during sweeping. -*/ - -PRLogModuleInfo *_pr_msgc_lm; -PRLogModuleInfo* GC; - -static PRInt32 _pr_pageShift; -static PRInt32 _pr_pageSize; - -#ifdef DEBUG -#define GCMETER -#endif -#ifdef DEBUG_jwz -# undef GCMETER -#endif /* 1 */ - -#ifdef GCMETER -#define METER(x) x -#else -#define METER(x) -#endif - -/* -** Make this constant bigger to reduce the amount of recursion during -** garbage collection. -*/ -#define MAX_SCAN_Q 100L - -#if defined(XP_PC) && !defined(WIN32) -#define MAX_SEGS 400L -#define MAX_SEGMENT_SIZE (65536L - 4096L) -#define SEGMENT_SIZE (65536L - 4096L) -#define MAX_ALLOC_SIZE (65536L - 4096L) -#else -#define MAX_SEGS 400L -#define MAX_SEGMENT_SIZE (2L * 256L * 1024L) -#define SEGMENT_SIZE (1L * 256L * 1024L) -#define MAX_ALLOC_SIZE (4L * 1024L * 1024L) -#endif - -/* - * The highest value that can fit into a signed integer. This - * is used to prevent overflow of allocation size in alloc routines. - */ - -#define MAX_INT ((1UL << (PR_BITS_PER_INT - 1)) - 1) - -/* - * On 32-bit machines, only 22 bits are used in the cibx integer to - * store size since 8 bits of the integer are used to store type, and - * of the remainder, 2 are user defined. Max allocation size = 2^22 -1 - */ - -#define MAX_ALLOC ( (1L << (PR_BYTES_PER_WORD_LOG2 + WORDS_BITS )) -1) - -/* The minimum percentage of free heap space after a collection. If - the amount of free space doesn't meet this criteria then we will - attempt to grow the heap */ -#define MIN_FREE_THRESHOLD_AFTER_GC 20L - -static PRInt32 segmentSize = SEGMENT_SIZE; - -static PRInt32 collectorCleanupNeeded; - -#ifdef GCMETER -PRUint32 _pr_gcMeter; - -#define _GC_METER_STATS 0x01L -#define _GC_METER_GROWTH 0x02L -#define _GC_METER_FREE_LIST 0x04L -#endif - -/************************************************************************/ - -#define LINEAR_BIN_EXPONENT 5 -#define NUM_LINEAR_BINS ((PRUint32)1 << LINEAR_BIN_EXPONENT) -#define FIRST_LOG_BIN (NUM_LINEAR_BINS - LINEAR_BIN_EXPONENT) - -/* Each free list bin holds a chunk of memory sized from - 2^n to (2^(n+1))-1 inclusive. */ -#define NUM_BINS (FIRST_LOG_BIN + 32) - -/* - * Find the bin number for a given size (in bytes). This does not round up as - * values from 2^n to (2^(n+1))-1 share the same bin. - */ -#define InlineBinNumber(_bin,_bytes) \ -{ \ - PRUint32 _t, _n = (PRUint32) _bytes / 4; \ - if (_n < NUM_LINEAR_BINS) { \ - _bin = _n; \ - } else { \ - _bin = FIRST_LOG_BIN; \ - if ((_t = (_n >> 16)) != 0) { _bin += 16; _n = _t; } \ - if ((_t = (_n >> 8)) != 0) { _bin += 8; _n = _t; } \ - if ((_t = (_n >> 4)) != 0) { _bin += 4; _n = _t; } \ - if ((_t = (_n >> 2)) != 0) { _bin += 2; _n = _t; } \ - if ((_n >> 1) != 0) _bin++; \ - } \ -} - -#define BIG_ALLOC 16384L - -#define MIN_FREE_CHUNK_BYTES ((PRInt32)sizeof(GCFreeChunk)) - -/* Note: fix code in PR_AllocMemory if you change the size of GCFreeChunk - so that it zeros the right number of words */ -typedef struct GCFreeChunk { - struct GCFreeChunk *next; - struct GCSeg *segment; - PRInt32 chunkSize; -} GCFreeChunk; - -typedef struct GCSegInfo { - struct GCSegInfo *next; - char *base; - char *limit; - PRWord *hbits; - int fromMalloc; -} GCSegInfo; - -typedef struct GCSeg { - char *base; - char *limit; - PRWord *hbits; - GCSegInfo *info; -} GCSeg; - -#ifdef GCMETER -typedef struct GCMeter { - PRInt32 allocBytes; - PRInt32 wastedBytes; - PRInt32 numFreeChunks; - PRInt32 skippedFreeChunks; -} GCMeter; -static GCMeter meter; -#endif - -/* -** There is one of these for each segment of GC'able memory. -*/ -static GCSeg segs[MAX_SEGS]; -static GCSegInfo *freeSegs; -static GCSeg* lastInHeap; -static int nsegs; - -static GCFreeChunk *bins[NUM_BINS]; -static PRInt32 minBin; -static PRInt32 maxBin; - -/* -** Scan Q used to avoid deep recursion when scanning live objects for -** heap pointers -*/ -typedef struct GCScanQStr { - PRWord *q[MAX_SCAN_Q]; - int queued; -} GCScanQ; - -static GCScanQ *pScanQ; - -#ifdef GCMETER -PRInt32 _pr_maxScanDepth; -PRInt32 _pr_scanDepth; -#endif - -/* -** Keeps track of the number of bytes allocated via the BigAlloc() -** allocator. When the number of bytes allocated, exceeds the -** BIG_ALLOC_GC_SIZE, then a GC will occur before the next allocation -** is done... -*/ -#define BIG_ALLOC_GC_SIZE (4*SEGMENT_SIZE) -static PRWord bigAllocBytes = 0; - -/* -** There is one GC header word in front of each GC allocated object. We -** use it to contain information about the object (what TYPEIX to use for -** scanning it, how big it is, it's mark status, and if it's a root). -*/ -#define TYPEIX_BITS 8L -#define WORDS_BITS 20L -#define MAX_CBS (1L << GC_TYPEIX_BITS) -#define MAX_WORDS (1L << GC_WORDS_BITS) -#define TYPEIX_SHIFT 24L -#define MAX_TYPEIX ((1L << TYPEIX_BITS) - 1L) -#define TYPEIX_MASK PR_BITMASK(TYPEIX_BITS) -#define WORDS_SHIFT 2L -#define WORDS_MASK PR_BITMASK(WORDS_BITS) -#define MARK_BIT 1L -#define FINAL_BIT 2L - -/* Two bits per object header are reserved for the user of the memory - system to store information into. */ -#define GC_USER_BITS_SHIFT 22L -#define GC_USER_BITS 0x00c00000L - -#define MAKE_HEADER(_cbix,_words) \ - ((PRWord) (((unsigned long)(_cbix) << TYPEIX_SHIFT) \ - | ((unsigned long)(_words) << WORDS_SHIFT))) - -#define GET_TYPEIX(_h) \ - (((PRUword)(_h) >> TYPEIX_SHIFT) & 0xff) - -#define MARK(_sp,_p) \ - (((PRWord *)(_p))[0] |= MARK_BIT) -#define IS_MARKED(_sp,_p) \ - (((PRWord *)(_p))[0] & MARK_BIT) -#define OBJ_BYTES(_h) \ - (((PRInt32) (_h) & 0x003ffffcL) << (PR_BYTES_PER_WORD_LOG2-2L)) - -#define GC_GET_USER_BITS(_h) (((_h) & GC_USER_BITS) >> GC_USER_BITS_SHIFT) - -/************************************************************************/ - -/* -** Mark the start of an object in a segment. Note that we mark the header -** word (which we always have), not the data word (which we may not have -** for empty objects). -** XXX tune: put subtract of _sp->base into _sp->hbits pointer? -*/ -#define SET_HBIT(_sp,_ph) \ - SET_BIT((_sp)->hbits, (((PRWord*)(_ph)) - ((PRWord*) (_sp)->base))) - -#define CLEAR_HBIT(_sp,_ph) \ - CLEAR_BIT((_sp)->hbits, (((PRWord*)(_ph)) - ((PRWord*) (_sp)->base))) - -#define IS_HBIT(_sp,_ph) \ - TEST_BIT((_sp)->hbits, (((PRWord*)(_ph)) - ((PRWord*) (_sp)->base))) - -/* -** Given a pointer into this segment, back it up until we are at the -** start of the object the pointer points into. Each heap segment has a -** bitmap that has one bit for each word of the objects it contains. The -** bit's are set for the firstword of an object, and clear for it's other -** words. -*/ -static PRWord *FindObject(GCSeg *sp, PRWord *p) -{ - PRWord *base; - - /* Align p to it's proper boundary before we start fiddling with it */ - p = (PRWord*) ((PRWord)p & ~(PR_BYTES_PER_WORD-1L)); - - base = (PRWord *) sp->base; - do { - if (IS_HBIT(sp, p)) { - return (p); - } - p--; - } while ( p >= base ); - - /* Heap is corrupted! */ - _GCTRACE(GC_TRACE, ("ERROR: The heap is corrupted!!! aborting now!")); - abort(); - return NULL; -} - -/************************************************************************/ -#if !defined(XP_PC) || defined(XP_OS2) -#define OutputDebugString(msg) -#endif - -#define IN_SEGMENT(_sp, _p) \ - ((((char *)(_p)) >= (_sp)->base) && \ - (((char *)(_p)) < (_sp)->limit)) - -static GCSeg *InHeap(void *p) -{ - GCSeg *sp, *esp; - - if (lastInHeap && IN_SEGMENT(lastInHeap, p)) { - return lastInHeap; - } - - sp = segs; - esp = segs + nsegs; - for (; sp < esp; sp++) { - if (IN_SEGMENT(sp, p)) { - lastInHeap = sp; - return sp; - } - } - return 0; -} - -/* -** Grow the heap by allocating another segment. Fudge the requestedSize -** value to try to pre-account for the HBITS. -*/ -static GCSeg* DoGrowHeap(PRInt32 requestedSize, PRBool exactly) -{ - GCSeg *sp; - GCSegInfo *segInfo; - GCFreeChunk *cp; - char *base; - PRWord *hbits; - PRInt32 nhbytes, nhbits; - PRUint32 allocSize; - - if (nsegs == MAX_SEGS) { - /* No room for more segments */ - return 0; - } - - segInfo = (GCSegInfo*) PR_MALLOC(sizeof(GCSegInfo)); -#ifdef DEBUG - { - char str[256]; - sprintf(str, "[1] Allocated %ld bytes at %p\n", - (long) sizeof(GCSegInfo), segInfo); - OutputDebugString(str); - } -#endif - if (!segInfo) { - return 0; - } - - /* Get more memory from the OS */ - if (exactly) { - allocSize = requestedSize; - base = (char *) PR_MALLOC(requestedSize); - } else { - allocSize = requestedSize; - allocSize = (allocSize + _pr_pageSize - 1L) >> _pr_pageShift; - allocSize <<= _pr_pageShift; - base = (char*)_MD_GrowGCHeap(&allocSize); - } - if (!base) { - PR_DELETE(segInfo); - return 0; - } - - nhbits = (PRInt32)( - (allocSize + PR_BYTES_PER_WORD - 1L) >> PR_BYTES_PER_WORD_LOG2); - nhbytes = ((nhbits + PR_BITS_PER_WORD - 1L) >> PR_BITS_PER_WORD_LOG2) - * sizeof(PRWord); - - /* Get bitmap memory from malloc heap */ - hbits = (PRWord *) PR_CALLOC((PRUint32)nhbytes); - if (!hbits) { - /* Loser! */ - PR_DELETE(segInfo); - if (exactly) { - PR_DELETE(base); - } else { - /* XXX do something about this */ - /* _MD_FreeGCSegment(base, allocSize); */ - } - return 0; - } - - /* - ** Setup new segment. - */ - sp = &segs[nsegs++]; - segInfo->base = sp->base = base; - segInfo->limit = sp->limit = base + allocSize; - segInfo->hbits = sp->hbits = hbits; - sp->info = segInfo; - segInfo->fromMalloc = exactly; - memset(base, 0, allocSize); - -#ifdef GCMETER - if (_pr_gcMeter & _GC_METER_GROWTH) { - fprintf(stderr, "[GC: new segment base=%p size=%ld]\n", - sp->base, (long) allocSize); - } -#endif - - _pr_gcData.allocMemory += allocSize; - _pr_gcData.freeMemory += allocSize; - - if (!exactly) { - PRInt32 bin; - - /* Put free memory into a freelist bin */ - cp = (GCFreeChunk *) base; - cp->segment = sp; - cp->chunkSize = allocSize; - InlineBinNumber(bin, allocSize) - cp->next = bins[bin]; - bins[bin] = cp; - if (bin < minBin) minBin = bin; - if (bin > maxBin) maxBin = bin; - } else { - /* - ** When exactly allocating the entire segment is given over to a - ** single object to prevent fragmentation - */ - } - - if (!_pr_gcData.lowSeg) { - _pr_gcData.lowSeg = (PRWord*) sp->base; - _pr_gcData.highSeg = (PRWord*) sp->limit; - } else { - if ((PRWord*)sp->base < _pr_gcData.lowSeg) { - _pr_gcData.lowSeg = (PRWord*) sp->base; - } - if ((PRWord*)sp->limit > _pr_gcData.highSeg) { - _pr_gcData.highSeg = (PRWord*) sp->limit; - } - } - - /* - ** Get rid of the GC pointer in case it shows up in some uninitialized - ** local stack variable later (while scanning the C stack looking for - ** roots). - */ - memset(&base, 0, sizeof(base)); /* optimizers beware */ - - PR_LOG(_pr_msgc_lm, PR_LOG_WARNING, ("grow heap: total gc memory now %d", - _pr_gcData.allocMemory)); - - return sp; -} - -#ifdef USE_EXTEND_HEAP -static PRBool ExtendHeap(PRInt32 requestedSize) { - GCSeg* sp; - PRUint32 allocSize; - PRInt32 oldSize, newSize; - PRInt32 newHBits, newHBytes; - PRInt32 oldHBits, oldHBytes; - PRWord* hbits; - GCFreeChunk* cp; - PRInt32 bin; - - /* Can't extend nothing */ - if (nsegs == 0) return PR_FALSE; - - /* Round up requested size to the size of a page */ - allocSize = (PRUint32) requestedSize; - allocSize = (allocSize + _pr_pageSize - 1L) >> _pr_pageShift; - allocSize <<= _pr_pageShift; - - /* Malloc some memory for the new hbits array */ - sp = segs; - oldSize = sp->limit - sp->base; - newSize = oldSize + allocSize; - newHBits = (newSize + PR_BYTES_PER_WORD - 1L) >> PR_BYTES_PER_WORD_LOG2; - newHBytes = ((newHBits + PR_BITS_PER_WORD - 1L) >> PR_BITS_PER_WORD_LOG2) - * sizeof(PRWord); - hbits = (PRWord*) PR_MALLOC(newHBytes); - if (0 == hbits) return PR_FALSE; - - /* Attempt to extend the last segment by the desired amount */ - if (_MD_ExtendGCHeap(sp->base, oldSize, newSize)) { - oldHBits = (oldSize + PR_BYTES_PER_WORD - 1L) >> PR_BYTES_PER_WORD_LOG2; - oldHBytes = ((oldHBits + PR_BITS_PER_WORD - 1L) >> PR_BITS_PER_WORD_LOG2) - * sizeof(PRWord); - - /* Copy hbits from old memory into new memory */ - memset(hbits, 0, newHBytes); - memcpy(hbits, sp->hbits, oldHBytes); - PR_DELETE(sp->hbits); - memset(sp->base + oldSize, 0, allocSize); - - /* Adjust segment state */ - sp->limit += allocSize; - sp->hbits = hbits; - sp->info->limit = sp->limit; - sp->info->hbits = hbits; - - /* Put free memory into a freelist bin */ - cp = (GCFreeChunk *) (sp->base + oldSize); - cp->segment = sp; - cp->chunkSize = allocSize; - InlineBinNumber(bin, allocSize) - cp->next = bins[bin]; - bins[bin] = cp; - if (bin < minBin) minBin = bin; - if (bin > maxBin) maxBin = bin; - - /* Prevent a pointer that points to the free memory from showing - up on the call stack later on */ - memset(&cp, 0, sizeof(cp)); - - /* Update heap brackets and counters */ - if ((PRWord*)sp->limit > _pr_gcData.highSeg) { - _pr_gcData.highSeg = (PRWord*) sp->limit; - } - _pr_gcData.allocMemory += allocSize; - _pr_gcData.freeMemory += allocSize; - - return PR_TRUE; - } - PR_DELETE(hbits); - return PR_FALSE; -} -#endif /* USE_EXTEND_HEAP */ - -static GCSeg *GrowHeapExactly(PRInt32 requestedSize) -{ - GCSeg *sp = DoGrowHeap(requestedSize, PR_TRUE); - return sp; -} - -static PRBool GrowHeap(PRInt32 requestedSize) -{ - void *p; -#ifdef USE_EXTEND_HEAP - if (ExtendHeap(requestedSize)) { - return PR_TRUE; - } -#endif - p = DoGrowHeap(requestedSize, PR_FALSE); - return (p != NULL ? PR_TRUE : PR_FALSE); -} - -/* -** Release a segment when it is entirely free. -*/ -static void ShrinkGCHeap(GCSeg *sp) -{ -#ifdef GCMETER - if (_pr_gcMeter & _GC_METER_GROWTH) { - fprintf(stderr, "[GC: free segment base=%p size=%ld]\n", - sp->base, (long) (sp->limit - sp->base)); - } -#endif - - /* - * Put segment onto free seginfo list (we can't call free right now - * because we have the GC lock and all of the other threads are - * suspended; if one of them has the malloc lock we would deadlock) - */ - sp->info->next = freeSegs; - freeSegs = sp->info; - collectorCleanupNeeded = 1; - _pr_gcData.allocMemory -= sp->limit - sp->base; - if (sp == lastInHeap) lastInHeap = 0; - - /* Squish out disappearing segment from segment table */ - --nsegs; - if ((sp - segs) != nsegs) { - *sp = segs[nsegs]; - } else { - sp->base = 0; - sp->limit = 0; - sp->hbits = 0; - sp->info = 0; - } - - /* Recalculate the lowSeg and highSeg values */ - _pr_gcData.lowSeg = (PRWord*) segs[0].base; - _pr_gcData.highSeg = (PRWord*) segs[0].limit; - for (sp = segs; sp < &segs[nsegs]; sp++) { - if ((PRWord*)sp->base < _pr_gcData.lowSeg) { - _pr_gcData.lowSeg = (PRWord*) sp->base; - } - if ((PRWord*)sp->limit > _pr_gcData.highSeg) { - _pr_gcData.highSeg = (PRWord*) sp->limit; - } - } -} - -static void FreeSegments(void) -{ - GCSegInfo *si; - - while (0 != freeSegs) { - LOCK_GC(); - si = freeSegs; - if (si) { - freeSegs = si->next; - } - UNLOCK_GC(); - - if (!si) { - break; - } - PR_DELETE(si->base); - PR_DELETE(si->hbits); - PR_DELETE(si); - } -} - -/************************************************************************/ - -void ScanScanQ(GCScanQ *iscan) -{ - PRWord *p; - PRWord **pp; - PRWord **epp; - GCScanQ nextQ, *scan, *next, *temp; - CollectorType *ct; - - if (!iscan->queued) return; - - _GCTRACE(GC_MARK, ("begin scanQ @ 0x%x (%d)", iscan, iscan->queued)); - scan = iscan; - next = &nextQ; - while (scan->queued) { - _GCTRACE(GC_MARK, ("continue scanQ @ 0x%x (%d)", scan, scan->queued)); - /* - * Set pointer to current scanQ so that _pr_gcData.livePointer - * can find it. - */ - pScanQ = next; - next->queued = 0; - - /* Now scan the scan Q */ - pp = scan->q; - epp = &scan->q[scan->queued]; - scan->queued = 0; - while (pp < epp) { - p = *pp++; - ct = &_pr_collectorTypes[GET_TYPEIX(p[0])]; - PR_ASSERT(0 != ct->gctype.scan); - /* Scan object ... */ - (*ct->gctype.scan)(p + 1); - } - - /* Exchange pointers so that we scan next */ - temp = scan; - scan = next; - next = temp; - } - - pScanQ = iscan; - PR_ASSERT(nextQ.queued == 0); - PR_ASSERT(iscan->queued == 0); -} - -/* -** Called during root finding step to identify "root" pointers into the -** GC heap. First validate if it is a real heap pointer and then mark the -** object being pointed to and add it to the scan Q for eventual -** scanning. -*/ -static void PR_CALLBACK ProcessRootBlock(void **base, PRInt32 count) -{ - GCSeg *sp; - PRWord *p0, *p, h, tix, *low, *high, *segBase; - CollectorType *ct; -#ifdef DEBUG - void **base0 = base; -#endif - - low = _pr_gcData.lowSeg; - high = _pr_gcData.highSeg; - while (--count >= 0) { - p0 = (PRWord*) *base++; - if (p0 < low) continue; /* below gc heap */ - if (p0 >= high) continue; /* above gc heap */ - /* NOTE: inline expansion of InHeap */ - /* Find segment */ - sp = lastInHeap; - if (!sp || !IN_SEGMENT(sp,p0)) { - GCSeg *esp; - sp = segs; - esp = segs + nsegs; - for (; sp < esp; sp++) { - if (IN_SEGMENT(sp, p0)) { - lastInHeap = sp; - goto find_object; - } - } - continue; - } - - find_object: - /* NOTE: Inline expansion of FindObject */ - /* Align p to it's proper boundary before we start fiddling with it */ - p = (PRWord*) ((PRWord)p0 & ~(PR_BYTES_PER_WORD-1L)); - segBase = (PRWord *) sp->base; - do { - if (IS_HBIT(sp, p)) { - goto winner; - } - p--; - } while (p >= segBase); - - /* - ** We have a pointer into the heap, but it has no header - ** bit. This means that somehow the very first object in the heap - ** doesn't have a header. This is impossible so when debugging - ** lets abort. - */ -#ifdef DEBUG - PR_Abort(); -#endif - - winner: - h = p[0]; - if ((h & MARK_BIT) == 0) { -#ifdef DEBUG - _GCTRACE(GC_ROOTS, - ("root 0x%p (%d) base0=%p off=%d", - p, OBJ_BYTES(h), base0, (base-1) - base0)); -#endif - - /* Mark the root we just found */ - p[0] = h | MARK_BIT; - - /* - * See if object we just found needs scanning. It must - * have a scan function to be placed on the scanQ. - */ - tix = (PRWord)GET_TYPEIX(h); - ct = &_pr_collectorTypes[tix]; - if (0 == ct->gctype.scan) { - continue; - } - - /* - ** Put a pointer onto the scan Q. We use the scan Q to avoid - ** deep recursion on the C call stack. Objects are added to - ** the scan Q until the scan Q fills up. At that point we - ** make a call to ScanScanQ which proceeds to scan each of - ** the objects in the Q. This limits the recursion level by a - ** large amount though the stack frames get larger to hold - ** the GCScanQ's. - */ - pScanQ->q[pScanQ->queued++] = p; - if (pScanQ->queued == MAX_SCAN_Q) { - METER(_pr_scanDepth++); - ScanScanQ(pScanQ); - } - } - } -} - -static void PR_CALLBACK ProcessRootPointer(void *ptr) -{ - PRWord *p0, *p, h, tix, *segBase; - GCSeg* sp; - CollectorType *ct; - - p0 = (PRWord*) ptr; - - if (p0 < _pr_gcData.lowSeg) return; /* below gc heap */ - if (p0 >= _pr_gcData.highSeg) return; /* above gc heap */ - - /* NOTE: inline expansion of InHeap */ - /* Find segment */ - sp = lastInHeap; - if (!sp || !IN_SEGMENT(sp,p0)) { - GCSeg *esp; - sp = segs; - esp = segs + nsegs; - for (; sp < esp; sp++) { - if (IN_SEGMENT(sp, p0)) { - lastInHeap = sp; - goto find_object; - } - } - return; - } - - find_object: - /* NOTE: Inline expansion of FindObject */ - /* Align p to it's proper boundary before we start fiddling with it */ - p = (PRWord*) ((PRWord)p0 & ~(BYTES_PER_WORD-1L)); - segBase = (PRWord *) sp->base; - do { - if (IS_HBIT(sp, p)) { - goto winner; - } - p--; - } while (p >= segBase); - - /* - ** We have a pointer into the heap, but it has no header - ** bit. This means that somehow the very first object in the heap - ** doesn't have a header. This is impossible so when debugging - ** lets abort. - */ -#ifdef DEBUG - PR_Abort(); -#endif - - winner: - h = p[0]; - if ((h & MARK_BIT) == 0) { -#ifdef DEBUG - _GCTRACE(GC_ROOTS, ("root 0x%p (%d)", p, OBJ_BYTES(h))); -#endif - - /* Mark the root we just found */ - p[0] = h | MARK_BIT; - - /* - * See if object we just found needs scanning. It must - * have a scan function to be placed on the scanQ. - */ - tix = (PRWord)GET_TYPEIX(h); - ct = &_pr_collectorTypes[tix]; - if (0 == ct->gctype.scan) { - return; - } - - /* - ** Put a pointer onto the scan Q. We use the scan Q to avoid - ** deep recursion on the C call stack. Objects are added to - ** the scan Q until the scan Q fills up. At that point we - ** make a call to ScanScanQ which proceeds to scan each of - ** the objects in the Q. This limits the recursion level by a - ** large amount though the stack frames get larger to hold - ** the GCScanQ's. - */ - pScanQ->q[pScanQ->queued++] = p; - if (pScanQ->queued == MAX_SCAN_Q) { - METER(_pr_scanDepth++); - ScanScanQ(pScanQ); - } - } -} - -/************************************************************************/ - -/* -** Empty the freelist for each segment. This is done to make sure that -** the root finding step works properly (otherwise, if we had a pointer -** into a free section, we might not find its header word and abort in -** FindObject) -*/ -static void EmptyFreelists(void) -{ - GCFreeChunk *cp; - GCFreeChunk *next; - GCSeg *sp; - PRWord *p; - PRInt32 chunkSize; - PRInt32 bin; - - /* - ** Run over the freelist and make all of the free chunks look like - ** object debris. - */ - for (bin = 0; bin <= NUM_BINS-1; bin++) { - cp = bins[bin]; - while (cp) { - next = cp->next; - sp = cp->segment; - chunkSize = cp->chunkSize >> BYTES_PER_WORD_LOG2; - p = (PRWord*) cp; - PR_ASSERT(chunkSize != 0); - p[0] = MAKE_HEADER(FREE_MEMORY_TYPEIX, chunkSize); - SET_HBIT(sp, p); - cp = next; - } - bins[bin] = 0; - } - minBin = NUM_BINS - 1; - maxBin = 0; -} - -typedef struct GCBlockEnd { - PRInt32 check; -#ifdef GC_CHECK - PRInt32 requestedBytes; -#endif -#ifdef GC_STATS - PRInt32 bin; - PRInt64 allocTime; -#endif -#ifdef GC_TRACEROOTS - PRInt32 traceGeneration; -#endif -} GCBlockEnd; - -#define PR_BLOCK_END 0xDEADBEEF - -/************************************************************************/ - -#ifdef GC_STATS - -typedef struct GCStat { - PRInt32 nallocs; - double allocTime; - double allocTimeVariance; - PRInt32 nfrees; - double lifetime; - double lifetimeVariance; -} GCStat; - -#define GCSTAT_BINS NUM_BINS - -GCStat gcstats[GCSTAT_BINS]; - -#define GCLTFREQ_BINS NUM_BINS - -PRInt32 gcltfreq[GCSTAT_BINS][GCLTFREQ_BINS]; - -#include <math.h> - -static char* -pr_GetSizeString(PRUint32 size) -{ - char* sizeStr; - if (size < 1024) - sizeStr = PR_smprintf("<= %ld", size); - else if (size < 1024 * 1024) - sizeStr = PR_smprintf("<= %ldk", size / 1024); - else - sizeStr = PR_smprintf("<= %ldM", size / (1024 * 1024)); - return sizeStr; -} - -static void -pr_FreeSizeString(char *sizestr) -{ - PR_smprintf_free(sizestr); -} - - -static void -pr_PrintGCAllocStats(FILE* out) -{ - PRInt32 i, j; - _PR_DebugPrint(out, "\n--Allocation-Stats-----------------------------------------------------------"); - _PR_DebugPrint(out, "\n--Obj-Size----Count-----Avg-Alloc-Time-----------Avg-Lifetime---------%%Freed-\n"); - for (i = 0; i < GCSTAT_BINS; i++) { - GCStat stat = gcstats[i]; - double allocTimeMean = 0.0, allocTimeVariance = 0.0, lifetimeMean = 0.0, lifetimeVariance = 0.0; - PRUint32 maxSize = (1 << i); - char* sizeStr; - if (stat.nallocs != 0.0) { - allocTimeMean = stat.allocTime / stat.nallocs; - allocTimeVariance = fabs(stat.allocTimeVariance / stat.nallocs - allocTimeMean * allocTimeMean); - } - if (stat.nfrees != 0.0) { - lifetimeMean = stat.lifetime / stat.nfrees; - lifetimeVariance = fabs(stat.lifetimeVariance / stat.nfrees - lifetimeMean * lifetimeMean); - } - sizeStr = pr_GetSizeString(maxSize); - _PR_DebugPrint(out, "%10s %8lu %10.3f +- %10.3f %10.3f +- %10.3f (%2ld%%)\n", - sizeStr, stat.nallocs, - allocTimeMean, sqrt(allocTimeVariance), - lifetimeMean, sqrt(lifetimeVariance), - (stat.nallocs ? (stat.nfrees * 100 / stat.nallocs) : 0)); - pr_FreeSizeString(sizeStr); - } - _PR_DebugPrint(out, "--Lifetime-Frequency-Counts----------------------------------------------------\n"); - _PR_DebugPrint(out, "size\\cnt"); - for (j = 0; j < GCLTFREQ_BINS; j++) { - _PR_DebugPrint(out, "\t%lu", j); - } - _PR_DebugPrint(out, "\n"); - for (i = 0; i < GCSTAT_BINS; i++) { - PRInt32* freqs = gcltfreq[i]; - _PR_DebugPrint(out, "%lu", (1 << i)); - for (j = 0; j < GCLTFREQ_BINS; j++) { - _PR_DebugPrint(out, "\t%lu", freqs[j]); - } - _PR_DebugPrint(out, "\n"); - } - _PR_DebugPrint(out, "-------------------------------------------------------------------------------\n"); -} - -PR_PUBLIC_API(void) -PR_PrintGCAllocStats(void) -{ - pr_PrintGCAllocStats(stderr); -} - -#endif /* GC_STATS */ - -/************************************************************************/ - -/* -** Sweep a segment, cleaning up all of the debris. Coallese the debris -** into GCFreeChunk's which are added to the freelist bins. -*/ -static PRBool SweepSegment(GCSeg *sp) -{ - PRWord h, tix; - PRWord *p; - PRWord *np; - PRWord *limit; - GCFreeChunk *cp; - PRInt32 bytes, chunkSize, segmentSize, totalFree; - CollectorType *ct; - PRInt32 bin; - - /* - ** Now scan over the segment's memory in memory order, coallescing - ** all of the debris into a FreeChunk list. - */ - totalFree = 0; - segmentSize = sp->limit - sp->base; - p = (PRWord *) sp->base; - limit = (PRWord *) sp->limit; - PR_ASSERT(segmentSize > 0); - while (p < limit) { - chunkSize = 0; - cp = (GCFreeChunk *) p; - - /* Attempt to coallesce any neighboring free objects */ - for (;;) { - PR_ASSERT(IS_HBIT(sp, p) != 0); - h = p[0]; - bytes = OBJ_BYTES(h); - PR_ASSERT(bytes != 0); - np = (PRWord *) ((char *)p + bytes); - tix = (PRWord)GET_TYPEIX(h); - if ((h & MARK_BIT) && (tix != FREE_MEMORY_TYPEIX)) { -#ifdef DEBUG - if (tix != FREE_MEMORY_TYPEIX) { - PR_ASSERT(_pr_collectorTypes[tix].flags != 0); - } -#endif - p[0] = h & ~(MARK_BIT|FINAL_BIT); - _GCTRACE(GC_SWEEP, ("busy 0x%x (%d)", p, bytes)); - break; - } - _GCTRACE(GC_SWEEP, ("free 0x%x (%d)", p, bytes)); - - /* Found a free object */ -#ifdef GC_STATS - { - PRInt32 userSize = bytes - sizeof(GCBlockEnd); - GCBlockEnd* end = (GCBlockEnd*)((char*)p + userSize); - if (userSize >= 0 && end->check == PR_BLOCK_END) { - PRInt64 now = PR_Now(); - double nowd, delta; - PRInt32 freq; - LL_L2D(nowd, now); - delta = nowd - end->allocTime; - gcstats[end->bin].nfrees++; - gcstats[end->bin].lifetime += delta; - gcstats[end->bin].lifetimeVariance += delta * delta; - - InlineBinNumber(freq, delta); - gcltfreq[end->bin][freq]++; - - end->check = 0; - } - } -#endif - CLEAR_HBIT(sp, p); - ct = &_pr_collectorTypes[tix]; - if (0 != ct->gctype.free) { - (*ct->gctype.free)(p + 1); - } - chunkSize = chunkSize + bytes; - if (np == limit) { - /* Found the end of heap */ - break; - } - PR_ASSERT(np < limit); - p = np; - } - - if (chunkSize) { - _GCTRACE(GC_SWEEP, ("free chunk 0x%p to 0x%p (%d)", - cp, (char*)cp + chunkSize - 1, chunkSize)); - if (chunkSize < MIN_FREE_CHUNK_BYTES) { - /* Lost a tiny fragment until (maybe) next time */ - METER(meter.wastedBytes += chunkSize); - p = (PRWord *) cp; - chunkSize >>= BYTES_PER_WORD_LOG2; - PR_ASSERT(chunkSize != 0); - p[0] = MAKE_HEADER(FREE_MEMORY_TYPEIX, chunkSize); - SET_HBIT(sp, p); - } else { - /* See if the chunk constitutes the entire segment */ - if (chunkSize == segmentSize) { - /* Free up the segment right now */ - if (sp->info->fromMalloc) { - ShrinkGCHeap(sp); - return PR_TRUE; - } - } - - /* Put free chunk into the appropriate bin */ - cp->segment = sp; - cp->chunkSize = chunkSize; - InlineBinNumber(bin, chunkSize) - cp->next = bins[bin]; - bins[bin] = cp; - if (bin < minBin) minBin = bin; - if (bin > maxBin) maxBin = bin; - - /* Zero swept memory now */ - memset(cp+1, 0, chunkSize - sizeof(*cp)); - METER(meter.numFreeChunks++); - totalFree += chunkSize; - } - } - - /* Advance to next object */ - p = np; - } - - PR_ASSERT(totalFree <= segmentSize); - - _pr_gcData.freeMemory += totalFree; - _pr_gcData.busyMemory += (sp->limit - sp->base) - totalFree; - return PR_FALSE; -} - -/************************************************************************/ - -/* This is a list of all the objects that are finalizable. This is not - the list of objects that are awaiting finalization because they - have been collected. */ -PRCList _pr_finalizeableObjects; - -/* This is the list of objects that are awaiting finalization because - they have been collected. */ -PRCList _pr_finalQueue; - -/* Each object that requires finalization has one of these objects - allocated as well. The GCFinal objects are put on the - _pr_finalizeableObjects list until the object is collected at which - point the GCFinal object is moved to the _pr_finalQueue */ -typedef struct GCFinalStr { - PRCList links; - PRWord *object; -} GCFinal; - -/* Find pointer to GCFinal struct from the list linkaged embedded in it */ -#define FinalPtr(_qp) \ - ((GCFinal*) ((char*) (_qp) - offsetof(GCFinal,links))) - -static GCFinal *AllocFinalNode(void) -{ - return PR_NEWZAP(GCFinal); -} - -static void FreeFinalNode(GCFinal *node) -{ - PR_DELETE(node); -} - -/* -** Prepare for finalization. At this point in the GC cycle we have -** identified all of the live objects. For each object on the -** _pr_finalizeableObjects list see if the object is alive or dead. If -** it's dead, resurrect it and move it from the _pr_finalizeableObjects -** list to the _pr_finalQueue (object's only get finalized once). -** -** Once _pr_finalizeableObjects has been processed we can finish the -** GC and free up memory and release the threading lock. After that we -** can invoke the finalization procs for each object that is on the -** _pr_finalQueue. -*/ -static void PrepareFinalize(void) -{ - PRCList *qp; - GCFinal *fp; - PRWord h; - PRWord *p; - void (PR_CALLBACK *livePointer)(void *ptr); -#ifdef DEBUG - CollectorType *ct; -#endif - - /* This must be done under the same lock that the finalizer uses */ - PR_ASSERT( GC_IS_LOCKED() ); - - /* cache this ptr */ - livePointer = _pr_gcData.livePointer; - - /* - * Pass #1: Identify objects that are to be finalized, set their - * FINAL_BIT. - */ - qp = _pr_finalizeableObjects.next; - while (qp != &_pr_finalizeableObjects) { - fp = FinalPtr(qp); - qp = qp->next; - h = fp->object[0]; /* Grab header word */ - if (h & MARK_BIT) { - /* Object is already alive */ - continue; - } - -#ifdef DEBUG - ct = &_pr_collectorTypes[GET_TYPEIX(h)]; - PR_ASSERT((0 != ct->flags) && (0 != ct->gctype.finalize)); -#endif - fp->object[0] |= FINAL_BIT; - _GCTRACE(GC_FINAL, ("moving %p (%d) to finalQueue", - fp->object, OBJ_BYTES(h))); - } - - /* - * Pass #2: For each object that is going to be finalized, move it to - * the finalization queue and resurrect it - */ - qp = _pr_finalizeableObjects.next; - while (qp != &_pr_finalizeableObjects) { - fp = FinalPtr(qp); - qp = qp->next; - h = fp->object[0]; /* Grab header word */ - if ((h & FINAL_BIT) == 0) { - continue; - } - - /* Resurrect the object and any objects it refers to */ - p = &fp->object[1]; - (*livePointer)(p); - PR_REMOVE_LINK(&fp->links); - PR_APPEND_LINK(&fp->links, &_pr_finalQueue); - } -} - -/* -** Scan the finalQ, marking each and every object on it live. This is -** necessary because we might do a GC before objects that are on the -** final queue get finalized. Since there are no other references -** (otherwise they would be on the final queue), we have to scan them. -** This really only does work if we call the GC before the finalizer -** has a chance to do its job. -*/ -extern void PR_CALLBACK _PR_ScanFinalQueue(void *notused) -{ - PRCList *qp; - GCFinal *fp; - PRWord *p; - void ( PR_CALLBACK *livePointer)(void *ptr); - - livePointer = _pr_gcData.livePointer; - qp = _pr_finalQueue.next; - while (qp != &_pr_finalQueue) { - fp = FinalPtr(qp); - _GCTRACE(GC_FINAL, ("marking 0x%x (on final queue)", fp->object)); - p = &fp->object[1]; - (*livePointer)(p); - qp = qp->next; - } -} - -void PR_CALLBACK FinalizerLoop(void* unused) -{ - GCFinal *fp; - PRWord *p; - PRWord h, tix; - CollectorType *ct; - - LOCK_GC(); - for (;;) { - p = 0; h = 0; /* don't let the gc find these pointers */ - while (PR_CLIST_IS_EMPTY(&_pr_finalQueue)) - PR_Wait(_pr_gcData.lock, PR_INTERVAL_NO_TIMEOUT); - - _GCTRACE(GC_FINAL, ("begin finalization")); - while (_pr_finalQueue.next != &_pr_finalQueue) { - fp = FinalPtr(_pr_finalQueue.next); - PR_REMOVE_LINK(&fp->links); - p = fp->object; - - h = p[0]; /* Grab header word */ - tix = (PRWord)GET_TYPEIX(h); - ct = &_pr_collectorTypes[tix]; - _GCTRACE(GC_FINAL, ("finalize 0x%x (%d)", p, OBJ_BYTES(h))); - - /* - ** Give up the GC lock so that other threads can allocate memory - ** while this finalization method is running. Get it back - ** afterwards so that the list remains thread safe. - */ - UNLOCK_GC(); - FreeFinalNode(fp); - PR_ASSERT(ct->gctype.finalize != 0); - (*ct->gctype.finalize)(p + 1); - LOCK_GC(); - } - _GCTRACE(GC_FINAL, ("end finalization")); - PR_Notify(_pr_gcData.lock); - } -} - -static void NotifyFinalizer(void) -{ - if (!PR_CLIST_IS_EMPTY(&_pr_finalQueue)) { - PR_ASSERT( GC_IS_LOCKED() ); - PR_Notify(_pr_gcData.lock); - } -} - -void _PR_CreateFinalizer(PRThreadScope scope) -{ - if (!_pr_gcData.finalizer) { - _pr_gcData.finalizer = PR_CreateThreadGCAble(PR_SYSTEM_THREAD, - FinalizerLoop, 0, - PR_PRIORITY_LOW, scope, - PR_UNJOINABLE_THREAD, 0); - - if (_pr_gcData.finalizer == NULL) - /* We are doomed if we can't start the finalizer */ - PR_Abort(); - - } -} - -void pr_FinalizeOnExit(void) -{ -#ifdef DEBUG_warren - OutputDebugString("### Doing finalize-on-exit pass\n"); -#endif - PR_ForceFinalize(); -#ifdef DEBUG_warren - OutputDebugString("### Finalize-on-exit complete. Dumping object left to memory.out\n"); - PR_DumpMemorySummary(); - PR_DumpMemory(PR_TRUE); -#endif -} - -PR_IMPLEMENT(void) PR_ForceFinalize() -{ - LOCK_GC(); - NotifyFinalizer(); - while (!PR_CLIST_IS_EMPTY(&_pr_finalQueue)) { - PR_ASSERT( GC_IS_LOCKED() ); - (void) PR_Wait(_pr_gcData.lock, PR_INTERVAL_NO_TIMEOUT); - } - UNLOCK_GC(); - - /* XXX I don't know how to make it wait (yet) */ -} - -/************************************************************************/ - -typedef struct GCWeakStr { - PRCList links; - PRWord *object; -} GCWeak; - -/* -** Find pointer to GCWeak struct from the list linkaged embedded in it -*/ -#define WeakPtr(_qp) \ - ((GCWeak*) ((char*) (_qp) - offsetof(GCWeak,links))) - -PRCList _pr_weakLinks = PR_INIT_STATIC_CLIST(&_pr_weakLinks); -PRCList _pr_freeWeakLinks = PR_INIT_STATIC_CLIST(&_pr_freeWeakLinks); - -#define WEAK_FREELIST_ISEMPTY() (_pr_freeWeakLinks.next == &_pr_freeWeakLinks) - -/* - * Keep objects referred to by weak free list alive until they can be - * freed - */ -static void PR_CALLBACK ScanWeakFreeList(void *notused) { - PRCList *qp = _pr_freeWeakLinks.next; - while (qp != &_pr_freeWeakLinks) { - GCWeak *wp = WeakPtr(qp); - qp = qp->next; - ProcessRootPointer(wp->object); - } -} - -/* - * Empty the list of weak objects. Note that we can't call malloc/free - * under the cover of the GC's lock (we might deadlock), so transfer the - * list of free objects to a local list under the cover of the lock, then - * release the lock and free up the memory. - */ -static void EmptyWeakFreeList(void) { - if (!WEAK_FREELIST_ISEMPTY()) { - PRCList *qp, freeLinks; - - PR_INIT_CLIST(&freeLinks); - - /* - * Transfer list of free weak links from the global list to a - * local list. - */ - LOCK_GC(); - qp = _pr_freeWeakLinks.next; - while (qp != &_pr_freeWeakLinks) { - GCWeak *wp = WeakPtr(qp); - qp = qp->next; - PR_REMOVE_LINK(&wp->links); - PR_APPEND_LINK(&wp->links, &freeLinks); - } - UNLOCK_GC(); - - /* Free up storage now */ - qp = freeLinks.next; - while (qp != &freeLinks) { - GCWeak *wp = WeakPtr(qp); - qp = qp->next; - PR_DELETE(wp); - } - } -} - -/* - * Allocate a new weak node in the weak objects list - */ -static GCWeak *AllocWeakNode(void) -{ - EmptyWeakFreeList(); - return PR_NEWZAP(GCWeak); -} - -static void FreeWeakNode(GCWeak *node) -{ - PR_DELETE(node); -} - -/* - * Check the weak links for validity. Note that the list of weak links is - * itself weak (otherwise we would keep the objects with weak links in - * them alive forever). As we scan the list check the weak link object - * itself and if it's not marked then remove it from the weak link list - */ -static void CheckWeakLinks(void) { - PRCList *qp; - GCWeak *wp; - PRWord *p, h, tix, **weakPtrAddress; - CollectorType *ct; - PRUint32 offset; - - qp = _pr_weakLinks.next; - while (qp != &_pr_weakLinks) { - wp = WeakPtr(qp); - qp = qp->next; - if ((p = wp->object) != 0) { - h = p[0]; /* Grab header word */ - if ((h & MARK_BIT) == 0) { - /* - * The object that has a weak link is no longer being - * referenced; remove it from the chain and let it get - * swept away by the GC. Transfer it to the list of - * free weak links for later freeing. - */ - PR_REMOVE_LINK(&wp->links); - PR_APPEND_LINK(&wp->links, &_pr_freeWeakLinks); - collectorCleanupNeeded = 1; - continue; - } - - /* Examine a live object that contains weak links */ - tix = GET_TYPEIX(h); - ct = &_pr_collectorTypes[tix]; - PR_ASSERT((ct->flags != 0) && (ct->gctype.getWeakLinkOffset != 0)); - if (0 == ct->gctype.getWeakLinkOffset) { - /* Heap is probably corrupted */ - continue; - } - - /* Get offset into the object of where the weak pointer is */ - offset = (*ct->gctype.getWeakLinkOffset)(p + 1); - - /* Check the weak pointer */ - weakPtrAddress = (PRWord**)((char*)(p + 1) + offset); - p = *weakPtrAddress; - if (p != 0) { - h = p[-1]; /* Grab header word for pointed to object */ - if (h & MARK_BIT) { - /* Object can't be dead */ - continue; - } - /* Break weak link to an object that is about to be swept */ - *weakPtrAddress = 0; - } - } - } -} - -/************************************************************************/ - -/* -** Perform a complete garbage collection -*/ - -extern GCLockHook *_pr_GCLockHook; - -static void dogc(void) -{ - RootFinder *rf; - GCLockHook* lhook; - - GCScanQ scanQ; - GCSeg *sp, *esp; - PRInt64 start, end, diff; - -#if defined(GCMETER) || defined(GCTIMINGHOOK) - start = PR_Now(); -#endif - - /* - ** Stop all of the other threads. This also promises to capture the - ** register state of each and every thread - */ - - /* - ** Get all the locks that will be need during GC after SuspendAll. We - ** cannot make any locking/library calls after SuspendAll. - */ - if (_pr_GCLockHook) { - for (lhook = _pr_GCLockHook->next; lhook != _pr_GCLockHook; - lhook = lhook->next) { - (*lhook->func)(PR_GCBEGIN, lhook->arg); - } - } - - PR_SuspendAll(); - -#ifdef GCMETER - /* Reset meter info */ - if (_pr_gcMeter & _GC_METER_STATS) { - fprintf(stderr, - "[GCSTATS: busy:%ld skipped:%ld, alloced:%ld+wasted:%ld+free:%ld = total:%ld]\n", - (long) _pr_gcData.busyMemory, - (long) meter.skippedFreeChunks, - (long) meter.allocBytes, - (long) meter.wastedBytes, - (long) _pr_gcData.freeMemory, - (long) _pr_gcData.allocMemory); - } - memset(&meter, 0, sizeof(meter)); -#endif - - PR_LOG(_pr_msgc_lm, PR_LOG_ALWAYS, ("begin mark phase; busy=%d free=%d total=%d", - _pr_gcData.busyMemory, _pr_gcData.freeMemory, - _pr_gcData.allocMemory)); - - if (_pr_beginGCHook) { - (*_pr_beginGCHook)(_pr_beginGCHookArg); - } - - /* - ** Initialize scanQ to all zero's so that root finder doesn't walk - ** over it... - */ - memset(&scanQ, 0, sizeof(scanQ)); - pScanQ = &scanQ; - - /******************************************/ - /* MARK PHASE */ - - EmptyFreelists(); - - /* Find root's */ - PR_LOG(_pr_msgc_lm, PR_LOG_WARNING, - ("begin mark phase; busy=%d free=%d total=%d", - _pr_gcData.busyMemory, _pr_gcData.freeMemory, - _pr_gcData.allocMemory)); - METER(_pr_scanDepth = 0); - rf = _pr_rootFinders; - while (rf) { - _GCTRACE(GC_ROOTS, ("finding roots in %s", rf->name)); - (*rf->func)(rf->arg); - rf = rf->next; - } - _GCTRACE(GC_ROOTS, ("done finding roots")); - - /* Scan remaining object's that need scanning */ - ScanScanQ(&scanQ); - PR_ASSERT(pScanQ == &scanQ); - PR_ASSERT(scanQ.queued == 0); - METER({ - if (_pr_scanDepth > _pr_maxScanDepth) { - _pr_maxScanDepth = _pr_scanDepth; - } - }); - - /******************************************/ - /* FINALIZATION PHASE */ - - METER(_pr_scanDepth = 0); - PrepareFinalize(); - - /* Scan any resurrected objects found during finalization */ - ScanScanQ(&scanQ); - PR_ASSERT(pScanQ == &scanQ); - PR_ASSERT(scanQ.queued == 0); - METER({ - if (_pr_scanDepth > _pr_maxScanDepth) { - _pr_maxScanDepth = _pr_scanDepth; - } - }); - pScanQ = 0; - - /******************************************/ - /* SWEEP PHASE */ - - /* - ** Sweep each segment clean. While we are at it, figure out which - ** segment has the most free space and make that the current segment. - */ - CheckWeakLinks(); - _GCTRACE(GC_SWEEP, ("begin sweep phase")); - _pr_gcData.freeMemory = 0; - _pr_gcData.busyMemory = 0; - sp = segs; - esp = sp + nsegs; - while (sp < esp) { - if (SweepSegment(sp)) { - /* - ** Segment is now free and has been replaced with a different - ** segment object. - */ - esp--; - continue; - } - sp++; - } - -#if defined(GCMETER) || defined(GCTIMINGHOOK) - end = PR_Now(); -#endif -#ifdef GCMETER - LL_SUB(diff, end, start); - PR_LOG(GC, PR_LOG_ALWAYS, - ("done; busy=%d free=%d chunks=%d total=%d time=%lldms", - _pr_gcData.busyMemory, _pr_gcData.freeMemory, - meter.numFreeChunks, _pr_gcData.allocMemory, diff)); - if (_pr_gcMeter & _GC_METER_FREE_LIST) { - PRIntn bin; - fprintf(stderr, "Freelist bins:\n"); - for (bin = 0; bin < NUM_BINS; bin++) { - GCFreeChunk *cp = bins[bin]; - while (cp != NULL) { - fprintf(stderr, "%3d: %p %8ld\n", - bin, cp, (long) cp->chunkSize); - cp = cp->next; - } - } - } -#endif - - if (_pr_endGCHook) { - (*_pr_endGCHook)(_pr_endGCHookArg); - } - - /* clear the running total of the bytes allocated via BigAlloc() */ - bigAllocBytes = 0; - - /* And resume multi-threading */ - PR_ResumeAll(); - - if (_pr_GCLockHook) { - for (lhook = _pr_GCLockHook->prev; lhook != _pr_GCLockHook; - lhook = lhook->prev) { - (*lhook->func)(PR_GCEND, lhook->arg); - } - } - - /* Kick finalizer */ - NotifyFinalizer(); -#ifdef GCTIMINGHOOK - if (_pr_gcData.gcTimingHook) { - PRInt32 time; - LL_SUB(diff, end, start); - LL_L2I(time, diff); - _pr_gcData.gcTimingHook(time); - } -#endif -} - -PR_IMPLEMENT(void) PR_GC(void) -{ - LOCK_GC(); - dogc(); - UNLOCK_GC(); - - EmptyWeakFreeList(); -} - -/******************************************************************************* - * Heap Walker - ******************************************************************************/ - -/* -** This is yet another disgusting copy of the body of ProcessRootPointer -** (the other being ProcessRootBlock), but we're not leveraging a single -** function in their cases in interest of performance (avoiding the function -** call). -*/ -static PRInt32 PR_CALLBACK -pr_ConservativeWalkPointer(void* ptr, PRWalkFun walkRootPointer, void* data) -{ - PRWord *p0, *p, *segBase; - GCSeg* sp; - - p0 = (PRWord*) ptr; - - if (p0 < _pr_gcData.lowSeg) return 0; /* below gc heap */ - if (p0 >= _pr_gcData.highSeg) return 0; /* above gc heap */ - - /* NOTE: inline expansion of InHeap */ - /* Find segment */ - sp = lastInHeap; - if (!sp || !IN_SEGMENT(sp,p0)) { - GCSeg *esp; - sp = segs; - esp = segs + nsegs; - for (; sp < esp; sp++) { - if (IN_SEGMENT(sp, p0)) { - lastInHeap = sp; - goto find_object; - } - } - return 0; - } - - find_object: - /* NOTE: Inline expansion of FindObject */ - /* Align p to it's proper boundary before we start fiddling with it */ - p = (PRWord*) ((PRWord)p0 & ~(BYTES_PER_WORD-1L)); - segBase = (PRWord *) sp->base; - do { - if (IS_HBIT(sp, p)) { - goto winner; - } - p--; - } while (p >= segBase); - - /* - ** We have a pointer into the heap, but it has no header - ** bit. This means that somehow the very first object in the heap - ** doesn't have a header. This is impossible so when debugging - ** lets abort. - */ -#ifdef DEBUG - PR_Abort(); -#endif - return 0; - - winner: - return walkRootPointer(p, data); -} - -static PRInt32 PR_CALLBACK -pr_ConservativeWalkBlock(void **base, PRInt32 count, - PRWalkFun walkRootPointer, void* data) -{ - PRWord *p0; - while (--count >= 0) { - PRInt32 status; - p0 = (PRWord*) *base++; - status = pr_ConservativeWalkPointer(p0, walkRootPointer, data); - if (status) return status; - } - return 0; -} - -/******************************************************************************/ - -typedef void (*WalkObject_t)(FILE *out, GCType* tp, PRWord *obj, - size_t bytes, PRBool detailed); -typedef void (*WalkUnknown_t)(FILE *out, GCType* tp, PRWord tix, PRWord *p, - size_t bytes, PRBool detailed); -typedef void (*WalkFree_t)(FILE *out, PRWord *p, size_t size, PRBool detailed); -typedef void (*WalkSegment_t)(FILE *out, GCSeg* sp, PRBool detailed); - -static void -pr_WalkSegment(FILE* out, GCSeg* sp, PRBool detailed, - char* enterMsg, char* exitMsg, - WalkObject_t walkObject, WalkUnknown_t walkUnknown, WalkFree_t walkFree) -{ - PRWord *p, *limit; - - p = (PRWord *) sp->base; - limit = (PRWord *) sp->limit; - if (enterMsg) - fprintf(out, enterMsg, p); - while (p < limit) - { - if (IS_HBIT(sp, p)) /* Is this an object header? */ - { - PRWord h = p[0]; - PRWord tix = GET_TYPEIX(h); - size_t bytes = OBJ_BYTES(h); - PRWord* np = (PRWord*) ((char*)p + bytes); - - GCType* tp = &_pr_collectorTypes[tix].gctype; - if ((0 != tp) && walkObject) - walkObject(out, tp, p, bytes, detailed); - else if (walkUnknown) - walkUnknown(out, tp, tix, p, bytes, detailed); - p = np; - } - else - { - /* Must be a freelist item */ - size_t size = ((GCFreeChunk*)p)->chunkSize; - if (walkFree) - walkFree(out, p, size, detailed); - p = (PRWord*)((char*)p + size); - } - } - if (p != limit) - fprintf(out, "SEGMENT OVERRUN (end should be at 0x%p)\n", limit); - if (exitMsg) - fprintf(out, exitMsg, p); -} - -static void -pr_WalkSegments(FILE *out, WalkSegment_t walkSegment, PRBool detailed) -{ - GCSeg *sp = segs; - GCSeg *esp; - - LOCK_GC(); - esp = sp + nsegs; - while (sp < esp) - { - walkSegment(out, sp, detailed); - sp++; - } - fprintf(out, "End of heap\n"); - UNLOCK_GC(); -} - -/******************************************************************************* - * Heap Dumper - ******************************************************************************/ - -PR_IMPLEMENT(void) -PR_DumpIndent(FILE *out, int indent) -{ - while (--indent >= 0) - fprintf(out, " "); -} - -static void -PR_DumpHexWords(FILE *out, PRWord *p, int nWords, - int indent, int nWordsPerLine) -{ - while (nWords > 0) - { - int i; - - PR_DumpIndent(out, indent); - i = nWordsPerLine; - if (i > nWords) - i = nWords; - nWords -= i; - while (i--) - { - fprintf(out, "0x%.8lX", (long) *p++); - if (i) - fputc(' ', out); - } - fputc('\n', out); - } -} - -static void PR_CALLBACK -pr_DumpObject(FILE *out, GCType* tp, PRWord *p, - size_t bytes, PRBool detailed) -{ - char kindChar = tp->kindChar; - fprintf(out, "0x%p: 0x%.6lX %c ", - p, (long) bytes, kindChar ? kindChar : '?'); - if (tp->dump) - (*tp->dump)(out, (void*) (p + 1), detailed, 0); - if (detailed) - PR_DumpHexWords(out, p, bytes>>2, 22, 4); -} - -static void PR_CALLBACK -pr_DumpUnknown(FILE *out, GCType* tp, PRWord tix, PRWord *p, - size_t bytes, PRBool detailed) -{ - char kindChar = tp->kindChar; - fprintf(out, "0x%p: 0x%.6lX %c ", - p, (long) bytes, kindChar ? kindChar : '?'); - fprintf(out, "UNKNOWN KIND %ld\n", (long) tix); - if (detailed) - PR_DumpHexWords(out, p, bytes>>2, 22, 4); -} - -static void PR_CALLBACK -pr_DumpFree(FILE *out, PRWord *p, size_t size, PRBool detailed) -{ - fprintf(out, "0x%p: 0x%.6lX - FREE\n", p, (long) size); -} - -static void PR_CALLBACK -pr_DumpSegment(FILE* out, GCSeg* sp, PRBool detailed) -{ - pr_WalkSegment(out, sp, detailed, - "\n Address: Length\n0x%p: Beginning of segment\n", - "0x%p: End of segment\n\n", - pr_DumpObject, pr_DumpUnknown, pr_DumpFree); -} - -static void pr_DumpRoots(FILE *out); - -/* -** Dump out the GC heap. -*/ -PR_IMPLEMENT(void) -PR_DumpGCHeap(FILE *out, PRBool detailed) -{ - fprintf(out, "\n" - "The kinds are:\n" - " U unscanned block\n" - " W weak link block\n" - " S scanned block\n" - " F scanned and final block\n" - " C class record\n" - " X context record\n" - " - free list item\n" - " ? other\n"); - LOCK_GC(); - pr_WalkSegments(out, pr_DumpSegment, detailed); - if (detailed) - pr_DumpRoots(out); - UNLOCK_GC(); -} - -PR_IMPLEMENT(void) -PR_DumpMemory(PRBool detailed) -{ - PR_DumpToFile("memory.out", "Dumping memory", PR_DumpGCHeap, detailed); -} - -/******************************************************************************/ - -static PRInt32 PR_CALLBACK -pr_DumpRootPointer(PRWord* p, void* data) -{ - PRWord h = p[0]; - PRWord tix = GET_TYPEIX(h); - size_t bytes = OBJ_BYTES(h); - - GCType* tp = &_pr_collectorTypes[tix].gctype; - if (0 != tp) - pr_DumpObject(_pr_gcData.dumpOutput, tp, p, bytes, PR_FALSE); - else - pr_DumpUnknown(_pr_gcData.dumpOutput, tp, tix, p, bytes, PR_FALSE); - return 0; -} - -static void PR_CALLBACK -pr_ConservativeDumpRootPointer(void* ptr) -{ - (void)pr_ConservativeWalkPointer(ptr, (PRWalkFun) pr_DumpRootPointer, NULL); -} - -static void PR_CALLBACK -pr_ConservativeDumpRootBlock(void **base, PRInt32 count) -{ - (void)pr_ConservativeWalkBlock(base, count, (PRWalkFun) pr_DumpRootPointer, NULL); -} - -extern int -DumpThreadRoots(PRThread *t, int i, void *notused); - -static void -pr_DumpRoots(FILE *out) -{ - RootFinder *rf; - void (*liveBlock)(void **base, PRInt32 count); - void (*livePointer)(void *ptr); - void (*processRootBlock)(void **base, PRInt32 count); - void (*processRootPointer)(void *ptr); - - LOCK_GC(); - - liveBlock = _pr_gcData.liveBlock; - livePointer = _pr_gcData.livePointer; - processRootBlock = _pr_gcData.processRootBlock; - processRootPointer = _pr_gcData.processRootPointer; - - _pr_gcData.liveBlock = pr_ConservativeDumpRootBlock; - _pr_gcData.livePointer = pr_ConservativeDumpRootPointer; - _pr_gcData.processRootBlock = pr_ConservativeDumpRootBlock; - _pr_gcData.processRootPointer = pr_ConservativeDumpRootPointer; - _pr_gcData.dumpOutput = out; - - rf = _pr_rootFinders; - while (rf) { - fprintf(out, "\n===== Roots for %s\n", rf->name); - (*rf->func)(rf->arg); - rf = rf->next; - } - - _pr_gcData.liveBlock = liveBlock; - _pr_gcData.livePointer = livePointer; - _pr_gcData.processRootBlock = processRootBlock; - _pr_gcData.processRootPointer = processRootPointer; - _pr_gcData.dumpOutput = NULL; - - UNLOCK_GC(); -} - -/******************************************************************************* - * Heap Summary Dumper - ******************************************************************************/ - -PRSummaryPrinter summaryPrinter = NULL; -void* summaryPrinterClosure = NULL; - -PR_IMPLEMENT(void) -PR_RegisterSummaryPrinter(PRSummaryPrinter fun, void* closure) -{ - summaryPrinter = fun; - summaryPrinterClosure = closure; -} - -static void PR_CALLBACK -pr_SummarizeObject(FILE *out, GCType* tp, PRWord *p, - size_t bytes, PRBool detailed) -{ - if (tp->summarize) - (*tp->summarize)((void GCPTR*)(p + 1), bytes); -} - -static void PR_CALLBACK -pr_DumpSummary(FILE* out, GCSeg* sp, PRBool detailed) -{ - pr_WalkSegment(out, sp, detailed, NULL, NULL, - pr_SummarizeObject, NULL, NULL); -} - -PR_IMPLEMENT(void) -PR_DumpGCSummary(FILE *out, PRBool detailed) -{ - if (summaryPrinter) { - pr_WalkSegments(out, pr_DumpSummary, detailed); - summaryPrinter(out, summaryPrinterClosure); - } -#if 0 - fprintf(out, "\nFinalizable objects:\n"); - { - PRCList *qp; - qp = _pr_pendingFinalQueue.next; - while (qp != &_pr_pendingFinalQueue) { - GCFinal* fp = FinalPtr(qp); - PRWord h = fp->object[0]; /* Grab header word */ - PRWord tix = GET_TYPEIX(h); - GCType* tp = _pr_gcTypes[tix]; - size_t bytes = OBJ_BYTES(h); - pr_DumpObject(out, tp, fp->object, bytes, PR_FALSE); - qp = qp->next; - } - } -#endif -} - -PR_IMPLEMENT(void) -PR_DumpMemorySummary(void) -{ - PR_DumpToFile("memory.out", "Memory Summary", PR_DumpGCSummary, PR_FALSE); -} - -/******************************************************************************* - * End Of Heap Walker - ******************************************************************************/ - -#ifdef GC_TRACEROOTS - -PRInt32 pr_traceGen = 0; - -static PRBool -pr_IsMarked(PRWord* p) -{ - GCBlockEnd* end = (GCBlockEnd*)((char*)p + OBJ_BYTES(p[0]) - sizeof(GCBlockEnd)); - PR_ASSERT(end->check == PR_BLOCK_END); - return end->traceGeneration == pr_traceGen; -} - -static void -pr_Mark(PRWord* p) -{ - GCBlockEnd* end = (GCBlockEnd*)((char*)p + OBJ_BYTES(p[0]) - sizeof(GCBlockEnd)); - PR_ASSERT(end->check == PR_BLOCK_END); - end->traceGeneration = pr_traceGen; -} - -PRWord* pr_traceObj; /* set this in the debugger, then execute PR_TraceRoot() */ - -static PRInt32 PR_CALLBACK -pr_TraceRootObject(void* obj, void* data); - -static PRInt32 PR_CALLBACK -pr_TraceRootPointer(PRWord *p, void* data) -{ - PRInt32 printTrace = 0; - PRWord h = p[0]; - PRWord tix = GET_TYPEIX(h); - GCType* tp = &_pr_collectorTypes[tix].gctype; - FILE* out = _pr_gcData.dumpOutput; - - PR_ASSERT(tp); - if (pr_IsMarked(p)) - return printTrace; - - pr_Mark(p); - if (p == pr_traceObj) { - fprintf(out, "\n### Found path to:\n"); - printTrace = 1; - } - else { - if (PR_StackSpaceLeft(PR_GetCurrentThread()) < 512) { - fprintf(out, "\n### Path too deep (giving up):\n"); - printTrace = 1; - } - else if (tp->walk) { - printTrace = tp->walk((void*)(p + 1), pr_TraceRootObject, data); - } - /* else there's no way to walk this object, so we - haven't found what we're looking for */ - } - - if (printTrace == 1) { - PR_ASSERT(tp->dump); - fprintf(out, "0x%p: ", p); - tp->dump(out, (void*)(p + 1), PR_FALSE, 1); - } - return printTrace; -} - -static PRInt32 PR_CALLBACK -pr_TraceRootObject(void* obj, void* data) -{ - /* This version of pr_TraceRootPointer takes object - pointers, instead of gc header pointers. */ - return pr_TraceRootPointer((PRWord*)obj - 1, data); -} - -static void PR_CALLBACK -pr_ConservativeTraceRootPointer(PRWord *p) -{ - PRInt32 status; - ++pr_traceGen; - status = pr_ConservativeWalkPointer(p, pr_TraceRootPointer, NULL); - if (status) { - FILE* out = _pr_gcData.dumpOutput; - fprintf(out, "### from root at 0x%p\n\n", p); - } -} - -static void PR_CALLBACK -pr_ConservativeTraceRootBlock(void **base, PRInt32 count) -{ - PRInt32 status; - ++pr_traceGen; - status = pr_ConservativeWalkBlock(base, count, pr_TraceRootPointer, NULL); - if (status) { - FILE* out = _pr_gcData.dumpOutput; - fprintf(out, "### from root in range 0x%p + 0x%lx\n\n", - base, (long) count); - } -} - -static void -PR_TraceRoot1(FILE* out, PRBool detailed) -{ - RootFinder *rf; - void (*liveBlock)(void **base, PRInt32 count); - void (*livePointer)(void *ptr); - void (*processRootBlock)(void **base, PRInt32 count); - void (*processRootPointer)(void *ptr); - - LOCK_GC(); - - liveBlock = _pr_gcData.liveBlock; - livePointer = _pr_gcData.livePointer; - processRootBlock = _pr_gcData.processRootBlock; - processRootPointer = _pr_gcData.processRootPointer; - - _pr_gcData.liveBlock = pr_ConservativeTraceRootBlock; - _pr_gcData.livePointer = pr_ConservativeTraceRootPointer; - _pr_gcData.processRootBlock = pr_ConservativeTraceRootBlock; - _pr_gcData.processRootPointer = pr_ConservativeTraceRootPointer; - _pr_gcData.dumpOutput = out; - - fprintf(out, "### Looking for paths to 0x%p\n\n", pr_traceObj); - - rf = _pr_rootFinders; - while (rf) { - fprintf(out, "\n===== Roots for %s\n", rf->name); - (*rf->func)(rf->arg); - rf = rf->next; - } - - _pr_gcData.liveBlock = liveBlock; - _pr_gcData.livePointer = livePointer; - _pr_gcData.processRootBlock = processRootBlock; - _pr_gcData.processRootPointer = processRootPointer; - _pr_gcData.dumpOutput = NULL; - - UNLOCK_GC(); -} - -PR_PUBLIC_API(void) -PR_TraceRoot() -{ - /* - ** How this works: - ** Once you find the object you want to trace the roots of, set the - ** global variable pr_traceObj to point to it (the header, not the - ** java handle), and then call this routine (on Windows, you can set - ** a breakpoint at the end of a function that returns void (e.g. dogc) - ** and then do a "set next statement" to point to this routine and go. - ** This will dump a list of the paths from the roots to the object in - ** question to your memory.out file. - */ - PR_DumpToFile("memory.out", "Tracing Roots", PR_TraceRoot1, PR_FALSE); -} - -#endif /* GC_TRACEROOTS */ - -/******************************************************************************/ - -#if defined(DEBUG) && defined(WIN32) -static void DumpApplicationHeap(FILE *out, HANDLE heap) -{ - PROCESS_HEAP_ENTRY entry; - DWORD err; - - if (!HeapLock(heap)) - OutputDebugString("Can't lock the heap.\n"); - entry.lpData = 0; - fprintf(out, " address: size ovhd region\n"); - while (HeapWalk(heap, &entry)) - { - WORD flags = entry.wFlags; - - fprintf(out, "0x%.8X: 0x%.8X 0x%.2X 0x%.2X ", entry.lpData, entry.cbData, - entry.cbOverhead, entry.iRegionIndex); - if (flags & PROCESS_HEAP_REGION) - fprintf(out, "REGION committedSize=0x%.8X uncommittedSize=0x%.8X firstBlock=0x%.8X lastBlock=0x%.8X", - entry.Region.dwCommittedSize, entry.Region.dwUnCommittedSize, - entry.Region.lpFirstBlock, entry.Region.lpLastBlock); - else if (flags & PROCESS_HEAP_UNCOMMITTED_RANGE) - fprintf(out, "UNCOMMITTED"); - else if (flags & PROCESS_HEAP_ENTRY_BUSY) - { - if (flags & PROCESS_HEAP_ENTRY_DDESHARE) - fprintf(out, "DDEShare "); - if (flags & PROCESS_HEAP_ENTRY_MOVEABLE) - fprintf(out, "Moveable Block handle=0x%.8X", entry.Block.hMem); - else - fprintf(out, "Block"); - } - fprintf(out, "\n"); - } - if ((err = GetLastError()) != ERROR_NO_MORE_ITEMS) - fprintf(out, "ERROR %d iterating through the heap\n", err); - if (!HeapUnlock(heap)) - OutputDebugString("Can't unlock the heap.\n"); -} -#endif - -#if defined(DEBUG) && defined(WIN32) -static void DumpApplicationHeaps(FILE *out) -{ - HANDLE mainHeap; - HANDLE heaps[100]; - DWORD nHeaps; - PRInt32 i; - - mainHeap = GetProcessHeap(); - nHeaps = GetProcessHeaps(100, heaps); - if (nHeaps > 100) - nHeaps = 0; - fprintf(out, "%ld heaps:\n", (long) nHeaps); - for (i = 0; i<nHeaps; i++) - { - HANDLE heap = heaps[i]; - - fprintf(out, "Heap at 0x%.8lX", (long) heap); - if (heap == mainHeap) - fprintf(out, " (main)"); - fprintf(out, ":\n"); - DumpApplicationHeap(out, heap); - fprintf(out, "\n"); - } - fprintf(out, "End of heap dump\n\n"); -} -#endif - -#if defined(DEBUG) && defined(WIN32) -PR_IMPLEMENT(void) PR_DumpApplicationHeaps(void) -{ - FILE *out; - - OutputDebugString("Dumping heaps..."); - out = fopen("heaps.out", "a"); - if (!out) - OutputDebugString("Can't open \"heaps.out\"\n"); - else - { - struct tm *newtime; - time_t aclock; - - time(&aclock); - newtime = localtime(&aclock); - fprintf(out, "Heap dump on %s\n", asctime(newtime)); /* Print current time */ - DumpApplicationHeaps(out); - fprintf(out, "\n\n"); - fclose(out); - } - OutputDebugString(" done\n"); -} -#else - -PR_IMPLEMENT(void) PR_DumpApplicationHeaps(void) -{ - fprintf(stderr, "Native heap dumping is currently implemented only for Windows32.\n"); -} -#endif - -/************************************************************************/ - -/* -** Scan the freelist bins looking for a big enough chunk of memory to -** hold "bytes" worth of allocation. "bytes" already has the -** per-allocation header added to it. Return a pointer to the object with -** its per-allocation header already prepared. -*/ -static PRWord *BinAlloc(int cbix, PRInt32 bytes, int dub) -{ - GCFreeChunk **cpp, *cp, *cpNext; - GCSeg *sp; - PRInt32 chunkSize, remainder; - PRWord *p, *np; - PRInt32 bin, newbin; - - /* Compute bin that allocation belongs in */ - InlineBinNumber(bin,bytes) - if (bin < minBin) { - bin = minBin; /* Start at first filled bin */ - } - - /* Search in the bin, and larger bins, for a big enough piece */ - for (; bin <= NUM_BINS-1; bin++) { - cpp = &bins[bin]; - while ((cp = *cpp) != 0) { - chunkSize = cp->chunkSize; - if (chunkSize < bytes) { - /* Too small; skip it */ - METER(meter.skippedFreeChunks++); - cpp = &cp->next; - continue; - } - - /* We have found a hunk of memory large enough to use */ - p = (PRWord*) cp; - sp = cp->segment; - cpNext = cp->next; -#ifndef IS_64 - if (dub && (((PRWord)p & (PR_BYTES_PER_DWORD-1)) == 0)) { - /* - * We are double aligning the memory and the current free - * chunk is aligned on an even boundary. Because header - * words are one word long we need to discard the first - * word of memory. - */ - p[0] = MAKE_HEADER(FREE_MEMORY_TYPEIX, 1); - SET_HBIT(sp, p); - p++; - chunkSize -= PR_BYTES_PER_WORD; - bytes -= PR_BYTES_PER_WORD; - PR_ASSERT(((PRWord)p & (PR_BYTES_PER_DWORD-1)) != 0); - _pr_gcData.freeMemory -= PR_BYTES_PER_WORD; - _pr_gcData.busyMemory += PR_BYTES_PER_WORD; - } -#endif - np = (PRWord*) ((char*) p + bytes); - remainder = chunkSize - bytes; - if (remainder >= MIN_FREE_CHUNK_BYTES) { - /* The left over memory is large enough to be freed. */ - cp = (GCFreeChunk*) np; - cp->segment = sp; - cp->chunkSize = remainder; - InlineBinNumber(newbin, remainder) - if (newbin != bin) { - *cpp = (GCFreeChunk*) cpNext; /* remove */ - cp->next = bins[newbin]; /* insert */ - bins[newbin] = cp; - if (newbin < minBin) minBin = newbin; - if (newbin > maxBin) maxBin = newbin; - } else { - /* Leave it on the same list */ - cp->next = cpNext; - *cpp = (GCFreeChunk*) np; - } - } else { - /* - * The left over memory is too small to be released. Just - * leave it attached to the chunk of memory being - * returned. - */ - *cpp = cpNext; - bytes = chunkSize; - } - p[0] = MAKE_HEADER(cbix, (bytes >> PR_BYTES_PER_WORD_LOG2)); - SET_HBIT(sp, p); - _pr_gcData.freeMemory -= bytes; - _pr_gcData.busyMemory += bytes; - return p; - } - } - return 0; -} - -/* -** Allocate a piece of memory that is "big" in it's own segment. Make -** the object consume the entire segment to avoid fragmentation. When -** the object is no longer referenced, the segment is freed. -*/ -static PRWord *BigAlloc(int cbix, PRInt32 bytes, int dub) -{ - GCSeg *sp; - PRWord *p, h; - PRInt32 chunkSize; - - /* - ** If the number of bytes allocated via BigAlloc() since the last GC - ** exceeds BIG_ALLOC_GC_SIZE then do a GC Now... - */ - if (bigAllocBytes >= BIG_ALLOC_GC_SIZE) { - dogc(); - } - bigAllocBytes += bytes; - - /* Get a segment to hold this allocation */ - sp = GrowHeapExactly(bytes); - - if (sp) { - p = (PRWord*) sp->base; - chunkSize = sp->limit - sp->base; - - /* All memory is double aligned on 64 bit machines... */ -#ifndef IS_64 - if (dub && (((PRWord)p & (PR_BYTES_PER_DWORD-1)) == 0)) { - /* - ** Consume the first word of the chunk with a dummy - ** unreferenced object. - */ - p[0] = MAKE_HEADER(FREE_MEMORY_TYPEIX, 1); - SET_HBIT(sp, p); - p++; - chunkSize -= PR_BYTES_PER_WORD; - _pr_gcData.freeMemory -= PR_BYTES_PER_WORD; - _pr_gcData.busyMemory += PR_BYTES_PER_WORD; - PR_ASSERT(((PRWord)p & (PR_BYTES_PER_DWORD-1)) != 0); - } -#endif - - /* Consume the *entire* segment with a single allocation */ - h = MAKE_HEADER(cbix, (chunkSize >> PR_BYTES_PER_WORD_LOG2)); - p[0] = h; - SET_HBIT(sp, p); - _pr_gcData.freeMemory -= chunkSize; - _pr_gcData.busyMemory += chunkSize; - return p; - } - return 0; -} - -/* we disable gc allocation during low memory conditions */ -static PRBool allocationEnabled = PR_TRUE; - -PR_IMPLEMENT(void) PR_EnableAllocation(PRBool yesOrNo) -{ - allocationEnabled = yesOrNo; -} - -static void CollectorCleanup(void) { - while (collectorCleanupNeeded) { - LOCK_GC(); - collectorCleanupNeeded = 0; - UNLOCK_GC(); - if (freeSegs) { - FreeSegments(); - } - if (!WEAK_FREELIST_ISEMPTY()) { - EmptyWeakFreeList(); - } - } -} - -/******************************************************************************/ - -#ifdef GC_CHECK -static PRInt32 allocationCount; - -static void EarthShatteringKaBoom(PRInt32 whichOne) { - long* p = 0; - *p = 0; -} - -/* Check a segment of heap memory. Verify that the object memory - hasn't been overwritten (past the end at least) */ -static void CheckSegment(GCSeg* sp) { - PRWord h, tix; - PRWord *p, *lastp, *np, *limit; - - lastp = p = (PRWord *) sp->base; - limit = (PRWord *) sp->limit; - while (p < limit) { - if (IS_HBIT(sp, p)) { - char *cp, i; - GCBlockEnd* end; - PRWord bytes, requestedBytes; - - h = p[0]; - tix = GET_TYPEIX(h); - bytes = OBJ_BYTES(h); - np = (PRWord *) ((char *)p + bytes); - if (tix != FREE_MEMORY_TYPEIX) { - PRInt32 test; /* msdev get's fooled without this local */ - /* A live object is here. The last word in the object will - contain the objects requestedSize */ - end = (GCBlockEnd*)((char*)(p) + bytes - sizeof(GCBlockEnd)); - test = end->check; - if (test != PR_BLOCK_END) { - PR_ASSERT(test == PR_BLOCK_END); - } - requestedBytes = end->requestedBytes; - if (requestedBytes >= bytes) EarthShatteringKaBoom(0); - cp = (char*)(p + 1) + requestedBytes; - i = (char) 0xff; - while (cp < (char*)end) { - if (*cp != i) EarthShatteringKaBoom(1); - cp++; - i--; - } - } - lastp = p; - p = np; - } else { - /* Must be a freelist item */ - GCFreeChunk *cp = (GCFreeChunk*) p; - if ((PRInt32)cp->chunkSize < (PRInt32)sizeof(GCFreeChunk)) { - EarthShatteringKaBoom(3); - } - lastp = p; - p = (PRWord*) ((char*)p + cp->chunkSize); - } - } -} - -static void CheckHeap(void) { - GCSeg *sp = segs; - GCSeg *esp = sp + nsegs; - while (sp < esp) { - CheckSegment(sp); - sp++; - } -} - -#endif /* GC_CHECK */ - -/******************************************************************************/ - -#ifdef DEBUG -long gc_thrash = -1L; -#endif - -/* -** Allocate memory from the GC Heap. Performs garbage collections if -** memory gets tight and grows the heap as needed. May return NULL if -** memory cannot be found. -*/ -PR_IMPLEMENT(PRWord GCPTR *)PR_AllocMemory( - PRWord requestedBytes, PRInt32 tix, PRWord flags) -{ - PRWord *p; - CollectorType *ct; - PRInt32 bytes; - GCFinal *final = 0; - GCWeak *weak = 0; - int dub = flags & PR_ALLOC_DOUBLE; - PRInt32 objBytes; -#ifdef GC_STATS - PRInt64 allocTime, ldelta; -#endif - - if (!allocationEnabled) return NULL; - - PR_ASSERT(requestedBytes >= 0); - PR_ASSERT(_pr_collectorTypes[tix].flags != 0); - -#ifdef DEBUG - if (_pr_do_a_dump) { - /* - ** Collect, pause for a second (lets finalizer run), and then GC - ** again. - */ - PR_GC(); - PR_Sleep(PR_MicrosecondsToInterval(1000000L)); - PR_GC(); - PR_DumpGCHeap(_pr_dump_file, PR_TRUE); - _pr_do_a_dump = 0; - } -#endif - -#ifdef GC_STATS - allocTime = PR_Now(); -#endif - bytes = (PRInt32) requestedBytes; - - /* - ** Align bytes to a multiple of a PRWord, then add in enough space - ** to hold the header word. - ** - ** MSVC 1.52 crashed on the ff. code because of the "complex" shifting :-( - */ - /* Check for possible overflow of bytes before performing add */ - if ((MAX_INT - PR_BYTES_PER_WORD) < bytes ) return NULL; - bytes = (bytes + PR_BYTES_PER_WORD - 1) >> PR_BYTES_PER_WORD_LOG2; - bytes <<= PR_BYTES_PER_WORD_LOG2; - /* Check for possible overflow of bytes before performing add */ - if ((MAX_INT - sizeof(PRWord)) < bytes ) return NULL; - bytes += sizeof(PRWord); - /* - * Add in an extra word of memory for double-aligned memory. Some - * percentage of the time this will waste a word of memory (too - * bad). Howver, it makes the allocation logic much simpler and - * faster. - */ -#ifndef IS_64 - if (dub) { - /* Check for possible overflow of bytes before performing add */ - if ((MAX_INT - PR_BYTES_PER_WORD) < bytes ) return NULL; - bytes += PR_BYTES_PER_WORD; - } -#endif - -#ifdef GC_CHECK - if (_pr_gcData.flags & GC_CHECK) { - /* Bloat the allocation a bit so that we can lay down - a check pattern that we will validate */ - /* Check for possible overflow of bytes before performing add */ - if ((MAX_INT - PR_BYTES_PER_WORD * 3) < bytes ) return NULL; - bytes += PR_BYTES_PER_WORD * 3; - } -#endif - -#if defined(GC_CHECK) || defined(GC_STATS) || defined(GC_TRACEROOTS) - if ((MAX_INT - sizeof(GCBlockEnd)) < bytes ) return NULL; - bytes += sizeof(GCBlockEnd); -#endif - - PR_ASSERT( bytes < MAX_ALLOC_SIZE ); - /* - ** Java can ask for objects bigger than MAX_ALLOC_SIZE, - ** but it won't get them. - */ - if (bytes >= MAX_ALLOC_SIZE) return NULL; - -#ifdef DEBUG - if (gc_thrash == -1L ? (gc_thrash = (long)PR_GetEnv("GC_THRASH")):gc_thrash) PR_GC(); -#endif - - ct = &_pr_collectorTypes[tix]; - if (ct->flags & (_GC_TYPE_FINAL|_GC_TYPE_WEAK)) { - if (0 != ct->gctype.finalize) { - /* - ** Allocate a GCFinal struct for this object in advance. Don't put - ** it on the pending list until we have allocated the object - */ - final = AllocFinalNode(); - if (!final) { - /* XXX THIS IS NOT ACCEPTABLE*/ - PR_ASSERT(0); - return 0; - } - } - if (0 != ct->gctype.getWeakLinkOffset) { - /* - ** Allocate a GCWeak struct for this object in advance. Don't put - ** it on the weak links list until we have allocated the object - */ - weak = AllocWeakNode(); - if (!weak) { - /* XXX THIS IS NOT ACCEPTABLE*/ - if (0 != final) { - FreeFinalNode(final); - } - PR_ASSERT(0); - return 0; - } - } - } - - LOCK_GC(); -#ifdef GC_CHECK - if (_pr_gcData.flags & GC_CHECK) CheckHeap(); - allocationCount++; -#endif - - /* Check for overflow of maximum size we can handle */ - if (bytes > MAX_ALLOC) goto lost; - - /* Try default allocation */ - p = ((bytes >= BIG_ALLOC) && (nsegs < MAX_SEGS)) ? - BigAlloc(tix, bytes, dub) : BinAlloc(tix, bytes, dub); - if (0 == p) { -#ifdef GC_STATS - LL_SUB(ldelta, PR_Now(), allocTime); -#endif - /* Collect some memory */ - _GCTRACE(GC_ALLOC, ("force GC: want %d", bytes)); - dogc(); - PR_ASSERT( GC_IS_LOCKED() ); - - /* After a collection we check and see if we should grow the - ** heap. We grow the heap when the amount of memory free is less - ** than a certain percentage of the heap size. We don't check to - ** see if the grow succeeded because our fallback strategy in - ** either case is to try one more time to allocate. */ - if ((_pr_gcData.allocMemory < _pr_gcData.maxMemory) - && ((_pr_gcData.freeMemory < - ((_pr_gcData.allocMemory * MIN_FREE_THRESHOLD_AFTER_GC) / 100L)) - || (_pr_gcData.freeMemory < bytes))) { - GrowHeap(PR_MAX(bytes, segmentSize)); - } -#ifdef GC_STATS - LL_ADD(allocTime, PR_Now(), ldelta); -#endif - - /* Try again */ - p = ((bytes >= BIG_ALLOC) && (nsegs < MAX_SEGS)) ? - BigAlloc(tix, bytes, dub) : BinAlloc(tix, bytes, dub); - if (0 == p) { - /* Well that lost big time. Memory must be pretty well fragmented */ - if (!GrowHeap(PR_MAX(bytes, segmentSize))) goto lost; - p = BinAlloc(tix, bytes, dub); - if (0 == p) goto lost; - } - } - - /* Zero out the portion of the object memory that was used by - the GCFreeChunk structure (skip the first word because it - was already overwritten by the gc header word) */ - objBytes = OBJ_BYTES(p[0]); - if (objBytes > sizeof(PRWord)) p[1] = 0; - if (objBytes > sizeof(PRWord)*2) p[2] = 0; - - if (final) { - _GCTRACE(GC_ALLOC, ("alloc 0x%x (%d) final=0x%x", - p, bytes, final)); - final->object = p; - PR_APPEND_LINK(&final->links, &_pr_finalizeableObjects); - } else { - _GCTRACE(GC_ALLOC, ("alloc 0x%x (%d)", p, bytes)); - } - if (weak) { - weak->object = p; - PR_APPEND_LINK(&weak->links, &_pr_weakLinks); - } - METER(meter.allocBytes += bytes); - METER(meter.wastedBytes += (bytes - requestedBytes)); - UNLOCK_GC(); - - if (collectorCleanupNeeded) { - CollectorCleanup(); - } - -#if defined(GC_CHECK) || defined(GC_STATS) || defined(GC_TRACEROOTS) - { - GCBlockEnd* end = (GCBlockEnd*)((char*)p + OBJ_BYTES(p[0]) - sizeof(GCBlockEnd)); - end->check = PR_BLOCK_END; - } -#endif -#ifdef GC_STATS - { - PRInt64 now = PR_Now(); - double delta; - PRInt32 bin; - GCBlockEnd* end = (GCBlockEnd*)((char*)p + OBJ_BYTES(p[0]) - sizeof(GCBlockEnd)); - - end->allocTime = allocTime; - LL_SUB(ldelta, now, allocTime); - LL_L2D(delta, ldelta); - InlineBinNumber(bin, requestedBytes); - end->bin = bin; - gcstats[bin].nallocs++; - gcstats[bin].allocTime += delta; - gcstats[bin].allocTimeVariance += delta * delta; - } -#endif -#ifdef GC_CHECK - if (_pr_gcData.flags & GC_CHECK) { - /* Place a pattern in the memory that was allocated that was not - requested. We will check the pattern later. */ - char* cp = (char*)(p + 1) + requestedBytes; - GCBlockEnd* end = (GCBlockEnd*)((char*)p + OBJ_BYTES(p[0]) - sizeof(GCBlockEnd)); - char i = (char) 0xff; - while (cp < (char*)end) { - *cp++ = i--; - } - end->requestedBytes = requestedBytes; - CheckHeap(); - } -#endif - return p + 1; - - lost: - /* Out of memory */ - UNLOCK_GC(); - if (final) { - FreeFinalNode(final); - } - if (weak) { - FreeWeakNode(weak); - } - if (collectorCleanupNeeded) { - CollectorCleanup(); - } - return 0; -} - -/* Shortcut allocator for objects that do not require finalization or - are weak objects */ -PR_IMPLEMENT(PRWord GCPTR *) -PR_AllocSimpleMemory(PRWord requestedBytes, PRInt32 tix) -{ - PRWord *p; - PRInt32 bytes; - PRInt32 objBytes; -#ifdef GC_STATS - PRInt64 allocTime, ldelta; -#endif - - if (!allocationEnabled) return NULL; - - PR_ASSERT(requestedBytes >= 0); - PR_ASSERT(_pr_collectorTypes[tix].flags != 0); - -#ifdef DEBUG - if (_pr_do_a_dump) { - /* - ** Collect, pause for a second (lets finalizer run), and then GC - ** again. - */ - PR_GC(); - PR_Sleep(PR_MicrosecondsToInterval(1000000L)); - PR_GC(); - PR_DumpGCHeap(_pr_dump_file, PR_TRUE); - _pr_do_a_dump = 0; - } -#endif - -#ifdef GC_STATS - allocTime = PR_NowMS(); -#endif - bytes = (PRInt32) requestedBytes; - - /* - ** Align bytes to a multiple of a PRWord, then add in enough space - ** to hold the header word. - ** - ** MSVC 1.52 crashed on the ff. code because of the "complex" shifting :-( - */ - bytes = (bytes + PR_BYTES_PER_WORD - 1) >> PR_BYTES_PER_WORD_LOG2; - bytes <<= PR_BYTES_PER_WORD_LOG2; - bytes += sizeof(PRWord); - - /* - * Add in an extra word of memory for double-aligned memory. Some - * percentage of the time this will waste a word of memory (too - * bad). Howver, it makes the allocation logic much simpler and - * faster. - */ -#ifndef IS_64 - bytes += PR_BYTES_PER_WORD; -#endif - -#ifdef GC_CHECK - if (_pr_gcData.flags & GC_CHECK) { - /* Bloat the allocation a bit so that we can lay down - a check pattern that we will validate */ - bytes += PR_BYTES_PER_WORD * 2; - } -#endif - -#if defined(GC_CHECK) || defined(GC_STATS) || defined(GC_TRACEROOTS) - bytes += sizeof(GCBlockEnd); -#endif - - /* Java can ask for objects bigger than 4M, but it won't get them */ - /* - * This check was added because there is a fundamental limit of - * the size field maintained by the gc code. Going over the 4M - * limit caused some bits to roll over into another bit field, - * violating the max segment size and causing a bug. - */ - if (bytes >= MAX_ALLOC_SIZE) { - return NULL; - } -#ifdef DEBUG - if (gc_thrash == -1L - ? (gc_thrash = (long)PR_GetEnv("GC_THRASH")) - : gc_thrash) { - PR_GC(); - } -#endif - - LOCK_GC(); -#ifdef GC_CHECK - if (_pr_gcData.flags & GC_CHECK) { - CheckHeap(); - } - allocationCount++; -#endif - - /* Try default allocation */ - if ((bytes >= BIG_ALLOC) && (nsegs < MAX_SEGS)) { - p = BigAlloc(tix, bytes, 1); - } else { - p = BinAlloc(tix, bytes, 1); - } - if (0 == p) { -#ifdef GC_STATS - LL_SUB(ldelta, PR_Now(), allocTime); -#endif - /* Collect some memory */ - _GCTRACE(GC_ALLOC, ("force GC: want %d", bytes)); - dogc(); - PR_ASSERT( GC_IS_LOCKED() ); - - /* After a collection we check and see if we should grow the - heap. We grow the heap when the amount of memory free is less - than a certain percentage of the heap size. We don't check to - see if the grow succeeded because our fallback strategy in - either case is to try one more time to allocate. */ - if ((_pr_gcData.allocMemory < _pr_gcData.maxMemory) && - (_pr_gcData.freeMemory < - ((_pr_gcData.allocMemory * MIN_FREE_THRESHOLD_AFTER_GC) / 100L))) { - GrowHeap(PR_MAX(bytes, segmentSize)); - } -#ifdef GC_STATS - LL_ADD(allocTime, PR_Now(), ldelta); -#endif - - /* Try one last time */ - if ((bytes >= BIG_ALLOC) && (nsegs < MAX_SEGS)) { - p = BigAlloc(tix, bytes, 1); - } else { - p = BinAlloc(tix, bytes, 1); - } - if (0 == p) { - /* Well that lost big time. Memory must be pretty well fragmented */ - if (!GrowHeap(PR_MAX(bytes, segmentSize))) { - goto lost; - } - p = BinAlloc(tix, bytes, 1); - if (0 == p) goto lost; - } - } - - /* Zero out the portion of the object memory that was used by - the GCFreeChunk structure (skip the first word because it - was already overwritten by the gc header word) */ - objBytes = OBJ_BYTES(p[0]); - if (objBytes > sizeof(PRWord)) p[1] = 0; - if (objBytes > sizeof(PRWord)*2) p[2] = 0; - - METER(meter.allocBytes += bytes); - METER(meter.wastedBytes += (bytes - requestedBytes)); - UNLOCK_GC(); - - if (collectorCleanupNeeded) { - CollectorCleanup(); - } - -#if defined(GC_CHECK) || defined(GC_STATS) || defined(GC_TRACEROOTS) - { - GCBlockEnd* end = (GCBlockEnd*)((char*)p + OBJ_BYTES(p[0]) - sizeof(GCBlockEnd)); - end->check = PR_BLOCK_END; - } -#endif -#ifdef GC_STATS - { - PRInt64 now = PR_Now(); - double delta; - PRInt32 bin; - GCBlockEnd* end = (GCBlockEnd*)((char*)p + OBJ_BYTES(p[0]) - sizeof(GCBlockEnd)); - - end->allocTime = allocTime; - LL_SUB(ldelta, now, allocTime); - LL_L2D(delta, ldelta); - InlineBinNumber(bin, requestedBytes); - end->bin = bin; - gcstats[bin].nallocs++; - gcstats[bin].allocTime += delta; - gcstats[bin].allocTimeVariance += delta * delta; - } -#endif -#ifdef GC_CHECK - if (_pr_gcData.flags & GC_CHECK) { - /* Place a pattern in the memory that was allocated that was not - requested. We will check the pattern later. */ - char* cp = (char*)(p + 1) + requestedBytes; - GCBlockEnd* end = (GCBlockEnd*)((char*)p + OBJ_BYTES(p[0]) - sizeof(GCBlockEnd)); - char i = (char) 0xff; - while (cp < (char*)end) { - *cp++ = i--; - } - end->requestedBytes = requestedBytes; - CheckHeap(); - } -#endif - return p + 1; - - lost: - /* Out of memory */ - UNLOCK_GC(); - if (collectorCleanupNeeded) { - CollectorCleanup(); - } - return 0; -} - -/************************************************************************/ - -PR_IMPLEMENT(PRWord) PR_GetObjectHeader(void *ptr) { - GCSeg *sp; - PRWord *h; - - if (ptr == 0) return 0; - sp = InHeap(ptr); - if (sp == 0) return 0; - h = (PRWord*)FindObject(sp, (PRWord*)ptr); - return GC_GET_USER_BITS(h[0]); -} - -PR_IMPLEMENT(PRWord) PR_SetObjectHeader(void *ptr, PRWord newUserBits) { - GCSeg *sp; - PRWord *h, rv; - - if (ptr == 0) return 0; - sp = InHeap(ptr); - if (sp == 0) return 0; - h = (PRWord*)FindObject(sp, (PRWord*)ptr); - rv = GC_GET_USER_BITS(h[0]); - h[0] = (h[0] & ~GC_USER_BITS) | - ((newUserBits << GC_USER_BITS_SHIFT) & GC_USER_BITS); - return rv; -} - -PR_IMPLEMENT(void) PR_InitGC( - PRWord flags, PRInt32 initialHeapSize, PRInt32 segSize, PRThreadScope scope) -{ - static char firstTime = 1; - - if (!firstTime) return; - firstTime = 0; - - _pr_msgc_lm = PR_NewLogModule("msgc"); - _pr_pageShift = PR_GetPageShift(); - _pr_pageSize = PR_GetPageSize(); - - /* Setup initial heap size and initial segment size */ - if (0 != segSize) segmentSize = segSize; -#ifdef DEBUG - GC = PR_NewLogModule("GC"); - { - char *ev = PR_GetEnv("GC_SEGMENT_SIZE"); - if (ev && ev[0]) { - PRInt32 newSegmentSize = atoi(ev); - if (0 != newSegmentSize) segmentSize = newSegmentSize; - } - ev = PR_GetEnv("GC_INITIAL_HEAP_SIZE"); - if (ev && ev[0]) { - PRInt32 newInitialHeapSize = atoi(ev); - if (0 != newInitialHeapSize) initialHeapSize = newInitialHeapSize; - } - ev = PR_GetEnv("GC_FLAGS"); - if (ev && ev[0]) { - flags |= atoi(ev); - } -#ifdef GCMETER - ev = PR_GetEnv("GC_METER"); - if (ev && ev[0]) { - _pr_gcMeter = atoi(ev); - } -#endif - } -#endif - if (0 == initialHeapSize) initialHeapSize = segmentSize; - if (initialHeapSize < segmentSize) initialHeapSize = segmentSize; - - _pr_gcData.maxMemory = MAX_SEGS * segmentSize; - _pr_gcData.liveBlock = ProcessRootBlock; - _pr_gcData.livePointer = ProcessRootPointer; - _pr_gcData.processRootBlock = ProcessRootBlock; - _pr_gcData.processRootPointer = ProcessRootPointer; - _pr_gcData.dumpOutput = NULL; - - PR_INIT_CLIST(&_pr_finalizeableObjects); - PR_INIT_CLIST(&_pr_finalQueue); - _PR_InitGC(flags); - - /* Create finalizer thread */ - _PR_CreateFinalizer(scope); - - /* Allocate the initial segment for the heap */ - minBin = 31; - maxBin = 0; - GrowHeap(initialHeapSize); - PR_RegisterRootFinder(ScanWeakFreeList, "scan weak free list", 0); -} - -/** Added by Vishy for sanity checking a few GC structures **/ -/** Can use SanityCheckGC to debug corrupted GC Heap situations **/ - -#ifdef DEBUG - -static int SegmentOverlaps(int i, int j) -{ - return - (((segs[i].limit > segs[j].base) && (segs[i].base < segs[j].base)) || - ((segs[j].limit > segs[i].base) && (segs[j].base < segs[i].base))); -} - -static void NoSegmentOverlaps(void) -{ - int i,j; - - for (i = 0; i < nsegs; i++) - for (j = i+1 ; j < nsegs ; j++) - PR_ASSERT(!SegmentOverlaps(i,j)); -} - -static void SegInfoCheck(void) -{ - int i; - for (i = 0 ; i < nsegs ; i++) - PR_ASSERT((segs[i].info->hbits) && - (segs[i].info->hbits == segs[i].hbits) && - (segs[i].info->base == segs[i].base) && - (segs[i].info->limit == segs[i].limit)); -} - -static void SanityCheckGC() -{ - NoSegmentOverlaps(); - SegInfoCheck(); -} - -#endif - -#if defined(DEBUG) && defined(WIN32) - -extern void *baseaddr; -extern void *lastaddr; - -PR_IMPLEMENT(void) -PR_PrintGCStats(void) -{ - long reportedSegSpace = _pr_gcData.busyMemory + _pr_gcData.freeMemory; - char* msg; - long largeCount = 0, largeSize = 0; - long segCount = 0, segSize = 0; - long freeCount = 0, freeSize = 0; - GCSeg *sp, *esp; - GCSegInfo* si; - - LOCK_GC(); - - sp = segs; - esp = sp + nsegs; - while (sp < esp) { - long size = sp->info->limit - sp->info->base; - segCount++; - segSize += size; - if (sp->info->fromMalloc) { - largeCount++; - largeSize += size; - } - sp++; - } - - si = freeSegs; - while (si != NULL) { - long size = si->limit - si->base; - freeCount++; - freeSize += size; - si = si->next; - } - - msg = PR_smprintf("\ -# GC Stats:\n\ -# vm space:\n\ -# range: %ld - %ld\n\ -# size: %ld\n\ -# segments:\n\ -# range: %ld - %ld\n\ -# count: %ld (reported: %ld)\n\ -# size: %ld (reported: %ld)\n\ -# free count: %ld\n\ -# free size: %ld\n\ -# busy objs: %ld (%ld%%)\n\ -# free objs: %ld (%ld%%)\n\ -# large blocks:\n\ -# count: %ld\n\ -# total size: %ld (%ld%%)\n\ -# avg size: %ld\n\ -", - /* vm space */ - (long)baseaddr, (long)lastaddr, - (long)lastaddr - (long)baseaddr, - /* segments */ - _pr_gcData.lowSeg, _pr_gcData.highSeg, - segCount, nsegs, - segSize, reportedSegSpace, - freeCount, - freeSize, - _pr_gcData.busyMemory, - (_pr_gcData.busyMemory * 100 / reportedSegSpace), - _pr_gcData.freeMemory, - (_pr_gcData.freeMemory * 100 / reportedSegSpace), - /* large blocks */ - largeCount, - largeSize, (largeSize * 100 / reportedSegSpace), - (largeCount ? largeSize / largeCount : 0) - ); - UNLOCK_GC(); - fprintf(stderr, msg); - OutputDebugString(msg); - PR_smprintf_free(msg); -#ifdef GC_STATS - PR_PrintGCAllocStats(); -#endif -} -#endif - -PR_IMPLEMENT(void) -PR_DumpToFile(char* filename, char* msg, PRFileDumper dump, PRBool detailed) -{ - FILE *out; - OutputDebugString(msg); - out = fopen(filename, "a"); - if (!out) { - char buf[64]; - PR_ASSERT(strlen(filename) < sizeof(buf) - 16); - PR_snprintf(buf, sizeof(buf), "Can't open \"%s\"\n", - filename); - OutputDebugString(buf); - } - else - { - struct tm *newtime; - time_t aclock; - int i; - - time(&aclock); - newtime = localtime(&aclock); - fprintf(out, "%s on %s\n", msg, asctime(newtime)); /* Print current time */ - dump(out, detailed); - fprintf(out, "\n\n"); - for (i = 0; i < 80; i++) - fprintf(out, "="); - fprintf(out, "\n\n"); - fclose(out); - } - OutputDebugString(" done\n"); -} - diff --git a/lib/msgc/src/unixgc.c b/lib/msgc/src/unixgc.c deleted file mode 100644 index cea4225e..00000000 --- a/lib/msgc/src/unixgc.c +++ /dev/null @@ -1,155 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ - -#include "prlock.h" -#include "prlog.h" -#include "prmem.h" -#include "gcint.h" - -#include <stdio.h> -#include <sys/types.h> -#include <sys/stat.h> -#include <fcntl.h> -#include <sys/mman.h> - -#define _PR_GC_VMBASE 0x40000000 - -#if defined(SOLARIS) -#define _MD_MMAP_FLAGS MAP_SHARED -#elif defined(RELIANTUNIX) -#define _MD_MMAP_FLAGS MAP_PRIVATE|MAP_FIXED -#else -#define _MD_MMAP_FLAGS MAP_PRIVATE -#endif - -static PRInt32 zero_fd = -1; -static PRLock *zero_fd_lock = NULL; - -void _MD_InitGC(void) -{ -#ifdef DEBUG - /* - * Disable using mmap(2) if NSPR_NO_MMAP is set - */ - if (getenv("NSPR_NO_MMAP")) { - zero_fd = -2; - return; - } -#endif - zero_fd = open("/dev/zero",O_RDWR , 0); - zero_fd_lock = PR_NewLock(); -} - -/* This static variable is used by _MD_GrowGCHeap and _MD_ExtendGCHeap */ -static void *lastaddr = (void*) _PR_GC_VMBASE; - -void *_MD_GrowGCHeap(PRUint32 *sizep) -{ - void *addr; - PRUint32 size; - - size = *sizep; - - PR_Lock(zero_fd_lock); - if (zero_fd < 0) { - goto mmap_loses; - } - - /* Extend the mapping */ - addr = mmap(lastaddr, size, PROT_READ|PROT_WRITE|PROT_EXEC, - _MD_MMAP_FLAGS, - zero_fd, 0); - if (addr == (void*)-1) { - zero_fd = -1; - goto mmap_loses; - } - lastaddr = ((char*)addr + size); -#ifdef DEBUG - PR_LOG(_pr_msgc_lm, PR_LOG_WARNING, - ("GC: heap extends from %08x to %08x\n", - _PR_GC_VMBASE, - _PR_GC_VMBASE + (char*)lastaddr - (char*)_PR_GC_VMBASE)); -#endif - PR_Unlock(zero_fd_lock); - return addr; - -mmap_loses: - PR_Unlock(zero_fd_lock); - return PR_MALLOC(size); -} - -/* XXX - This is disabled. MAP_FIXED just does not work. */ -#if 0 -PRBool _MD_ExtendGCHeap(char *base, PRInt32 oldSize, PRInt32 newSize) { - PRBool rv = PR_FALSE; - void* addr; - PRInt32 allocSize = newSize - oldSize; - - PR_Lock(zero_fd_lock); - addr = mmap(base + oldSize, allocSize, PROT_READ|PROT_WRITE|PROT_EXEC, - _MD_MMAP_FLAGS | MAP_FIXED, zero_fd, 0); - if (addr == (void*)-1) { - goto loser; - } - if (addr != (void*) (base + oldSize)) { - munmap(base + oldSize, allocSize); - goto loser; - } - lastaddr = ((char*)base + newSize); - PR_LOG(_pr_msgc_lm, PR_LOG_ALWAYS, - ("GC: heap now extends from %p to %p", - base, base + newSize)); - rv = PR_TRUE; - -loser: - PR_Unlock(zero_fd_lock); - return rv; -} -#else -PRBool _MD_ExtendGCHeap(char *base, PRInt32 oldSize, PRInt32 newSize) { - return PR_FALSE; -} -#endif - -void _MD_FreeGCSegment(void *base, PRInt32 len) -{ - if (zero_fd < 0) { - PR_DELETE(base); - } else { - (void) munmap(base, len); - } -} diff --git a/lib/msgc/src/win32gc.c b/lib/msgc/src/win32gc.c deleted file mode 100644 index eec83774..00000000 --- a/lib/msgc/src/win32gc.c +++ /dev/null @@ -1,129 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ - -/* - * GC related routines - * - */ -#include <windows.h> -#include "prlog.h" - -extern PRLogModuleInfo* _pr_msgc_lm; - -#define GC_VMBASE 0x40000000 -#define GC_VMLIMIT 0x00FFFFFF - -/************************************************************************/ -/* -** Machine dependent GC Heap management routines: -** _MD_GrowGCHeap -*/ -/************************************************************************/ - -void *baseaddr = (void*) GC_VMBASE; -void *lastaddr = (void*) GC_VMBASE; - -void _MD_InitGC() {} - -void *_MD_GrowGCHeap(PRUint32 *sizep) -{ - void *addr; - size_t size; - - /* Reserve a block of memory for the GC */ - if( lastaddr == baseaddr ) { - addr = VirtualAlloc( (void *)GC_VMBASE, GC_VMLIMIT, MEM_RESERVE, PAGE_READWRITE ); - - /* - ** If the GC_VMBASE address is already mapped, then let the OS choose a - ** base address that is available... - */ - if (addr == NULL) { - addr = VirtualAlloc( NULL, GC_VMLIMIT, MEM_RESERVE, PAGE_READWRITE ); - - baseaddr = lastaddr = addr; - if (addr == NULL) { - PR_LOG(_pr_msgc_lm, PR_LOG_ALWAYS, ("GC: unable to allocate heap: LastError=%ld", - GetLastError())); - return 0; - } - } - } - size = *sizep; - - /* Extend the mapping */ - addr = VirtualAlloc( lastaddr, size, MEM_COMMIT, PAGE_READWRITE ); - if (addr == NULL) { - return 0; - } - - lastaddr = ((char*)addr + size); - PR_LOG(_pr_msgc_lm, PR_LOG_ALWAYS, - ("GC: heap extends from %08x to %08x", - baseaddr, (long)baseaddr + (char*)lastaddr - (char*)baseaddr)); - - return addr; -} - -PRBool _MD_ExtendGCHeap(char *base, PRInt32 oldSize, PRInt32 newSize) { - void* addr; - - addr = VirtualAlloc( base + oldSize, newSize - oldSize, - MEM_COMMIT, PAGE_READWRITE ); - if (NULL == addr) { - PR_LOG(_pr_msgc_lm, PR_LOG_ALWAYS, ("GC: unable to extend heap: LastError=%ld", - GetLastError())); - return PR_FALSE; - } - if (base + oldSize != (char*)addr) { - PR_LOG(_pr_msgc_lm, PR_LOG_ALWAYS, ("GC: segment extension returned %x instead of %x", - addr, base + oldSize)); - VirtualFree(addr, newSize - oldSize, MEM_DECOMMIT); - return PR_FALSE; - } - lastaddr = base + newSize; - PR_LOG(_pr_msgc_lm, PR_LOG_ALWAYS, - ("GC: heap now extends from %p to %p", - base, base + newSize)); - return PR_TRUE; -} - - -void _MD_FreeGCSegment(void *base, PRInt32 len) -{ - (void)VirtualFree(base, 0, MEM_RELEASE); -} diff --git a/lib/msgc/tests/.cvsignore b/lib/msgc/tests/.cvsignore deleted file mode 100644 index f3c7a7c5..00000000 --- a/lib/msgc/tests/.cvsignore +++ /dev/null @@ -1 +0,0 @@ -Makefile diff --git a/lib/msgc/tests/Makefile.in b/lib/msgc/tests/Makefile.in deleted file mode 100644 index 51031ed3..00000000 --- a/lib/msgc/tests/Makefile.in +++ /dev/null @@ -1,270 +0,0 @@ -# -# ***** BEGIN LICENSE BLOCK ***** -# Version: MPL 1.1/GPL 2.0/LGPL 2.1 -# -# The contents of this file are subject to the Mozilla Public License Version -# 1.1 (the "License"); you may not use this file except in compliance with -# the License. You may obtain a copy of the License at -# http://www.mozilla.org/MPL/ -# -# Software distributed under the License is distributed on an "AS IS" basis, -# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License -# for the specific language governing rights and limitations under the -# License. -# -# The Original Code is the Netscape Portable Runtime (NSPR). -# -# The Initial Developer of the Original Code is -# Netscape Communications Corporation. -# Portions created by the Initial Developer are Copyright (C) 1998-2000 -# the Initial Developer. All Rights Reserved. -# -# Contributor(s): -# -# Alternatively, the contents of this file may be used under the terms of -# either the GNU General Public License Version 2 or later (the "GPL"), or -# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), -# in which case the provisions of the GPL or the LGPL are applicable instead -# of those above. If you wish to allow use of your version of this file only -# under the terms of either the GPL or the LGPL, and not to allow others to -# use your version of this file under the terms of the MPL, indicate your -# decision by deleting the provisions above and replace them with the notice -# and other provisions required by the GPL or the LGPL. If you do not delete -# the provisions above, a recipient may use your version of this file under -# the terms of any one of the MPL, the GPL or the LGPL. -# -# ***** END LICENSE BLOCK ***** - -#! gmake - -MOD_DEPTH = ../../.. -topsrcdir = @top_srcdir@ -srcdir = @srcdir@ -VPATH = @srcdir@ - -include $(MOD_DEPTH)/config/autoconf.mk - -include $(topsrcdir)/config/config.mk - -ifeq ($(OS_TARGET), OS2) -OS_CFLAGS = $(OS_EXE_CFLAGS) -endif - -CSRCS = gc1.c thrashgc.c - -ifeq (,$(filter-out WINNT OS2,$(OS_ARCH))) -PROG_SUFFIX = .exe -else -PROG_SUFFIX = -endif - -PROGS = $(addprefix $(OBJDIR)/, $(CSRCS:.c=$(PROG_SUFFIX))) - -TARGETS = $(PROGS) $(OBJS) - -INCLUDES = -I$(dist_includedir) - -# Setting the variables LDOPTS and LIBPR. We first initialize -# them to the default values, then adjust them for some platforms. -LDOPTS = -L$(dist_libdir) -NSPR_VERSION = $(MOD_MAJOR_VERSION) -GC_VERSION = $(MOD_MAJOR_VERSION) -LIBPR = -lnspr$(NSPR_VERSION) -LIBPLC = -lplc$(NSPR_VERSION) -LIBGC = -lmsgc$(GC_VERSION) - -ifeq ($(OS_ARCH), WINNT) - LDOPTS = -NOLOGO -DEBUG -INCREMENTAL:NO - LIBPR = $(dist_libdir)/libnspr$(NSPR_VERSION).$(LIB_SUFFIX) - LIBPLC = $(dist_libdir)/libplc$(NSPR_VERSION).$(LIB_SUFFIX) - LIBGC= $(dist_libdir)/libmsgc$(GC_VERSION).$(LIB_SUFFIX) -endif - -ifeq ($(OS_ARCH),OS2) - LDOPTS += -Zomf -Zlinker /PM:VIO -endif - -ifneq ($(OS_ARCH), WINNT) -PWD = $(shell pwd) -endif - -ifeq ($(OS_ARCH), IRIX) -LDOPTS += -rpath $(PWD)/$(dist_libdir) -rdata_shared - -# For 6.x machines, include this flag -ifeq ($(basename $(OS_RELEASE)),6) -ifeq ($(USE_N32),1) -LDOPTS += -n32 -else -LDOPTS += -32 -endif -endif - -endif - -ifeq ($(OS_ARCH), OSF1) -# I haven't figured out how to pass -rpath to cc on OSF1 V3.2, so -# we do static linking. -ifeq ($(OS_RELEASE), V3.2) - LIBPR = $(dist_libdir)/libnspr$(NSPR_VERSION).a - LIBPLC = $(dist_libdir)/libplc$(NSPR_VERSION).a - LIBGC = $(dist_libdir)/libmsgc$(GC_VERSION).a - EXTRA_LIBS = -lc_r -else - LDOPTS += -rpath $(PWD)/$(dist_libdir) -endif -endif - -ifeq ($(OS_ARCH), HP-UX) -LDOPTS += -z -Wl,+s,+b,$(PWD)/$(dist_libdir) -endif - -# AIX -ifeq ($(OS_ARCH),AIX) -LDOPTS += -blibpath:$(PWD)/$(dist_libdir):/usr/lib:/lib -ifeq ($(OS_ARCH)$(OS_RELEASE),AIX4.1) -LIBPR = -lnspr$(NSPR_VERSION)_shr -LIBPLC = -lplc$(NSPR_VERSION)_shr -LIBGC = -lmsgc$(GC_VERSION)_shr -else -LDOPTS += -brtl -EXTRA_LIBS = -ldl -endif -endif - -# Solaris -ifeq ($(OS_ARCH), SunOS) -ifneq ($(OS_RELEASE), 4.1.3_U1) -ifdef NS_USE_GCC -LDOPTS += -Xlinker -R -Xlinker $(PWD)/$(dist_libdir) -else -LDOPTS += -R $(PWD)/$(dist_libdir) -endif -endif - -# SunOS 5.5 needs to link with -lpthread, even though we already -# linked with this system library when we built libnspr.so. -ifeq ($(OS_RELEASE), 5.5) -ifdef USE_PTHREADS -EXTRA_LIBS = -lpthread -endif -endif -endif # SunOS - -ifeq ($(OS_ARCH),NEC) -EXTRA_LIBS = $(OS_LIBS) -# This hardcodes in the executable programs the directory to find -# libnspr.so etc. at program startup. Equivalent to the -R or -rpath -# option for ld on other platforms. -export LD_RUN_PATH = $(PWD)/$(dist_libdir) -endif - -ifeq ($(OS_ARCH), NCR) -# XXX: We see some strange problems when we link with libnspr.so. -# So for now we use static libraries on NCR. The shared library -# stuff below is commented out. -LIBPR = $(dist_libdir)/libnspr$(NSPR_VERSION).a -LIBPLC = $(dist_libdir)/libplc$(NSPR_VERSION).a -LIBGC = $(dist_libdir)/libmsgc$(GC_VERSION).a -EXTRA_LIBS = -lsocket -lnsl -ldl - -# NCR needs to link against -lsocket -lnsl (and -lc, which is linked -# implicitly by $(CC)) again even though we already linked with these -# system libraries when we built libnspr.so. -#EXTRA_LIBS = -lsocket -lnsl -# This hardcodes in the executable programs the directory to find -# libnspr.so etc. at program startup. Equivalent to the -R or -rpath -# option for ld on other platforms. -#export LD_RUN_PATH = $(PWD)/$(dist_libdir) -endif - -ifeq ($(OS_ARCH), Linux) -ifeq ($(OS_RELEASE), 1.2) -EXTRA_LIBS = -ldl -endif -endif - -ifeq ($(OS_ARCH), SCOOS) -# SCO Unix needs to link against -lsocket again even though we -# already linked with these system libraries when we built libnspr.so. -EXTRA_LIBS = -lsocket -# This hardcodes in the executable programs the directory to find -# libnspr.so etc. at program startup. Equivalent to the -R or -rpath -# option for ld on other platforms. -export LD_RUN_PATH = $(PWD)/$(dist_libdir) -endif - -ifeq ($(OS_ARCH),SINIX) -EXTRA_LIBS = -lsocket -lnsl -lresolv -ldl -# This hardcodes in the executable programs the directory to find -# libnspr.so etc. at program startup. Equivalent to the -R or -rpath -# option for ld on other platforms. -export LD_RUN_PATH = $(PWD)/$(dist_libdir) -endif - -ifeq ($(OS_ARCH), UNIXWARE) -export LD_RUN_PATH = $(PWD)/$(dist_libdir) -endif - -ifeq ($(OS_ARCH),BSD_OS) -EXTRA_LIBS = -ldl -endif - -ifeq ($(OS_ARCH),DGUX) -EXTRA_LIBS = -lsocket -lnsl -ldl -endif - -##################################################### -# -# The rules -# -##################################################### - -include $(topsrcdir)/config/rules.mk - -AIX_PRE_4_2 = 0 -ifeq ($(OS_ARCH),AIX) -ifneq ($(OS_RELEASE),4.2) -ifneq ($(USE_PTHREADS), 1) -#AIX_PRE_4_2 = 1 -endif -endif -endif - -ifeq ($(AIX_PRE_4_2),1) - -# AIX releases prior to 4.2 need a special two-step linking hack -# in order to both override the system select() and be able to -# get at the original system select(). -# -# We use a pattern rule in ns/nspr20/config/rules.mk to generate -# the .$(OBJ_SUFFIX) file from the .c source file, then do the -# two-step linking hack below. - -$(OBJDIR)/%: $(OBJDIR)/%.$(OBJ_SUFFIX) - @$(MAKE_OBJDIR) - rm -f $@ $(AIX_TMP) - $(CC) $(AIX_LINK_OPTS) -o $(AIX_TMP) $< $(dist_libdir)/libnspr$(NSPR_VERSION).a - $(CC) -o $@ $(AIX_TMP) $(AIX_WRAP) - rm -f $(AIX_TMP) - -else - -# All platforms that are not AIX pre-4.2. - -$(OBJDIR)/%$(PROG_SUFFIX): $(OBJDIR)/%.$(OBJ_SUFFIX) - @$(MAKE_OBJDIR) -ifeq ($(OS_ARCH), WINNT) - link $(LDOPTS) $< $(LIBGC) $(LIBPLC) $(LIBPR) wsock32.lib -out:$@ -else -ifeq ($(OS_ARCH),OS2) - $(LINK) $(LDOPTS) $< $(LIBGC) $(LIBPLC) $(LIBPR) $(OS_LIBS) $(EXTRA_LIBS) -o $@ -else - $(CC) $(XCFLAGS) $< $(LDOPTS) $(LIBGC) $(LIBPLC) $(LIBPR) $(EXTRA_LIBS) -o $@ -endif -endif -endif - -export:: $(TARGETS) -clean:: - rm -f $(TARGETS) diff --git a/lib/msgc/tests/gc1.c b/lib/msgc/tests/gc1.c deleted file mode 100644 index 9bd485e9..00000000 --- a/lib/msgc/tests/gc1.c +++ /dev/null @@ -1,242 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ - -/*********************************************************************** -** Includes -***********************************************************************/ -/* Used to get the command line option */ -#include "plgetopt.h" - -#include "prgc.h" -#include "prinit.h" -#include "prmon.h" -#include "prinrval.h" -#include "private/pprthred.h" - -#include <stdio.h> -#include <stdlib.h> - -static PRMonitor *mon; -static PRInt32 threads, waiting, iterations; -static PRInt32 scanCount, finalizeCount, freeCount; - -PRIntn failed_already=0; -PRIntn debug_mode; - - -typedef struct Array { - PRUintn size; - void *body[1]; -} Array; - -int arrayTypeIndex; - -static void PR_CALLBACK ScanArray(void *a) -{ -/* printf ("In ScanArray a = %X size = %d \n", a, a->size); */ - scanCount++; -} - -static void PR_CALLBACK FinalizeArray(void *a) -{ -/* printf ("In FinalizeArray a = %X size = %d \n", a, a->size); */ - finalizeCount++; -} - -static void PR_CALLBACK FreeArray(void *a) -{ -/* printf ("In FreeArray\n"); */ - freeCount++; -} - -static Array *NewArray(PRUintn size) -{ - Array *a; - - a = (Array *)PR_AllocMemory(sizeof(Array) + size*sizeof(void*) - 1*sizeof(void*), - arrayTypeIndex, PR_ALLOC_CLEAN); - -/* printf ("In NewArray a = %X \n", a); */ - - if (a) - a->size = size; - return a; -} - -GCType arrayType = { - ScanArray, - FinalizeArray, - 0, - 0, - FreeArray, - 0 -}; - -static void Initialize(void) -{ - PR_InitGC(0, 0, 0, PR_GLOBAL_THREAD); - arrayTypeIndex = PR_RegisterType(&arrayType); -} - -static void PR_CALLBACK AllocateLikeMad(void *arg) -{ - Array *prev; - PRInt32 i; - PRInt32 count; - - count = (PRInt32)arg; - prev = 0; - for (i = 0; i < count; i++) { - Array *leak = NewArray(i & 511); - if ((i & 1023) == 0) { - prev = 0; /* forget */ - } else { - if (i & 1) { - prev = leak; /* remember */ - } - } - } - PR_EnterMonitor(mon); - waiting++; - PR_Notify(mon); - PR_ExitMonitor(mon); -} - -int main(int argc, char **argv) -{ - PRIntervalTime start, stop, usec; - double d; - PRIntn i, totalIterations; - /* The command line argument: -d is used to determine if the test is being run - in debug mode. The regress tool requires only one line output:PASS or FAIL. - All of the printfs associated with this test has been handled with a if (debug_mode) - test. - Usage: test_name -d - */ - PLOptStatus os; - PLOptState *opt = PL_CreateOptState(argc, argv, "dt:c:"); - - threads = 10; - iterations = 100; - - while (PL_OPT_EOL != (os = PL_GetNextOpt(opt))) - { - if (PL_OPT_BAD == os) { - fprintf(stderr, "Invalid command-line option\n"); - exit(1); - } - switch (opt->option) - { - case 'd': /* debug mode */ - debug_mode = 1; - break; - case 't': /* number of threads */ - threads = atoi(opt->value); - break; - case 'c': /* iteration count */ - iterations = atoi(opt->value); - break; - default: - break; - } - } - PL_DestroyOptState(opt); - - fprintf(stderr, "t is %ld, i is %ld\n", (long) threads, (long) iterations); - /* main test */ - - PR_Init(PR_USER_THREAD, PR_PRIORITY_NORMAL, 5); - PR_STDIO_INIT(); - Initialize(); - - /* Spin all of the allocator threads and then wait for them to exit */ - start = PR_IntervalNow(); - mon = PR_NewMonitor(); - PR_EnterMonitor(mon); - waiting = 0; - for (i = 0; i < threads; i++) { - (void) PR_CreateThreadGCAble(PR_USER_THREAD, - AllocateLikeMad, (void*)iterations, - PR_PRIORITY_NORMAL, - PR_LOCAL_THREAD, - PR_UNJOINABLE_THREAD, - 0); - } - while (waiting != threads) { - PR_Wait(mon, PR_INTERVAL_NO_TIMEOUT); - } - PR_ExitMonitor(mon); - - PR_GC(); - PR_ForceFinalize(); - - totalIterations = iterations * threads; -/* - if (scanCount != totalIterations) - printf ("scanCount discrepancy scanCount = %d totalIterations = %d \n", - scanCount, totalIterations); - if (freeCount != totalIterations) - printf ("freeCount discrepancy freeCount = %d totalIterations = %d \n", - freeCount, totalIterations); - if ((finalizeCount != totalIterations) && (finalizeCount != (totalIterations-1))) - printf ("finalizeCount discrepancy finalizeCount = %d totalIterations = %d \n", - finalizeCount,totalIterations); -*/ - - stop = PR_IntervalNow(); - - usec = stop = stop - start; - d = (double)usec; - - if (debug_mode) printf("%40s: %6.2f usec\n", "GC allocation", d / (iterations * threads)); - else { - if (d == 0.0) failed_already = PR_TRUE; - - } - - PR_Cleanup(); - if(failed_already) - { - printf("FAIL\n"); - return 1; - } - else - { - printf("PASS\n"); - return 0; - } -} diff --git a/lib/msgc/tests/thrashgc.c b/lib/msgc/tests/thrashgc.c deleted file mode 100644 index a440d494..00000000 --- a/lib/msgc/tests/thrashgc.c +++ /dev/null @@ -1,242 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ - -/*********************************************************************** -** Name: thrashgc -** -** Description: test garbace collection functions. -** -** Modification History: -** 19-May-97 AGarcia- Converted the test to accomodate the debug_mode flag. -** The debug mode will print all of the printfs associated with this test. -** The regress mode will be the default mode. Since the regress tool limits -** the output to a one line status:PASS or FAIL,all of the printf statements -** have been handled with an if (debug_mode) statement. -** 04-June-97 AGarcia removed the Test_Result function. Regress tool has been updated to -** recognize the return code from tha main program. -***********************************************************************/ -/*********************************************************************** -** Includes -***********************************************************************/ -#include "prthread.h" -#include "prgc.h" -#include "prprf.h" -#include "prinrval.h" -#include "prlock.h" -#include "prinit.h" -#include "prcvar.h" - -#include "private/pprthred.h" - -#include <stdio.h> -#include <memory.h> -#include <string.h> - - -PRIntn failed_already=0; -PRIntn debug_mode; - -static char* progname; -static PRInt32 loops = 1000; -static int tix1, tix2, tix3; -static GCInfo* gcInfo; -static PRLock* stderrLock; - -typedef struct Type1 Type1; -typedef struct Type2 Type2; - -struct Type1 { - Type2* atwo; - Type1* next; -}; - -struct Type2 { - void* buf; -}; - -static void PR_CALLBACK ScanType1(void *obj) { - gcInfo->livePointer(((Type1 *)obj)->atwo); - gcInfo->livePointer(((Type1 *)obj)->next); -} - -static void PR_CALLBACK ScanType2(void *obj) { - gcInfo->livePointer(((Type2 *)obj)->buf); -} - -static GCType type1 = { - ScanType1 -}; - -static GCType type2 = { - ScanType2 -/* (void (*)(void*)) ScanType2 */ -}; - -static GCType type3 = { - 0 -}; - -Type1* NewType1(void) { - Type1* p = (Type1*) PR_AllocMemory(sizeof(Type1), tix1, PR_ALLOC_DOUBLE); - PR_ASSERT(p != NULL); - return p; -} - -Type2* NewType2(void) { - Type2* p = (Type2*) PR_AllocMemory(sizeof(Type2), tix2, PR_ALLOC_DOUBLE); - PR_ASSERT(p != NULL); - return p; -} - -void* NewBuffer(PRInt32 size) { - void* p = PR_AllocMemory(size, tix3, PR_ALLOC_DOUBLE); - PR_ASSERT(p != NULL); - return p; -} - -/* Allocate alot of garbage */ -static void PR_CALLBACK AllocStuff(void *unused) { - PRInt32 i; - void* danglingRefs[50]; - PRIntervalTime start, end; - char msg[100]; - - start = PR_IntervalNow(); - for (i = 0; i < loops; i++) { - void* p; - if (i & 1) { - Type1* t1 = NewType1(); - t1->atwo = NewType2(); - t1->next = NewType1(); - t1->atwo->buf = NewBuffer(100); - p = t1; - } else { - Type2* t2 = NewType2(); - t2->buf = NewBuffer(i & 16383); - p = t2; - } - if ((i % 10) == 0) { - memmove(&danglingRefs[0], &danglingRefs[1], 49*sizeof(void*)); - danglingRefs[49] = p; - } - } - end = PR_IntervalNow(); - if (debug_mode) PR_snprintf(msg, sizeof(msg), "Thread %p: %ld allocations took %ld ms", - PR_GetCurrentThread(), loops, - PR_IntervalToMilliseconds((PRIntervalTime) (end - start))); - PR_Lock(stderrLock); - fprintf(stderr, "%s\n", msg); - PR_Unlock(stderrLock); - } - -static void usage(char *progname) { - fprintf(stderr, "Usage: %s [-t threads] [-l loops]\n", progname); - exit(-1); -} - -static int realMain(int argc, char **argv, char *notused) { - int i; - int threads = 0; - - progname = strrchr(argv[0], '/'); - if (progname == 0) progname = argv[0]; - for (i = 1; i < argc; i++) { - if (strcmp(argv[i], "-t") == 0) { - if (i == argc - 1) { - usage(progname); - } - threads = atoi(argv[++i]); - if (threads < 0) threads = 0; - if (threads > 10000) threads = 10000; - continue; - } - if (strcmp(argv[i], "-l") == 0) { - if (i == argc - 1) { - usage(progname); - } - loops = atoi(argv[++i]); - continue; - } - usage(progname); - } - - for (i = 0; i < threads; i++) { - PRThread* thread; - - /* XXXXX */ - thread = PR_CreateThreadGCAble(PR_USER_THREAD, /* thread type */ - AllocStuff, /* start function */ - NULL, /* arg */ - PR_PRIORITY_NORMAL, /* priority */ - PR_LOCAL_THREAD, /* thread scope */ - PR_UNJOINABLE_THREAD, /* thread state */ - 0); /* stack size */ - if (thread == 0) { - fprintf(stderr, "%s: no more threads (only %d were created)\n", - progname, i); - break; - } - } - AllocStuff(NULL); - return 0; -} - -static int padMain(int argc, char **argv) { - char pad[512]; - return realMain(argc, argv, pad); -} - -int main(int argc, char **argv) { - int rv; - - debug_mode = 1; - - PR_Init(PR_USER_THREAD, PR_PRIORITY_NORMAL, 0); - PR_SetThreadGCAble(); - - PR_InitGC(0, 0, 0, PR_GLOBAL_THREAD); - PR_STDIO_INIT(); - stderrLock = PR_NewLock(); - tix1 = PR_RegisterType(&type1); - tix2 = PR_RegisterType(&type2); - tix3 = PR_RegisterType(&type3); - gcInfo = PR_GetGCInfo(); - rv = padMain(argc, argv); - printf("PASS\n"); - PR_Cleanup(); - return rv; -} diff --git a/lib/prstreams/Makefile.in b/lib/prstreams/Makefile.in index b41f1997..f06e96c9 100644 --- a/lib/prstreams/Makefile.in +++ b/lib/prstreams/Makefile.in @@ -1,39 +1,7 @@ # -# ***** BEGIN LICENSE BLOCK ***** -# Version: MPL 1.1/GPL 2.0/LGPL 2.1 -# -# The contents of this file are subject to the Mozilla Public License Version -# 1.1 (the "License"); you may not use this file except in compliance with -# the License. You may obtain a copy of the License at -# http://www.mozilla.org/MPL/ -# -# Software distributed under the License is distributed on an "AS IS" basis, -# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License -# for the specific language governing rights and limitations under the -# License. -# -# The Original Code is the Netscape Portable Runtime (NSPR). -# -# The Initial Developer of the Original Code is -# Netscape Communications Corporation. -# Portions created by the Initial Developer are Copyright (C) 1998-2000 -# the Initial Developer. All Rights Reserved. -# -# Contributor(s): -# -# Alternatively, the contents of this file may be used under the terms of -# either the GNU General Public License Version 2 or later (the "GPL"), or -# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), -# in which case the provisions of the GPL or the LGPL are applicable instead -# of those above. If you wish to allow use of your version of this file only -# under the terms of either the GPL or the LGPL, and not to allow others to -# use your version of this file under the terms of the MPL, indicate your -# decision by deleting the provisions above and replace them with the notice -# and other provisions required by the GPL or the LGPL. If you do not delete -# the provisions above, a recipient may use your version of this file under -# the terms of any one of the MPL, the GPL or the LGPL. -# -# ***** END LICENSE BLOCK ***** +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. #! gmake @@ -46,23 +14,6 @@ include $(MOD_DEPTH)/config/autoconf.mk include $(topsrcdir)/config/config.mk -# Disable optimization of the nspr on SunOS4.1.3 -ifeq ($(OS_ARCH),SunOS) - ifeq ($(OS_RELEASE),4.1.3_U1) - OPTIMIZER = - else - # The C++ compiler in Workshop 5.0 uses standard - # iostreams as default. -library=iostream will - # allow Workshop 5.0 to work with classic iostreams. - ifndef NS_USE_GCC - CCC_VERSION := $(shell $(CCC) -V 2>&1) - ifneq (,$(findstring 5.0,$(CCC_VERSION))) - CCC_ONLY_FLAGS += -library=iostream - endif - endif - endif -endif - ifeq ($(OS_ARCH), IRIX) ifneq ($(OS_RELEASE),5.3) CCC_ONLY_FLAGS += -exceptions diff --git a/lib/prstreams/plvrsion.c b/lib/prstreams/plvrsion.c index 87b62e7a..511e4c4f 100644 --- a/lib/prstreams/plvrsion.c +++ b/lib/prstreams/plvrsion.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "prinit.h" #include "prvrsion.h" diff --git a/lib/prstreams/prstrms.cpp b/lib/prstreams/prstrms.cpp index 9f709c06..d601fce2 100644 --- a/lib/prstreams/prstrms.cpp +++ b/lib/prstreams/prstrms.cpp @@ -1,546 +1,516 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /* * Robin J. Maxwell 11-22-96 + * Fredrik Roubert <roubert@google.com> 2010-07-23 + * Matt Austern <austern@google.com> 2010-07-23 */ #include "prstrms.h" -#include <string.h> // memmove - -// -// Definition of macros _PRSTR_BP, _PRSTR_DELBUF, and _PRSTR_DELBUF_C. -// -// _PRSTR_BP is the protected member of class ios that is returned -// by the public method rdbuf(). -// -// _PRSTR_DELBUF is the method or data member of class ios, if available, -// with which we can ensure that the ios destructor does not delete -// the associated streambuf. If such a method or data member does not -// exist, define _PRSTR_DELBUF to be empty. -// -// _PRSTR_DELBUF_C is just _PRSTR_DELBUF qualified by a base class. -// - -#if defined(__GNUC__) -#define _PRSTR_BP _strbuf -#define _PRSTR_DELBUF(x) /* as nothing */ -#define _PRSTR_DELBUF_C(c, x) /* as nothing */ -#elif defined(WIN32) -#define _PRSTR_BP bp -#define _PRSTR_DELBUF(x) delbuf(x) -#define _PRSTR_DELBUF_C(c, x) c::_PRSTR_DELBUF(x) -#elif defined(OSF1) -#define _PRSTR_BP m_psb -#define _PRSTR_DELBUF(x) /* as nothing */ -#define _PRSTR_DELBUF_C(c, x) /* as nothing */ -#elif defined(QNX) -#define PRFSTREAMS_BROKEN -#else -#define _PRSTR_BP bp -// Unix compilers don't believe in encapsulation -// At least on Solaris this is also ignored -#define _PRSTR_DELBUF(x) delbuf = x -#define _PRSTR_DELBUF_C(c, x) c::_PRSTR_DELBUF(x) -#endif - -const PRIntn STRM_BUFSIZ = 8192; - -#if !defined (PRFSTREAMS_BROKEN) + +#include <cstdio> +#include <cstring> +#include <ios> +#include <new> + +using std::ios_base; +using std::iostream; +using std::istream; +using std::nothrow; +using std::ostream; +using std::streambuf; +using std::streamsize; + PRfilebuf::PRfilebuf(): -_fd(0), -_opened(PR_FALSE), -_allocated(PR_FALSE) -{ -} + _fd(NULL), + _opened(false), + _allocated(false), + _unbuffered(false), + _user_buf(false), + _buf_base(NULL), + _buf_end(NULL) { } + PRfilebuf::PRfilebuf(PRFileDesc *fd): -streambuf(), -_fd(fd), -_opened(PR_FALSE), -_allocated(PR_FALSE) -{ -} + _fd(fd), + _opened(false), + _allocated(false), + _unbuffered(false), + _user_buf(false), + _buf_base(NULL), + _buf_end(NULL) { } + -PRfilebuf::PRfilebuf(PRFileDesc *fd, char * buffptr, int bufflen): -_fd(fd), -_opened(PR_FALSE), -_allocated(PR_FALSE) +PRfilebuf::PRfilebuf(PRFileDesc *fd, char_type *ptr, streamsize len): + _fd(fd), + _opened(false), + _allocated(false), + _unbuffered(false), + _user_buf(false), + _buf_base(NULL), + _buf_end(NULL) { - PRfilebuf::setbuf(buffptr, bufflen); + setbuf(ptr, len); } + PRfilebuf::~PRfilebuf() { - if (_opened){ + if (_opened) { close(); - }else + } else { sync(); - if (_allocated) - delete base(); -} - -PRfilebuf* -PRfilebuf::open(const char *name, int mode, int flags) -{ - if (_fd != 0) - return 0; // error if already open - PRIntn PRmode = 0; - // translate mode argument - if (!(mode & ios::nocreate)) - PRmode |= PR_CREATE_FILE; - //if (mode & ios::noreplace) - // PRmode |= O_EXCL; - if (mode & ios::app){ - mode |= ios::out; - PRmode |= PR_APPEND; - } - if (mode & ios::trunc){ - mode |= ios::out; // IMPLIED - PRmode |= PR_TRUNCATE; - } - if (mode & ios::out){ - if (mode & ios::in) - PRmode |= PR_RDWR; - else - PRmode |= PR_WRONLY; - if (!(mode & (ios::in|ios::app|ios::ate|ios::noreplace))){ - mode |= ios::trunc; // IMPLIED - PRmode |= PR_TRUNCATE; - } - }else if (mode & ios::in) - PRmode |= PR_RDONLY; - else - return 0; // error if not ios:in or ios::out - - - // - // The usual portable across unix crap... - // NT gets a hokey piece of junk layer that prevents - // access to the API. -#ifdef WIN32 - _fd = PR_Open(name, PRmode, PRmode); -#else - _fd = PR_Open(name, PRmode, flags); -#endif - if (_fd == 0) - return 0; - _opened = PR_TRUE; - if ((!unbuffered()) && (!ebuf())){ - char * sbuf = new char[STRM_BUFSIZ]; - if (!sbuf) - unbuffered(1); - else{ - _allocated = PR_TRUE; - streambuf::setb(sbuf,sbuf+STRM_BUFSIZ,0); - } - } - if (mode & ios::ate){ - if (seekoff(0,ios::end,mode)==EOF){ - close(); - return 0; - } } + if (_allocated) { + delete _buf_base; + } +} + + +PRfilebuf *PRfilebuf::open( + const char *name, ios_base::openmode flags, PRIntn mode) +{ + if (_fd != NULL) { + return NULL; // Error if already open. + } + + // Translate flags argument. + PRIntn prflags = 0; + bool ate = (flags & ios_base::ate) != 0; + flags &= ~(ios_base::ate | ios_base::binary); + + // TODO: The flag PR_CREATE_FILE should probably be used for the cases + // (out), (out|app), (out|trunc) and (in|out|trunc) as the C++ standard + // specifies that these cases should open files 'as if by using fopen with + // "w"'. But adding that flag here will cause the unit test to leave files + // behind after running (which might or might not be an error in the unit + // test) so the matter needs further investigation before any changes are + // made. The old prstreams implementation used the non-standard flag + // ios::nocreate to control the use of PR_CREATE_FILE. + + if (flags == (ios_base::out)) { + prflags = PR_WRONLY | PR_TRUNCATE; + } else if (flags == (ios_base::out | ios_base::app)) { + prflags = PR_RDWR | PR_APPEND; + } else if (flags == (ios_base::out | ios_base::trunc)) { + prflags = PR_WRONLY | PR_TRUNCATE; + } else if (flags == (ios_base::in)) { + prflags = PR_RDONLY; + } else if (flags == (ios_base::in | ios_base::out)) { + prflags = PR_RDWR; + } else if (flags == (ios_base::in | ios_base::out | ios_base::trunc)) { + prflags = PR_RDWR | PR_TRUNCATE; + } else { + return NULL; // Unrecognized flag combination. + } + + if ((_fd = PR_Open(name, prflags, mode)) == NULL) { + return NULL; + } + + _opened = true; + + if (ate && + seekoff(0, ios_base::end, flags) == pos_type(traits_type::eof())) { + close(); + return NULL; + } + return this; } -PRfilebuf* -PRfilebuf::attach(PRFileDesc *fd) + +PRfilebuf *PRfilebuf::attach(PRFileDesc *fd) { - _opened = PR_FALSE; + if (_fd != NULL) { + return NULL; // Error if already open. + } + + _opened = false; _fd = fd; return this; } -int -PRfilebuf::overflow(int c) + +PRfilebuf *PRfilebuf::close() { - if (allocate()==EOF) // make sure there is a reserve area - return EOF; - if (PRfilebuf::sync()==EOF) // sync before new buffer created below - return EOF; + if (_fd == NULL) + return NULL; - if (!unbuffered()) - setp(base(),ebuf()); + int status = sync(); - if (c!=EOF){ - if ((!unbuffered()) && (pptr() < epptr())) // guard against recursion - sputc(c); - else{ - if (PR_Write(_fd, &c, 1)!=1) - return(EOF); - } + if (PR_Close(_fd) == PR_FAILURE || + traits_type::eq_int_type(status, traits_type::eof())) { + return NULL; } - return(1); // return something other than EOF if successful -} -int -PRfilebuf::underflow() -{ - int count; - unsigned char tbuf; + _fd = NULL; + return this; +} - if (in_avail()) - return (int)(unsigned char) *gptr(); - if (allocate()==EOF) // make sure there is a reserve area - return EOF; - if (PRfilebuf::sync()==EOF) - return EOF; +streambuf *PRfilebuf::setbuf(char_type *ptr, streamsize len) +{ + if (is_open() && _buf_end) { + return NULL; + } - if (unbuffered()) - { - if (PR_Read(_fd,(void *)&tbuf,1)<=0) - return EOF; - return (int)tbuf; - } + if (!ptr || len <= 0) { + _unbuffered = true; + } else { + setb(ptr, ptr + len, false); + } - if ((count=PR_Read(_fd,(void *)base(),blen())) <= 0) - return EOF; // reached EOF - setg(base(),base(),base()+count); - return (int)(unsigned char) *gptr(); + return this; } -streambuf* -PRfilebuf::setbuf(char *buffptr, PRstreambuflen bufflen) + +streambuf::pos_type PRfilebuf::seekoff( + off_type offset, ios_base::seekdir dir, ios_base::openmode /*flags*/) { - if (is_open() && (ebuf())) - return 0; - if ((!buffptr) || (bufflen <= 0)) - unbuffered(1); - else - setb(buffptr, buffptr+bufflen, 0); - return this; -} + if (PR_GetDescType(_fd) != PR_DESC_FILE) { + return traits_type::eof(); + } -streampos -PRfilebuf::seekoff(streamoff offset, ios::seek_dir dir, int /* mode */) -{ - if (PR_GetDescType(_fd) == PR_DESC_FILE){ - PRSeekWhence fdir; - PRInt32 retpos; - switch (dir) { - case ios::beg : - fdir = PR_SEEK_SET; - break; - case ios::cur : - fdir = PR_SEEK_CUR; - break; - case ios::end : - fdir = PR_SEEK_END; - break; - default: - // error - return(EOF); - } + PRSeekWhence whence; + PRInt64 pos; + + switch (dir) { + case ios_base::beg: whence = PR_SEEK_SET; break; + case ios_base::cur: whence = PR_SEEK_CUR; break; + case ios_base::end: whence = PR_SEEK_END; break; + default: + return traits_type::eof(); // This should never happen. + } + + if (traits_type::eq_int_type(sync(), traits_type::eof())) { + return traits_type::eof(); + } - if (PRfilebuf::sync()==EOF) - return EOF; - if ((retpos=PR_Seek(_fd, offset, fdir))==-1L) - return (EOF); - return((streampos)retpos); - }else - return (EOF); + if ((pos = PR_Seek64(_fd, offset, whence)) == -1) { + return traits_type::eof(); + } + + return pos; } -int -PRfilebuf::sync() +int PRfilebuf::sync() { - PRInt32 count; - - if (_fd==0) - return(EOF); + if (_fd == NULL) { + return traits_type::eof(); + } - if (!unbuffered()){ - // Sync write area - if ((count=out_waiting())!=0){ + if (!_unbuffered) { + // Sync write area. + PRInt32 waiting; + if ((waiting = pptr() - pbase()) != 0) { PRInt32 nout; - if ((nout =PR_Write(_fd, - (void *) pbase(), - (unsigned int)count)) != count){ + if ((nout = PR_Write(_fd, pbase(), waiting)) != waiting) { if (nout > 0) { - // should set _pptr -= nout - pbump(-(int)nout); - memmove(pbase(), pbase()+nout, (int)(count-nout)); + // Should set _pptr -= nout. + pbump(-nout); + memmove(pbase(), pbase() + nout, waiting - nout); } - return(EOF); + return traits_type::eof(); } } - setp(0,0); // empty put area - - if (PR_GetDescType(_fd) == PR_DESC_FILE){ - // Sockets can't seek; don't need this - if ((count=in_avail()) > 0){ - if (PR_Seek(_fd, -count, PR_SEEK_CUR)!=-1L) - { - return (EOF); + setp(NULL, NULL); // Empty put area. + + if (PR_GetDescType(_fd) == PR_DESC_FILE) { + // Sockets can't seek; don't need this. + PROffset64 avail; + if ((avail = in_avail()) > 0) { + if (PR_Seek64(_fd, -avail, PR_SEEK_CUR) != -1) { + return traits_type::eof(); } } } - setg(0,0,0); // empty get area + setg(NULL, NULL, NULL); // Empty get area. } - return(0); + + return 0; } -PRfilebuf * -PRfilebuf::close() + +streambuf::int_type PRfilebuf::underflow() { - int retval; - if (_fd==0) - return 0; + PRInt32 count; + char_type byte; - retval = sync(); + if (gptr() != NULL && gptr() < egptr()) { + return traits_type::to_int_type(*gptr()); + } - if ((PR_Close(_fd)==0) || (retval==EOF)) - return 0; - _fd = 0; - return this; + // Make sure there is a reserve area. + if (!_unbuffered && _buf_base == NULL && !allocate()) { + return traits_type::eof(); + } + + // Sync before new buffer created below. + if (traits_type::eq_int_type(sync(), traits_type::eof())) { + return traits_type::eof(); + } + + if (_unbuffered) { + if (PR_Read(_fd, &byte, 1) <= 0) { + return traits_type::eof(); + } + + return traits_type::to_int_type(byte); + } + + if ((count = PR_Read(_fd, _buf_base, _buf_end - _buf_base)) <= 0) { + return traits_type::eof(); // Reached EOF. + } + + setg(_buf_base, _buf_base, _buf_base + count); + return traits_type::to_int_type(*gptr()); } -PRifstream::PRifstream(): -istream(new PRfilebuf) + +streambuf::int_type PRfilebuf::overflow(int_type c) { - _PRSTR_DELBUF(0); + // Make sure there is a reserve area. + if (!_unbuffered && _buf_base == NULL && !allocate()) { + return traits_type::eof(); + } + + // Sync before new buffer created below. + if (traits_type::eq_int_type(sync(), traits_type::eof())) { + return traits_type::eof(); + } + + if (!_unbuffered) { + setp(_buf_base, _buf_end); + } + + if (!traits_type::eq_int_type(c, traits_type::eof())) { + // Extract the byte to be written. + // (Required on big-endian architectures.) + char_type byte = traits_type::to_char_type(c); + if (!_unbuffered && pptr() < epptr()) { // Guard against recursion. + return sputc(byte); + } else { + if (PR_Write(_fd, &byte, 1) != 1) { + return traits_type::eof(); + } + } + } + + return traits_type::not_eof(c); } -PRifstream::PRifstream(PRFileDesc *fd): -istream(new PRfilebuf(fd)) + +bool PRfilebuf::allocate() { - _PRSTR_DELBUF(0); + char_type *buf = new(nothrow) char_type[BUFSIZ]; + if (buf == NULL) { + return false; + } + + setb(buf, buf + BUFSIZ, true); + return true; } -PRifstream::PRifstream(PRFileDesc *fd, char *buff, int bufflen): -istream(new PRfilebuf(fd, buff, bufflen)) + +void PRfilebuf::setb(char_type *buf_base, char_type *buf_end, bool user_buf) { - _PRSTR_DELBUF(0); + if (_buf_base && !_user_buf) { + delete[] _buf_base; + } + + _buf_base = buf_base; + _buf_end = buf_end; + _user_buf = user_buf; } -PRifstream::PRifstream(const char * name, int mode, int flags): -istream(new PRfilebuf) + +PRifstream::PRifstream(): + istream(NULL), + _filebuf() { - _PRSTR_DELBUF(0); - if (!rdbuf()->open(name, (mode|ios::in), flags)) - clear(rdstate() | ios::failbit); + init(&_filebuf); } -PRifstream::~PRifstream() + +PRifstream::PRifstream(PRFileDesc *fd): + istream(NULL), + _filebuf(fd) { - sync(); + init(&_filebuf); +} - delete rdbuf(); -#ifdef _PRSTR_BP - _PRSTR_BP = 0; -#endif + +PRifstream::PRifstream(PRFileDesc *fd, char_type *ptr, streamsize len): + istream(NULL), + _filebuf(fd, ptr, len) +{ + init(&_filebuf); } -streambuf * -PRifstream::setbuf(char * ptr, int len) + +PRifstream::PRifstream(const char *name, openmode flags, PRIntn mode): + istream(NULL), + _filebuf() { - if ((is_open()) || (!(rdbuf()->setbuf(ptr, len)))){ - clear(rdstate() | ios::failbit); - return 0; + init(&_filebuf); + if (!_filebuf.open(name, flags | in, mode)) { + setstate(failbit); } - return rdbuf(); } -void -PRifstream::attach(PRFileDesc *fd) + +PRifstream::~PRifstream() { } + + +void PRifstream::open(const char *name, openmode flags, PRIntn mode) { - if (!(rdbuf()->attach(fd))) - clear(rdstate() | ios::failbit); + if (is_open() || !_filebuf.open(name, flags | in, mode)) { + setstate(failbit); + } } -void -PRifstream::open(const char * name, int mode, int flags) + +void PRifstream::attach(PRFileDesc *fd) { - if (is_open() || !(rdbuf()->open(name, (mode|ios::in), flags))) - clear(rdstate() | ios::failbit); + if (!_filebuf.attach(fd)) { + setstate(failbit); + } } -void -PRifstream::close() + +void PRifstream::close() { - clear((rdbuf()->close()) ? 0 : (rdstate() | ios::failbit)); + if (_filebuf.close() == NULL) { + setstate(failbit); + } } + PRofstream::PRofstream(): -ostream(new PRfilebuf) + ostream(NULL), + _filebuf() { - _PRSTR_DELBUF(0); + init(&_filebuf); } + PRofstream::PRofstream(PRFileDesc *fd): -ostream(new PRfilebuf(fd)) + ostream(NULL), + _filebuf(fd) { - _PRSTR_DELBUF(0); + init(&_filebuf); } -PRofstream::PRofstream(PRFileDesc *fd, char *buff, int bufflen): -ostream(new PRfilebuf(fd, buff, bufflen)) + +PRofstream::PRofstream(PRFileDesc *fd, char_type *ptr, streamsize len): + ostream(NULL), + _filebuf(fd, ptr, len) { - _PRSTR_DELBUF(0); + init(&_filebuf); } -PRofstream::PRofstream(const char *name, int mode, int flags): -ostream(new PRfilebuf) + +PRofstream::PRofstream(const char *name, openmode flags, PRIntn mode): + ostream(NULL), + _filebuf() { - _PRSTR_DELBUF(0); - if (!rdbuf()->open(name, (mode|ios::out), flags)) - clear(rdstate() | ios::failbit); + init(&_filebuf); + if (!_filebuf.open(name, flags | out, mode)) { + setstate(failbit); + } } -PRofstream::~PRofstream() -{ - flush(); - delete rdbuf(); -#ifdef _PRSTR_BP - _PRSTR_BP = 0; -#endif -} +PRofstream::~PRofstream() { } + -streambuf * -PRofstream::setbuf(char * ptr, int len) +void PRofstream::open(const char *name, openmode flags, PRIntn mode) { - if ((is_open()) || (!(rdbuf()->setbuf(ptr, len)))){ - clear(rdstate() | ios::failbit); - return 0; + if (is_open() || !_filebuf.open(name, flags | out, mode)) { + setstate(failbit); } - return rdbuf(); } -void -PRofstream::attach(PRFileDesc *fd) -{ - if (!(rdbuf()->attach(fd))) - clear(rdstate() | ios::failbit); -} -void -PRofstream::open(const char * name, int mode, int flags) +void PRofstream::attach(PRFileDesc *fd) { - if (is_open() || !(rdbuf()->open(name, (mode|ios::out), flags))) - clear(rdstate() | ios::failbit); + if (!_filebuf.attach(fd)) { + setstate(failbit); + } } -void -PRofstream::close() + +void PRofstream::close() { - clear((rdbuf()->close()) ? 0 : (rdstate() | ios::failbit)); + if (_filebuf.close() == NULL) { + setstate(failbit); + } } + PRfstream::PRfstream(): -iostream(new PRfilebuf) + iostream(NULL), + _filebuf() { - _PRSTR_DELBUF_C(istream, 0); - _PRSTR_DELBUF_C(ostream, 0); + init(&_filebuf); } + PRfstream::PRfstream(PRFileDesc *fd): -iostream(new PRfilebuf(fd)) + iostream(NULL), + _filebuf(fd) { - _PRSTR_DELBUF_C(istream, 0); - _PRSTR_DELBUF_C(ostream, 0); + init(&_filebuf); } -PRfstream::PRfstream(PRFileDesc *fd, char *buff, int bufflen): -iostream(new PRfilebuf(fd, buff, bufflen)) + +PRfstream::PRfstream(PRFileDesc *fd, char_type *ptr, streamsize len): + iostream(NULL), + _filebuf(fd, ptr, len) { - _PRSTR_DELBUF_C(istream, 0); - _PRSTR_DELBUF_C(ostream, 0); + init(&_filebuf); } -PRfstream::PRfstream(const char *name, int mode, int flags): -iostream(new PRfilebuf) + +PRfstream::PRfstream(const char *name, openmode flags, PRIntn mode): + iostream(NULL), + _filebuf() { - _PRSTR_DELBUF_C(istream, 0); - _PRSTR_DELBUF_C(ostream, 0); - if (!rdbuf()->open(name, (mode|(ios::in|ios::out)), flags)) - clear(rdstate() | ios::failbit); + init(&_filebuf); + if (!_filebuf.open(name, flags | in | out, mode)) { + setstate(failbit); + } } -PRfstream::~PRfstream() -{ - sync(); - flush(); - delete rdbuf(); -#ifdef _PRSTR_BP - istream::_PRSTR_BP = 0; - ostream::_PRSTR_BP = 0; -#endif -} +PRfstream::~PRfstream() { } -streambuf * -PRfstream::setbuf(char * ptr, int len) + +void PRfstream::open(const char *name, openmode flags, PRIntn mode) { - if ((is_open()) || (!(rdbuf()->setbuf(ptr, len)))){ - clear(rdstate() | ios::failbit); - return 0; + if (is_open() || !_filebuf.open(name, flags | in | out, mode)) { + setstate(failbit); } - return rdbuf(); } -void -PRfstream::attach(PRFileDesc *fd) -{ - if (!(rdbuf()->attach(fd))) - clear(rdstate() | ios::failbit); -} -void -PRfstream::open(const char * name, int mode, int flags) +void PRfstream::attach(PRFileDesc *fd) { - if (is_open() || !(rdbuf()->open(name, (mode|(ios::in|ios::out)), flags))) - clear(rdstate() | ios::failbit); + if (!_filebuf.attach(fd)) { + setstate(failbit); + } } -void -PRfstream::close() + +void PRfstream::close() { - clear((rdbuf()->close()) ? 0 : (rdstate() | ios::failbit)); + if (_filebuf.close() == NULL) { + setstate(failbit); + } } - -#else - -// fix it sometime - -int fix_prfstreams () { return 0; } - -#endif diff --git a/lib/prstreams/prstrms.h b/lib/prstreams/prstrms.h index a6752fc4..319dbf9d 100644 --- a/lib/prstreams/prstrms.h +++ b/lib/prstreams/prstrms.h @@ -1,153 +1,140 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /* * Robin J. Maxwell 11-22-96 + * Fredrik Roubert <roubert@google.com> 2010-07-23 + * Matt Austern <austern@google.com> 2010-07-23 */ #ifndef _PRSTRMS_H #define _PRSTRMS_H -#include "prtypes.h" +#include <cstddef> +#include <istream> +#include <ostream> +#include <streambuf> + #include "prio.h" #ifdef _MSC_VER -#pragma warning( disable : 4275) -#endif -#include <iostream.h> - -#if defined(AIX) && defined(__64BIT__) -typedef long PRstreambuflen; -#else -typedef int PRstreambuflen; +// http://support.microsoft.com/kb/q168958/ +class PR_IMPLEMENT(std::_Mutex); +class PR_IMPLEMENT(std::ios_base); #endif -#if defined (PRFSTREAMS_BROKEN) - -// fix it sometime - -#define PRfilebuf streambuf -#define PRifstream ifstream -#define PRofstream ofstream -#define PRfstream fstream - -#else -class PR_IMPLEMENT(PRfilebuf): public streambuf +class PR_IMPLEMENT(PRfilebuf): public std::streambuf { public: PRfilebuf(); PRfilebuf(PRFileDesc *fd); - PRfilebuf(PRFileDesc *fd, char * buffptr, int bufflen); - ~PRfilebuf(); - virtual int overflow(int=EOF); - virtual int underflow(); - virtual streambuf *setbuf(char *buff, PRstreambuflen bufflen); - virtual streampos seekoff(streamoff, ios::seek_dir, int); - virtual int sync(); - PRfilebuf *open(const char *name, int mode, int flags); - PRfilebuf *attach(PRFileDesc *fd); + PRfilebuf(PRFileDesc *fd, char_type *ptr, std::streamsize len); + virtual ~PRfilebuf(); + + bool is_open() const { return _fd != NULL; } + + PRfilebuf *open( + const char *name, + std::ios_base::openmode flags, + PRIntn mode); + PRfilebuf *attach(PRFileDesc *fd); PRfilebuf *close(); - int is_open() const {return (_fd != 0);} - PRFileDesc *fd(){return _fd;} + +protected: + virtual std::streambuf *setbuf(char_type *ptr, std::streamsize len); + virtual pos_type seekoff( + off_type offset, + std::ios_base::seekdir dir, + std::ios_base::openmode flags); + virtual pos_type seekpos( + pos_type pos, + std::ios_base::openmode flags) { + return seekoff(pos, std::ios_base::beg, flags); + } + virtual int sync(); + virtual int_type underflow(); + virtual int_type overflow(int_type c = traits_type::eof()); + + // TODO: Override pbackfail(), showmanyc(), uflow(), xsgetn(), and xsputn(). private: - PRFileDesc * _fd; - PRBool _opened; - PRBool _allocated; + bool allocate(); + void setb(char_type *buf_base, char_type *buf_end, bool user_buf); + + PRFileDesc *_fd; + bool _opened; + bool _allocated; + bool _unbuffered; + bool _user_buf; + char_type *_buf_base; + char_type *_buf_end; }; -class PR_IMPLEMENT(PRifstream): public istream { + +class PR_IMPLEMENT(PRifstream): public std::istream +{ public: - PRifstream(); - PRifstream(const char *, int mode=ios::in, int flags = 0); - PRifstream(PRFileDesc *); - PRifstream(PRFileDesc *, char *, int); - ~PRifstream(); + PRifstream(); + PRifstream(PRFileDesc *fd); + PRifstream(PRFileDesc *fd, char_type *ptr, std::streamsize len); + PRifstream(const char *name, openmode flags = in, PRIntn mode = 0); + virtual ~PRifstream(); - streambuf * setbuf(char *, int); - PRfilebuf* rdbuf(){return (PRfilebuf*) ios::rdbuf(); } + PRfilebuf *rdbuf() const { return &_filebuf; } + bool is_open() const { return _filebuf.is_open(); } - void attach(PRFileDesc *fd); - PRFileDesc *fd() {return rdbuf()->fd();} + void open(const char *name, openmode flags = in, PRIntn mode = 0); + void attach(PRFileDesc *fd); + void close(); - int is_open(){return rdbuf()->is_open();} - void open(const char *, int mode=ios::in, int flags= 0); - void close(); +private: + mutable PRfilebuf _filebuf; }; -class PR_IMPLEMENT(PRofstream) : public ostream { + +class PR_IMPLEMENT(PRofstream): public std::ostream +{ public: - PRofstream(); - PRofstream(const char *, int mode=ios::out, int flags = 0); - PRofstream(PRFileDesc *); - PRofstream(PRFileDesc *, char *, int); - ~PRofstream(); + PRofstream(); + PRofstream(PRFileDesc *fd); + PRofstream(PRFileDesc *fd, char_type *ptr, std::streamsize len); + PRofstream(const char *name, openmode flags = out, PRIntn mode = 0); + virtual ~PRofstream(); - streambuf * setbuf(char *, int); - PRfilebuf* rdbuf() { return (PRfilebuf*) ios::rdbuf(); } + PRfilebuf *rdbuf() const { return &_filebuf; } + bool is_open() const { return _filebuf.is_open(); } - void attach(PRFileDesc *); - PRFileDesc *fd() {return rdbuf()->fd();} + void open(const char *name, openmode flags = out, PRIntn mode = 0); + void attach(PRFileDesc *fd); + void close(); - int is_open(){return rdbuf()->is_open();} - void open(const char *, int =ios::out, int = 0); - void close(); +private: + mutable PRfilebuf _filebuf; }; - -class PR_IMPLEMENT(PRfstream) : public iostream { + + +class PR_IMPLEMENT(PRfstream): public std::iostream +{ public: - PRfstream(); - PRfstream(const char *name, int mode, int flags= 0); - PRfstream(PRFileDesc *fd); - PRfstream(PRFileDesc *fd, char *buff, int bufflen); - ~PRfstream(); + PRfstream(); + PRfstream(PRFileDesc *fd); + PRfstream(PRFileDesc *fd, char_type *ptr, std::streamsize len); + PRfstream(const char *name, openmode flags = in | out, PRIntn mode = 0); + virtual ~PRfstream(); - streambuf * setbuf(char *, int); - PRfilebuf* rdbuf(){ return (PRfilebuf*) ostream::rdbuf(); } + PRfilebuf *rdbuf() const { return &_filebuf; } + bool is_open() const { return _filebuf.is_open(); } - void attach(PRFileDesc *); - PRFileDesc *fd() { return rdbuf()->fd(); } + void open(const char *name, openmode flags = in | out, PRIntn mode = 0); + void attach(PRFileDesc *fd); + void close(); - int is_open() { return rdbuf()->is_open(); } - void open(const char *, int, int = 0); - void close(); +private: + mutable PRfilebuf _filebuf; }; -#endif #endif /* _PRSTRMS_H */ diff --git a/lib/prstreams/prstrms.rc b/lib/prstreams/prstrms.rc index aff3bde9..5f725837 100644 --- a/lib/prstreams/prstrms.rc +++ b/lib/prstreams/prstrms.rc @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1999-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "prinit.h" #include <winver.h> diff --git a/lib/prstreams/tests/testprstrm/Makefile.in b/lib/prstreams/tests/testprstrm/Makefile.in index 30893677..8ca61e91 100644 --- a/lib/prstreams/tests/testprstrm/Makefile.in +++ b/lib/prstreams/tests/testprstrm/Makefile.in @@ -1,39 +1,7 @@ # -# ***** BEGIN LICENSE BLOCK ***** -# Version: MPL 1.1/GPL 2.0/LGPL 2.1 -# -# The contents of this file are subject to the Mozilla Public License Version -# 1.1 (the "License"); you may not use this file except in compliance with -# the License. You may obtain a copy of the License at -# http://www.mozilla.org/MPL/ -# -# Software distributed under the License is distributed on an "AS IS" basis, -# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License -# for the specific language governing rights and limitations under the -# License. -# -# The Original Code is the Netscape Portable Runtime (NSPR). -# -# The Initial Developer of the Original Code is -# Netscape Communications Corporation. -# Portions created by the Initial Developer are Copyright (C) 1998-2000 -# the Initial Developer. All Rights Reserved. -# -# Contributor(s): -# -# Alternatively, the contents of this file may be used under the terms of -# either the GNU General Public License Version 2 or later (the "GPL"), or -# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), -# in which case the provisions of the GPL or the LGPL are applicable instead -# of those above. If you wish to allow use of your version of this file only -# under the terms of either the GPL or the LGPL, and not to allow others to -# use your version of this file under the terms of the MPL, indicate your -# decision by deleting the provisions above and replace them with the notice -# and other provisions required by the GPL or the LGPL. If you do not delete -# the provisions above, a recipient may use your version of this file under -# the terms of any one of the MPL, the GPL or the LGPL. -# -# ***** END LICENSE BLOCK ***** +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. #! gmake diff --git a/lib/prstreams/tests/testprstrm/testprstrm.cpp b/lib/prstreams/tests/testprstrm/testprstrm.cpp index 771172ed..12011c8a 100644 --- a/lib/prstreams/tests/testprstrm/testprstrm.cpp +++ b/lib/prstreams/tests/testprstrm/testprstrm.cpp @@ -1,81 +1,53 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -#include "prinit.h" #include "prstrms.h" + +#include "prinit.h" #include "prio.h" -#include <string.h> -#include <stdio.h> -#if defined(XP_UNIX) || defined(XP_OS2) -#include <sys/types.h> +#include "prthread.h" + +#include <cstring> +#include <iostream> + +#ifdef XP_UNIX #include <sys/stat.h> #endif -const unsigned int MaxCnt = 1; - -void threadwork(void *mytag); +using std::cout; +using std::endl; +using std::ios; +const unsigned int MaxCnt = 1; typedef struct threadarg { - void *mytag; + const char *mytag; } threadarg; +void threadwork(threadarg *arg); + void threadmain(void *mytag) { threadarg arg; - arg.mytag = mytag; + arg.mytag = static_cast<const char *>(mytag); threadwork(&arg); } - void -threadwork(void *_arg) +threadwork(threadarg *arg) { - threadarg *arg = (threadarg *)_arg; unsigned int i; char fname1[256]; char fname2[256]; - strcpy(fname1, (char *)arg->mytag); - strcpy(fname2, (char *)arg->mytag); + strcpy(fname1, arg->mytag); + strcpy(fname2, arg->mytag); strcat(fname2, "2"); PR_Delete(fname1); PR_Delete(fname2); @@ -85,7 +57,7 @@ threadwork(void *_arg) PRofstream *ofs[MaxCnt]; int mode = 0; #ifdef XP_UNIX - mode = S_IRUSR|S_IWUSR|S_IRGRP|S_IRGRP|S_IWOTH|S_IROTH; + mode = S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH; #endif // @@ -167,28 +139,27 @@ threadwork(void *_arg) #define STACKSIZE 1024*1024 int -main(int argc, char **argv) +main() { PR_Init(PR_SYSTEM_THREAD, PR_PRIORITY_NORMAL, 256); - threadmain("TestFile"); + threadmain(const_cast<char *>("TestFile")); PRThread *thr1 = PR_CreateThread(PR_SYSTEM_THREAD, threadmain, - (void *)"TestFile1", + const_cast<char *>("TestFile1"), PR_PRIORITY_NORMAL, PR_GLOBAL_THREAD, PR_JOINABLE_THREAD, STACKSIZE); PRThread *thr2 = PR_CreateThread(PR_SYSTEM_THREAD, threadmain, - (void *)"TestFile2", + const_cast<char *>("TestFile2"), PR_PRIORITY_NORMAL, PR_GLOBAL_THREAD, PR_JOINABLE_THREAD, STACKSIZE); - PRThread *thr3 = PR_CreateThread(PR_SYSTEM_THREAD, threadmain, - (void *)"TestFile3", + const_cast<char *>("TestFile3"), PR_PRIORITY_NORMAL, PR_GLOBAL_THREAD, PR_JOINABLE_THREAD, @@ -198,4 +169,3 @@ main(int argc, char **argv) PR_JoinThread(thr3); return 0; } - diff --git a/lib/tests/Makefile.in b/lib/tests/Makefile.in index d96a2d5a..35b0982e 100644 --- a/lib/tests/Makefile.in +++ b/lib/tests/Makefile.in @@ -1,39 +1,7 @@ # -# ***** BEGIN LICENSE BLOCK ***** -# Version: MPL 1.1/GPL 2.0/LGPL 2.1 -# -# The contents of this file are subject to the Mozilla Public License Version -# 1.1 (the "License"); you may not use this file except in compliance with -# the License. You may obtain a copy of the License at -# http://www.mozilla.org/MPL/ -# -# Software distributed under the License is distributed on an "AS IS" basis, -# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License -# for the specific language governing rights and limitations under the -# License. -# -# The Original Code is the Netscape Portable Runtime (NSPR). -# -# The Initial Developer of the Original Code is -# Netscape Communications Corporation. -# Portions created by the Initial Developer are Copyright (C) 1998-2000 -# the Initial Developer. All Rights Reserved. -# -# Contributor(s): -# -# Alternatively, the contents of this file may be used under the terms of -# either the GNU General Public License Version 2 or later (the "GPL"), or -# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), -# in which case the provisions of the GPL or the LGPL are applicable instead -# of those above. If you wish to allow use of your version of this file only -# under the terms of either the GPL or the LGPL, and not to allow others to -# use your version of this file under the terms of the MPL, indicate your -# decision by deleting the provisions above and replace them with the notice -# and other provisions required by the GPL or the LGPL. If you do not delete -# the provisions above, a recipient may use your version of this file under -# the terms of any one of the MPL, the GPL or the LGPL. -# -# ***** END LICENSE BLOCK ***** +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. #! gmake @@ -52,11 +20,11 @@ CSRCS = \ getopt.c \ string.c -ifeq (,$(filter-out WINNT OS2,$(OS_ARCH))) +ifeq (,$(filter-out WINCE WINNT OS2,$(OS_ARCH))) CSRCS += arena.c endif -ifeq (,$(filter-out WINNT OS2,$(OS_ARCH))) +ifeq (,$(filter-out WINCE WINNT OS2,$(OS_ARCH))) PROG_SUFFIX = .exe else PROG_SUFFIX = @@ -75,9 +43,9 @@ LIBPR = -lnspr$(MOD_MAJOR_VERSION) LIBPLC = -lplc$(MOD_MAJOR_VERSION) LIBPLDS = -lplds$(MOD_MAJOR_VERSION) -ifeq ($(OS_ARCH), WINNT) +ifeq (,$(filter-out WINCE WINNT, $(OS_ARCH))) LDOPTS = -NOLOGO -DEBUG -INCREMENTAL:NO - ifeq ($(OS_TARGET), WIN95) + ifeq (,$(filter-out WIN95 WINCE WINMO, $(OS_TARGET))) LIBPR = $(dist_libdir)/nspr$(MOD_MAJOR_VERSION).$(LIB_SUFFIX) LIBPLC= $(dist_libdir)/plc$(MOD_MAJOR_VERSION).$(LIB_SUFFIX) LIBPLDS= $(dist_libdir)/plds$(MOD_MAJOR_VERSION).$(LIB_SUFFIX) @@ -206,6 +174,9 @@ $(OBJDIR)/%$(PROG_SUFFIX): $(OBJDIR)/%.$(OBJ_SUFFIX) ifeq ($(OS_ARCH), WINNT) link $(LDOPTS) $< $(LIBPLC) $(LIBPLDS) $(LIBPR) wsock32.lib -out:$@ else +ifeq ($(OS_ARCH), WINCE) + $(LD) $(LDOPTS) $< $(LIBPLC) $(LIBPLDS) $(LIBPR) ws2.lib -out:$@ +else ifeq ($(OS_ARCH),OS2) $(LINK) $(EXEFLAGS) $(LDOPTS) $< $(LIBPLC) $(LIBPLDS) $(LIBPR) $(OS_LIBS) $(EXTRA_LIBS) else @@ -213,6 +184,7 @@ else endif endif endif +endif export:: $(TARGETS) clean:: diff --git a/lib/tests/arena.c b/lib/tests/arena.c index 9c74479c..e82e4f8b 100644 --- a/lib/tests/arena.c +++ b/lib/tests/arena.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /* ** File: arena.c diff --git a/lib/tests/base64t.c b/lib/tests/base64t.c index c3c48813..d225c657 100644 --- a/lib/tests/base64t.c +++ b/lib/tests/base64t.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "plbase64.h" #include "plstr.h" diff --git a/lib/tests/getopt.c b/lib/tests/getopt.c index 52b97198..8737d814 100644 --- a/lib/tests/getopt.c +++ b/lib/tests/getopt.c @@ -1,3 +1,7 @@ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + #include <stdio.h> #include <string.h> #include <stdlib.h> diff --git a/lib/tests/string.c b/lib/tests/string.c index 482e17b5..7e15d399 100644 --- a/lib/tests/string.c +++ b/lib/tests/string.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "plstr.h" #include "nspr.h" diff --git a/pkg/Makefile.in b/pkg/Makefile.in index d181bf6f..69830da8 100644 --- a/pkg/Makefile.in +++ b/pkg/Makefile.in @@ -2,41 +2,9 @@ # Copyright 2005 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -# ***** BEGIN LICENSE BLOCK ***** -# Version: MPL 1.1/GPL 2.0/LGPL 2.1 -# -# The contents of this file are subject to the Mozilla Public License Version -# 1.1 (the "License"); you may not use this file except in compliance with -# the License. You may obtain a copy of the License at -# http://www.mozilla.org/MPL/ -# -# Software distributed under the License is distributed on an "AS IS" basis, -# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License -# for the specific language governing rights and limitations under the -# License. -# -# The Original Code is the Netscape Portable Runtime (NSPR). -# -# The Initial Developer of the Original Code is -# Netscape Communications Corporation. -# Portions created by the Initial Developer are Copyright (C) 1998-2000 -# the Initial Developer. All Rights Reserved. -# -# Contributor(s): -# -# Alternatively, the contents of this file may be used under the terms of -# either the GNU General Public License Version 2 or later (the "GPL"), or -# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), -# in which case the provisions of the GPL or the LGPL are applicable instead -# of those above. If you wish to allow use of your version of this file only -# under the terms of either the GPL or the LGPL, and not to allow others to -# use your version of this file under the terms of the MPL, indicate your -# decision by deleting the provisions above and replace them with the notice -# and other provisions required by the GPL or the LGPL. If you do not delete -# the provisions above, a recipient may use your version of this file under -# the terms of any one of the MPL, the GPL or the LGPL. -# -# ***** END LICENSE BLOCK ***** +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. #! gmake diff --git a/pkg/linux/Makefile.in b/pkg/linux/Makefile.in index 8d7aab9a..63fa7503 100644 --- a/pkg/linux/Makefile.in +++ b/pkg/linux/Makefile.in @@ -2,41 +2,9 @@ # Copyright 2005 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -# ***** BEGIN LICENSE BLOCK ***** -# Version: MPL 1.1/GPL 2.0/LGPL 2.1 -# -# The contents of this file are subject to the Mozilla Public License Version -# 1.1 (the "License"); you may not use this file except in compliance with -# the License. You may obtain a copy of the License at -# http://www.mozilla.org/MPL/ -# -# Software distributed under the License is distributed on an "AS IS" basis, -# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License -# for the specific language governing rights and limitations under the -# License. -# -# The Original Code is the Netscape Portable Runtime (NSPR). -# -# The Initial Developer of the Original Code is -# Netscape Communications Corporation. -# Portions created by the Initial Developer are Copyright (C) 1998-2000 -# the Initial Developer. All Rights Reserved. -# -# Contributor(s): -# -# Alternatively, the contents of this file may be used under the terms of -# either the GNU General Public License Version 2 or later (the "GPL"), or -# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), -# in which case the provisions of the GPL or the LGPL are applicable instead -# of those above. If you wish to allow use of your version of this file only -# under the terms of either the GPL or the LGPL, and not to allow others to -# use your version of this file under the terms of the MPL, indicate your -# decision by deleting the provisions above and replace them with the notice -# and other provisions required by the GPL or the LGPL. If you do not delete -# the provisions above, a recipient may use your version of this file under -# the terms of any one of the MPL, the GPL or the LGPL. -# -# ***** END LICENSE BLOCK ***** +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. # #ident "$Id$" # diff --git a/pkg/linux/sun-nspr.spec b/pkg/linux/sun-nspr.spec index f914736d..fccac5a5 100644 --- a/pkg/linux/sun-nspr.spec +++ b/pkg/linux/sun-nspr.spec @@ -20,41 +20,9 @@ memory management (malloc and free) and shared library linking. See: http://www.mozilla.org/projects/nspr/about-nspr.html -***** BEGIN LICENSE BLOCK ***** -Version: MPL 1.1/GPL 2.0/LGPL 2.1 - -The contents of this file are subject to the Mozilla Public License Version -1.1 (the "License"); you may not use this file except in compliance with -the License. You may obtain a copy of the License at -http://www.mozilla.org/MPL/ - -Software distributed under the License is distributed on an "AS IS" basis, -WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License -for the specific language governing rights and limitations under the -License. - -The Original Code is the Netscape security libraries. - -The Initial Developer of the Original Code is -Netscape Communications Corporation. -Portions created by the Initial Developer are Copyright (C) 1994-2000 -the Initial Developer. All Rights Reserved. - -Contributor(s): - -Alternatively, the contents of this file may be used under the terms of -either the GNU General Public License Version 2 or later (the "GPL"), or -the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), -in which case the provisions of the GPL or the LGPL are applicable instead -of those above. If you wish to allow use of your version of this file only -under the terms of either the GPL or the LGPL, and not to allow others to -use your version of this file under the terms of the MPL, indicate your -decision by deleting the provisions above and replace them with the notice -and other provisions required by the GPL or the LGPL. If you do not delete -the provisions above, a recipient may use your version of this file under -the terms of any one of the MPL, the GPL or the LGPL. - -***** END LICENSE BLOCK ***** +This Source Code Form is subject to the terms of the Mozilla Public +License, v. 2.0. If a copy of the MPL was not distributed with this +file, You can obtain one at http://mozilla.org/MPL/2.0/. %package devel Summary: Development Libraries for the Netscape Portable Runtime diff --git a/pkg/solaris/Makefile-devl.com b/pkg/solaris/Makefile-devl.com index 2574465c..86eab396 100755 --- a/pkg/solaris/Makefile-devl.com +++ b/pkg/solaris/Makefile-devl.com @@ -2,41 +2,9 @@ # Copyright 2005 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -# ***** BEGIN LICENSE BLOCK ***** -# Version: MPL 1.1/GPL 2.0/LGPL 2.1 -# -# The contents of this file are subject to the Mozilla Public License Version -# 1.1 (the "License"); you may not use this file except in compliance with -# the License. You may obtain a copy of the License at -# http://www.mozilla.org/MPL/ -# -# Software distributed under the License is distributed on an "AS IS" basis, -# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License -# for the specific language governing rights and limitations under the -# License. -# -# The Original Code is the Netscape Portable Runtime (NSPR). -# -# The Initial Developer of the Original Code is -# Netscape Communications Corporation. -# Portions created by the Initial Developer are Copyright (C) 1998-2000 -# the Initial Developer. All Rights Reserved. -# -# Contributor(s): -# -# Alternatively, the contents of this file may be used under the terms of -# either the GNU General Public License Version 2 or later (the "GPL"), or -# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), -# in which case the provisions of the GPL or the LGPL are applicable instead -# of those above. If you wish to allow use of your version of this file only -# under the terms of either the GPL or the LGPL, and not to allow others to -# use your version of this file under the terms of the MPL, indicate your -# decision by deleting the provisions above and replace them with the notice -# and other provisions required by the GPL or the LGPL. If you do not delete -# the provisions above, a recipient may use your version of this file under -# the terms of any one of the MPL, the GPL or the LGPL. -# -# ***** END LICENSE BLOCK ***** +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. # #ident "$Id$" # diff --git a/pkg/solaris/Makefile-devl.targ b/pkg/solaris/Makefile-devl.targ index 52bdff28..210b501c 100755 --- a/pkg/solaris/Makefile-devl.targ +++ b/pkg/solaris/Makefile-devl.targ @@ -2,41 +2,9 @@ # Copyright 2005 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -# ***** BEGIN LICENSE BLOCK ***** -# Version: MPL 1.1/GPL 2.0/LGPL 2.1 -# -# The contents of this file are subject to the Mozilla Public License Version -# 1.1 (the "License"); you may not use this file except in compliance with -# the License. You may obtain a copy of the License at -# http://www.mozilla.org/MPL/ -# -# Software distributed under the License is distributed on an "AS IS" basis, -# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License -# for the specific language governing rights and limitations under the -# License. -# -# The Original Code is the Netscape Portable Runtime (NSPR). -# -# The Initial Developer of the Original Code is -# Netscape Communications Corporation. -# Portions created by the Initial Developer are Copyright (C) 1998-2000 -# the Initial Developer. All Rights Reserved. -# -# Contributor(s): -# -# Alternatively, the contents of this file may be used under the terms of -# either the GNU General Public License Version 2 or later (the "GPL"), or -# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), -# in which case the provisions of the GPL or the LGPL are applicable instead -# of those above. If you wish to allow use of your version of this file only -# under the terms of either the GPL or the LGPL, and not to allow others to -# use your version of this file under the terms of the MPL, indicate your -# decision by deleting the provisions above and replace them with the notice -# and other provisions required by the GPL or the LGPL. If you do not delete -# the provisions above, a recipient may use your version of this file under -# the terms of any one of the MPL, the GPL or the LGPL. -# -# ***** END LICENSE BLOCK ***** +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. # #ident "$Id$" # diff --git a/pkg/solaris/Makefile.com b/pkg/solaris/Makefile.com index 5d399cd7..d4da8875 100644 --- a/pkg/solaris/Makefile.com +++ b/pkg/solaris/Makefile.com @@ -2,41 +2,9 @@ # Copyright 2005 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -# ***** BEGIN LICENSE BLOCK ***** -# Version: MPL 1.1/GPL 2.0/LGPL 2.1 -# -# The contents of this file are subject to the Mozilla Public License Version -# 1.1 (the "License"); you may not use this file except in compliance with -# the License. You may obtain a copy of the License at -# http://www.mozilla.org/MPL/ -# -# Software distributed under the License is distributed on an "AS IS" basis, -# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License -# for the specific language governing rights and limitations under the -# License. -# -# The Original Code is the Netscape Portable Runtime (NSPR). -# -# The Initial Developer of the Original Code is -# Netscape Communications Corporation. -# Portions created by the Initial Developer are Copyright (C) 1998-2000 -# the Initial Developer. All Rights Reserved. -# -# Contributor(s): -# -# Alternatively, the contents of this file may be used under the terms of -# either the GNU General Public License Version 2 or later (the "GPL"), or -# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), -# in which case the provisions of the GPL or the LGPL are applicable instead -# of those above. If you wish to allow use of your version of this file only -# under the terms of either the GPL or the LGPL, and not to allow others to -# use your version of this file under the terms of the MPL, indicate your -# decision by deleting the provisions above and replace them with the notice -# and other provisions required by the GPL or the LGPL. If you do not delete -# the provisions above, a recipient may use your version of this file under -# the terms of any one of the MPL, the GPL or the LGPL. -# -# ***** END LICENSE BLOCK ***** +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. # #ident "$Id$" # diff --git a/pkg/solaris/Makefile.in b/pkg/solaris/Makefile.in index 0cebcdb6..b34a23aa 100644 --- a/pkg/solaris/Makefile.in +++ b/pkg/solaris/Makefile.in @@ -2,41 +2,9 @@ # Copyright 2005 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -# ***** BEGIN LICENSE BLOCK ***** -# Version: MPL 1.1/GPL 2.0/LGPL 2.1 -# -# The contents of this file are subject to the Mozilla Public License Version -# 1.1 (the "License"); you may not use this file except in compliance with -# the License. You may obtain a copy of the License at -# http://www.mozilla.org/MPL/ -# -# Software distributed under the License is distributed on an "AS IS" basis, -# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License -# for the specific language governing rights and limitations under the -# License. -# -# The Original Code is the Netscape Portable Runtime (NSPR). -# -# The Initial Developer of the Original Code is -# Netscape Communications Corporation. -# Portions created by the Initial Developer are Copyright (C) 1998-2000 -# the Initial Developer. All Rights Reserved. -# -# Contributor(s): -# -# Alternatively, the contents of this file may be used under the terms of -# either the GNU General Public License Version 2 or later (the "GPL"), or -# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), -# in which case the provisions of the GPL or the LGPL are applicable instead -# of those above. If you wish to allow use of your version of this file only -# under the terms of either the GPL or the LGPL, and not to allow others to -# use your version of this file under the terms of the MPL, indicate your -# decision by deleting the provisions above and replace them with the notice -# and other provisions required by the GPL or the LGPL. If you do not delete -# the provisions above, a recipient may use your version of this file under -# the terms of any one of the MPL, the GPL or the LGPL. -# -# ***** END LICENSE BLOCK ***** +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. # #ident "$Id$" # diff --git a/pkg/solaris/Makefile.targ b/pkg/solaris/Makefile.targ index a8f3bae7..742ee932 100644 --- a/pkg/solaris/Makefile.targ +++ b/pkg/solaris/Makefile.targ @@ -2,41 +2,9 @@ # Copyright 2005 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -# ***** BEGIN LICENSE BLOCK ***** -# Version: MPL 1.1/GPL 2.0/LGPL 2.1 -# -# The contents of this file are subject to the Mozilla Public License Version -# 1.1 (the "License"); you may not use this file except in compliance with -# the License. You may obtain a copy of the License at -# http://www.mozilla.org/MPL/ -# -# Software distributed under the License is distributed on an "AS IS" basis, -# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License -# for the specific language governing rights and limitations under the -# License. -# -# The Original Code is the Netscape Portable Runtime (NSPR). -# -# The Initial Developer of the Original Code is -# Netscape Communications Corporation. -# Portions created by the Initial Developer are Copyright (C) 1998-2000 -# the Initial Developer. All Rights Reserved. -# -# Contributor(s): -# -# Alternatively, the contents of this file may be used under the terms of -# either the GNU General Public License Version 2 or later (the "GPL"), or -# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), -# in which case the provisions of the GPL or the LGPL are applicable instead -# of those above. If you wish to allow use of your version of this file only -# under the terms of either the GPL or the LGPL, and not to allow others to -# use your version of this file under the terms of the MPL, indicate your -# decision by deleting the provisions above and replace them with the notice -# and other provisions required by the GPL or the LGPL. If you do not delete -# the provisions above, a recipient may use your version of this file under -# the terms of any one of the MPL, the GPL or the LGPL. -# -# ***** END LICENSE BLOCK ***** +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. # #ident "$Id$" # diff --git a/pkg/solaris/SUNWpr/Makefile.in b/pkg/solaris/SUNWpr/Makefile.in index e60ed4a7..9fe1f0ab 100644 --- a/pkg/solaris/SUNWpr/Makefile.in +++ b/pkg/solaris/SUNWpr/Makefile.in @@ -2,41 +2,9 @@ # Copyright 2005 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -# ***** BEGIN LICENSE BLOCK ***** -# Version: MPL 1.1/GPL 2.0/LGPL 2.1 -# -# The contents of this file are subject to the Mozilla Public License Version -# 1.1 (the "License"); you may not use this file except in compliance with -# the License. You may obtain a copy of the License at -# http://www.mozilla.org/MPL/ -# -# Software distributed under the License is distributed on an "AS IS" basis, -# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License -# for the specific language governing rights and limitations under the -# License. -# -# The Original Code is the Netscape Portable Runtime (NSPR). -# -# The Initial Developer of the Original Code is -# Netscape Communications Corporation. -# Portions created by the Initial Developer are Copyright (C) 1998-2000 -# the Initial Developer. All Rights Reserved. -# -# Contributor(s): -# -# Alternatively, the contents of this file may be used under the terms of -# either the GNU General Public License Version 2 or later (the "GPL"), or -# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), -# in which case the provisions of the GPL or the LGPL are applicable instead -# of those above. If you wish to allow use of your version of this file only -# under the terms of either the GPL or the LGPL, and not to allow others to -# use your version of this file under the terms of the MPL, indicate your -# decision by deleting the provisions above and replace them with the notice -# and other provisions required by the GPL or the LGPL. If you do not delete -# the provisions above, a recipient may use your version of this file under -# the terms of any one of the MPL, the GPL or the LGPL. -# -# ***** END LICENSE BLOCK ***** +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. # #ident "$Id$" # diff --git a/pkg/solaris/SUNWpr/depend b/pkg/solaris/SUNWpr/depend index 328984ae..4dd09c5a 100644 --- a/pkg/solaris/SUNWpr/depend +++ b/pkg/solaris/SUNWpr/depend @@ -2,41 +2,9 @@ # Copyright 2005 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -# ***** BEGIN LICENSE BLOCK ***** -# Version: MPL 1.1/GPL 2.0/LGPL 2.1 -# -# The contents of this file are subject to the Mozilla Public License Version -# 1.1 (the "License"); you may not use this file except in compliance with -# the License. You may obtain a copy of the License at -# http://www.mozilla.org/MPL/ -# -# Software distributed under the License is distributed on an "AS IS" basis, -# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License -# for the specific language governing rights and limitations under the -# License. -# -# The Original Code is the Netscape Portable Runtime (NSPR). -# -# The Initial Developer of the Original Code is -# Netscape Communications Corporation. -# Portions created by the Initial Developer are Copyright (C) 1998-2000 -# the Initial Developer. All Rights Reserved. -# -# Contributor(s): -# -# Alternatively, the contents of this file may be used under the terms of -# either the GNU General Public License Version 2 or later (the "GPL"), or -# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), -# in which case the provisions of the GPL or the LGPL are applicable instead -# of those above. If you wish to allow use of your version of this file only -# under the terms of either the GPL or the LGPL, and not to allow others to -# use your version of this file under the terms of the MPL, indicate your -# decision by deleting the provisions above and replace them with the notice -# and other provisions required by the GPL or the LGPL. If you do not delete -# the provisions above, a recipient may use your version of this file under -# the terms of any one of the MPL, the GPL or the LGPL. -# -# ***** END LICENSE BLOCK ***** +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. # # $Id$ # diff --git a/pkg/solaris/SUNWpr/pkginfo.tmpl b/pkg/solaris/SUNWpr/pkginfo.tmpl index 621cd90c..3c1a107b 100644 --- a/pkg/solaris/SUNWpr/pkginfo.tmpl +++ b/pkg/solaris/SUNWpr/pkginfo.tmpl @@ -2,41 +2,9 @@ # Copyright 2005 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -# ***** BEGIN LICENSE BLOCK ***** -# Version: MPL 1.1/GPL 2.0/LGPL 2.1 -# -# The contents of this file are subject to the Mozilla Public License Version -# 1.1 (the "License"); you may not use this file except in compliance with -# the License. You may obtain a copy of the License at -# http://www.mozilla.org/MPL/ -# -# Software distributed under the License is distributed on an "AS IS" basis, -# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License -# for the specific language governing rights and limitations under the -# License. -# -# The Original Code is the Netscape Portable Runtime (NSPR). -# -# The Initial Developer of the Original Code is -# Netscape Communications Corporation. -# Portions created by the Initial Developer are Copyright (C) 1998-2000 -# the Initial Developer. All Rights Reserved. -# -# Contributor(s): -# -# Alternatively, the contents of this file may be used under the terms of -# either the GNU General Public License Version 2 or later (the "GPL"), or -# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), -# in which case the provisions of the GPL or the LGPL are applicable instead -# of those above. If you wish to allow use of your version of this file only -# under the terms of either the GPL or the LGPL, and not to allow others to -# use your version of this file under the terms of the MPL, indicate your -# decision by deleting the provisions above and replace them with the notice -# and other provisions required by the GPL or the LGPL. If you do not delete -# the provisions above, a recipient may use your version of this file under -# the terms of any one of the MPL, the GPL or the LGPL. -# -# ***** END LICENSE BLOCK ***** +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. # #ident "$Id$" # diff --git a/pkg/solaris/SUNWpr/prototype_com b/pkg/solaris/SUNWpr/prototype_com index 40473f48..4b994eac 100644 --- a/pkg/solaris/SUNWpr/prototype_com +++ b/pkg/solaris/SUNWpr/prototype_com @@ -2,41 +2,9 @@ # Copyright 2005 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -# ***** BEGIN LICENSE BLOCK ***** -# Version: MPL 1.1/GPL 2.0/LGPL 2.1 -# -# The contents of this file are subject to the Mozilla Public License Version -# 1.1 (the "License"); you may not use this file except in compliance with -# the License. You may obtain a copy of the License at -# http://www.mozilla.org/MPL/ -# -# Software distributed under the License is distributed on an "AS IS" basis, -# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License -# for the specific language governing rights and limitations under the -# License. -# -# The Original Code is the Netscape Portable Runtime (NSPR). -# -# The Initial Developer of the Original Code is -# Netscape Communications Corporation. -# Portions created by the Initial Developer are Copyright (C) 1998-2000 -# the Initial Developer. All Rights Reserved. -# -# Contributor(s): -# -# Alternatively, the contents of this file may be used under the terms of -# either the GNU General Public License Version 2 or later (the "GPL"), or -# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), -# in which case the provisions of the GPL or the LGPL are applicable instead -# of those above. If you wish to allow use of your version of this file only -# under the terms of either the GPL or the LGPL, and not to allow others to -# use your version of this file under the terms of the MPL, indicate your -# decision by deleting the provisions above and replace them with the notice -# and other provisions required by the GPL or the LGPL. If you do not delete -# the provisions above, a recipient may use your version of this file under -# the terms of any one of the MPL, the GPL or the LGPL. -# -# ***** END LICENSE BLOCK ***** +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. # #ident "$Id$" # diff --git a/pkg/solaris/SUNWpr/prototype_i386 b/pkg/solaris/SUNWpr/prototype_i386 index 43ed4d18..e2f7a2f0 100644 --- a/pkg/solaris/SUNWpr/prototype_i386 +++ b/pkg/solaris/SUNWpr/prototype_i386 @@ -2,41 +2,9 @@ # Copyright 2005 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -# ***** BEGIN LICENSE BLOCK ***** -# Version: MPL 1.1/GPL 2.0/LGPL 2.1 -# -# The contents of this file are subject to the Mozilla Public License Version -# 1.1 (the "License"); you may not use this file except in compliance with -# the License. You may obtain a copy of the License at -# http://www.mozilla.org/MPL/ -# -# Software distributed under the License is distributed on an "AS IS" basis, -# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License -# for the specific language governing rights and limitations under the -# License. -# -# The Original Code is the Netscape Portable Runtime (NSPR). -# -# The Initial Developer of the Original Code is -# Netscape Communications Corporation. -# Portions created by the Initial Developer are Copyright (C) 1998-2000 -# the Initial Developer. All Rights Reserved. -# -# Contributor(s): -# -# Alternatively, the contents of this file may be used under the terms of -# either the GNU General Public License Version 2 or later (the "GPL"), or -# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), -# in which case the provisions of the GPL or the LGPL are applicable instead -# of those above. If you wish to allow use of your version of this file only -# under the terms of either the GPL or the LGPL, and not to allow others to -# use your version of this file under the terms of the MPL, indicate your -# decision by deleting the provisions above and replace them with the notice -# and other provisions required by the GPL or the LGPL. If you do not delete -# the provisions above, a recipient may use your version of this file under -# the terms of any one of the MPL, the GPL or the LGPL. -# -# ***** END LICENSE BLOCK ***** +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. # #ident "$Id$" # diff --git a/pkg/solaris/SUNWpr/prototype_sparc b/pkg/solaris/SUNWpr/prototype_sparc index 1cb5aaf9..aae5f184 100644 --- a/pkg/solaris/SUNWpr/prototype_sparc +++ b/pkg/solaris/SUNWpr/prototype_sparc @@ -2,41 +2,9 @@ # Copyright 2005 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -# ***** BEGIN LICENSE BLOCK ***** -# Version: MPL 1.1/GPL 2.0/LGPL 2.1 -# -# The contents of this file are subject to the Mozilla Public License Version -# 1.1 (the "License"); you may not use this file except in compliance with -# the License. You may obtain a copy of the License at -# http://www.mozilla.org/MPL/ -# -# Software distributed under the License is distributed on an "AS IS" basis, -# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License -# for the specific language governing rights and limitations under the -# License. -# -# The Original Code is the Netscape Portable Runtime (NSPR). -# -# The Initial Developer of the Original Code is -# Netscape Communications Corporation. -# Portions created by the Initial Developer are Copyright (C) 1998-2000 -# the Initial Developer. All Rights Reserved. -# -# Contributor(s): -# -# Alternatively, the contents of this file may be used under the terms of -# either the GNU General Public License Version 2 or later (the "GPL"), or -# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), -# in which case the provisions of the GPL or the LGPL are applicable instead -# of those above. If you wish to allow use of your version of this file only -# under the terms of either the GPL or the LGPL, and not to allow others to -# use your version of this file under the terms of the MPL, indicate your -# decision by deleting the provisions above and replace them with the notice -# and other provisions required by the GPL or the LGPL. If you do not delete -# the provisions above, a recipient may use your version of this file under -# the terms of any one of the MPL, the GPL or the LGPL. -# -# ***** END LICENSE BLOCK ***** +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. # #ident "$Id$" # diff --git a/pkg/solaris/SUNWprd/Makefile.in b/pkg/solaris/SUNWprd/Makefile.in index 0da0a48e..0cb4c289 100755 --- a/pkg/solaris/SUNWprd/Makefile.in +++ b/pkg/solaris/SUNWprd/Makefile.in @@ -2,41 +2,9 @@ # Copyright 2005 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -# ***** BEGIN LICENSE BLOCK ***** -# Version: MPL 1.1/GPL 2.0/LGPL 2.1 -# -# The contents of this file are subject to the Mozilla Public License Version -# 1.1 (the "License"); you may not use this file except in compliance with -# the License. You may obtain a copy of the License at -# http://www.mozilla.org/MPL/ -# -# Software distributed under the License is distributed on an "AS IS" basis, -# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License -# for the specific language governing rights and limitations under the -# License. -# -# The Original Code is the Netscape Portable Runtime (NSPR). -# -# The Initial Developer of the Original Code is -# Netscape Communications Corporation. -# Portions created by the Initial Developer are Copyright (C) 1998-2000 -# the Initial Developer. All Rights Reserved. -# -# Contributor(s): -# -# Alternatively, the contents of this file may be used under the terms of -# either the GNU General Public License Version 2 or later (the "GPL"), or -# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), -# in which case the provisions of the GPL or the LGPL are applicable instead -# of those above. If you wish to allow use of your version of this file only -# under the terms of either the GPL or the LGPL, and not to allow others to -# use your version of this file under the terms of the MPL, indicate your -# decision by deleting the provisions above and replace them with the notice -# and other provisions required by the GPL or the LGPL. If you do not delete -# the provisions above, a recipient may use your version of this file under -# the terms of any one of the MPL, the GPL or the LGPL. -# -# ***** END LICENSE BLOCK ***** +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. # #ident "$Id$" # diff --git a/pkg/solaris/SUNWprd/depend b/pkg/solaris/SUNWprd/depend index c17928cc..2415c541 100755 --- a/pkg/solaris/SUNWprd/depend +++ b/pkg/solaris/SUNWprd/depend @@ -2,41 +2,9 @@ # Copyright 2005 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -# ***** BEGIN LICENSE BLOCK ***** -# Version: MPL 1.1/GPL 2.0/LGPL 2.1 -# -# The contents of this file are subject to the Mozilla Public License Version -# 1.1 (the "License"); you may not use this file except in compliance with -# the License. You may obtain a copy of the License at -# http://www.mozilla.org/MPL/ -# -# Software distributed under the License is distributed on an "AS IS" basis, -# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License -# for the specific language governing rights and limitations under the -# License. -# -# The Original Code is the Netscape Portable Runtime (NSPR). -# -# The Initial Developer of the Original Code is -# Netscape Communications Corporation. -# Portions created by the Initial Developer are Copyright (C) 1998-2000 -# the Initial Developer. All Rights Reserved. -# -# Contributor(s): -# -# Alternatively, the contents of this file may be used under the terms of -# either the GNU General Public License Version 2 or later (the "GPL"), or -# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), -# in which case the provisions of the GPL or the LGPL are applicable instead -# of those above. If you wish to allow use of your version of this file only -# under the terms of either the GPL or the LGPL, and not to allow others to -# use your version of this file under the terms of the MPL, indicate your -# decision by deleting the provisions above and replace them with the notice -# and other provisions required by the GPL or the LGPL. If you do not delete -# the provisions above, a recipient may use your version of this file under -# the terms of any one of the MPL, the GPL or the LGPL. -# -# ***** END LICENSE BLOCK ***** +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. # # $Id$ # diff --git a/pkg/solaris/SUNWprd/pkginfo.tmpl b/pkg/solaris/SUNWprd/pkginfo.tmpl index fd25fcdd..5003122a 100755 --- a/pkg/solaris/SUNWprd/pkginfo.tmpl +++ b/pkg/solaris/SUNWprd/pkginfo.tmpl @@ -2,41 +2,9 @@ # Copyright 2005 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -# ***** BEGIN LICENSE BLOCK ***** -# Version: MPL 1.1/GPL 2.0/LGPL 2.1 -# -# The contents of this file are subject to the Mozilla Public License Version -# 1.1 (the "License"); you may not use this file except in compliance with -# the License. You may obtain a copy of the License at -# http://www.mozilla.org/MPL/ -# -# Software distributed under the License is distributed on an "AS IS" basis, -# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License -# for the specific language governing rights and limitations under the -# License. -# -# The Original Code is the Netscape Portable Runtime (NSPR). -# -# The Initial Developer of the Original Code is -# Netscape Communications Corporation. -# Portions created by the Initial Developer are Copyright (C) 1998-2000 -# the Initial Developer. All Rights Reserved. -# -# Contributor(s): -# -# Alternatively, the contents of this file may be used under the terms of -# either the GNU General Public License Version 2 or later (the "GPL"), or -# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), -# in which case the provisions of the GPL or the LGPL are applicable instead -# of those above. If you wish to allow use of your version of this file only -# under the terms of either the GPL or the LGPL, and not to allow others to -# use your version of this file under the terms of the MPL, indicate your -# decision by deleting the provisions above and replace them with the notice -# and other provisions required by the GPL or the LGPL. If you do not delete -# the provisions above, a recipient may use your version of this file under -# the terms of any one of the MPL, the GPL or the LGPL. -# -# ***** END LICENSE BLOCK ***** +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. # #ident "$Id$" # diff --git a/pkg/solaris/SUNWprd/prototype b/pkg/solaris/SUNWprd/prototype index c8734a95..44f52bab 100755 --- a/pkg/solaris/SUNWprd/prototype +++ b/pkg/solaris/SUNWprd/prototype @@ -2,41 +2,9 @@ # Copyright 2005 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -# ***** BEGIN LICENSE BLOCK ***** -# Version: MPL 1.1/GPL 2.0/LGPL 2.1 -# -# The contents of this file are subject to the Mozilla Public License Version -# 1.1 (the "License"); you may not use this file except in compliance with -# the License. You may obtain a copy of the License at -# http://www.mozilla.org/MPL/ -# -# Software distributed under the License is distributed on an "AS IS" basis, -# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License -# for the specific language governing rights and limitations under the -# License. -# -# The Original Code is the Netscape Portable Runtime (NSPR). -# -# The Initial Developer of the Original Code is -# Netscape Communications Corporation. -# Portions created by the Initial Developer are Copyright (C) 1998-2000 -# the Initial Developer. All Rights Reserved. -# -# Contributor(s): -# -# Alternatively, the contents of this file may be used under the terms of -# either the GNU General Public License Version 2 or later (the "GPL"), or -# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), -# in which case the provisions of the GPL or the LGPL are applicable instead -# of those above. If you wish to allow use of your version of this file only -# under the terms of either the GPL or the LGPL, and not to allow others to -# use your version of this file under the terms of the MPL, indicate your -# decision by deleting the provisions above and replace them with the notice -# and other provisions required by the GPL or the LGPL. If you do not delete -# the provisions above, a recipient may use your version of this file under -# the terms of any one of the MPL, the GPL or the LGPL. -# -# ***** END LICENSE BLOCK ***** +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. # #ident "$Id$" # diff --git a/pkg/solaris/bld_awk_pkginfo.ksh b/pkg/solaris/bld_awk_pkginfo.ksh index 79c22b00..67f1df7e 100644 --- a/pkg/solaris/bld_awk_pkginfo.ksh +++ b/pkg/solaris/bld_awk_pkginfo.ksh @@ -3,41 +3,9 @@ # Copyright 2005 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -# ***** BEGIN LICENSE BLOCK ***** -# Version: MPL 1.1/GPL 2.0/LGPL 2.1 -# -# The contents of this file are subject to the Mozilla Public License Version -# 1.1 (the "License"); you may not use this file except in compliance with -# the License. You may obtain a copy of the License at -# http://www.mozilla.org/MPL/ -# -# Software distributed under the License is distributed on an "AS IS" basis, -# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License -# for the specific language governing rights and limitations under the -# License. -# -# The Original Code is the Netscape Portable Runtime (NSPR). -# -# The Initial Developer of the Original Code is -# Netscape Communications Corporation. -# Portions created by the Initial Developer are Copyright (C) 1998-2000 -# the Initial Developer. All Rights Reserved. -# -# Contributor(s): -# -# Alternatively, the contents of this file may be used under the terms of -# either the GNU General Public License Version 2 or later (the "GPL"), or -# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), -# in which case the provisions of the GPL or the LGPL are applicable instead -# of those above. If you wish to allow use of your version of this file only -# under the terms of either the GPL or the LGPL, and not to allow others to -# use your version of this file under the terms of the MPL, indicate your -# decision by deleting the provisions above and replace them with the notice -# and other provisions required by the GPL or the LGPL. If you do not delete -# the provisions above, a recipient may use your version of this file under -# the terms of any one of the MPL, the GPL or the LGPL. -# -# ***** END LICENSE BLOCK ***** +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. # #ident "$Id$" # diff --git a/pkg/solaris/common_files/copyright b/pkg/solaris/common_files/copyright index 988939bb..c5534908 100644 --- a/pkg/solaris/common_files/copyright +++ b/pkg/solaris/common_files/copyright @@ -1,38 +1,6 @@ Copyright 2005 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms. -***** BEGIN LICENSE BLOCK ***** -Version: MPL 1.1/GPL 2.0/LGPL 2.1 - -The contents of this package are subject to the Mozilla Public License Version -1.1 (the "License"); you may not use this package except in compliance with -the License. You may obtain a copy of the License at -http://www.mozilla.org/MPL/ - -Software distributed under the License is distributed on an "AS IS" basis, -WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License -for the specific language governing rights and limitations under the -License. - -The Original Code is the Netscape Portable Runtime (NSPR). - -The Initial Developer of the Original Code is -Netscape Communications Corporation. -Portions created by the Initial Developer are Copyright (C) 1998-2000 -the Initial Developer. All Rights Reserved. - -Contributor(s): - -Alternatively, the contents of this file may be used under the terms of -either the GNU General Public License Version 2 or later (the "GPL"), or -the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), -in which case the provisions of the GPL or the LGPL are applicable instead -of those above. If you wish to allow use of your version of this file only -under the terms of either the GPL or the LGPL, and not to allow others to -use your version of this file under the terms of the MPL, indicate your -decision by deleting the provisions above and replace them with the notice -and other provisions required by the GPL or the LGPL. If you do not delete -the provisions above, a recipient may use your version of this file under -the terms of any one of the MPL, the GPL or the LGPL. - -***** END LICENSE BLOCK ***** +This Source Code Form is subject to the terms of the Mozilla Public +License, v. 2.0. If a copy of the MPL was not distributed with this +file, You can obtain one at http://mozilla.org/MPL/2.0/. diff --git a/pkg/solaris/proto64.mk b/pkg/solaris/proto64.mk index 3309a535..69bb1fc8 100644 --- a/pkg/solaris/proto64.mk +++ b/pkg/solaris/proto64.mk @@ -2,41 +2,9 @@ # Copyright 2005 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -# ***** BEGIN LICENSE BLOCK ***** -# Version: MPL 1.1/GPL 2.0/LGPL 2.1 -# -# The contents of this file are subject to the Mozilla Public License Version -# 1.1 (the "License"); you may not use this file except in compliance with -# the License. You may obtain a copy of the License at -# http://www.mozilla.org/MPL/ -# -# Software distributed under the License is distributed on an "AS IS" basis, -# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License -# for the specific language governing rights and limitations under the -# License. -# -# The Original Code is the Netscape Portable Runtime (NSPR). -# -# The Initial Developer of the Original Code is -# Netscape Communications Corporation. -# Portions created by the Initial Developer are Copyright (C) 1998-2000 -# the Initial Developer. All Rights Reserved. -# -# Contributor(s): -# -# Alternatively, the contents of this file may be used under the terms of -# either the GNU General Public License Version 2 or later (the "GPL"), or -# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), -# in which case the provisions of the GPL or the LGPL are applicable instead -# of those above. If you wish to allow use of your version of this file only -# under the terms of either the GPL or the LGPL, and not to allow others to -# use your version of this file under the terms of the MPL, indicate your -# decision by deleting the provisions above and replace them with the notice -# and other provisions required by the GPL or the LGPL. If you do not delete -# the provisions above, a recipient may use your version of this file under -# the terms of any one of the MPL, the GPL or the LGPL. -# -# ***** END LICENSE BLOCK ***** +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. # #ident "$Id$" # diff --git a/pr/Makefile.in b/pr/Makefile.in index e060f195..f7af4023 100644 --- a/pr/Makefile.in +++ b/pr/Makefile.in @@ -1,39 +1,7 @@ # -# ***** BEGIN LICENSE BLOCK ***** -# Version: MPL 1.1/GPL 2.0/LGPL 2.1 -# -# The contents of this file are subject to the Mozilla Public License Version -# 1.1 (the "License"); you may not use this file except in compliance with -# the License. You may obtain a copy of the License at -# http://www.mozilla.org/MPL/ -# -# Software distributed under the License is distributed on an "AS IS" basis, -# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License -# for the specific language governing rights and limitations under the -# License. -# -# The Original Code is the Netscape Portable Runtime (NSPR). -# -# The Initial Developer of the Original Code is -# Netscape Communications Corporation. -# Portions created by the Initial Developer are Copyright (C) 1998-2000 -# the Initial Developer. All Rights Reserved. -# -# Contributor(s): -# -# Alternatively, the contents of this file may be used under the terms of -# either the GNU General Public License Version 2 or later (the "GPL"), or -# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), -# in which case the provisions of the GPL or the LGPL are applicable instead -# of those above. If you wish to allow use of your version of this file only -# under the terms of either the GPL or the LGPL, and not to allow others to -# use your version of this file under the terms of the MPL, indicate your -# decision by deleting the provisions above and replace them with the notice -# and other provisions required by the GPL or the LGPL. If you do not delete -# the provisions above, a recipient may use your version of this file under -# the terms of any one of the MPL, the GPL or the LGPL. -# -# ***** END LICENSE BLOCK ***** +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. #! gmake diff --git a/pr/include/Makefile.in b/pr/include/Makefile.in index 5dc9686d..9cc425a8 100644 --- a/pr/include/Makefile.in +++ b/pr/include/Makefile.in @@ -1,39 +1,7 @@ # -# ***** BEGIN LICENSE BLOCK ***** -# Version: MPL 1.1/GPL 2.0/LGPL 2.1 -# -# The contents of this file are subject to the Mozilla Public License Version -# 1.1 (the "License"); you may not use this file except in compliance with -# the License. You may obtain a copy of the License at -# http://www.mozilla.org/MPL/ -# -# Software distributed under the License is distributed on an "AS IS" basis, -# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License -# for the specific language governing rights and limitations under the -# License. -# -# The Original Code is the Netscape Portable Runtime (NSPR). -# -# The Initial Developer of the Original Code is -# Netscape Communications Corporation. -# Portions created by the Initial Developer are Copyright (C) 1998-2000 -# the Initial Developer. All Rights Reserved. -# -# Contributor(s): -# -# Alternatively, the contents of this file may be used under the terms of -# either the GNU General Public License Version 2 or later (the "GPL"), or -# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), -# in which case the provisions of the GPL or the LGPL are applicable instead -# of those above. If you wish to allow use of your version of this file only -# under the terms of either the GPL or the LGPL, and not to allow others to -# use your version of this file under the terms of the MPL, indicate your -# decision by deleting the provisions above and replace them with the notice -# and other provisions required by the GPL or the LGPL. If you do not delete -# the provisions above, a recipient may use your version of this file under -# the terms of any one of the MPL, the GPL or the LGPL. -# -# ***** END LICENSE BLOCK ***** +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. #! gmake diff --git a/pr/include/gencfg.c b/pr/include/gencfg.c index e67c1309..ca4ee854 100644 --- a/pr/include/gencfg.c +++ b/pr/include/gencfg.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include <stdio.h> diff --git a/pr/include/md/Makefile.in b/pr/include/md/Makefile.in index af369bed..383c092c 100644 --- a/pr/include/md/Makefile.in +++ b/pr/include/md/Makefile.in @@ -1,39 +1,7 @@ # -# ***** BEGIN LICENSE BLOCK ***** -# Version: MPL 1.1/GPL 2.0/LGPL 2.1 -# -# The contents of this file are subject to the Mozilla Public License Version -# 1.1 (the "License"); you may not use this file except in compliance with -# the License. You may obtain a copy of the License at -# http://www.mozilla.org/MPL/ -# -# Software distributed under the License is distributed on an "AS IS" basis, -# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License -# for the specific language governing rights and limitations under the -# License. -# -# The Original Code is the Netscape Portable Runtime (NSPR). -# -# The Initial Developer of the Original Code is -# Netscape Communications Corporation. -# Portions created by the Initial Developer are Copyright (C) 1998-2000 -# the Initial Developer. All Rights Reserved. -# -# Contributor(s): -# -# Alternatively, the contents of this file may be used under the terms of -# either the GNU General Public License Version 2 or later (the "GPL"), or -# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), -# in which case the provisions of the GPL or the LGPL are applicable instead -# of those above. If you wish to allow use of your version of this file only -# under the terms of either the GPL or the LGPL, and not to allow others to -# use your version of this file under the terms of the MPL, indicate your -# decision by deleting the provisions above and replace them with the notice -# and other provisions required by the GPL or the LGPL. If you do not delete -# the provisions above, a recipient may use your version of this file under -# the terms of any one of the MPL, the GPL or the LGPL. -# -# ***** END LICENSE BLOCK ***** +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. #! gmake diff --git a/pr/include/md/_aix.h b/pr/include/md/_aix.h index 4d313a76..f65c00de 100644 --- a/pr/include/md/_aix.h +++ b/pr/include/md/_aix.h @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #ifndef nspr_aix_defs_h___ #define nspr_aix_defs_h___ diff --git a/pr/include/md/_aix32.cfg b/pr/include/md/_aix32.cfg index 6b75e4f6..23a3f512 100644 --- a/pr/include/md/_aix32.cfg +++ b/pr/include/md/_aix32.cfg @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #ifndef nspr_cpucfg___ #define nspr_cpucfg___ diff --git a/pr/include/md/_aix64.cfg b/pr/include/md/_aix64.cfg index 8b500ab0..7efe896d 100644 --- a/pr/include/md/_aix64.cfg +++ b/pr/include/md/_aix64.cfg @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #ifndef nspr_cpucfg___ #define nspr_cpucfg___ diff --git a/pr/include/md/_beos.cfg b/pr/include/md/_beos.cfg index 557252f3..5a3c5699 100644 --- a/pr/include/md/_beos.cfg +++ b/pr/include/md/_beos.cfg @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #ifndef nspr_cpucfg___ #define nspr_cpucfg___ diff --git a/pr/include/md/_beos.h b/pr/include/md/_beos.h index 5eb220db..78469dde 100644 --- a/pr/include/md/_beos.h +++ b/pr/include/md/_beos.h @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #ifndef nspr_beos_defs_h___ #define nspr_beos_defs_h___ diff --git a/pr/include/md/_bsdi.cfg b/pr/include/md/_bsdi.cfg index eb933c14..130cf820 100644 --- a/pr/include/md/_bsdi.cfg +++ b/pr/include/md/_bsdi.cfg @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #ifndef nspr_cpucfg___ #define nspr_cpucfg___ diff --git a/pr/include/md/_bsdi.h b/pr/include/md/_bsdi.h index b59c9b0f..0e7b978b 100644 --- a/pr/include/md/_bsdi.h +++ b/pr/include/md/_bsdi.h @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #ifndef nspr_bsdi_defs_h___ #define nspr_bsdi_defs_h___ diff --git a/pr/include/md/_darwin.cfg b/pr/include/md/_darwin.cfg index 60bea8e5..e43728ee 100644 --- a/pr/include/md/_darwin.cfg +++ b/pr/include/md/_darwin.cfg @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #ifndef nspr_cpucfg___ #define nspr_cpucfg___ diff --git a/pr/include/md/_darwin.h b/pr/include/md/_darwin.h index fc377984..f398ddff 100644 --- a/pr/include/md/_darwin.h +++ b/pr/include/md/_darwin.h @@ -1,49 +1,19 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #ifndef nspr_darwin_defs_h___ #define nspr_darwin_defs_h___ #include "prthread.h" +#include <libkern/OSAtomic.h> #include <sys/syscall.h> -#ifdef XP_MACOSX +#ifdef __APPLE__ #include <AvailabilityMacros.h> +#include <TargetConditionals.h> #endif #define PR_LINKER_ARCH "darwin" @@ -54,6 +24,10 @@ #define _PR_SI_ARCHITECTURE "x86-64" #elif defined(__ppc__) #define _PR_SI_ARCHITECTURE "ppc" +#elif defined(__arm__) +#define _PR_SI_ARCHITECTURE "arm" +#else +#error "Unknown CPU architecture" #endif #define PR_DLL_SUFFIX ".dylib" @@ -64,7 +38,7 @@ #undef HAVE_STACK_GROWING_UP #define HAVE_DLL -#ifdef __x86_64__ +#if defined(__x86_64__) || TARGET_OS_IPHONE #define USE_DLFCN #else #define USE_MACH_DYLD @@ -88,7 +62,7 @@ * if you pass an IPv4-mapped IPv6 address to it. */ #define _PR_GHBA_DISALLOW_V4MAPPED -#ifdef XP_MACOSX +#ifdef __APPLE__ #if !defined(MAC_OS_X_VERSION_10_3) || \ MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_3 /* @@ -102,7 +76,7 @@ /* Mac OS X 10.2 has inet_ntop and inet_pton. */ #define _PR_HAVE_INET_NTOP #endif /* DT >= 10.2 */ -#endif /* XP_MACOSX */ +#endif /* __APPLE__ */ #define _PR_IPV6_V6ONLY_PROBE /* The IPV6_V6ONLY socket option is not defined on Mac OS X 10.1. */ #ifndef IPV6_V6ONLY @@ -148,6 +122,22 @@ extern PRInt32 _PR_Darwin_x86_64_AtomicAdd(PRInt32 *ptr, PRInt32 val); #define _MD_ATOMIC_ADD(ptr, val) _PR_Darwin_x86_64_AtomicAdd(ptr, val) #endif /* __x86_64__ */ +#ifdef __arm__ +#define _PR_HAVE_ATOMIC_OPS +#define _MD_INIT_ATOMIC() +#define _MD_ATOMIC_INCREMENT(val) OSAtomicIncrement32(val) +#define _MD_ATOMIC_DECREMENT(val) OSAtomicDecrement32(val) +static inline PRInt32 _MD_ATOMIC_SET(PRInt32 *val, PRInt32 newval) +{ + PRInt32 oldval; + do { + oldval = *val; + } while (!OSAtomicCompareAndSwap32(oldval, newval, val)); + return oldval; +} +#define _MD_ATOMIC_ADD(ptr, val) OSAtomicAdd32(val, ptr) +#endif /* __arm__ */ + #define USE_SETJMP #if !defined(_PR_PTHREADS) diff --git a/pr/include/md/_dgux.cfg b/pr/include/md/_dgux.cfg index 4db8ec49..8c9e3de0 100644 --- a/pr/include/md/_dgux.cfg +++ b/pr/include/md/_dgux.cfg @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #ifndef nspr_cpucfg___ #define nspr_cpucfg___ diff --git a/pr/include/md/_dgux.h b/pr/include/md/_dgux.h index f3f02e82..c7be8190 100644 --- a/pr/include/md/_dgux.h +++ b/pr/include/md/_dgux.h @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #ifndef nspr_dgux_defs_h___ #define nspr_dgux_defs_h___ diff --git a/pr/include/md/_freebsd.cfg b/pr/include/md/_freebsd.cfg index 76d35420..c120460f 100644 --- a/pr/include/md/_freebsd.cfg +++ b/pr/include/md/_freebsd.cfg @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #ifndef nspr_cpucfg___ #define nspr_cpucfg___ diff --git a/pr/include/md/_freebsd.h b/pr/include/md/_freebsd.h index b684ef79..553bda82 100644 --- a/pr/include/md/_freebsd.h +++ b/pr/include/md/_freebsd.h @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #ifndef nspr_freebsd_defs_h___ #define nspr_freebsd_defs_h___ @@ -76,7 +44,7 @@ #define USE_DLFCN #define _PR_HAVE_SOCKADDR_LEN #define _PR_STAT_HAS_ST_ATIMESPEC -#define _PR_NO_LARGE_FILES +#define _PR_HAVE_LARGE_OFF_T #if defined(_PR_PTHREADS) #if __FreeBSD_version >= 400008 diff --git a/pr/include/md/_hpux.h b/pr/include/md/_hpux.h index 2a6f177f..7d5c204d 100644 --- a/pr/include/md/_hpux.h +++ b/pr/include/md/_hpux.h @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #ifndef nspr_xhppa_defs_h___ #define nspr_xhppa_defs_h___ @@ -110,6 +78,30 @@ extern PRInt32 _PR_ia64_AtomicSet(PRInt32 *val, PRInt32 newval); #define _PR_HAVE_INET_NTOP #else #define _PR_INET6_PROBE + +/* for HP-UX 11.11 without IPv6 */ +#ifndef AF_INET6 +#define AF_INET6 22 +#define AI_CANONNAME 2 +#define AI_NUMERICHOST 4 +#define AI_NUMERICSERV 8 +#define AI_V4MAPPED 0x00000010 +#define AI_ADDRCONFIG 0x00000040 +#define AI_ALL 0x00000020 +#define AI_DEFAULT (AI_V4MAPPED|AI_ADDRCONFIG) +#define NI_NUMERICHOST 2 +struct addrinfo { + int ai_flags; /* AI_PASSIVE, AI_CANONNAME */ + int ai_family; /* PF_xxx */ + int ai_socktype; /* SOCK_xxx */ + int ai_protocol; /* IPPROTO_xxx for IPv4 and IPv6 */ + socklen_t ai_addrlen; /* length of ai_addr */ + char *ai_canonname; /* canonical name for host */ + struct sockaddr *ai_addr; /* binary address */ + struct addrinfo *ai_next; /* next structure in linked list */ +}; +#endif /* for HP-UX 11.11 without IPv6 */ + #define _PR_HAVE_MD_SOCKADDR_IN6 /* isomorphic to struct in6_addr on HP-UX B.11.23 */ struct _md_in6_addr { diff --git a/pr/include/md/_hpux32.cfg b/pr/include/md/_hpux32.cfg index d79b1a9f..08950cbf 100644 --- a/pr/include/md/_hpux32.cfg +++ b/pr/include/md/_hpux32.cfg @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #ifndef nspr_cpucfg___ #define nspr_cpucfg___ diff --git a/pr/include/md/_hpux64.cfg b/pr/include/md/_hpux64.cfg index f1f829d1..028a034f 100644 --- a/pr/include/md/_hpux64.cfg +++ b/pr/include/md/_hpux64.cfg @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #ifndef nspr_cpucfg___ #define nspr_cpucfg___ diff --git a/pr/include/md/_irix.h b/pr/include/md/_irix.h index c38bb4bc..04413b99 100644 --- a/pr/include/md/_irix.h +++ b/pr/include/md/_irix.h @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #ifndef nspr_irix_defs_h___ #define nspr_irix_defs_h___ diff --git a/pr/include/md/_irix32.cfg b/pr/include/md/_irix32.cfg index 88e0ceed..3a5005c2 100644 --- a/pr/include/md/_irix32.cfg +++ b/pr/include/md/_irix32.cfg @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #ifndef nspr_cpucfg___ #define nspr_cpucfg___ diff --git a/pr/include/md/_irix64.cfg b/pr/include/md/_irix64.cfg index ba51eca3..e6f29e3a 100644 --- a/pr/include/md/_irix64.cfg +++ b/pr/include/md/_irix64.cfg @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #ifndef nspr_cpucfg___ #define nspr_cpucfg___ diff --git a/pr/include/md/_linux.cfg b/pr/include/md/_linux.cfg index dea4cf34..3597d7ae 100644 --- a/pr/include/md/_linux.cfg +++ b/pr/include/md/_linux.cfg @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /* * This file is used by not only Linux but also other glibc systems @@ -53,6 +21,8 @@ #ifdef __FreeBSD_kernel__ #define PR_AF_INET6 28 /* same as AF_INET6 */ +#elif defined(__GNU__) +#define PR_AF_INET6 26 /* same as AF_INET6 */ #else #define PR_AF_INET6 10 /* same as AF_INET6 */ #endif @@ -797,6 +767,51 @@ #define PR_BYTES_PER_WORD_LOG2 2 #define PR_BYTES_PER_DWORD_LOG2 3 +#elif defined(__m32r__) + +#undef IS_LITTLE_ENDIAN +#define IS_BIG_ENDIAN 1 + +#define PR_BYTES_PER_BYTE 1 +#define PR_BYTES_PER_SHORT 2 +#define PR_BYTES_PER_INT 4 +#define PR_BYTES_PER_INT64 8 +#define PR_BYTES_PER_LONG 4 +#define PR_BYTES_PER_FLOAT 4 +#define PR_BYTES_PER_DOUBLE 8 +#define PR_BYTES_PER_WORD 4 +#define PR_BYTES_PER_DWORD 8 + +#define PR_BITS_PER_BYTE 8 +#define PR_BITS_PER_SHORT 16 +#define PR_BITS_PER_INT 32 +#define PR_BITS_PER_INT64 64 +#define PR_BITS_PER_LONG 32 +#define PR_BITS_PER_FLOAT 32 +#define PR_BITS_PER_DOUBLE 64 +#define PR_BITS_PER_WORD 32 + +#define PR_BITS_PER_BYTE_LOG2 3 +#define PR_BITS_PER_SHORT_LOG2 4 +#define PR_BITS_PER_INT_LOG2 5 +#define PR_BITS_PER_INT64_LOG2 6 +#define PR_BITS_PER_LONG_LOG2 5 +#define PR_BITS_PER_FLOAT_LOG2 5 +#define PR_BITS_PER_DOUBLE_LOG2 6 +#define PR_BITS_PER_WORD_LOG2 5 + +#define PR_ALIGN_OF_SHORT 2 +#define PR_ALIGN_OF_INT 4 +#define PR_ALIGN_OF_LONG 4 +#define PR_ALIGN_OF_INT64 4 +#define PR_ALIGN_OF_FLOAT 4 +#define PR_ALIGN_OF_DOUBLE 4 +#define PR_ALIGN_OF_POINTER 4 +#define PR_ALIGN_OF_WORD 4 + +#define PR_BYTES_PER_WORD_LOG2 2 +#define PR_BYTES_PER_DWORD_LOG2 3 + #else #error "Unknown CPU architecture" diff --git a/pr/include/md/_linux.h b/pr/include/md/_linux.h index a0ab07d3..f9e90163 100644 --- a/pr/include/md/_linux.h +++ b/pr/include/md/_linux.h @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /* * This file is used by not only Linux but also other glibc systems @@ -83,6 +51,8 @@ #define _PR_SI_ARCHITECTURE "sh" #elif defined(__avr32__) #define _PR_SI_ARCHITECTURE "avr32" +#elif defined(__m32r__) +#define _PR_SI_ARCHITECTURE "m32r" #else #error "Unknown CPU architecture" #endif @@ -100,6 +70,9 @@ */ #define HAVE_DLL #define USE_DLFCN +#if defined(ANDROID) +#define NO_DLOPEN_NULL +#endif #ifdef __FreeBSD_kernel__ #define _PR_HAVE_SOCKADDR_LEN @@ -213,7 +186,18 @@ extern PRInt32 _PR_ppc_AtomicSet(PRInt32 *val, PRInt32 newval); }) #endif -#if defined(__arm__) && defined(_PR_ARM_KUSER) +#if defined(__arm__) +#if defined(__GCC_HAVE_SYNC_COMPARE_AND_SWAP_4) +/* Use GCC built-in functions */ +#define _PR_HAVE_ATOMIC_OPS +#define _MD_INIT_ATOMIC() + +#define _MD_ATOMIC_INCREMENT(ptr) __sync_add_and_fetch(ptr, 1) +#define _MD_ATOMIC_DECREMENT(ptr) __sync_sub_and_fetch(ptr, 1) +#define _MD_ATOMIC_SET(ptr, nv) __sync_lock_test_and_set(ptr, nv) +#define _MD_ATOMIC_ADD(ptr, i) __sync_add_and_fetch(ptr, i) + +#elif defined(_PR_ARM_KUSER) #define _PR_HAVE_ATOMIC_OPS #define _MD_INIT_ATOMIC() @@ -256,29 +240,35 @@ static inline PRInt32 _MD_ATOMIC_SET(PRInt32 *ptr, PRInt32 nv) return ov; } #endif +#endif /* __arm__ */ #define USE_SETJMP -#if defined(__GLIBC__) && __GLIBC__ >= 2 +#if (defined(__GLIBC__) && __GLIBC__ >= 2) || defined(ANDROID) #define _PR_POLL_AVAILABLE #endif #undef _PR_USE_POLL #define _PR_STAT_HAS_ONLY_ST_ATIME #if defined(__alpha) || defined(__ia64__) #define _PR_HAVE_LARGE_OFF_T -#elif (__GLIBC__ > 2) || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) +#elif (__GLIBC__ > 2) || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) \ + || defined(ANDROID) #define _PR_HAVE_OFF64_T #else #define _PR_NO_LARGE_FILES #endif -#if (__GLIBC__ > 2) || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) +#if (__GLIBC__ > 2) || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) \ + || defined(ANDROID) #define _PR_INET6 #define _PR_HAVE_INET_NTOP #define _PR_HAVE_GETHOSTBYNAME2 #define _PR_HAVE_GETADDRINFO #define _PR_INET6_PROBE #endif +#ifndef ANDROID #define _PR_HAVE_SYSV_SEMAPHORES #define PR_HAVE_SYSV_NAMED_SHARED_MEMORY +#endif +/* Android has gethostbyname_r but not gethostbyaddr_r or gethostbyname2_r. */ #if (__GLIBC__ >= 2) && defined(_PR_PTHREADS) #define _PR_HAVE_GETHOST_R #define _PR_HAVE_GETHOST_R_INT @@ -452,6 +442,18 @@ extern void _MD_CleanupBeforeExit(void); #error "SH/Linux pre-glibc2 not supported yet" #endif /* defined(__GLIBC__) && __GLIBC__ >= 2 */ +#elif defined(__m32r__) +/* Linux/M32R */ +#if defined(__GLIBC__) && __GLIBC__ >= 2 +#define _MD_GET_SP(_t) (_t)->md.context[0].__jmpbuf[0].__regs[JB_SP] +#define _MD_SET_FP(_t, val) ((_t)->md.context[0].__jmpbuf[0].__regs[JB_FP] = (val)) +#define _MD_GET_SP_PTR(_t) &(_MD_GET_SP(_t)) +#define _MD_GET_FP_PTR(_t) (&(_t)->md.context[0].__jmpbuf[0].__regs[JB_FP]) +#define _MD_SP_TYPE __ptr_t +#else +#error "Linux/M32R pre-glibc2 not supported yet" +#endif /* defined(__GLIBC__) && __GLIBC__ >= 2 */ + #else #error "Unknown CPU architecture" diff --git a/pr/include/md/_ncr.cfg b/pr/include/md/_ncr.cfg index c8a32bfb..20870456 100644 --- a/pr/include/md/_ncr.cfg +++ b/pr/include/md/_ncr.cfg @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #ifndef nspr_cpucfg___ #define nspr_cpucfg___ diff --git a/pr/include/md/_ncr.h b/pr/include/md/_ncr.h index d094c2ee..f8eaf28b 100644 --- a/pr/include/md/_ncr.h +++ b/pr/include/md/_ncr.h @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #ifndef nspr_unixware_defs_h___ #define nspr_unixware_defs_h___ diff --git a/pr/include/md/_nec.cfg b/pr/include/md/_nec.cfg index 558a5251..b4cc70f4 100644 --- a/pr/include/md/_nec.cfg +++ b/pr/include/md/_nec.cfg @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #ifndef nspr_cpucfg___ #define nspr_cpucfg___ diff --git a/pr/include/md/_nec.h b/pr/include/md/_nec.h index ed7e8a36..5297de45 100644 --- a/pr/include/md/_nec.h +++ b/pr/include/md/_nec.h @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #ifndef nspr_nec_defs_h___ #define nspr_nec_defs_h___ diff --git a/pr/include/md/_netbsd.cfg b/pr/include/md/_netbsd.cfg index 4a638382..1326556e 100644 --- a/pr/include/md/_netbsd.cfg +++ b/pr/include/md/_netbsd.cfg @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #ifndef nspr_cpucfg___ #define nspr_cpucfg___ diff --git a/pr/include/md/_netbsd.h b/pr/include/md/_netbsd.h index bf57a4f5..c24acb21 100644 --- a/pr/include/md/_netbsd.h +++ b/pr/include/md/_netbsd.h @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #ifndef nspr_netbsd_defs_h___ #define nspr_netbsd_defs_h___ diff --git a/pr/include/md/_nextstep.cfg b/pr/include/md/_nextstep.cfg index ce623cb9..9648168a 100644 --- a/pr/include/md/_nextstep.cfg +++ b/pr/include/md/_nextstep.cfg @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #ifndef nspr_cpucfg___ #define nspr_cpucfg___ diff --git a/pr/include/md/_nextstep.h b/pr/include/md/_nextstep.h index e7e4c055..329ff279 100644 --- a/pr/include/md/_nextstep.h +++ b/pr/include/md/_nextstep.h @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #ifndef nspr_nextstep_defs_h___ #define nspr_nextstep_defs_h___ diff --git a/pr/include/md/_nspr_pthread.h b/pr/include/md/_nspr_pthread.h index b7a0481e..7af442cc 100644 --- a/pr/include/md/_nspr_pthread.h +++ b/pr/include/md/_nspr_pthread.h @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #ifndef nspr_pthread_defs_h___ #define nspr_pthread_defs_h___ diff --git a/pr/include/md/_nto.cfg b/pr/include/md/_nto.cfg index b664b7f9..b76a5605 100644 --- a/pr/include/md/_nto.cfg +++ b/pr/include/md/_nto.cfg @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1999-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #ifndef nspr_cpucfg___ #define nspr_cpucfg___ diff --git a/pr/include/md/_nto.h b/pr/include/md/_nto.h index 97f4d38f..a319ccfa 100644 --- a/pr/include/md/_nto.h +++ b/pr/include/md/_nto.h @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1999-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #ifndef nspr_nto_defs_h___ #define nspr_nto_defs_h___ diff --git a/pr/include/md/_openbsd.cfg b/pr/include/md/_openbsd.cfg index dbd7b545..b68d6e9c 100644 --- a/pr/include/md/_openbsd.cfg +++ b/pr/include/md/_openbsd.cfg @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #ifndef nspr_cpucfg___ #define nspr_cpucfg___ diff --git a/pr/include/md/_openbsd.h b/pr/include/md/_openbsd.h index 8719fe78..68733047 100644 --- a/pr/include/md/_openbsd.h +++ b/pr/include/md/_openbsd.h @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #ifndef nspr_openbsd_defs_h___ #define nspr_openbsd_defs_h___ @@ -69,7 +37,7 @@ #define HAVE_DLL #define USE_DLFCN #define _PR_HAVE_SOCKADDR_LEN -#define _PR_NO_LARGE_FILES +#define _PR_HAVE_LARGE_OFF_T #define _PR_STAT_HAS_ST_ATIMESPEC #define _PR_POLL_AVAILABLE #define _PR_USE_POLL diff --git a/pr/include/md/_os2.cfg b/pr/include/md/_os2.cfg index 950f8ed4..67c2dedf 100644 --- a/pr/include/md/_os2.cfg +++ b/pr/include/md/_os2.cfg @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #ifndef nspr_cpucfg___ #define nspr_cpucfg___ diff --git a/pr/include/md/_os2.h b/pr/include/md/_os2.h index befb51d8..330b2912 100644 --- a/pr/include/md/_os2.h +++ b/pr/include/md/_os2.h @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #ifndef nspr_os2_defs_h___ #define nspr_os2_defs_h___ diff --git a/pr/include/md/_os2_errors.h b/pr/include/md/_os2_errors.h index e3a25009..fa96554f 100644 --- a/pr/include/md/_os2_errors.h +++ b/pr/include/md/_os2_errors.h @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #ifndef nspr_os2_errors_h___ #define nspr_os2_errors_h___ diff --git a/pr/include/md/_osf1.cfg b/pr/include/md/_osf1.cfg index dcd8d308..7999402c 100644 --- a/pr/include/md/_osf1.cfg +++ b/pr/include/md/_osf1.cfg @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #ifndef nspr_cpucfg___ #define nspr_cpucfg___ diff --git a/pr/include/md/_osf1.h b/pr/include/md/_osf1.h index 9767b873..6e853880 100644 --- a/pr/include/md/_osf1.h +++ b/pr/include/md/_osf1.h @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #ifndef nspr_osf1_defs_h___ #define nspr_osf1_defs_h___ diff --git a/pr/include/md/_pcos.h b/pr/include/md/_pcos.h index 59e8e2c8..3b4f2054 100644 --- a/pr/include/md/_pcos.h +++ b/pr/include/md/_pcos.h @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #ifndef prpcos_h___ #define prpcos_h___ diff --git a/pr/include/md/_pth.h b/pr/include/md/_pth.h index c4cb30ab..9e9ddcae 100644 --- a/pr/include/md/_pth.h +++ b/pr/include/md/_pth.h @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #ifndef nspr_pth_defs_h_ #define nspr_pth_defs_h_ @@ -98,8 +66,14 @@ #else #define _PT_PTHREAD_MUTEX_IS_LOCKED(m) (EBUSY == pthread_mutex_trylock(&(m))) #endif +#if defined(ANDROID) +/* Conditional attribute init and destroy aren't implemented in bionic. */ +#define _PT_PTHREAD_CONDATTR_INIT(x) 0 +#define _PT_PTHREAD_CONDATTR_DESTROY(x) /* */ +#else #define _PT_PTHREAD_CONDATTR_INIT pthread_condattr_init #define _PT_PTHREAD_CONDATTR_DESTROY pthread_condattr_destroy +#endif #define _PT_PTHREAD_COND_INIT(m, a) pthread_cond_init(&(m), &(a)) #endif @@ -144,10 +118,6 @@ || defined(NETBSD) || defined(OPENBSD) || defined(BSDI) \ || defined(NTO) || defined(DARWIN) \ || defined(UNIXWARE) || defined(RISCOS) || defined(SYMBIAN) -#ifdef __GNU__ -/* Hurd pthreads don't have an invalid value for pthread_t. -- rmh */ -#error Using Hurd pthreads -#endif #define _PT_PTHREAD_INVALIDATE_THR_HANDLE(t) (t) = 0 #define _PT_PTHREAD_THR_HANDLE_IS_INVALID(t) (t) == 0 #define _PT_PTHREAD_COPY_THR_HANDLE(st, dt) (dt) = (st) @@ -160,6 +130,8 @@ #define _PT_PTHREAD_ATTR_DESTROY pthread_attr_delete #define _PT_PTHREAD_CREATE(t, a, f, r) pthread_create(t, a, f, r) #define _PT_PTHREAD_KEY_CREATE pthread_keycreate +#define _PT_PTHREAD_KEY_DELETE pthread_keydelete +/* Set _PT_PTHREAD_KEY_DELETE to empty if pthread_keydelete isn't available */ #define _PT_PTHREAD_ATTR_SETSCHEDPOLICY pthread_attr_setsched #define _PT_PTHREAD_ATTR_GETSTACKSIZE(a, s) \ (*(s) = pthread_attr_getstacksize(*(a)), 0) @@ -170,6 +142,7 @@ #define _PT_PTHREAD_ATTR_DESTROY pthread_attr_destroy #define _PT_PTHREAD_CREATE(t, a, f, r) pthread_create(t, &a, f, r) #define _PT_PTHREAD_KEY_CREATE pthread_key_create +#define _PT_PTHREAD_KEY_DELETE pthread_key_delete #define _PT_PTHREAD_ATTR_SETSCHEDPOLICY pthread_attr_setschedpolicy #define _PT_PTHREAD_ATTR_GETSTACKSIZE(a, s) pthread_attr_getstacksize(a, s) #define _PT_PTHREAD_GETSPECIFIC(k, r) (r) = pthread_getspecific(k) diff --git a/pr/include/md/_qnx.cfg b/pr/include/md/_qnx.cfg index 7c5fc3e8..a459b8cb 100644 --- a/pr/include/md/_qnx.cfg +++ b/pr/include/md/_qnx.cfg @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #ifndef nspr_cpucfg___ #define nspr_cpucfg___ diff --git a/pr/include/md/_qnx.h b/pr/include/md/_qnx.h index f7593c6a..a206d237 100644 --- a/pr/include/md/_qnx.h +++ b/pr/include/md/_qnx.h @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #ifndef nspr_qnx_defs_h___ #define nspr_qnx_defs_h___ diff --git a/pr/include/md/_reliantunix.cfg b/pr/include/md/_reliantunix.cfg index f2913d18..921d5ebd 100644 --- a/pr/include/md/_reliantunix.cfg +++ b/pr/include/md/_reliantunix.cfg @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #ifndef nspr_cpucfg___ #define nspr_cpucfg___ diff --git a/pr/include/md/_reliantunix.h b/pr/include/md/_reliantunix.h index a924e2f9..03ce6de9 100644 --- a/pr/include/md/_reliantunix.h +++ b/pr/include/md/_reliantunix.h @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /* * reliantunix.h diff --git a/pr/include/md/_riscos.cfg b/pr/include/md/_riscos.cfg index 53010bda..c7adf2e1 100644 --- a/pr/include/md/_riscos.cfg +++ b/pr/include/md/_riscos.cfg @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #ifndef nspr_cpucfg___ #define nspr_cpucfg___ diff --git a/pr/include/md/_riscos.h b/pr/include/md/_riscos.h index c95067cf..75f7b60b 100644 --- a/pr/include/md/_riscos.h +++ b/pr/include/md/_riscos.h @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): Peter Naulls <peter@chocky.org> - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #ifndef nspr_riscos_defs_h___ #define nspr_riscos_defs_h___ diff --git a/pr/include/md/_scoos.cfg b/pr/include/md/_scoos.cfg index d7c461ff..70cc6b71 100644 --- a/pr/include/md/_scoos.cfg +++ b/pr/include/md/_scoos.cfg @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #ifndef nspr_cpucfg___ #define nspr_cpucfg___ diff --git a/pr/include/md/_scoos.h b/pr/include/md/_scoos.h index 6efaa7ea..51b8e7f8 100644 --- a/pr/include/md/_scoos.h +++ b/pr/include/md/_scoos.h @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #ifndef nspr_scoos5_defs_h___ #define nspr_scoos5_defs_h___ diff --git a/pr/include/md/_solaris.cfg b/pr/include/md/_solaris.cfg index 81313e55..67456374 100644 --- a/pr/include/md/_solaris.cfg +++ b/pr/include/md/_solaris.cfg @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #ifndef nspr_cpucfg___ #define nspr_cpucfg___ diff --git a/pr/include/md/_solaris.h b/pr/include/md/_solaris.h index edc55206..da2143b2 100644 --- a/pr/include/md/_solaris.h +++ b/pr/include/md/_solaris.h @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #ifndef nspr_solaris_defs_h___ #define nspr_solaris_defs_h___ diff --git a/pr/include/md/_sony.cfg b/pr/include/md/_sony.cfg index 4b8fbff9..f3e68f79 100644 --- a/pr/include/md/_sony.cfg +++ b/pr/include/md/_sony.cfg @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #ifndef nspr_cpucfg___ #define nspr_cpucfg___ diff --git a/pr/include/md/_sony.h b/pr/include/md/_sony.h index 3d17e04d..329a4d79 100644 --- a/pr/include/md/_sony.h +++ b/pr/include/md/_sony.h @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #ifndef nspr_sony_defs_h___ #define nspr_sony_defs_h___ diff --git a/pr/include/md/_sunos4.cfg b/pr/include/md/_sunos4.cfg index 581d4834..d97ee03d 100644 --- a/pr/include/md/_sunos4.cfg +++ b/pr/include/md/_sunos4.cfg @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #ifndef nspr_cpucfg___ #define nspr_cpucfg___ diff --git a/pr/include/md/_sunos4.h b/pr/include/md/_sunos4.h index 0d62892e..3b254b22 100644 --- a/pr/include/md/_sunos4.h +++ b/pr/include/md/_sunos4.h @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #ifndef nspr_sunos_defs_h___ #define nspr_sunos_defs_h___ diff --git a/pr/include/md/_symbian.cfg b/pr/include/md/_symbian.cfg index 2db9af73..4d497973 100644 --- a/pr/include/md/_symbian.cfg +++ b/pr/include/md/_symbian.cfg @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #ifndef nspr_cpucfg___ #define nspr_cpucfg___ diff --git a/pr/include/md/_symbian.h b/pr/include/md/_symbian.h index 1fef1155..a0ccda04 100644 --- a/pr/include/md/_symbian.h +++ b/pr/include/md/_symbian.h @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #ifndef nspr_symbian_defs_h___ #define nspr_symbian_defs_h___ diff --git a/pr/include/md/_unix_errors.h b/pr/include/md/_unix_errors.h index a44cbb31..96d72db0 100644 --- a/pr/include/md/_unix_errors.h +++ b/pr/include/md/_unix_errors.h @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #ifndef prunixerrors_h___ #define prunixerrors_h___ diff --git a/pr/include/md/_unixos.h b/pr/include/md/_unixos.h index 2374ee80..0e813f92 100644 --- a/pr/include/md/_unixos.h +++ b/pr/include/md/_unixos.h @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #ifndef prunixos_h___ #define prunixos_h___ diff --git a/pr/include/md/_unixware.cfg b/pr/include/md/_unixware.cfg index 796e748d..0fa8dfc9 100644 --- a/pr/include/md/_unixware.cfg +++ b/pr/include/md/_unixware.cfg @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #ifndef nspr_cpucfg___ #define nspr_cpucfg___ diff --git a/pr/include/md/_unixware.h b/pr/include/md/_unixware.h index bdc084f2..11cf7f9f 100644 --- a/pr/include/md/_unixware.h +++ b/pr/include/md/_unixware.h @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #ifndef nspr_unixware_defs_h___ #define nspr_unixware_defs_h___ diff --git a/pr/include/md/_unixware7.cfg b/pr/include/md/_unixware7.cfg index 6444b00b..33ce83bd 100644 --- a/pr/include/md/_unixware7.cfg +++ b/pr/include/md/_unixware7.cfg @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #ifndef nspr_cpucfg___ #define nspr_cpucfg___ diff --git a/pr/include/md/_win32_errors.h b/pr/include/md/_win32_errors.h index d5d8b714..1c962372 100644 --- a/pr/include/md/_win32_errors.h +++ b/pr/include/md/_win32_errors.h @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #ifndef nspr_win32_errors_h___ #define nspr_win32_errors_h___ diff --git a/pr/include/md/_win95.cfg b/pr/include/md/_win95.cfg index 8a84f68f..77d18287 100644 --- a/pr/include/md/_win95.cfg +++ b/pr/include/md/_win95.cfg @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #ifndef nspr_cpucfg___ #define nspr_cpucfg___ diff --git a/pr/include/md/_win95.h b/pr/include/md/_win95.h index c0d3aa6d..a919e3a0 100644 --- a/pr/include/md/_win95.h +++ b/pr/include/md/_win95.h @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #ifndef nspr_win95_defs_h___ #define nspr_win95_defs_h___ @@ -394,6 +362,7 @@ extern PROsfd _MD_Accept(PRFileDesc *fd, PRNetAddr *raddr, PRUint32 *rlen, #define _MD_CREATE_THREAD _PR_MD_CREATE_THREAD #define _MD_YIELD _PR_MD_YIELD #define _MD_SET_PRIORITY _PR_MD_SET_PRIORITY +#define _MD_SET_CURRENT_THREAD_NAME _PR_MD_SET_CURRENT_THREAD_NAME #define _MD_CLEAN_THREAD _PR_MD_CLEAN_THREAD #define _MD_SETTHREADAFFINITYMASK _PR_MD_SETTHREADAFFINITYMASK #define _MD_GETTHREADAFFINITYMASK _PR_MD_GETTHREADAFFINITYMASK diff --git a/pr/include/md/_winnt.cfg b/pr/include/md/_winnt.cfg index 280b22ea..e2a277fd 100644 --- a/pr/include/md/_winnt.cfg +++ b/pr/include/md/_winnt.cfg @@ -1,40 +1,8 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #ifndef nspr_cpucfg___ #define nspr_cpucfg___ diff --git a/pr/include/md/_winnt.h b/pr/include/md/_winnt.h index 628fe959..4d4d2c12 100644 --- a/pr/include/md/_winnt.h +++ b/pr/include/md/_winnt.h @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #ifndef nspr_win32_defs_h___ #define nspr_win32_defs_h___ @@ -408,6 +376,7 @@ extern int _PR_NTFiberSafeSelect(int, fd_set *, fd_set *, fd_set *, #define _MD_END_THREAD _PR_MD_END_THREAD #define _MD_YIELD _PR_MD_YIELD #define _MD_SET_PRIORITY _PR_MD_SET_PRIORITY +#define _MD_SET_CURRENT_THREAD_NAME _PR_MD_SET_CURRENT_THREAD_NAME #define _MD_CLEAN_THREAD _PR_MD_CLEAN_THREAD #define _MD_SETTHREADAFFINITYMASK _PR_MD_SETTHREADAFFINITYMASK #define _MD_GETTHREADAFFINITYMASK _PR_MD_GETTHREADAFFINITYMASK diff --git a/pr/include/md/prosdep.h b/pr/include/md/prosdep.h index 7e20ab4a..389538c1 100644 --- a/pr/include/md/prosdep.h +++ b/pr/include/md/prosdep.h @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #ifndef prosdep_h___ #define prosdep_h___ diff --git a/pr/include/md/sunos4.h b/pr/include/md/sunos4.h index 0a8f36d4..cab5713c 100644 --- a/pr/include/md/sunos4.h +++ b/pr/include/md/sunos4.h @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #ifndef pr_sunos4_h___ #define pr_sunos4_h___ diff --git a/pr/include/nspr.h b/pr/include/nspr.h index cf3bfad7..0cbc71c1 100644 --- a/pr/include/nspr.h +++ b/pr/include/nspr.h @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #ifndef nspr_h___ #define nspr_h___ diff --git a/pr/include/obsolete/Makefile.in b/pr/include/obsolete/Makefile.in index 1add4844..27116a2c 100644 --- a/pr/include/obsolete/Makefile.in +++ b/pr/include/obsolete/Makefile.in @@ -1,39 +1,7 @@ # -# ***** BEGIN LICENSE BLOCK ***** -# Version: MPL 1.1/GPL 2.0/LGPL 2.1 -# -# The contents of this file are subject to the Mozilla Public License Version -# 1.1 (the "License"); you may not use this file except in compliance with -# the License. You may obtain a copy of the License at -# http://www.mozilla.org/MPL/ -# -# Software distributed under the License is distributed on an "AS IS" basis, -# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License -# for the specific language governing rights and limitations under the -# License. -# -# The Original Code is the Netscape Portable Runtime (NSPR). -# -# The Initial Developer of the Original Code is -# Netscape Communications Corporation. -# Portions created by the Initial Developer are Copyright (C) 1998-2000 -# the Initial Developer. All Rights Reserved. -# -# Contributor(s): -# -# Alternatively, the contents of this file may be used under the terms of -# either the GNU General Public License Version 2 or later (the "GPL"), or -# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), -# in which case the provisions of the GPL or the LGPL are applicable instead -# of those above. If you wish to allow use of your version of this file only -# under the terms of either the GPL or the LGPL, and not to allow others to -# use your version of this file under the terms of the MPL, indicate your -# decision by deleting the provisions above and replace them with the notice -# and other provisions required by the GPL or the LGPL. If you do not delete -# the provisions above, a recipient may use your version of this file under -# the terms of any one of the MPL, the GPL or the LGPL. -# -# ***** END LICENSE BLOCK ***** +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. #! gmake diff --git a/pr/include/obsolete/pralarm.h b/pr/include/obsolete/pralarm.h index 20476e44..959e74be 100644 --- a/pr/include/obsolete/pralarm.h +++ b/pr/include/obsolete/pralarm.h @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /* ** File: pralarm.h diff --git a/pr/include/obsolete/probslet.h b/pr/include/obsolete/probslet.h index bad59474..2eff0ba4 100644 --- a/pr/include/obsolete/probslet.h +++ b/pr/include/obsolete/probslet.h @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /* ** A collection of things thought to be obsolete diff --git a/pr/include/obsolete/protypes.h b/pr/include/obsolete/protypes.h index d8e947a5..2275bce0 100644 --- a/pr/include/obsolete/protypes.h +++ b/pr/include/obsolete/protypes.h @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /* * This header typedefs the old 'native' types to the new PR<type>s. diff --git a/pr/include/obsolete/prsem.h b/pr/include/obsolete/prsem.h index fd0863ab..ee313cb2 100644 --- a/pr/include/obsolete/prsem.h +++ b/pr/include/obsolete/prsem.h @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #ifndef prsem_h___ #define prsem_h___ diff --git a/pr/include/pratom.h b/pr/include/pratom.h index 1c18a9f1..bcf34c19 100644 --- a/pr/include/pratom.h +++ b/pr/include/pratom.h @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /* GLOBAL FUNCTIONS: ** DESCRIPTION: @@ -111,31 +79,37 @@ NSPR_API(PRInt32) PR_AtomicAdd(PRInt32 *ptr, PRInt32 val); ** interchangeably. */ #if defined(_WIN32) && !defined(_WIN32_WCE) && \ - defined(_MSC_VER) && (_MSC_VER >= 1310) + (!defined(_MSC_VER) || (_MSC_VER >= 1310)) long __cdecl _InterlockedIncrement(long volatile *Addend); -#pragma intrinsic(_InterlockedIncrement) - long __cdecl _InterlockedDecrement(long volatile *Addend); -#pragma intrinsic(_InterlockedDecrement) - long __cdecl _InterlockedExchange(long volatile *Target, long Value); -#pragma intrinsic(_InterlockedExchange) - long __cdecl _InterlockedExchangeAdd(long volatile *Addend, long Value); + +#ifdef _MSC_VER +#pragma intrinsic(_InterlockedIncrement) +#pragma intrinsic(_InterlockedDecrement) +#pragma intrinsic(_InterlockedExchange) #pragma intrinsic(_InterlockedExchangeAdd) +#endif -#define PR_ATOMIC_INCREMENT(val) _InterlockedIncrement(val) -#define PR_ATOMIC_DECREMENT(val) _InterlockedDecrement(val) -#define PR_ATOMIC_SET(val, newval) _InterlockedExchange(val, newval) -#define PR_ATOMIC_ADD(ptr, val) (_InterlockedExchangeAdd(ptr, val) + (val)) +#define PR_ATOMIC_INCREMENT(val) _InterlockedIncrement((long volatile *)(val)) +#define PR_ATOMIC_DECREMENT(val) _InterlockedDecrement((long volatile *)(val)) +#define PR_ATOMIC_SET(val, newval) \ + _InterlockedExchange((long volatile *)(val), (long)(newval)) +#define PR_ATOMIC_ADD(ptr, val) \ + (_InterlockedExchangeAdd((long volatile *)(ptr), (long)(val)) + (val)) #elif ((__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 1)) && \ - ((defined(DARWIN) && \ - (defined(__ppc__) || defined(__i386__))) || \ - (defined(LINUX) && \ - (defined(__i386__) || defined(__ia64__) || defined(__x86_64__) || \ + ((defined(__APPLE__) && \ + (defined(__ppc__) || defined(__i386__) || defined(__x86_64__))) || \ + (defined(__linux__) && \ + ((defined(__i386__) && \ + defined(__GCC_HAVE_SYNC_COMPARE_AND_SWAP_4)) || \ + defined(__ia64__) || defined(__x86_64__) || \ (defined(__powerpc__) && !defined(__powerpc64__)) || \ + (defined(__arm__) && \ + defined(__GCC_HAVE_SYNC_COMPARE_AND_SWAP_4)) || \ defined(__alpha)))) /* diff --git a/pr/include/prbit.h b/pr/include/prbit.h index 1f4fc843..f0a51d01 100644 --- a/pr/include/prbit.h +++ b/pr/include/prbit.h @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #ifndef prbit_h___ #define prbit_h___ @@ -41,6 +9,33 @@ #include "prtypes.h" PR_BEGIN_EXTERN_C +/* replace compare/jump/add/shift sequence with x86 BSF/BSR instruction */ +#if defined(_WIN32) && (_MSC_VER >= 1300) && (defined(_M_IX86) || defined(_M_AMD64)) + unsigned char _BitScanForward(unsigned long * Index, unsigned long Mask); + unsigned char _BitScanReverse(unsigned long * Index, unsigned long Mask); +# pragma intrinsic(_BitScanForward,_BitScanReverse) + __forceinline static int __prBitScanForward32(unsigned int val) + { + unsigned long idx; + _BitScanForward(&idx, (unsigned long)val); + return( (int)idx ); + } + __forceinline static int __prBitScanReverse32(unsigned int val) + { + unsigned long idx; + _BitScanReverse(&idx, (unsigned long)val); + return( (int)(31-idx) ); + } +# define pr_bitscan_ctz32(val) __prBitScanForward32(val) +# define pr_bitscan_clz32(val) __prBitScanReverse32(val) +# define PR_HAVE_BUILTIN_BITSCAN32 +#elif ((__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) && \ + (defined(__i386__) || defined(__x86_64__) || defined(__arm__)) +# define pr_bitscan_ctz32(val) __builtin_ctz(val) +# define pr_bitscan_clz32(val) __builtin_clz(val) +# define PR_HAVE_BUILTIN_BITSCAN32 +#endif /* MSVC || GCC */ + /* ** A prbitmap_t is a long integer that can be used for bitmaps */ @@ -67,6 +62,13 @@ NSPR_API(PRIntn) PR_FloorLog2(PRUint32 i); ** Macro version of PR_CeilingLog2: Compute the log of the least power of ** 2 greater than or equal to _n. The result is returned in _log2. */ +#ifdef PR_HAVE_BUILTIN_BITSCAN32 +#define PR_CEILING_LOG2(_log2,_n) \ + PR_BEGIN_MACRO \ + PRUint32 j_ = (PRUint32)(_n); \ + (_log2) = (j_ <= 1 ? 0 : 32 - pr_bitscan_clz32(j_ - 1)); \ + PR_END_MACRO +#else #define PR_CEILING_LOG2(_log2,_n) \ PR_BEGIN_MACRO \ PRUint32 j_ = (PRUint32)(_n); \ @@ -84,6 +86,7 @@ NSPR_API(PRIntn) PR_FloorLog2(PRUint32 i); if ((j_) >> 1) \ (_log2) += 1; \ PR_END_MACRO +#endif /* PR_HAVE_BUILTIN_BITSCAN32 */ /* ** Macro version of PR_FloorLog2: Compute the log of the greatest power of @@ -91,6 +94,13 @@ NSPR_API(PRIntn) PR_FloorLog2(PRUint32 i); ** ** This is equivalent to finding the highest set bit in the word. */ +#ifdef PR_HAVE_BUILTIN_BITSCAN32 +#define PR_FLOOR_LOG2(_log2,_n) \ + PR_BEGIN_MACRO \ + PRUint32 j_ = (PRUint32)(_n); \ + (_log2) = 31 - pr_bitscan_clz32((j_) | 1); \ + PR_END_MACRO +#else #define PR_FLOOR_LOG2(_log2,_n) \ PR_BEGIN_MACRO \ PRUint32 j_ = (PRUint32)(_n); \ @@ -106,6 +116,7 @@ NSPR_API(PRIntn) PR_FloorLog2(PRUint32 i); if ((j_) >> 1) \ (_log2) += 1; \ PR_END_MACRO +#endif /* PR_HAVE_BUILTIN_BITSCAN32 */ /* ** Macros for rotate left and right. The argument 'a' must be an unsigned diff --git a/pr/include/prclist.h b/pr/include/prclist.h index 1680ac17..23247228 100644 --- a/pr/include/prclist.h +++ b/pr/include/prclist.h @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #ifndef prclist_h___ #define prclist_h___ diff --git a/pr/include/prcmon.h b/pr/include/prcmon.h index f61cf56a..69171138 100644 --- a/pr/include/prcmon.h +++ b/pr/include/prcmon.h @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #ifndef prcmon_h___ #define prcmon_h___ diff --git a/pr/include/prcountr.h b/pr/include/prcountr.h index 4b197e97..53b6176b 100644 --- a/pr/include/prcountr.h +++ b/pr/include/prcountr.h @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #ifndef prcountr_h___ #define prcountr_h___ diff --git a/pr/include/prcvar.h b/pr/include/prcvar.h index c6684937..3e30ce1f 100644 --- a/pr/include/prcvar.h +++ b/pr/include/prcvar.h @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #ifndef prcvar_h___ #define prcvar_h___ diff --git a/pr/include/prdtoa.h b/pr/include/prdtoa.h index c71725ad..191b6c75 100644 --- a/pr/include/prdtoa.h +++ b/pr/include/prdtoa.h @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #ifndef prdtoa_h___ #define prdtoa_h___ diff --git a/pr/include/prenv.h b/pr/include/prenv.h index c73fffc7..524fc75e 100644 --- a/pr/include/prenv.h +++ b/pr/include/prenv.h @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #ifndef prenv_h___ #define prenv_h___ diff --git a/pr/include/prerr.h b/pr/include/prerr.h index eba68f1f..8512329e 100644 --- a/pr/include/prerr.h +++ b/pr/include/prerr.h @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #ifndef prerr_h___ #define prerr_h___ diff --git a/pr/include/prerror.h b/pr/include/prerror.h index cf94872e..3d6baf6e 100644 --- a/pr/include/prerror.h +++ b/pr/include/prerror.h @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #ifndef prerror_h___ #define prerror_h___ diff --git a/pr/include/prinet.h b/pr/include/prinet.h index 7c3f4bd5..15d229fe 100644 --- a/pr/include/prinet.h +++ b/pr/include/prinet.h @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /* * File: prinet.h @@ -106,6 +74,11 @@ struct sockaddr_dl; #include <machine/endian.h> #endif +/* On Android, ntohl() etc. are declared in <sys/endian.h>. */ +#ifdef __ANDROID__ +#include <sys/endian.h> +#endif + #elif defined(WIN32) /* diff --git a/pr/include/prinit.h b/pr/include/prinit.h index f9c7d64f..c894b286 100644 --- a/pr/include/prinit.h +++ b/pr/include/prinit.h @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #ifndef prinit_h___ #define prinit_h___ @@ -63,10 +31,10 @@ PR_BEGIN_EXTERN_C ** The format of the version string is ** "<major version>.<minor version>[.<patch level>] [<Beta>]" */ -#define PR_VERSION "4.8.4 Beta 2" +#define PR_VERSION "4.9.3 Beta" #define PR_VMAJOR 4 -#define PR_VMINOR 8 -#define PR_VPATCH 4 +#define PR_VMINOR 9 +#define PR_VPATCH 3 #define PR_BETA PR_TRUE /* @@ -97,6 +65,11 @@ typedef PRBool (*PRVersionCheck)(const char*); NSPR_API(PRBool) PR_VersionCheck(const char *importedVersion); +/* + * Returns a const string of the NSPR library version. + */ +NSPR_API(const char*) PR_GetVersion(void); + /************************************************************************/ /*******************************INITIALIZATION***************************/ diff --git a/pr/include/prinrval.h b/pr/include/prinrval.h index 67d2f429..14cd39b6 100644 --- a/pr/include/prinrval.h +++ b/pr/include/prinrval.h @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /* ** File: prinrval.h diff --git a/pr/include/prio.h b/pr/include/prio.h index 7ec3045e..ac4b270d 100644 --- a/pr/include/prio.h +++ b/pr/include/prio.h @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /* * File: prio.h @@ -142,6 +110,9 @@ typedef enum PRTransmitFileFlags { #define PR_AF_INET6 100 #endif +#define PR_AF_INET_SDP 101 +#define PR_AF_INET6_SDP 102 + #ifndef PR_AF_UNSPEC #define PR_AF_UNSPEC 0 #endif diff --git a/pr/include/pripcsem.h b/pr/include/pripcsem.h index 5a96be58..f5a524da 100644 --- a/pr/include/pripcsem.h +++ b/pr/include/pripcsem.h @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1999-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /* * File: pripcsem.h diff --git a/pr/include/private/Makefile.in b/pr/include/private/Makefile.in index 180393b1..db0c2f1e 100644 --- a/pr/include/private/Makefile.in +++ b/pr/include/private/Makefile.in @@ -1,39 +1,7 @@ # -# ***** BEGIN LICENSE BLOCK ***** -# Version: MPL 1.1/GPL 2.0/LGPL 2.1 -# -# The contents of this file are subject to the Mozilla Public License Version -# 1.1 (the "License"); you may not use this file except in compliance with -# the License. You may obtain a copy of the License at -# http://www.mozilla.org/MPL/ -# -# Software distributed under the License is distributed on an "AS IS" basis, -# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License -# for the specific language governing rights and limitations under the -# License. -# -# The Original Code is the Netscape Portable Runtime (NSPR). -# -# The Initial Developer of the Original Code is -# Netscape Communications Corporation. -# Portions created by the Initial Developer are Copyright (C) 1998-2000 -# the Initial Developer. All Rights Reserved. -# -# Contributor(s): -# -# Alternatively, the contents of this file may be used under the terms of -# either the GNU General Public License Version 2 or later (the "GPL"), or -# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), -# in which case the provisions of the GPL or the LGPL are applicable instead -# of those above. If you wish to allow use of your version of this file only -# under the terms of either the GPL or the LGPL, and not to allow others to -# use your version of this file under the terms of the MPL, indicate your -# decision by deleting the provisions above and replace them with the notice -# and other provisions required by the GPL or the LGPL. If you do not delete -# the provisions above, a recipient may use your version of this file under -# the terms of any one of the MPL, the GPL or the LGPL. -# -# ***** END LICENSE BLOCK ***** +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. #! gmake diff --git a/pr/include/private/pprio.h b/pr/include/private/pprio.h index 8f296574..26bcd0d0 100644 --- a/pr/include/private/pprio.h +++ b/pr/include/private/pprio.h @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /* ** File: pprio.h diff --git a/pr/include/private/pprmwait.h b/pr/include/private/pprmwait.h index d116a8b3..3e4057c5 100644 --- a/pr/include/private/pprmwait.h +++ b/pr/include/private/pprmwait.h @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #if defined(_PPRMWAIT_H) #else diff --git a/pr/include/private/pprthred.h b/pr/include/private/pprthred.h index fe8ae501..eb60baed 100644 --- a/pr/include/private/pprthred.h +++ b/pr/include/private/pprthred.h @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #ifndef pprthred_h___ #define pprthred_h___ diff --git a/pr/include/private/primpl.h b/pr/include/private/primpl.h index 6675e408..e9217f29 100644 --- a/pr/include/private/primpl.h +++ b/pr/include/private/primpl.h @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #ifndef primpl_h___ #define primpl_h___ @@ -192,12 +160,7 @@ struct _PT_Notified #define _PT_THREAD_UNBLOCK_INTERRUPT(thr) \ (thr->interrupt_blocked = 0) -#ifdef GC_LEAK_DETECTOR -/* All threads are GCable. */ -#define _PT_IS_GCABLE_THREAD(thr) 1 -#else #define _PT_IS_GCABLE_THREAD(thr) ((thr)->state & PT_THREAD_GCABLE) -#endif /* GC_LEAK_DETECTOR */ /* ** Possible values for thread's suspend field @@ -633,12 +596,7 @@ NSPR_API(void) _PR_Notify(PRMonitor *mon, PRBool all, PRBool sticky); #define _PR_ADJUST_STACKSIZE(stackSize) #endif -#ifdef GC_LEAK_DETECTOR -/* All threads are GCable. */ -#define _PR_IS_GCABLE_THREAD(thr) 1 -#else #define _PR_IS_GCABLE_THREAD(thr) ((thr)->flags & _PR_GCABLE_THREAD) -#endif /* GC_LEAK_DETECTOR */ #define _PR_PENDING_INTERRUPT(thr) \ (!((thr)->flags & _PR_INTERRUPT_BLOCKED) && ((thr)->flags & _PR_INTERRUPT)) @@ -1019,6 +977,9 @@ extern void _PR_MD_YIELD(void); extern void _PR_MD_SET_PRIORITY(_MDThread *md, PRThreadPriority newPri); #define _PR_MD_SET_PRIORITY _MD_SET_PRIORITY +extern void _PR_MD_SET_CURRENT_THREAD_NAME(const char *name); +#define _PR_MD_SET_CURRENT_THREAD_NAME _MD_SET_CURRENT_THREAD_NAME + NSPR_API(void) _PR_MD_SUSPENDALL(void); #define _PR_MD_SUSPENDALL _MD_SUSPENDALL @@ -1575,6 +1536,7 @@ struct PRThread { PRIntn errorStringLength; /* textLength from last call to PR_SetErrorText() */ PRInt32 errorStringSize; /* malloc()'d size of buffer | zero */ char *errorString; /* current error string | NULL */ + char *name; /* thread's name */ #if defined(_PR_PTHREADS) pthread_t id; /* pthread identifier for the thread */ @@ -1803,9 +1765,6 @@ extern void _PR_CleanupTPD(void); extern void _PR_Cleanup(void); extern void _PR_LogCleanup(void); extern void _PR_InitLayerCache(void); -#ifdef GC_LEAK_DETECTOR -extern void _PR_InitGarbageCollector(void); -#endif extern PRBool _pr_initialized; extern void _PR_ImplicitInitialization(void); diff --git a/pr/include/private/prpriv.h b/pr/include/private/prpriv.h index 12a2cd6b..f45eee47 100644 --- a/pr/include/private/prpriv.h +++ b/pr/include/private/prpriv.h @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #ifndef prpriv_h___ #define prpriv_h___ diff --git a/pr/include/prlink.h b/pr/include/prlink.h index 8cbcc4d9..ea45ef8e 100644 --- a/pr/include/prlink.h +++ b/pr/include/prlink.h @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #ifndef prlink_h___ #define prlink_h___ @@ -49,7 +17,7 @@ typedef struct PRLibrary PRLibrary; typedef struct PRStaticLinkTable { const char *name; - void (*fp)(); + void (*fp)(void); } PRStaticLinkTable; /* @@ -208,7 +176,7 @@ NSPR_API(void*) PR_FindSymbol(PRLibrary *lib, const char *name); ** ** This function does not modify the reference count of the library. */ -typedef void (*PRFuncPtr)(); +typedef void (*PRFuncPtr)(void); NSPR_API(PRFuncPtr) PR_FindFunctionSymbol(PRLibrary *lib, const char *name); /* diff --git a/pr/include/prlock.h b/pr/include/prlock.h index b270aac1..bc76a0e1 100644 --- a/pr/include/prlock.h +++ b/pr/include/prlock.h @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /* ** File: prlock.h diff --git a/pr/include/prlog.h b/pr/include/prlog.h index c5f6c622..6f825f29 100644 --- a/pr/include/prlog.h +++ b/pr/include/prlog.h @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #ifndef prlog_h___ #define prlog_h___ @@ -248,14 +216,6 @@ NSPR_API(void) PR_Assert(const char *s, const char *file, PRIntn ln); #endif /* defined(DEBUG) || defined(FORCE_PR_ASSERT) */ -/* -** Compile-time assert. "condition" must be a constant expression. -** The macro can be used only in places where an "extern" declaration is -** allowed. -*/ -#define PR_STATIC_ASSERT(condition) \ - extern void pr_static_assert(int arg[(condition) ? 1 : -1]) - PR_END_EXTERN_C #endif /* prlog_h___ */ diff --git a/pr/include/prlong.h b/pr/include/prlong.h index 9523d301..23bd3a9a 100644 --- a/pr/include/prlong.h +++ b/pr/include/prlong.h @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /* ** File: prlong.h diff --git a/pr/include/prmem.h b/pr/include/prmem.h index 1cf0949c..c7cb5fbf 100644 --- a/pr/include/prmem.h +++ b/pr/include/prmem.h @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /* ** File: prmem.h diff --git a/pr/include/prmon.h b/pr/include/prmon.h index 0fe18dcc..374e2982 100644 --- a/pr/include/prmon.h +++ b/pr/include/prmon.h @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #ifndef prmon_h___ #define prmon_h___ diff --git a/pr/include/prmwait.h b/pr/include/prmwait.h index e4cabda4..a902d90e 100644 --- a/pr/include/prmwait.h +++ b/pr/include/prmwait.h @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #if defined(_PRMWAIT_H) #else diff --git a/pr/include/prnetdb.h b/pr/include/prnetdb.h index f1b7ddcb..49b77b14 100644 --- a/pr/include/prnetdb.h +++ b/pr/include/prnetdb.h @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #ifndef prnetdb_h___ #define prnetdb_h___ diff --git a/pr/include/prolock.h b/pr/include/prolock.h index d8aece98..4fe61f8f 100644 --- a/pr/include/prolock.h +++ b/pr/include/prolock.h @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #ifndef prolock_h___ #define prolock_h___ diff --git a/pr/include/prpdce.h b/pr/include/prpdce.h index ebd595ac..b681795f 100644 --- a/pr/include/prpdce.h +++ b/pr/include/prpdce.h @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /* * File: prpdce.h diff --git a/pr/include/prprf.h b/pr/include/prprf.h index 7336d97f..440be888 100644 --- a/pr/include/prprf.h +++ b/pr/include/prprf.h @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #ifndef prprf_h___ #define prprf_h___ diff --git a/pr/include/prproces.h b/pr/include/prproces.h index 0c1e8a65..97825422 100644 --- a/pr/include/prproces.h +++ b/pr/include/prproces.h @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #ifndef prproces_h___ #define prproces_h___ diff --git a/pr/include/prrng.h b/pr/include/prrng.h index e94b806b..3b5a4433 100644 --- a/pr/include/prrng.h +++ b/pr/include/prrng.h @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1999-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /* diff --git a/pr/include/prrwlock.h b/pr/include/prrwlock.h index 945e5f88..65d052dd 100644 --- a/pr/include/prrwlock.h +++ b/pr/include/prrwlock.h @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /* ** File: prrwlock.h diff --git a/pr/include/prshm.h b/pr/include/prshm.h index 098566ec..f821a58e 100644 --- a/pr/include/prshm.h +++ b/pr/include/prshm.h @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1999-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /* ** prshm.h -- NSPR Shared Memory diff --git a/pr/include/prshma.h b/pr/include/prshma.h index e72ee85f..2abc4aeb 100644 --- a/pr/include/prshma.h +++ b/pr/include/prshma.h @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1999-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /* ** prshma.h -- NSPR Anonymous Shared Memory diff --git a/pr/include/prsystem.h b/pr/include/prsystem.h index 13cf8bab..b3e14e7f 100644 --- a/pr/include/prsystem.h +++ b/pr/include/prsystem.h @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #ifndef prsystem_h___ #define prsystem_h___ diff --git a/pr/include/prthread.h b/pr/include/prthread.h index bb93cbf5..708c889c 100644 --- a/pr/include/prthread.h +++ b/pr/include/prthread.h @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #ifndef prthread_h___ #define prthread_h___ @@ -177,6 +145,17 @@ NSPR_API(PRThreadPriority) PR_GetThreadPriority(const PRThread *thread); NSPR_API(void) PR_SetThreadPriority(PRThread *thread, PRThreadPriority priority); /* +** Set the name of the current thread, which will be visible in a debugger +** and accessible via a call to PR_GetThreadName(). +*/ +NSPR_API(PRStatus) PR_SetCurrentThreadName(const char *name); + +/* +** Return the name of "thread", if set. Otherwise return NULL. +*/ +NSPR_API(const char *) PR_GetThreadName(const PRThread *thread); + +/* ** This routine returns a new index for per-thread-private data table. ** The index is visible to all threads within a process. This index can ** be used with the PR_SetThreadPrivate() and PR_GetThreadPrivate() routines diff --git a/pr/include/prtime.h b/pr/include/prtime.h index 7f00f67e..fb5be8e2 100644 --- a/pr/include/prtime.h +++ b/pr/include/prtime.h @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /* *---------------------------------------------------------------------- @@ -56,11 +24,11 @@ PR_BEGIN_EXTERN_C /************************* TYPES AND CONSTANTS ************************/ /**********************************************************************/ -#define PR_MSEC_PER_SEC 1000UL -#define PR_USEC_PER_SEC 1000000UL -#define PR_NSEC_PER_SEC 1000000000UL -#define PR_USEC_PER_MSEC 1000UL -#define PR_NSEC_PER_MSEC 1000000UL +#define PR_MSEC_PER_SEC 1000L +#define PR_USEC_PER_SEC 1000000L +#define PR_NSEC_PER_SEC 1000000000L +#define PR_USEC_PER_MSEC 1000L +#define PR_NSEC_PER_MSEC 1000000L /* * PRTime -- diff --git a/pr/include/prtpool.h b/pr/include/prtpool.h index 2e1f6ddb..6a434dd1 100644 --- a/pr/include/prtpool.h +++ b/pr/include/prtpool.h @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1999-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #ifndef prtpool_h___ #define prtpool_h___ diff --git a/pr/include/prtrace.h b/pr/include/prtrace.h index 42f88e93..12a5fbfb 100644 --- a/pr/include/prtrace.h +++ b/pr/include/prtrace.h @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #ifndef prtrace_h___ #define prtrace_h___ diff --git a/pr/include/prtypes.h b/pr/include/prtypes.h index dd66d0f5..56fa039c 100644 --- a/pr/include/prtypes.h +++ b/pr/include/prtypes.h @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /* ** File: prtypes.h @@ -228,6 +196,13 @@ #define PR_MAX(x,y) ((x)>(y)?(x):(y)) #define PR_ABS(x) ((x)<0?-(x):(x)) +/*********************************************************************** +** MACROS: PR_ARRAY_SIZE +** DESCRIPTION: +** The number of elements in an array. +***********************************************************************/ +#define PR_ARRAY_SIZE(a) (sizeof(a)/sizeof((a)[0])) + PR_BEGIN_EXTERN_C /************************************************************************ @@ -235,7 +210,7 @@ PR_BEGIN_EXTERN_C ** PRInt8 ** DESCRIPTION: ** The int8 types are known to be 8 bits each. There is no type that -** is equivalent to a plain "char". +** is equivalent to a plain "char". ************************************************************************/ #if PR_BYTES_PER_BYTE == 1 typedef unsigned char PRUint8; @@ -274,7 +249,7 @@ typedef signed char PRInt8; ** TYPES: PRUint16 ** PRInt16 ** DESCRIPTION: -** The int16 types are known to be 16 bits each. +** The int16 types are known to be 16 bits each. ************************************************************************/ #if PR_BYTES_PER_SHORT == 2 typedef unsigned short PRUint16; @@ -299,7 +274,7 @@ typedef short PRInt16; ** TYPES: PRUint32 ** PRInt32 ** DESCRIPTION: -** The int32 types are known to be 32 bits each. +** The int32 types are known to be 32 bits each. ************************************************************************/ #if PR_BYTES_PER_INT == 4 typedef unsigned int PRUint32; @@ -336,6 +311,23 @@ typedef long PRInt32; ** architectures and even different compilers have varying support for ** 64 bit values. The only guaranteed portability requires the use of ** the LL_ macros (see prlong.h). +** +** MACROS: PR_INT64 +** PR_UINT64 +** DESCRIPTION: +** The PR_INT64 and PR_UINT64 macros provide a portable way for +** specifying 64-bit integer constants. They can only be used if +** PRInt64 and PRUint64 are defined as compiler-supported 64-bit +** integer types (i.e., if HAVE_LONG_LONG is defined, which is true +** for all the supported compilers topday). If PRInt64 and PRUint64 +** are defined as structs, the LL_INIT macro defined in prlong.h has +** to be used. +** +** MACROS: PR_INT64_MAX +** PR_INT64_MIN +** PR_UINT64_MAX +** DESCRIPTION: +** The maximum and minimum values of a PRInt64 or PRUint64. ************************************************************************/ #ifdef HAVE_LONG_LONG /* Keep this in sync with prlong.h. */ @@ -347,13 +339,23 @@ typedef long PRInt32; #if PR_BYTES_PER_LONG == 8 && !defined(__APPLE__) typedef long PRInt64; typedef unsigned long PRUint64; +#define PR_INT64(x) x ## L +#define PR_UINT64(x) x ## UL #elif defined(WIN32) && !defined(__GNUC__) typedef __int64 PRInt64; typedef unsigned __int64 PRUint64; +#define PR_INT64(x) x ## i64 +#define PR_UINT64(x) x ## ui64 #else typedef long long PRInt64; typedef unsigned long long PRUint64; +#define PR_INT64(x) x ## LL +#define PR_UINT64(x) x ## ULL #endif /* PR_BYTES_PER_LONG == 8 */ + +#define PR_INT64_MAX PR_INT64(0x7fffffffffffffff) +#define PR_INT64_MIN (-PR_INT64_MAX - 1) +#define PR_UINT64_MAX PR_UINT64(-1) #else /* !HAVE_LONG_LONG */ typedef struct { #ifdef IS_LITTLE_ENDIAN @@ -363,6 +365,11 @@ typedef struct { #endif } PRInt64; typedef PRInt64 PRUint64; + +#define PR_INT64_MAX (PRInt64){0x7fffffff, 0xffffffff} +#define PR_INT64_MIN (PRInt64){0xffffffff, 0xffffffff} +#define PR_UINT64_MAX (PRUint64){0xffffffff, 0xffffffff} + #endif /* !HAVE_LONG_LONG */ /************************************************************************ @@ -372,7 +379,7 @@ typedef PRInt64 PRUint64; ** The PRIntn types are most appropriate for automatic variables. They are ** guaranteed to be at least 16 bits, though various architectures may ** define them to be wider (e.g., 32 or even 64 bits). These types are -** never valid for fields of a structure. +** never valid for fields of a structure. ************************************************************************/ #if PR_BYTES_PER_INT >= 2 typedef int PRIntn; @@ -384,14 +391,14 @@ typedef unsigned int PRUintn; /************************************************************************ ** TYPES: PRFloat64 ** DESCRIPTION: -** NSPR's floating point type is always 64 bits. +** NSPR's floating point type is always 64 bits. ************************************************************************/ typedef double PRFloat64; /************************************************************************ ** TYPES: PRSize ** DESCRIPTION: -** A type for representing the size of objects. +** A type for representing the size of objects. ************************************************************************/ typedef size_t PRSize; @@ -399,7 +406,7 @@ typedef size_t PRSize; /************************************************************************ ** TYPES: PROffset32, PROffset64 ** DESCRIPTION: -** A type for representing byte offsets from some location. +** A type for representing byte offsets from some location. ************************************************************************/ typedef PRInt32 PROffset32; typedef PRInt64 PROffset64; @@ -408,7 +415,7 @@ typedef PRInt64 PROffset64; ** TYPES: PRPtrDiff ** DESCRIPTION: ** A type for pointer difference. Variables of this type are suitable -** for storing a pointer or pointer subtraction. +** for storing a pointer or pointer subtraction. ************************************************************************/ typedef ptrdiff_t PRPtrdiff; @@ -416,10 +423,10 @@ typedef ptrdiff_t PRPtrdiff; ** TYPES: PRUptrdiff ** DESCRIPTION: ** A type for pointer difference. Variables of this type are suitable -** for storing a pointer or pointer sutraction. +** for storing a pointer or pointer sutraction. ************************************************************************/ #ifdef _WIN64 -typedef unsigned __int64 PRUptrdiff; +typedef PRUint64 PRUptrdiff; #else typedef unsigned long PRUptrdiff; #endif @@ -430,7 +437,7 @@ typedef unsigned long PRUptrdiff; ** Use PRBool for variables and parameter types. Use PR_FALSE and PR_TRUE ** for clarity of target type in assignments and actual arguments. Use ** 'if (bool)', 'while (!bool)', '(bool) ? x : y' etc., to test booleans -** just as you would C int-valued conditions. +** just as you would C int-valued conditions. ************************************************************************/ typedef PRIntn PRBool; #define PR_TRUE 1 @@ -445,7 +452,7 @@ typedef PRIntn PRBool; typedef PRUint8 PRPackedBool; /* -** Status code used by some routines that have a single point of failure or +** Status code used by some routines that have a single point of failure or ** special status return. */ typedef enum { PR_FAILURE = -1, PR_SUCCESS = 0 } PRStatus; @@ -471,8 +478,8 @@ typedef PRUint16 PRUnichar; ** http://java.sun.com/docs/books/vmspec/index.html.) */ #ifdef _WIN64 -typedef __int64 PRWord; -typedef unsigned __int64 PRUword; +typedef PRInt64 PRWord; +typedef PRUint64 PRUword; #else typedef long PRWord; typedef unsigned long PRUword; @@ -519,6 +526,14 @@ typedef unsigned long PRUword; /********* ????????????? End Fix me ?????????????????????????????? *****/ #endif /* NO_NSPR_10_SUPPORT */ +/* +** Compile-time assert. "condition" must be a constant expression. +** The macro can be used only in places where an "extern" declaration is +** allowed. +*/ +#define PR_STATIC_ASSERT(condition) \ + extern void pr_static_assert(int arg[(condition) ? 1 : -1]) + PR_END_EXTERN_C #endif /* prtypes_h___ */ diff --git a/pr/include/prvrsion.h b/pr/include/prvrsion.h index eb8e1e61..a8415b2a 100755 --- a/pr/include/prvrsion.h +++ b/pr/include/prvrsion.h @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /* author: jstewart */ diff --git a/pr/include/prwin16.h b/pr/include/prwin16.h index 215b0514..9f8d7a99 100644 --- a/pr/include/prwin16.h +++ b/pr/include/prwin16.h @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #ifndef prwin16_h___ #define prwin16_h___ diff --git a/pr/src/Makefile.in b/pr/src/Makefile.in index 3514ab16..60445c7e 100644 --- a/pr/src/Makefile.in +++ b/pr/src/Makefile.in @@ -1,39 +1,7 @@ # -# ***** BEGIN LICENSE BLOCK ***** -# Version: MPL 1.1/GPL 2.0/LGPL 2.1 -# -# The contents of this file are subject to the Mozilla Public License Version -# 1.1 (the "License"); you may not use this file except in compliance with -# the License. You may obtain a copy of the License at -# http://www.mozilla.org/MPL/ -# -# Software distributed under the License is distributed on an "AS IS" basis, -# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License -# for the specific language governing rights and limitations under the -# License. -# -# The Original Code is the Netscape Portable Runtime (NSPR). -# -# The Initial Developer of the Original Code is -# Netscape Communications Corporation. -# Portions created by the Initial Developer are Copyright (C) 1998-2000 -# the Initial Developer. All Rights Reserved. -# -# Contributor(s): -# -# Alternatively, the contents of this file may be used under the terms of -# either the GNU General Public License Version 2 or later (the "GPL"), or -# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), -# in which case the provisions of the GPL or the LGPL are applicable instead -# of those above. If you wish to allow use of your version of this file only -# under the terms of either the GPL or the LGPL, and not to allow others to -# use your version of this file under the terms of the MPL, indicate your -# decision by deleting the provisions above and replace them with the notice -# and other provisions required by the GPL or the LGPL. If you do not delete -# the provisions above, a recipient may use your version of this file under -# the terms of any one of the MPL, the GPL or the LGPL. -# -# ***** END LICENSE BLOCK ***** +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. #! gmake @@ -156,7 +124,12 @@ endif ifeq ($(OS_ARCH),Linux) ifeq ($(USE_PTHREADS), 1) +ifeq ($(OS_TARGET),Android) +# Android has no libpthread.so in NDK +OS_LIBS = -ldl +else OS_LIBS = -lpthread -ldl +endif else OS_LIBS = -ldl endif @@ -205,12 +178,12 @@ ifeq ($(OS_ARCH),WINCE) OS_LIBS = ws2.lib endif -ifeq ($(OS_TARGET),MacOSX) -OS_LIBS = -framework CoreServices -framework CoreFoundation +ifeq ($(OS_TARGET),Android) +OS_LIBS += -llog endif -ifdef GC_LEAK_DETECTOR -EXTRA_LIBS = -L$(dist_libdir) -lboehm +ifeq ($(OS_TARGET),MacOSX) +OS_LIBS = -framework CoreServices -framework CoreFoundation endif EXTRA_LIBS += $(OS_LIBS) @@ -309,10 +282,6 @@ OBJS += \ cplus/$(OBJDIR)/rctime.$(OBJ_SUFFIX) endif -ifdef GC_LEAK_DETECTOR -OBJS += memory/$(OBJDIR)/prgcleak.$(OBJ_SUFFIX) -endif - ifeq ($(OS_ARCH), WINNT) RES=$(OBJDIR)/nspr.res RESNAME=nspr.rc @@ -384,12 +353,19 @@ endif # +# We use a 'build' target here to ensure that we build $(TARGETS) after +# looping over $(DIRS) to create the object files in a parallel build. +# Recipe commands are executed sequentially in a parallel build while +# target dependencies are executed in parallel. +export:: + $(MAKE) build + # # The Client build wants the shared libraries in $(dist_bindir) # so we also install them there. # -export:: $(TARGETS) +build:: $(TARGETS) $(INSTALL) -m 444 $(TARGETS) $(dist_libdir) ifdef SHARED_LIBRARY ifeq ($(OS_ARCH),HP-UX) diff --git a/pr/src/bthreads/Makefile.in b/pr/src/bthreads/Makefile.in index 285f217d..a85e6db6 100644 --- a/pr/src/bthreads/Makefile.in +++ b/pr/src/bthreads/Makefile.in @@ -1,39 +1,7 @@ # -# ***** BEGIN LICENSE BLOCK ***** -# Version: MPL 1.1/GPL 2.0/LGPL 2.1 -# -# The contents of this file are subject to the Mozilla Public License Version -# 1.1 (the "License"); you may not use this file except in compliance with -# the License. You may obtain a copy of the License at -# http://www.mozilla.org/MPL/ -# -# Software distributed under the License is distributed on an "AS IS" basis, -# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License -# for the specific language governing rights and limitations under the -# License. -# -# The Original Code is the Netscape Portable Runtime (NSPR). -# -# The Initial Developer of the Original Code is -# Netscape Communications Corporation. -# Portions created by the Initial Developer are Copyright (C) 1998-2000 -# the Initial Developer. All Rights Reserved. -# -# Contributor(s): -# -# Alternatively, the contents of this file may be used under the terms of -# either the GNU General Public License Version 2 or later (the "GPL"), or -# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), -# in which case the provisions of the GPL or the LGPL are applicable instead -# of those above. If you wish to allow use of your version of this file only -# under the terms of either the GPL or the LGPL, and not to allow others to -# use your version of this file under the terms of the MPL, indicate your -# decision by deleting the provisions above and replace them with the notice -# and other provisions required by the GPL or the LGPL. If you do not delete -# the provisions above, a recipient may use your version of this file under -# the terms of any one of the MPL, the GPL or the LGPL. -# -# ***** END LICENSE BLOCK ***** +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. #! gmake diff --git a/pr/src/bthreads/bsrcs.mk b/pr/src/bthreads/bsrcs.mk index af01bb7d..70832990 100644 --- a/pr/src/bthreads/bsrcs.mk +++ b/pr/src/bthreads/bsrcs.mk @@ -1,39 +1,7 @@ # -# ***** BEGIN LICENSE BLOCK ***** -# Version: MPL 1.1/GPL 2.0/LGPL 2.1 -# -# The contents of this file are subject to the Mozilla Public License Version -# 1.1 (the "License"); you may not use this file except in compliance with -# the License. You may obtain a copy of the License at -# http://www.mozilla.org/MPL/ -# -# Software distributed under the License is distributed on an "AS IS" basis, -# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License -# for the specific language governing rights and limitations under the -# License. -# -# The Original Code is the Netscape Portable Runtime (NSPR). -# -# The Initial Developer of the Original Code is -# Netscape Communications Corporation. -# Portions created by the Initial Developer are Copyright (C) 1998-2000 -# the Initial Developer. All Rights Reserved. -# -# Contributor(s): -# -# Alternatively, the contents of this file may be used under the terms of -# either the GNU General Public License Version 2 or later (the "GPL"), or -# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), -# in which case the provisions of the GPL or the LGPL are applicable instead -# of those above. If you wish to allow use of your version of this file only -# under the terms of either the GPL or the LGPL, and not to allow others to -# use your version of this file under the terms of the MPL, indicate your -# decision by deleting the provisions above and replace them with the notice -# and other provisions required by the GPL or the LGPL. If you do not delete -# the provisions above, a recipient may use your version of this file under -# the terms of any one of the MPL, the GPL or the LGPL. -# -# ***** END LICENSE BLOCK ***** +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. # this file lists the source files to be compiled (used in Makefile) and # then enumerated as object files (in objs.mk) for inclusion in the NSPR diff --git a/pr/src/bthreads/btcvar.c b/pr/src/bthreads/btcvar.c index f615bf5b..c7483790 100644 --- a/pr/src/bthreads/btcvar.c +++ b/pr/src/bthreads/btcvar.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include <kernel/OS.h> diff --git a/pr/src/bthreads/btlocks.c b/pr/src/bthreads/btlocks.c index 7dd125b1..994c09c4 100644 --- a/pr/src/bthreads/btlocks.c +++ b/pr/src/bthreads/btlocks.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; c-basic-offset: 4 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /* ** File: btlocks.c diff --git a/pr/src/bthreads/btmisc.c b/pr/src/bthreads/btmisc.c index 2d678a9d..8d84a606 100644 --- a/pr/src/bthreads/btmisc.c +++ b/pr/src/bthreads/btmisc.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; c-basic-offset: 4 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "primpl.h" #include <stdio.h> diff --git a/pr/src/bthreads/btmon.c b/pr/src/bthreads/btmon.c index be6d5a70..bd05e73d 100644 --- a/pr/src/bthreads/btmon.c +++ b/pr/src/bthreads/btmon.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include <kernel/OS.h> diff --git a/pr/src/bthreads/btsem.c b/pr/src/bthreads/btsem.c index bce28142..011ee6bd 100644 --- a/pr/src/bthreads/btsem.c +++ b/pr/src/bthreads/btsem.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include <kernel/OS.h> diff --git a/pr/src/bthreads/btthread.c b/pr/src/bthreads/btthread.c index 33bdfcc7..c2a1cd82 100644 --- a/pr/src/bthreads/btthread.c +++ b/pr/src/bthreads/btthread.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include <kernel/OS.h> #include <support/TLS.h> diff --git a/pr/src/bthreads/objs.mk b/pr/src/bthreads/objs.mk index 60455a37..b273ba46 100644 --- a/pr/src/bthreads/objs.mk +++ b/pr/src/bthreads/objs.mk @@ -1,39 +1,7 @@ # -# ***** BEGIN LICENSE BLOCK ***** -# Version: MPL 1.1/GPL 2.0/LGPL 2.1 -# -# The contents of this file are subject to the Mozilla Public License Version -# 1.1 (the "License"); you may not use this file except in compliance with -# the License. You may obtain a copy of the License at -# http://www.mozilla.org/MPL/ -# -# Software distributed under the License is distributed on an "AS IS" basis, -# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License -# for the specific language governing rights and limitations under the -# License. -# -# The Original Code is the Netscape Portable Runtime (NSPR). -# -# The Initial Developer of the Original Code is -# Netscape Communications Corporation. -# Portions created by the Initial Developer are Copyright (C) 1998-2000 -# the Initial Developer. All Rights Reserved. -# -# Contributor(s): -# -# Alternatively, the contents of this file may be used under the terms of -# either the GNU General Public License Version 2 or later (the "GPL"), or -# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), -# in which case the provisions of the GPL or the LGPL are applicable instead -# of those above. If you wish to allow use of your version of this file only -# under the terms of either the GPL or the LGPL, and not to allow others to -# use your version of this file under the terms of the MPL, indicate your -# decision by deleting the provisions above and replace them with the notice -# and other provisions required by the GPL or the LGPL. If you do not delete -# the provisions above, a recipient may use your version of this file under -# the terms of any one of the MPL, the GPL or the LGPL. -# -# ***** END LICENSE BLOCK ***** +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. # This makefile appends to the variable OBJS the bthread object modules # that will be part of the nspr20 library. diff --git a/pr/src/cplus/Makefile.in b/pr/src/cplus/Makefile.in index 46e62e75..ec08eab1 100644 --- a/pr/src/cplus/Makefile.in +++ b/pr/src/cplus/Makefile.in @@ -1,39 +1,7 @@ # -# ***** BEGIN LICENSE BLOCK ***** -# Version: MPL 1.1/GPL 2.0/LGPL 2.1 -# -# The contents of this file are subject to the Mozilla Public License Version -# 1.1 (the "License"); you may not use this file except in compliance with -# the License. You may obtain a copy of the License at -# http://www.mozilla.org/MPL/ -# -# Software distributed under the License is distributed on an "AS IS" basis, -# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License -# for the specific language governing rights and limitations under the -# License. -# -# The Original Code is the Netscape Portable Runtime (NSPR). -# -# The Initial Developer of the Original Code is -# Netscape Communications Corporation. -# Portions created by the Initial Developer are Copyright (C) 1998-2000 -# the Initial Developer. All Rights Reserved. -# -# Contributor(s): -# -# Alternatively, the contents of this file may be used under the terms of -# either the GNU General Public License Version 2 or later (the "GPL"), or -# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), -# in which case the provisions of the GPL or the LGPL are applicable instead -# of those above. If you wish to allow use of your version of this file only -# under the terms of either the GPL or the LGPL, and not to allow others to -# use your version of this file under the terms of the MPL, indicate your -# decision by deleting the provisions above and replace them with the notice -# and other provisions required by the GPL or the LGPL. If you do not delete -# the provisions above, a recipient may use your version of this file under -# the terms of any one of the MPL, the GPL or the LGPL. -# -# ***** END LICENSE BLOCK ***** +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. #! gmake diff --git a/pr/src/cplus/rcascii.h b/pr/src/cplus/rcascii.h index 8476fc49..7383d8d6 100644 --- a/pr/src/cplus/rcascii.h +++ b/pr/src/cplus/rcascii.h @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /* ** Class definitions to format ASCII data. diff --git a/pr/src/cplus/rcbase.cpp b/pr/src/cplus/rcbase.cpp index 84662d9a..c258081d 100644 --- a/pr/src/cplus/rcbase.cpp +++ b/pr/src/cplus/rcbase.cpp @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /* ** RCBase.cpp - Mixin class for NSPR C++ wrappers diff --git a/pr/src/cplus/rcbase.h b/pr/src/cplus/rcbase.h index 0910a158..58df43c1 100644 --- a/pr/src/cplus/rcbase.h +++ b/pr/src/cplus/rcbase.h @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /* ** RCBase.h - Mixin class for NSPR C++ wrappers diff --git a/pr/src/cplus/rccv.cpp b/pr/src/cplus/rccv.cpp index 5e03ae75..32b84b1c 100644 --- a/pr/src/cplus/rccv.cpp +++ b/pr/src/cplus/rccv.cpp @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /* ** RCCondition - C++ wrapper around NSPR's PRCondVar diff --git a/pr/src/cplus/rccv.h b/pr/src/cplus/rccv.h index 56923af1..e5c89135 100644 --- a/pr/src/cplus/rccv.h +++ b/pr/src/cplus/rccv.h @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /* ** RCCondition - C++ wrapper around NSPR's PRCondVar diff --git a/pr/src/cplus/rcfileio.cpp b/pr/src/cplus/rcfileio.cpp index 7646c894..cdf6318a 100644 --- a/pr/src/cplus/rcfileio.cpp +++ b/pr/src/cplus/rcfileio.cpp @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /* ** Class implementation for normal and special file I/O (ref: prio.h) diff --git a/pr/src/cplus/rcfileio.h b/pr/src/cplus/rcfileio.h index 576b37df..d9c82582 100644 --- a/pr/src/cplus/rcfileio.h +++ b/pr/src/cplus/rcfileio.h @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /* ** Class definitions for normal and special file I/O (ref: prio.h) diff --git a/pr/src/cplus/rcinrval.cpp b/pr/src/cplus/rcinrval.cpp index ff075a3a..cda5f8df 100644 --- a/pr/src/cplus/rcinrval.cpp +++ b/pr/src/cplus/rcinrval.cpp @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /* ** C++ interval times (ref: prinrval.h) diff --git a/pr/src/cplus/rcinrval.h b/pr/src/cplus/rcinrval.h index 2dc24987..bcf755fa 100644 --- a/pr/src/cplus/rcinrval.h +++ b/pr/src/cplus/rcinrval.h @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /* ** C++ interval times (ref: prinrval.h) diff --git a/pr/src/cplus/rcio.cpp b/pr/src/cplus/rcio.cpp index 27f9e788..081a9f69 100644 --- a/pr/src/cplus/rcio.cpp +++ b/pr/src/cplus/rcio.cpp @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /* ** Base class implmenation for I/O (ref: prio.h) diff --git a/pr/src/cplus/rcio.h b/pr/src/cplus/rcio.h index 5550a881..a4278d2a 100644 --- a/pr/src/cplus/rcio.h +++ b/pr/src/cplus/rcio.h @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /* ** Base class definitions for I/O (ref: prio.h) diff --git a/pr/src/cplus/rclock.cpp b/pr/src/cplus/rclock.cpp index 87b326bc..60d13b88 100644 --- a/pr/src/cplus/rclock.cpp +++ b/pr/src/cplus/rclock.cpp @@ -1,40 +1,8 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /* ** C++ access to NSPR locks (PRLock) */ diff --git a/pr/src/cplus/rclock.h b/pr/src/cplus/rclock.h index 9e20ef04..511b6fa4 100644 --- a/pr/src/cplus/rclock.h +++ b/pr/src/cplus/rclock.h @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /* ** C++ access to NSPR locks (PRLock) diff --git a/pr/src/cplus/rcmon.h b/pr/src/cplus/rcmon.h index 75b8ca3e..5d084efd 100644 --- a/pr/src/cplus/rcmon.h +++ b/pr/src/cplus/rcmon.h @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /* ** Class: RCMonitor (ref prmonitor.h) diff --git a/pr/src/cplus/rcnetdb.cpp b/pr/src/cplus/rcnetdb.cpp index 9890c9ae..f8bd0acd 100644 --- a/pr/src/cplus/rcnetdb.cpp +++ b/pr/src/cplus/rcnetdb.cpp @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /* ** Base class implementation for network access functions (ref: prnetdb.h) diff --git a/pr/src/cplus/rcnetdb.h b/pr/src/cplus/rcnetdb.h index 03f5b4f0..8096113b 100644 --- a/pr/src/cplus/rcnetdb.h +++ b/pr/src/cplus/rcnetdb.h @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /* ** Base class definitions for network access functions (ref: prnetdb.h) diff --git a/pr/src/cplus/rcnetio.cpp b/pr/src/cplus/rcnetio.cpp index bdc94309..f511d81d 100644 --- a/pr/src/cplus/rcnetio.cpp +++ b/pr/src/cplus/rcnetio.cpp @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /* ** Subclass implementation for streamed network I/O (ref: prio.h) diff --git a/pr/src/cplus/rcnetio.h b/pr/src/cplus/rcnetio.h index 54ce695f..44b8bf07 100644 --- a/pr/src/cplus/rcnetio.h +++ b/pr/src/cplus/rcnetio.h @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /* ** Subclass definitions for network I/O (ref: prio.h) diff --git a/pr/src/cplus/rcthread.cpp b/pr/src/cplus/rcthread.cpp index 25a9810f..3db00d36 100755 --- a/pr/src/cplus/rcthread.cpp +++ b/pr/src/cplus/rcthread.cpp @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /* RCThread.cpp - C++ wrapper on NSPR */ diff --git a/pr/src/cplus/rcthread.h b/pr/src/cplus/rcthread.h index 2b000564..8683c0a5 100644 --- a/pr/src/cplus/rcthread.h +++ b/pr/src/cplus/rcthread.h @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /* RCThread.h */ diff --git a/pr/src/cplus/rctime.cpp b/pr/src/cplus/rctime.cpp index 03c6ff32..d6551040 100644 --- a/pr/src/cplus/rctime.cpp +++ b/pr/src/cplus/rctime.cpp @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /* ** Class implementation for calendar time routines (ref: prtime.h) diff --git a/pr/src/cplus/rctime.h b/pr/src/cplus/rctime.h index f0b900a2..4cf7b904 100644 --- a/pr/src/cplus/rctime.h +++ b/pr/src/cplus/rctime.h @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /* ** Class definitions for calendar time routines (ref: prtime.h) diff --git a/pr/src/cplus/tests/Makefile.in b/pr/src/cplus/tests/Makefile.in index 78f1cbed..af73897b 100644 --- a/pr/src/cplus/tests/Makefile.in +++ b/pr/src/cplus/tests/Makefile.in @@ -1,39 +1,7 @@ # -# ***** BEGIN LICENSE BLOCK ***** -# Version: MPL 1.1/GPL 2.0/LGPL 2.1 -# -# The contents of this file are subject to the Mozilla Public License Version -# 1.1 (the "License"); you may not use this file except in compliance with -# the License. You may obtain a copy of the License at -# http://www.mozilla.org/MPL/ -# -# Software distributed under the License is distributed on an "AS IS" basis, -# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License -# for the specific language governing rights and limitations under the -# License. -# -# The Original Code is the Netscape Portable Runtime (NSPR). -# -# The Initial Developer of the Original Code is -# Netscape Communications Corporation. -# Portions created by the Initial Developer are Copyright (C) 1998-2000 -# the Initial Developer. All Rights Reserved. -# -# Contributor(s): -# -# Alternatively, the contents of this file may be used under the terms of -# either the GNU General Public License Version 2 or later (the "GPL"), or -# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), -# in which case the provisions of the GPL or the LGPL are applicable instead -# of those above. If you wish to allow use of your version of this file only -# under the terms of either the GPL or the LGPL, and not to allow others to -# use your version of this file under the terms of the MPL, indicate your -# decision by deleting the provisions above and replace them with the notice -# and other provisions required by the GPL or the LGPL. If you do not delete -# the provisions above, a recipient may use your version of this file under -# the terms of any one of the MPL, the GPL or the LGPL. -# -# ***** END LICENSE BLOCK ***** +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. #! gmake diff --git a/pr/src/cplus/tests/fileio.cpp b/pr/src/cplus/tests/fileio.cpp index a01ea5eb..fdffe999 100644 --- a/pr/src/cplus/tests/fileio.cpp +++ b/pr/src/cplus/tests/fileio.cpp @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /* fileio.cpp - a test program */ diff --git a/pr/src/cplus/tests/interval.cpp b/pr/src/cplus/tests/interval.cpp index 1223d67a..8acf5062 100644 --- a/pr/src/cplus/tests/interval.cpp +++ b/pr/src/cplus/tests/interval.cpp @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /* interval.cpp - a test program */ diff --git a/pr/src/cplus/tests/ranfile.cpp b/pr/src/cplus/tests/ranfile.cpp index b745b15c..c3ac0d3a 100644 --- a/pr/src/cplus/tests/ranfile.cpp +++ b/pr/src/cplus/tests/ranfile.cpp @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /*********************************************************************** ** diff --git a/pr/src/cplus/tests/switch.cpp b/pr/src/cplus/tests/switch.cpp index fddc5808..4cb14c48 100644 --- a/pr/src/cplus/tests/switch.cpp +++ b/pr/src/cplus/tests/switch.cpp @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /* ** File: switch.cpp diff --git a/pr/src/cplus/tests/thread.cpp b/pr/src/cplus/tests/thread.cpp index 801eee0d..442c534d 100644 --- a/pr/src/cplus/tests/thread.cpp +++ b/pr/src/cplus/tests/thread.cpp @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /* thread.cpp - a test program */ diff --git a/pr/src/cplus/tests/time.cpp b/pr/src/cplus/tests/time.cpp index c0a9c3e8..ad27caaa 100644 --- a/pr/src/cplus/tests/time.cpp +++ b/pr/src/cplus/tests/time.cpp @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /* time.cpp - a test program */ diff --git a/pr/src/cplus/tests/tpd.cpp b/pr/src/cplus/tests/tpd.cpp index 6e3dd953..42290ab1 100644 --- a/pr/src/cplus/tests/tpd.cpp +++ b/pr/src/cplus/tests/tpd.cpp @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /* ** File: tpd.cpp diff --git a/pr/src/io/Makefile.in b/pr/src/io/Makefile.in index e7df1f01..d2ee2742 100644 --- a/pr/src/io/Makefile.in +++ b/pr/src/io/Makefile.in @@ -1,39 +1,7 @@ # -# ***** BEGIN LICENSE BLOCK ***** -# Version: MPL 1.1/GPL 2.0/LGPL 2.1 -# -# The contents of this file are subject to the Mozilla Public License Version -# 1.1 (the "License"); you may not use this file except in compliance with -# the License. You may obtain a copy of the License at -# http://www.mozilla.org/MPL/ -# -# Software distributed under the License is distributed on an "AS IS" basis, -# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License -# for the specific language governing rights and limitations under the -# License. -# -# The Original Code is the Netscape Portable Runtime (NSPR). -# -# The Initial Developer of the Original Code is -# Netscape Communications Corporation. -# Portions created by the Initial Developer are Copyright (C) 1998-2000 -# the Initial Developer. All Rights Reserved. -# -# Contributor(s): -# -# Alternatively, the contents of this file may be used under the terms of -# either the GNU General Public License Version 2 or later (the "GPL"), or -# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), -# in which case the provisions of the GPL or the LGPL are applicable instead -# of those above. If you wish to allow use of your version of this file only -# under the terms of either the GPL or the LGPL, and not to allow others to -# use your version of this file under the terms of the MPL, indicate your -# decision by deleting the provisions above and replace them with the notice -# and other provisions required by the GPL or the LGPL. If you do not delete -# the provisions above, a recipient may use your version of this file under -# the terms of any one of the MPL, the GPL or the LGPL. -# -# ***** END LICENSE BLOCK ***** +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. #! gmake diff --git a/pr/src/io/prdir.c b/pr/src/io/prdir.c index 8679c9d5..3701a6a4 100644 --- a/pr/src/io/prdir.c +++ b/pr/src/io/prdir.c @@ -1,40 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * Roy Yokoyama <yokoyama@netscape.com> - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "primpl.h" diff --git a/pr/src/io/prfdcach.c b/pr/src/io/prfdcach.c index ca09cb49..9ca84dc9 100644 --- a/pr/src/io/prfdcach.c +++ b/pr/src/io/prfdcach.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "primpl.h" diff --git a/pr/src/io/prfile.c b/pr/src/io/prfile.c index 00dbb89d..aeb54239 100644 --- a/pr/src/io/prfile.c +++ b/pr/src/io/prfile.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "primpl.h" diff --git a/pr/src/io/prio.c b/pr/src/io/prio.c index b779b1c0..78cbdf56 100644 --- a/pr/src/io/prio.c +++ b/pr/src/io/prio.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "primpl.h" diff --git a/pr/src/io/priometh.c b/pr/src/io/priometh.c index 1ca474f0..f254328e 100644 --- a/pr/src/io/priometh.c +++ b/pr/src/io/priometh.c @@ -1,40 +1,8 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "primpl.h" #include <string.h> diff --git a/pr/src/io/pripv6.c b/pr/src/io/pripv6.c index e4af39c1..af7de49d 100644 --- a/pr/src/io/pripv6.c +++ b/pr/src/io/pripv6.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /* ** File: pripv6.c diff --git a/pr/src/io/prlayer.c b/pr/src/io/prlayer.c index cf48d23a..faec9095 100644 --- a/pr/src/io/prlayer.c +++ b/pr/src/io/prlayer.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /* ** File: prlayer.c @@ -555,6 +523,11 @@ PR_IMPLEMENT(PRStatus) PR_PushIOLayer( *stack = *fd; *fd = copy; fd->higher = stack; + if (fd->lower) + { + PR_ASSERT(fd->lower->higher == stack); + fd->lower->higher = fd; + } stack->lower = fd; stack->higher = NULL; } else { @@ -593,6 +566,10 @@ PR_IMPLEMENT(PRFileDesc*) PR_PopIOLayer(PRFileDesc *stack, PRDescIdentity id) *stack = *extract; *extract = copy; stack->higher = NULL; + if (stack->lower) { + PR_ASSERT(stack->lower->higher == extract); + stack->lower->higher = stack; + } } else if ((PR_IO_LAYER_HEAD == stack->identity) && (extract == stack->lower) && (extract->lower == NULL)) { /* @@ -644,8 +621,15 @@ PR_IMPLEMENT(PRDescIdentity) PR_GetUniqueIdentity(const char *layer_name) /* this initial code runs unsafe */ retry: PR_ASSERT(NULL == names); + /* + * In the initial round, both identity_cache.ident and + * identity_cache.length are 0, so (identity_cache.ident + 1) is greater + * than length. In later rounds, identity_cache.ident is always less + * than length, so (identity_cache.ident + 1) can be equal to but cannot + * be greater than length. + */ length = identity_cache.length; - if (length < (identity_cache.ident + 1)) + if ((identity_cache.ident + 1) >= length) { length += ID_CACHE_INCREMENT; names = (char**)PR_CALLOC(length * sizeof(char*)); @@ -659,12 +643,13 @@ retry: /* now we get serious about thread safety */ PR_Lock(identity_cache.ml); - PR_ASSERT(identity_cache.ident <= identity_cache.length); + PR_ASSERT(identity_cache.length == 0 || + identity_cache.ident < identity_cache.length); identity = identity_cache.ident + 1; - if (identity > identity_cache.length) /* there's no room */ + if (identity >= identity_cache.length) /* there's no room */ { /* we have to do something - hopefully it's already done */ - if ((NULL != names) && (length >= identity)) + if ((NULL != names) && (identity < length)) { /* what we did is still okay */ memcpy( @@ -677,7 +662,6 @@ retry: } else { - PR_ASSERT(identity_cache.ident <= identity_cache.length); PR_Unlock(identity_cache.ml); if (NULL != names) PR_DELETE(names); goto retry; @@ -688,7 +672,7 @@ retry: identity_cache.name[identity] = name; } identity_cache.ident = identity; - PR_ASSERT(identity_cache.ident <= identity_cache.length); + PR_ASSERT(identity_cache.ident < identity_cache.length); PR_Unlock(identity_cache.ml); if (NULL != old) PR_DELETE(old); diff --git a/pr/src/io/prlog.c b/pr/src/io/prlog.c index 8a796014..eec95e8a 100644 --- a/pr/src/io/prlog.c +++ b/pr/src/io/prlog.c @@ -1,46 +1,16 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * IBM Corporation - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "primpl.h" #include "prenv.h" #include "prprf.h" #include <string.h> +#ifdef ANDROID +#include <android/log.h> +#endif /* * Lock used to lock the log. @@ -126,6 +96,18 @@ static void OutputDebugStringA(const char* msg) { PR_END_MACRO #elif defined(_PR_USE_STDIO_FOR_LOGGING) #define _PUT_LOG(fd, buf, nb) {fwrite(buf, 1, nb, fd); fflush(fd);} +#elif defined(ANDROID) +#define _PUT_LOG(fd, buf, nb) \ + PR_BEGIN_MACRO \ + if (fd == _pr_stderr) { \ + char savebyte = buf[nb]; \ + buf[nb] = '\0'; \ + __android_log_write(ANDROID_LOG_INFO, "PRLog", buf); \ + buf[nb] = savebyte; \ + } else { \ + PR_Write(fd, buf, nb); \ + } \ + PR_END_MACRO #elif defined(_PR_PTHREADS) #define _PUT_LOG(fd, buf, nb) PR_Write(fd, buf, nb) #else @@ -145,6 +127,7 @@ static FILE *logFile = NULL; static PRFileDesc *logFile = 0; #endif static PRBool outputTimeStamp = PR_FALSE; +static PRBool appendToLog = PR_FALSE; #define LINE_BUF_SIZE 512 #define DEFAULT_BUF_SIZE 16384 @@ -232,6 +215,8 @@ void _PR_InitLog(void) } } else if (strcasecmp(module, "timestamp") == 0) { outputTimeStamp = PR_TRUE; + } else if (strcasecmp(module, "append") == 0) { + appendToLog = PR_TRUE; } else { PRLogModuleInfo *lm = logModules; PRBool skip_modcheck = @@ -390,7 +375,8 @@ PR_IMPLEMENT(PRBool) PR_SetLogFile(const char *file) else #endif { - newLogFile = fopen(file, "w"); + const char *mode = appendToLog ? "a" : "w"; + newLogFile = fopen(file, mode); if (!newLogFile) return PR_FALSE; @@ -412,8 +398,14 @@ PR_IMPLEMENT(PRBool) PR_SetLogFile(const char *file) return PR_TRUE; #else PRFileDesc *newLogFile; + PRIntn flags = PR_WRONLY|PR_CREATE_FILE; + if (appendToLog) { + flags |= PR_APPEND; + } else { + flags |= PR_TRUNCATE; + } - newLogFile = PR_Open(file, PR_WRONLY|PR_CREATE_FILE|PR_TRUNCATE, 0666); + newLogFile = PR_Open(file, flags, 0666); if (newLogFile) { if (logFile && logFile != _pr_stdout && logFile != _pr_stderr) { PR_Close(logFile); @@ -551,9 +543,8 @@ PR_IMPLEMENT(void) PR_Abort(void) PR_IMPLEMENT(void) PR_Assert(const char *s, const char *file, PRIntn ln) { PR_LogPrint("Assertion failure: %s, at %s:%d\n", s, file, ln); -#if defined(XP_UNIX) || defined(XP_OS2) || defined(XP_BEOS) fprintf(stderr, "Assertion failure: %s, at %s:%d\n", s, file, ln); -#endif + fflush(stderr); #ifdef WIN32 DebugBreak(); #endif diff --git a/pr/src/io/prmapopt.c b/pr/src/io/prmapopt.c index 04501b02..bcde5670 100644 --- a/pr/src/io/prmapopt.c +++ b/pr/src/io/prmapopt.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /* * This file defines _PR_MapOptionName(). The purpose of putting diff --git a/pr/src/io/prmmap.c b/pr/src/io/prmmap.c index e5c1e5dc..d22ba399 100644 --- a/pr/src/io/prmmap.c +++ b/pr/src/io/prmmap.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /* ********************************************************************* diff --git a/pr/src/io/prmwait.c b/pr/src/io/prmwait.c index 5b30f694..78813c46 100644 --- a/pr/src/io/prmwait.c +++ b/pr/src/io/prmwait.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "primpl.h" #include "pprmwait.h" diff --git a/pr/src/io/prpolevt.c b/pr/src/io/prpolevt.c index f94190d8..ac3eb101 100644 --- a/pr/src/io/prpolevt.c +++ b/pr/src/io/prpolevt.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /* ********************************************************************* diff --git a/pr/src/io/prprf.c b/pr/src/io/prprf.c index 8dda74ce..aa7852ff 100644 --- a/pr/src/io/prprf.c +++ b/pr/src/io/prprf.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /* ** Portable safe sprintf code. @@ -86,6 +54,9 @@ struct NumArg { double d; const char *s; int *ip; +#ifdef WIN32 + const WCHAR *ws; +#endif } u; }; @@ -103,6 +74,9 @@ struct NumArg { #define TYPE_STRING 8 #define TYPE_DOUBLE 9 #define TYPE_INTSTR 10 +#ifdef WIN32 +#define TYPE_WSTRING 11 +#endif #define TYPE_UNKNOWN 20 #define FLAG_LEFT 0x1 @@ -573,8 +547,12 @@ static struct NumArg* BuildArgArray( const char *fmt, va_list ap, int* rv, struc } break; - case 'C': case 'S': +#ifdef WIN32 + nas[ cn ].type = TYPE_WSTRING; + break; +#endif + case 'C': case 'E': case 'G': /* XXX not supported I suppose */ @@ -653,6 +631,12 @@ static struct NumArg* BuildArgArray( const char *fmt, va_list ap, int* rv, struc nas[cn].u.s = va_arg( ap, char* ); break; +#ifdef WIN32 + case TYPE_WSTRING: + nas[cn].u.ws = va_arg( ap, WCHAR* ); + break; +#endif + case TYPE_INTSTR: nas[cn].u.ip = va_arg( ap, int* ); break; @@ -690,6 +674,9 @@ static int dosprintf(SprintfState *ss, const char *fmt, va_list ap) double d; const char *s; int *ip; +#ifdef WIN32 + const WCHAR *ws; +#endif } u; const char *fmt0; static char *hex = "0123456789abcdef"; @@ -701,7 +688,9 @@ static int dosprintf(SprintfState *ss, const char *fmt, va_list ap) struct NumArg nasArray[ NAS_DEFAULT_NUM ]; char pattern[20]; const char* dolPt = NULL; /* in "%4$.2f", dolPt will point to . */ - +#ifdef WIN32 + char *pBuf = NULL; +#endif /* ** build an argument array, IF the fmt is numbered argument @@ -965,9 +954,15 @@ static int dosprintf(SprintfState *ss, const char *fmt, va_list ap) radix = 16; goto fetch_and_convert; +#ifndef WIN32 + case 'S': + /* XXX not supported I suppose */ + PR_ASSERT(0); + break; +#endif + #if 0 case 'C': - case 'S': case 'E': case 'G': /* XXX not supported I suppose */ @@ -975,6 +970,29 @@ static int dosprintf(SprintfState *ss, const char *fmt, va_list ap) break; #endif +#ifdef WIN32 + case 'S': + u.ws = nas ? nap->u.ws : va_arg(ap, const WCHAR*); + + /* Get the required size in rv */ + rv = WideCharToMultiByte(CP_ACP, 0, u.ws, -1, NULL, 0, NULL, NULL); + if (rv == 0) + rv = 1; + pBuf = PR_MALLOC(rv); + WideCharToMultiByte(CP_ACP, 0, u.ws, -1, pBuf, (int)rv, NULL, NULL); + pBuf[rv-1] = '\0'; + + rv = cvt_s(ss, pBuf, width, prec, flags); + + /* We don't need the allocated buffer anymore */ + PR_Free(pBuf); + if (rv < 0) { + return rv; + } + break; + +#endif + case 's': u.s = nas ? nap->u.s : va_arg(ap, const char*); rv = cvt_s(ss, u.s, width, prec, flags); diff --git a/pr/src/io/prscanf.c b/pr/src/io/prscanf.c index 618f184f..357cc4ea 100644 --- a/pr/src/io/prscanf.c +++ b/pr/src/io/prscanf.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /* * Scan functions for NSPR types diff --git a/pr/src/io/prsocket.c b/pr/src/io/prsocket.c index 8b4ef269..ed7b4e43 100644 --- a/pr/src/io/prsocket.c +++ b/pr/src/io/prsocket.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "primpl.h" diff --git a/pr/src/io/prstdio.c b/pr/src/io/prstdio.c index b8a091f5..74b85d9c 100644 --- a/pr/src/io/prstdio.c +++ b/pr/src/io/prstdio.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "primpl.h" diff --git a/pr/src/linking/Makefile.in b/pr/src/linking/Makefile.in index 9b82aca2..128435fa 100644 --- a/pr/src/linking/Makefile.in +++ b/pr/src/linking/Makefile.in @@ -1,39 +1,7 @@ # -# ***** BEGIN LICENSE BLOCK ***** -# Version: MPL 1.1/GPL 2.0/LGPL 2.1 -# -# The contents of this file are subject to the Mozilla Public License Version -# 1.1 (the "License"); you may not use this file except in compliance with -# the License. You may obtain a copy of the License at -# http://www.mozilla.org/MPL/ -# -# Software distributed under the License is distributed on an "AS IS" basis, -# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License -# for the specific language governing rights and limitations under the -# License. -# -# The Original Code is the Netscape Portable Runtime (NSPR). -# -# The Initial Developer of the Original Code is -# Netscape Communications Corporation. -# Portions created by the Initial Developer are Copyright (C) 1998-2000 -# the Initial Developer. All Rights Reserved. -# -# Contributor(s): -# -# Alternatively, the contents of this file may be used under the terms of -# either the GNU General Public License Version 2 or later (the "GPL"), or -# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), -# in which case the provisions of the GPL or the LGPL are applicable instead -# of those above. If you wish to allow use of your version of this file only -# under the terms of either the GPL or the LGPL, and not to allow others to -# use your version of this file under the terms of the MPL, indicate your -# decision by deleting the provisions above and replace them with the notice -# and other provisions required by the GPL or the LGPL. If you do not delete -# the provisions above, a recipient may use your version of this file under -# the terms of any one of the MPL, the GPL or the LGPL. -# -# ***** END LICENSE BLOCK ***** +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. #! gmake @@ -62,11 +30,6 @@ TARGETS = $(OBJS) INCLUDES = -I$(dist_includedir) -I$(topsrcdir)/pr/include -I$(topsrcdir)/pr/include/private -# On Mac OS X use flat #includes. -ifeq ($(OS_TARGET),MacOSX) -INCLUDES += -I$(MACOS_SDK_DIR)/Developer/Headers/FlatCarbon -endif - DEFINES += -D_NSPR_BUILD_ include $(topsrcdir)/config/rules.mk diff --git a/pr/src/linking/prlink.c b/pr/src/linking/prlink.c index 873c5e85..c5ea63fc 100644 --- a/pr/src/linking/prlink.c +++ b/pr/src/linking/prlink.c @@ -1,40 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * Steve Streeter (Hewlett-Packard Company) - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "primpl.h" @@ -45,15 +12,8 @@ #endif #if defined(XP_MACOSX) && defined(USE_MACH_DYLD) -#include <CodeFragments.h> -#include <TextUtils.h> -#include <Types.h> -#include <Aliases.h> -#include <CFURL.h> -#include <CFBundle.h> -#include <CFString.h> -#include <CFDictionary.h> -#include <CFData.h> +#include <Carbon/Carbon.h> +#include <CoreFoundation/CoreFoundation.h> #endif #ifdef XP_UNIX @@ -205,7 +165,7 @@ void _PR_InitLinker(void) #elif defined(XP_UNIX) #ifdef HAVE_DLL -#ifdef USE_DLFCN +#if defined(USE_DLFCN) && !defined(NO_DLOPEN_NULL) h = dlopen(0, RTLD_LAZY); if (!h) { char *error; @@ -221,8 +181,8 @@ void _PR_InitLinker(void) #elif defined(USE_HPSHL) h = NULL; /* don't abort with this NULL */ -#elif defined(USE_MACH_DYLD) - h = NULL; /* XXXX toshok */ +#elif defined(USE_MACH_DYLD) || defined(NO_DLOPEN_NULL) + h = NULL; /* XXXX toshok */ /* XXXX vlad */ #else #error no dll strategy #endif /* USE_DLFCN */ @@ -492,10 +452,16 @@ pr_LoadMachDyldModule(const char *name) == NSObjectFileImageSuccess) { h = NSLinkModule(ofi, name, NSLINKMODULE_OPTION_PRIVATE | NSLINKMODULE_OPTION_RETURN_ON_ERROR); - /* - * TODO: If NSLinkModule fails, use NSLinkEditError to retrieve - * error information. - */ + if (h == NULL) { + NSLinkEditErrors linkEditError; + int errorNum; + const char *fileName; + const char *errorString; + NSLinkEditError(&linkEditError, &errorNum, &fileName, &errorString); + PR_LOG(_pr_linker_lm, PR_LOG_MIN, + ("LoadMachDyldModule error %d:%d for file %s:\n%s", + linkEditError, errorNum, fileName, errorString)); + } if (NSDestroyObjectFileImage(ofi) == FALSE) { if (h) { (void)NSUnLinkModule(h, NSUNLINKMODULE_OPTION_NONE); @@ -655,8 +621,8 @@ pr_LoadViaDyld(const char *name, PRLibrary *lm) if (lm->image == NULL) { NSLinkEditErrors linkEditError; int errorNum; - const char *errorString; const char *fileName; + const char *errorString; NSLinkEditError(&linkEditError, &errorNum, &fileName, &errorString); PR_LOG(_pr_linker_lm, PR_LOG_MIN, ("LoadMachDyldModule error %d:%d for file %s:\n%s", @@ -1361,9 +1327,7 @@ PR_LoadStaticLibrary(const char *name, const PRStaticLinkTable *slt) PR_IMPLEMENT(char *) PR_GetLibraryFilePathname(const char *name, PRFuncPtr addr) { -#if defined(USE_DLFCN) && (defined(SOLARIS) || defined(FREEBSD) \ - || defined(LINUX) || defined(__GNU__) || defined(__GLIBC__) \ - || defined(DARWIN)) +#if defined(USE_DLFCN) && defined(HAVE_DLADDR) Dl_info dli; char *result; diff --git a/pr/src/malloc/Makefile.in b/pr/src/malloc/Makefile.in index 981ec462..4a71b541 100644 --- a/pr/src/malloc/Makefile.in +++ b/pr/src/malloc/Makefile.in @@ -1,39 +1,7 @@ # -# ***** BEGIN LICENSE BLOCK ***** -# Version: MPL 1.1/GPL 2.0/LGPL 2.1 -# -# The contents of this file are subject to the Mozilla Public License Version -# 1.1 (the "License"); you may not use this file except in compliance with -# the License. You may obtain a copy of the License at -# http://www.mozilla.org/MPL/ -# -# Software distributed under the License is distributed on an "AS IS" basis, -# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License -# for the specific language governing rights and limitations under the -# License. -# -# The Original Code is the Netscape Portable Runtime (NSPR). -# -# The Initial Developer of the Original Code is -# Netscape Communications Corporation. -# Portions created by the Initial Developer are Copyright (C) 1998-2000 -# the Initial Developer. All Rights Reserved. -# -# Contributor(s): -# -# Alternatively, the contents of this file may be used under the terms of -# either the GNU General Public License Version 2 or later (the "GPL"), or -# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), -# in which case the provisions of the GPL or the LGPL are applicable instead -# of those above. If you wish to allow use of your version of this file only -# under the terms of either the GPL or the LGPL, and not to allow others to -# use your version of this file under the terms of the MPL, indicate your -# decision by deleting the provisions above and replace them with the notice -# and other provisions required by the GPL or the LGPL. If you do not delete -# the provisions above, a recipient may use your version of this file under -# the terms of any one of the MPL, the GPL or the LGPL. -# -# ***** END LICENSE BLOCK ***** +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. #! gmake diff --git a/pr/src/malloc/prmalloc.c b/pr/src/malloc/prmalloc.c index 10e9cf78..174d0daf 100644 --- a/pr/src/malloc/prmalloc.c +++ b/pr/src/malloc/prmalloc.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "primpl.h" diff --git a/pr/src/malloc/prmem.c b/pr/src/malloc/prmem.c index 73fa59bc..e4ae42a9 100644 --- a/pr/src/malloc/prmem.c +++ b/pr/src/malloc/prmem.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /* ** Thread safe versions of malloc, free, realloc, calloc and cfree. @@ -117,7 +85,7 @@ _PR_DestroyZones(void) #ifdef HAVE_DLL -#ifdef USE_DLFCN +#if defined(USE_DLFCN) && !defined(NO_DLOPEN_NULL) #include <dlfcn.h> @@ -150,7 +118,7 @@ pr_FindSymbolInProg(const char *name) return sym; } -#elif defined(USE_MACH_DYLD) +#elif defined(USE_MACH_DYLD) || defined(NO_DLOPEN_NULL) static void * pr_FindSymbolInProg(const char *name) diff --git a/pr/src/md/Makefile.in b/pr/src/md/Makefile.in index 2b8d4778..e72bc65a 100644 --- a/pr/src/md/Makefile.in +++ b/pr/src/md/Makefile.in @@ -1,39 +1,7 @@ # -# ***** BEGIN LICENSE BLOCK ***** -# Version: MPL 1.1/GPL 2.0/LGPL 2.1 -# -# The contents of this file are subject to the Mozilla Public License Version -# 1.1 (the "License"); you may not use this file except in compliance with -# the License. You may obtain a copy of the License at -# http://www.mozilla.org/MPL/ -# -# Software distributed under the License is distributed on an "AS IS" basis, -# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License -# for the specific language governing rights and limitations under the -# License. -# -# The Original Code is the Netscape Portable Runtime (NSPR). -# -# The Initial Developer of the Original Code is -# Netscape Communications Corporation. -# Portions created by the Initial Developer are Copyright (C) 1998-2000 -# the Initial Developer. All Rights Reserved. -# -# Contributor(s): -# -# Alternatively, the contents of this file may be used under the terms of -# either the GNU General Public License Version 2 or later (the "GPL"), or -# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), -# in which case the provisions of the GPL or the LGPL are applicable instead -# of those above. If you wish to allow use of your version of this file only -# under the terms of either the GPL or the LGPL, and not to allow others to -# use your version of this file under the terms of the MPL, indicate your -# decision by deleting the provisions above and replace them with the notice -# and other provisions required by the GPL or the LGPL. If you do not delete -# the provisions above, a recipient may use your version of this file under -# the terms of any one of the MPL, the GPL or the LGPL. -# -# ***** END LICENSE BLOCK ***** +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. #! gmake diff --git a/pr/src/md/beos/Makefile.in b/pr/src/md/beos/Makefile.in index fca5cf2c..340f144a 100644 --- a/pr/src/md/beos/Makefile.in +++ b/pr/src/md/beos/Makefile.in @@ -1,39 +1,7 @@ # -# ***** BEGIN LICENSE BLOCK ***** -# Version: MPL 1.1/GPL 2.0/LGPL 2.1 -# -# The contents of this file are subject to the Mozilla Public License Version -# 1.1 (the "License"); you may not use this file except in compliance with -# the License. You may obtain a copy of the License at -# http://www.mozilla.org/MPL/ -# -# Software distributed under the License is distributed on an "AS IS" basis, -# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License -# for the specific language governing rights and limitations under the -# License. -# -# The Original Code is the Netscape Portable Runtime (NSPR). -# -# The Initial Developer of the Original Code is -# Netscape Communications Corporation. -# Portions created by the Initial Developer are Copyright (C) 1998-2000 -# the Initial Developer. All Rights Reserved. -# -# Contributor(s): -# -# Alternatively, the contents of this file may be used under the terms of -# either the GNU General Public License Version 2 or later (the "GPL"), or -# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), -# in which case the provisions of the GPL or the LGPL are applicable instead -# of those above. If you wish to allow use of your version of this file only -# under the terms of either the GPL or the LGPL, and not to allow others to -# use your version of this file under the terms of the MPL, indicate your -# decision by deleting the provisions above and replace them with the notice -# and other provisions required by the GPL or the LGPL. If you do not delete -# the provisions above, a recipient may use your version of this file under -# the terms of any one of the MPL, the GPL or the LGPL. -# -# ***** END LICENSE BLOCK ***** +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. MOD_DEPTH = ../../../.. diff --git a/pr/src/md/beos/bcpu.c b/pr/src/md/beos/bcpu.c index 548df8c2..6c253865 100644 --- a/pr/src/md/beos/bcpu.c +++ b/pr/src/md/beos/bcpu.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; c-basic-offset: 4 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "primpl.h" diff --git a/pr/src/md/beos/beos.c b/pr/src/md/beos/beos.c index dba9ae24..a1df7d2f 100644 --- a/pr/src/md/beos/beos.c +++ b/pr/src/md/beos/beos.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "primpl.h" diff --git a/pr/src/md/beos/beos_errors.c b/pr/src/md/beos/beos_errors.c index bfb44eb7..4e37a269 100644 --- a/pr/src/md/beos/beos_errors.c +++ b/pr/src/md/beos/beos_errors.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "prtypes.h" #include "md/_unix_errors.h" diff --git a/pr/src/md/beos/bfile.c b/pr/src/md/beos/bfile.c index 4ab02d06..89fea29a 100644 --- a/pr/src/md/beos/bfile.c +++ b/pr/src/md/beos/bfile.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 8; c-basic-offset: 8 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "primpl.h" diff --git a/pr/src/md/beos/bmemory.c b/pr/src/md/beos/bmemory.c index 17c73325..fb906f0f 100644 --- a/pr/src/md/beos/bmemory.c +++ b/pr/src/md/beos/bmemory.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; c-basic-offset: 4 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "primpl.h" diff --git a/pr/src/md/beos/bmisc.c b/pr/src/md/beos/bmisc.c index 429cd7be..4bdad411 100644 --- a/pr/src/md/beos/bmisc.c +++ b/pr/src/md/beos/bmisc.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; c-basic-offset: 4 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "primpl.h" diff --git a/pr/src/md/beos/bmmap.c b/pr/src/md/beos/bmmap.c index 9edd0673..a9b3ac58 100644 --- a/pr/src/md/beos/bmmap.c +++ b/pr/src/md/beos/bmmap.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; c-basic-offset: 4 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "primpl.h" diff --git a/pr/src/md/beos/bnet.c b/pr/src/md/beos/bnet.c index d0975ed4..8bfd4aea 100644 --- a/pr/src/md/beos/bnet.c +++ b/pr/src/md/beos/bnet.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; c-basic-offset: 4 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "primpl.h" diff --git a/pr/src/md/beos/bproc.c b/pr/src/md/beos/bproc.c index dd24871b..30ac5699 100644 --- a/pr/src/md/beos/bproc.c +++ b/pr/src/md/beos/bproc.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 8; c-basic-offset: 8 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "primpl.h" #include <stdio.h> diff --git a/pr/src/md/beos/brng.c b/pr/src/md/beos/brng.c index 2d1b8516..18a3bbf1 100644 --- a/pr/src/md/beos/brng.c +++ b/pr/src/md/beos/brng.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1999-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include <stdio.h> diff --git a/pr/src/md/beos/bseg.c b/pr/src/md/beos/bseg.c index b6b3b67b..e7bb9b3d 100644 --- a/pr/src/md/beos/bseg.c +++ b/pr/src/md/beos/bseg.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; c-basic-offset: 4 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "primpl.h" diff --git a/pr/src/md/beos/bsrcs.mk b/pr/src/md/beos/bsrcs.mk index c6eb6fe1..94424537 100644 --- a/pr/src/md/beos/bsrcs.mk +++ b/pr/src/md/beos/bsrcs.mk @@ -1,39 +1,7 @@ # -# ***** BEGIN LICENSE BLOCK ***** -# Version: MPL 1.1/GPL 2.0/LGPL 2.1 -# -# The contents of this file are subject to the Mozilla Public License Version -# 1.1 (the "License"); you may not use this file except in compliance with -# the License. You may obtain a copy of the License at -# http://www.mozilla.org/MPL/ -# -# Software distributed under the License is distributed on an "AS IS" basis, -# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License -# for the specific language governing rights and limitations under the -# License. -# -# The Original Code is the Netscape Portable Runtime (NSPR). -# -# The Initial Developer of the Original Code is -# Netscape Communications Corporation. -# Portions created by the Initial Developer are Copyright (C) 1998-2000 -# the Initial Developer. All Rights Reserved. -# -# Contributor(s): -# -# Alternatively, the contents of this file may be used under the terms of -# either the GNU General Public License Version 2 or later (the "GPL"), or -# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), -# in which case the provisions of the GPL or the LGPL are applicable instead -# of those above. If you wish to allow use of your version of this file only -# under the terms of either the GPL or the LGPL, and not to allow others to -# use your version of this file under the terms of the MPL, indicate your -# decision by deleting the provisions above and replace them with the notice -# and other provisions required by the GPL or the LGPL. If you do not delete -# the provisions above, a recipient may use your version of this file under -# the terms of any one of the MPL, the GPL or the LGPL. -# -# ***** END LICENSE BLOCK ***** +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. # this file lists the source files to be compiled (used in Makefile) and diff --git a/pr/src/md/beos/btime.c b/pr/src/md/beos/btime.c index aaaa9d27..b6e02fc7 100644 --- a/pr/src/md/beos/btime.c +++ b/pr/src/md/beos/btime.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; c-basic-offset: 4 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "primpl.h" #include <kernel/OS.h> diff --git a/pr/src/md/beos/objs.mk b/pr/src/md/beos/objs.mk index 163c5d9c..8727ee0e 100644 --- a/pr/src/md/beos/objs.mk +++ b/pr/src/md/beos/objs.mk @@ -1,39 +1,7 @@ # -# ***** BEGIN LICENSE BLOCK ***** -# Version: MPL 1.1/GPL 2.0/LGPL 2.1 -# -# The contents of this file are subject to the Mozilla Public License Version -# 1.1 (the "License"); you may not use this file except in compliance with -# the License. You may obtain a copy of the License at -# http://www.mozilla.org/MPL/ -# -# Software distributed under the License is distributed on an "AS IS" basis, -# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License -# for the specific language governing rights and limitations under the -# License. -# -# The Original Code is the Netscape Portable Runtime (NSPR). -# -# The Initial Developer of the Original Code is -# Netscape Communications Corporation. -# Portions created by the Initial Developer are Copyright (C) 1998-2000 -# the Initial Developer. All Rights Reserved. -# -# Contributor(s): -# -# Alternatively, the contents of this file may be used under the terms of -# either the GNU General Public License Version 2 or later (the "GPL"), or -# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), -# in which case the provisions of the GPL or the LGPL are applicable instead -# of those above. If you wish to allow use of your version of this file only -# under the terms of either the GPL or the LGPL, and not to allow others to -# use your version of this file under the terms of the MPL, indicate your -# decision by deleting the provisions above and replace them with the notice -# and other provisions required by the GPL or the LGPL. If you do not delete -# the provisions above, a recipient may use your version of this file under -# the terms of any one of the MPL, the GPL or the LGPL. -# -# ***** END LICENSE BLOCK ***** +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. # This makefile appends to the variable OBJS the platform-dependent # object modules that will be part of the nspr20 library. diff --git a/pr/src/md/os2/Makefile.in b/pr/src/md/os2/Makefile.in index 4b00af9f..9a7648ef 100644 --- a/pr/src/md/os2/Makefile.in +++ b/pr/src/md/os2/Makefile.in @@ -1,39 +1,7 @@ # -# ***** BEGIN LICENSE BLOCK ***** -# Version: MPL 1.1/GPL 2.0/LGPL 2.1 -# -# The contents of this file are subject to the Mozilla Public License Version -# 1.1 (the "License"); you may not use this file except in compliance with -# the License. You may obtain a copy of the License at -# http://www.mozilla.org/MPL/ -# -# Software distributed under the License is distributed on an "AS IS" basis, -# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License -# for the specific language governing rights and limitations under the -# License. -# -# The Original Code is the Netscape Portable Runtime (NSPR). -# -# The Initial Developer of the Original Code is -# Netscape Communications Corporation. -# Portions created by the Initial Developer are Copyright (C) 1998-2000 -# the Initial Developer. All Rights Reserved. -# -# Contributor(s): -# -# Alternatively, the contents of this file may be used under the terms of -# either the GNU General Public License Version 2 or later (the "GPL"), or -# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), -# in which case the provisions of the GPL or the LGPL are applicable instead -# of those above. If you wish to allow use of your version of this file only -# under the terms of either the GPL or the LGPL, and not to allow others to -# use your version of this file under the terms of the MPL, indicate your -# decision by deleting the provisions above and replace them with the notice -# and other provisions required by the GPL or the LGPL. If you do not delete -# the provisions above, a recipient may use your version of this file under -# the terms of any one of the MPL, the GPL or the LGPL. -# -# ***** END LICENSE BLOCK ***** +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. #! gmake diff --git a/pr/src/md/os2/objs.mk b/pr/src/md/os2/objs.mk index 05abac86..c1a40e3f 100644 --- a/pr/src/md/os2/objs.mk +++ b/pr/src/md/os2/objs.mk @@ -1,39 +1,7 @@ # -# ***** BEGIN LICENSE BLOCK ***** -# Version: MPL 1.1/GPL 2.0/LGPL 2.1 -# -# The contents of this file are subject to the Mozilla Public License Version -# 1.1 (the "License"); you may not use this file except in compliance with -# the License. You may obtain a copy of the License at -# http://www.mozilla.org/MPL/ -# -# Software distributed under the License is distributed on an "AS IS" basis, -# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License -# for the specific language governing rights and limitations under the -# License. -# -# The Original Code is the Netscape Portable Runtime (NSPR). -# -# The Initial Developer of the Original Code is -# Netscape Communications Corporation. -# Portions created by the Initial Developer are Copyright (C) 1998-2000 -# the Initial Developer. All Rights Reserved. -# -# Contributor(s): -# -# Alternatively, the contents of this file may be used under the terms of -# either the GNU General Public License Version 2 or later (the "GPL"), or -# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), -# in which case the provisions of the GPL or the LGPL are applicable instead -# of those above. If you wish to allow use of your version of this file only -# under the terms of either the GPL or the LGPL, and not to allow others to -# use your version of this file under the terms of the MPL, indicate your -# decision by deleting the provisions above and replace them with the notice -# and other provisions required by the GPL or the LGPL. If you do not delete -# the provisions above, a recipient may use your version of this file under -# the terms of any one of the MPL, the GPL or the LGPL. -# -# ***** END LICENSE BLOCK ***** +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. # This makefile appends to the variable OBJS the platform-dependent # object modules that will be part of the nspr20 library. diff --git a/pr/src/md/os2/os2_errors.c b/pr/src/md/os2/os2_errors.c index 37d0ff85..98f5cde5 100644 --- a/pr/src/md/os2/os2_errors.c +++ b/pr/src/md/os2/os2_errors.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "prerror.h" #include "primpl.h" diff --git a/pr/src/md/os2/os2cv.c b/pr/src/md/os2/os2cv.c index 33e33530..2c424c50 100644 --- a/pr/src/md/os2/os2cv.c +++ b/pr/src/md/os2/os2cv.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /* * os2cv.c -- OS/2 Machine-Dependent Code for Condition Variables diff --git a/pr/src/md/os2/os2emx.s b/pr/src/md/os2/os2emx.s index 3efd68ce..ef18e3bb 100644 --- a/pr/src/md/os2/os2emx.s +++ b/pr/src/md/os2/os2emx.s @@ -1,40 +1,8 @@ / -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- / -/ ***** BEGIN LICENSE BLOCK ***** -/ Version: MPL 1.1/GPL 2.0/LGPL 2.1 -/ -/ The contents of this file are subject to the Mozilla Public License Version -/ 1.1 (the "License"); you may not use this file except in compliance with -/ the License. You may obtain a copy of the License at -/ http://www.mozilla.org/MPL/ -/ -/ Software distributed under the License is distributed on an "AS IS" basis, -/ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License -/ for the specific language governing rights and limitations under the -/ License. -/ -/ The Original Code is the Netscape Portable Runtime (NSPR). -/ -/ The Initial Developer of the Original Code is -/ Netscape Communications Corporation. -/ Portions created by the Initial Developer are Copyright (C) 2000 -/ the Initial Developer. All Rights Reserved. -/ -/ Contributor(s): -/ -/ Alternatively, the contents of this file may be used under the terms of -/ either the GNU General Public License Version 2 or later (the "GPL"), or -/ the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), -/ in which case the provisions of the GPL or the LGPL are applicable instead -/ of those above. If you wish to allow use of your version of this file only -/ under the terms of either the GPL or the LGPL, and not to allow others to -/ use your version of this file under the terms of the MPL, indicate your -/ decision by deleting the provisions above and replace them with the notice -/ and other provisions required by the GPL or the LGPL. If you do not delete -/ the provisions above, a recipient may use your version of this file under -/ the terms of any one of the MPL, the GPL or the LGPL. -/ -/ ***** END LICENSE BLOCK ***** +/ This Source Code Form is subject to the terms of the Mozilla Public +/ License, v. 2.0. If a copy of the MPL was not distributed with this +/ file, You can obtain one at http://mozilla.org/MPL/2.0/. / PRInt32 __PR_MD_ATOMIC_INCREMENT(PRInt32 *val) / diff --git a/pr/src/md/os2/os2gc.c b/pr/src/md/os2/os2gc.c index d9f76466..2bcbf785 100644 --- a/pr/src/md/os2/os2gc.c +++ b/pr/src/md/os2/os2gc.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /* * GC related routines diff --git a/pr/src/md/os2/os2inrval.c b/pr/src/md/os2/os2inrval.c index 4006f5f2..aff99e2e 100644 --- a/pr/src/md/os2/os2inrval.c +++ b/pr/src/md/os2/os2inrval.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /* * OS/2 interval timers diff --git a/pr/src/md/os2/os2io.c b/pr/src/md/os2/os2io.c index 143698f8..3c81ae34 100644 --- a/pr/src/md/os2/os2io.c +++ b/pr/src/md/os2/os2io.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /* OS2 IO module * diff --git a/pr/src/md/os2/os2misc.c b/pr/src/md/os2/os2misc.c index 05e0f2f0..f0e3ceea 100644 --- a/pr/src/md/os2/os2misc.c +++ b/pr/src/md/os2/os2misc.c @@ -1,41 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * Davide Bresolin <davide@teamos2.it> - * Rich Walsh <dragtext@e-vertise.com> - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /* * os2misc.c diff --git a/pr/src/md/os2/os2poll.c b/pr/src/md/os2/os2poll.c index 6432032c..9a0a0095 100644 --- a/pr/src/md/os2/os2poll.c +++ b/pr/src/md/os2/os2poll.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /* * This file implements _PR_MD_PR_POLL for OS/2. diff --git a/pr/src/md/os2/os2rng.c b/pr/src/md/os2/os2rng.c index 1c3a7b7a..72f7357f 100644 --- a/pr/src/md/os2/os2rng.c +++ b/pr/src/md/os2/os2rng.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1999-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #define INCL_DOS diff --git a/pr/src/md/os2/os2sem.c b/pr/src/md/os2/os2sem.c index 20b57a82..b60f35a7 100644 --- a/pr/src/md/os2/os2sem.c +++ b/pr/src/md/os2/os2sem.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /* * OS/2-specific semaphore handling code. diff --git a/pr/src/md/os2/os2sock.c b/pr/src/md/os2/os2sock.c index 6a7e3dc2..b32794f3 100644 --- a/pr/src/md/os2/os2sock.c +++ b/pr/src/md/os2/os2sock.c @@ -1,40 +1,8 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /* OS/2 Sockets module * diff --git a/pr/src/md/os2/os2thred.c b/pr/src/md/os2/os2thred.c index dcd3e936..b918a741 100644 --- a/pr/src/md/os2/os2thred.c +++ b/pr/src/md/os2/os2thred.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "primpl.h" #include <process.h> /* for _beginthread() */ diff --git a/pr/src/md/os2/os2vaclegacy.s b/pr/src/md/os2/os2vaclegacy.s index 3bf8e80c..3dc14687 100644 --- a/pr/src/md/os2/os2vaclegacy.s +++ b/pr/src/md/os2/os2vaclegacy.s @@ -1,41 +1,8 @@ / -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- / -/ ***** BEGIN LICENSE BLOCK ***** -/ Version: MPL 1.1/GPL 2.0/LGPL 2.1 -/ -/ The contents of this file are subject to the Mozilla Public License Version -/ 1.1 (the "License"); you may not use this file except in compliance with -/ the License. You may obtain a copy of the License at -/ http://www.mozilla.org/MPL/ -/ -/ Software distributed under the License is distributed on an "AS IS" basis, -/ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License -/ for the specific language governing rights and limitations under the -/ License. -/ -/ The Original Code is the Netscape Portable Runtime (NSPR). -/ -/ The Initial Developer of the Original Code is -/ InnoTek Systemberatung GmbH. -/ Portions created by the Initial Developer are Copyright (C) 2003 -/ the Initial Developer. All Rights Reserved. -/ -/ Contributor(s): -/ InnoTek Systemberatung GmbH / Knut St. Osmundsen -/ -/ Alternatively, the contents of this file may be used under the terms of -/ either the GNU General Public License Version 2 or later (the "GPL"), or -/ the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), -/ in which case the provisions of the GPL or the LGPL are applicable instead -/ of those above. If you wish to allow use of your version of this file only -/ under the terms of either the GPL or the LGPL, and not to allow others to -/ use your version of this file under the terms of the MPL, indicate your -/ decision by deleting the provisions above and replace them with the notice -/ and other provisions required by the GPL or the LGPL. If you do not delete -/ the provisions above, a recipient may use your version of this file under -/ the terms of any one of the MPL, the GPL or the LGPL. -/ -/ ***** END LICENSE BLOCK ***** +/ This Source Code Form is subject to the terms of the Mozilla Public +/ License, v. 2.0. If a copy of the MPL was not distributed with this +/ file, You can obtain one at http://mozilla.org/MPL/2.0/. .text .align 4 diff --git a/pr/src/md/prosdep.c b/pr/src/md/prosdep.c index d80256a4..8df1b69a 100644 --- a/pr/src/md/prosdep.c +++ b/pr/src/md/prosdep.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "prbit.h" #include "prsystem.h" diff --git a/pr/src/md/unix/Makefile.in b/pr/src/md/unix/Makefile.in index 5599ce7d..403abe9e 100644 --- a/pr/src/md/unix/Makefile.in +++ b/pr/src/md/unix/Makefile.in @@ -1,39 +1,7 @@ # -# ***** BEGIN LICENSE BLOCK ***** -# Version: MPL 1.1/GPL 2.0/LGPL 2.1 -# -# The contents of this file are subject to the Mozilla Public License Version -# 1.1 (the "License"); you may not use this file except in compliance with -# the License. You may obtain a copy of the License at -# http://www.mozilla.org/MPL/ -# -# Software distributed under the License is distributed on an "AS IS" basis, -# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License -# for the specific language governing rights and limitations under the -# License. -# -# The Original Code is the Netscape Portable Runtime (NSPR). -# -# The Initial Developer of the Original Code is -# Netscape Communications Corporation. -# Portions created by the Initial Developer are Copyright (C) 1998-2000 -# the Initial Developer. All Rights Reserved. -# -# Contributor(s): -# -# Alternatively, the contents of this file may be used under the terms of -# either the GNU General Public License Version 2 or later (the "GPL"), or -# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), -# in which case the provisions of the GPL or the LGPL are applicable instead -# of those above. If you wish to allow use of your version of this file only -# under the terms of either the GPL or the LGPL, and not to allow others to -# use your version of this file under the terms of the MPL, indicate your -# decision by deleting the provisions above and replace them with the notice -# and other provisions required by the GPL or the LGPL. If you do not delete -# the provisions above, a recipient may use your version of this file under -# the terms of any one of the MPL, the GPL or the LGPL. -# -# ***** END LICENSE BLOCK ***** +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. MOD_DEPTH = ../../../.. diff --git a/pr/src/md/unix/aix.c b/pr/src/md/unix/aix.c index ae945b1b..43f0d58d 100644 --- a/pr/src/md/unix/aix.c +++ b/pr/src/md/unix/aix.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "primpl.h" diff --git a/pr/src/md/unix/aixwrap.c b/pr/src/md/unix/aixwrap.c index d829710a..cb5b413f 100644 --- a/pr/src/md/unix/aixwrap.c +++ b/pr/src/md/unix/aixwrap.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /* * File: aixwrap.c diff --git a/pr/src/md/unix/bsdi.c b/pr/src/md/unix/bsdi.c index 64676633..095547ed 100644 --- a/pr/src/md/unix/bsdi.c +++ b/pr/src/md/unix/bsdi.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "primpl.h" diff --git a/pr/src/md/unix/darwin.c b/pr/src/md/unix/darwin.c index 3a1329e7..98df03d4 100644 --- a/pr/src/md/unix/darwin.c +++ b/pr/src/md/unix/darwin.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "primpl.h" diff --git a/pr/src/md/unix/dgux.c b/pr/src/md/unix/dgux.c index 2874d9ea..a1b3602c 100644 --- a/pr/src/md/unix/dgux.c +++ b/pr/src/md/unix/dgux.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "primpl.h" diff --git a/pr/src/md/unix/freebsd.c b/pr/src/md/unix/freebsd.c index dce244a3..a66a8128 100644 --- a/pr/src/md/unix/freebsd.c +++ b/pr/src/md/unix/freebsd.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "primpl.h" diff --git a/pr/src/md/unix/hpux.c b/pr/src/md/unix/hpux.c index cf43e05e..56fddba2 100644 --- a/pr/src/md/unix/hpux.c +++ b/pr/src/md/unix/hpux.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "primpl.h" #include <setjmp.h> diff --git a/pr/src/md/unix/irix.c b/pr/src/md/unix/irix.c index 758e54d2..c57a07b3 100644 --- a/pr/src/md/unix/irix.c +++ b/pr/src/md/unix/irix.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "primpl.h" diff --git a/pr/src/md/unix/linux.c b/pr/src/md/unix/linux.c index c22618d7..1b485a02 100644 --- a/pr/src/md/unix/linux.c +++ b/pr/src/md/unix/linux.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "primpl.h" diff --git a/pr/src/md/unix/ncr.c b/pr/src/md/unix/ncr.c index 909b09e6..2710fc37 100644 --- a/pr/src/md/unix/ncr.c +++ b/pr/src/md/unix/ncr.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /* * NCR 3.0 - cloned from UnixWare by ruslan diff --git a/pr/src/md/unix/nec.c b/pr/src/md/unix/nec.c index 8c97b757..0792ec35 100644 --- a/pr/src/md/unix/nec.c +++ b/pr/src/md/unix/nec.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "primpl.h" diff --git a/pr/src/md/unix/netbsd.c b/pr/src/md/unix/netbsd.c index fdef8d7b..aa3618a3 100644 --- a/pr/src/md/unix/netbsd.c +++ b/pr/src/md/unix/netbsd.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "primpl.h" diff --git a/pr/src/md/unix/nextstep.c b/pr/src/md/unix/nextstep.c index 3f87815a..338ed071 100644 --- a/pr/src/md/unix/nextstep.c +++ b/pr/src/md/unix/nextstep.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "primpl.h" diff --git a/pr/src/md/unix/nto.c b/pr/src/md/unix/nto.c index 352d93e9..e41d665c 100644 --- a/pr/src/md/unix/nto.c +++ b/pr/src/md/unix/nto.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1999-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "primpl.h" diff --git a/pr/src/md/unix/objs.mk b/pr/src/md/unix/objs.mk index 13f2d7d2..77eaa6d1 100644 --- a/pr/src/md/unix/objs.mk +++ b/pr/src/md/unix/objs.mk @@ -1,39 +1,7 @@ # -# ***** BEGIN LICENSE BLOCK ***** -# Version: MPL 1.1/GPL 2.0/LGPL 2.1 -# -# The contents of this file are subject to the Mozilla Public License Version -# 1.1 (the "License"); you may not use this file except in compliance with -# the License. You may obtain a copy of the License at -# http://www.mozilla.org/MPL/ -# -# Software distributed under the License is distributed on an "AS IS" basis, -# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License -# for the specific language governing rights and limitations under the -# License. -# -# The Original Code is the Netscape Portable Runtime (NSPR). -# -# The Initial Developer of the Original Code is -# Netscape Communications Corporation. -# Portions created by the Initial Developer are Copyright (C) 1998-2000 -# the Initial Developer. All Rights Reserved. -# -# Contributor(s): -# -# Alternatively, the contents of this file may be used under the terms of -# either the GNU General Public License Version 2 or later (the "GPL"), or -# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), -# in which case the provisions of the GPL or the LGPL are applicable instead -# of those above. If you wish to allow use of your version of this file only -# under the terms of either the GPL or the LGPL, and not to allow others to -# use your version of this file under the terms of the MPL, indicate your -# decision by deleting the provisions above and replace them with the notice -# and other provisions required by the GPL or the LGPL. If you do not delete -# the provisions above, a recipient may use your version of this file under -# the terms of any one of the MPL, the GPL or the LGPL. -# -# ***** END LICENSE BLOCK ***** +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. # This makefile appends to the variable OBJS the platform-dependent # object modules that will be part of the nspr20 library. diff --git a/pr/src/md/unix/openbsd.c b/pr/src/md/unix/openbsd.c index 1103377f..b7f0a299 100644 --- a/pr/src/md/unix/openbsd.c +++ b/pr/src/md/unix/openbsd.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "primpl.h" diff --git a/pr/src/md/unix/os_AIX.s b/pr/src/md/unix/os_AIX.s index 976349e2..0227cc47 100644 --- a/pr/src/md/unix/os_AIX.s +++ b/pr/src/md/unix/os_AIX.s @@ -1,40 +1,8 @@ # -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- # -# ***** BEGIN LICENSE BLOCK ***** -# Version: MPL 1.1/GPL 2.0/LGPL 2.1 -# -# The contents of this file are subject to the Mozilla Public License Version -# 1.1 (the "License"); you may not use this file except in compliance with -# the License. You may obtain a copy of the License at -# http://www.mozilla.org/MPL/ -# -# Software distributed under the License is distributed on an "AS IS" basis, -# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License -# for the specific language governing rights and limitations under the -# License. -# -# The Original Code is the Netscape Portable Runtime (NSPR). -# -# The Initial Developer of the Original Code is -# Netscape Communications Corporation. -# Portions created by the Initial Developer are Copyright (C) 1998-2000 -# the Initial Developer. All Rights Reserved. -# -# Contributor(s): -# -# Alternatively, the contents of this file may be used under the terms of -# either the GNU General Public License Version 2 or later (the "GPL"), or -# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), -# in which case the provisions of the GPL or the LGPL are applicable instead -# of those above. If you wish to allow use of your version of this file only -# under the terms of either the GPL or the LGPL, and not to allow others to -# use your version of this file under the terms of the MPL, indicate your -# decision by deleting the provisions above and replace them with the notice -# and other provisions required by the GPL or the LGPL. If you do not delete -# the provisions above, a recipient may use your version of this file under -# the terms of any one of the MPL, the GPL or the LGPL. -# -# ***** END LICENSE BLOCK ***** +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. .set r0,0; .set SP,1; .set RTOC,2; .set r3,3; .set r4,4 .set r5,5; .set r6,6; .set r7,7; .set r8,8; .set r9,9 diff --git a/pr/src/md/unix/os_BSD_386_2.s b/pr/src/md/unix/os_BSD_386_2.s index 1c21b91a..fa36599e 100644 --- a/pr/src/md/unix/os_BSD_386_2.s +++ b/pr/src/md/unix/os_BSD_386_2.s @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /* * os_BSD_386_2.s diff --git a/pr/src/md/unix/os_Darwin.s b/pr/src/md/unix/os_Darwin.s index ce2cc0ba..26a0b922 100644 --- a/pr/src/md/unix/os_Darwin.s +++ b/pr/src/md/unix/os_Darwin.s @@ -1,40 +1,8 @@ # -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- # -# ***** BEGIN LICENSE BLOCK ***** -# Version: MPL 1.1/GPL 2.0/LGPL 2.1 -# -# The contents of this file are subject to the Mozilla Public License Version -# 1.1 (the "License"); you may not use this file except in compliance with -# the License. You may obtain a copy of the License at -# http://www.mozilla.org/MPL/ -# -# Software distributed under the License is distributed on an "AS IS" basis, -# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License -# for the specific language governing rights and limitations under the -# License. -# -# The Original Code is the Netscape Portable Runtime (NSPR). -# -# The Initial Developer of the Original Code is -# Netscape Communications Corporation. -# Portions created by the Initial Developer are Copyright (C) 2008 -# the Initial Developer. All Rights Reserved. -# -# Contributor(s): -# -# Alternatively, the contents of this file may be used under the terms of -# either the GNU General Public License Version 2 or later (the "GPL"), or -# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), -# in which case the provisions of the GPL or the LGPL are applicable instead -# of those above. If you wish to allow use of your version of this file only -# under the terms of either the GPL or the LGPL, and not to allow others to -# use your version of this file under the terms of the MPL, indicate your -# decision by deleting the provisions above and replace them with the notice -# and other provisions required by the GPL or the LGPL. If you do not delete -# the provisions above, a recipient may use your version of this file under -# the terms of any one of the MPL, the GPL or the LGPL. -# -# ***** END LICENSE BLOCK ***** +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. #ifdef __i386__ #include "os_Darwin_x86.s" diff --git a/pr/src/md/unix/os_Darwin_ppc.s b/pr/src/md/unix/os_Darwin_ppc.s index 4b61fb4f..8479dec0 100644 --- a/pr/src/md/unix/os_Darwin_ppc.s +++ b/pr/src/md/unix/os_Darwin_ppc.s @@ -1,40 +1,8 @@ # -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- # -# ***** BEGIN LICENSE BLOCK ***** -# Version: MPL 1.1/GPL 2.0/LGPL 2.1 -# -# The contents of this file are subject to the Mozilla Public License Version -# 1.1 (the "License"); you may not use this file except in compliance with -# the License. You may obtain a copy of the License at -# http://www.mozilla.org/MPL/ -# -# Software distributed under the License is distributed on an "AS IS" basis, -# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License -# for the specific language governing rights and limitations under the -# License. -# -# The Original Code is the Netscape Portable Runtime (NSPR). -# -# The Initial Developer of the Original Code is -# Netscape Communications Corporation. -# Portions created by the Initial Developer are Copyright (C) 2003 -# the Initial Developer. All Rights Reserved. -# -# Contributor(s): -# -# Alternatively, the contents of this file may be used under the terms of -# either the GNU General Public License Version 2 or later (the "GPL"), or -# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), -# in which case the provisions of the GPL or the LGPL are applicable instead -# of those above. If you wish to allow use of your version of this file only -# under the terms of either the GPL or the LGPL, and not to allow others to -# use your version of this file under the terms of the MPL, indicate your -# decision by deleting the provisions above and replace them with the notice -# and other provisions required by the GPL or the LGPL. If you do not delete -# the provisions above, a recipient may use your version of this file under -# the terms of any one of the MPL, the GPL or the LGPL. -# -# ***** END LICENSE BLOCK ***** +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. # # Based on the programming examples in The PowerPC Architecture: @@ -49,6 +17,7 @@ # .align 2 .globl __PR_DarwinPPC_AtomicIncrement + .private_extern __PR_DarwinPPC_AtomicIncrement __PR_DarwinPPC_AtomicIncrement: lwarx r4,0,r3 addi r0,r4,1 @@ -62,6 +31,7 @@ __PR_DarwinPPC_AtomicIncrement: # .align 2 .globl __PR_DarwinPPC_AtomicDecrement + .private_extern __PR_DarwinPPC_AtomicDecrement __PR_DarwinPPC_AtomicDecrement: lwarx r4,0,r3 addi r0,r4,-1 @@ -75,6 +45,7 @@ __PR_DarwinPPC_AtomicDecrement: # .align 2 .globl __PR_DarwinPPC_AtomicSet + .private_extern __PR_DarwinPPC_AtomicSet __PR_DarwinPPC_AtomicSet: lwarx r5,0,r3 stwcx. r4,0,r3 @@ -87,6 +58,7 @@ __PR_DarwinPPC_AtomicSet: # .align 2 .globl __PR_DarwinPPC_AtomicAdd + .private_extern __PR_DarwinPPC_AtomicAdd __PR_DarwinPPC_AtomicAdd: lwarx r5,0,r3 add r0,r4,r5 diff --git a/pr/src/md/unix/os_Darwin_x86.s b/pr/src/md/unix/os_Darwin_x86.s index 276b16e0..fc6379f9 100644 --- a/pr/src/md/unix/os_Darwin_x86.s +++ b/pr/src/md/unix/os_Darwin_x86.s @@ -1,41 +1,8 @@ # -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- # -# ***** BEGIN LICENSE BLOCK ***** -# Version: MPL 1.1/GPL 2.0/LGPL 2.1 -# -# The contents of this file are subject to the Mozilla Public License Version -# 1.1 (the "License"); you may not use this file except in compliance with -# the License. You may obtain a copy of the License at -# http://www.mozilla.org/MPL/ -# -# Software distributed under the License is distributed on an "AS IS" basis, -# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License -# for the specific language governing rights and limitations under the -# License. -# -# The Original Code is the Netscape Portable Runtime (NSPR). -# -# The Initial Developer of the Original Code is -# Netscape Communications Corporation. -# Portions created by the Initial Developer are Copyright (C) 2003 -# the Initial Developer. All Rights Reserved. -# -# Contributor(s): -# Josh Aas <josh@mozilla.com> -# -# Alternatively, the contents of this file may be used under the terms of -# either the GNU General Public License Version 2 or later (the "GPL"), or -# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), -# in which case the provisions of the GPL or the LGPL are applicable instead -# of those above. If you wish to allow use of your version of this file only -# under the terms of either the GPL or the LGPL, and not to allow others to -# use your version of this file under the terms of the MPL, indicate your -# decision by deleting the provisions above and replace them with the notice -# and other provisions required by the GPL or the LGPL. If you do not delete -# the provisions above, a recipient may use your version of this file under -# the terms of any one of the MPL, the GPL or the LGPL. -# -# ***** END LICENSE BLOCK ***** +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. # # Based on os_Linux_x86.s @@ -49,6 +16,7 @@ # .text .globl __PR_Darwin_x86_AtomicIncrement + .private_extern __PR_Darwin_x86_AtomicIncrement .align 4 __PR_Darwin_x86_AtomicIncrement: movl 4(%esp), %ecx @@ -66,6 +34,7 @@ __PR_Darwin_x86_AtomicIncrement: # .text .globl __PR_Darwin_x86_AtomicDecrement + .private_extern __PR_Darwin_x86_AtomicDecrement .align 4 __PR_Darwin_x86_AtomicDecrement: movl 4(%esp), %ecx @@ -83,6 +52,7 @@ __PR_Darwin_x86_AtomicDecrement: # .text .globl __PR_Darwin_x86_AtomicSet + .private_extern __PR_Darwin_x86_AtomicSet .align 4 __PR_Darwin_x86_AtomicSet: movl 4(%esp), %ecx @@ -98,6 +68,7 @@ __PR_Darwin_x86_AtomicSet: # .text .globl __PR_Darwin_x86_AtomicAdd + .private_extern __PR_Darwin_x86_AtomicAdd .align 4 __PR_Darwin_x86_AtomicAdd: movl 4(%esp), %ecx diff --git a/pr/src/md/unix/os_Darwin_x86_64.s b/pr/src/md/unix/os_Darwin_x86_64.s index 031186f5..449aaa5d 100644 --- a/pr/src/md/unix/os_Darwin_x86_64.s +++ b/pr/src/md/unix/os_Darwin_x86_64.s @@ -1,40 +1,8 @@ # -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- # -# ***** BEGIN LICENSE BLOCK ***** -# Version: MPL 1.1#GPL 2.0#LGPL 2.1 -# -# The contents of this file are subject to the Mozilla Public License Version -# 1.1 (the "License"); you may not use this file except in compliance with -# the License. You may obtain a copy of the License at -# http:##www.mozilla.org#MPL# -# -# Software distributed under the License is distributed on an "AS IS" basis, -# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License -# for the specific language governing rights and limitations under the -# License. -# -# The Original Code is the Netscape Portable Runtime (NSPR). -# -# The Initial Developer of the Original Code is -# Netscape Communications Corporation. -# Portions created by the Initial Developer are Copyright (C) 2004 -# the Initial Developer. All Rights Reserved. -# -# Contributor(s): -# -# Alternatively, the contents of this file may be used under the terms of -# either the GNU General Public License Version 2 or later (the "GPL"), or -# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), -# in which case the provisions of the GPL or the LGPL are applicable instead -# of those above. If you wish to allow use of your version of this file only -# under the terms of either the GPL or the LGPL, and not to allow others to -# use your version of this file under the terms of the MPL, indicate your -# decision by deleting the provisions above and replace them with the notice -# and other provisions required by the GPL or the LGPL. If you do not delete -# the provisions above, a recipient may use your version of this file under -# the terms of any one of the MPL, the GPL or the LGPL. -# -# ***** END LICENSE BLOCK ***** +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. # PRInt32 __PR_Darwin_x86_64_AtomicIncrement(PRInt32 *val) # @@ -43,6 +11,7 @@ # .text .globl __PR_Darwin_x86_64_AtomicIncrement + .private_extern __PR_Darwin_x86_64_AtomicIncrement .align 4 __PR_Darwin_x86_64_AtomicIncrement: movl $1, %eax @@ -58,6 +27,7 @@ __PR_Darwin_x86_64_AtomicIncrement: # .text .globl __PR_Darwin_x86_64_AtomicDecrement + .private_extern __PR_Darwin_x86_64_AtomicDecrement .align 4 __PR_Darwin_x86_64_AtomicDecrement: movl $-1, %eax @@ -73,6 +43,7 @@ __PR_Darwin_x86_64_AtomicDecrement: # .text .globl __PR_Darwin_x86_64_AtomicSet + .private_extern __PR_Darwin_x86_64_AtomicSet .align 4 __PR_Darwin_x86_64_AtomicSet: movl %esi, %eax @@ -86,6 +57,7 @@ __PR_Darwin_x86_64_AtomicSet: # .text .globl __PR_Darwin_x86_64_AtomicAdd + .private_extern __PR_Darwin_x86_64_AtomicAdd .align 4 __PR_Darwin_x86_64_AtomicAdd: movl %esi, %eax diff --git a/pr/src/md/unix/os_HPUX.s b/pr/src/md/unix/os_HPUX.s index ef07db03..f8ecabf9 100644 --- a/pr/src/md/unix/os_HPUX.s +++ b/pr/src/md/unix/os_HPUX.s @@ -1,39 +1,7 @@ ; -; ***** BEGIN LICENSE BLOCK ***** -; Version: MPL 1.1/GPL 2.0/LGPL 2.1 -; -; The contents of this file are subject to the Mozilla Public License Version -; 1.1 (the "License"); you may not use this file except in compliance with -; the License. You may obtain a copy of the License at -; http://www.mozilla.org/MPL/ -; -; Software distributed under the License is distributed on an "AS IS" basis, -; WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License -; for the specific language governing rights and limitations under the -; License. -; -; The Original Code is the Netscape Portable Runtime (NSPR). -; -; The Initial Developer of the Original Code is -; Netscape Communications Corporation. -; Portions created by the Initial Developer are Copyright (C) 1998-2000 -; the Initial Developer. All Rights Reserved. -; -; Contributor(s): -; -; Alternatively, the contents of this file may be used under the terms of -; either the GNU General Public License Version 2 or later (the "GPL"), or -; the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), -; in which case the provisions of the GPL or the LGPL are applicable instead -; of those above. If you wish to allow use of your version of this file only -; under the terms of either the GPL or the LGPL, and not to allow others to -; use your version of this file under the terms of the MPL, indicate your -; decision by deleting the provisions above and replace them with the notice -; and other provisions required by the GPL or the LGPL. If you do not delete -; the provisions above, a recipient may use your version of this file under -; the terms of any one of the MPL, the GPL or the LGPL. -; -; ***** END LICENSE BLOCK ***** +; This Source Code Form is subject to the terms of the Mozilla Public +; License, v. 2.0. If a copy of the MPL was not distributed with this +; file, You can obtain one at http://mozilla.org/MPL/2.0/. #ifdef __LP64__ .LEVEL 2.0W @@ -49,10 +17,9 @@ ret_cr16 .PROC .CALLINFO FRAME=0, NO_CALLS .EXPORT ret_cr16,ENTRY - .ENTER -; BV %r0(%rp) - BV 0(%rp) + .ENTRY + BV %r0(%rp) + .EXIT MFCTL %cr16,%ret0 - .LEAVE .PROCEND .END diff --git a/pr/src/md/unix/os_HPUX_ia64.s b/pr/src/md/unix/os_HPUX_ia64.s index 9c147936..302ae768 100644 --- a/pr/src/md/unix/os_HPUX_ia64.s +++ b/pr/src/md/unix/os_HPUX_ia64.s @@ -1,40 +1,8 @@ // -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- // -// ***** BEGIN LICENSE BLOCK ***** -// Version: MPL 1.1/GPL 2.0/LGPL 2.1 -// -// The contents of this file are subject to the Mozilla Public License Version -// 1.1 (the "License"); you may not use this file except in compliance with -// the License. You may obtain a copy of the License at -// http://www.mozilla.org/MPL/ -// -// Software distributed under the License is distributed on an "AS IS" basis, -// WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License -// for the specific language governing rights and limitations under the -// License. -// -// The Original Code is the Netscape Portable Runtime (NSPR). -// -// The Initial Developer of the Original Code is -// Netscape Communications Corporation. -// Portions created by the Initial Developer are Copyright (C) 2000 -// the Initial Developer. All Rights Reserved. -// -// Contributor(s): -// -// Alternatively, the contents of this file may be used under the terms of -// either the GNU General Public License Version 2 or later (the "GPL"), or -// the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), -// in which case the provisions of the GPL or the LGPL are applicable instead -// of those above. If you wish to allow use of your version of this file only -// under the terms of either the GPL or the LGPL, and not to allow others to -// use your version of this file under the terms of the MPL, indicate your -// decision by deleting the provisions above and replace them with the notice -// and other provisions required by the GPL or the LGPL. If you do not delete -// the provisions above, a recipient may use your version of this file under -// the terms of any one of the MPL, the GPL or the LGPL. -// -// ***** END LICENSE BLOCK ***** +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at http://mozilla.org/MPL/2.0/. .text diff --git a/pr/src/md/unix/os_Irix.s b/pr/src/md/unix/os_Irix.s index e726194e..ab1cb0b3 100644 --- a/pr/src/md/unix/os_Irix.s +++ b/pr/src/md/unix/os_Irix.s @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /* * Atomically add a new element to the top of the stack diff --git a/pr/src/md/unix/os_Linux_ia64.s b/pr/src/md/unix/os_Linux_ia64.s index a97412d1..fef24ad1 100644 --- a/pr/src/md/unix/os_Linux_ia64.s +++ b/pr/src/md/unix/os_Linux_ia64.s @@ -1,40 +1,8 @@ // -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- // -// ***** BEGIN LICENSE BLOCK ***** -// Version: MPL 1.1/GPL 2.0/LGPL 2.1 -// -// The contents of this file are subject to the Mozilla Public License Version -// 1.1 (the "License"); you may not use this file except in compliance with -// the License. You may obtain a copy of the License at -// http://www.mozilla.org/MPL/ -// -// Software distributed under the License is distributed on an "AS IS" basis, -// WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License -// for the specific language governing rights and limitations under the -// License. -// -// The Original Code is the Netscape Portable Runtime (NSPR). -// -// The Initial Developer of the Original Code is -// Netscape Communications Corporation. -// Portions created by the Initial Developer are Copyright (C) 2000 -// the Initial Developer. All Rights Reserved. -// -// Contributor(s): -// -// Alternatively, the contents of this file may be used under the terms of -// either the GNU General Public License Version 2 or later (the "GPL"), or -// the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), -// in which case the provisions of the GPL or the LGPL are applicable instead -// of those above. If you wish to allow use of your version of this file only -// under the terms of either the GPL or the LGPL, and not to allow others to -// use your version of this file under the terms of the MPL, indicate your -// decision by deleting the provisions above and replace them with the notice -// and other provisions required by the GPL or the LGPL. If you do not delete -// the provisions above, a recipient may use your version of this file under -// the terms of any one of the MPL, the GPL or the LGPL. -// -// ***** END LICENSE BLOCK ***** +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at http://mozilla.org/MPL/2.0/. .text diff --git a/pr/src/md/unix/os_Linux_ppc.s b/pr/src/md/unix/os_Linux_ppc.s index 0e1c195d..a9a83174 100644 --- a/pr/src/md/unix/os_Linux_ppc.s +++ b/pr/src/md/unix/os_Linux_ppc.s @@ -1,40 +1,8 @@ # -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- # -# ***** BEGIN LICENSE BLOCK ***** -# Version: MPL 1.1/GPL 2.0/LGPL 2.1 -# -# The contents of this file are subject to the Mozilla Public License Version -# 1.1 (the "License"); you may not use this file except in compliance with -# the License. You may obtain a copy of the License at -# http://www.mozilla.org/MPL/ -# -# Software distributed under the License is distributed on an "AS IS" basis, -# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License -# for the specific language governing rights and limitations under the -# License. -# -# The Original Code is the Netscape Portable Runtime (NSPR). -# -# The Initial Developer of the Original Code is -# Netscape Communications Corporation. -# Portions created by the Initial Developer are Copyright (C) 2003 -# the Initial Developer. All Rights Reserved. -# -# Contributor(s): -# -# Alternatively, the contents of this file may be used under the terms of -# either the GNU General Public License Version 2 or later (the "GPL"), or -# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), -# in which case the provisions of the GPL or the LGPL are applicable instead -# of those above. If you wish to allow use of your version of this file only -# under the terms of either the GPL or the LGPL, and not to allow others to -# use your version of this file under the terms of the MPL, indicate your -# decision by deleting the provisions above and replace them with the notice -# and other provisions required by the GPL or the LGPL. If you do not delete -# the provisions above, a recipient may use your version of this file under -# the terms of any one of the MPL, the GPL or the LGPL. -# -# ***** END LICENSE BLOCK ***** +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. # # Based on the programming examples in The PowerPC Architecture: diff --git a/pr/src/md/unix/os_Linux_x86.s b/pr/src/md/unix/os_Linux_x86.s index 5ae21aa4..a72acf5d 100644 --- a/pr/src/md/unix/os_Linux_x86.s +++ b/pr/src/md/unix/os_Linux_x86.s @@ -1,46 +1,14 @@ -/ -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- -/ -/ ***** BEGIN LICENSE BLOCK ***** -/ Version: MPL 1.1/GPL 2.0/LGPL 2.1 -/ -/ The contents of this file are subject to the Mozilla Public License Version -/ 1.1 (the "License"); you may not use this file except in compliance with -/ the License. You may obtain a copy of the License at -/ http://www.mozilla.org/MPL/ -/ -/ Software distributed under the License is distributed on an "AS IS" basis, -/ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License -/ for the specific language governing rights and limitations under the -/ License. -/ -/ The Original Code is the Netscape Portable Runtime (NSPR). -/ -/ The Initial Developer of the Original Code is -/ Netscape Communications Corporation. -/ Portions created by the Initial Developer are Copyright (C) 2000 -/ the Initial Developer. All Rights Reserved. -/ -/ Contributor(s): -/ -/ Alternatively, the contents of this file may be used under the terms of -/ either the GNU General Public License Version 2 or later (the "GPL"), or -/ the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), -/ in which case the provisions of the GPL or the LGPL are applicable instead -/ of those above. If you wish to allow use of your version of this file only -/ under the terms of either the GPL or the LGPL, and not to allow others to -/ use your version of this file under the terms of the MPL, indicate your -/ decision by deleting the provisions above and replace them with the notice -/ and other provisions required by the GPL or the LGPL. If you do not delete -/ the provisions above, a recipient may use your version of this file under -/ the terms of any one of the MPL, the GPL or the LGPL. -/ -/ ***** END LICENSE BLOCK ***** +// -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- +// +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at http://mozilla.org/MPL/2.0/. -/ PRInt32 _PR_x86_AtomicIncrement(PRInt32 *val) -/ -/ Atomically increment the integer pointed to by 'val' and return -/ the result of the increment. -/ +// PRInt32 _PR_x86_AtomicIncrement(PRInt32 *val) +// +// Atomically increment the integer pointed to by 'val' and return +// the result of the increment. +// .text .globl _PR_x86_AtomicIncrement .align 4 @@ -52,11 +20,11 @@ _PR_x86_AtomicIncrement: incl %eax ret -/ PRInt32 _PR_x86_AtomicDecrement(PRInt32 *val) -/ -/ Atomically decrement the integer pointed to by 'val' and return -/ the result of the decrement. -/ +// PRInt32 _PR_x86_AtomicDecrement(PRInt32 *val) +// +// Atomically decrement the integer pointed to by 'val' and return +// the result of the decrement. +// .text .globl _PR_x86_AtomicDecrement .align 4 @@ -68,25 +36,25 @@ _PR_x86_AtomicDecrement: decl %eax ret -/ PRInt32 _PR_x86_AtomicSet(PRInt32 *val, PRInt32 newval) -/ -/ Atomically set the integer pointed to by 'val' to the new -/ value 'newval' and return the old value. -/ -/ An alternative implementation: -/ .text -/ .globl _PR_x86_AtomicSet -/ .align 4 -/_PR_x86_AtomicSet: -/ movl 4(%esp), %ecx -/ movl 8(%esp), %edx -/ movl (%ecx), %eax -/retry: -/ lock -/ cmpxchgl %edx, (%ecx) -/ jne retry -/ ret -/ +// PRInt32 _PR_x86_AtomicSet(PRInt32 *val, PRInt32 newval) +// +// Atomically set the integer pointed to by 'val' to the new +// value 'newval' and return the old value. +// +// An alternative implementation: +// .text +// .globl _PR_x86_AtomicSet +// .align 4 +//_PR_x86_AtomicSet: +// movl 4(%esp), %ecx +// movl 8(%esp), %edx +// movl (%ecx), %eax +//retry: +// lock +// cmpxchgl %edx, (%ecx) +// jne retry +// ret +// .text .globl _PR_x86_AtomicSet .align 4 @@ -96,11 +64,11 @@ _PR_x86_AtomicSet: xchgl %eax, (%ecx) ret -/ PRInt32 _PR_x86_AtomicAdd(PRInt32 *ptr, PRInt32 val) -/ -/ Atomically add 'val' to the integer pointed to by 'ptr' -/ and return the result of the addition. -/ +// PRInt32 _PR_x86_AtomicAdd(PRInt32 *ptr, PRInt32 val) +// +// Atomically add 'val' to the integer pointed to by 'ptr' +// and return the result of the addition. +// .text .globl _PR_x86_AtomicAdd .align 4 @@ -113,5 +81,5 @@ _PR_x86_AtomicAdd: addl %edx, %eax ret -/ Magic indicating no need for an executable stack +// Magic indicating no need for an executable stack .section .note.GNU-stack, "", @progbits ; .previous diff --git a/pr/src/md/unix/os_Linux_x86_64.s b/pr/src/md/unix/os_Linux_x86_64.s index 1a7b24a8..8e491f0e 100644 --- a/pr/src/md/unix/os_Linux_x86_64.s +++ b/pr/src/md/unix/os_Linux_x86_64.s @@ -1,48 +1,17 @@ -/ -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- -/ -/ ***** BEGIN LICENSE BLOCK ***** -/ Version: MPL 1.1/GPL 2.0/LGPL 2.1 -/ -/ The contents of this file are subject to the Mozilla Public License Version -/ 1.1 (the "License"); you may not use this file except in compliance with -/ the License. You may obtain a copy of the License at -/ http://www.mozilla.org/MPL/ -/ -/ Software distributed under the License is distributed on an "AS IS" basis, -/ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License -/ for the specific language governing rights and limitations under the -/ License. -/ -/ The Original Code is the Netscape Portable Runtime (NSPR). -/ -/ The Initial Developer of the Original Code is -/ Netscape Communications Corporation. -/ Portions created by the Initial Developer are Copyright (C) 2004 -/ the Initial Developer. All Rights Reserved. -/ -/ Contributor(s): -/ -/ Alternatively, the contents of this file may be used under the terms of -/ either the GNU General Public License Version 2 or later (the "GPL"), or -/ the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), -/ in which case the provisions of the GPL or the LGPL are applicable instead -/ of those above. If you wish to allow use of your version of this file only -/ under the terms of either the GPL or the LGPL, and not to allow others to -/ use your version of this file under the terms of the MPL, indicate your -/ decision by deleting the provisions above and replace them with the notice -/ and other provisions required by the GPL or the LGPL. If you do not delete -/ the provisions above, a recipient may use your version of this file under -/ the terms of any one of the MPL, the GPL or the LGPL. -/ -/ ***** END LICENSE BLOCK ***** +// -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- +// +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at http://mozilla.org/MPL/2.0/. -/ PRInt32 _PR_x86_64_AtomicIncrement(PRInt32 *val) -/ -/ Atomically increment the integer pointed to by 'val' and return -/ the result of the increment. -/ +// PRInt32 _PR_x86_64_AtomicIncrement(PRInt32 *val) +// +// Atomically increment the integer pointed to by 'val' and return +// the result of the increment. +// .text .globl _PR_x86_64_AtomicIncrement + .type _PR_x86_64_AtomicIncrement, @function .align 4 _PR_x86_64_AtomicIncrement: movl $1, %eax @@ -50,14 +19,16 @@ _PR_x86_64_AtomicIncrement: xaddl %eax, (%rdi) incl %eax ret + .size _PR_x86_64_AtomicIncrement, .-_PR_x86_64_AtomicIncrement -/ PRInt32 _PR_x86_64_AtomicDecrement(PRInt32 *val) -/ -/ Atomically decrement the integer pointed to by 'val' and return -/ the result of the decrement. -/ +// PRInt32 _PR_x86_64_AtomicDecrement(PRInt32 *val) +// +// Atomically decrement the integer pointed to by 'val' and return +// the result of the decrement. +// .text .globl _PR_x86_64_AtomicDecrement + .type _PR_x86_64_AtomicDecrement, @function .align 4 _PR_x86_64_AtomicDecrement: movl $-1, %eax @@ -65,27 +36,31 @@ _PR_x86_64_AtomicDecrement: xaddl %eax, (%rdi) decl %eax ret + .size _PR_x86_64_AtomicDecrement, .-_PR_x86_64_AtomicDecrement -/ PRInt32 _PR_x86_64_AtomicSet(PRInt32 *val, PRInt32 newval) -/ -/ Atomically set the integer pointed to by 'val' to the new -/ value 'newval' and return the old value. -/ +// PRInt32 _PR_x86_64_AtomicSet(PRInt32 *val, PRInt32 newval) +// +// Atomically set the integer pointed to by 'val' to the new +// value 'newval' and return the old value. +// .text .globl _PR_x86_64_AtomicSet + .type _PR_x86_64_AtomicSet, @function .align 4 _PR_x86_64_AtomicSet: movl %esi, %eax xchgl %eax, (%rdi) ret + .size _PR_x86_64_AtomicSet, .-_PR_x86_64_AtomicSet -/ PRInt32 _PR_x86_64_AtomicAdd(PRInt32 *ptr, PRInt32 val) -/ -/ Atomically add 'val' to the integer pointed to by 'ptr' -/ and return the result of the addition. -/ +// PRInt32 _PR_x86_64_AtomicAdd(PRInt32 *ptr, PRInt32 val) +// +// Atomically add 'val' to the integer pointed to by 'ptr' +// and return the result of the addition. +// .text .globl _PR_x86_64_AtomicAdd + .type _PR_x86_64_AtomicAdd, @function .align 4 _PR_x86_64_AtomicAdd: movl %esi, %eax @@ -93,6 +68,7 @@ _PR_x86_64_AtomicAdd: xaddl %eax, (%rdi) addl %esi, %eax ret + .size _PR_x86_64_AtomicAdd, .-_PR_x86_64_AtomicAdd -/ Magic indicating no need for an executable stack +// Magic indicating no need for an executable stack .section .note.GNU-stack, "", @progbits ; .previous diff --git a/pr/src/md/unix/os_ReliantUNIX.s b/pr/src/md/unix/os_ReliantUNIX.s index 7aef248d..f17d02f0 100644 --- a/pr/src/md/unix/os_ReliantUNIX.s +++ b/pr/src/md/unix/os_ReliantUNIX.s @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /* We want position independent code */ #define PIC diff --git a/pr/src/md/unix/os_SunOS_sparcv9.s b/pr/src/md/unix/os_SunOS_sparcv9.s index d3f1e69e..8bc75af8 100644 --- a/pr/src/md/unix/os_SunOS_sparcv9.s +++ b/pr/src/md/unix/os_SunOS_sparcv9.s @@ -1,40 +1,8 @@ ! -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- ! -! ***** BEGIN LICENSE BLOCK ***** -! Version: MPL 1.1/GPL 2.0/LGPL 2.1 -! -! The contents of this file are subject to the Mozilla Public License Version -! 1.1 (the "License"); you may not use this file except in compliance with -! the License. You may obtain a copy of the License at -! http://www.mozilla.org/MPL/ -! -! Software distributed under the License is distributed on an "AS IS" basis, -! WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License -! for the specific language governing rights and limitations under the -! License. -! -! The Original Code is the Netscape Portable Runtime (NSPR). -! -! The Initial Developer of the Original Code is -! Netscape Communications Corporation. -! Portions created by the Initial Developer are Copyright (C) 1998-2000 -! the Initial Developer. All Rights Reserved. -! -! Contributor(s): -! -! Alternatively, the contents of this file may be used under the terms of -! either the GNU General Public License Version 2 or later (the "GPL"), or -! the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), -! in which case the provisions of the GPL or the LGPL are applicable instead -! of those above. If you wish to allow use of your version of this file only -! under the terms of either the GPL or the LGPL, and not to allow others to -! use your version of this file under the terms of the MPL, indicate your -! decision by deleting the provisions above and replace them with the notice -! and other provisions required by the GPL or the LGPL. If you do not delete -! the provisions above, a recipient may use your version of this file under -! the terms of any one of the MPL, the GPL or the LGPL. -! -! ***** END LICENSE BLOCK ***** +! This Source Code Form is subject to the terms of the Mozilla Public +! License, v. 2.0. If a copy of the MPL was not distributed with this +! file, You can obtain one at http://mozilla.org/MPL/2.0/. ! ! atomic increment, decrement and swap routines for V8+ sparc (ultrasparc) diff --git a/pr/src/md/unix/os_SunOS_ultrasparc.s b/pr/src/md/unix/os_SunOS_ultrasparc.s index 08c8e072..32bf7884 100644 --- a/pr/src/md/unix/os_SunOS_ultrasparc.s +++ b/pr/src/md/unix/os_SunOS_ultrasparc.s @@ -1,40 +1,8 @@ ! -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- ! -! ***** BEGIN LICENSE BLOCK ***** -! Version: MPL 1.1/GPL 2.0/LGPL 2.1 -! -! The contents of this file are subject to the Mozilla Public License Version -! 1.1 (the "License"); you may not use this file except in compliance with -! the License. You may obtain a copy of the License at -! http://www.mozilla.org/MPL/ -! -! Software distributed under the License is distributed on an "AS IS" basis, -! WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License -! for the specific language governing rights and limitations under the -! License. -! -! The Original Code is the Netscape Portable Runtime (NSPR). -! -! The Initial Developer of the Original Code is -! Netscape Communications Corporation. -! Portions created by the Initial Developer are Copyright (C) 1998-2000 -! the Initial Developer. All Rights Reserved. -! -! Contributor(s): -! -! Alternatively, the contents of this file may be used under the terms of -! either the GNU General Public License Version 2 or later (the "GPL"), or -! the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), -! in which case the provisions of the GPL or the LGPL are applicable instead -! of those above. If you wish to allow use of your version of this file only -! under the terms of either the GPL or the LGPL, and not to allow others to -! use your version of this file under the terms of the MPL, indicate your -! decision by deleting the provisions above and replace them with the notice -! and other provisions required by the GPL or the LGPL. If you do not delete -! the provisions above, a recipient may use your version of this file under -! the terms of any one of the MPL, the GPL or the LGPL. -! -! ***** END LICENSE BLOCK ***** +! This Source Code Form is subject to the terms of the Mozilla Public +! License, v. 2.0. If a copy of the MPL was not distributed with this +! file, You can obtain one at http://mozilla.org/MPL/2.0/. ! ! atomic increment, decrement and swap routines for V8+ sparc (ultrasparc) diff --git a/pr/src/md/unix/os_SunOS_x86.s b/pr/src/md/unix/os_SunOS_x86.s index 75ddfa61..dcd7535b 100644 --- a/pr/src/md/unix/os_SunOS_x86.s +++ b/pr/src/md/unix/os_SunOS_x86.s @@ -1,40 +1,8 @@ -/ -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- -/ -/ ***** BEGIN LICENSE BLOCK ***** -/ Version: MPL 1.1/GPL 2.0/LGPL 2.1 -/ -/ The contents of this file are subject to the Mozilla Public License Version -/ 1.1 (the "License"); you may not use this file except in compliance with -/ the License. You may obtain a copy of the License at -/ http://www.mozilla.org/MPL/ -/ -/ Software distributed under the License is distributed on an "AS IS" basis, -/ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License -/ for the specific language governing rights and limitations under the -/ License. -/ -/ The Original Code is the Netscape Portable Runtime (NSPR). -/ -/ The Initial Developer of the Original Code is -/ Netscape Communications Corporation. -/ Portions created by the Initial Developer are Copyright (C) 1998-2000 -/ the Initial Developer. All Rights Reserved. -/ -/ Contributor(s): -/ -/ Alternatively, the contents of this file may be used under the terms of -/ either the GNU General Public License Version 2 or later (the "GPL"), or -/ the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), -/ in which case the provisions of the GPL or the LGPL are applicable instead -/ of those above. If you wish to allow use of your version of this file only -/ under the terms of either the GPL or the LGPL, and not to allow others to -/ use your version of this file under the terms of the MPL, indicate your -/ decision by deleting the provisions above and replace them with the notice -/ and other provisions required by the GPL or the LGPL. If you do not delete -/ the provisions above, a recipient may use your version of this file under -/ the terms of any one of the MPL, the GPL or the LGPL. -/ -/ ***** END LICENSE BLOCK ***** +// -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- +// +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at http://mozilla.org/MPL/2.0/. .text @@ -60,31 +28,31 @@ _MD_FlushRegisterWindows: ret -/ -/ sol_getsp() -/ -/ Return the current sp (for debugging) -/ +// +// sol_getsp() +// +// Return the current sp (for debugging) +// .globl sol_getsp sol_getsp: movl %esp, %eax ret -/ -/ sol_curthread() -/ -/ Return a unique identifier for the currently active thread. -/ +// +// sol_curthread() +// +// Return a unique identifier for the currently active thread. +// .globl sol_curthread sol_curthread: movl %ecx, %eax ret -/ PRInt32 _MD_AtomicIncrement(PRInt32 *val) -/ -/ Atomically increment the integer pointed to by 'val' and return -/ the result of the increment. -/ +// PRInt32 _MD_AtomicIncrement(PRInt32 *val) +// +// Atomically increment the integer pointed to by 'val' and return +// the result of the increment. +// .text .globl _MD_AtomicIncrement .align 4 @@ -96,11 +64,11 @@ _MD_AtomicIncrement: incl %eax ret -/ PRInt32 _MD_AtomicDecrement(PRInt32 *val) -/ -/ Atomically decrement the integer pointed to by 'val' and return -/ the result of the decrement. -/ +// PRInt32 _MD_AtomicDecrement(PRInt32 *val) +// +// Atomically decrement the integer pointed to by 'val' and return +// the result of the decrement. +// .text .globl _MD_AtomicDecrement .align 4 @@ -112,25 +80,25 @@ _MD_AtomicDecrement: decl %eax ret -/ PRInt32 _MD_AtomicSet(PRInt32 *val, PRInt32 newval) -/ -/ Atomically set the integer pointed to by 'val' to the new -/ value 'newval' and return the old value. -/ -/ An alternative implementation: -/ .text -/ .globl _MD_AtomicSet -/ .align 4 -/_MD_AtomicSet: -/ movl 4(%esp), %ecx -/ movl 8(%esp), %edx -/ movl (%ecx), %eax -/retry: -/ lock -/ cmpxchgl %edx, (%ecx) -/ jne retry -/ ret -/ +// PRInt32 _MD_AtomicSet(PRInt32 *val, PRInt32 newval) +// +// Atomically set the integer pointed to by 'val' to the new +// value 'newval' and return the old value. +// +// An alternative implementation: +// .text +// .globl _MD_AtomicSet +// .align 4 +//_MD_AtomicSet: +// movl 4(%esp), %ecx +// movl 8(%esp), %edx +// movl (%ecx), %eax +//retry: +// lock +// cmpxchgl %edx, (%ecx) +// jne retry +// ret +// .text .globl _MD_AtomicSet .align 4 @@ -140,11 +108,11 @@ _MD_AtomicSet: xchgl %eax, (%ecx) ret -/ PRInt32 _MD_AtomicAdd(PRInt32 *ptr, PRInt32 val) -/ -/ Atomically add 'val' to the integer pointed to by 'ptr' -/ and return the result of the addition. -/ +// PRInt32 _MD_AtomicAdd(PRInt32 *ptr, PRInt32 val) +// +// Atomically add 'val' to the integer pointed to by 'ptr' +// and return the result of the addition. +// .text .globl _MD_AtomicAdd .align 4 diff --git a/pr/src/md/unix/os_SunOS_x86_64.s b/pr/src/md/unix/os_SunOS_x86_64.s index 3c5ac393..5e3df049 100644 --- a/pr/src/md/unix/os_SunOS_x86_64.s +++ b/pr/src/md/unix/os_SunOS_x86_64.s @@ -1,46 +1,14 @@ -/ -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- -/ -/ ***** BEGIN LICENSE BLOCK ***** -/ Version: MPL 1.1/GPL 2.0/LGPL 2.1 -/ -/ The contents of this file are subject to the Mozilla Public License Version -/ 1.1 (the "License"); you may not use this file except in compliance with -/ the License. You may obtain a copy of the License at -/ http://www.mozilla.org/MPL/ -/ -/ Software distributed under the License is distributed on an "AS IS" basis, -/ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License -/ for the specific language governing rights and limitations under the -/ License. -/ -/ The Original Code is the Netscape Portable Runtime (NSPR). -/ -/ The Initial Developer of the Original Code is -/ Netscape Communications Corporation. -/ Portions created by the Initial Developer are Copyright (C) 2004 -/ the Initial Developer. All Rights Reserved. -/ -/ Contributor(s): -/ -/ Alternatively, the contents of this file may be used under the terms of -/ either the GNU General Public License Version 2 or later (the "GPL"), or -/ the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), -/ in which case the provisions of the GPL or the LGPL are applicable instead -/ of those above. If you wish to allow use of your version of this file only -/ under the terms of either the GPL or the LGPL, and not to allow others to -/ use your version of this file under the terms of the MPL, indicate your -/ decision by deleting the provisions above and replace them with the notice -/ and other provisions required by the GPL or the LGPL. If you do not delete -/ the provisions above, a recipient may use your version of this file under -/ the terms of any one of the MPL, the GPL or the LGPL. -/ -/ ***** END LICENSE BLOCK ***** +// -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- +// +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at http://mozilla.org/MPL/2.0/. -/ PRInt32 _MD_AtomicIncrement(PRInt32 *val) -/ -/ Atomically increment the integer pointed to by 'val' and return -/ the result of the increment. -/ +// PRInt32 _MD_AtomicIncrement(PRInt32 *val) +// +// Atomically increment the integer pointed to by 'val' and return +// the result of the increment. +// .text .globl _MD_AtomicIncrement .align 4 @@ -51,11 +19,11 @@ _MD_AtomicIncrement: incl %eax ret -/ PRInt32 _MD_AtomicDecrement(PRInt32 *val) -/ -/ Atomically decrement the integer pointed to by 'val' and return -/ the result of the decrement. -/ +// PRInt32 _MD_AtomicDecrement(PRInt32 *val) +// +// Atomically decrement the integer pointed to by 'val' and return +// the result of the decrement. +// .text .globl _MD_AtomicDecrement .align 4 @@ -66,11 +34,11 @@ _MD_AtomicDecrement: decl %eax ret -/ PRInt32 _MD_AtomicSet(PRInt32 *val, PRInt32 newval) -/ -/ Atomically set the integer pointed to by 'val' to the new -/ value 'newval' and return the old value. -/ +// PRInt32 _MD_AtomicSet(PRInt32 *val, PRInt32 newval) +// +// Atomically set the integer pointed to by 'val' to the new +// value 'newval' and return the old value. +// .text .globl _MD_AtomicSet .align 4 @@ -79,11 +47,11 @@ _MD_AtomicSet: xchgl %eax, (%rdi) ret -/ PRInt32 _MD_AtomicAdd(PRInt32 *ptr, PRInt32 val) -/ -/ Atomically add 'val' to the integer pointed to by 'ptr' -/ and return the result of the addition. -/ +// PRInt32 _MD_AtomicAdd(PRInt32 *ptr, PRInt32 val) +// +// Atomically add 'val' to the integer pointed to by 'ptr' +// and return the result of the addition. +// .text .globl _MD_AtomicAdd .align 4 diff --git a/pr/src/md/unix/osf1.c b/pr/src/md/unix/osf1.c index a4cd6a51..a9a1c67d 100644 --- a/pr/src/md/unix/osf1.c +++ b/pr/src/md/unix/osf1.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "primpl.h" diff --git a/pr/src/md/unix/pthreads_user.c b/pr/src/md/unix/pthreads_user.c index 21e5f0b8..bb64b9f4 100644 --- a/pr/src/md/unix/pthreads_user.c +++ b/pr/src/md/unix/pthreads_user.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "primpl.h" #include <sys/types.h> diff --git a/pr/src/md/unix/qnx.c b/pr/src/md/unix/qnx.c index be86e5b9..259e29cd 100644 --- a/pr/src/md/unix/qnx.c +++ b/pr/src/md/unix/qnx.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "primpl.h" diff --git a/pr/src/md/unix/reliantunix.c b/pr/src/md/unix/reliantunix.c index efe21086..90fa2eb8 100644 --- a/pr/src/md/unix/reliantunix.c +++ b/pr/src/md/unix/reliantunix.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /* * SINIX (ReliantUNIX) 5.4 - copied from unixware.c by chrisk 040497 diff --git a/pr/src/md/unix/riscos.c b/pr/src/md/unix/riscos.c index eee94d3d..318903ac 100644 --- a/pr/src/md/unix/riscos.c +++ b/pr/src/md/unix/riscos.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): Peter Naulls <peter@chocky.org> - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "primpl.h" diff --git a/pr/src/md/unix/scoos.c b/pr/src/md/unix/scoos.c index 766bf917..b727a53a 100644 --- a/pr/src/md/unix/scoos.c +++ b/pr/src/md/unix/scoos.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /* * SCO ODT 5.0 - originally created by mikep diff --git a/pr/src/md/unix/solaris.c b/pr/src/md/unix/solaris.c index 6acffedb..4fe2043b 100644 --- a/pr/src/md/unix/solaris.c +++ b/pr/src/md/unix/solaris.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "primpl.h" diff --git a/pr/src/md/unix/sony.c b/pr/src/md/unix/sony.c index dacb4fd5..033d089a 100644 --- a/pr/src/md/unix/sony.c +++ b/pr/src/md/unix/sony.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "primpl.h" diff --git a/pr/src/md/unix/sunos4.c b/pr/src/md/unix/sunos4.c index d3b40c15..4b8843ac 100644 --- a/pr/src/md/unix/sunos4.c +++ b/pr/src/md/unix/sunos4.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include <setjmp.h> #include "primpl.h" diff --git a/pr/src/md/unix/symbian.c b/pr/src/md/unix/symbian.c index 08e5f5c1..c797d868 100644 --- a/pr/src/md/unix/symbian.c +++ b/pr/src/md/unix/symbian.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "primpl.h" diff --git a/pr/src/md/unix/unix.c b/pr/src/md/unix/unix.c index 740794a6..9a91a01c 100644 --- a/pr/src/md/unix/unix.c +++ b/pr/src/md/unix/unix.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "primpl.h" @@ -2256,6 +2224,10 @@ PRInt32 _MD_open(const char *name, PRIntn flags, PRIntn mode) PR_Lock(_pr_rename_lock); } +#if defined(ANDROID) + osflags |= O_LARGEFILE; +#endif + rv = _md_iovector._open64(name, osflags, mode); if (rv < 0) { @@ -2742,6 +2714,23 @@ static void* _MD_Unix_mmap64( } /* _MD_Unix_mmap64 */ #endif /* defined(_PR_NO_LARGE_FILES) || defined(SOLARIS2_5) */ +/* Android doesn't have mmap64. */ +#if defined(ANDROID) +extern void *__mmap2(void *, size_t, int, int, int, size_t); + +#define ANDROID_PAGE_SIZE 4096 + +static void * +mmap64(void *addr, size_t len, int prot, int flags, int fd, loff_t offset) +{ + if (offset & (ANDROID_PAGE_SIZE - 1)) { + errno = EINVAL; + return MAP_FAILED; + } + return __mmap2(addr, len, prot, flags, fd, offset / ANDROID_PAGE_SIZE); +} +#endif + #if defined(OSF1) && defined(__GNUC__) /* @@ -2796,7 +2785,11 @@ static void _PR_InitIOV(void) _md_iovector._stat64 = stat; _md_iovector._lseek64 = _MD_Unix_lseek64; #elif defined(_PR_HAVE_OFF64_T) -#if defined(IRIX5_3) +#if defined(IRIX5_3) || defined(ANDROID) + /* + * Android doesn't have open64. We pass the O_LARGEFILE flag to open + * in _MD_open. + */ _md_iovector._open64 = open; #else _md_iovector._open64 = open64; diff --git a/pr/src/md/unix/unix_errors.c b/pr/src/md/unix/unix_errors.c index a1b88dc0..5fd95d2a 100644 --- a/pr/src/md/unix/unix_errors.c +++ b/pr/src/md/unix/unix_errors.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "primpl.h" #if defined(_PR_POLL_AVAILABLE) @@ -112,6 +80,7 @@ void _MD_unix_map_default_error(int err) prError = PR_FILE_TOO_BIG_ERROR; break; case EHOSTUNREACH: + case EHOSTDOWN: prError = PR_HOST_UNREACHABLE_ERROR; break; case EINPROGRESS: diff --git a/pr/src/md/unix/unixware.c b/pr/src/md/unix/unixware.c index cbcbb3eb..638af5f2 100644 --- a/pr/src/md/unix/unixware.c +++ b/pr/src/md/unix/unixware.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "primpl.h" diff --git a/pr/src/md/unix/uxpoll.c b/pr/src/md/unix/uxpoll.c index aa026568..8a618ed8 100644 --- a/pr/src/md/unix/uxpoll.c +++ b/pr/src/md/unix/uxpoll.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #if defined(_PR_PTHREADS) diff --git a/pr/src/md/unix/uxproces.c b/pr/src/md/unix/uxproces.c index 364301c8..95dd0747 100644 --- a/pr/src/md/unix/uxproces.c +++ b/pr/src/md/unix/uxproces.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "primpl.h" @@ -48,7 +16,9 @@ #endif #if defined(DARWIN) +#if defined(HAVE_CRT_EXTERNS_H) #include <crt_externs.h> +#endif #else PR_IMPORT_DATA(char **) environ; #endif @@ -185,11 +155,19 @@ ForkAndExec( if (NULL == childEnvp) { #ifdef DARWIN +#ifdef HAVE_CRT_EXTERNS_H childEnvp = *(_NSGetEnviron()); #else + /* _NSGetEnviron() is not available on iOS. */ + PR_DELETE(process); + PR_SetError(PR_NOT_IMPLEMENTED_ERROR, 0); + return NULL; +#endif +#else childEnvp = environ; #endif } + for (nEnv = 0; childEnvp[nEnv]; nEnv++) { } newEnvp = (char **) PR_MALLOC((nEnv + 2) * sizeof(char *)); diff --git a/pr/src/md/unix/uxrng.c b/pr/src/md/unix/uxrng.c index cafd928a..7223aa3d 100644 --- a/pr/src/md/unix/uxrng.c +++ b/pr/src/md/unix/uxrng.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1999-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "primpl.h" @@ -75,7 +43,11 @@ GetHighResClock(void *buf, size_t maxbytes) { PRUint64 t; +#ifdef __GNUC__ + __asm__ __volatile__("mov %0 = ar.itc" : "=r" (t)); +#else t = _Asm_mov_from_ar(_AREG44); +#endif return _pr_CopyLowBits(buf, maxbytes, &t, sizeof(t)); } #else @@ -122,7 +94,7 @@ GetHighResClock(void *buf, size_t maxbytes) #elif (defined(LINUX) || defined(FREEBSD) || defined(__FreeBSD_kernel__) \ || defined(NETBSD) || defined(__NetBSD_kernel__) || defined(OPENBSD) \ - || defined(SYMBIAN)) + || defined(SYMBIAN) || defined(__GNU__)) #include <sys/types.h> #include <sys/stat.h> #include <fcntl.h> diff --git a/pr/src/md/unix/uxshm.c b/pr/src/md/unix/uxshm.c index 4eef6728..dec4e3a7 100644 --- a/pr/src/md/unix/uxshm.c +++ b/pr/src/md/unix/uxshm.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /* ** uxshm.c -- Unix Implementations NSPR Named Shared Memory diff --git a/pr/src/md/unix/uxwrap.c b/pr/src/md/unix/uxwrap.c index ef226a6b..b183e5ac 100644 --- a/pr/src/md/unix/uxwrap.c +++ b/pr/src/md/unix/uxwrap.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /* *------------------------------------------------------------------------ diff --git a/pr/src/md/windows/Makefile.in b/pr/src/md/windows/Makefile.in index 235b85ae..04bd716d 100644 --- a/pr/src/md/windows/Makefile.in +++ b/pr/src/md/windows/Makefile.in @@ -1,39 +1,7 @@ # -# ***** BEGIN LICENSE BLOCK ***** -# Version: MPL 1.1/GPL 2.0/LGPL 2.1 -# -# The contents of this file are subject to the Mozilla Public License Version -# 1.1 (the "License"); you may not use this file except in compliance with -# the License. You may obtain a copy of the License at -# http://www.mozilla.org/MPL/ -# -# Software distributed under the License is distributed on an "AS IS" basis, -# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License -# for the specific language governing rights and limitations under the -# License. -# -# The Original Code is the Netscape Portable Runtime (NSPR). -# -# The Initial Developer of the Original Code is -# Netscape Communications Corporation. -# Portions created by the Initial Developer are Copyright (C) 1998-2000 -# the Initial Developer. All Rights Reserved. -# -# Contributor(s): -# -# Alternatively, the contents of this file may be used under the terms of -# either the GNU General Public License Version 2 or later (the "GPL"), or -# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), -# in which case the provisions of the GPL or the LGPL are applicable instead -# of those above. If you wish to allow use of your version of this file only -# under the terms of either the GPL or the LGPL, and not to allow others to -# use your version of this file under the terms of the MPL, indicate your -# decision by deleting the provisions above and replace them with the notice -# and other provisions required by the GPL or the LGPL. If you do not delete -# the provisions above, a recipient may use your version of this file under -# the terms of any one of the MPL, the GPL or the LGPL. -# -# ***** END LICENSE BLOCK ***** +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. #! gmake @@ -93,7 +61,7 @@ include $(topsrcdir)/config/rules.mk export:: $(TARGETS) # Bug 122433 workaround: disable global optimization (-Og-) on ntio.c. -ifdef BUILD_OPT +ifdef MOZ_OPTIMIZE ifeq ($(OS_TARGET), WINNT) ifndef NS_USE_GCC $(OBJDIR)/ntio.$(OBJ_SUFFIX): ntio.c diff --git a/pr/src/md/windows/ntdllmn.c b/pr/src/md/windows/ntdllmn.c index fa8d25f6..7dec0517 100644 --- a/pr/src/md/windows/ntdllmn.c +++ b/pr/src/md/windows/ntdllmn.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /* * The DLL entry point (DllMain) for NSPR. diff --git a/pr/src/md/windows/ntgc.c b/pr/src/md/windows/ntgc.c index e12b30d6..55ac92fb 100644 --- a/pr/src/md/windows/ntgc.c +++ b/pr/src/md/windows/ntgc.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /* * GC related routines @@ -87,7 +55,7 @@ PRWord *_MD_HomeGCRegisters(PRThread *t, int isCurrent, int *np) t->md.gcContext[0] = 0; /* context.Eax */ t->md.gcContext[1] = fiberData[0x2e]; /* context.Ebx */ t->md.gcContext[2] = 0; /* context.Ecx */ - t->md.gcContext[2] = 0; /* context.Edx */ + t->md.gcContext[3] = 0; /* context.Edx */ t->md.gcContext[4] = fiberData[0x2d]; /* context.Esi */ t->md.gcContext[5] = fiberData[0x2c]; /* context.Edi */ t->md.gcContext[6] = fiberData[0x36]; /* context.Esp */ diff --git a/pr/src/md/windows/ntinrval.c b/pr/src/md/windows/ntinrval.c index f96c27b5..dab9e3fe 100644 --- a/pr/src/md/windows/ntinrval.c +++ b/pr/src/md/windows/ntinrval.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /* * NT interval timers diff --git a/pr/src/md/windows/ntio.c b/pr/src/md/windows/ntio.c index 5fecc537..aba53dc8 100644 --- a/pr/src/md/windows/ntio.c +++ b/pr/src/md/windows/ntio.c @@ -1,40 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * Masayuki Nakano <masayuki@d-toybox.com> - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /* Windows NT IO module * @@ -2740,20 +2707,20 @@ void FlipSlashes(char *cp, int len) ** */ -PRStatus +PRInt32 _PR_MD_CLOSE_DIR(_MDDir *d) { if ( d ) { if (FindClose( d->d_hdl )) { d->magic = (PRUint32)-1; - return PR_SUCCESS; + return 0; } else { _PR_MD_MAP_CLOSEDIR_ERROR(GetLastError()); - return PR_FAILURE; + return -1; } } PR_SetError(PR_INVALID_ARGUMENT_ERROR, 0); - return PR_FAILURE; + return -1; } diff --git a/pr/src/md/windows/ntmisc.c b/pr/src/md/windows/ntmisc.c index c47b5995..e23f6725 100644 --- a/pr/src/md/windows/ntmisc.c +++ b/pr/src/md/windows/ntmisc.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /* * ntmisc.c @@ -597,6 +565,7 @@ PRProcess * _PR_CreateWindowsProcess( #else STARTUPINFO startupInfo; #endif + DWORD creationFlags = 0; PROCESS_INFORMATION procInfo; BOOL retVal; char *cmdLine = NULL; @@ -677,6 +646,12 @@ PRProcess * _PR_CreateWindowsProcess( if (attr->stdoutFd) { startupInfo.hStdOutput = (HANDLE) attr->stdoutFd->secret->md.osfd; redirected = PR_TRUE; + /* + * If stdout is redirected, we can assume that the process will + * not write anything useful to the console windows, and therefore + * automatically set the CREATE_NO_WINDOW flag. + */ + creationFlags |= CREATE_NO_WINDOW; } if (attr->stderrFd) { startupInfo.hStdError = (HANDLE) attr->stderrFd->secret->md.osfd; @@ -703,7 +678,7 @@ PRProcess * _PR_CreateWindowsProcess( NULL, /* security attributes for the primary * thread in the new process */ TRUE, /* inherit handles */ - 0, /* creation flags */ + creationFlags, envBlock, /* an environment block, consisting * of a null-terminated block of * null-terminated strings. Each @@ -724,7 +699,7 @@ PRProcess * _PR_CreateWindowsProcess( NULL, /* security attributes for the primary * thread in the new process */ TRUE, /* inherit handles */ - 0, /* creation flags */ + creationFlags, envBlock, /* an environment block, consisting * of a null-terminated block of * null-terminated strings. Each diff --git a/pr/src/md/windows/ntsec.c b/pr/src/md/windows/ntsec.c index 1acb6c4c..c0682e45 100644 --- a/pr/src/md/windows/ntsec.c +++ b/pr/src/md/windows/ntsec.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "primpl.h" diff --git a/pr/src/md/windows/ntsem.c b/pr/src/md/windows/ntsem.c index b25fac62..cc71fe30 100644 --- a/pr/src/md/windows/ntsem.c +++ b/pr/src/md/windows/ntsem.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /* * NT-specific semaphore handling code. diff --git a/pr/src/md/windows/ntthread.c b/pr/src/md/windows/ntthread.c index 4c8fa624..3814142d 100644 --- a/pr/src/md/windows/ntthread.c +++ b/pr/src/md/windows/ntthread.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "primpl.h" #include <process.h> /* for _beginthreadex() */ @@ -308,6 +276,42 @@ _PR_MD_SET_PRIORITY(_MDThread *thread, PRThreadPriority newPri) return; } +const DWORD MS_VC_EXCEPTION = 0x406D1388; + +#pragma pack(push,8) +typedef struct tagTHREADNAME_INFO +{ + DWORD dwType; // Must be 0x1000. + LPCSTR szName; // Pointer to name (in user addr space). + DWORD dwThreadID; // Thread ID (-1=caller thread). + DWORD dwFlags; // Reserved for future use, must be zero. +} THREADNAME_INFO; +#pragma pack(pop) + +void +_PR_MD_SET_CURRENT_THREAD_NAME(const char *name) +{ +#ifdef _MSC_VER + THREADNAME_INFO info; + + if (!IsDebuggerPresent()) + return; + + info.dwType = 0x1000; + info.szName = (char*) name; + info.dwThreadID = -1; + info.dwFlags = 0; + + __try { + RaiseException(MS_VC_EXCEPTION, + 0, + sizeof(info) / sizeof(ULONG_PTR), + (ULONG_PTR*)&info); + } __except(EXCEPTION_CONTINUE_EXECUTION) { + } +#endif +} + void _PR_MD_CLEAN_THREAD(PRThread *thread) { diff --git a/pr/src/md/windows/objs.mk b/pr/src/md/windows/objs.mk index 82ee36ec..89f022e8 100644 --- a/pr/src/md/windows/objs.mk +++ b/pr/src/md/windows/objs.mk @@ -1,39 +1,7 @@ # -# ***** BEGIN LICENSE BLOCK ***** -# Version: MPL 1.1/GPL 2.0/LGPL 2.1 -# -# The contents of this file are subject to the Mozilla Public License Version -# 1.1 (the "License"); you may not use this file except in compliance with -# the License. You may obtain a copy of the License at -# http://www.mozilla.org/MPL/ -# -# Software distributed under the License is distributed on an "AS IS" basis, -# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License -# for the specific language governing rights and limitations under the -# License. -# -# The Original Code is the Netscape Portable Runtime (NSPR). -# -# The Initial Developer of the Original Code is -# Netscape Communications Corporation. -# Portions created by the Initial Developer are Copyright (C) 1998-2000 -# the Initial Developer. All Rights Reserved. -# -# Contributor(s): -# -# Alternatively, the contents of this file may be used under the terms of -# either the GNU General Public License Version 2 or later (the "GPL"), or -# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), -# in which case the provisions of the GPL or the LGPL are applicable instead -# of those above. If you wish to allow use of your version of this file only -# under the terms of either the GPL or the LGPL, and not to allow others to -# use your version of this file under the terms of the MPL, indicate your -# decision by deleting the provisions above and replace them with the notice -# and other provisions required by the GPL or the LGPL. If you do not delete -# the provisions above, a recipient may use your version of this file under -# the terms of any one of the MPL, the GPL or the LGPL. -# -# ***** END LICENSE BLOCK ***** +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. ifeq ($(OS_TARGET),WINNT) diff --git a/pr/src/md/windows/w32ipcsem.c b/pr/src/md/windows/w32ipcsem.c index 443cd7fa..95459100 100644 --- a/pr/src/md/windows/w32ipcsem.c +++ b/pr/src/md/windows/w32ipcsem.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1999-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /* * File: w32ipcsem.c diff --git a/pr/src/md/windows/w32poll.c b/pr/src/md/windows/w32poll.c index 2caaac2a..38e2ad97 100644 --- a/pr/src/md/windows/w32poll.c +++ b/pr/src/md/windows/w32poll.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /* * This file implements _PR_MD_PR_POLL for Win32. diff --git a/pr/src/md/windows/w32rng.c b/pr/src/md/windows/w32rng.c index 5232b5fa..633ae0da 100644 --- a/pr/src/md/windows/w32rng.c +++ b/pr/src/md/windows/w32rng.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1999-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include <windows.h> #include <time.h> diff --git a/pr/src/md/windows/w32shm.c b/pr/src/md/windows/w32shm.c index e34a436a..8e8b1d68 100644 --- a/pr/src/md/windows/w32shm.c +++ b/pr/src/md/windows/w32shm.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include <private/primpl.h> #include <string.h> diff --git a/pr/src/md/windows/w95cv.c b/pr/src/md/windows/w95cv.c index 975ac4b0..afff1b70 100644 --- a/pr/src/md/windows/w95cv.c +++ b/pr/src/md/windows/w95cv.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /* * w95cv.c -- Windows 95 Machine-Dependent Code for Condition Variables diff --git a/pr/src/md/windows/w95dllmain.c b/pr/src/md/windows/w95dllmain.c index 1dafe7a2..73707a6e 100644 --- a/pr/src/md/windows/w95dllmain.c +++ b/pr/src/md/windows/w95dllmain.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /* * The DLL entry point (DllMain) for NSPR. diff --git a/pr/src/md/windows/w95io.c b/pr/src/md/windows/w95io.c index f9b2cc43..dad08f25 100644 --- a/pr/src/md/windows/w95io.c +++ b/pr/src/md/windows/w95io.c @@ -1,40 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * Masayuki Nakano <masayuki@d-toybox.com> - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /* Windows 95 IO module * @@ -673,20 +640,20 @@ static void FlipSlashes(char *cp, size_t len) ** */ -PRStatus +PRInt32 _PR_MD_CLOSE_DIR(_MDDir *d) { if ( d ) { if (FindClose(d->d_hdl)) { d->magic = (PRUint32)-1; - return PR_SUCCESS; + return 0; } else { _PR_MD_MAP_CLOSEDIR_ERROR(GetLastError()); - return PR_FAILURE; + return -1; } } PR_SetError(PR_INVALID_ARGUMENT_ERROR, 0); - return PR_FAILURE; + return -1; } @@ -1578,20 +1545,20 @@ _PR_MD_READ_DIR_UTF16(_MDDirUTF16 *d, PRIntn flags) return NULL; } -PRStatus +PRInt32 _PR_MD_CLOSE_DIR_UTF16(_MDDirUTF16 *d) { if ( d ) { if (FindClose(d->d_hdl)) { d->magic = (PRUint32)-1; - return PR_SUCCESS; + return 0; } else { _PR_MD_MAP_CLOSEDIR_ERROR(GetLastError()); - return PR_FAILURE; + return -1; } } PR_SetError(PR_INVALID_ARGUMENT_ERROR, 0); - return PR_FAILURE; + return -1; } #define _PR_IS_W_SLASH(ch) ((ch) == L'/' || (ch) == L'\\') diff --git a/pr/src/md/windows/w95sock.c b/pr/src/md/windows/w95sock.c index 4e67a223..95077525 100644 --- a/pr/src/md/windows/w95sock.c +++ b/pr/src/md/windows/w95sock.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /* Win95 Sockets module * @@ -107,6 +75,7 @@ typedef struct _WSA_COMPATIBILITY_MODE { static HMODULE libWinsock2 = NULL; static WSAIOCTLPROC wsaioctlProc = NULL; static PRBool socketSetCompatMode = PR_FALSE; +static PRBool socketFixInet6RcvBuf = PR_FALSE; void _PR_MD_InitSockets(void) { @@ -130,6 +99,11 @@ void _PR_MD_InitSockets(void) } } } + else if (osvi.dwMajorVersion == 5 && osvi.dwMinorVersion == 1) + { + /* if Windows XP (32-bit) */ + socketFixInet6RcvBuf = PR_TRUE; + } } void _PR_MD_CleanupSockets(void) @@ -190,6 +164,27 @@ _PR_MD_SOCKET(int af, int type, int flags) } } + if (af == AF_INET6 && socketFixInet6RcvBuf) + { + int bufsize; + int len = sizeof(bufsize); + int rv; + + /* Windows XP 32-bit returns an error on getpeername() for AF_INET6 + * sockets if the receive buffer size is greater than 65535 before + * the connection is initiated. The default receive buffer size may + * be 128000 so fix it here to always be <= 65535. See bug 513659 + * and IBM DB2 support technote "Receive/Send IPv6 Socket Size + * Problem in Windows XP SP2 & SP3". + */ + rv = getsockopt(sock, SOL_SOCKET, SO_RCVBUF, (char*)&bufsize, &len); + if (rv == 0 && bufsize > 65535) + { + bufsize = 65535; + setsockopt(sock, SOL_SOCKET, SO_RCVBUF, (char*)&bufsize, len); + } + } + return (PROsfd)sock; } diff --git a/pr/src/md/windows/w95thred.c b/pr/src/md/windows/w95thred.c index fcf0a549..be92e208 100644 --- a/pr/src/md/windows/w95thred.c +++ b/pr/src/md/windows/w95thred.c @@ -1,44 +1,12 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "primpl.h" #include <process.h> /* for _beginthreadex() */ -#if _MSC_VER <= 1200 +#if defined(_MSC_VER) && _MSC_VER <= 1200 /* * VC++ 6.0 doesn't have DWORD_PTR. */ @@ -200,6 +168,42 @@ _PR_MD_SET_PRIORITY(_MDThread *thread, PRThreadPriority newPri) return; } +const DWORD MS_VC_EXCEPTION = 0x406D1388; + +#pragma pack(push,8) +typedef struct tagTHREADNAME_INFO +{ + DWORD dwType; // Must be 0x1000. + LPCSTR szName; // Pointer to name (in user addr space). + DWORD dwThreadID; // Thread ID (-1=caller thread). + DWORD dwFlags; // Reserved for future use, must be zero. +} THREADNAME_INFO; +#pragma pack(pop) + +void +_PR_MD_SET_CURRENT_THREAD_NAME(const char *name) +{ +#ifdef _MSC_VER + THREADNAME_INFO info; + + if (!IsDebuggerPresent()) + return; + + info.dwType = 0x1000; + info.szName = (char*) name; + info.dwThreadID = -1; + info.dwFlags = 0; + + __try { + RaiseException(MS_VC_EXCEPTION, + 0, + sizeof(info) / sizeof(ULONG_PTR), + (ULONG_PTR*)&info); + } __except(EXCEPTION_CONTINUE_EXECUTION) { + } +#endif +} + void _PR_MD_CLEAN_THREAD(PRThread *thread) { diff --git a/pr/src/md/windows/win32_errors.c b/pr/src/md/windows/win32_errors.c index ced1b7aa..d26820a7 100644 --- a/pr/src/md/windows/win32_errors.c +++ b/pr/src/md/windows/win32_errors.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "prerror.h" #include "prlog.h" diff --git a/pr/src/memory/Makefile.in b/pr/src/memory/Makefile.in index 6ba0ba78..3272cadb 100644 --- a/pr/src/memory/Makefile.in +++ b/pr/src/memory/Makefile.in @@ -1,39 +1,7 @@ # -# ***** BEGIN LICENSE BLOCK ***** -# Version: MPL 1.1/GPL 2.0/LGPL 2.1 -# -# The contents of this file are subject to the Mozilla Public License Version -# 1.1 (the "License"); you may not use this file except in compliance with -# the License. You may obtain a copy of the License at -# http://www.mozilla.org/MPL/ -# -# Software distributed under the License is distributed on an "AS IS" basis, -# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License -# for the specific language governing rights and limitations under the -# License. -# -# The Original Code is the Netscape Portable Runtime (NSPR). -# -# The Initial Developer of the Original Code is -# Netscape Communications Corporation. -# Portions created by the Initial Developer are Copyright (C) 1998-2000 -# the Initial Developer. All Rights Reserved. -# -# Contributor(s): -# -# Alternatively, the contents of this file may be used under the terms of -# either the GNU General Public License Version 2 or later (the "GPL"), or -# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), -# in which case the provisions of the GPL or the LGPL are applicable instead -# of those above. If you wish to allow use of your version of this file only -# under the terms of either the GPL or the LGPL, and not to allow others to -# use your version of this file under the terms of the MPL, indicate your -# decision by deleting the provisions above and replace them with the notice -# and other provisions required by the GPL or the LGPL. If you do not delete -# the provisions above, a recipient may use your version of this file under -# the terms of any one of the MPL, the GPL or the LGPL. -# -# ***** END LICENSE BLOCK ***** +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. #! gmake @@ -48,18 +16,10 @@ include $(topsrcdir)/config/config.mk CSRCS = prseg.c prshm.c prshma.c -ifdef GC_LEAK_DETECTOR -CSRCS += prgcleak.c -endif - TARGETS = $(OBJS) INCLUDES = -I$(dist_includedir) -I$(topsrcdir)/pr/include -I$(topsrcdir)/pr/include/private -ifdef GC_LEAK_DETECTOR -INCLUDES += -I$(dist_includedir)/.. -I$(dist_includedir)/../boehm -endif - DEFINES += -D_NSPR_BUILD_ include $(topsrcdir)/config/rules.mk diff --git a/pr/src/memory/prgcleak.c b/pr/src/memory/prgcleak.c deleted file mode 100644 index 414b3851..00000000 --- a/pr/src/memory/prgcleak.c +++ /dev/null @@ -1,122 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1999-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * Patrick Beard <beard@netscape.com> - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ - -/* - * prgcleak.c - */ - -#ifdef GC_LEAK_DETECTOR - -/* for FILE */ -#include <stdio.h> - -/* NSPR stuff */ -#include "generic_threads.h" -#include "primpl.h" - -extern FILE *GC_stdout, *GC_stderr; - -extern void GC_gcollect(void); -extern void GC_clear_roots(void); - -static PRStatus PR_CALLBACK scanner(PRThread* t, void** baseAddr, - PRUword count, void* closure) -{ - if (count) { - char* begin = (char*)baseAddr; - char* end = (char*)(baseAddr + count); - GC_mark_range_proc marker = (GC_mark_range_proc) closure; - marker(begin, end); - } - return PR_SUCCESS; -} - -static void mark_all_stacks(GC_mark_range_proc marker) -{ - PR_ScanStackPointers(&scanner, (void *)marker); -} - -#if defined(_PR_PTHREADS) -#define _PR_MD_CURRENT_CPU() 1 -#endif - -static void locker(void* mutex) -{ - if (_PR_MD_CURRENT_CPU()) - PR_EnterMonitor(mutex); -} - -static void unlocker(void* mutex) -{ - if (_PR_MD_CURRENT_CPU()) - PR_ExitMonitor(mutex); -} - -static void stopper(void* unused) -{ - if (_PR_MD_CURRENT_CPU()) - PR_SuspendAll(); -} - -static void starter(void* unused) -{ - if (_PR_MD_CURRENT_CPU()) - PR_ResumeAll(); -} - -void _PR_InitGarbageCollector() -{ - void* mutex; - - /* redirect GC's stderr to catch startup leaks. */ - GC_stderr = fopen("StartupLeaks", "w"); - - mutex = PR_NewMonitor(); - PR_ASSERT(mutex != NULL); - - GC_generic_init_threads(&mark_all_stacks, mutex, - &locker, &unlocker, - &stopper, &starter); -} - -void _PR_ShutdownGarbageCollector() -{ - /* do anything you need to shut down the collector. */ -} - -#endif /* GC_LEAK_DETECTOR */ diff --git a/pr/src/memory/prseg.c b/pr/src/memory/prseg.c index 14de6668..ecad1d0c 100644 --- a/pr/src/memory/prseg.c +++ b/pr/src/memory/prseg.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "primpl.h" diff --git a/pr/src/memory/prshm.c b/pr/src/memory/prshm.c index ac633952..59237e6e 100644 --- a/pr/src/memory/prshm.c +++ b/pr/src/memory/prshm.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /* ** prshm.c -- NSPR Named Shared Memory diff --git a/pr/src/memory/prshma.c b/pr/src/memory/prshma.c index fbc22578..c73d7ec1 100644 --- a/pr/src/memory/prshma.c +++ b/pr/src/memory/prshma.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /* ** prshma.h -- NSPR Anonymous Shared Memory diff --git a/pr/src/misc/Makefile.in b/pr/src/misc/Makefile.in index 8e7c9815..3d87da20 100644 --- a/pr/src/misc/Makefile.in +++ b/pr/src/misc/Makefile.in @@ -1,39 +1,7 @@ # -# ***** BEGIN LICENSE BLOCK ***** -# Version: MPL 1.1/GPL 2.0/LGPL 2.1 -# -# The contents of this file are subject to the Mozilla Public License Version -# 1.1 (the "License"); you may not use this file except in compliance with -# the License. You may obtain a copy of the License at -# http://www.mozilla.org/MPL/ -# -# Software distributed under the License is distributed on an "AS IS" basis, -# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License -# for the specific language governing rights and limitations under the -# License. -# -# The Original Code is the Netscape Portable Runtime (NSPR). -# -# The Initial Developer of the Original Code is -# Netscape Communications Corporation. -# Portions created by the Initial Developer are Copyright (C) 1998-2000 -# the Initial Developer. All Rights Reserved. -# -# Contributor(s): -# -# Alternatively, the contents of this file may be used under the terms of -# either the GNU General Public License Version 2 or later (the "GPL"), or -# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), -# in which case the provisions of the GPL or the LGPL are applicable instead -# of those above. If you wish to allow use of your version of this file only -# under the terms of either the GPL or the LGPL, and not to allow others to -# use your version of this file under the terms of the MPL, indicate your -# decision by deleting the provisions above and replace them with the notice -# and other provisions required by the GPL or the LGPL. If you do not delete -# the provisions above, a recipient may use your version of this file under -# the terms of any one of the MPL, the GPL or the LGPL. -# -# ***** END LICENSE BLOCK ***** +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. #! gmake diff --git a/pr/src/misc/compile-et.pl b/pr/src/misc/compile-et.pl index 9f0d90bc..50855298 100644 --- a/pr/src/misc/compile-et.pl +++ b/pr/src/misc/compile-et.pl @@ -3,41 +3,9 @@ # usage: compile-et input.et # -# ***** BEGIN LICENSE BLOCK ***** -# Version: MPL 1.1/GPL 2.0/LGPL 2.1 -# -# The contents of this file are subject to the Mozilla Public License Version -# 1.1 (the "License"); you may not use this file except in compliance with -# the License. You may obtain a copy of the License at -# http://www.mozilla.org/MPL/ -# -# Software distributed under the License is distributed on an "AS IS" basis, -# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License -# for the specific language governing rights and limitations under the -# License. -# -# The Original Code is the Netscape Portable Runtime (NSPR). -# -# The Initial Developer of the Original Code is -# Netscape Communications Corporation. -# Portions created by the Initial Developer are Copyright (C) 1998-2000 -# the Initial Developer. All Rights Reserved. -# -# Contributor(s): -# -# Alternatively, the contents of this file may be used under the terms of -# either the GNU General Public License Version 2 or later (the "GPL"), or -# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), -# in which case the provisions of the GPL or the LGPL are applicable instead -# of those above. If you wish to allow use of your version of this file only -# under the terms of either the GPL or the LGPL, and not to allow others to -# use your version of this file under the terms of the MPL, indicate your -# decision by deleting the provisions above and replace them with the notice -# and other provisions required by the GPL or the LGPL. If you do not delete -# the provisions above, a recipient may use your version of this file under -# the terms of any one of the MPL, the GPL or the LGPL. -# -# ***** END LICENSE BLOCK ***** +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. sub header { diff --git a/pr/src/misc/dtoa.c b/pr/src/misc/dtoa.c index a065a20e..c39e8925 100644 --- a/pr/src/misc/dtoa.c +++ b/pr/src/misc/dtoa.c @@ -70,7 +70,8 @@ * #define IBM for IBM mainframe-style floating-point arithmetic. * #define VAX for VAX-style floating-point arithmetic (D_floating). * #define No_leftright to omit left-right logic in fast floating-point - * computation of dtoa. + * computation of dtoa. This will cause dtoa modes 4 and 5 to be + * treated the same as modes 2 and 3 for some inputs. * #define Honor_FLT_ROUNDS if FLT_ROUNDS can assume the values 2 or 3 * and strtod and dtoa should round accordingly. Unless Trust_FLT_ROUNDS * is also #defined, fegetround() will be queried for the rounding mode. @@ -78,13 +79,18 @@ * standard (and are specified to be consistent, with fesetround() * affecting the value of FLT_ROUNDS), but that some (Linux) systems * do not work correctly in this regard, so using fegetround() is more - * portable than using FLT_FOUNDS directly. + * portable than using FLT_ROUNDS directly. * #define Check_FLT_ROUNDS if FLT_ROUNDS can assume the values 2 or 3 * and Honor_FLT_ROUNDS is not #defined. * #define RND_PRODQUOT to use rnd_prod and rnd_quot (assembly routines * that use extended-precision instructions to compute rounded * products and quotients) with IBM. - * #define ROUND_BIASED for IEEE-format with biased rounding. + * #define ROUND_BIASED for IEEE-format with biased rounding and arithmetic + * that rounds toward +Infinity. + * #define ROUND_BIASED_without_Round_Up for IEEE-format with biased + * rounding when the underlying floating-point arithmetic uses + * unbiased rounding. This prevent using ordinary floating-point + * arithmetic when the result could be computed with one rounding error. * #define Inaccurate_Divide for IEEE-format with correctly rounded * products but inaccurate quotients, e.g., for Intel i860. * #define NO_LONG_LONG on machines that do not have a "long long" @@ -453,6 +459,11 @@ extern int strtod_diglim; #ifndef IEEE_Arith #define ROUND_BIASED +#else +#ifdef ROUND_BIASED_without_Round_Up +#undef ROUND_BIASED +#define ROUND_BIASED +#endif #endif #ifdef RND_PRODQUOT @@ -658,7 +669,7 @@ s2b #ifdef KR_headers (s, nd0, nd, y9, dplen) CONST char *s; int nd0, nd, dplen; ULong y9; #else - (CONST char *s, int nd0, int nd, ULong y9, int dplen) + (const char *s, int nd0, int nd, ULong y9, int dplen) #endif { Bigint *b; @@ -1527,7 +1538,7 @@ match #ifdef KR_headers (sp, t) char **sp, *t; #else - (CONST char **sp, char *t) + (const char **sp, const char *t) #endif { int c, d; @@ -1549,7 +1560,7 @@ hexnan #ifdef KR_headers (rvp, sp) U *rvp; CONST char **sp; #else - (U *rvp, CONST char **sp) + (U *rvp, const char **sp) #endif { ULong c, x[2]; @@ -1622,6 +1633,41 @@ hexnan #define kshift 4 #define kmask 15 #endif + +#if !defined(NO_HEX_FP) || defined(Honor_FLT_ROUNDS) /*{*/ + static Bigint * +#ifdef KR_headers +increment(b) Bigint *b; +#else +increment(Bigint *b) +#endif +{ + ULong *x, *xe; + Bigint *b1; + + x = b->x; + xe = x + b->wds; + do { + if (*x < (ULong)0xffffffffL) { + ++*x; + return b; + } + *x++ = 0; + } while(x < xe); + { + if (b->wds >= b->maxwds) { + b1 = Balloc(b->k+1); + Bcopy(b1,b); + Bfree(b); + b = b1; + } + b->x[b->wds++] = 1; + } + return b; + } + +#endif /*}*/ + #ifndef NO_HEX_FP /*{*/ static void @@ -1694,37 +1740,6 @@ enum { /* rounding values: same as FLT_ROUNDS */ Round_down = 3 }; - static Bigint * -#ifdef KR_headers -increment(b) Bigint *b; -#else -increment(Bigint *b) -#endif -{ - ULong *x, *xe; - Bigint *b1; - - x = b->x; - xe = x + b->wds; - do { - if (*x < (ULong)0xffffffffL) { - ++*x; - return b; - } - *x++ = 0; - } while(x < xe); - { - if (b->wds >= b->maxwds) { - b1 = Balloc(b->k+1); - Bcopy(b1,b); - Bfree(b); - b = b1; - } - b->x[b->wds++] = 1; - } - return b; - } - void #ifdef KR_headers gethex(sp, rvp, rounding, sign) @@ -2252,7 +2267,7 @@ bigcomp (rv, s0, bc) U *rv; CONST char *s0; BCinfo *bc; #else - (U *rv, CONST char *s0, BCinfo *bc) + (U *rv, const char *s0, BCinfo *bc) #endif { Bigint *b, *d; @@ -2381,7 +2396,7 @@ bigcomp b = multadd(b, 10, 0); dig = quorem(b,d); } - if (b->x[0] || b->wds > 1) + if (b->x[0] || b->wds > 1 || dig > 0) dd = -1; ret: Bfree(b); @@ -2460,7 +2475,7 @@ strtod #ifdef KR_headers (s00, se) CONST char *s00; char **se; #else - (CONST char *s00, char **se) + (const char *s00, char **se) #endif { int bb2, bb5, bbe, bd2, bd5, bbbits, bs2, c, e, e1; @@ -2478,6 +2493,9 @@ strtod #ifdef SET_INEXACT int oldinexact; #endif +#ifndef NO_STRTOD_BIGCOMP + int req_bigcomp = 0; +#endif #ifdef Honor_FLT_ROUNDS /*{*/ #ifdef Trust_FLT_ROUNDS /*{{ only define this if FLT_ROUNDS really works! */ bc.rounding = Flt_Rounds; @@ -2573,6 +2591,8 @@ strtod for(; c == '0'; c = *++s) nz++; if (c > '0' && c <= '9') { + bc.dp0 = s0 - s; + bc.dp1 = bc.dp0 + bc.dplen; s0 = s; nf += nz; nz = 0; @@ -2700,6 +2720,7 @@ strtod ) { if (!e) goto ret; +#ifndef ROUND_BIASED_without_Round_Up if (e > 0) { if (e <= Ten_pmax) { #ifdef VAX @@ -2760,6 +2781,7 @@ strtod goto ret; } #endif +#endif /* ROUND_BIASED_without_Round_Up */ } e1 += nd - k; @@ -2791,9 +2813,6 @@ strtod if (e1 &= ~15) { if (e1 > DBL_MAX_10_EXP) { ovfl: -#ifndef NO_ERRNO - errno = ERANGE; -#endif /* Can't trust HUGE_VAL */ #ifdef IEEE_Arith #ifdef Honor_FLT_ROUNDS @@ -2820,6 +2839,17 @@ strtod word0(&rv) = Big0; word1(&rv) = Big1; #endif /*IEEE_Arith*/ + range_err: + if (bd0) { + Bfree(bb); + Bfree(bd); + Bfree(bs); + Bfree(bd0); + Bfree(delta); + } +#ifndef NO_ERRNO + errno = ERANGE; +#endif goto ret; } e1 >>= 4; @@ -2884,10 +2914,7 @@ strtod if (!dval(&rv)) { undfl: dval(&rv) = 0.; -#ifndef NO_ERRNO - errno = ERANGE; -#endif - goto ret; + goto range_err; } #ifndef Avoid_Underflow word0(&rv) = Tiny0; @@ -3026,12 +3053,17 @@ strtod i = cmp(delta, bs); #ifndef NO_STRTOD_BIGCOMP /*{*/ if (bc.nd > nd && i <= 0) { - if (bc.dsign) - break; /* Must use bigcomp(). */ + if (bc.dsign) { + /* Must use bigcomp(). */ + req_bigcomp = 1; + break; + } #ifdef Honor_FLT_ROUNDS if (bc.rounding != 1) { - if (i < 0) + if (i < 0) { + req_bigcomp = 1; break; + } } else #endif @@ -3123,7 +3155,7 @@ strtod adj.d *= ulp(&rv); if (bc.dsign) { if (word0(&rv) == Big0 && word1(&rv) == Big1) - goto ovflfree; + goto ovfl; dval(&rv) += adj.d; } else @@ -3174,6 +3206,8 @@ strtod #endif 0xffffffff)) { /*boundary case -- increment exponent*/ + if (word0(&rv) == Big0 && word1(&rv) == Big1) + goto ovfl; word0(&rv) = (word0(&rv) & Exp_mask) + Exp_msk1 #ifdef IBM @@ -3338,17 +3372,8 @@ strtod dval(&rv) += adj.d; if ((word0(&rv) & Exp_mask) >= Exp_msk1*(DBL_MAX_EXP+Bias-P)) { - if (word0(&rv0) == Big0 && word1(&rv0) == Big1) { -#ifdef Honor_FLT_ROUNDS - ovflfree: -#endif - Bfree(bb); - Bfree(bd); - Bfree(bs); - Bfree(bd0); - Bfree(delta); + if (word0(&rv0) == Big0 && word1(&rv0) == Big1) goto ovfl; - } word0(&rv) = Big0; word1(&rv) = Big1; goto cont; @@ -3467,9 +3492,15 @@ strtod Bfree(bd0); Bfree(delta); #ifndef NO_STRTOD_BIGCOMP - if (bc.nd > nd && bc.dsign) { + if (req_bigcomp) { + bd0 = 0; bc.e0 += nz1; bigcomp(&rv, s0, &bc); + y = word0(&rv) & Exp_mask; + if (y == Exp_mask) + goto ovfl; + if (y == 0 && rv.d == 0.) + goto undfl; } #endif #ifdef SET_INEXACT @@ -3543,7 +3574,7 @@ rv_alloc(int i) #ifdef KR_headers nrv_alloc(s, rve, n) char *s, **rve; int n; #else -nrv_alloc(char *s, char **rve, int n) +nrv_alloc(const char *s, char **rve, int n) #endif { char *rv, *t; @@ -3666,6 +3697,11 @@ dtoa U d2, eps, u; double ds; char *s, *s0; +#ifndef No_leftright +#ifdef IEEE_Arith + U eps1; +#endif +#endif #ifdef SET_INEXACT int inexact, oldinexact; #endif @@ -3929,14 +3965,26 @@ dtoa * generating digits needed. */ dval(&eps) = 0.5/tens[ilim-1] - dval(&eps); +#ifdef IEEE_Arith + if (k0 < 0 && j1 >= 307) { + eps1.d = 1.01e256; /* 1.01 allows roundoff in the next few lines */ + word0(&eps1) -= Exp_msk1 * (Bias+P-1); + dval(&eps1) *= tens[j1 & 0xf]; + for(i = 0, j = (j1-256) >> 4; j; j >>= 1, i++) + if (j & 1) + dval(&eps1) *= bigtens[i]; + if (eps.d < eps1.d) + eps.d = eps1.d; + } +#endif for(i = 0;;) { L = dval(&u); dval(&u) -= L; *s++ = '0' + (int)L; - if (dval(&u) < dval(&eps)) - goto ret1; if (1. - dval(&u) < dval(&eps)) goto bump_up; + if (dval(&u) < dval(&eps)) + goto ret1; if (++i >= ilim) break; dval(&eps) *= 10.; @@ -4010,7 +4058,12 @@ dtoa } #endif dval(&u) += dval(&u); - if (dval(&u) > ds || (dval(&u) == ds && L & 1)) { +#ifdef ROUND_BIASED + if (dval(&u) >= ds) +#else + if (dval(&u) > ds || (dval(&u) == ds && L & 1)) +#endif + { bump_up: while(*--s == '9') if (s == s0) { @@ -4094,15 +4147,6 @@ dtoa * and for all and pass them and a shift to quorem, so it * can do shifts and ors to compute the numerator for q. */ -#ifdef Pack_32 - if ((i = ((s5 ? 32 - hi0bits(S->x[S->wds-1]) : 1) + s2) & 0x1f)) - i = 32 - i; -#define iInc 28 -#else - if (i = ((s5 ? 32 - hi0bits(S->x[S->wds-1]) : 1) + s2) & 0xf) - i = 16 - i; -#define iInc 12 -#endif i = dshift(S, s2); b2 += i; m2 += i; @@ -4195,7 +4239,11 @@ dtoa if (j1 > 0) { b = lshift(b, 1); j1 = cmp(b, S); +#ifdef ROUND_BIASED + if (j1 >= 0 /*)*/ +#else if ((j1 > 0 || (j1 == 0 && dig & 1)) +#endif && dig++ == '9') goto round_9_up; } @@ -4255,7 +4303,12 @@ dtoa #endif b = lshift(b, 1); j = cmp(b, S); - if (j > 0 || (j == 0 && dig & 1)) { +#ifdef ROUND_BIASED + if (j >= 0) +#else + if (j > 0 || (j == 0 && dig & 1)) +#endif + { roundoff: while(*--s == '9') if (s == s0) { diff --git a/pr/src/misc/pralarm.c b/pr/src/misc/pralarm.c index 932d077f..8f642bb1 100644 --- a/pr/src/misc/pralarm.c +++ b/pr/src/misc/pralarm.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "primpl.h" diff --git a/pr/src/misc/pratom.c b/pr/src/misc/pratom.c index 35b86c0d..95bbee1d 100644 --- a/pr/src/misc/pratom.c +++ b/pr/src/misc/pratom.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /* ** PR Atomic operations diff --git a/pr/src/misc/prcountr.c b/pr/src/misc/prcountr.c index a4e4f6cc..e47ff1b6 100644 --- a/pr/src/misc/prcountr.c +++ b/pr/src/misc/prcountr.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /* ** prcountr.c -- NSPR Instrumentation Counters diff --git a/pr/src/misc/prdtoa.c b/pr/src/misc/prdtoa.c index e1507dfa..22769261 100644 --- a/pr/src/misc/prdtoa.c +++ b/pr/src/misc/prdtoa.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /* * This file is based on the third-party code dtoa.c. We minimize our @@ -46,6 +14,7 @@ #endif #include "primpl.h" +#include "prbit.h" #define MULTIPLE_THREADS #define ACQUIRE_DTOA_LOCK(n) PR_Lock(dtoa_lock[n]) @@ -83,6 +52,8 @@ void _PR_CleanupDtoa(void) #define ULong PRUint32 #define NO_LONG_LONG +#define No_Hex_NaN + /**************************************************************** * * The author of this software is David M. Gay. @@ -742,6 +713,9 @@ hi0bits (register ULong x) #endif { +#ifdef PR_HAVE_BUILTIN_BITSCAN32 + return( (!x) ? 32 : pr_bitscan_clz32(x) ); +#else register int k = 0; if (!(x & 0xffff0000)) { @@ -766,6 +740,7 @@ hi0bits return 32; } return k; +#endif /* PR_HAVE_BUILTIN_BITSCAN32 */ } static int @@ -776,6 +751,15 @@ lo0bits (ULong *y) #endif { +#ifdef PR_HAVE_BUILTIN_BITSCAN32 + int k; + ULong x = *y; + + if (x>1) + *y = ( x >> (k = pr_bitscan_ctz32(x)) ); + else + k = ((x ^ 1) << 5); +#else register int k; register ULong x = *y; @@ -813,6 +797,7 @@ lo0bits return 32; } *y = x; +#endif /* PR_HAVE_BUILTIN_BITSCAN32 */ return k; } diff --git a/pr/src/misc/prenv.c b/pr/src/misc/prenv.c index e07e0737..7c9f58c0 100644 --- a/pr/src/misc/prenv.c +++ b/pr/src/misc/prenv.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include <string.h> #include "primpl.h" diff --git a/pr/src/misc/prerr.c b/pr/src/misc/prerr.c index 4db31132..bc78c8fb 100644 --- a/pr/src/misc/prerr.c +++ b/pr/src/misc/prerr.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /* * diff --git a/pr/src/misc/prerr.et b/pr/src/misc/prerr.et index 8578f95f..fa81aafc 100644 --- a/pr/src/misc/prerr.et +++ b/pr/src/misc/prerr.et @@ -1,39 +1,7 @@ # -# ***** BEGIN LICENSE BLOCK ***** -# Version: MPL 1.1/GPL 2.0/LGPL 2.1 -# -# The contents of this file are subject to the Mozilla Public License Version -# 1.1 (the "License"); you may not use this file except in compliance with -# the License. You may obtain a copy of the License at -# http://www.mozilla.org/MPL/ -# -# Software distributed under the License is distributed on an "AS IS" basis, -# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License -# for the specific language governing rights and limitations under the -# License. -# -# The Original Code is the Netscape Portable Runtime (NSPR). -# -# The Initial Developer of the Original Code is -# Netscape Communications Corporation. -# Portions created by the Initial Developer are Copyright (C) 1998-2000 -# the Initial Developer. All Rights Reserved. -# -# Contributor(s): -# -# Alternatively, the contents of this file may be used under the terms of -# either the GNU General Public License Version 2 or later (the "GPL"), or -# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), -# in which case the provisions of the GPL or the LGPL are applicable instead -# of those above. If you wish to allow use of your version of this file only -# under the terms of either the GPL or the LGPL, and not to allow others to -# use your version of this file under the terms of the MPL, indicate your -# decision by deleting the provisions above and replace them with the notice -# and other provisions required by the GPL or the LGPL. If you do not delete -# the provisions above, a recipient may use your version of this file under -# the terms of any one of the MPL, the GPL or the LGPL. -# -# ***** END LICENSE BLOCK ***** +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. et nspr -6000 diff --git a/pr/src/misc/prerr.properties b/pr/src/misc/prerr.properties index 58a02859..ef236b13 100644 --- a/pr/src/misc/prerr.properties +++ b/pr/src/misc/prerr.properties @@ -1,39 +1,7 @@ # -# ***** BEGIN LICENSE BLOCK ***** -# Version: MPL 1.1/GPL 2.0/LGPL 2.1 -# -# The contents of this file are subject to the Mozilla Public License Version -# 1.1 (the "License"); you may not use this file except in compliance with -# the License. You may obtain a copy of the License at -# http://www.mozilla.org/MPL/ -# -# Software distributed under the License is distributed on an "AS IS" basis, -# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License -# for the specific language governing rights and limitations under the -# License. -# -# The Original Code is the Netscape Portable Runtime (NSPR). -# -# The Initial Developer of the Original Code is -# Netscape Communications Corporation. -# Portions created by the Initial Developer are Copyright (C) 1998-2000 -# the Initial Developer. All Rights Reserved. -# -# Contributor(s): -# -# Alternatively, the contents of this file may be used under the terms of -# either the GNU General Public License Version 2 or later (the "GPL"), or -# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), -# in which case the provisions of the GPL or the LGPL are applicable instead -# of those above. If you wish to allow use of your version of this file only -# under the terms of either the GPL or the LGPL, and not to allow others to -# use your version of this file under the terms of the MPL, indicate your -# decision by deleting the provisions above and replace them with the notice -# and other provisions required by the GPL or the LGPL. If you do not delete -# the provisions above, a recipient may use your version of this file under -# the terms of any one of the MPL, the GPL or the LGPL. -# -# ***** END LICENSE BLOCK ***** +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. # # prerr.properties diff --git a/pr/src/misc/prerror.c b/pr/src/misc/prerror.c index f578f2d2..19f7794b 100644 --- a/pr/src/misc/prerror.c +++ b/pr/src/misc/prerror.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "primpl.h" diff --git a/pr/src/misc/prerrortable.c b/pr/src/misc/prerrortable.c index a51b4e8f..48be3f52 100644 --- a/pr/src/misc/prerrortable.c +++ b/pr/src/misc/prerrortable.c @@ -1,38 +1,6 @@ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ diff --git a/pr/src/misc/prinit.c b/pr/src/misc/prinit.c index 7071e0a0..5eda4a2a 100644 --- a/pr/src/misc/prinit.c +++ b/pr/src/misc/prinit.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "primpl.h" #include <ctype.h> @@ -137,6 +105,10 @@ PR_IMPLEMENT(PRBool) PR_VersionCheck(const char *importedVersion) return PR_TRUE; } /* PR_VersionCheck */ +PR_IMPLEMENT(const char*) PR_GetVersion(void) +{ + return PR_VERSION; +} PR_IMPLEMENT(PRBool) PR_Initialized(void) { @@ -205,10 +177,6 @@ static void _PR_InitStuff(void) _pr_sleeplock = PR_NewLock(); PR_ASSERT(NULL != _pr_sleeplock); -#ifdef GC_LEAK_DETECTOR - _PR_InitGarbageCollector(); -#endif - _PR_InitThreads(PR_USER_THREAD, PR_PRIORITY_NORMAL, 0); #ifdef WIN16 @@ -803,7 +771,7 @@ PR_IMPLEMENT(PRStatus) PR_CallOnce( if (!_pr_initialized) _PR_ImplicitInitialization(); if (!once->initialized) { - if (PR_AtomicSet(&once->inProgress, 1) == 0) { + if (PR_ATOMIC_SET(&once->inProgress, 1) == 0) { once->status = (*func)(); PR_Lock(mod_init.ml); once->initialized = 1; @@ -832,7 +800,7 @@ PR_IMPLEMENT(PRStatus) PR_CallOnceWithArg( if (!_pr_initialized) _PR_ImplicitInitialization(); if (!once->initialized) { - if (PR_AtomicSet(&once->inProgress, 1) == 0) { + if (PR_ATOMIC_SET(&once->inProgress, 1) == 0) { once->status = (*func)(arg); PR_Lock(mod_init.ml); once->initialized = 1; diff --git a/pr/src/misc/prinrval.c b/pr/src/misc/prinrval.c index 17229e80..b404356b 100644 --- a/pr/src/misc/prinrval.c +++ b/pr/src/misc/prinrval.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /* * file: prinrval.c diff --git a/pr/src/misc/pripc.c b/pr/src/misc/pripc.c index cb16aad9..e41a2afc 100644 --- a/pr/src/misc/pripc.c +++ b/pr/src/misc/pripc.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1999-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /* * File: pripc.c diff --git a/pr/src/misc/pripcsem.c b/pr/src/misc/pripcsem.c index c6c59ec9..a1768978 100644 --- a/pr/src/misc/pripcsem.c +++ b/pr/src/misc/pripcsem.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1999-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /* * File: pripcsem.c diff --git a/pr/src/misc/prlog2.c b/pr/src/misc/prlog2.c index d1a688ad..2d476cd7 100644 --- a/pr/src/misc/prlog2.c +++ b/pr/src/misc/prlog2.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "prbit.h" @@ -42,20 +10,8 @@ */ PR_IMPLEMENT(PRIntn) PR_CeilingLog2(PRUint32 n) { - PRIntn log2 = 0; - - if (n & (n-1)) - log2++; - if (n >> 16) - log2 += 16, n >>= 16; - if (n >> 8) - log2 += 8, n >>= 8; - if (n >> 4) - log2 += 4, n >>= 4; - if (n >> 2) - log2 += 2, n >>= 2; - if (n >> 1) - log2++; + PRIntn log2; + PR_CEILING_LOG2(log2, n); return log2; } @@ -65,17 +21,7 @@ PR_IMPLEMENT(PRIntn) PR_CeilingLog2(PRUint32 n) */ PR_IMPLEMENT(PRIntn) PR_FloorLog2(PRUint32 n) { - PRIntn log2 = 0; - - if (n >> 16) - log2 += 16, n >>= 16; - if (n >> 8) - log2 += 8, n >>= 8; - if (n >> 4) - log2 += 4, n >>= 4; - if (n >> 2) - log2 += 2, n >>= 2; - if (n >> 1) - log2++; + PRIntn log2; + PR_FLOOR_LOG2(log2, n); return log2; } diff --git a/pr/src/misc/prlong.c b/pr/src/misc/prlong.c index 650d4bc9..630b2a86 100644 --- a/pr/src/misc/prlong.c +++ b/pr/src/misc/prlong.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "primpl.h" diff --git a/pr/src/misc/prnetdb.c b/pr/src/misc/prnetdb.c index 8a2a00c4..c21e1695 100644 --- a/pr/src/misc/prnetdb.c +++ b/pr/src/misc/prnetdb.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "primpl.h" @@ -95,7 +63,8 @@ PRLock *_pr_dnsLock = NULL; #if defined(SOLARIS) || (defined(BSDI) && defined(_REENTRANT)) \ || (defined(LINUX) && defined(_REENTRANT) \ - && !(defined(__GLIBC__) && __GLIBC__ >= 2)) + && !(defined(__GLIBC__) && __GLIBC__ >= 2) \ + && !defined(ANDROID)) #define _PR_HAVE_GETPROTO_R #define _PR_HAVE_GETPROTO_R_POINTER #endif @@ -1185,6 +1154,16 @@ PR_IMPLEMENT(PRStatus) PR_GetHostByAddr( * any usable implementation. */ +#if defined(ANDROID) +/* Android's Bionic libc system includes prototypes for these in netdb.h, + * but doesn't actually include implementations. It uses the 5-arg form, + * so these functions end up not matching the prototype. So just rename + * them if not found. + */ +#define getprotobyname_r _pr_getprotobyname_r +#define getprotobynumber_r _pr_getprotobynumber_r +#endif + static struct protoent *getprotobyname_r(const char* name) { return getprotobyname(name); @@ -2019,7 +1998,7 @@ PR_IMPLEMENT(PRAddrInfo *) PR_GetAddrInfoByName(const char *hostname, #endif { PRADDRINFO *res, hints; - PRStatus rv; + int rv; /* * we assume a RFC 2553 compliant getaddrinfo. this may at some @@ -2028,7 +2007,32 @@ PR_IMPLEMENT(PRAddrInfo *) PR_GetAddrInfoByName(const char *hostname, */ memset(&hints, 0, sizeof(hints)); - hints.ai_flags = (flags & PR_AI_NOCANONNAME) ? 0: AI_CANONNAME; + if (!(flags & PR_AI_NOCANONNAME)) + hints.ai_flags |= AI_CANONNAME; +#ifdef AI_ADDRCONFIG + /* + * Propagate AI_ADDRCONFIG to the GETADDRINFO call if PR_AI_ADDRCONFIG + * is set. + * + * Need a workaround for loopback host addresses: + * The problem is that in glibc and Windows, AI_ADDRCONFIG applies the + * existence of an outgoing network interface to IP addresses of the + * loopback interface, due to a strict interpretation of the + * specification. For example, if a computer does not have any + * outgoing IPv6 network interface, but its loopback network interface + * supports IPv6, a getaddrinfo call on "localhost" with AI_ADDRCONFIG + * won't return the IPv6 loopback address "::1", because getaddrinfo + * thinks the computer cannot connect to any IPv6 destination, + * ignoring the remote vs. local/loopback distinction. + */ + if ((flags & PR_AI_ADDRCONFIG) && + strcmp(hostname, "localhost") != 0 && + strcmp(hostname, "localhost.localdomain") != 0 && + strcmp(hostname, "localhost6") != 0 && + strcmp(hostname, "localhost6.localdomain6") != 0) { + hints.ai_flags |= AI_ADDRCONFIG; + } +#endif hints.ai_family = (af == PR_AF_INET) ? AF_INET : AF_UNSPEC; /* @@ -2041,6 +2045,12 @@ PR_IMPLEMENT(PRAddrInfo *) PR_GetAddrInfoByName(const char *hostname, hints.ai_socktype = SOCK_STREAM; rv = GETADDRINFO(hostname, NULL, &hints, &res); +#ifdef AI_ADDRCONFIG + if (rv == EAI_BADFLAGS && (hints.ai_flags & AI_ADDRCONFIG)) { + hints.ai_flags &= ~AI_ADDRCONFIG; + rv = GETADDRINFO(hostname, NULL, &hints, &res); + } +#endif if (rv == 0) return (PRAddrInfo *) res; diff --git a/pr/src/misc/prolock.c b/pr/src/misc/prolock.c index a1d8a0f3..312e1f47 100644 --- a/pr/src/misc/prolock.c +++ b/pr/src/misc/prolock.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /* ** prolock.c -- NSPR Ordered Lock diff --git a/pr/src/misc/prrng.c b/pr/src/misc/prrng.c index 6cd7e239..b5c38f82 100644 --- a/pr/src/misc/prrng.c +++ b/pr/src/misc/prrng.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "primpl.h" diff --git a/pr/src/misc/prsystem.c b/pr/src/misc/prsystem.c index 1996468f..f79d5884 100644 --- a/pr/src/misc/prsystem.c +++ b/pr/src/misc/prsystem.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "primpl.h" #include "prsystem.h" @@ -77,6 +45,12 @@ #include <sys/utsname.h> #endif +#if defined(LINUX) +#include <string.h> +#include <ctype.h> +#define MAX_LINE 512 +#endif + #if defined(AIX) #include <cf.h> #include <sys/cfgodm.h> @@ -255,8 +229,41 @@ PR_IMPLEMENT(PRInt32) PR_GetNumberOfProcessors( void ) numCpus = sysconf( _SC_NPROC_ONLN ); #elif defined(RISCOS) || defined(SYMBIAN) numCpus = 1; +#elif defined(LINUX) + /* for the benefit of devices with advanced power-saving, that + actually hotplug their cpus in heavy load, try to figure out + the real number of CPUs */ + char buf[MAX_LINE]; + FILE *fin; + const char *cpu_present = "/sys/devices/system/cpu/present"; + size_t strsize; + numCpus = 0; + fin = fopen(cpu_present, "r"); + if (fin != NULL) { + if (fgets(buf, MAX_LINE, fin) != NULL) { + /* check that the format is what we expect */ + if (buf[0] == '0') { + strsize = strlen(buf); + if (strsize == 1) { + /* single core */ + numCpus = 1; + } else if (strsize >= 3 && strsize <= 5) { + /* should be of the form 0-999 */ + /* parse the part after the 0-, note count is 0-based */ + if (buf[1] == '-' && isdigit(buf[2])) { + numCpus = 1 + atoi(buf + 2); + } + } + } + } + fclose(fin); + } + /* if that fails, fall back to more standard methods */ + if (!numCpus) { + numCpus = sysconf( _SC_NPROCESSORS_CONF ); + } #elif defined(XP_UNIX) - numCpus = sysconf( _SC_NPROCESSORS_ONLN ); + numCpus = sysconf( _SC_NPROCESSORS_CONF ); #else #error "An implementation is required" #endif @@ -282,7 +289,22 @@ PR_IMPLEMENT(PRUint64) PR_GetPhysicalMemorySize(void) long pageSize = sysconf(_SC_PAGESIZE); long pageCount = sysconf(_SC_PHYS_PAGES); - bytes = (PRUint64) pageSize * pageCount; + if (pageSize >= 0 && pageCount >= 0) + bytes = (PRUint64) pageSize * pageCount; + +#elif defined(NETBSD) || defined(OPENBSD) + + int mib[2]; + int rc; + uint64_t memSize; + size_t len = sizeof(memSize); + + mib[0] = CTL_HW; + mib[1] = HW_PHYSMEM64; + rc = sysctl(mib, 2, &memSize, &len, NULL, 0); + if (-1 != rc) { + bytes = memSize; + } #elif defined(HPUX) diff --git a/pr/src/misc/prthinfo.c b/pr/src/misc/prthinfo.c index 6dcf9c6a..2477899c 100644 --- a/pr/src/misc/prthinfo.c +++ b/pr/src/misc/prthinfo.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "prlog.h" #include "prthread.h" @@ -149,7 +117,6 @@ PR_ThreadScanStackPointers(PRThread* t, if (status != PR_SUCCESS) return status; -#ifndef GC_LEAK_DETECTOR /* if thread is not allocated on stack, this is redundant. */ ptd = t->privateData; for (index = 0; index < t->tpdLength; index++, ptd++) { @@ -157,7 +124,6 @@ PR_ThreadScanStackPointers(PRThread* t, if (status != PR_SUCCESS) return status; } -#endif return PR_SUCCESS; } diff --git a/pr/src/misc/prtime.c b/pr/src/misc/prtime.c index dee268cb..93d227a3 100644 --- a/pr/src/misc/prtime.c +++ b/pr/src/misc/prtime.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /* * prtime.c -- @@ -1497,8 +1465,9 @@ PR_ParseTimeStringToExplodedTime( /* "-" is ignored at the beginning of a token if we have not yet parsed a year (e.g., the second "-" in "30-AUG-1966"), or if the character after the dash is not a digit. */ - if (*rest == '-' && ((rest > string && isalpha(rest[-1]) && year < 0) - || rest[1] < '0' || rest[1] > '9')) + if (*rest == '-' && ((rest > string && + isalpha((unsigned char)rest[-1]) && year < 0) || + rest[1] < '0' || rest[1] > '9')) { rest++; goto SKIP_MORE; @@ -1728,7 +1697,7 @@ PR_FormatTime(char *buf, int buflen, const char *fmt, const PRExplodedTime *tm) #if defined(SUNOS4) || (__GLIBC__ >= 2) || defined(XP_BEOS) \ || defined(NETBSD) || defined(OPENBSD) || defined(FREEBSD) \ - || defined(DARWIN) || defined(SYMBIAN) + || defined(DARWIN) || defined(SYMBIAN) || defined(ANDROID) a.tm_zone = NULL; a.tm_gmtoff = tm->tm_params.tp_gmt_offset + tm->tm_params.tp_dst_offset; diff --git a/pr/src/misc/prtpool.c b/pr/src/misc/prtpool.c index e23bb9d0..8870a3cf 100644 --- a/pr/src/misc/prtpool.c +++ b/pr/src/misc/prtpool.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1999-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "nspr.h" diff --git a/pr/src/misc/prtrace.c b/pr/src/misc/prtrace.c index 762dd821..07e70451 100644 --- a/pr/src/misc/prtrace.c +++ b/pr/src/misc/prtrace.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /* ** prtrace.c -- NSPR Trace Instrumentation diff --git a/pr/src/nspr.def b/pr/src/nspr.def index 14ffaef2..7777a3db 100644 --- a/pr/src/nspr.def +++ b/pr/src/nspr.def @@ -1,39 +1,7 @@ ;+# -;+# ***** BEGIN LICENSE BLOCK ***** -;+# Version: MPL 1.1/GPL 2.0/LGPL 2.1 -;+# -;+# The contents of this file are subject to the Mozilla Public License Version -;+# 1.1 (the "License"); you may not use this file except in compliance with -;+# the License. You may obtain a copy of the License at -;+# http://www.mozilla.org/MPL/ -;+# -;+# Software distributed under the License is distributed on an "AS IS" basis, -;+# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License -;+# for the specific language governing rights and limitations under the -;+# License. -;+# -;+# The Original Code is the Netscape Portable Runtime (NSPR). -;+# -;+# The Initial Developer of the Original Code is -;+# Netscape Communications Corporation. -;+# Portions created by the Initial Developer are Copyright (C) 2002-2003 -;+# the Initial Developer. All Rights Reserved. -;+# -;+# Contributor(s): -;+# -;+# Alternatively, the contents of this file may be used under the terms of -;+# either the GNU General Public License Version 2 or later (the "GPL"), or -;+# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), -;+# in which case the provisions of the GPL or the LGPL are applicable instead -;+# of those above. If you wish to allow use of your version of this file only -;+# under the terms of either the GPL or the LGPL, and not to allow others to -;+# use your version of this file under the terms of the MPL, indicate your -;+# decision by deleting the provisions above and replace them with the notice -;+# and other provisions required by the GPL or the LGPL. If you do not delete -;+# the provisions above, a recipient may use your version of this file under -;+# the terms of any one of the MPL, the GPL or the LGPL. -;+# -;+# ***** END LICENSE BLOCK ***** +;+# This Source Code Form is subject to the terms of the Mozilla Public +;+# License, v. 2.0. If a copy of the MPL was not distributed with this +;+# file, You can obtain one at http://mozilla.org/MPL/2.0/. ;+# ;+# OK, this file is meant to support SUN, LINUX, AIX, OS/2 and WINDOWS ;+# 1. For all unix platforms, the string ";-" means "remove this line" @@ -474,3 +442,12 @@ EXPORTS ;- PR_AssertCurrentThreadOwnsLock; PR_AssertCurrentThreadInMonitor; ;+} NSPR_4.7; +;+NSPR_4.8.9 { +;+ global: + PR_GetVersion; +;+} NSPR_4.8; +;+NSPR_4.9.2 { +;+ global: + PR_GetThreadName; + PR_SetCurrentThreadName; +;+} NSPR_4.8.9; diff --git a/pr/src/nspr.rc b/pr/src/nspr.rc index da223135..bdfb1bdc 100644 --- a/pr/src/nspr.rc +++ b/pr/src/nspr.rc @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "prinit.h" #include <winver.h> diff --git a/pr/src/os2extra.def b/pr/src/os2extra.def index 8dbb34da..2cbf5ad4 100644 --- a/pr/src/os2extra.def +++ b/pr/src/os2extra.def @@ -1,3 +1,7 @@ +; This Source Code Form is subject to the terms of the Mozilla Public +; License, v. 2.0. If a copy of the MPL was not distributed with this +; file, You can obtain one at http://mozilla.org/MPL/2.0/. + ; ; Support plugins that were explicitly linked to the Visual Age ; version of nspr4.dll. diff --git a/pr/src/prvrsion.c b/pr/src/prvrsion.c index 7c494c65..67be5382 100644 --- a/pr/src/prvrsion.c +++ b/pr/src/prvrsion.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "prinit.h" #include "prvrsion.h" diff --git a/pr/src/pthreads/Makefile.in b/pr/src/pthreads/Makefile.in index 006a3e8c..d0dcdbc6 100644 --- a/pr/src/pthreads/Makefile.in +++ b/pr/src/pthreads/Makefile.in @@ -1,39 +1,7 @@ # -# ***** BEGIN LICENSE BLOCK ***** -# Version: MPL 1.1/GPL 2.0/LGPL 2.1 -# -# The contents of this file are subject to the Mozilla Public License Version -# 1.1 (the "License"); you may not use this file except in compliance with -# the License. You may obtain a copy of the License at -# http://www.mozilla.org/MPL/ -# -# Software distributed under the License is distributed on an "AS IS" basis, -# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License -# for the specific language governing rights and limitations under the -# License. -# -# The Original Code is the Netscape Portable Runtime (NSPR). -# -# The Initial Developer of the Original Code is -# Netscape Communications Corporation. -# Portions created by the Initial Developer are Copyright (C) 1998-2000 -# the Initial Developer. All Rights Reserved. -# -# Contributor(s): -# -# Alternatively, the contents of this file may be used under the terms of -# either the GNU General Public License Version 2 or later (the "GPL"), or -# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), -# in which case the provisions of the GPL or the LGPL are applicable instead -# of those above. If you wish to allow use of your version of this file only -# under the terms of either the GPL or the LGPL, and not to allow others to -# use your version of this file under the terms of the MPL, indicate your -# decision by deleting the provisions above and replace them with the notice -# and other provisions required by the GPL or the LGPL. If you do not delete -# the provisions above, a recipient may use your version of this file under -# the terms of any one of the MPL, the GPL or the LGPL. -# -# ***** END LICENSE BLOCK ***** +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. #! gmake diff --git a/pr/src/pthreads/ptio.c b/pr/src/pthreads/ptio.c index 23f415cc..928f80a8 100644 --- a/pr/src/pthreads/ptio.c +++ b/pr/src/pthreads/ptio.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /* ** File: ptio.c @@ -218,6 +186,20 @@ static PRBool _pr_ipv6_v6only_on_by_default; #error "Cannot determine architecture" #endif +#if defined(SOLARIS) +#ifndef PROTO_SDP +/* on solaris, SDP is a new type of protocol */ +#define PROTO_SDP 257 +#endif +#define _PR_HAVE_SDP +#elif defined(LINUX) +#ifndef AF_INET_SDP +/* on linux, SDP is a new type of address family */ +#define AF_INET_SDP 27 +#endif +#define _PR_HAVE_SDP +#endif /* LINUX */ + static PRFileDesc *pt_SetMethods( PRIntn osfd, PRDescType type, PRBool isAcceptedSocket, PRBool imported); @@ -1621,7 +1603,8 @@ static PRStatus pt_ConnectContinue( PR_SetError(PR_BAD_DESCRIPTOR_ERROR, 0); return PR_FAILURE; } - if ((out_flags & (PR_POLL_WRITE | PR_POLL_EXCEPT | PR_POLL_ERR)) == 0) + if ((out_flags & (PR_POLL_WRITE | PR_POLL_EXCEPT | PR_POLL_ERR + | PR_POLL_HUP)) == 0) { PR_ASSERT(out_flags == 0); PR_SetError(PR_IN_PROGRESS_ERROR, 0); @@ -3452,7 +3435,9 @@ PR_IMPLEMENT(PRFileDesc*) PR_Socket(PRInt32 domain, PRInt32 type, PRInt32 proto) PRIntn osfd; PRDescType ftype; PRFileDesc *fd = NULL; - PRInt32 tmp_domain = domain; +#if defined(_PR_INET6_PROBE) || !defined(_PR_INET6) + PRInt32 tmp_domain = domain; +#endif if (!_pr_initialized) _PR_ImplicitInitialization(); @@ -3460,6 +3445,12 @@ PR_IMPLEMENT(PRFileDesc*) PR_Socket(PRInt32 domain, PRInt32 type, PRInt32 proto) if (PF_INET != domain && PR_AF_INET6 != domain +#if defined(_PR_HAVE_SDP) + && PR_AF_INET_SDP != domain +#if defined(SOLARIS) + && PR_AF_INET6_SDP != domain +#endif /* SOLARIS */ +#endif /* _PR_HAVE_SDP */ && PF_UNIX != domain) { PR_SetError(PR_ADDRESS_NOT_SUPPORTED_ERROR, 0); @@ -3472,6 +3463,20 @@ PR_IMPLEMENT(PRFileDesc*) PR_Socket(PRInt32 domain, PRInt32 type, PRInt32 proto) (void)PR_SetError(PR_ADDRESS_NOT_SUPPORTED_ERROR, 0); return fd; } +#if defined(_PR_HAVE_SDP) +#if defined(LINUX) + if (PR_AF_INET_SDP == domain) + domain = AF_INET_SDP; +#elif defined(SOLARIS) + if (PR_AF_INET_SDP == domain) { + domain = AF_INET; + proto = PROTO_SDP; + } else if(PR_AF_INET6_SDP == domain) { + domain = AF_INET6; + proto = PROTO_SDP; + } +#endif /* SOLARIS */ +#endif /* _PR_HAVE_SDP */ #if defined(_PR_INET6_PROBE) if (PR_AF_INET6 == domain) domain = _pr_ipv6_is_present() ? AF_INET6 : AF_INET; diff --git a/pr/src/pthreads/ptmisc.c b/pr/src/pthreads/ptmisc.c index 920d00db..bbc6d56b 100644 --- a/pr/src/pthreads/ptmisc.c +++ b/pr/src/pthreads/ptmisc.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /* ** File: ptmisc.c diff --git a/pr/src/pthreads/ptsynch.c b/pr/src/pthreads/ptsynch.c index 8b141cd1..11412d4d 100644 --- a/pr/src/pthreads/ptsynch.c +++ b/pr/src/pthreads/ptsynch.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /* ** File: ptsynch.c @@ -148,13 +116,13 @@ static void pt_PostNotifies(PRLock *lock, PRBool unlock) } #if defined(DEBUG) pt_debug.cvars_notified += 1; - if (0 > PR_AtomicDecrement(&cv->notify_pending)) + if (0 > PR_ATOMIC_DECREMENT(&cv->notify_pending)) { pt_debug.delayed_cv_deletes += 1; PR_DestroyCondVar(cv); } #else /* defined(DEBUG) */ - if (0 > PR_AtomicDecrement(&cv->notify_pending)) + if (0 > PR_ATOMIC_DECREMENT(&cv->notify_pending)) PR_DestroyCondVar(cv); #endif /* defined(DEBUG) */ } @@ -196,7 +164,7 @@ PR_IMPLEMENT(void) PR_DestroyLock(PRLock *lock) memset(lock, 0xaf, sizeof(PRLock)); pt_debug.locks_destroyed += 1; #endif - PR_DELETE(lock); + PR_Free(lock); } /* PR_DestroyLock */ PR_IMPLEMENT(void) PR_Lock(PRLock *lock) @@ -338,7 +306,7 @@ static void pt_PostNotifyToCvar(PRCondVar *cvar, PRBool broadcast) } /* A brand new entry in the array */ - (void)PR_AtomicIncrement(&cvar->notify_pending); + (void)PR_ATOMIC_INCREMENT(&cvar->notify_pending); notified->cv[index].times = (broadcast) ? -1 : 1; notified->cv[index].cv = cvar; notified->length += 1; @@ -367,14 +335,14 @@ PR_IMPLEMENT(PRCondVar*) PR_NewCondVar(PRLock *lock) PR_IMPLEMENT(void) PR_DestroyCondVar(PRCondVar *cvar) { - if (0 > PR_AtomicDecrement(&cvar->notify_pending)) + if (0 > PR_ATOMIC_DECREMENT(&cvar->notify_pending)) { PRIntn rv = pthread_cond_destroy(&cvar->cv); PR_ASSERT(0 == rv); #if defined(DEBUG) memset(cvar, 0xaf, sizeof(PRCondVar)); pt_debug.cvars_destroyed += 1; #endif - PR_DELETE(cvar); + PR_Free(cvar); } } /* PR_DestroyCondVar */ @@ -463,6 +431,7 @@ PR_IMPLEMENT(PRMonitor*) PR_NewMonitor(void) { PRMonitor *mon; PRCondVar *cvar; + int rv; if (!_pr_initialized) _PR_ImplicitInitialization(); @@ -473,25 +442,37 @@ PR_IMPLEMENT(PRMonitor*) PR_NewMonitor(void) return NULL; } mon = PR_NEWZAP(PRMonitor); - if (mon != NULL) + if (mon == NULL) { - int rv; - rv = _PT_PTHREAD_MUTEX_INIT(mon->lock.mutex, _pt_mattr); - PR_ASSERT(0 == rv); + PR_Free(cvar); + PR_SetError(PR_OUT_OF_MEMORY_ERROR, 0); + return NULL; + } - _PT_PTHREAD_INVALIDATE_THR_HANDLE(mon->owner); + rv = _PT_PTHREAD_MUTEX_INIT(mon->lock.mutex, _pt_mattr); + PR_ASSERT(0 == rv); + if (0 != rv) + { + PR_Free(mon); + PR_Free(cvar); + PR_SetError(PR_OPERATION_NOT_SUPPORTED_ERROR, 0); + return NULL; + } - mon->cvar = cvar; - rv = _PT_PTHREAD_COND_INIT(mon->cvar->cv, _pt_cvar_attr); - PR_ASSERT(0 == rv); - mon->entryCount = 0; - mon->cvar->lock = &mon->lock; - if (0 != rv) - { - PR_DELETE(mon); - PR_DELETE(cvar); - mon = NULL; - } + _PT_PTHREAD_INVALIDATE_THR_HANDLE(mon->owner); + + mon->cvar = cvar; + rv = _PT_PTHREAD_COND_INIT(mon->cvar->cv, _pt_cvar_attr); + PR_ASSERT(0 == rv); + mon->entryCount = 0; + mon->cvar->lock = &mon->lock; + if (0 != rv) + { + pthread_mutex_destroy(&mon->lock.mutex); + PR_Free(mon); + PR_Free(cvar); + PR_SetError(PR_OPERATION_NOT_SUPPORTED_ERROR, 0); + return NULL; } return mon; } /* PR_NewMonitor */ @@ -513,7 +494,7 @@ PR_IMPLEMENT(void) PR_DestroyMonitor(PRMonitor *mon) #if defined(DEBUG) memset(mon, 0xaf, sizeof(PRMonitor)); #endif - PR_DELETE(mon); + PR_Free(mon); } /* PR_DestroyMonitor */ @@ -674,7 +655,7 @@ PR_IMPLEMENT(void) PR_DestroySem(PRSemaphore *semaphore) "PR_DestroySem", "locks & condition variables"); PR_DestroyLock(semaphore->cvar->lock); PR_DestroyCondVar(semaphore->cvar); - PR_DELETE(semaphore); + PR_Free(semaphore); } /* PR_DestroySem */ PR_IMPLEMENT(PRSemaphore*) PR_NewSem(PRUintn value) @@ -700,7 +681,7 @@ PR_IMPLEMENT(PRSemaphore*) PR_NewSem(PRUintn value) } PR_DestroyLock(lock); } - PR_DELETE(semaphore); + PR_Free(semaphore); } return NULL; } @@ -757,7 +738,7 @@ PR_IMPLEMENT(PRSem *) PR_OpenSemaphore( if ((sem_t *) -1 == sem->sem) { _PR_MD_MAP_DEFAULT_ERROR(errno); - PR_DELETE(sem); + PR_Free(sem); return NULL; } return sem; @@ -796,7 +777,7 @@ PR_IMPLEMENT(PRStatus) PR_CloseSemaphore(PRSem *sem) _PR_MD_MAP_DEFAULT_ERROR(errno); return PR_FAILURE; } - PR_DELETE(sem); + PR_Free(sem); return PR_SUCCESS; } @@ -907,7 +888,7 @@ PR_IMPLEMENT(PRSem *) PR_OpenSemaphore( if (semctl(sem->semid, 0, SETVAL, arg) == -1) { _PR_MD_MAP_DEFAULT_ERROR(errno); - PR_DELETE(sem); + PR_Free(sem); return NULL; } /* call semop to set sem_otime to nonzero */ @@ -917,7 +898,7 @@ PR_IMPLEMENT(PRSem *) PR_OpenSemaphore( if (semop(sem->semid, &sop, 1) == -1) { _PR_MD_MAP_DEFAULT_ERROR(errno); - PR_DELETE(sem); + PR_Free(sem); return NULL; } return sem; @@ -926,7 +907,7 @@ PR_IMPLEMENT(PRSem *) PR_OpenSemaphore( if (errno != EEXIST || flags & PR_SEM_EXCL) { _PR_MD_MAP_DEFAULT_ERROR(errno); - PR_DELETE(sem); + PR_Free(sem); return NULL; } } @@ -935,7 +916,7 @@ PR_IMPLEMENT(PRSem *) PR_OpenSemaphore( if (sem->semid == -1) { _PR_MD_MAP_DEFAULT_ERROR(errno); - PR_DELETE(sem); + PR_Free(sem); return NULL; } for (i = 0; i < MAX_TRIES; i++) @@ -948,7 +929,7 @@ PR_IMPLEMENT(PRSem *) PR_OpenSemaphore( if (i == MAX_TRIES) { PR_SetError(PR_IO_TIMEOUT_ERROR, 0); - PR_DELETE(sem); + PR_Free(sem); return NULL; } return sem; @@ -986,7 +967,7 @@ PR_IMPLEMENT(PRStatus) PR_PostSemaphore(PRSem *sem) PR_IMPLEMENT(PRStatus) PR_CloseSemaphore(PRSem *sem) { - PR_DELETE(sem); + PR_Free(sem); return PR_SUCCESS; } @@ -1112,7 +1093,7 @@ PR_IMPLEMENT(void) PRP_DestroyNakedCondVar(PRCondVar *cvar) #if defined(DEBUG) memset(cvar, 0xaf, sizeof(PRCondVar)); #endif - PR_DELETE(cvar); + PR_Free(cvar); } /* PRP_DestroyNakedCondVar */ PR_IMPLEMENT(PRStatus) PRP_NakedWait( diff --git a/pr/src/pthreads/ptthread.c b/pr/src/pthreads/ptthread.c index 45afdac4..ccd31f62 100644 --- a/pr/src/pthreads/ptthread.c +++ b/pr/src/pthreads/ptthread.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /* ** File: ptthread.c @@ -51,6 +19,7 @@ #include <unistd.h> #include <string.h> #include <signal.h> +#include <dlfcn.h> #ifdef SYMBIAN /* In Open C sched_get_priority_min/max do not work properly, so we undefine @@ -102,42 +71,6 @@ static PRIntn pt_PriorityMap(PRThreadPriority pri) } #endif -#if defined(GC_LEAK_DETECTOR) && (__GLIBC__ >= 2) && defined(__i386__) - -#include <setjmp.h> - -typedef struct stack_frame stack_frame; - -struct stack_frame { - stack_frame* next; - void* pc; -}; - -static stack_frame* GetStackFrame() -{ - jmp_buf jb; - stack_frame* currentFrame; - setjmp(jb); - currentFrame = (stack_frame*)(jb[0].__jmpbuf[JB_BP]); - currentFrame = currentFrame->next; - return currentFrame; -} - -static void* GetStackTop() -{ - stack_frame* frame; - frame = GetStackFrame(); - while (frame != NULL) - { - ptrdiff_t pc = (ptrdiff_t)frame->pc; - if ((pc < 0x08000000) || (pc > 0x7fffffff) || (frame->next < frame)) - return frame; - frame = frame->next; - } - return NULL; -} -#endif /* GC_LEAK_DETECTOR && (__GLIBC__ >= 2) && __i386__ */ - /* ** Initialize a stack for a native pthread thread */ @@ -154,14 +87,9 @@ static void _PR_InitializeStack(PRThreadStack *ts) ts->stackBottom = ts->allocBase + ts->stackSize; ts->stackTop = ts->allocBase; #else -#ifdef GC_LEAK_DETECTOR - ts->stackTop = GetStackTop(); - ts->stackBottom = ts->stackTop - ts->stackSize; -#else ts->stackTop = ts->allocBase; ts->stackBottom = ts->allocBase - ts->stackSize; #endif -#endif } } @@ -752,10 +680,10 @@ PR_IMPLEMENT(PRStatus) PR_Interrupt(PRThread *thred) if ((NULL != cv) && !thred->interrupt_blocked) { PRIntn rv; - (void)PR_AtomicIncrement(&cv->notify_pending); + (void)PR_ATOMIC_INCREMENT(&cv->notify_pending); rv = pthread_cond_broadcast(&cv->cv); PR_ASSERT(0 == rv); - if (0 > PR_AtomicDecrement(&cv->notify_pending)) + if (0 > PR_ATOMIC_DECREMENT(&cv->notify_pending)) PR_DestroyCondVar(cv); } return PR_SUCCESS; @@ -821,8 +749,28 @@ PR_IMPLEMENT(PRStatus) PR_Sleep(PRIntervalTime ticks) static void _pt_thread_death(void *arg) { + void *thred; + int rv; + + _PT_PTHREAD_GETSPECIFIC(pt_book.key, thred); + if (NULL == thred) + { + /* + * Have PR_GetCurrentThread return the expected value to the + * destructors. + */ + rv = pthread_setspecific(pt_book.key, arg); + PR_ASSERT(0 == rv); + } + /* PR_TRUE for: call destructors */ _pt_thread_death_internal(arg, PR_TRUE); + + if (NULL == thred) + { + rv = pthread_setspecific(pt_book.key, NULL); + PR_ASSERT(0 == rv); + } } static void _pt_thread_death_internal(void *arg, PRBool callDestructors) @@ -847,6 +795,8 @@ static void _pt_thread_death_internal(void *arg, PRBool callDestructors) PR_Free(thred->privateData); if (NULL != thred->errorString) PR_Free(thred->errorString); + if (NULL != thred->name) + PR_Free(thred->name); PR_Free(thred->stack); if (NULL != thred->syspoll_list) PR_Free(thred->syspoll_list); @@ -1025,6 +975,7 @@ void _PR_Fini(void) rv = pthread_setspecific(pt_book.key, NULL); PR_ASSERT(0 == rv); } + _PT_PTHREAD_KEY_DELETE(pt_book.key); /* TODO: free other resources used by NSPR */ /* _pr_initialized = PR_FALSE; */ } /* _PR_Fini */ @@ -1665,6 +1616,88 @@ PR_IMPLEMENT(void*)PR_GetSP(PRThread *thred) #endif /* !defined(_PR_DCETHREADS) */ +PR_IMPLEMENT(PRStatus) PR_SetCurrentThreadName(const char *name) +{ + PRThread *thread; + size_t nameLen; + int result; + + if (!name) { + PR_SetError(PR_INVALID_ARGUMENT_ERROR, 0); + return PR_FAILURE; + } + + thread = PR_GetCurrentThread(); + if (!thread) + return PR_FAILURE; + + PR_Free(thread->name); + nameLen = strlen(name); + thread->name = (char *)PR_Malloc(nameLen + 1); + if (!thread->name) + return PR_FAILURE; + memcpy(thread->name, name, nameLen + 1); + +#if defined(OPENBSD) || defined(FREEBSD) + result = pthread_set_name_np(thread->id, name); +#else /* not BSD */ + /* + * On OSX, pthread_setname_np is only available in 10.6 or later, so test + * for it at runtime. It also may not be available on all linux distros. + */ +#if defined(DARWIN) + int (*dynamic_pthread_setname_np)(const char*); +#else + int (*dynamic_pthread_setname_np)(pthread_t, const char*); +#endif + + *(void**)(&dynamic_pthread_setname_np) = + dlsym(RTLD_DEFAULT, "pthread_setname_np"); + if (!dynamic_pthread_setname_np) + return PR_SUCCESS; + + /* + * The 15-character name length limit is an experimentally determined + * length of a null-terminated string that most linux distros and OS X + * accept as an argument to pthread_setname_np. Otherwise the E2BIG + * error is returned by the function. + */ +#define SETNAME_LENGTH_CONSTRAINT 15 +#define SETNAME_FRAGMENT1_LENGTH (SETNAME_LENGTH_CONSTRAINT >> 1) +#define SETNAME_FRAGMENT2_LENGTH \ + (SETNAME_LENGTH_CONSTRAINT - SETNAME_FRAGMENT1_LENGTH - 1) + char name_dup[SETNAME_LENGTH_CONSTRAINT + 1]; + if (nameLen > SETNAME_LENGTH_CONSTRAINT) { + memcpy(name_dup, name, SETNAME_FRAGMENT1_LENGTH); + name_dup[SETNAME_FRAGMENT1_LENGTH] = '~'; + /* Note that this also copies the null terminator. */ + memcpy(name_dup + SETNAME_FRAGMENT1_LENGTH + 1, + name + nameLen - SETNAME_FRAGMENT2_LENGTH, + SETNAME_FRAGMENT2_LENGTH + 1); + name = name_dup; + } + +#if defined(DARWIN) + result = dynamic_pthread_setname_np(name); +#else + result = dynamic_pthread_setname_np(thread->id, name); +#endif +#endif /* not BSD */ + + if (result) { + PR_SetError(PR_UNKNOWN_ERROR, result); + return PR_FAILURE; + } + return PR_SUCCESS; +} + +PR_IMPLEMENT(const char *) PR_GetThreadName(const PRThread *thread) +{ + if (!thread) + return NULL; + return thread->name; +} + #endif /* defined(_PR_PTHREADS) || defined(_PR_DCETHREADS) */ /* ptthread.c */ diff --git a/pr/src/threads/Makefile.in b/pr/src/threads/Makefile.in index 5e6731c5..5c5c254e 100644 --- a/pr/src/threads/Makefile.in +++ b/pr/src/threads/Makefile.in @@ -1,39 +1,7 @@ # -# ***** BEGIN LICENSE BLOCK ***** -# Version: MPL 1.1/GPL 2.0/LGPL 2.1 -# -# The contents of this file are subject to the Mozilla Public License Version -# 1.1 (the "License"); you may not use this file except in compliance with -# the License. You may obtain a copy of the License at -# http://www.mozilla.org/MPL/ -# -# Software distributed under the License is distributed on an "AS IS" basis, -# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License -# for the specific language governing rights and limitations under the -# License. -# -# The Original Code is the Netscape Portable Runtime (NSPR). -# -# The Initial Developer of the Original Code is -# Netscape Communications Corporation. -# Portions created by the Initial Developer are Copyright (C) 1998-2000 -# the Initial Developer. All Rights Reserved. -# -# Contributor(s): -# -# Alternatively, the contents of this file may be used under the terms of -# either the GNU General Public License Version 2 or later (the "GPL"), or -# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), -# in which case the provisions of the GPL or the LGPL are applicable instead -# of those above. If you wish to allow use of your version of this file only -# under the terms of either the GPL or the LGPL, and not to allow others to -# use your version of this file under the terms of the MPL, indicate your -# decision by deleting the provisions above and replace them with the notice -# and other provisions required by the GPL or the LGPL. If you do not delete -# the provisions above, a recipient may use your version of this file under -# the terms of any one of the MPL, the GPL or the LGPL. -# -# ***** END LICENSE BLOCK ***** +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. #! gmake diff --git a/pr/src/threads/combined/Makefile.in b/pr/src/threads/combined/Makefile.in index 476c6c9a..91022f86 100644 --- a/pr/src/threads/combined/Makefile.in +++ b/pr/src/threads/combined/Makefile.in @@ -1,39 +1,7 @@ # -# ***** BEGIN LICENSE BLOCK ***** -# Version: MPL 1.1/GPL 2.0/LGPL 2.1 -# -# The contents of this file are subject to the Mozilla Public License Version -# 1.1 (the "License"); you may not use this file except in compliance with -# the License. You may obtain a copy of the License at -# http://www.mozilla.org/MPL/ -# -# Software distributed under the License is distributed on an "AS IS" basis, -# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License -# for the specific language governing rights and limitations under the -# License. -# -# The Original Code is the Netscape Portable Runtime (NSPR). -# -# The Initial Developer of the Original Code is -# Netscape Communications Corporation. -# Portions created by the Initial Developer are Copyright (C) 1998-2000 -# the Initial Developer. All Rights Reserved. -# -# Contributor(s): -# -# Alternatively, the contents of this file may be used under the terms of -# either the GNU General Public License Version 2 or later (the "GPL"), or -# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), -# in which case the provisions of the GPL or the LGPL are applicable instead -# of those above. If you wish to allow use of your version of this file only -# under the terms of either the GPL or the LGPL, and not to allow others to -# use your version of this file under the terms of the MPL, indicate your -# decision by deleting the provisions above and replace them with the notice -# and other provisions required by the GPL or the LGPL. If you do not delete -# the provisions above, a recipient may use your version of this file under -# the terms of any one of the MPL, the GPL or the LGPL. -# -# ***** END LICENSE BLOCK ***** +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. #! gmake diff --git a/pr/src/threads/combined/prucpu.c b/pr/src/threads/combined/prucpu.c index 3a3596be..56322bb8 100644 --- a/pr/src/threads/combined/prucpu.c +++ b/pr/src/threads/combined/prucpu.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "primpl.h" @@ -54,7 +22,7 @@ static _MDLock _pr_md_idle_cpus_lock; #endif PRUintn _pr_numCPU; PRInt32 _pr_cpus_exit; -PRInt32 _pr_cpu_affinity_mask = 0; +PRUint32 _pr_cpu_affinity_mask = 0; #if !defined (_PR_GLOBAL_THREADS_ONLY) diff --git a/pr/src/threads/combined/prucv.c b/pr/src/threads/combined/prucv.c index 6d5d6688..43582b06 100644 --- a/pr/src/threads/combined/prucv.c +++ b/pr/src/threads/combined/prucv.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "primpl.h" diff --git a/pr/src/threads/combined/prulock.c b/pr/src/threads/combined/prulock.c index b188ed5d..e2d29ba2 100644 --- a/pr/src/threads/combined/prulock.c +++ b/pr/src/threads/combined/prulock.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "primpl.h" diff --git a/pr/src/threads/combined/prustack.c b/pr/src/threads/combined/prustack.c index fe15843c..59562bac 100644 --- a/pr/src/threads/combined/prustack.c +++ b/pr/src/threads/combined/prustack.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "primpl.h" diff --git a/pr/src/threads/combined/pruthr.c b/pr/src/threads/combined/pruthr.c index 9609d4d9..7ecccf55 100644 --- a/pr/src/threads/combined/pruthr.c +++ b/pr/src/threads/combined/pruthr.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "primpl.h" #include <signal.h> @@ -269,6 +237,7 @@ static void _PR_InitializeRecycledThread(PRThread *thread) PR_ASSERT(thread->dumpArg == 0 && thread->dump == 0); PR_ASSERT(thread->errorString == 0 && thread->errorStringSize == 0); PR_ASSERT(thread->errorStringLength == 0); + PR_ASSERT(thread->name == 0); /* Reset data members in thread structure */ thread->errorCode = thread->osErrorCode = 0; @@ -1165,9 +1134,9 @@ PR_IMPLEMENT(PRThread*) _PR_CreateThread(PRThreadType type, if (type == PR_SYSTEM_THREAD) { thread->flags |= _PR_SYSTEM; - PR_AtomicIncrement(&_pr_systemActive); + PR_ATOMIC_INCREMENT(&_pr_systemActive); } - else PR_AtomicIncrement(&_pr_userActive); + else PR_ATOMIC_INCREMENT(&_pr_userActive); if (state == PR_JOINABLE_THREAD) { if (!thread->term) @@ -1265,14 +1234,6 @@ PR_IMPLEMENT(PRThread*) _PR_CreateThread(PRThreadType type, top = (char*)((PRUptrdiff)top & ~0x3f); } #endif -#if defined(GC_LEAK_DETECTOR) - /* - * sorry, it is not safe to allocate the thread on the stack, - * because we assign to this object before the GC can learn - * about this thread. we'll just leak thread objects instead. - */ - thread = PR_NEW(PRThread); -#endif stack->thr = thread; memset(thread, 0, sizeof(PRThread)); thread->threadAllocatedOnStack = 1; @@ -1621,6 +1582,37 @@ PR_IMPLEMENT(void) PR_SetThreadPriority(PRThread *thread, } else _PR_SetThreadPriority(thread, newPri); } +PR_IMPLEMENT(PRStatus) PR_SetCurrentThreadName(const char *name) +{ + PRThread *thread; + size_t nameLen; + + if (!name) { + PR_SetError(PR_INVALID_ARGUMENT_ERROR, 0); + return PR_FAILURE; + } + + thread = PR_GetCurrentThread(); + if (!thread) + return PR_FAILURE; + + PR_Free(thread->name); + nameLen = strlen(name); + thread->name = (char *)PR_Malloc(nameLen + 1); + if (!thread->name) + return PR_FAILURE; + memcpy(thread->name, name, nameLen + 1); + _PR_MD_SET_CURRENT_THREAD_NAME(thread->name); + return PR_SUCCESS; +} + +PR_IMPLEMENT(const char *) PR_GetThreadName(const PRThread *thread) +{ + if (!thread) + return NULL; + return thread->name; +} + /* ** This routine prevents all other threads from running. This call is needed by diff --git a/pr/src/threads/prcmon.c b/pr/src/threads/prcmon.c index 67aee4cf..2a196e9d 100644 --- a/pr/src/threads/prcmon.c +++ b/pr/src/threads/prcmon.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "primpl.h" diff --git a/pr/src/threads/prcthr.c b/pr/src/threads/prcthr.c index 7c3e6273..26881447 100644 --- a/pr/src/threads/prcthr.c +++ b/pr/src/threads/prcthr.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "primpl.h" @@ -67,6 +35,7 @@ void _PR_CleanupThread(PRThread *thread) } thread->dump = 0; + PR_DELETE(thread->name); PR_DELETE(thread->errorString); thread->errorStringSize = 0; thread->errorStringLength = 0; diff --git a/pr/src/threads/prdump.c b/pr/src/threads/prdump.c index 3ea884d2..7f3e591d 100644 --- a/pr/src/threads/prdump.c +++ b/pr/src/threads/prdump.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "primpl.h" diff --git a/pr/src/threads/prmon.c b/pr/src/threads/prmon.c index dc8a32c8..bcfc50d7 100644 --- a/pr/src/threads/prmon.c +++ b/pr/src/threads/prmon.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "primpl.h" diff --git a/pr/src/threads/prrwlock.c b/pr/src/threads/prrwlock.c index 35e0e3e7..c255dc84 100644 --- a/pr/src/threads/prrwlock.c +++ b/pr/src/threads/prrwlock.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "primpl.h" diff --git a/pr/src/threads/prsem.c b/pr/src/threads/prsem.c index d26897cd..f5f261fe 100644 --- a/pr/src/threads/prsem.c +++ b/pr/src/threads/prsem.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "primpl.h" #include "obsolete/prsem.h" diff --git a/pr/src/threads/prtpd.c b/pr/src/threads/prtpd.c index 168c6601..decbc1cc 100644 --- a/pr/src/threads/prtpd.c +++ b/pr/src/threads/prtpd.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /* ** Thread Private Data @@ -137,7 +105,7 @@ PR_IMPLEMENT(PRStatus) PR_NewThreadPrivateIndex( PR_ASSERT(NULL != newIndex); PR_ASSERT(NULL != _pr_tpd_destructors); - index = PR_AtomicIncrement(&_pr_tpd_highwater) - 1; /* allocate index */ + index = PR_ATOMIC_INCREMENT(&_pr_tpd_highwater) - 1; /* allocate index */ if (_PR_TPD_LIMIT <= index) { PR_SetError(PR_TPD_RANGE_ERROR, 0); diff --git a/pr/tests/Makefile.in b/pr/tests/Makefile.in index 98175f97..82a6463c 100644 --- a/pr/tests/Makefile.in +++ b/pr/tests/Makefile.in @@ -1,39 +1,7 @@ # -# ***** BEGIN LICENSE BLOCK ***** -# Version: MPL 1.1/GPL 2.0/LGPL 2.1 -# -# The contents of this file are subject to the Mozilla Public License Version -# 1.1 (the "License"); you may not use this file except in compliance with -# the License. You may obtain a copy of the License at -# http://www.mozilla.org/MPL/ -# -# Software distributed under the License is distributed on an "AS IS" basis, -# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License -# for the specific language governing rights and limitations under the -# License. -# -# The Original Code is the Netscape Portable Runtime (NSPR). -# -# The Initial Developer of the Original Code is -# Netscape Communications Corporation. -# Portions created by the Initial Developer are Copyright (C) 1998-2000 -# the Initial Developer. All Rights Reserved. -# -# Contributor(s): -# -# Alternatively, the contents of this file may be used under the terms of -# either the GNU General Public License Version 2 or later (the "GPL"), or -# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), -# in which case the provisions of the GPL or the LGPL are applicable instead -# of those above. If you wish to allow use of your version of this file only -# under the terms of either the GPL or the LGPL, and not to allow others to -# use your version of this file under the terms of the MPL, indicate your -# decision by deleting the provisions above and replace them with the notice -# and other provisions required by the GPL or the LGPL. If you do not delete -# the provisions above, a recipient may use your version of this file under -# the terms of any one of the MPL, the GPL or the LGPL. -# -# ***** END LICENSE BLOCK ***** +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. #! gmake @@ -146,6 +114,7 @@ CSRCS = \ provider.c \ prpoll.c \ prpollml.c \ + pushtop.c \ ranfile.c \ randseed.c \ reinit.c \ @@ -450,6 +419,10 @@ LIBPTHREAD = -ldce endif endif +ifeq ($(OS_TARGET),Android) +LIBPTHREAD = +XCFLAGS = $(OS_CFLAGS) +endif ##################################################### # diff --git a/pr/tests/accept.c b/pr/tests/accept.c index f1bfde46..7ed2d985 100644 --- a/pr/tests/accept.c +++ b/pr/tests/accept.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /*********************************************************************** ** 1996 - Netscape Communications Corporation diff --git a/pr/tests/acceptread.c b/pr/tests/acceptread.c index bc42433a..184cfcbb 100644 --- a/pr/tests/acceptread.c +++ b/pr/tests/acceptread.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include <prio.h> #include <prprf.h> diff --git a/pr/tests/acceptreademu.c b/pr/tests/acceptreademu.c index 1701aba9..981cebad 100644 --- a/pr/tests/acceptreademu.c +++ b/pr/tests/acceptreademu.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /* * This test is the same as acceptread.c except that it uses the diff --git a/pr/tests/addrstr.c b/pr/tests/addrstr.c index 532d75f6..4e830a71 100644 --- a/pr/tests/addrstr.c +++ b/pr/tests/addrstr.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "prnetdb.h" diff --git a/pr/tests/affinity.c b/pr/tests/affinity.c index 46f159bf..4bdbaf72 100644 --- a/pr/tests/affinity.c +++ b/pr/tests/affinity.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "nspr.h" #include "pprthred.h" diff --git a/pr/tests/alarm.c b/pr/tests/alarm.c index 7ae9d4fd..b7b19580 100644 --- a/pr/tests/alarm.c +++ b/pr/tests/alarm.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /*********************************************************************** ** 1996 - Netscape Communications Corporation diff --git a/pr/tests/anonfm.c b/pr/tests/anonfm.c index 2aa24159..85e29024 100644 --- a/pr/tests/anonfm.c +++ b/pr/tests/anonfm.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /* ** File: anonfm.c diff --git a/pr/tests/append.c b/pr/tests/append.c index 6a037b5f..53439d5f 100644 --- a/pr/tests/append.c +++ b/pr/tests/append.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /* ** File: append.c diff --git a/pr/tests/atomic.c b/pr/tests/atomic.c index f7e3fe3f..eb9df949 100644 --- a/pr/tests/atomic.c +++ b/pr/tests/atomic.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "prio.h" #include "prprf.h" diff --git a/pr/tests/attach.c b/pr/tests/attach.c index 2eaefdca..e0ae9dd2 100644 --- a/pr/tests/attach.c +++ b/pr/tests/attach.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /*********************************************************************** ** 1996 - Netscape Communications Corporation diff --git a/pr/tests/bigfile.c b/pr/tests/bigfile.c index 9c7d323c..199f57b5 100644 --- a/pr/tests/bigfile.c +++ b/pr/tests/bigfile.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "prio.h" #include "prmem.h" diff --git a/pr/tests/bigfile2.c b/pr/tests/bigfile2.c index 2b538e27..a41841c5 100644 --- a/pr/tests/bigfile2.c +++ b/pr/tests/bigfile2.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "nspr.h" diff --git a/pr/tests/bigfile3.c b/pr/tests/bigfile3.c index be04d5e8..6afbfc93 100644 --- a/pr/tests/bigfile3.c +++ b/pr/tests/bigfile3.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "nspr.h" diff --git a/pr/tests/bug1test.c b/pr/tests/bug1test.c index 6c4c4d84..a8df97f7 100644 --- a/pr/tests/bug1test.c +++ b/pr/tests/bug1test.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /* Attached is a test program that uses the nspr1 to demonstrate a bug diff --git a/pr/tests/cleanup.c b/pr/tests/cleanup.c index 38f9b94c..4079aae1 100644 --- a/pr/tests/cleanup.c +++ b/pr/tests/cleanup.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "prprf.h" #include "prio.h" diff --git a/pr/tests/cltsrv.c b/pr/tests/cltsrv.c index 33553aa1..1941687e 100644 --- a/pr/tests/cltsrv.c +++ b/pr/tests/cltsrv.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /* * diff --git a/pr/tests/concur.c b/pr/tests/concur.c index d7b95394..108f9066 100644 --- a/pr/tests/concur.c +++ b/pr/tests/concur.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /* ** File: concur.c diff --git a/pr/tests/cvar.c b/pr/tests/cvar.c index 928e1d3c..e2be526e 100644 --- a/pr/tests/cvar.c +++ b/pr/tests/cvar.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /*********************************************************************** ** 1996 - Netscape Communications Corporation diff --git a/pr/tests/cvar2.c b/pr/tests/cvar2.c index 5c33c614..c61405e2 100644 --- a/pr/tests/cvar2.c +++ b/pr/tests/cvar2.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /*********************************************************************** ** 1996 - Netscape Communications Corporation diff --git a/pr/tests/dbmalloc.c b/pr/tests/dbmalloc.c index ed500b7c..67173fe6 100644 --- a/pr/tests/dbmalloc.c +++ b/pr/tests/dbmalloc.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /*********************************************************************** ** diff --git a/pr/tests/dbmalloc1.c b/pr/tests/dbmalloc1.c index f12a27c6..4069afd3 100644 --- a/pr/tests/dbmalloc1.c +++ b/pr/tests/dbmalloc1.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /*********************************************************************** ** diff --git a/pr/tests/dceemu.c b/pr/tests/dceemu.c index 5e09a20c..b06b49e3 100644 --- a/pr/tests/dceemu.c +++ b/pr/tests/dceemu.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /* ** File: dceemu.c diff --git a/pr/tests/depend.c b/pr/tests/depend.c index e3fb691e..6df38c11 100644 --- a/pr/tests/depend.c +++ b/pr/tests/depend.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /*********************************************************************** ** 1996 - Netscape Communications Corporation diff --git a/pr/tests/dll/Makefile.in b/pr/tests/dll/Makefile.in index da2ae5a9..9fb01e38 100644 --- a/pr/tests/dll/Makefile.in +++ b/pr/tests/dll/Makefile.in @@ -1,39 +1,7 @@ # -# ***** BEGIN LICENSE BLOCK ***** -# Version: MPL 1.1/GPL 2.0/LGPL 2.1 -# -# The contents of this file are subject to the Mozilla Public License Version -# 1.1 (the "License"); you may not use this file except in compliance with -# the License. You may obtain a copy of the License at -# http://www.mozilla.org/MPL/ -# -# Software distributed under the License is distributed on an "AS IS" basis, -# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License -# for the specific language governing rights and limitations under the -# License. -# -# The Original Code is the Netscape Portable Runtime (NSPR). -# -# The Initial Developer of the Original Code is -# Netscape Communications Corporation. -# Portions created by the Initial Developer are Copyright (C) 1998-2000 -# the Initial Developer. All Rights Reserved. -# -# Contributor(s): -# -# Alternatively, the contents of this file may be used under the terms of -# either the GNU General Public License Version 2 or later (the "GPL"), or -# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), -# in which case the provisions of the GPL or the LGPL are applicable instead -# of those above. If you wish to allow use of your version of this file only -# under the terms of either the GPL or the LGPL, and not to allow others to -# use your version of this file under the terms of the MPL, indicate your -# decision by deleting the provisions above and replace them with the notice -# and other provisions required by the GPL or the LGPL. If you do not delete -# the provisions above, a recipient may use your version of this file under -# the terms of any one of the MPL, the GPL or the LGPL. -# -# ***** END LICENSE BLOCK ***** +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. #! gmake diff --git a/pr/tests/dll/my.def b/pr/tests/dll/my.def index 76cdfd96..75b71f5a 100644 --- a/pr/tests/dll/my.def +++ b/pr/tests/dll/my.def @@ -1,39 +1,7 @@ ;+# -;+# ***** BEGIN LICENSE BLOCK ***** -;+# Version: MPL 1.1/GPL 2.0/LGPL 2.1 -;+# -;+# The contents of this file are subject to the Mozilla Public License Version -;+# 1.1 (the "License"); you may not use this file except in compliance with -;+# the License. You may obtain a copy of the License at -;+# http://www.mozilla.org/MPL/ -;+# -;+# Software distributed under the License is distributed on an "AS IS" basis, -;+# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License -;+# for the specific language governing rights and limitations under the -;+# License. -;+# -;+# The Original Code is the Netscape Portable Runtime (NSPR). -;+# -;+# The Initial Developer of the Original Code is -;+# Netscape Communications Corporation. -;+# Portions created by the Initial Developer are Copyright (C) 2002-2003 -;+# the Initial Developer. All Rights Reserved. -;+# -;+# Contributor(s): -;+# -;+# Alternatively, the contents of this file may be used under the terms of -;+# either the GNU General Public License Version 2 or later (the "GPL"), or -;+# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), -;+# in which case the provisions of the GPL or the LGPL are applicable instead -;+# of those above. If you wish to allow use of your version of this file only -;+# under the terms of either the GPL or the LGPL, and not to allow others to -;+# use your version of this file under the terms of the MPL, indicate your -;+# decision by deleting the provisions above and replace them with the notice -;+# and other provisions required by the GPL or the LGPL. If you do not delete -;+# the provisions above, a recipient may use your version of this file under -;+# the terms of any one of the MPL, the GPL or the LGPL. -;+# -;+# ***** END LICENSE BLOCK ***** +;+# This Source Code Form is subject to the terms of the Mozilla Public +;+# License, v. 2.0. If a copy of the MPL was not distributed with this +;+# file, You can obtain one at http://mozilla.org/MPL/2.0/. ;+# ;+# OK, this file is meant to support SUN, LINUX, AIX, OS/2 and WINDOWS ;+# 1. For all unix platforms, the string ";-" means "remove this line" diff --git a/pr/tests/dll/mygetval.c b/pr/tests/dll/mygetval.c index 17f36792..53a6408e 100644 --- a/pr/tests/dll/mygetval.c +++ b/pr/tests/dll/mygetval.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #if defined(WIN16) diff --git a/pr/tests/dll/mysetval.c b/pr/tests/dll/mysetval.c index 982f0776..232428ad 100644 --- a/pr/tests/dll/mysetval.c +++ b/pr/tests/dll/mysetval.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "prtypes.h" diff --git a/pr/tests/dlltest.c b/pr/tests/dlltest.c index 82a2db5b..1cf82bc8 100644 --- a/pr/tests/dlltest.c +++ b/pr/tests/dlltest.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /*********************************************************************** ** diff --git a/pr/tests/dtoa.c b/pr/tests/dtoa.c index f4939ac8..59c6db98 100644 --- a/pr/tests/dtoa.c +++ b/pr/tests/dtoa.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /****************************************************************************** * diff --git a/pr/tests/env.c b/pr/tests/env.c index ac1c4419..e5240c4b 100644 --- a/pr/tests/env.c +++ b/pr/tests/env.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /* ** File: env.c diff --git a/pr/tests/errcodes.c b/pr/tests/errcodes.c index 9e9c573a..2ef00b24 100644 --- a/pr/tests/errcodes.c +++ b/pr/tests/errcodes.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /*********************************************************************** ** diff --git a/pr/tests/errset.c b/pr/tests/errset.c index 0e690c04..b0e92487 100644 --- a/pr/tests/errset.c +++ b/pr/tests/errset.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape security libraries. - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /*********************************************************************** ** diff --git a/pr/tests/exit.c b/pr/tests/exit.c index 8ecf50a4..258868dd 100644 --- a/pr/tests/exit.c +++ b/pr/tests/exit.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "prio.h" #include "prprf.h" diff --git a/pr/tests/fdcach.c b/pr/tests/fdcach.c index 33382fa8..37bec0d8 100644 --- a/pr/tests/fdcach.c +++ b/pr/tests/fdcach.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1999-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /* * File: fdcach.c diff --git a/pr/tests/fileio.c b/pr/tests/fileio.c index efd4235a..be611a35 100644 --- a/pr/tests/fileio.c +++ b/pr/tests/fileio.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /*********************************************************************** ** diff --git a/pr/tests/foreign.c b/pr/tests/foreign.c index 68acc16c..d5be90a5 100644 --- a/pr/tests/foreign.c +++ b/pr/tests/foreign.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /* ** File: foreign.c diff --git a/pr/tests/forktest.c b/pr/tests/forktest.c index f0187983..a389fa47 100644 --- a/pr/tests/forktest.c +++ b/pr/tests/forktest.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /*********************************************************************** ** diff --git a/pr/tests/formattm.c b/pr/tests/formattm.c index 0ab630ba..88b9fdf2 100644 --- a/pr/tests/formattm.c +++ b/pr/tests/formattm.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 2003 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /* A test program for PR_FormatTime and PR_FormatTimeUSEnglish */ diff --git a/pr/tests/freeif.c b/pr/tests/freeif.c index 4bf29940..edf005e4 100644 --- a/pr/tests/freeif.c +++ b/pr/tests/freeif.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /* * A test to see if the macros PR_DELETE and PR_FREEIF are diff --git a/pr/tests/fsync.c b/pr/tests/fsync.c index 149a5b54..01c71c4c 100644 --- a/pr/tests/fsync.c +++ b/pr/tests/fsync.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "prio.h" #include "prmem.h" diff --git a/pr/tests/getai.c b/pr/tests/getai.c index eaa41d41..f398ca3b 100644 --- a/pr/tests/getai.c +++ b/pr/tests/getai.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 2003 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "nspr.h" diff --git a/pr/tests/gethost.c b/pr/tests/gethost.c index 3af41a3f..779bce45 100644 --- a/pr/tests/gethost.c +++ b/pr/tests/gethost.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1999-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /* * File: gethost.c diff --git a/pr/tests/getproto.c b/pr/tests/getproto.c index fe847a0b..f63a4dfd 100644 --- a/pr/tests/getproto.c +++ b/pr/tests/getproto.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /* ************************************************************************* diff --git a/pr/tests/i2l.c b/pr/tests/i2l.c index a2e4a545..cd96edef 100644 --- a/pr/tests/i2l.c +++ b/pr/tests/i2l.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include <stdlib.h> diff --git a/pr/tests/initclk.c b/pr/tests/initclk.c index 24e80f82..37e4c050 100644 --- a/pr/tests/initclk.c +++ b/pr/tests/initclk.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /* * This is a regression test for the bug that the interval timer diff --git a/pr/tests/inrval.c b/pr/tests/inrval.c index 1fb35d13..e8eadaa3 100644 --- a/pr/tests/inrval.c +++ b/pr/tests/inrval.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /* ** file: inrval.c diff --git a/pr/tests/instrumt.c b/pr/tests/instrumt.c index 3b57ea9d..21fb8494 100644 --- a/pr/tests/instrumt.c +++ b/pr/tests/instrumt.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /* ** File: instrumt.c diff --git a/pr/tests/intrio.c b/pr/tests/intrio.c index 3e7c9c12..691ed815 100644 --- a/pr/tests/intrio.c +++ b/pr/tests/intrio.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /* * File: intrio.c diff --git a/pr/tests/intrupt.c b/pr/tests/intrupt.c index 1d9dc691..b5970808 100644 --- a/pr/tests/intrupt.c +++ b/pr/tests/intrupt.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /* * File: intrupt.c diff --git a/pr/tests/io_timeout.c b/pr/tests/io_timeout.c index 617d6e84..b83ff374 100644 --- a/pr/tests/io_timeout.c +++ b/pr/tests/io_timeout.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /* ** Test socket IO timeouts diff --git a/pr/tests/io_timeoutk.c b/pr/tests/io_timeoutk.c index 26e3beeb..cf6cb491 100644 --- a/pr/tests/io_timeoutk.c +++ b/pr/tests/io_timeoutk.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /* ** name io_timeoutk.c diff --git a/pr/tests/io_timeoutu.c b/pr/tests/io_timeoutu.c index c17a93f7..7b3ba7c9 100644 --- a/pr/tests/io_timeoutu.c +++ b/pr/tests/io_timeoutu.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /* diff --git a/pr/tests/ioconthr.c b/pr/tests/ioconthr.c index 2e39522d..0a1dda87 100644 --- a/pr/tests/ioconthr.c +++ b/pr/tests/ioconthr.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /* * This is a test for the io continuation thread machinery diff --git a/pr/tests/ipv6.c b/pr/tests/ipv6.c index 571716fb..af27d03c 100644 --- a/pr/tests/ipv6.c +++ b/pr/tests/ipv6.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "prio.h" #include "prenv.h" diff --git a/pr/tests/join.c b/pr/tests/join.c index 0875aeb2..ae3873fa 100644 --- a/pr/tests/join.c +++ b/pr/tests/join.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /*********************************************************************** ** diff --git a/pr/tests/joinkk.c b/pr/tests/joinkk.c index ac731d39..dde5d62b 100644 --- a/pr/tests/joinkk.c +++ b/pr/tests/joinkk.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /*********************************************************************** ** diff --git a/pr/tests/joinku.c b/pr/tests/joinku.c index 89d15291..f18894cd 100644 --- a/pr/tests/joinku.c +++ b/pr/tests/joinku.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /*********************************************************************** ** diff --git a/pr/tests/joinuk.c b/pr/tests/joinuk.c index 284a64e5..3b496fcd 100644 --- a/pr/tests/joinuk.c +++ b/pr/tests/joinuk.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /*********************************************************************** ** diff --git a/pr/tests/joinuu.c b/pr/tests/joinuu.c index d8958a31..9b7d8c21 100644 --- a/pr/tests/joinuu.c +++ b/pr/tests/joinuu.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /*********************************************************************** ** diff --git a/pr/tests/layer.c b/pr/tests/layer.c index e0e09b50..82af3d39 100644 --- a/pr/tests/layer.c +++ b/pr/tests/layer.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "prio.h" #include "prprf.h" diff --git a/pr/tests/lazyinit.c b/pr/tests/lazyinit.c index 1b206929..4b9a910c 100644 --- a/pr/tests/lazyinit.c +++ b/pr/tests/lazyinit.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /* ** File: lazyinit.c diff --git a/pr/tests/libfilename.c b/pr/tests/libfilename.c index d454f5f5..66bb45c8 100644 --- a/pr/tests/libfilename.c +++ b/pr/tests/libfilename.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 2003 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /*********************************************************************** ** diff --git a/pr/tests/lltest.c b/pr/tests/lltest.c index 4679a2ce..7e21e76f 100644 --- a/pr/tests/lltest.c +++ b/pr/tests/lltest.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /* ** testll.c -- test suite for 64bit integer (longlong) operations diff --git a/pr/tests/lock.c b/pr/tests/lock.c index 4b0db4a4..178315ae 100644 --- a/pr/tests/lock.c +++ b/pr/tests/lock.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /* ** File: lock.c diff --git a/pr/tests/lockfile.c b/pr/tests/lockfile.c index c737f00d..9c2de8c8 100644 --- a/pr/tests/lockfile.c +++ b/pr/tests/lockfile.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /* ** File: lockfile.c diff --git a/pr/tests/logfile.c b/pr/tests/logfile.c index 3589efb2..d6997be1 100644 --- a/pr/tests/logfile.c +++ b/pr/tests/logfile.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Google Inc. - * Portions created by the Initial Developer are Copyright (C) 2009 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /* * A regression test for bug 491441. NSPR should not crash on startup in diff --git a/pr/tests/logger.c b/pr/tests/logger.c index 1280c269..a44ef4ee 100644 --- a/pr/tests/logger.c +++ b/pr/tests/logger.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /* * File: logger.c diff --git a/pr/tests/makedir.c b/pr/tests/makedir.c index 5bb3dfdb..21b42c5a 100644 --- a/pr/tests/makedir.c +++ b/pr/tests/makedir.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /* * This test calls PR_MakeDir to create a bunch of directories diff --git a/pr/tests/many_cv.c b/pr/tests/many_cv.c index d3002ecf..8bddd786 100644 --- a/pr/tests/many_cv.c +++ b/pr/tests/many_cv.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "prinit.h" #include "prprf.h" diff --git a/pr/tests/mbcs.c b/pr/tests/mbcs.c index bb2cf789..50d5dd00 100644 --- a/pr/tests/mbcs.c +++ b/pr/tests/mbcs.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /* ** File: mbcs.c diff --git a/pr/tests/multiacc.c b/pr/tests/multiacc.c index ccae270b..9382c4f6 100644 --- a/pr/tests/multiacc.c +++ b/pr/tests/multiacc.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1999-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /* * File: multiacc.c diff --git a/pr/tests/multiwait.c b/pr/tests/multiwait.c index 8454eb42..a24342a9 100644 --- a/pr/tests/multiwait.c +++ b/pr/tests/multiwait.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "prio.h" #include "prprf.h" diff --git a/pr/tests/nameshm1.c b/pr/tests/nameshm1.c index 6cc8f561..945540b5 100644 --- a/pr/tests/nameshm1.c +++ b/pr/tests/nameshm1.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /* ** File: nameshm1.c -- Test Named Shared Memory diff --git a/pr/tests/nbconn.c b/pr/tests/nbconn.c index 3598cba2..e113a7e1 100644 --- a/pr/tests/nbconn.c +++ b/pr/tests/nbconn.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /* * A test for nonblocking connect. Functions tested include PR_Connect, @@ -125,7 +93,7 @@ int main(int argc, char **argv) * 1. successful connection: a server thread accepts a connection * from the main thread * 2. unsuccessful connection: the main thread tries to connect to a - * non-existent port and expects to get an error + * nonexistent port and expects to get an error */ rv = connection_success_test(); if (rv == 0) @@ -447,7 +415,7 @@ def_exit: } /* - * test for connection to a non-existent port using a non-blocking socket + * test for connection to a nonexistent port using a non-blocking socket */ static PRIntn connection_failure_test() diff --git a/pr/tests/nblayer.c b/pr/tests/nblayer.c index 19df5cf6..553db6b6 100644 --- a/pr/tests/nblayer.c +++ b/pr/tests/nblayer.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "prio.h" #include "prmem.h" diff --git a/pr/tests/nonblock.c b/pr/tests/nonblock.c index bacb1ceb..e94b1b44 100644 --- a/pr/tests/nonblock.c +++ b/pr/tests/nonblock.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "nspr.h" #include "prio.h" diff --git a/pr/tests/ntioto.c b/pr/tests/ntioto.c index 4fb175aa..7af65944 100644 --- a/pr/tests/ntioto.c +++ b/pr/tests/ntioto.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /* ** File: ntioto.c diff --git a/pr/tests/ntoh.c b/pr/tests/ntoh.c index d6eb0951..b4ddc81e 100644 --- a/pr/tests/ntoh.c +++ b/pr/tests/ntoh.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /* * A test program for PR_htons, PR_ntohs, PR_htonl, PR_ntohl, diff --git a/pr/tests/obsints.c b/pr/tests/obsints.c index bbe60f85..e7a15d9c 100644 --- a/pr/tests/obsints.c +++ b/pr/tests/obsints.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /* * Test: obsints.c diff --git a/pr/tests/op_2long.c b/pr/tests/op_2long.c index deb55b7a..deecf79e 100644 --- a/pr/tests/op_2long.c +++ b/pr/tests/op_2long.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /*********************************************************************** ** diff --git a/pr/tests/op_excl.c b/pr/tests/op_excl.c index 30407684..4b46891f 100644 --- a/pr/tests/op_excl.c +++ b/pr/tests/op_excl.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /*********************************************************************** ** diff --git a/pr/tests/op_filnf.c b/pr/tests/op_filnf.c index c4cc48ee..da66a7ac 100644 --- a/pr/tests/op_filnf.c +++ b/pr/tests/op_filnf.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /*********************************************************************** ** diff --git a/pr/tests/op_filok.c b/pr/tests/op_filok.c index 9a5dc9b1..035765a8 100644 --- a/pr/tests/op_filok.c +++ b/pr/tests/op_filok.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /*********************************************************************** ** @@ -55,36 +23,17 @@ #include "prerror.h" #include <stdio.h> -/* - * The name of a file that is guaranteed to exist - * on every machine of a particular OS. - */ -#if defined(SYMBIAN) -#define EXISTING_FILENAME "z:\\system\\install\\Series60v3.0.sis" -#elif defined (XP_UNIX) -#define EXISTING_FILENAME "/bin/sh" -#elif defined(WIN32) -#define EXISTING_FILENAME "c:/autoexec.bat" -#elif defined(OS2) -#define EXISTING_FILENAME "c:/config.sys" -#elif defined(BEOS) -#define EXISTING_FILENAME "/boot/beos/bin/sh" -#else -#error "Unknown OS" -#endif - static PRFileDesc *t1; int main(int argc, char **argv) { PR_STDIO_INIT(); - t1 = PR_Open(EXISTING_FILENAME, PR_RDONLY, 0666); + t1 = PR_Open(argv[0], PR_RDONLY, 0666); if (t1 == NULL) { printf ("error code is %d \n", PR_GetError()); - printf ("File %s should be found\n", - EXISTING_FILENAME); + printf ("File %s should be found\n", argv[0]); return 1; } else { if (PR_Close(t1) == PR_SUCCESS) { diff --git a/pr/tests/op_noacc.c b/pr/tests/op_noacc.c index 2bc6256c..21ad04be 100644 --- a/pr/tests/op_noacc.c +++ b/pr/tests/op_noacc.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /*********************************************************************** ** @@ -66,17 +34,18 @@ int main(int argc, char **argv) return(0); #endif - + PR_STDIO_INIT(); - err01 = PR_Open("err01.tmp", PR_CREATE_FILE | PR_RDWR, 0); - if (err01 == NULL) - if (PR_GetError() == PR_NO_ACCESS_RIGHTS_ERROR) { - printf ("error code is %d\n",PR_GetError()); - printf ("PASS\n"); - return 0; - } - else { - printf ("FAIL\n"); - return 1; - } -} + err01 = PR_Open("err01.tmp", PR_CREATE_FILE | PR_RDWR, 0); + if (err01 == NULL) { + int error = PR_GetError(); + printf ("error code is %d\n", error); + if (error == PR_NO_ACCESS_RIGHTS_ERROR) { + printf ("PASS\n"); + return 0; + } + } + printf ("FAIL\n"); + return 1; +} + diff --git a/pr/tests/op_nofil.c b/pr/tests/op_nofil.c index fa7ed6df..0e51c741 100644 --- a/pr/tests/op_nofil.c +++ b/pr/tests/op_nofil.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /*********************************************************************** ** diff --git a/pr/tests/openfile.c b/pr/tests/openfile.c index 8d64a1ac..d0b664f3 100644 --- a/pr/tests/openfile.c +++ b/pr/tests/openfile.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /* * This test calls PR_OpenFile to create a bunch of files diff --git a/pr/tests/parent.c b/pr/tests/parent.c index 91bf5ee8..e49af2a9 100644 --- a/pr/tests/parent.c +++ b/pr/tests/parent.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /* ** file: parent.c diff --git a/pr/tests/parsetm.c b/pr/tests/parsetm.c index 21f0da8f..be1fc491 100644 --- a/pr/tests/parsetm.c +++ b/pr/tests/parsetm.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /* * This test program should eventually become a full-blown test for diff --git a/pr/tests/peek.c b/pr/tests/peek.c index 22fcfec6..5b83692f 100644 --- a/pr/tests/peek.c +++ b/pr/tests/peek.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1999-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /* * A test case for the PR_MSG_PEEK flag of PR_Recv(). diff --git a/pr/tests/perf.c b/pr/tests/perf.c index 4e2fc687..91248eb2 100644 --- a/pr/tests/perf.c +++ b/pr/tests/perf.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "nspr.h" #include "plgetopt.h" diff --git a/pr/tests/pipeping.c b/pr/tests/pipeping.c index 494cca64..26b63c65 100644 --- a/pr/tests/pipeping.c +++ b/pr/tests/pipeping.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1999-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /* * File: pipeping.c diff --git a/pr/tests/pipeping2.c b/pr/tests/pipeping2.c index 012b327a..ed961091 100644 --- a/pr/tests/pipeping2.c +++ b/pr/tests/pipeping2.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /* * File: pipeping2.c diff --git a/pr/tests/pipepong.c b/pr/tests/pipepong.c index 19a7523b..965aec32 100644 --- a/pr/tests/pipepong.c +++ b/pr/tests/pipepong.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1999-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /* * File: pipepong.c diff --git a/pr/tests/pipepong2.c b/pr/tests/pipepong2.c index aad1265b..839f252a 100644 --- a/pr/tests/pipepong2.c +++ b/pr/tests/pipepong2.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /* * File: pipepong2.c diff --git a/pr/tests/pipeself.c b/pr/tests/pipeself.c index c6a620a9..52e6b134 100644 --- a/pr/tests/pipeself.c +++ b/pr/tests/pipeself.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1999-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /* * File: pipeself.c diff --git a/pr/tests/poll_er.c b/pr/tests/poll_er.c index 4a3d9cbb..a50a75fb 100755 --- a/pr/tests/poll_er.c +++ b/pr/tests/poll_er.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /*********************************************************************** ** diff --git a/pr/tests/poll_nm.c b/pr/tests/poll_nm.c index b2000b77..4842606f 100644 --- a/pr/tests/poll_nm.c +++ b/pr/tests/poll_nm.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /*********************************************************************** ** diff --git a/pr/tests/poll_to.c b/pr/tests/poll_to.c index e1a101fc..40d1a261 100644 --- a/pr/tests/poll_to.c +++ b/pr/tests/poll_to.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /*********************************************************************** ** diff --git a/pr/tests/pollable.c b/pr/tests/pollable.c index 20da55a3..bb87f96e 100644 --- a/pr/tests/pollable.c +++ b/pr/tests/pollable.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /* * A test for the pollable events. diff --git a/pr/tests/prftest.c b/pr/tests/prftest.c index f89b27d4..ac49460a 100644 --- a/pr/tests/prftest.c +++ b/pr/tests/prftest.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /* * File: prftest.c diff --git a/pr/tests/prftest1.c b/pr/tests/prftest1.c index 1e59bf1f..0e9ca49f 100644 --- a/pr/tests/prftest1.c +++ b/pr/tests/prftest1.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /* ** File: prftest1.c diff --git a/pr/tests/prftest2.c b/pr/tests/prftest2.c index 256266a5..6a62a260 100644 --- a/pr/tests/prftest2.c +++ b/pr/tests/prftest2.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /* ** File: prftest2.c diff --git a/pr/tests/primblok.c b/pr/tests/primblok.c index 865ff119..e036572b 100644 --- a/pr/tests/primblok.c +++ b/pr/tests/primblok.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /* * File: primblok.c diff --git a/pr/tests/priotest.c b/pr/tests/priotest.c index e08fb8af..ca7897e2 100644 --- a/pr/tests/priotest.c +++ b/pr/tests/priotest.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /* * File: priotest.c diff --git a/pr/tests/provider.c b/pr/tests/provider.c index 0f566159..c62387a2 100644 --- a/pr/tests/provider.c +++ b/pr/tests/provider.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /* * diff --git a/pr/tests/prpoll.c b/pr/tests/prpoll.c index 116a4842..d2c87081 100644 --- a/pr/tests/prpoll.c +++ b/pr/tests/prpoll.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #ifdef WIN32 #include <windows.h> diff --git a/pr/tests/prpollml.c b/pr/tests/prpollml.c index f740f09b..6894c525 100644 --- a/pr/tests/prpollml.c +++ b/pr/tests/prpollml.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /* * This test exercises the code that allocates and frees the syspoll_list diff --git a/pr/tests/prselect.c b/pr/tests/prselect.c index ff6ebdc6..15aa8558 100644 --- a/pr/tests/prselect.c +++ b/pr/tests/prselect.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /*********************************************************************** ** 1997 - Netscape Communications Corporation diff --git a/pr/tests/prttools.h b/pr/tests/prttools.h index dc38f316..e3cac5da 100644 --- a/pr/tests/prttools.h +++ b/pr/tests/prttools.h @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /* Used in Regress Tool */ #define NOSTATUS 2 diff --git a/pr/tests/randseed.c b/pr/tests/randseed.c index 2cda2dca..45871777 100644 --- a/pr/tests/randseed.c +++ b/pr/tests/randseed.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /* ** File: rngseed.c diff --git a/pr/tests/ranfile.c b/pr/tests/ranfile.c index c639382f..08a4a98b 100644 --- a/pr/tests/ranfile.c +++ b/pr/tests/ranfile.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /*********************************************************************** ** diff --git a/pr/tests/reinit.c b/pr/tests/reinit.c index 8150021c..b4dfa4d9 100644 --- a/pr/tests/reinit.c +++ b/pr/tests/reinit.c @@ -1,40 +1,7 @@ /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * Ludovico Cavedon <ludovico.cavedon@gmail.com> - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /* This test verifies that NSPR can be cleaned up and reinitialized. */ diff --git a/pr/tests/rmdir.c b/pr/tests/rmdir.c index 87f9dc32..e0c1eac8 100644 --- a/pr/tests/rmdir.c +++ b/pr/tests/rmdir.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /* ** File: rmdir.c diff --git a/pr/tests/runtests.pl b/pr/tests/runtests.pl index d4e1588f..3a164b17 100755 --- a/pr/tests/runtests.pl +++ b/pr/tests/runtests.pl @@ -1,42 +1,8 @@ #!/usr/bin/perl # -# ***** BEGIN LICENSE BLOCK ***** -# Version: MPL 1.1/GPL 2.0/LGPL 2.1 -# -# The contents of this file are subject to the Mozilla Public License Version -# 1.1 (the "License"); you may not use this file except in compliance with -# the License. You may obtain a copy of the License at -# http://www.mozilla.org/MPL/ -# -# Software distributed under the License is distributed on an "AS IS" basis, -# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License -# for the specific language governing rights and limitations under the -# License. -# -# The Original Code is the Netscape Portable Runtime (NSPR). -# -# The Initial Developer of the Original Code is -# Sun Microsystems, Inc. -# Portions created by the Initial Developer are Copyright (C) 2008 -# the Initial Developer. All Rights Reserved. -# -# Contributor(s): -# Christophe Ravel <christophe.ravel@sun.com>, Sun Microsystems -# Slavomir Katuscak <slavomir.katuscak@sun.com>, Sun Microsystems -# -# Alternatively, the contents of this file may be used under the terms of -# either the GNU General Public License Version 2 or later (the "GPL"), or -# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), -# in which case the provisions of the GPL or the LGPL are applicable instead -# of those above. If you wish to allow use of your version of this file only -# under the terms of either the GPL or the LGPL, and not to allow others to -# use your version of this file under the terms of the MPL, indicate your -# decision by deleting the provisions above and replace them with the notice -# and other provisions required by the GPL or the LGPL. If you do not delete -# the provisions above, a recipient may use your version of this file under -# the terms of any one of the MPL, the GPL or the LGPL. -# -# ***** END LICENSE BLOCK ***** +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. use POSIX qw(:sys_wait_h); use POSIX qw(setsid); @@ -347,6 +313,7 @@ $prog = shift; # Program to test "primblok", "provider", "prpollml", +"pushtop", "ranfile", "randseed", "reinit", diff --git a/pr/tests/runtests.sh b/pr/tests/runtests.sh index b6d20fde..535b93af 100755 --- a/pr/tests/runtests.sh +++ b/pr/tests/runtests.sh @@ -1,40 +1,8 @@ #!/bin/sh # -# ***** BEGIN LICENSE BLOCK ***** -# Version: MPL 1.1/GPL 2.0/LGPL 2.1 -# -# The contents of this file are subject to the Mozilla Public License Version -# 1.1 (the "License"); you may not use this file except in compliance with -# the License. You may obtain a copy of the License at -# http://www.mozilla.org/MPL/ -# -# Software distributed under the License is distributed on an "AS IS" basis, -# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License -# for the specific language governing rights and limitations under the -# License. -# -# The Original Code is the Netscape Portable Runtime (NSPR). -# -# The Initial Developer of the Original Code is -# Netscape Communications Corporation. -# Portions created by the Initial Developer are Copyright (C) 1998-2000 -# the Initial Developer. All Rights Reserved. -# -# Contributor(s): -# -# Alternatively, the contents of this file may be used under the terms of -# either the GNU General Public License Version 2 or later (the "GPL"), or -# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), -# in which case the provisions of the GPL or the LGPL are applicable instead -# of those above. If you wish to allow use of your version of this file only -# under the terms of either the GPL or the LGPL, and not to allow others to -# use your version of this file under the terms of the MPL, indicate your -# decision by deleting the provisions above and replace them with the notice -# and other provisions required by the GPL or the LGPL. If you do not delete -# the provisions above, a recipient may use your version of this file under -# the terms of any one of the MPL, the GPL or the LGPL. -# -# ***** END LICENSE BLOCK ***** +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. # # runtests.sh @@ -175,6 +143,7 @@ prftest primblok provider prpollml +pushtop ranfile randseed reinit diff --git a/pr/tests/runy2ktests.ksh b/pr/tests/runy2ktests.ksh index e7a32501..56f7d3c5 100644 --- a/pr/tests/runy2ktests.ksh +++ b/pr/tests/runy2ktests.ksh @@ -1,40 +1,8 @@ #!/bin/ksh # -# ***** BEGIN LICENSE BLOCK ***** -# Version: MPL 1.1/GPL 2.0/LGPL 2.1 -# -# The contents of this file are subject to the Mozilla Public License Version -# 1.1 (the "License"); you may not use this file except in compliance with -# the License. You may obtain a copy of the License at -# http://www.mozilla.org/MPL/ -# -# Software distributed under the License is distributed on an "AS IS" basis, -# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License -# for the specific language governing rights and limitations under the -# License. -# -# The Original Code is the Netscape Portable Runtime (NSPR). -# -# The Initial Developer of the Original Code is -# Netscape Communications Corporation. -# Portions created by the Initial Developer are Copyright (C) 1999-2000 -# the Initial Developer. All Rights Reserved. -# -# Contributor(s): -# -# Alternatively, the contents of this file may be used under the terms of -# either the GNU General Public License Version 2 or later (the "GPL"), or -# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), -# in which case the provisions of the GPL or the LGPL are applicable instead -# of those above. If you wish to allow use of your version of this file only -# under the terms of either the GPL or the LGPL, and not to allow others to -# use your version of this file under the terms of the MPL, indicate your -# decision by deleting the provisions above and replace them with the notice -# and other provisions required by the GPL or the LGPL. If you do not delete -# the provisions above, a recipient may use your version of this file under -# the terms of any one of the MPL, the GPL or the LGPL. -# -# ***** END LICENSE BLOCK ***** +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. # # runy2ktests.ksh diff --git a/pr/tests/rwlocktest.c b/pr/tests/rwlocktest.c index c31eeb33..4a325fbf 100644 --- a/pr/tests/rwlocktest.c +++ b/pr/tests/rwlocktest.c @@ -1,38 +1,6 @@ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /* diff --git a/pr/tests/sel_spd.c b/pr/tests/sel_spd.c index 56388e6f..df5cd9c4 100644 --- a/pr/tests/sel_spd.c +++ b/pr/tests/sel_spd.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /* * Test the speed of select within NSPR diff --git a/pr/tests/selct_er.c b/pr/tests/selct_er.c index 2a5b8b24..85edb989 100755 --- a/pr/tests/selct_er.c +++ b/pr/tests/selct_er.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /*********************************************************************** ** 1997 - Netscape Communications Corporation diff --git a/pr/tests/selct_nm.c b/pr/tests/selct_nm.c index 62927c90..1b54c2af 100644 --- a/pr/tests/selct_nm.c +++ b/pr/tests/selct_nm.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /*********************************************************************** ** 1997 - Netscape Communications Corporation diff --git a/pr/tests/selct_to.c b/pr/tests/selct_to.c index 2a58d65b..be0fb9e0 100644 --- a/pr/tests/selct_to.c +++ b/pr/tests/selct_to.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /*********************************************************************** ** 1997 - Netscape Communications Corporation diff --git a/pr/tests/select2.c b/pr/tests/select2.c index 775a1e1c..d82bb1ef 100644 --- a/pr/tests/select2.c +++ b/pr/tests/select2.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /*********************************************************************** ** diff --git a/pr/tests/selintr.c b/pr/tests/selintr.c index 02a63a89..13621f74 100644 --- a/pr/tests/selintr.c +++ b/pr/tests/selintr.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /* * Test whether classic NSPR's select() wrapper properly blocks diff --git a/pr/tests/sem.c b/pr/tests/sem.c index 83e872cc..ec7bb6e2 100644 --- a/pr/tests/sem.c +++ b/pr/tests/sem.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /*********************************************************************** ** diff --git a/pr/tests/sema.c b/pr/tests/sema.c index 3dff8a00..915fa30f 100644 --- a/pr/tests/sema.c +++ b/pr/tests/sema.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1999-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "nspr.h" #include "plgetopt.h" diff --git a/pr/tests/semaerr.c b/pr/tests/semaerr.c index 8619c0a8..b27428f3 100644 --- a/pr/tests/semaerr.c +++ b/pr/tests/semaerr.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1999-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "nspr.h" #include "plgetopt.h" diff --git a/pr/tests/semaerr1.c b/pr/tests/semaerr1.c index 6164e0a7..fd1463db 100644 --- a/pr/tests/semaerr1.c +++ b/pr/tests/semaerr1.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1999-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "nspr.h" #include "plgetopt.h" diff --git a/pr/tests/semaping.c b/pr/tests/semaping.c index 6ad6773e..007a5239 100644 --- a/pr/tests/semaping.c +++ b/pr/tests/semaping.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1999-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "nspr.h" #include "plgetopt.h" diff --git a/pr/tests/semapong.c b/pr/tests/semapong.c index f74709a8..16dea62a 100644 --- a/pr/tests/semapong.c +++ b/pr/tests/semapong.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1999-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "nspr.h" #include "plgetopt.h" diff --git a/pr/tests/sendzlf.c b/pr/tests/sendzlf.c index 3d473659..0f3df3f7 100644 --- a/pr/tests/sendzlf.c +++ b/pr/tests/sendzlf.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1999-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /* * Test: sendzlf.c diff --git a/pr/tests/server_test.c b/pr/tests/server_test.c index 9b67400a..5c608cd1 100644 --- a/pr/tests/server_test.c +++ b/pr/tests/server_test.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /*********************************************************************** ** diff --git a/pr/tests/servr_kk.c b/pr/tests/servr_kk.c index 9099a454..3e02027d 100644 --- a/pr/tests/servr_kk.c +++ b/pr/tests/servr_kk.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /*********************************************************************** ** diff --git a/pr/tests/servr_ku.c b/pr/tests/servr_ku.c index 3e58d9d5..1a54fc76 100644 --- a/pr/tests/servr_ku.c +++ b/pr/tests/servr_ku.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /*********************************************************************** ** diff --git a/pr/tests/servr_uk.c b/pr/tests/servr_uk.c index 53bf8ed7..c61ad988 100644 --- a/pr/tests/servr_uk.c +++ b/pr/tests/servr_uk.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /*********************************************************************** ** diff --git a/pr/tests/servr_uu.c b/pr/tests/servr_uu.c index 5cb41c90..82cd7d9c 100644 --- a/pr/tests/servr_uu.c +++ b/pr/tests/servr_uu.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /*********************************************************************** ** diff --git a/pr/tests/short_thread.c b/pr/tests/short_thread.c index 42a52d7c..87294014 100644 --- a/pr/tests/short_thread.c +++ b/pr/tests/short_thread.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include <stdio.h> #include "nspr.h" diff --git a/pr/tests/sigpipe.c b/pr/tests/sigpipe.c index 44164284..0d37cbea 100644 --- a/pr/tests/sigpipe.c +++ b/pr/tests/sigpipe.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /* ************************************************************************* diff --git a/pr/tests/sleep.c b/pr/tests/sleep.c index 3459fa6a..43ef34cd 100644 --- a/pr/tests/sleep.c +++ b/pr/tests/sleep.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "nspr.h" diff --git a/pr/tests/socket.c b/pr/tests/socket.c index dcf8fa1f..7664c0c0 100644 --- a/pr/tests/socket.c +++ b/pr/tests/socket.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /*********************************************************************** ** diff --git a/pr/tests/sockopt.c b/pr/tests/sockopt.c index 5c7a899e..66b40277 100644 --- a/pr/tests/sockopt.c +++ b/pr/tests/sockopt.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "nspr.h" #include "prio.h" diff --git a/pr/tests/sockping.c b/pr/tests/sockping.c index 998ffadf..327d1d8e 100644 --- a/pr/tests/sockping.c +++ b/pr/tests/sockping.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1999-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /* * File: sockping.c diff --git a/pr/tests/sockpong.c b/pr/tests/sockpong.c index 5c25ab80..31cfd3ee 100644 --- a/pr/tests/sockpong.c +++ b/pr/tests/sockpong.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1999-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /* * File: sockpong.c diff --git a/pr/tests/sprintf.c b/pr/tests/sprintf.c index 7fe2ac19..014392c0 100644 --- a/pr/tests/sprintf.c +++ b/pr/tests/sprintf.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /* * File: sprintf.c @@ -56,8 +24,6 @@ #include <stdio.h> #include <stdlib.h> -#define countof(a) (sizeof(a)/sizeof(a[0])) - static char sbuf[20000]; @@ -121,15 +87,15 @@ static void TestI(void) int f, s, n, p; char fmt[20]; - for (f = 0; f < countof(formats); f++) { - for (s = 0; s < countof(signs); s++) { - for (p = 0; p < countof(precs); p++) { + for (f = 0; f < PR_ARRAY_SIZE(formats); f++) { + for (s = 0; s < PR_ARRAY_SIZE(signs); s++) { + for (p = 0; p < PR_ARRAY_SIZE(precs); p++) { fmt[0] = '%'; fmt[1] = 0; if (signs[s]) strcat(fmt, signs[s]); if (precs[p]) strcat(fmt, precs[p]); if (formats[f]) strcat(fmt, formats[f]); - for (n = 0; n < countof(nums); n++) { + for (n = 0; n < PR_ARRAY_SIZE(nums); n++) { test_i(fmt, nums[n]); } } @@ -213,9 +179,9 @@ static void TestL(void) int f, s, n, p; char fmt[40], sfmt[40]; - for (f = 0; f < countof(formats); f++) { - for (s = 0; s < countof(signs); s++) { - for (p = 0; p < countof(precs); p++) { + for (f = 0; f < PR_ARRAY_SIZE(formats); f++) { + for (s = 0; s < PR_ARRAY_SIZE(signs); s++) { + for (p = 0; p < PR_ARRAY_SIZE(precs); p++) { fmt[0] = '%'; fmt[1] = 0; if (signs[s]) strcat(fmt, signs[s]); @@ -223,7 +189,7 @@ static void TestL(void) strcpy(sfmt, fmt); if (formats[f]) strcat(fmt, formats[f]); if (sformats[f]) strcat(sfmt, sformats[f]); - for (n = 0; n < countof(nums); n++) { + for (n = 0; n < PR_ARRAY_SIZE(nums); n++) { test_l(fmt, sfmt, nums[n]); } } @@ -298,7 +264,18 @@ static void TestLL(void) LL_INIT(0, 0x7fffffff), /* 2147483647 */ LL_INIT(0xffffffff, 0x80000000), /* -2147483648 */ LL_INIT(0x7fffffff, 0xffffffff), /* 9223372036854775807 */ - LL_INIT(0x80000000, 0) /* -9223372036854775808 */ + LL_INIT(0x80000000, 0), /* -9223372036854775808 */ + PR_INT64(0), + PR_INT64(1), + PR_INT64(-1), + PR_INT64(10), + PR_INT64(-10), + PR_INT64(32767), + PR_INT64(-32768), + PR_INT64(2147483647), + PR_INT64(-2147483648), + PR_INT64(9223372036854775807), + PR_INT64(-9223372036854775808) }; static char *signs[] = { @@ -336,9 +313,9 @@ static void TestLL(void) int f, s, n, p; char fmt[40], sfmt[40]; - for (f = 0; f < countof(formats); f++) { - for (s = 0; s < countof(signs); s++) { - for (p = 0; p < countof(precs); p++) { + for (f = 0; f < PR_ARRAY_SIZE(formats); f++) { + for (s = 0; s < PR_ARRAY_SIZE(signs); s++) { + for (p = 0; p < PR_ARRAY_SIZE(precs); p++) { fmt[0] = '%'; fmt[1] = 0; if (signs[s]) strcat(fmt, signs[s]); @@ -346,7 +323,7 @@ static void TestLL(void) strcpy(sfmt, fmt); if (formats[f]) strcat(fmt, formats[f]); if (sformats[f]) strcat(sfmt, sformats[f]); - for (n = 0; n < countof(nums); n++) { + for (n = 0; n < PR_ARRAY_SIZE(nums); n++) { test_ll(fmt, sfmt, nums[n]); } } @@ -424,15 +401,15 @@ static void TestS(void) int f, s, n, p; char fmt[40]; - for (f = 0; f < countof(formats); f++) { - for (s = 0; s < countof(signs); s++) { - for (p = 0; p < countof(precs); p++) { + for (f = 0; f < PR_ARRAY_SIZE(formats); f++) { + for (s = 0; s < PR_ARRAY_SIZE(signs); s++) { + for (p = 0; p < PR_ARRAY_SIZE(precs); p++) { fmt[0] = '%'; fmt[1] = 0; if (signs[s]) strcat(fmt+strlen(fmt), signs[s]); if (precs[p]) strcat(fmt+strlen(fmt), precs[p]); if (formats[f]) strcat(fmt+strlen(fmt), formats[f]); - for (n = 0; n < countof(strs); n++) { + for (n = 0; n < PR_ARRAY_SIZE(strs); n++) { test_s(fmt, strs[n]); } } diff --git a/pr/tests/sproc_ch.c b/pr/tests/sproc_ch.c index 20b35ac4..0264b4ce 100644 --- a/pr/tests/sproc_ch.c +++ b/pr/tests/sproc_ch.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /* * Test sproc_ch.c diff --git a/pr/tests/sproc_p.c b/pr/tests/sproc_p.c index 7cae380e..8911f1f5 100644 --- a/pr/tests/sproc_p.c +++ b/pr/tests/sproc_p.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /* * Test sproc_p.c diff --git a/pr/tests/stack.c b/pr/tests/stack.c index 49c29f60..182191ad 100644 --- a/pr/tests/stack.c +++ b/pr/tests/stack.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /* diff --git a/pr/tests/stat.c b/pr/tests/stat.c index b8609143..c570056f 100644 --- a/pr/tests/stat.c +++ b/pr/tests/stat.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /* * Program to test different ways to get file info; right now it diff --git a/pr/tests/stdio.c b/pr/tests/stdio.c index d0d84e4e..8e2b8560 100644 --- a/pr/tests/stdio.c +++ b/pr/tests/stdio.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /* * File: stdio.c diff --git a/pr/tests/str2addr.c b/pr/tests/str2addr.c index b1d4cf4a..ad80137d 100644 --- a/pr/tests/str2addr.c +++ b/pr/tests/str2addr.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1999-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /* * File: str2addr.c diff --git a/pr/tests/strod.c b/pr/tests/strod.c index b2409c1f..3d1503e0 100644 --- a/pr/tests/strod.c +++ b/pr/tests/strod.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "prinit.h" #include "prio.h" diff --git a/pr/tests/suspend.c b/pr/tests/suspend.c index 58a563b1..7dfe28c6 100644 --- a/pr/tests/suspend.c +++ b/pr/tests/suspend.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #ifdef XP_BEOS #include <stdio.h> @@ -108,8 +76,9 @@ static PRStatus PR_CALLBACK print_thread(PRThread *thread, int i, void *arg) (PR_GLOBAL_THREAD == PR_GetThreadScope(thread)) ? "PR_GLOBAL_THREAD" : "PR_LOCAL_THREAD", i); registers = PR_GetGCRegisters(thread, 0, (int *)&words); - printf("Regsters R0 = 0x%x R1 = 0x%x R2 = 0x%x R3 = 0x%x\n", - registers[0],registers[1],registers[2],registers[3]); + if (registers) + printf("Registers R0 = 0x%x R1 = 0x%x R2 = 0x%x R3 = 0x%x\n", + registers[0],registers[1],registers[2],registers[3]); printf("Stack Pointer = 0x%lx\n", PR_GetSP(thread)); return PR_SUCCESS; } @@ -149,8 +118,9 @@ static void Level_0_Thread(PRThreadScope scope1, PRThreadScope scope2) PR_SuspendAll(); PR_EnumerateThreads(print_thread, NULL); registers = PR_GetGCRegisters(me, 1, (int *)&words); - printf("My Registers: R0 = 0x%x R1 = 0x%x R2 = 0x%x R3 = 0x%x\n", - registers[0],registers[1],registers[2],registers[3]); + if (registers) + printf("My Registers: R0 = 0x%x R1 = 0x%x R2 = 0x%x R3 = 0x%x\n", + registers[0],registers[1],registers[2],registers[3]); printf("My Stack Pointer = 0x%lx\n", PR_GetSP(me)); PR_ResumeAll(); @@ -210,6 +180,8 @@ int main(int argc, char **argv) CreateThreadsUU(); CreateThreadsKU(); PR_Cleanup(); + + return 0; } #endif /* XP_BEOS */ diff --git a/pr/tests/switch.c b/pr/tests/switch.c index 5c3211e6..43c5ce56 100644 --- a/pr/tests/switch.c +++ b/pr/tests/switch.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /* ** File: switch.c diff --git a/pr/tests/system.c b/pr/tests/system.c index 94a69078..60d318ed 100644 --- a/pr/tests/system.c +++ b/pr/tests/system.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "prio.h" #include "prmem.h" diff --git a/pr/tests/testbit.c b/pr/tests/testbit.c index bfb16e29..0987f5f0 100644 --- a/pr/tests/testbit.c +++ b/pr/tests/testbit.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /* ** File: lazyinit.c diff --git a/pr/tests/testfile.c b/pr/tests/testfile.c index f2fe4728..6846e3b8 100644 --- a/pr/tests/testfile.c +++ b/pr/tests/testfile.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "nspr.h" #include "prpriv.h" diff --git a/pr/tests/threads.c b/pr/tests/threads.c index 2a9df417..1b9b133d 100644 --- a/pr/tests/threads.c +++ b/pr/tests/threads.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "nspr.h" #include "prinrval.h" diff --git a/pr/tests/thrpool_client.c b/pr/tests/thrpool_client.c index 706f87ab..a0e1e4c2 100644 --- a/pr/tests/thrpool_client.c +++ b/pr/tests/thrpool_client.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1999-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /*********************************************************************** ** diff --git a/pr/tests/thrpool_server.c b/pr/tests/thrpool_server.c index 2c647764..9665829a 100644 --- a/pr/tests/thrpool_server.c +++ b/pr/tests/thrpool_server.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1999-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /*********************************************************************** ** diff --git a/pr/tests/thruput.c b/pr/tests/thruput.c index 6c9c123d..fd7ecf2e 100644 --- a/pr/tests/thruput.c +++ b/pr/tests/thruput.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /* ** File: thruput.c @@ -404,6 +372,7 @@ int main(int argc, char **argv) if (NULL == server_name) Server(); else Client(server_name); + return 0; } /* main */ /* thruput.c */ diff --git a/pr/tests/time.c b/pr/tests/time.c index 3321678a..ed0bff8e 100644 --- a/pr/tests/time.c +++ b/pr/tests/time.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /* * Program to test different ways to get the time; right now it is tuned diff --git a/pr/tests/timemac.c b/pr/tests/timemac.c index fd98a379..f714aeb4 100644 --- a/pr/tests/timemac.c +++ b/pr/tests/timemac.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /* * file: timemac.c diff --git a/pr/tests/timetest.c b/pr/tests/timetest.c index d55a41b1..c9bdf9c2 100644 --- a/pr/tests/timetest.c +++ b/pr/tests/timetest.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /* * file: timetest.c diff --git a/pr/tests/tmoacc.c b/pr/tests/tmoacc.c index 7ea6f0a9..12c39c91 100644 --- a/pr/tests/tmoacc.c +++ b/pr/tests/tmoacc.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "nspr.h" diff --git a/pr/tests/tmocon.c b/pr/tests/tmocon.c index 454adcbf..48a72f67 100644 --- a/pr/tests/tmocon.c +++ b/pr/tests/tmocon.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /*********************************************************************** ** diff --git a/pr/tests/tpd.c b/pr/tests/tpd.c index 4cbce5af..eef1a1d8 100644 --- a/pr/tests/tpd.c +++ b/pr/tests/tpd.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /* ** File: tpd.c diff --git a/pr/tests/udpsrv.c b/pr/tests/udpsrv.c index bf497a90..805bccbb 100644 --- a/pr/tests/udpsrv.c +++ b/pr/tests/udpsrv.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /******************************************************************* ** udpsrc.c -- Test basic function of UDP server diff --git a/pr/tests/ut_ttools.h b/pr/tests/ut_ttools.h index dc38f316..e3cac5da 100644 --- a/pr/tests/ut_ttools.h +++ b/pr/tests/ut_ttools.h @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /* Used in Regress Tool */ #define NOSTATUS 2 diff --git a/pr/tests/vercheck.c b/pr/tests/vercheck.c index e75d7281..0e4cb718 100644 --- a/pr/tests/vercheck.c +++ b/pr/tests/vercheck.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1999-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /* * File: vercheck.c @@ -52,9 +20,9 @@ #include <stdlib.h> /* - * This release (4.8.4) is backward compatible with the + * This release (4.9.3) is backward compatible with the * 4.0.x, 4.1.x, 4.2.x, 4.3.x, 4.4.x, 4.5.x, 4.6.x, 4.7.x, - * 4.8, 4.8.1, 4.8.2, and 4.8.3 releases. It, of course, + * 4.8.x, 4.9, 4.9.1, and 4.9.2 releases. It, of course, * is compatible with itself. */ static char *compatible_version[] = { @@ -65,7 +33,9 @@ static char *compatible_version[] = { "4.6.6", "4.6.7", "4.6.8", "4.7", "4.7.1", "4.7.2", "4.7.3", "4.7.4", "4.7.5", "4.7.6", - "4.8", "4.8.1", "4.8.2", "4.8.3", PR_VERSION + "4.8", "4.8.1", "4.8.2", "4.8.3", "4.8.4", "4.8.5", + "4.8.6", "4.8.7", "4.8.8", "4.8.9", + "4.9", "4.9.1", "4.9.2", PR_VERSION }; /* @@ -80,8 +50,8 @@ static char *incompatible_version[] = { "3.0", "3.0.1", "3.1", "3.1.1", "3.1.2", "3.1.3", "3.5", "3.5.1", - "4.8.9", - "4.9", "4.9.1", + "4.9.4", + "4.10", "4.10.1", "10.0", "11.1", "12.14.20" }; diff --git a/pr/tests/version.c b/pr/tests/version.c index 297a5840..a026de94 100644 --- a/pr/tests/version.c +++ b/pr/tests/version.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "prio.h" #include "prprf.h" diff --git a/pr/tests/writev.c b/pr/tests/writev.c index 26e52480..24544a46 100644 --- a/pr/tests/writev.c +++ b/pr/tests/writev.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "nspr.h" diff --git a/pr/tests/xnotify.c b/pr/tests/xnotify.c index 725d9aeb..97096cc6 100644 --- a/pr/tests/xnotify.c +++ b/pr/tests/xnotify.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "plerror.h" #include "plgetopt.h" diff --git a/pr/tests/y2k.c b/pr/tests/y2k.c index 68ee245a..12cc16f4 100644 --- a/pr/tests/y2k.c +++ b/pr/tests/y2k.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /* * file: y2k.c diff --git a/pr/tests/y2ktmo.c b/pr/tests/y2ktmo.c index 40be6f02..e55cf997 100644 --- a/pr/tests/y2ktmo.c +++ b/pr/tests/y2ktmo.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1999-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /* * Test: y2ktmo diff --git a/pr/tests/yield.c b/pr/tests/yield.c index b798a092..c68166e1 100644 --- a/pr/tests/yield.c +++ b/pr/tests/yield.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include <stdio.h> #include "prthread.h" diff --git a/pr/tests/zerolen.c b/pr/tests/zerolen.c index 5d30b5b7..a31d419e 100644 --- a/pr/tests/zerolen.c +++ b/pr/tests/zerolen.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1999-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /* * Test: zerolen.c diff --git a/tools/Makefile.in b/tools/Makefile.in index 068aa34d..817f1fae 100644 --- a/tools/Makefile.in +++ b/tools/Makefile.in @@ -1,39 +1,7 @@ # -# ***** BEGIN LICENSE BLOCK ***** -# Version: MPL 1.1/GPL 2.0/LGPL 2.1 -# -# The contents of this file are subject to the Mozilla Public License Version -# 1.1 (the "License"); you may not use this file except in compliance with -# the License. You may obtain a copy of the License at -# http://www.mozilla.org/MPL/ -# -# Software distributed under the License is distributed on an "AS IS" basis, -# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License -# for the specific language governing rights and limitations under the -# License. -# -# The Original Code is the Netscape Portable Runtime (NSPR). -# -# The Initial Developer of the Original Code is -# Netscape Communications Corporation. -# Portions created by the Initial Developer are Copyright (C) 1998-2000 -# the Initial Developer. All Rights Reserved. -# -# Contributor(s): -# -# Alternatively, the contents of this file may be used under the terms of -# either the GNU General Public License Version 2 or later (the "GPL"), or -# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), -# in which case the provisions of the GPL or the LGPL are applicable instead -# of those above. If you wish to allow use of your version of this file only -# under the terms of either the GPL or the LGPL, and not to allow others to -# use your version of this file under the terms of the MPL, indicate your -# decision by deleting the provisions above and replace them with the notice -# and other provisions required by the GPL or the LGPL. If you do not delete -# the provisions above, a recipient may use your version of this file under -# the terms of any one of the MPL, the GPL or the LGPL. -# -# ***** END LICENSE BLOCK ***** +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. #! gmake diff --git a/tools/httpget.c b/tools/httpget.c index 774a4c7a..848f930f 100644 --- a/tools/httpget.c +++ b/tools/httpget.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /* @@ -201,14 +169,13 @@ PRStatus FastFetchFile(PRFileDesc *in, PRFileDesc *out, PRUint32 size) outfMap = PR_CreateFileMap(out, sz64, PR_PROT_READWRITE); PR_ASSERT(outfMap); addr = PR_MemMap(outfMap, LL_ZERO, size); - if (addr == (void *) -1) { + if (addr == NULL) { fprintf(stderr, "cannot memory-map file: (%d, %d)\n", PR_GetError(), PR_GetOSError()); PR_CloseFileMap(outfMap); return PR_FAILURE; } - PR_ASSERT(addr != (void *) -1); start = (char *) addr; rem = size; while ((nBytes = DrainInputBuffer(start, rem)) > 0) { diff --git a/tools/tail.c b/tools/tail.c index dc729c15..32c93ddf 100644 --- a/tools/tail.c +++ b/tools/tail.c @@ -1,39 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "prio.h" #include "prprf.h" |