diff options
author | wtc%netscape.com <devnull@localhost> | 2002-08-06 18:31:35 +0000 |
---|---|---|
committer | wtc%netscape.com <devnull@localhost> | 2002-08-06 18:31:35 +0000 |
commit | d4630761c60dc760ff5fb5f768d21060cf8c66dc (patch) | |
tree | a1749373e15b89817fc569de3df12ac386f4bcf1 | |
parent | 2149a6e460e8ee9d607cf34ebb2b983171a318f3 (diff) | |
parent | bb3a95d5e2610e65d972f40df988baddcd256c96 (diff) | |
download | nss-hg-d4630761c60dc760ff5fb5f768d21060cf8c66dc.tar.gz |
Bug 161316: make pk11pqg.h C++ safe.
188 files changed, 25519 insertions, 1283 deletions
diff --git a/dbm/.cvsignore b/dbm/.cvsignore new file mode 100644 index 000000000..f3c7a7c5d --- /dev/null +++ b/dbm/.cvsignore @@ -0,0 +1 @@ +Makefile diff --git a/dbm/Makefile.in b/dbm/Makefile.in new file mode 100644 index 000000000..13779b989 --- /dev/null +++ b/dbm/Makefile.in @@ -0,0 +1,36 @@ +# +# The contents of this file are subject to the Netscape Public +# License Version 1.1 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy of +# the License at http://www.mozilla.org/NPL/ +# +# Software distributed under the License is distributed on an "AS +# IS" basis, WITHOUT WARRANTY OF 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 Netscape +# Communications Corporation. Portions created by Netscape are +# Copyright (C) 1998 Netscape Communications Corporation. All +# Rights Reserved. +# +# Contributor(s): +# + +DEPTH = .. +topsrcdir = @top_srcdir@ +srcdir = @srcdir@ +VPATH = @srcdir@ + +include $(DEPTH)/config/autoconf.mk + +DIRS = include src + +ifdef ENABLE_TESTS +DIRS += tests +endif + +include $(topsrcdir)/config/rules.mk + diff --git a/dbm/include/.cvsignore b/dbm/include/.cvsignore new file mode 100644 index 000000000..f3c7a7c5d --- /dev/null +++ b/dbm/include/.cvsignore @@ -0,0 +1 @@ +Makefile diff --git a/dbm/include/MANIFEST b/dbm/include/MANIFEST new file mode 100644 index 000000000..5626a3e87 --- /dev/null +++ b/dbm/include/MANIFEST @@ -0,0 +1,17 @@ +# +# This is a list of local files which get copied to the mozilla:dist directory +# + +cdefs.h +extern.h +hash.h +hsearch.h +mcom_db.h +mpool.h +ncompat.h +ndbm.h +nsres.h +page.h +queue.h +search.h +watcomfx.h diff --git a/dbm/include/Makefile.in b/dbm/include/Makefile.in new file mode 100644 index 000000000..86fb8f157 --- /dev/null +++ b/dbm/include/Makefile.in @@ -0,0 +1,55 @@ +# +# The contents of this file are subject to the Netscape Public +# License Version 1.1 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy of +# the License at http://www.mozilla.org/NPL/ +# +# Software distributed under the License is distributed on an "AS +# IS" basis, WITHOUT WARRANTY OF 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 Netscape +# Communications Corporation. Portions created by Netscape are +# Copyright (C) 1998 Netscape Communications Corporation. All +# Rights Reserved. +# +# Contributor(s): +# + +DEPTH = ../.. +topsrcdir = @top_srcdir@ +srcdir = @srcdir@ +VPATH = @srcdir@ + +include $(DEPTH)/config/autoconf.mk + +MODULE = dbm + +EXPORTS = \ + nsres.h \ + cdefs.h \ + mcom_db.h \ + ncompat.h \ + winfile.h \ + $(NULL) + +EXPORTS := $(addprefix $(srcdir)/, $(EXPORTS)) + +PRIVATE_EXPORTS = \ + hsearch.h \ + page.h \ + extern.h \ + ndbm.h \ + queue.h \ + hash.h \ + mpool.h \ + search.h \ + $(NULL) + +PRIVATE_EXPORTS := $(addprefix $(srcdir)/, $(PRIVATE_EXPORTS)) + +include $(topsrcdir)/config/rules.mk + diff --git a/dbm/include/Makefile.win b/dbm/include/Makefile.win new file mode 100644 index 000000000..07fba1859 --- /dev/null +++ b/dbm/include/Makefile.win @@ -0,0 +1,60 @@ +# The contents of this file are subject to the Netscape Public +# License Version 1.1 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy of +# the License at http://www.mozilla.org/NPL/ +# +# Software distributed under the License is distributed on an "AS +# IS" basis, WITHOUT WARRANTY OF 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 Netscape +# Communications Corporation. Portions created by Netscape are +# Copyright (C) 1998 Netscape Communications Corporation. All +# Rights Reserved. +# +# Contributor(s): + + +#//------------------------------------------------------------------------ +#// +#// Makefile to build the cert library +#// +#//------------------------------------------------------------------------ + +!if "$(MOZ_BITS)" == "16" +!ifndef MOZ_DEBUG +OPTIMIZER=-Os -UDEBUG -DNDEBUG +!endif +!endif + +#//------------------------------------------------------------------------ +#// +#// Specify the depth of the current directory relative to the +#// root of NS +#// +#//------------------------------------------------------------------------ +DEPTH= ..\.. + +!ifndef MAKE_OBJ_TYPE +MAKE_OBJ_TYPE=EXE +!endif + +#//------------------------------------------------------------------------ +#// +#// install headers +#// +#//------------------------------------------------------------------------ +EXPORTS=nsres.h cdefs.h mcom_db.h ncompat.h winfile.h + +#//------------------------------------------------------------------------ +#// +#// Include the common makefile rules +#// +#//------------------------------------------------------------------------ +include <$(DEPTH)/config/rules.mak> + +CFLAGS = $(CFLAGS) -DMOZILLA_CLIENT + diff --git a/dbm/include/cdefs.h b/dbm/include/cdefs.h new file mode 100644 index 000000000..63c2f624a --- /dev/null +++ b/dbm/include/cdefs.h @@ -0,0 +1,165 @@ +/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: NPL 1.1/GPL 2.0/LGPL 2.1 + * + * The contents of this file are subject to the Netscape Public License + * Version 1.1 (the "License"); you may not use this file except in + * compliance with the License. You may obtain a copy of the License at + * http://www.mozilla.org/NPL/ + * + * Software distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF 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 + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 1998 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * + * + * Alternatively, the contents of this file may be used under the terms of + * either the GNU General Public License Version 2 or later (the "GPL"), or + * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), + * in which case the provisions of the GPL or the LGPL are applicable instead + * of those above. If you wish to allow use of your version of this file only + * under the terms of either the GPL or the LGPL, and not to allow others to + * use your version of this file under the terms of the NPL, indicate your + * decision by deleting the provisions above and replace them with the notice + * and other provisions required by the GPL or the LGPL. If you do not delete + * the provisions above, a recipient may use your version of this file under + * the terms of any one of the NPL, the GPL or the LGPL. + * + * ***** END LICENSE BLOCK ***** */ + +/* + * Copyright (c) 1991, 1993 + * The Regents of the University of California. All rights reserved. + * + * This code is derived from software contributed to Berkeley by + * Berkeley Software Design, Inc. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by the University of + * California, Berkeley and its contributors. + * 4. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * @(#)cdefs.h 8.7 (Berkeley) 1/21/94 + */ + +#ifndef _CDEFS_H_ +#define _CDEFS_H_ + +#if defined(__cplusplus) +#define __BEGIN_DECLS extern "C" { +#define __END_DECLS } +#else +#define __BEGIN_DECLS +#define __END_DECLS +#endif + +/* + * The __CONCAT macro is used to concatenate parts of symbol names, e.g. + * with "#define OLD(foo) __CONCAT(old,foo)", OLD(foo) produces oldfoo. + * The __CONCAT macro is a bit tricky -- make sure you don't put spaces + * in between its arguments. __CONCAT can also concatenate double-quoted + * strings produced by the __STRING macro, but this only works with ANSI C. + */ +#if defined(__STDC__) || defined(__cplusplus) || defined(_WINDOWS) || defined(XP_OS2) +#define __P(protos) protos /* full-blown ANSI C */ +#define __CONCAT(x,y) x ## y +#define __STRING(x) #x + +/* On HP-UX 11.00, <sys/stdsyms.h> defines __const. */ +#ifndef __const +#define __const const /* define reserved names to standard */ +#endif /* __const */ +#define __signed signed +#define __volatile volatile +#ifndef _WINDOWS +#if defined(__cplusplus) +#define __inline inline /* convert to C++ keyword */ +#else +#if !defined(__GNUC__) && !defined(__MWERKS__) +#define __inline /* delete GCC keyword */ +#endif /* !__GNUC__ */ +#endif /* !__cplusplus */ +#endif /* !_WINDOWS */ + +#else /* !(__STDC__ || __cplusplus) */ +#define __P(protos) () /* traditional C preprocessor */ +#define __CONCAT(x,y) x/**/y +#define __STRING(x) "x" + +#ifndef __GNUC__ +#define __const /* delete pseudo-ANSI C keywords */ +#define __inline +#define __signed +#define __volatile +/* + * In non-ANSI C environments, new programs will want ANSI-only C keywords + * deleted from the program and old programs will want them left alone. + * When using a compiler other than gcc, programs using the ANSI C keywords + * const, inline etc. as normal identifiers should define -DNO_ANSI_KEYWORDS. + * When using "gcc -traditional", we assume that this is the intent; if + * __GNUC__ is defined but __STDC__ is not, we leave the new keywords alone. + */ +#ifndef NO_ANSI_KEYWORDS +#define const /* delete ANSI C keywords */ +#define inline +#define signed +#define volatile +#endif +#endif /* !__GNUC__ */ +#endif /* !(__STDC__ || __cplusplus) */ + +/* + * GCC1 and some versions of GCC2 declare dead (non-returning) and + * pure (no side effects) functions using "volatile" and "const"; + * unfortunately, these then cause warnings under "-ansi -pedantic". + * GCC2 uses a new, peculiar __attribute__((attrs)) style. All of + * these work for GNU C++ (modulo a slight glitch in the C++ grammar + * in the distribution version of 2.5.5). + */ +#if !defined(__GNUC__) || __GNUC__ < 2 || __GNUC_MINOR__ < 5 +#define __attribute__(x) /* delete __attribute__ if non-gcc or gcc1 */ +#if defined(__GNUC__) && !defined(__STRICT_ANSI__) +#define __dead __volatile +#define __pure __const +#endif +#endif + +/* Delete pseudo-keywords wherever they are not available or needed. */ +#ifndef __dead +#define __dead +#define __pure +#endif + +#endif /* !_CDEFS_H_ */ diff --git a/dbm/include/extern.h b/dbm/include/extern.h new file mode 100644 index 000000000..8eabc81fe --- /dev/null +++ b/dbm/include/extern.h @@ -0,0 +1,65 @@ +/*- + * Copyright (c) 1991, 1993, 1994 + * The Regents of the University of California. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by the University of + * California, Berkeley and its contributors. + * 4. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * @(#)extern.h 8.4 (Berkeley) 6/16/94 + */ + +BUFHEAD *__add_ovflpage (HTAB *, BUFHEAD *); +int __addel (HTAB *, BUFHEAD *, const DBT *, const DBT *); +int __big_delete (HTAB *, BUFHEAD *); +int __big_insert (HTAB *, BUFHEAD *, const DBT *, const DBT *); +int __big_keydata (HTAB *, BUFHEAD *, DBT *, DBT *, int); +int __big_return (HTAB *, BUFHEAD *, int, DBT *, int); +int __big_split (HTAB *, BUFHEAD *, BUFHEAD *, BUFHEAD *, + uint32, uint32, SPLIT_RETURN *); +int __buf_free (HTAB *, int, int); +void __buf_init (HTAB *, int); +uint32 __call_hash (HTAB *, char *, size_t); +int __delpair (HTAB *, BUFHEAD *, int); +int __expand_table (HTAB *); +int __find_bigpair (HTAB *, BUFHEAD *, int, char *, int); +uint16 __find_last_page (HTAB *, BUFHEAD **); +void __free_ovflpage (HTAB *, BUFHEAD *); +BUFHEAD *__get_buf (HTAB *, uint32, BUFHEAD *, int); +int __get_page (HTAB *, char *, uint32, int, int, int); +int __ibitmap (HTAB *, int, int, int); +uint32 __log2 (uint32); +int __put_page (HTAB *, char *, uint32, int, int); +void __reclaim_buf (HTAB *, BUFHEAD *); +int __split_page (HTAB *, uint32, uint32); + +/* Default hash routine. */ +extern uint32 (*__default_hash) (const void *, size_t); + +#ifdef HASH_STATISTICS +extern int hash_accesses, hash_collisions, hash_expansions, hash_overflows; +#endif diff --git a/dbm/include/hash.h b/dbm/include/hash.h new file mode 100644 index 000000000..454a8ec42 --- /dev/null +++ b/dbm/include/hash.h @@ -0,0 +1,337 @@ +/*- + * Copyright (c) 1990, 1993, 1994 + * The Regents of the University of California. All rights reserved. + * + * This code is derived from software contributed to Berkeley by + * Margo Seltzer. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by the University of + * California, Berkeley and its contributors. + * 4. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * @(#)hash.h 8.3 (Berkeley) 5/31/94 + */ + +/* Operations */ + +#include <stdio.h> +#include "mcom_db.h" +typedef enum { + HASH_GET, HASH_PUT, HASH_PUTNEW, HASH_DELETE, HASH_FIRST, HASH_NEXT +} ACTION; + +/* Buffer Management structures */ +typedef struct _bufhead BUFHEAD; + +struct _bufhead { + BUFHEAD *prev; /* LRU links */ + BUFHEAD *next; /* LRU links */ + BUFHEAD *ovfl; /* Overflow page buffer header */ + uint32 addr; /* Address of this page */ + char *page; /* Actual page data */ + char is_disk; + char flags; +#define BUF_MOD 0x0001 +#define BUF_DISK 0x0002 +#define BUF_BUCKET 0x0004 +#define BUF_PIN 0x0008 +}; + +#define IS_BUCKET(X) ((X) & BUF_BUCKET) + +typedef BUFHEAD **SEGMENT; + +typedef int DBFILE_PTR; +#define NO_FILE -1 +#ifdef macintosh +#define DBFILE_OPEN(path, flag,mode) open((path), flag) +#define EXISTS(path) +#else +#define DBFILE_OPEN(path, flag,mode) open((path), (flag), (mode)) +#endif +/* Hash Table Information */ +typedef struct hashhdr { /* Disk resident portion */ + int32 magic; /* Magic NO for hash tables */ + int32 version; /* Version ID */ + uint32 lorder; /* Byte Order */ + int32 bsize; /* Bucket/Page Size */ + int32 bshift; /* Bucket shift */ + int32 dsize; /* Directory Size */ + int32 ssize; /* Segment Size */ + int32 sshift; /* Segment shift */ + int32 ovfl_point; /* Where overflow pages are being + * allocated */ + int32 last_freed; /* Last overflow page freed */ + int32 max_bucket; /* ID of Maximum bucket in use */ + int32 high_mask; /* Mask to modulo into entire table */ + int32 low_mask; /* Mask to modulo into lower half of + * table */ + int32 ffactor; /* Fill factor */ + int32 nkeys; /* Number of keys in hash table */ + int32 hdrpages; /* Size of table header */ + uint32 h_charkey; /* value of hash(CHARKEY) */ +#define NCACHED 32 /* number of bit maps and spare + * points */ + int32 spares[NCACHED];/* spare pages for overflow */ + uint16 bitmaps[NCACHED]; /* address of overflow page + * bitmaps */ +} HASHHDR; + +typedef struct htab { /* Memory resident data structure */ + HASHHDR hdr; /* Header */ + int nsegs; /* Number of allocated segments */ + int exsegs; /* Number of extra allocated + * segments */ + uint32 /* Hash function */ + (*hash)(const void *, size_t); + int flags; /* Flag values */ + DBFILE_PTR fp; /* File pointer */ + char *filename; + char *tmp_buf; /* Temporary Buffer for BIG data */ + char *tmp_key; /* Temporary Buffer for BIG keys */ + BUFHEAD *cpage; /* Current page */ + int cbucket; /* Current bucket */ + int cndx; /* Index of next item on cpage */ + int dbmerrno; /* Error Number -- for DBM + * compatability */ + int new_file; /* Indicates if fd is backing store + * or no */ + int save_file; /* Indicates whether we need to flush + * file at + * exit */ + uint32 *mapp[NCACHED]; /* Pointers to page maps */ + int nmaps; /* Initial number of bitmaps */ + int nbufs; /* Number of buffers left to + * allocate */ + BUFHEAD bufhead; /* Header of buffer lru list */ + SEGMENT *dir; /* Hash Bucket directory */ + off_t file_size; /* in bytes */ + char is_temp; /* unlink file on close */ + char updateEOF; /* force EOF update on flush */ +} HTAB; + +/* + * Constants + */ +#define DATABASE_CORRUPTED_ERROR -999 /* big ugly abort, delete database */ +#define OLD_MAX_BSIZE 65536 /* 2^16 */ +#define MAX_BSIZE 32l*1024l /* 2^15 */ +#define MIN_BUFFERS 6 +#define MINHDRSIZE 512 +#define DEF_BUFSIZE 65536l /* 64 K */ +#define DEF_BUCKET_SIZE 4096 +#define DEF_BUCKET_SHIFT 12 /* log2(BUCKET) */ +#define DEF_SEGSIZE 256 +#define DEF_SEGSIZE_SHIFT 8 /* log2(SEGSIZE) */ +#define DEF_DIRSIZE 256 +#define DEF_FFACTOR 65536l +#define MIN_FFACTOR 4 +#define SPLTMAX 8 +#define CHARKEY "%$sniglet^&" +#define NUMKEY 1038583l +#define BYTE_SHIFT 3 +#define INT_TO_BYTE 2 +#define INT_BYTE_SHIFT 5 +#define ALL_SET ((uint32)0xFFFFFFFF) +#define ALL_CLEAR 0 + +#define PTROF(X) ((ptrdiff_t)(X) == BUF_DISK ? 0 : (X)) +#define ISDISK(X) ((X) ? ((ptrdiff_t)(X) == BUF_DISK ? BUF_DISK \ + : (X)->is_disk) : 0) + +#define BITS_PER_MAP 32 + +/* Given the address of the beginning of a big map, clear/set the nth bit */ +#define CLRBIT(A, N) ((A)[(N)/BITS_PER_MAP] &= ~(1<<((N)%BITS_PER_MAP))) +#define SETBIT(A, N) ((A)[(N)/BITS_PER_MAP] |= (1<<((N)%BITS_PER_MAP))) +#define ISSET(A, N) ((A)[(N)/BITS_PER_MAP] & (1<<((N)%BITS_PER_MAP))) + +/* Overflow management */ +/* + * Overflow page numbers are allocated per split point. At each doubling of + * the table, we can allocate extra pages. So, an overflow page number has + * the top 5 bits indicate which split point and the lower 11 bits indicate + * which page at that split point is indicated (pages within split points are + * numberered starting with 1). + */ + +#define SPLITSHIFT 11 +#define SPLITMASK 0x7FF +#define SPLITNUM(N) (((uint32)(N)) >> SPLITSHIFT) +#define OPAGENUM(N) ((N) & SPLITMASK) +#define OADDR_OF(S,O) ((uint32)((uint32)(S) << SPLITSHIFT) + (O)) + +#define BUCKET_TO_PAGE(B) \ + (B) + hashp->HDRPAGES + ((B) ? hashp->SPARES[__log2((uint32)((B)+1))-1] : 0) +#define OADDR_TO_PAGE(B) \ + BUCKET_TO_PAGE ( (1 << SPLITNUM((B))) -1 ) + OPAGENUM((B)); + +/* + * page.h contains a detailed description of the page format. + * + * Normally, keys and data are accessed from offset tables in the top of + * each page which point to the beginning of the key and data. There are + * four flag values which may be stored in these offset tables which indicate + * the following: + * + * + * OVFLPAGE Rather than a key data pair, this pair contains + * the address of an overflow page. The format of + * the pair is: + * OVERFLOW_PAGE_NUMBER OVFLPAGE + * + * PARTIAL_KEY This must be the first key/data pair on a page + * and implies that page contains only a partial key. + * That is, the key is too big to fit on a single page + * so it starts on this page and continues on the next. + * The format of the page is: + * KEY_OFF PARTIAL_KEY OVFL_PAGENO OVFLPAGE + * + * KEY_OFF -- offset of the beginning of the key + * PARTIAL_KEY -- 1 + * OVFL_PAGENO - page number of the next overflow page + * OVFLPAGE -- 0 + * + * FULL_KEY This must be the first key/data pair on the page. It + * is used in two cases. + * + * Case 1: + * There is a complete key on the page but no data + * (because it wouldn't fit). The next page contains + * the data. + * + * Page format it: + * KEY_OFF FULL_KEY OVFL_PAGENO OVFL_PAGE + * + * KEY_OFF -- offset of the beginning of the key + * FULL_KEY -- 2 + * OVFL_PAGENO - page number of the next overflow page + * OVFLPAGE -- 0 + * + * Case 2: + * This page contains no key, but part of a large + * data field, which is continued on the next page. + * + * Page format it: + * DATA_OFF FULL_KEY OVFL_PAGENO OVFL_PAGE + * + * KEY_OFF -- offset of the beginning of the data on + * this page + * FULL_KEY -- 2 + * OVFL_PAGENO - page number of the next overflow page + * OVFLPAGE -- 0 + * + * FULL_KEY_DATA + * This must be the first key/data pair on the page. + * There are two cases: + * + * Case 1: + * This page contains a key and the beginning of the + * data field, but the data field is continued on the + * next page. + * + * Page format is: + * KEY_OFF FULL_KEY_DATA OVFL_PAGENO DATA_OFF + * + * KEY_OFF -- offset of the beginning of the key + * FULL_KEY_DATA -- 3 + * OVFL_PAGENO - page number of the next overflow page + * DATA_OFF -- offset of the beginning of the data + * + * Case 2: + * This page contains the last page of a big data pair. + * There is no key, only the tail end of the data + * on this page. + * + * Page format is: + * DATA_OFF FULL_KEY_DATA <OVFL_PAGENO> <OVFLPAGE> + * + * DATA_OFF -- offset of the beginning of the data on + * this page + * FULL_KEY_DATA -- 3 + * OVFL_PAGENO - page number of the next overflow page + * OVFLPAGE -- 0 + * + * OVFL_PAGENO and OVFLPAGE are optional (they are + * not present if there is no next page). + */ + +#define OVFLPAGE 0 +#define PARTIAL_KEY 1 +#define FULL_KEY 2 +#define FULL_KEY_DATA 3 +#define REAL_KEY 4 + +/* Short hands for accessing structure */ +#undef BSIZE +#define BSIZE hdr.bsize +#undef BSHIFT +#define BSHIFT hdr.bshift +#define DSIZE hdr.dsize +#define SGSIZE hdr.ssize +#define SSHIFT hdr.sshift +#define LORDER hdr.lorder +#define OVFL_POINT hdr.ovfl_point +#define LAST_FREED hdr.last_freed +#define MAX_BUCKET hdr.max_bucket +#define FFACTOR hdr.ffactor +#define HIGH_MASK hdr.high_mask +#define LOW_MASK hdr.low_mask +#define NKEYS hdr.nkeys +#define HDRPAGES hdr.hdrpages +#define SPARES hdr.spares +#define BITMAPS hdr.bitmaps +#define VERSION hdr.version +#define MAGIC hdr.magic +#define NEXT_FREE hdr.next_free +#define H_CHARKEY hdr.h_charkey + +extern uint32 (*__default_hash) (const void *, size_t); +void __buf_init(HTAB *hashp, int32 nbytes); +int __big_delete(HTAB *hashp, BUFHEAD *bufp); +BUFHEAD * __get_buf(HTAB *hashp, uint32 addr, BUFHEAD *prev_bp, int newpage); +uint32 __call_hash(HTAB *hashp, char *k, size_t len); +#include "page.h" +extern int __big_split(HTAB *hashp, BUFHEAD *op,BUFHEAD *np, +BUFHEAD *big_keyp,uint32 addr,uint32 obucket, SPLIT_RETURN *ret); +void __free_ovflpage(HTAB *hashp, BUFHEAD *obufp); +BUFHEAD * __add_ovflpage(HTAB *hashp, BUFHEAD *bufp); +int __big_insert(HTAB *hashp, BUFHEAD *bufp, const DBT *key, const DBT *val); +int __expand_table(HTAB *hashp); +uint32 __log2(uint32 num); +void __reclaim_buf(HTAB *hashp, BUFHEAD *bp); +int __get_page(HTAB *hashp, char * p, uint32 bucket, int is_bucket, int is_disk, int is_bitmap); +int __put_page(HTAB *hashp, char *p, uint32 bucket, int is_bucket, int is_bitmap); +int __ibitmap(HTAB *hashp, int pnum, int nbits, int ndx); +int __buf_free(HTAB *hashp, int do_free, int to_disk); +int __find_bigpair(HTAB *hashp, BUFHEAD *bufp, int ndx, char *key, int size); +uint16 __find_last_page(HTAB *hashp, BUFHEAD **bpp); +int __addel(HTAB *hashp, BUFHEAD *bufp, const DBT *key, const DBT * val); +int __big_return(HTAB *hashp, BUFHEAD *bufp, int ndx, DBT *val, int set_current); +int __delpair(HTAB *hashp, BUFHEAD *bufp, int ndx); +int __big_keydata(HTAB *hashp, BUFHEAD *bufp, DBT *key, DBT *val, int set); +int __split_page(HTAB *hashp, uint32 obucket, uint32 nbucket); diff --git a/dbm/include/hsearch.h b/dbm/include/hsearch.h new file mode 100644 index 000000000..ff58b1c15 --- /dev/null +++ b/dbm/include/hsearch.h @@ -0,0 +1,51 @@ +/*- + * Copyright (c) 1990, 1993 + * The Regents of the University of California. All rights reserved. + * + * This code is derived from software contributed to Berkeley by + * Margo Seltzer. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by the University of + * California, Berkeley and its contributors. + * 4. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * @(#)search.h 8.1 (Berkeley) 6/4/93 + */ + +/* Backward compatibility to hsearch interface. */ +typedef struct entry { + char *key; + char *data; +} ENTRY; + +typedef enum { + FIND, ENTER +} ACTION; + +int hcreate (unsigned int); +void hdestroy (void); +ENTRY *hsearch (ENTRY, ACTION); diff --git a/dbm/include/mcom_db.h b/dbm/include/mcom_db.h new file mode 100644 index 000000000..252a9b268 --- /dev/null +++ b/dbm/include/mcom_db.h @@ -0,0 +1,450 @@ +/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: NPL 1.1/GPL 2.0/LGPL 2.1 + * + * The contents of this file are subject to the Netscape Public License + * Version 1.1 (the "License"); you may not use this file except in + * compliance with the License. You may obtain a copy of the License at + * http://www.mozilla.org/NPL/ + * + * Software distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF 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 + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 1998 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * + * + * Alternatively, the contents of this file may be used under the terms of + * either the GNU General Public License Version 2 or later (the "GPL"), or + * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), + * in which case the provisions of the GPL or the LGPL are applicable instead + * of those above. If you wish to allow use of your version of this file only + * under the terms of either the GPL or the LGPL, and not to allow others to + * use your version of this file under the terms of the NPL, indicate your + * decision by deleting the provisions above and replace them with the notice + * and other provisions required by the GPL or the LGPL. If you do not delete + * the provisions above, a recipient may use your version of this file under + * the terms of any one of the NPL, the GPL or the LGPL. + * + * ***** END LICENSE BLOCK ***** */ + +/*- + * Copyright (c) 1990, 1993, 1994 + * The Regents of the University of California. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by the University of + * California, Berkeley and its contributors. + * 4. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * @(#)db.h 8.7 (Berkeley) 6/16/94 + */ + +#ifndef _DB_H_ +#define _DB_H_ + +#ifndef macintosh +#include <sys/types.h> +#endif +#include "prtypes.h" + +#include <limits.h> + +#ifdef __DBINTERFACE_PRIVATE + +#ifdef HAVE_SYS_CDEFS_H +#include <sys/cdefs.h> +#else +#include "cdefs.h" +#endif + +#ifdef HAVE_SYS_BYTEORDER_H +#include <sys/byteorder.h> +#endif + +#if defined(__linux) || defined(__BEOS__) +#include <endian.h> +#ifndef BYTE_ORDER +#define BYTE_ORDER __BYTE_ORDER +#define BIG_ENDIAN __BIG_ENDIAN +#define LITTLE_ENDIAN __LITTLE_ENDIAN +#endif +#endif /* __linux */ + +#ifdef __sgi +#define BYTE_ORDER BIG_ENDIAN +#define BIG_ENDIAN 4321 +#define LITTLE_ENDIAN 1234 /* LSB first: i386, vax, all NT risc */ +#endif + +#ifdef __sun +#define BIG_ENDIAN 4321 +#define LITTLE_ENDIAN 1234 /* LSB first: i386, vax, all NT risc */ + +#ifndef __SVR4 +/* compat.h is only in 4.1.3 machines. - dp */ +#include <compat.h> +#endif + +/* XXX - dp + * Need to find a general way of defining endian-ness in SunOS 5.3 + * SunOS 5.4 defines _BIG_ENDIAN and _LITTLE_ENDIAN + * SunOS 5.3 does nothing like this. + */ + +#ifndef BYTE_ORDER + +#if defined(_BIG_ENDIAN) +#define BYTE_ORDER BIG_ENDIAN +#elif defined(_LITTLE_ENDIAN) +#define BYTE_ORDER LITTLE_ENDIAN +#elif !defined(__SVR4) +/* 4.1.3 is always BIG_ENDIAN as it was released only on sparc platforms. */ +#define BYTE_ORDER BIG_ENDIAN +#elif !defined(vax) && !defined(ntohl) && !defined(lint) && !defined(i386) +/* 5.3 big endian. Copied this above line from sys/byteorder.h */ +/* Now we are in a 5.3 SunOS rather non 5.4 or above SunOS */ +#define BYTE_ORDER BIG_ENDIAN +#else +#define BYTE_ORDER LITTLE_ENDIAN +#endif + +#endif /* !BYTE_ORDER */ +#endif /* __sun */ + +#if defined(__hpux) || defined(__hppa) +#define BYTE_ORDER BIG_ENDIAN +#define BIG_ENDIAN 4321 +#define LITTLE_ENDIAN 1234 /* LSB first: i386, vax, all NT risc */ +#endif + +#if defined(AIXV3) || defined(AIX) +/* BYTE_ORDER, LITTLE_ENDIAN, BIG_ENDIAN are all defined here */ +#include <sys/machine.h> +#endif + +/* Digital Unix */ +#ifdef __osf__ +#include <machine/endian.h> +#endif + +#ifdef __alpha +#ifndef WIN32 +#else +/* Alpha NT */ +#define BYTE_ORDER LITTLE_ENDIAN +#define BIG_ENDIAN 4321 +#define LITTLE_ENDIAN 1234 +#endif +#endif + +#ifdef NCR +#include <sys/endian.h> +#endif + +#ifdef __QNX__ +#ifdef __QNXNTO__ +#include <sys/param.h> +#else +#define LITTLE_ENDIAN 1234 +#define BIG_ENDIAN 4321 +#define BYTE_ORDER LITTLE_ENDIAN +#endif +#endif + +#ifdef SNI +/* #include <sys/hetero.h> */ +#define BYTE_ORDER BIG_ENDIAN +#define BIG_ENDIAN 4321 +#define LITTLE_ENDIAN 1234 +#endif + +#if defined(_WINDOWS) || defined(XP_OS2) +#ifdef BYTE_ORDER +#undef BYTE_ORDER +#endif + +#define BYTE_ORDER LITTLE_ENDIAN +#define LITTLE_ENDIAN 1234 /* LSB first: i386, vax, all NT risc */ +#define BIG_ENDIAN 4321 +#endif + +#ifdef macintosh +#define BIG_ENDIAN 4321 +#define LITTLE_ENDIAN 1234 +#define BYTE_ORDER BIG_ENDIAN +#endif + +#endif /* __DBINTERFACE_PRIVATE */ + +#ifdef SCO +#define MAXPATHLEN 1024 +#endif + +#include <fcntl.h> + +#if defined(_WINDOWS) || defined(XP_OS2) +#include <stdio.h> +#include <io.h> + +#ifndef XP_OS2 +#define MAXPATHLEN 1024 +#endif + +#define EFTYPE EINVAL /* POSIX 1003.1 format errno. */ + +#ifndef STDERR_FILENO +#define STDIN_FILENO 0 /* ANSI C #defines */ +#define STDOUT_FILENO 1 +#define STDERR_FILENO 2 +#endif + +#ifndef O_ACCMODE /* POSIX 1003.1 access mode mask. */ +#define O_ACCMODE (O_RDONLY|O_WRONLY|O_RDWR) +#endif +#endif + +#ifdef macintosh +#include <stdio.h> +#include "xp_mcom.h" +#define O_ACCMODE 3 /* Mask for file access modes */ +#define EFTYPE 2000 +PR_BEGIN_EXTERN_C +int mkstemp(const char *path); +PR_END_EXTERN_C +#endif /* MACINTOSH */ + +#if !defined(_WINDOWS) && !defined(macintosh) && !defined(XP_OS2) +#include <sys/stat.h> +#include <errno.h> +#endif + +/* define EFTYPE since most don't */ +#ifndef EFTYPE +#define EFTYPE EINVAL /* POSIX 1003.1 format errno. */ +#endif + +#define RET_ERROR -1 /* Return values. */ +#define RET_SUCCESS 0 +#define RET_SPECIAL 1 + +#define MAX_PAGE_NUMBER 0xffffffff /* >= # of pages in a file */ + +#ifndef __sgi +typedef uint32 pgno_t; +#endif + +#define MAX_PAGE_OFFSET 65535 /* >= # of bytes in a page */ +typedef uint16 indx_t; +#define MAX_REC_NUMBER 0xffffffff /* >= # of records in a tree */ +typedef uint32 recno_t; + +/* Key/data structure -- a Data-Base Thang. */ +typedef struct { + void *data; /* data */ + size_t size; /* data length */ +} DBT; + +/* Routine flags. */ +#define R_CURSOR 1 /* del, put, seq */ +#define __R_UNUSED 2 /* UNUSED */ +#define R_FIRST 3 /* seq */ +#define R_IAFTER 4 /* put (RECNO) */ +#define R_IBEFORE 5 /* put (RECNO) */ +#define R_LAST 6 /* seq (BTREE, RECNO) */ +#define R_NEXT 7 /* seq */ +#define R_NOOVERWRITE 8 /* put */ +#define R_PREV 9 /* seq (BTREE, RECNO) */ +#define R_SETCURSOR 10 /* put (RECNO) */ +#define R_RECNOSYNC 11 /* sync (RECNO) */ + +typedef enum { DB_BTREE, DB_HASH, DB_RECNO } DBTYPE; + +typedef enum { LockOutDatabase, UnlockDatabase } DBLockFlagEnum; + +/* + * !!! + * The following flags are included in the dbopen(3) call as part of the + * open(2) flags. In order to avoid conflicts with the open flags, start + * at the top of the 16 or 32-bit number space and work our way down. If + * the open flags were significantly expanded in the future, it could be + * a problem. Wish I'd left another flags word in the dbopen call. + * + * !!! + * None of this stuff is implemented yet. The only reason that it's here + * is so that the access methods can skip copying the key/data pair when + * the DB_LOCK flag isn't set. + */ +#if UINT_MAX > 65535 +#define DB_LOCK 0x20000000 /* Do locking. */ +#define DB_SHMEM 0x40000000 /* Use shared memory. */ +#define DB_TXN 0x80000000 /* Do transactions. */ +#else +#define DB_LOCK 0x2000 /* Do locking. */ +#define DB_SHMEM 0x4000 /* Use shared memory. */ +#define DB_TXN 0x8000 /* Do transactions. */ +#endif + +/* Access method description structure. */ +typedef struct __db { + DBTYPE type; /* Underlying db type. */ + int (*close) (struct __db *); + int (*del) (const struct __db *, const DBT *, uint); + int (*get) (const struct __db *, const DBT *, DBT *, uint); + int (*put) (const struct __db *, DBT *, const DBT *, uint); + int (*seq) (const struct __db *, DBT *, DBT *, uint); + int (*sync) (const struct __db *, uint); + void *internal; /* Access method private. */ + int (*fd) (const struct __db *); +} DB; + +#define BTREEMAGIC 0x053162 +#define BTREEVERSION 3 + +/* Structure used to pass parameters to the btree routines. */ +typedef struct { +#define R_DUP 0x01 /* duplicate keys */ + uint32 flags; + uint cachesize; /* bytes to cache */ + int maxkeypage; /* maximum keys per page */ + int minkeypage; /* minimum keys per page */ + uint psize; /* page size */ + int (*compare) /* comparison function */ + (const DBT *, const DBT *); + size_t (*prefix) /* prefix function */ + (const DBT *, const DBT *); + int lorder; /* byte order */ +} BTREEINFO; + +#define HASHMAGIC 0x061561 +#define HASHVERSION 2 + +/* Structure used to pass parameters to the hashing routines. */ +typedef struct { + uint bsize; /* bucket size */ + uint ffactor; /* fill factor */ + uint nelem; /* number of elements */ + uint cachesize; /* bytes to cache */ + uint32 /* hash function */ + (*hash) (const void *, size_t); + int lorder; /* byte order */ +} HASHINFO; + +/* Structure used to pass parameters to the record routines. */ +typedef struct { +#define R_FIXEDLEN 0x01 /* fixed-length records */ +#define R_NOKEY 0x02 /* key not required */ +#define R_SNAPSHOT 0x04 /* snapshot the input */ + uint32 flags; + uint cachesize; /* bytes to cache */ + uint psize; /* page size */ + int lorder; /* byte order */ + size_t reclen; /* record length (fixed-length records) */ + uint8 bval; /* delimiting byte (variable-length records */ + char *bfname; /* btree file name */ +} RECNOINFO; + +#ifdef __DBINTERFACE_PRIVATE +/* + * Little endian <==> big endian 32-bit swap macros. + * M_32_SWAP swap a memory location + * P_32_SWAP swap a referenced memory location + * P_32_COPY swap from one location to another + */ +#define M_32_SWAP(a) { \ + uint32 _tmp = a; \ + ((char *)&a)[0] = ((char *)&_tmp)[3]; \ + ((char *)&a)[1] = ((char *)&_tmp)[2]; \ + ((char *)&a)[2] = ((char *)&_tmp)[1]; \ + ((char *)&a)[3] = ((char *)&_tmp)[0]; \ +} +#define P_32_SWAP(a) { \ + uint32 _tmp = *(uint32 *)a; \ + ((char *)a)[0] = ((char *)&_tmp)[3]; \ + ((char *)a)[1] = ((char *)&_tmp)[2]; \ + ((char *)a)[2] = ((char *)&_tmp)[1]; \ + ((char *)a)[3] = ((char *)&_tmp)[0]; \ +} +#define P_32_COPY(a, b) { \ + ((char *)&(b))[0] = ((char *)&(a))[3]; \ + ((char *)&(b))[1] = ((char *)&(a))[2]; \ + ((char *)&(b))[2] = ((char *)&(a))[1]; \ + ((char *)&(b))[3] = ((char *)&(a))[0]; \ +} + +/* + * Little endian <==> big endian 16-bit swap macros. + * M_16_SWAP swap a memory location + * P_16_SWAP swap a referenced memory location + * P_16_COPY swap from one location to another + */ +#define M_16_SWAP(a) { \ + uint16 _tmp = a; \ + ((char *)&a)[0] = ((char *)&_tmp)[1]; \ + ((char *)&a)[1] = ((char *)&_tmp)[0]; \ +} +#define P_16_SWAP(a) { \ + uint16 _tmp = *(uint16 *)a; \ + ((char *)a)[0] = ((char *)&_tmp)[1]; \ + ((char *)a)[1] = ((char *)&_tmp)[0]; \ +} +#define P_16_COPY(a, b) { \ + ((char *)&(b))[0] = ((char *)&(a))[1]; \ + ((char *)&(b))[1] = ((char *)&(a))[0]; \ +} +#endif + +PR_BEGIN_EXTERN_C +#if defined(__WATCOMC__) || defined(__WATCOM_CPLUSPLUS__) +extern DB * +#else +PR_EXTERN(DB *) +#endif +dbopen (const char *, int, int, DBTYPE, const void *); + +/* set or unset a global lock flag to disable the + * opening of any DBM file + */ +void dbSetOrClearDBLock(DBLockFlagEnum type); + +#ifdef __DBINTERFACE_PRIVATE +DB *__bt_open (const char *, int, int, const BTREEINFO *, int); +DB *__hash_open (const char *, int, int, const HASHINFO *, int); +DB *__rec_open (const char *, int, int, const RECNOINFO *, int); +void __dbpanic (DB *dbp); +#endif + +PR_END_EXTERN_C + +#endif /* !_DB_H_ */ diff --git a/dbm/include/mpool.h b/dbm/include/mpool.h new file mode 100644 index 000000000..a2fb62b9f --- /dev/null +++ b/dbm/include/mpool.h @@ -0,0 +1,99 @@ +/*- + * Copyright (c) 1991, 1993, 1994 + * The Regents of the University of California. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by the University of + * California, Berkeley and its contributors. + * 4. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * @(#)mpool.h 8.2 (Berkeley) 7/14/94 + */ + +#include <sys/queue.h> + +/* + * The memory pool scheme is a simple one. Each in-memory page is referenced + * by a bucket which is threaded in up to two of three ways. All active pages + * are threaded on a hash chain (hashed by page number) and an lru chain. + * Inactive pages are threaded on a free chain. Each reference to a memory + * pool is handed an opaque MPOOL cookie which stores all of this information. + */ +#define HASHSIZE 128 +#define HASHKEY(pgno) ((pgno - 1) % HASHSIZE) + +/* The BKT structures are the elements of the queues. */ +typedef struct _bkt { + CIRCLEQ_ENTRY(_bkt) hq; /* hash queue */ + CIRCLEQ_ENTRY(_bkt) q; /* lru queue */ + void *page; /* page */ + pgno_t pgno; /* page number */ + +#define MPOOL_DIRTY 0x01 /* page needs to be written */ +#define MPOOL_PINNED 0x02 /* page is pinned into memory */ + uint8 flags; /* flags */ +} BKT; + +typedef struct MPOOL { + CIRCLEQ_HEAD(_lqh, _bkt) lqh; /* lru queue head */ + /* hash queue array */ + CIRCLEQ_HEAD(_hqh, _bkt) hqh[HASHSIZE]; + pgno_t curcache; /* current number of cached pages */ + pgno_t maxcache; /* max number of cached pages */ + pgno_t npages; /* number of pages in the file */ + uint32 pagesize; /* file page size */ + int fd; /* file descriptor */ + /* page in conversion routine */ + void (*pgin) (void *, pgno_t, void *); + /* page out conversion routine */ + void (*pgout) (void *, pgno_t, void *); + void *pgcookie; /* cookie for page in/out routines */ +#ifdef STATISTICS + uint32 cachehit; + uint32 cachemiss; + uint32 pagealloc; + uint32 pageflush; + uint32 pageget; + uint32 pagenew; + uint32 pageput; + uint32 pageread; + uint32 pagewrite; +#endif +} MPOOL; + +__BEGIN_DECLS +MPOOL *mpool_open (void *, int, pgno_t, pgno_t); +void mpool_filter (MPOOL *, void (*)(void *, pgno_t, void *), + void (*)(void *, pgno_t, void *), void *); +void *mpool_new (MPOOL *, pgno_t *); +void *mpool_get (MPOOL *, pgno_t, uint); +int mpool_put (MPOOL *, void *, uint); +int mpool_sync (MPOOL *); +int mpool_close (MPOOL *); +#ifdef STATISTICS +void mpool_stat (MPOOL *); +#endif +__END_DECLS diff --git a/dbm/include/ncompat.h b/dbm/include/ncompat.h new file mode 100644 index 000000000..c95b327fe --- /dev/null +++ b/dbm/include/ncompat.h @@ -0,0 +1,232 @@ +/*- + * Copyright (c) 1991, 1993 + * The Regents of the University of California. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by the University of + * California, Berkeley and its contributors. + * 4. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * @(#)compat.h 8.13 (Berkeley) 2/21/94 + */ + +#ifndef _COMPAT_H_ +#define _COMPAT_H_ + +#include <sys/types.h> + +/* + * If your system doesn't typedef u_long, u_short, or u_char, change + * the 0 to a 1. + */ +#if 0 +typedef unsigned char u_char; /* 4.[34]BSD names. */ +typedef unsigned int u_int; +typedef unsigned long u_long; +typedef unsigned short u_short; +#endif + +/* If your system doesn't typedef size_t, change the 0 to a 1. */ +#if 0 +typedef unsigned int size_t; /* POSIX, 4.[34]BSD names. */ +#endif + +/* If your system doesn't typedef ssize_t, change the 0 to a 1. */ +#if 0 +typedef int ssize_t; /* POSIX names. */ +#endif + +/* + * If your system doesn't have the POSIX type for a signal mask, + * change the 0 to a 1. + */ +#if 0 /* POSIX 1003.1 signal mask type. */ +typedef unsigned int sigset_t; +#endif + +/* + * If your system's vsprintf returns a char *, not an int, + * change the 0 to a 1. + */ +#if defined (__sun) && !defined(__SVR4) /* SUNOS */ +#define VSPRINTF_CHARSTAR +#endif +/* + * If you don't have POSIX 1003.1 signals, the signal code surrounding the + * temporary file creation is intended to block all of the possible signals + * long enough to create the file and unlink it. All of this stuff is + * intended to use old-style BSD calls to fake POSIX 1003.1 calls. + */ +#ifdef NO_POSIX_SIGNALS +#define sigemptyset(set) (*(set) = 0) +#define sigfillset(set) (*(set) = ~(sigset_t)0, 0) +#define sigaddset(set,signo) (*(set) |= sigmask(signo), 0) +#define sigdelset(set,signo) (*(set) &= ~sigmask(signo), 0) +#define sigismember(set,signo) ((*(set) & sigmask(signo)) != 0) + +#define SIG_BLOCK 1 +#define SIG_UNBLOCK 2 +#define SIG_SETMASK 3 + +static int __sigtemp; /* For the use of sigprocmask */ + +/* Repeated test of oset != NULL is to avoid "*0". */ +#define sigprocmask(how, set, oset) \ + ((__sigtemp = \ + (((how) == SIG_BLOCK) ? \ + sigblock(0) | *(set) : \ + (((how) == SIG_UNBLOCK) ? \ + sigblock(0) & ~(*(set)) : \ + ((how) == SIG_SETMASK ? \ + *(set) : sigblock(0))))), \ + ((oset) ? (*(oset ? oset : set) = sigsetmask(__sigtemp)) : \ + sigsetmask(__sigtemp)), 0) +#endif + +/* + * If your system doesn't have an include file with the appropriate + * byte order set, make sure you specify the correct one. + */ +#ifndef BYTE_ORDER +#define LITTLE_ENDIAN 1234 /* LSB first: i386, vax */ +#define BIG_ENDIAN 4321 /* MSB first: 68000, ibm, net */ +#define BYTE_ORDER BIG_ENDIAN /* Set for your system. */ +#endif + +#if defined(SYSV) || defined(SYSTEM5) || defined(__sun) +#define index(a, b) strchr(a, b) +#define rindex(a, b) strrchr(a, b) +#define bzero(a, b) memset(a, 0, b) +#define bcmp(a, b, n) memcmp(a, b, n) +#define bcopy(a, b, n) memmove(b, a, n) +#endif + +#if defined(BSD) || defined(BSD4_3) +#define strchr(a, b) index(a, b) +#define strrchr(a, b) rindex(a, b) +#define memcmp(a, b, n) bcmp(a, b, n) +#define memmove(a, b, n) bcopy(b, a, n) +#endif + +/* + * 32-bit machine. The db routines are theoretically independent of + * the size of u_shorts and u_longs, but I don't know that anyone has + * ever actually tried it. At a minimum, change the following #define's + * if you are trying to compile on a different type of system. + */ +#ifndef USHRT_MAX +#define USHRT_MAX 0xFFFF +#define ULONG_MAX 0xFFFFFFFF +#endif + +#ifndef O_ACCMODE /* POSIX 1003.1 access mode mask. */ +#define O_ACCMODE (O_RDONLY|O_WRONLY|O_RDWR) +#endif + +#ifndef _POSIX2_RE_DUP_MAX /* POSIX 1003.2 RE limit. */ +#define _POSIX2_RE_DUP_MAX 255 +#endif + +/* + * If you can't provide lock values in the open(2) call. Note, this + * allows races to happen. + */ +#ifndef O_EXLOCK /* 4.4BSD extension. */ +#define O_EXLOCK 0 +#endif + +#ifndef O_SHLOCK /* 4.4BSD extension. */ +#define O_SHLOCK 0 +#endif + +#ifndef EFTYPE +#define EFTYPE EINVAL /* POSIX 1003.1 format errno. */ +#endif + +#ifndef WCOREDUMP /* 4.4BSD extension */ +#define WCOREDUMP(a) 0 +#endif + +#ifndef STDERR_FILENO +#define STDIN_FILENO 0 /* ANSI C #defines */ +#define STDOUT_FILENO 1 +#define STDERR_FILENO 2 +#endif + +#ifndef SEEK_END +#define SEEK_SET 0 /* POSIX 1003.1 seek values */ +#define SEEK_CUR 1 +#define SEEK_END 2 +#endif + +#ifndef _POSIX_VDISABLE /* POSIX 1003.1 disabling char. */ +#define _POSIX_VDISABLE 0 /* Some systems used 0. */ +#endif + +#ifndef TCSASOFT /* 4.4BSD extension. */ +#define TCSASOFT 0 +#endif + +#ifndef _POSIX2_RE_DUP_MAX /* POSIX 1003.2 values. */ +#define _POSIX2_RE_DUP_MAX 255 +#endif + +#ifndef NULL /* ANSI C #defines NULL everywhere. */ +#define NULL 0 +#endif + +#ifndef MAX /* Usually found in <sys/param.h>. */ +#define MAX(_a,_b) ((_a)<(_b)?(_b):(_a)) +#endif +#ifndef MIN /* Usually found in <sys/param.h>. */ +#define MIN(_a,_b) ((_a)<(_b)?(_a):(_b)) +#endif + +/* Default file permissions. */ +#ifndef DEFFILEMODE /* 4.4BSD extension. */ +#define DEFFILEMODE (S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH) +#endif + +#ifndef __sun +#ifndef S_ISDIR /* POSIX 1003.1 file type tests. */ +#define S_ISDIR(m) ((m & 0170000) == 0040000) /* directory */ +#define S_ISCHR(m) ((m & 0170000) == 0020000) /* char special */ +#define S_ISBLK(m) ((m & 0170000) == 0060000) /* block special */ +#define S_ISREG(m) ((m & 0170000) == 0100000) /* regular file */ +#define S_ISFIFO(m) ((m & 0170000) == 0010000) /* fifo */ +#endif +#ifndef S_ISLNK /* BSD POSIX 1003.1 extensions */ +#define S_ISLNK(m) ((m & 0170000) == 0120000) /* symbolic link */ +#define S_ISSOCK(m) ((m & 0170000) == 0140000) /* socket */ +#endif +#endif /* __sun */ + +/* The type of a va_list. */ +#ifndef _BSD_VA_LIST_ /* 4.4BSD #define. */ +#define _BSD_VA_LIST_ char * +#endif + +#endif /* !_COMPAT_H_ */ diff --git a/dbm/include/ndbm.h b/dbm/include/ndbm.h new file mode 100644 index 000000000..7ad5f1a23 --- /dev/null +++ b/dbm/include/ndbm.h @@ -0,0 +1,77 @@ +/*- + * Copyright (c) 1990, 1993 + * The Regents of the University of California. All rights reserved. + * + * This code is derived from software contributed to Berkeley by + * Margo Seltzer. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by the University of + * California, Berkeley and its contributors. + * 4. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * @(#)ndbm.h 8.1 (Berkeley) 6/2/93 + */ + +#ifndef _NDBM_H_ +#define _NDBM_H_ + +#include "mcom_db.h" + +/* Map dbm interface onto db(3). */ +#define DBM_RDONLY O_RDONLY + +/* Flags to dbm_store(). */ +#define DBM_INSERT 0 +#define DBM_REPLACE 1 + +/* + * The db(3) support for ndbm(3) always appends this suffix to the + * file name to avoid overwriting the user's original database. + */ +#define DBM_SUFFIX ".db" + +typedef struct { + char *dptr; + int dsize; +} datum; + +typedef DB DBM; +#define dbm_pagfno(a) DBM_PAGFNO_NOT_AVAILABLE + +__BEGIN_DECLS +void dbm_close (DBM *); +int dbm_delete (DBM *, datum); +datum dbm_fetch (DBM *, datum); +datum dbm_firstkey (DBM *); +long dbm_forder (DBM *, datum); +datum dbm_nextkey (DBM *); +DBM *dbm_open (const char *, int, int); +int dbm_store (DBM *, datum, datum, int); +int dbm_dirfno (DBM *); +__END_DECLS + +#endif /* !_NDBM_H_ */ diff --git a/dbm/include/nsres.h b/dbm/include/nsres.h new file mode 100644 index 000000000..f3f4e2d1a --- /dev/null +++ b/dbm/include/nsres.h @@ -0,0 +1,41 @@ +#ifndef NSRES_H +#define NSRES_H +#include "mcom_db.h" + +__BEGIN_DECLS + +/* C version */ +#define NSRESHANDLE void * + +typedef void (*NSRESTHREADFUNC)(void *); + +typedef struct NSRESTHREADINFO +{ + void *lock; + NSRESTHREADFUNC fn_lock; + NSRESTHREADFUNC fn_unlock; +} NSRESTHREADINFO; + +#define MAXBUFNUM 10 +#define MAXSTRINGLEN 300 + +#define NSRES_CREATE 1 +#define NSRES_OPEN 2 + + + +NSRESHANDLE NSResCreateTable(const char *filename, NSRESTHREADINFO *threadinfo); +NSRESHANDLE NSResOpenTable(const char *filename, NSRESTHREADINFO *threadinfo); +void NSResCloseTable(NSRESHANDLE handle); + +char *NSResLoadString(NSRESHANDLE handle, const char * library, int32 id, + unsigned int charsetid, char *retbuf); +int32 NSResGetSize(NSRESHANDLE handle, const char *library, int32 id); +int32 NSResLoadResource(NSRESHANDLE handle, const char *library, int32 id, char *retbuf); +int NSResAddString(NSRESHANDLE handle, const char *library, int32 id, const char *string, unsigned int charset); + +__END_DECLS + + +#endif + diff --git a/dbm/include/page.h b/dbm/include/page.h new file mode 100644 index 000000000..faf2b815b --- /dev/null +++ b/dbm/include/page.h @@ -0,0 +1,96 @@ +/*- + * Copyright (c) 1990, 1993, 1994 + * The Regents of the University of California. All rights reserved. + * + * This code is derived from software contributed to Berkeley by + * Margo Seltzer. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by the University of + * California, Berkeley and its contributors. + * 4. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * @(#)page.h 8.2 (Berkeley) 5/31/94 + */ + +/* + * Definitions for hashing page file format. + */ + +/* + * routines dealing with a data page + * + * page format: + * +------------------------------+ + * p | n | keyoff | datoff | keyoff | + * +------------+--------+--------+ + * | datoff | free | ptr | --> | + * +--------+---------------------+ + * | F R E E A R E A | + * +--------------+---------------+ + * | <---- - - - | data | + * +--------+-----+----+----------+ + * | key | data | key | + * +--------+----------+----------+ + * + * Pointer to the free space is always: p[p[0] + 2] + * Amount of free space on the page is: p[p[0] + 1] + */ + +/* + * How many bytes required for this pair? + * 2 shorts in the table at the top of the page + room for the + * key and room for the data + * + * We prohibit entering a pair on a page unless there is also room to append + * an overflow page. The reason for this it that you can get in a situation + * where a single key/data pair fits on a page, but you can't append an + * overflow page and later you'd have to split the key/data and handle like + * a big pair. + * You might as well do this up front. + */ +#ifndef PAGE_H +#define PAGE_H + +#define PAIRSIZE(K,D) (2*sizeof(uint16) + (K)->size + (D)->size) +#define BIGOVERHEAD (4*sizeof(uint16)) +#define KEYSIZE(K) (4*sizeof(uint16) + (K)->size); +#define OVFLSIZE (2*sizeof(uint16)) +#define FREESPACE(P) ((P)[(P)[0]+1]) +#define OFFSET(P) ((P)[(P)[0]+2]) +#define PAIRFITS(P,K,D) \ + (((P)[2] >= REAL_KEY) && \ + (PAIRSIZE((K),(D)) + OVFLSIZE) <= FREESPACE((P))) +#define PAGE_META(N) (((N)+3) * sizeof(uint16)) + +typedef struct { + BUFHEAD *newp; + BUFHEAD *oldp; + BUFHEAD *nextp; + uint16 next_addr; +} SPLIT_RETURN; +#endif + diff --git a/dbm/include/queue.h b/dbm/include/queue.h new file mode 100644 index 000000000..40d32ccb6 --- /dev/null +++ b/dbm/include/queue.h @@ -0,0 +1,245 @@ +/* + * Copyright (c) 1991, 1993 + * The Regents of the University of California. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by the University of + * California, Berkeley and its contributors. + * 4. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * @(#)queue.h 8.3 (Berkeley) 12/13/93 + */ + +#ifndef _QUEUE_H_ +#define _QUEUE_H_ + +/* + * This file defines three types of data structures: lists, tail queues, + * and circular queues. + * + * A list is headed by a single forward pointer (or an array of forward + * pointers for a hash table header). The elements are doubly linked + * so that an arbitrary element can be removed without a need to + * traverse the list. New elements can be added to the list after + * an existing element or at the head of the list. A list may only be + * traversed in the forward direction. + * + * A tail queue is headed by a pair of pointers, one to the head of the + * list and the other to the tail of the list. The elements are doubly + * linked so that an arbitrary element can be removed without a need to + * traverse the list. New elements can be added to the list after + * an existing element, at the head of the list, or at the end of the + * list. A tail queue may only be traversed in the forward direction. + * + * A circle queue is headed by a pair of pointers, one to the head of the + * list and the other to the tail of the list. The elements are doubly + * linked so that an arbitrary element can be removed without a need to + * traverse the list. New elements can be added to the list before or after + * an existing element, at the head of the list, or at the end of the list. + * A circle queue may be traversed in either direction, but has a more + * complex end of list detection. + * + * For details on the use of these macros, see the queue(3) manual page. + */ + +/* + * List definitions. + */ +#define LIST_HEAD(name, type) \ +struct name { \ + struct type *lh_first; /* first element */ \ +} + +#define LIST_ENTRY(type) \ +struct { \ + struct type *le_next; /* next element */ \ + struct type **le_prev; /* address of previous next element */ \ +} + +/* + * List functions. + */ +#define LIST_INIT(head) { \ + (head)->lh_first = NULL; \ +} + +#define LIST_INSERT_AFTER(listelm, elm, field) { \ + if (((elm)->field.le_next = (listelm)->field.le_next) != NULL) \ + (listelm)->field.le_next->field.le_prev = \ + &(elm)->field.le_next; \ + (listelm)->field.le_next = (elm); \ + (elm)->field.le_prev = &(listelm)->field.le_next; \ +} + +#define LIST_INSERT_HEAD(head, elm, field) { \ + if (((elm)->field.le_next = (head)->lh_first) != NULL) \ + (head)->lh_first->field.le_prev = &(elm)->field.le_next;\ + (head)->lh_first = (elm); \ + (elm)->field.le_prev = &(head)->lh_first; \ +} + +#define LIST_REMOVE(elm, field) { \ + if ((elm)->field.le_next != NULL) \ + (elm)->field.le_next->field.le_prev = \ + (elm)->field.le_prev; \ + *(elm)->field.le_prev = (elm)->field.le_next; \ +} + +/* + * Tail queue definitions. + */ +#define TAILQ_HEAD(name, type) \ +struct name { \ + struct type *tqh_first; /* first element */ \ + struct type **tqh_last; /* addr of last next element */ \ +} + +#define TAILQ_ENTRY(type) \ +struct { \ + struct type *tqe_next; /* next element */ \ + struct type **tqe_prev; /* address of previous next element */ \ +} + +/* + * Tail queue functions. + */ +#define TAILQ_INIT(head) { \ + (head)->tqh_first = NULL; \ + (head)->tqh_last = &(head)->tqh_first; \ +} + +#define TAILQ_INSERT_HEAD(head, elm, field) { \ + if (((elm)->field.tqe_next = (head)->tqh_first) != NULL) \ + (elm)->field.tqe_next->field.tqe_prev = \ + &(elm)->field.tqe_next; \ + else \ + (head)->tqh_last = &(elm)->field.tqe_next; \ + (head)->tqh_first = (elm); \ + (elm)->field.tqe_prev = &(head)->tqh_first; \ +} + +#define TAILQ_INSERT_TAIL(head, elm, field) { \ + (elm)->field.tqe_next = NULL; \ + (elm)->field.tqe_prev = (head)->tqh_last; \ + *(head)->tqh_last = (elm); \ + (head)->tqh_last = &(elm)->field.tqe_next; \ +} + +#define TAILQ_INSERT_AFTER(head, listelm, elm, field) { \ + if (((elm)->field.tqe_next = (listelm)->field.tqe_next) != NULL)\ + (elm)->field.tqe_next->field.tqe_prev = \ + &(elm)->field.tqe_next; \ + else \ + (head)->tqh_last = &(elm)->field.tqe_next; \ + (listelm)->field.tqe_next = (elm); \ + (elm)->field.tqe_prev = &(listelm)->field.tqe_next; \ +} + +#define TAILQ_REMOVE(head, elm, field) { \ + if (((elm)->field.tqe_next) != NULL) \ + (elm)->field.tqe_next->field.tqe_prev = \ + (elm)->field.tqe_prev; \ + else \ + (head)->tqh_last = (elm)->field.tqe_prev; \ + *(elm)->field.tqe_prev = (elm)->field.tqe_next; \ +} + +/* + * Circular queue definitions. + */ +#define CIRCLEQ_HEAD(name, type) \ +struct name { \ + struct type *cqh_first; /* first element */ \ + struct type *cqh_last; /* last element */ \ +} + +#define CIRCLEQ_ENTRY(type) \ +struct { \ + struct type *cqe_next; /* next element */ \ + struct type *cqe_prev; /* previous element */ \ +} + +/* + * Circular queue functions. + */ +#define CIRCLEQ_INIT(head) { \ + (head)->cqh_first = (void *)(head); \ + (head)->cqh_last = (void *)(head); \ +} + +#define CIRCLEQ_INSERT_AFTER(head, listelm, elm, field) { \ + (elm)->field.cqe_next = (listelm)->field.cqe_next; \ + (elm)->field.cqe_prev = (listelm); \ + if ((listelm)->field.cqe_next == (void *)(head)) \ + (head)->cqh_last = (elm); \ + else \ + (listelm)->field.cqe_next->field.cqe_prev = (elm); \ + (listelm)->field.cqe_next = (elm); \ +} + +#define CIRCLEQ_INSERT_BEFORE(head, listelm, elm, field) { \ + (elm)->field.cqe_next = (listelm); \ + (elm)->field.cqe_prev = (listelm)->field.cqe_prev; \ + if ((listelm)->field.cqe_prev == (void *)(head)) \ + (head)->cqh_first = (elm); \ + else \ + (listelm)->field.cqe_prev->field.cqe_next = (elm); \ + (listelm)->field.cqe_prev = (elm); \ +} + +#define CIRCLEQ_INSERT_HEAD(head, elm, field) { \ + (elm)->field.cqe_next = (head)->cqh_first; \ + (elm)->field.cqe_prev = (void *)(head); \ + if ((head)->cqh_last == (void *)(head)) \ + (head)->cqh_last = (elm); \ + else \ + (head)->cqh_first->field.cqe_prev = (elm); \ + (head)->cqh_first = (elm); \ +} + +#define CIRCLEQ_INSERT_TAIL(head, elm, field) { \ + (elm)->field.cqe_next = (void *)(head); \ + (elm)->field.cqe_prev = (head)->cqh_last; \ + if ((head)->cqh_first == (void *)(head)) \ + (head)->cqh_first = (elm); \ + else \ + (head)->cqh_last->field.cqe_next = (elm); \ + (head)->cqh_last = (elm); \ +} + +#define CIRCLEQ_REMOVE(head, elm, field) { \ + if ((elm)->field.cqe_next == (void *)(head)) \ + (head)->cqh_last = (elm)->field.cqe_prev; \ + else \ + (elm)->field.cqe_next->field.cqe_prev = \ + (elm)->field.cqe_prev; \ + if ((elm)->field.cqe_prev == (void *)(head)) \ + (head)->cqh_first = (elm)->field.cqe_next; \ + else \ + (elm)->field.cqe_prev->field.cqe_next = \ + (elm)->field.cqe_next; \ +} +#endif /* !_QUEUE_H_ */ diff --git a/dbm/include/search.h b/dbm/include/search.h new file mode 100644 index 000000000..ff58b1c15 --- /dev/null +++ b/dbm/include/search.h @@ -0,0 +1,51 @@ +/*- + * Copyright (c) 1990, 1993 + * The Regents of the University of California. All rights reserved. + * + * This code is derived from software contributed to Berkeley by + * Margo Seltzer. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by the University of + * California, Berkeley and its contributors. + * 4. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * @(#)search.h 8.1 (Berkeley) 6/4/93 + */ + +/* Backward compatibility to hsearch interface. */ +typedef struct entry { + char *key; + char *data; +} ENTRY; + +typedef enum { + FIND, ENTER +} ACTION; + +int hcreate (unsigned int); +void hdestroy (void); +ENTRY *hsearch (ENTRY, ACTION); diff --git a/dbm/include/watcomfx.h b/dbm/include/watcomfx.h new file mode 100644 index 000000000..3020e9de9 --- /dev/null +++ b/dbm/include/watcomfx.h @@ -0,0 +1,26 @@ +#if defined(__WATCOMC__) || defined(__WATCOM_CPLUSPLUS__) +#ifndef __WATCOM_FIX_H__ +#define __WATCOM_FIX_H__ 1 +/* + * WATCOM's C compiler doesn't default to "__cdecl" conventions for external + * symbols and functions. Rather than adding an explicit __cdecl modifier to + * every external symbol and function declaration and definition, we use the + * following pragma to (attempt to) change WATCOM c's default to __cdecl. + * These pragmas were taken from pages 180-181, 266 & 269 of the + * Watcom C/C++ version 11 User's Guide, 3rd edition. + */ +#if defined(XP_WIN16) || defined(WIN16) +#pragma aux default "_*" \ + parm caller [] \ + value struct float struct routine [ax] \ + modify [ax bx cx dx es] +#else +#pragma aux default "_*" \ + parm caller [] \ + value struct float struct routine [eax] \ + modify [eax ecx edx] +#endif +#pragma aux default far + +#endif /* once */ +#endif /* WATCOM compiler */ diff --git a/dbm/include/winfile.h b/dbm/include/winfile.h new file mode 100644 index 000000000..1fd54d578 --- /dev/null +++ b/dbm/include/winfile.h @@ -0,0 +1,106 @@ + +/* --------------------------------------------------------------------------- + Stuff to fake unix file I/O on windows boxes + ------------------------------------------------------------------------*/ + +#ifndef WINFILE_H +#define WINFILE_H + +#ifdef _WINDOWS +/* hacked out of <dirent.h> on an SGI */ +#if defined(XP_WIN32) || defined(_WIN32) +/* 32-bit stuff here */ +#include <windows.h> +#include <stdlib.h> +#ifdef __MINGW32__ +#include <sys/types.h> +#include <sys/stat.h> +#else +#include <sys\types.h> +#include <sys\stat.h> +#endif + +typedef struct DIR_Struct { + void * directoryPtr; + WIN32_FIND_DATA data; +} DIR; + +#define _ST_FSTYPSZ 16 + +#if !defined(__BORLANDC__) && !defined(__GNUC__) + typedef unsigned long mode_t; + typedef long uid_t; + typedef long gid_t; + typedef long off_t; + typedef unsigned long nlink_t; +#endif + +typedef struct timestruc { + time_t tv_sec; /* seconds */ + long tv_nsec; /* and nanoseconds */ +} timestruc_t; + + +struct dirent { /* data from readdir() */ + ino_t d_ino; /* inode number of entry */ + off_t d_off; /* offset of disk direntory entry */ + unsigned short d_reclen; /* length of this record */ + char d_name[_MAX_FNAME]; /* name of file */ +}; + +#if !defined(__BORLANDC__) && !defined (__GNUC__) +#define S_ISDIR(s) ((s) & _S_IFDIR) +#endif + +#else /* _WIN32 */ +/* 16-bit windows stuff */ + +#include <sys\types.h> +#include <sys\stat.h> +#include <dos.h> + + + +/* Getting cocky to support multiple file systems */ +typedef struct dirStruct_tag { + struct _find_t file_data; + char c_checkdrive; +} dirStruct; + +typedef struct DIR_Struct { + void * directoryPtr; + dirStruct data; +} DIR; + +#define _ST_FSTYPSZ 16 +typedef unsigned long mode_t; +typedef long uid_t; +typedef long gid_t; +typedef long off_t; +typedef unsigned long nlink_t; + +typedef struct timestruc { + time_t tv_sec; /* seconds */ + long tv_nsec; /* and nanoseconds */ +} timestruc_t; + +struct dirent { /* data from readdir() */ + ino_t d_ino; /* inode number of entry */ + off_t d_off; /* offset of disk direntory entry */ + unsigned short d_reclen; /* length of this record */ +#ifdef XP_WIN32 + char d_name[_MAX_FNAME]; /* name of file */ +#else + char d_name[20]; /* name of file */ +#endif +}; + +#define S_ISDIR(s) ((s) & _S_IFDIR) + +#endif /* 16-bit windows */ + +#define CONST const + +#endif /* _WINDOWS */ + +#endif /* WINFILE_H */ diff --git a/dbm/macbuild/DBM.Prefix b/dbm/macbuild/DBM.Prefix new file mode 100644 index 000000000..bace25e50 --- /dev/null +++ b/dbm/macbuild/DBM.Prefix @@ -0,0 +1,33 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- + * + * The contents of this file are subject to the Netscape Public + * License Version 1.1 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.mozilla.org/NPL/ + * + * Software distributed under the License is distributed on an "AS + * IS" basis, WITHOUT WARRANTY OF 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 Netscape + * Communications Corporation. Portions created by Netscape are + * Copyright (C) 1998 Netscape Communications Corporation. All + * Rights Reserved. + * + * Contributor(s): + */ + +// +// DBM.Prefix +// +// Global prefix file for the non-debug DBM project. +// +// + + +#include "MacPrefix.h" +#include "DBMConfig.h" + diff --git a/dbm/macbuild/DBM.xml b/dbm/macbuild/DBM.xml new file mode 100644 index 000000000..375068925 --- /dev/null +++ b/dbm/macbuild/DBM.xml @@ -0,0 +1,4326 @@ +<?xml version="1.0" encoding="UTF-8" standalone="yes" ?> +<?codewarrior exportversion="1.0.1" ideversion="4.2" ?> + +<!DOCTYPE PROJECT [ +<!ELEMENT PROJECT (TARGETLIST, TARGETORDER, GROUPLIST, DESIGNLIST?)> +<!ELEMENT TARGETLIST (TARGET+)> +<!ELEMENT TARGET (NAME, SETTINGLIST, FILELIST?, LINKORDER?, SEGMENTLIST?, OVERLAYGROUPLIST?, SUBTARGETLIST?, SUBPROJECTLIST?, FRAMEWORKLIST)> +<!ELEMENT NAME (#PCDATA)> +<!ELEMENT USERSOURCETREETYPE (#PCDATA)> +<!ELEMENT PATH (#PCDATA)> +<!ELEMENT FILELIST (FILE*)> +<!ELEMENT FILE (PATHTYPE, PATHROOT?, ACCESSPATH?, PATH, PATHFORMAT?, ROOTFILEREF?, FILEKIND?, FILEFLAGS?)> +<!ELEMENT PATHTYPE (#PCDATA)> +<!ELEMENT PATHROOT (#PCDATA)> +<!ELEMENT ACCESSPATH (#PCDATA)> +<!ELEMENT PATHFORMAT (#PCDATA)> +<!ELEMENT ROOTFILEREF (PATHTYPE, PATHROOT?, ACCESSPATH?, PATH, PATHFORMAT?)> +<!ELEMENT FILEKIND (#PCDATA)> +<!ELEMENT FILEFLAGS (#PCDATA)> +<!ELEMENT FILEREF (TARGETNAME?, PATHTYPE, PATHROOT?, ACCESSPATH?, PATH, PATHFORMAT?)> +<!ELEMENT TARGETNAME (#PCDATA)> +<!ELEMENT SETTINGLIST ((SETTING|PANELDATA)+)> +<!ELEMENT SETTING (NAME?, (VALUE|(SETTING+)))> +<!ELEMENT PANELDATA (NAME, VALUE)> +<!ELEMENT VALUE (#PCDATA)> +<!ELEMENT LINKORDER (FILEREF*)> +<!ELEMENT SEGMENTLIST (SEGMENT+)> +<!ELEMENT SEGMENT (NAME, ATTRIBUTES?, FILEREF*)> +<!ELEMENT ATTRIBUTES (#PCDATA)> +<!ELEMENT OVERLAYGROUPLIST (OVERLAYGROUP+)> +<!ELEMENT OVERLAYGROUP (NAME, BASEADDRESS, OVERLAY*)> +<!ELEMENT BASEADDRESS (#PCDATA)> +<!ELEMENT OVERLAY (NAME, FILEREF*)> +<!ELEMENT SUBTARGETLIST (SUBTARGET+)> +<!ELEMENT SUBTARGET (TARGETNAME, ATTRIBUTES?, FILEREF?)> +<!ELEMENT SUBPROJECTLIST (SUBPROJECT+)> +<!ELEMENT SUBPROJECT (FILEREF, SUBPROJECTTARGETLIST)> +<!ELEMENT SUBPROJECTTARGETLIST (SUBPROJECTTARGET*)> +<!ELEMENT SUBPROJECTTARGET (TARGETNAME, ATTRIBUTES?, FILEREF?)> +<!ELEMENT FRAMEWORKLIST (FRAMEWORK+)> +<!ELEMENT FRAMEWORK (FILEREF, LIBRARYFILE?, VERSION?)> +<!ELEMENT LIBRARYFILE (FILEREF)> +<!ELEMENT VERSION (#PCDATA)> +<!ELEMENT TARGETORDER (ORDEREDTARGET|ORDEREDDESIGN)*> +<!ELEMENT ORDEREDTARGET (NAME)> +<!ELEMENT ORDEREDDESIGN (NAME, ORDEREDTARGET+)> +<!ELEMENT GROUPLIST (GROUP|FILEREF)*> +<!ELEMENT GROUP (NAME, (GROUP|FILEREF)*)> +<!ELEMENT DESIGNLIST (DESIGN+)> +<!ELEMENT DESIGN (NAME, DESIGNDATA)> +<!ELEMENT DESIGNDATA (#PCDATA)> +]> + +<PROJECT> + <TARGETLIST> + <TARGET> + <NAME>DBM.shlb</NAME> + <SETTINGLIST> + + <!-- Settings for "Source Trees" panel --> + <SETTING><NAME>UserSourceTrees</NAME><VALUE></VALUE></SETTING> + + <!-- Settings for "Access Paths" panel --> + <SETTING><NAME>AlwaysSearchUserPaths</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>InterpretDOSAndUnixPaths</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>RequireFrameworkStyleIncludes</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>UserSearchPaths</NAME> + <SETTING> + <SETTING><NAME>SearchPath</NAME> + <SETTING><NAME>Path</NAME><VALUE>:</VALUE></SETTING> + <SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING> + <SETTING><NAME>PathRoot</NAME><VALUE>Project</VALUE></SETTING> + </SETTING> + <SETTING><NAME>Recursive</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>FrameworkPath</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>HostFlags</NAME><VALUE>All</VALUE></SETTING> + </SETTING> + <SETTING> + <SETTING><NAME>SearchPath</NAME> + <SETTING><NAME>Path</NAME><VALUE>::src:</VALUE></SETTING> + <SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING> + <SETTING><NAME>PathRoot</NAME><VALUE>Project</VALUE></SETTING> + </SETTING> + <SETTING><NAME>Recursive</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>FrameworkPath</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>HostFlags</NAME><VALUE>All</VALUE></SETTING> + </SETTING> + <SETTING> + <SETTING><NAME>SearchPath</NAME> + <SETTING><NAME>Path</NAME><VALUE>:::dist:client:</VALUE></SETTING> + <SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING> + <SETTING><NAME>PathRoot</NAME><VALUE>Project</VALUE></SETTING> + </SETTING> + <SETTING><NAME>Recursive</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>FrameworkPath</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>HostFlags</NAME><VALUE>All</VALUE></SETTING> + </SETTING> + <SETTING> + <SETTING><NAME>SearchPath</NAME> + <SETTING><NAME>Path</NAME><VALUE>:::dist:client_stubs:</VALUE></SETTING> + <SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING> + <SETTING><NAME>PathRoot</NAME><VALUE>Project</VALUE></SETTING> + </SETTING> + <SETTING><NAME>Recursive</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>FrameworkPath</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>HostFlags</NAME><VALUE>All</VALUE></SETTING> + </SETTING> + <SETTING> + <SETTING><NAME>SearchPath</NAME> + <SETTING><NAME>Path</NAME><VALUE>:::dist:</VALUE></SETTING> + <SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING> + <SETTING><NAME>PathRoot</NAME><VALUE>Project</VALUE></SETTING> + </SETTING> + <SETTING><NAME>Recursive</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>FrameworkPath</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>HostFlags</NAME><VALUE>All</VALUE></SETTING> + </SETTING> + </SETTING> + <SETTING><NAME>SystemSearchPaths</NAME> + <SETTING> + <SETTING><NAME>SearchPath</NAME> + <SETTING><NAME>Path</NAME><VALUE>:MSL:</VALUE></SETTING> + <SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING> + <SETTING><NAME>PathRoot</NAME><VALUE>CodeWarrior</VALUE></SETTING> + </SETTING> + <SETTING><NAME>Recursive</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>FrameworkPath</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>HostFlags</NAME><VALUE>All</VALUE></SETTING> + </SETTING> + <SETTING> + <SETTING><NAME>SearchPath</NAME> + <SETTING><NAME>Path</NAME><VALUE>:MacOS Support:</VALUE></SETTING> + <SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING> + <SETTING><NAME>PathRoot</NAME><VALUE>CodeWarrior</VALUE></SETTING> + </SETTING> + <SETTING><NAME>Recursive</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>FrameworkPath</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>HostFlags</NAME><VALUE>All</VALUE></SETTING> + </SETTING> + </SETTING> + + <!-- Settings for "Debugger Runtime" panel --> + <SETTING><NAME>MWRuntimeSettings_WorkingDirectory</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWRuntimeSettings_CommandLine</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWRuntimeSettings_HostApplication</NAME> + <SETTING><NAME>Path</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>PathFormat</NAME><VALUE>Generic</VALUE></SETTING> + <SETTING><NAME>PathRoot</NAME><VALUE>Absolute</VALUE></SETTING> + </SETTING> + <SETTING><NAME>MWRuntimeSettings_EnvVars</NAME><VALUE></VALUE></SETTING> + + <!-- Settings for "Target Settings" panel --> + <SETTING><NAME>Linker</NAME><VALUE>MacOS PPC Linker</VALUE></SETTING> + <SETTING><NAME>PreLinker</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>PostLinker</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>Targetname</NAME><VALUE>DBM.shlb</VALUE></SETTING> + <SETTING><NAME>OutputDirectory</NAME> + <SETTING><NAME>Path</NAME><VALUE>:</VALUE></SETTING> + <SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING> + <SETTING><NAME>PathRoot</NAME><VALUE>Project</VALUE></SETTING> + </SETTING> + <SETTING><NAME>SaveEntriesUsingRelativePaths</NAME><VALUE>false</VALUE></SETTING> + + <!-- Settings for "File Mappings" panel --> + <SETTING><NAME>FileMappings</NAME> + <SETTING> + <SETTING><NAME>FileType</NAME><VALUE>APPL</VALUE></SETTING> + <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>EditLanguage</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>Launchable</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>ResourceFile</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING> + </SETTING> + <SETTING> + <SETTING><NAME>FileType</NAME><VALUE>Appl</VALUE></SETTING> + <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>EditLanguage</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>Launchable</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>ResourceFile</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING> + </SETTING> + <SETTING> + <SETTING><NAME>FileType</NAME><VALUE>MMLB</VALUE></SETTING> + <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>Compiler</NAME><VALUE>Lib Import PPC</VALUE></SETTING> + <SETTING><NAME>EditLanguage</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING> + </SETTING> + <SETTING> + <SETTING><NAME>FileType</NAME><VALUE>MPLF</VALUE></SETTING> + <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>Compiler</NAME><VALUE>Lib Import PPC</VALUE></SETTING> + <SETTING><NAME>EditLanguage</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING> + </SETTING> + <SETTING> + <SETTING><NAME>FileType</NAME><VALUE>MWCD</VALUE></SETTING> + <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>EditLanguage</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>Launchable</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>ResourceFile</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING> + </SETTING> + <SETTING> + <SETTING><NAME>FileType</NAME><VALUE>RSRC</VALUE></SETTING> + <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>EditLanguage</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>Launchable</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>ResourceFile</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING> + </SETTING> + <SETTING> + <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING> + <SETTING><NAME>FileExtension</NAME><VALUE>.c</VALUE></SETTING> + <SETTING><NAME>Compiler</NAME><VALUE>MW C/C++ PPC</VALUE></SETTING> + <SETTING><NAME>EditLanguage</NAME><VALUE>C/C++</VALUE></SETTING> + <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING> + </SETTING> + <SETTING> + <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING> + <SETTING><NAME>FileExtension</NAME><VALUE>.c++</VALUE></SETTING> + <SETTING><NAME>Compiler</NAME><VALUE>MW C/C++ PPC</VALUE></SETTING> + <SETTING><NAME>EditLanguage</NAME><VALUE>C/C++</VALUE></SETTING> + <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING> + </SETTING> + <SETTING> + <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING> + <SETTING><NAME>FileExtension</NAME><VALUE>.cc</VALUE></SETTING> + <SETTING><NAME>Compiler</NAME><VALUE>MW C/C++ PPC</VALUE></SETTING> + <SETTING><NAME>EditLanguage</NAME><VALUE>C/C++</VALUE></SETTING> + <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING> + </SETTING> + <SETTING> + <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING> + <SETTING><NAME>FileExtension</NAME><VALUE>.cp</VALUE></SETTING> + <SETTING><NAME>Compiler</NAME><VALUE>MW C/C++ PPC</VALUE></SETTING> + <SETTING><NAME>EditLanguage</NAME><VALUE>C/C++</VALUE></SETTING> + <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING> + </SETTING> + <SETTING> + <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING> + <SETTING><NAME>FileExtension</NAME><VALUE>.cpp</VALUE></SETTING> + <SETTING><NAME>Compiler</NAME><VALUE>MW C/C++ PPC</VALUE></SETTING> + <SETTING><NAME>EditLanguage</NAME><VALUE>C/C++</VALUE></SETTING> + <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING> + </SETTING> + <SETTING> + <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING> + <SETTING><NAME>FileExtension</NAME><VALUE>.exp</VALUE></SETTING> + <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>EditLanguage</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING> + </SETTING> + <SETTING> + <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING> + <SETTING><NAME>FileExtension</NAME><VALUE>.h</VALUE></SETTING> + <SETTING><NAME>Compiler</NAME><VALUE>MW C/C++ PPC</VALUE></SETTING> + <SETTING><NAME>EditLanguage</NAME><VALUE>C/C++</VALUE></SETTING> + <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>IgnoredByMake</NAME><VALUE>true</VALUE></SETTING> + </SETTING> + <SETTING> + <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING> + <SETTING><NAME>FileExtension</NAME><VALUE>.p</VALUE></SETTING> + <SETTING><NAME>Compiler</NAME><VALUE>MW Pascal PPC</VALUE></SETTING> + <SETTING><NAME>EditLanguage</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING> + </SETTING> + <SETTING> + <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING> + <SETTING><NAME>FileExtension</NAME><VALUE>.pas</VALUE></SETTING> + <SETTING><NAME>Compiler</NAME><VALUE>MW Pascal PPC</VALUE></SETTING> + <SETTING><NAME>EditLanguage</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING> + </SETTING> + <SETTING> + <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING> + <SETTING><NAME>FileExtension</NAME><VALUE>.pch</VALUE></SETTING> + <SETTING><NAME>Compiler</NAME><VALUE>MW C/C++ PPC</VALUE></SETTING> + <SETTING><NAME>EditLanguage</NAME><VALUE>C/C++</VALUE></SETTING> + <SETTING><NAME>Precompile</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING> + </SETTING> + <SETTING> + <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING> + <SETTING><NAME>FileExtension</NAME><VALUE>.pch++</VALUE></SETTING> + <SETTING><NAME>Compiler</NAME><VALUE>MW C/C++ PPC</VALUE></SETTING> + <SETTING><NAME>EditLanguage</NAME><VALUE>C/C++</VALUE></SETTING> + <SETTING><NAME>Precompile</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING> + </SETTING> + <SETTING> + <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING> + <SETTING><NAME>FileExtension</NAME><VALUE>.ppu</VALUE></SETTING> + <SETTING><NAME>Compiler</NAME><VALUE>MW Pascal PPC</VALUE></SETTING> + <SETTING><NAME>EditLanguage</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>Precompile</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING> + </SETTING> + <SETTING> + <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING> + <SETTING><NAME>FileExtension</NAME><VALUE>.r</VALUE></SETTING> + <SETTING><NAME>Compiler</NAME><VALUE>Rez</VALUE></SETTING> + <SETTING><NAME>EditLanguage</NAME><VALUE>Rez</VALUE></SETTING> + <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING> + </SETTING> + <SETTING> + <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING> + <SETTING><NAME>FileExtension</NAME><VALUE>.s</VALUE></SETTING> + <SETTING><NAME>Compiler</NAME><VALUE>PPCAsm</VALUE></SETTING> + <SETTING><NAME>EditLanguage</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING> + </SETTING> + <SETTING> + <SETTING><NAME>FileType</NAME><VALUE>XCOF</VALUE></SETTING> + <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>Compiler</NAME><VALUE>XCOFF Import PPC</VALUE></SETTING> + <SETTING><NAME>EditLanguage</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING> + </SETTING> + <SETTING> + <SETTING><NAME>FileType</NAME><VALUE>docu</VALUE></SETTING> + <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>EditLanguage</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>Launchable</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>ResourceFile</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING> + </SETTING> + <SETTING> + <SETTING><NAME>FileType</NAME><VALUE>rsrc</VALUE></SETTING> + <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>EditLanguage</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>Launchable</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>ResourceFile</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING> + </SETTING> + <SETTING> + <SETTING><NAME>FileType</NAME><VALUE>shlb</VALUE></SETTING> + <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>Compiler</NAME><VALUE>PEF Import PPC</VALUE></SETTING> + <SETTING><NAME>EditLanguage</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING> + </SETTING> + <SETTING> + <SETTING><NAME>FileType</NAME><VALUE>stub</VALUE></SETTING> + <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>Compiler</NAME><VALUE>PEF Import PPC</VALUE></SETTING> + <SETTING><NAME>EditLanguage</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING> + </SETTING> + <SETTING> + <SETTING><NAME>FileExtension</NAME><VALUE>.doc</VALUE></SETTING> + <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>EditLanguage</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>Launchable</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>IgnoredByMake</NAME><VALUE>true</VALUE></SETTING> + </SETTING> + </SETTING> + + <!-- Settings for "Build Extras" panel --> + <SETTING><NAME>CacheModDates</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>ActivateBrowser</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>DumpBrowserInfo</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>CacheSubprojects</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>UseThirdPartyDebugger</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>DebuggerAppPath</NAME> + <SETTING><NAME>Path</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>PathFormat</NAME><VALUE>Generic</VALUE></SETTING> + <SETTING><NAME>PathRoot</NAME><VALUE>Absolute</VALUE></SETTING> + </SETTING> + <SETTING><NAME>DebuggerCmdLineArgs</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>DebuggerWorkingDir</NAME> + <SETTING><NAME>Path</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>PathFormat</NAME><VALUE>Generic</VALUE></SETTING> + <SETTING><NAME>PathRoot</NAME><VALUE>Absolute</VALUE></SETTING> + </SETTING> + + <!-- Settings for "Debugger Target" panel --> + <SETTING><NAME>LogSystemMessages</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>AutoTargetDLLs</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>StopAtWatchpoints</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>PauseWhileRunning</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>PauseInterval</NAME><VALUE>5</VALUE></SETTING> + <SETTING><NAME>PauseUIFlags</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>AltExePath</NAME> + <SETTING><NAME>Path</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>PathFormat</NAME><VALUE>Generic</VALUE></SETTING> + <SETTING><NAME>PathRoot</NAME><VALUE>Absolute</VALUE></SETTING> + </SETTING> + <SETTING><NAME>StopAtTempBPOnLaunch</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>CacheSymbolics</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>TempBPFunctionName</NAME><VALUE>main</VALUE></SETTING> + <SETTING><NAME>TempBPType</NAME><VALUE>0</VALUE></SETTING> + + <!-- Settings for "Remote Debug" panel --> + <SETTING><NAME>Enabled</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>ConnectionName</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>DownloadPath</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>LaunchRemoteApp</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>RemoteAppPath</NAME><VALUE></VALUE></SETTING> + + <!-- Settings for "Auto-target" panel --> + <SETTING><NAME>OtherExecutables</NAME><VALUE></VALUE></SETTING> + + <!-- Settings for "Custom Keywords" panel --> + <SETTING><NAME>CustomColor1</NAME> + <SETTING><NAME>Red</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>Green</NAME><VALUE>32767</VALUE></SETTING> + <SETTING><NAME>Blue</NAME><VALUE>0</VALUE></SETTING> + </SETTING> + <SETTING><NAME>CustomColor2</NAME> + <SETTING><NAME>Red</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>Green</NAME><VALUE>32767</VALUE></SETTING> + <SETTING><NAME>Blue</NAME><VALUE>0</VALUE></SETTING> + </SETTING> + <SETTING><NAME>CustomColor3</NAME> + <SETTING><NAME>Red</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>Green</NAME><VALUE>32767</VALUE></SETTING> + <SETTING><NAME>Blue</NAME><VALUE>0</VALUE></SETTING> + </SETTING> + <SETTING><NAME>CustomColor4</NAME> + <SETTING><NAME>Red</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>Green</NAME><VALUE>32767</VALUE></SETTING> + <SETTING><NAME>Blue</NAME><VALUE>0</VALUE></SETTING> + </SETTING> + + <!-- Settings for "C/C++ Compiler" panel --> + <SETTING><NAME>MWFrontEnd_C_cplusplus</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWFrontEnd_C_checkprotos</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWFrontEnd_C_arm</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWFrontEnd_C_trigraphs</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWFrontEnd_C_onlystdkeywords</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWFrontEnd_C_enumsalwaysint</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWFrontEnd_C_mpwpointerstyle</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWFrontEnd_C_prefixname</NAME><VALUE>DBM.Prefix</VALUE></SETTING> + <SETTING><NAME>MWFrontEnd_C_ansistrict</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWFrontEnd_C_mpwcnewline</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWFrontEnd_C_wchar_type</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWFrontEnd_C_enableexceptions</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWFrontEnd_C_dontreusestrings</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWFrontEnd_C_poolstrings</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWFrontEnd_C_dontinline</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWFrontEnd_C_useRTTI</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWFrontEnd_C_multibyteaware</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWFrontEnd_C_unsignedchars</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWFrontEnd_C_autoinline</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWFrontEnd_C_booltruefalse</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWFrontEnd_C_direct_to_som</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWFrontEnd_C_som_env_check</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWFrontEnd_C_alwaysinline</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWFrontEnd_C_inlinelevel</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWFrontEnd_C_ecplusplus</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWFrontEnd_C_objective_c</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWFrontEnd_C_defer_codegen</NAME><VALUE>0</VALUE></SETTING> + + <!-- Settings for "C/C++ Warnings" panel --> + <SETTING><NAME>MWWarning_C_warn_illpragma</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWWarning_C_warn_emptydecl</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWWarning_C_warn_possunwant</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWWarning_C_warn_unusedvar</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWWarning_C_warn_unusedarg</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWWarning_C_warn_extracomma</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWWarning_C_pedantic</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWWarning_C_warningerrors</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWWarning_C_warn_hidevirtual</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWWarning_C_warn_implicitconv</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWWarning_C_warn_notinlined</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWWarning_C_warn_structclass</NAME><VALUE>0</VALUE></SETTING> + + <!-- Settings for "FTP Panel" panel --> + <SETTING><NAME>MWFTP_Post_hostName</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWFTP_Post_username</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWFTP_Post_password</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWFTP_Post_remoteDir</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWFTP_Post_ftp_PathVersion</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWFTP_Post_ftp_PathType</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWFTP_Post_ftp_PathFormat</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWFTP_Post_ftp_tree</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWFTP_Post_uploadDir</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWFTP_Post_ftp_port</NAME><VALUE>21</VALUE></SETTING> + <SETTING><NAME>MWFTP_Post_SendBin</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWFTP_Post_ShouldLog</NAME><VALUE>1</VALUE></SETTING> + + <!-- Settings for "Java Command Line" panel --> + <SETTING><NAME>MWCommandLine_Java_clsName</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWCommandLine_Java_args</NAME><VALUE></VALUE></SETTING> + + <!-- Settings for "PJavaDebugging" panel --> + <SETTING><NAME>MWVJavaDebugging_Protocol</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWVJavaDebugging_JDKVersion</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWVJavaDebugging_TimeOut</NAME><VALUE>10</VALUE></SETTING> + <SETTING><NAME>MWVJavaDebugging_SupportSlowDevices</NAME><VALUE>false</VALUE></SETTING> + + <!-- Settings for "Java Language" panel --> + <SETTING><NAME>MWJava_Language_optimize</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>MWJava_Language_warnDeprecated</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>MWJava_Language_emitMap</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>MWJava_Language_strictFileNames</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>MWJava_Language_strictFileHierarchy</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>MWJava_Language_1_1_Compatible</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>MWJava_Language_emitHeaders</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWJava_Language_headerType</NAME><VALUE>JNINativeHeaders</VALUE></SETTING> + <SETTING><NAME>MWJava_Language_packageFilter</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWJava_Language_genComments</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>MWJava_Language_genHeaders</NAME><VALUE>false</VALUE></SETTING> + + <!-- Settings for "Java MRJAppBuilder" panel --> + <SETTING><NAME>MWJava_MRJAppBuilder_outFile</NAME><VALUE>MRJApplication</VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_merge</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_quitMenu</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_grow</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_stdoutType</NAME><VALUE>Console</VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_stderrType</NAME><VALUE>Console</VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_stdinType</NAME><VALUE>Console</VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_appIconPVersion</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_appIconPType</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_appIconPFormat</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_appIconPTree</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_appIconFile</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_splashScreenPVersion</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_splashScreenPType</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_splashScreenPFormat</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_splashScreenPTree</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_splashScreenPICTFile</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_aboutName</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_stdoutPVersion</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_stdoutPType</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_stdoutPFormat</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_stdoutPTree</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_stdoutFile</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_stdoutAppend</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_stderrPType</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_stderrPFormat</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_stderrPTree</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_stderrFile</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_stderrAppend</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_stdinPType</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_stdinPFormat</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_stdinPTree</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_stdinFile</NAME><VALUE></VALUE></SETTING> + + <!-- Settings for "Java Output" panel --> + <SETTING><NAME>MWJava_Output_outputtype</NAME><VALUE>JarFile</VALUE></SETTING> + <SETTING><NAME>MWJava_Output_outfile</NAME><VALUE>JavaClasses.jar</VALUE></SETTING> + <SETTING><NAME>MWJava_Output_ftype</NAME><VALUE>1514754080</VALUE></SETTING> + <SETTING><NAME>MWJava_Output_fcreator</NAME><VALUE>1297570384</VALUE></SETTING> + <SETTING><NAME>MWJava_Output_compress</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWJava_Output_genManifest</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWJava_Output_trunctype</NAME><VALUE>Front</VALUE></SETTING> + <SETTING><NAME>MWJava_Output_deleteClasses</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWJava_Output_consoleApp</NAME><VALUE>1</VALUE></SETTING> + + <!-- Settings for "Java Project" panel --> + <SETTING><NAME>MWJava_Proj_projtype</NAME><VALUE>Applet</VALUE></SETTING> + <SETTING><NAME>MWJava_Proj_mainClassName</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWJava_Proj_HTMLAppCreator</NAME><VALUE>1463898714</VALUE></SETTING> + <SETTING><NAME>MWJava_Proj_HTMLAppName</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWJava_Proj_PathVersion</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWJava_Proj_PathType</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWJava_Proj_PathFormat</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWJava_Proj_tree</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWJava_Proj_HTMLAppWin32Name</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWJava_Proj_compress</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWJava_Proj_useVM</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWJava_Proj_vmarguments</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWJava_Proj_vmName</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWJava_Proj_simPropFile</NAME><VALUE></VALUE></SETTING> + + <!-- Settings for "JavaDoc Project" panel --> + <SETTING><NAME>MWJavaDoc_Proj_Version</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWJavaDoc_Proj_Depricated</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWJavaDoc_Proj_Author</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWJavaDoc_Proj_Index</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWJavaDoc_Proj_Tree</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWJavaDoc_Proj_SunResolveToSame</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWJavaDoc_Proj_Shortnames</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWJavaDoc_Proj_Folder</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWJavaDoc_Proj_GenerateAPILinks</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWJavaDoc_Proj_scope</NAME><VALUE>Public</VALUE></SETTING> + <SETTING><NAME>MWJavaDoc_Proj_fcreator</NAME><VALUE>1297303877</VALUE></SETTING> + <SETTING><NAME>MWJavaDoc_Proj_encodingName</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWJavaDoc_Proj_decodingName</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWJavaDoc_Proj_javaPackagePath</NAME><VALUE>http://java.sun.com/products/jdk/1.1/docs/api/</VALUE></SETTING> + + <!-- Settings for "MacOS Merge Panel" panel --> + <SETTING><NAME>MWMerge_MacOS_projectType</NAME><VALUE>Application</VALUE></SETTING> + <SETTING><NAME>MWMerge_MacOS_outputName</NAME><VALUE>Merge Out</VALUE></SETTING> + <SETTING><NAME>MWMerge_MacOS_outputCreator</NAME><VALUE>????</VALUE></SETTING> + <SETTING><NAME>MWMerge_MacOS_outputType</NAME><VALUE>APPL</VALUE></SETTING> + <SETTING><NAME>MWMerge_MacOS_suppressWarning</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWMerge_MacOS_copyFragments</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWMerge_MacOS_copyResources</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWMerge_MacOS_flattenResource</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWMerge_MacOS_flatFileName</NAME><VALUE>a.rsrc</VALUE></SETTING> + <SETTING><NAME>MWMerge_MacOS_flatFileOutputPath</NAME> + <SETTING><NAME>Path</NAME><VALUE>:</VALUE></SETTING> + <SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING> + <SETTING><NAME>PathRoot</NAME><VALUE>Project</VALUE></SETTING> + </SETTING> + <SETTING><NAME>MWMerge_MacOS_skipResources</NAME> + <SETTING><VALUE>DLGX</VALUE></SETTING> + <SETTING><VALUE>ckid</VALUE></SETTING> + <SETTING><VALUE>Proj</VALUE></SETTING> + <SETTING><VALUE>WSPC</VALUE></SETTING> + </SETTING> + + <!-- Settings for "Output Flags" panel --> + <SETTING><NAME>FileLocked</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>ResourcesMapIsReadOnly</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>PrinterDriverIsMultiFinderCompatible</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>Invisible</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>HasBundle</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>NameLocked</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>Stationery</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>HasCustomIcon</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>Shared</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>HasBeenInited</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>Label</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>Comments</NAME><VALUE></VALUE></SETTING> + + <!-- Settings for "Packager Panel" panel --> + <SETTING><NAME>MWMacOSPackager_UsePackager</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWMacOSPackager_FolderToPackage</NAME> + <SETTING><NAME>Path</NAME><VALUE>:</VALUE></SETTING> + <SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING> + <SETTING><NAME>PathRoot</NAME><VALUE>Project</VALUE></SETTING> + </SETTING> + <SETTING><NAME>MWMacOSPackager_CreateClassicAlias</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWMacOSPackager_ClassicAliasMethod</NAME><VALUE>UseTargetOutput</VALUE></SETTING> + <SETTING><NAME>MWMacOSPackager_ClassicAliasPath</NAME> + <SETTING><NAME>Path</NAME><VALUE>:</VALUE></SETTING> + <SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING> + <SETTING><NAME>PathRoot</NAME><VALUE>Project</VALUE></SETTING> + </SETTING> + <SETTING><NAME>MWMacOSPackager_CreatePkgInfo</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWMacOSPackager_PkgCreatorType</NAME><VALUE>????</VALUE></SETTING> + <SETTING><NAME>MWMacOSPackager_PkgFileType</NAME><VALUE>APPL</VALUE></SETTING> + + <!-- Settings for "PPC CodeGen" panel --> + <SETTING><NAME>MWCodeGen_PPC_structalignment</NAME><VALUE>PPC</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_PPC_tracebacktables</NAME><VALUE>None</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_PPC_processor</NAME><VALUE>Generic</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_PPC_readonlystrings</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_PPC_tocdata</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_PPC_profiler</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_PPC_fpcontract</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_PPC_schedule</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_PPC_peephole</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_PPC_processorspecific</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_PPC_altivec</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_PPC_vectortocdata</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_PPC_vrsave</NAME><VALUE>0</VALUE></SETTING> + + <!-- Settings for "PPC CodeGen Mach-O" panel --> + <SETTING><NAME>MWCodeGen_MachO_structalignment</NAME><VALUE>PPC</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_MachO_tracebacktables</NAME><VALUE>None</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_MachO_processor</NAME><VALUE>Generic</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_MachO_readonlystrings</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_MachO_profiler</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_MachO_fpcontract</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_MachO_schedule</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_MachO_peephole</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_MachO_processorspecific</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_MachO_altivec</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_MachO_vrsave</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_MachO_common</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_MachO_implicit_templates</NAME><VALUE>1</VALUE></SETTING> + + <!-- Settings for "PPC Disassembler" panel --> + <SETTING><NAME>MWDisassembler_PPC_showcode</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWDisassembler_PPC_extended</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWDisassembler_PPC_mix</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWDisassembler_PPC_nohex</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWDisassembler_PPC_showdata</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWDisassembler_PPC_showexceptions</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWDisassembler_PPC_showsym</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWDisassembler_PPC_shownames</NAME><VALUE>1</VALUE></SETTING> + + <!-- Settings for "PPC Global Optimizer" panel --> + <SETTING><NAME>GlobalOptimizer_PPC_optimizationlevel</NAME><VALUE>Level4</VALUE></SETTING> + <SETTING><NAME>GlobalOptimizer_PPC_optfor</NAME><VALUE>Speed</VALUE></SETTING> + + <!-- Settings for "PPC Linker" panel --> + <SETTING><NAME>MWLinker_PPC_linksym</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWLinker_PPC_symfullpath</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWLinker_PPC_linkmap</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWLinker_PPC_nolinkwarnings</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWLinker_PPC_dontdeadstripinitcode</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWLinker_PPC_permitmultdefs</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWLinker_PPC_linkmode</NAME><VALUE>Fast</VALUE></SETTING> + <SETTING><NAME>MWLinker_PPC_initname</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWLinker_PPC_mainname</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWLinker_PPC_termname</NAME><VALUE></VALUE></SETTING> + + <!-- Settings for "PPC Mach-O Linker" panel --> + <SETTING><NAME>MWLinker_MachO_exports</NAME><VALUE>None</VALUE></SETTING> + <SETTING><NAME>MWLinker_MachO_mainname</NAME><VALUE>start</VALUE></SETTING> + <SETTING><NAME>MWLinker_MachO_currentversion</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWLinker_MachO_compatibleversion</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWLinker_MachO_symfullpath</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWLinker_MachO_supresswarnings</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWLinker_MachO_multisymerror</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWLinker_MachO_prebind</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWLinker_MachO_deadstrip</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWLinker_MachO_objectivecsemantics</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWLinker_MachO_whichfileloaded</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWLinker_MachO_whyfileloaded</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWLinker_MachO_readonlyrelocs</NAME><VALUE>Errors</VALUE></SETTING> + <SETTING><NAME>MWLinker_MachO_undefinedsymbols</NAME><VALUE>Errors</VALUE></SETTING> + <SETTING><NAME>MWLinker_MachO_twolevelnamespace</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWLinker_MachO_stripdebugsymbols</NAME><VALUE>0</VALUE></SETTING> + + <!-- Settings for "PPC Mach-O Target" panel --> + <SETTING><NAME>MWProject_MachO_type</NAME><VALUE>Executable</VALUE></SETTING> + <SETTING><NAME>MWProject_MachO_outfile</NAME><VALUE>a.exe</VALUE></SETTING> + <SETTING><NAME>MWProject_MachO_filecreator</NAME><VALUE>????</VALUE></SETTING> + <SETTING><NAME>MWProject_MachO_filetype</NAME><VALUE>MEXE</VALUE></SETTING> + <SETTING><NAME>MWProject_MachO_stacksize</NAME><VALUE>64</VALUE></SETTING> + <SETTING><NAME>MWProject_MachO_stackaddress</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWProject_MachO_flatrsrc</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWProject_MachO_flatrsrcfilename</NAME><VALUE>a.rsrc</VALUE></SETTING> + <SETTING><NAME>MWProject_MachO_flatrsrcoutputdir</NAME> + <SETTING><NAME>Path</NAME><VALUE>:</VALUE></SETTING> + <SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING> + <SETTING><NAME>PathRoot</NAME><VALUE>Project</VALUE></SETTING> + </SETTING> + <SETTING><NAME>MWProject_MachO_installpath</NAME><VALUE>./</VALUE></SETTING> + + <!-- Settings for "PPC PEF" panel --> + <SETTING><NAME>MWPEF_exports</NAME><VALUE>Pragma</VALUE></SETTING> + <SETTING><NAME>MWPEF_libfolder</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWPEF_sortcode</NAME><VALUE>None</VALUE></SETTING> + <SETTING><NAME>MWPEF_expandbss</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWPEF_sharedata</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWPEF_olddefversion</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWPEF_oldimpversion</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWPEF_currentversion</NAME><VALUE>100</VALUE></SETTING> + <SETTING><NAME>MWPEF_fragmentname</NAME><VALUE>DBM</VALUE></SETTING> + <SETTING><NAME>MWPEF_collapsereloads</NAME><VALUE>0</VALUE></SETTING> + + <!-- Settings for "PPC Project" panel --> + <SETTING><NAME>MWProject_PPC_type</NAME><VALUE>SharedLibrary</VALUE></SETTING> + <SETTING><NAME>MWProject_PPC_outfile</NAME><VALUE>DBM.shlb</VALUE></SETTING> + <SETTING><NAME>MWProject_PPC_filecreator</NAME><VALUE>MOZZ</VALUE></SETTING> + <SETTING><NAME>MWProject_PPC_filetype</NAME><VALUE>shlb</VALUE></SETTING> + <SETTING><NAME>MWProject_PPC_size</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWProject_PPC_minsize</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWProject_PPC_stacksize</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWProject_PPC_flags</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWProject_PPC_symfilename</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWProject_PPC_rsrcname</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWProject_PPC_rsrcheader</NAME><VALUE>Native</VALUE></SETTING> + <SETTING><NAME>MWProject_PPC_rsrctype</NAME><VALUE>????</VALUE></SETTING> + <SETTING><NAME>MWProject_PPC_rsrcid</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWProject_PPC_rsrcflags</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWProject_PPC_rsrcstore</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWProject_PPC_rsrcmerge</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWProject_PPC_flatrsrc</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWProject_PPC_flatrsrcoutputdir</NAME> + <SETTING><NAME>Path</NAME><VALUE>:</VALUE></SETTING> + <SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING> + <SETTING><NAME>PathRoot</NAME><VALUE>Project</VALUE></SETTING> + </SETTING> + <SETTING><NAME>MWProject_PPC_flatrsrcfilename</NAME><VALUE></VALUE></SETTING> + + <!-- Settings for "PPCAsm Panel" panel --> + <SETTING><NAME>MWAssembler_PPC_auxheader</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWAssembler_PPC_symmode</NAME><VALUE>Mac</VALUE></SETTING> + <SETTING><NAME>MWAssembler_PPC_dialect</NAME><VALUE>PPC</VALUE></SETTING> + <SETTING><NAME>MWAssembler_PPC_prefixfile</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWAssembler_PPC_typecheck</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWAssembler_PPC_warnings</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWAssembler_PPC_casesensitive</NAME><VALUE>0</VALUE></SETTING> + + <!-- Settings for "Rez Compiler" panel --> + <SETTING><NAME>MWRez_Language_maxwidth</NAME><VALUE>80</VALUE></SETTING> + <SETTING><NAME>MWRez_Language_script</NAME><VALUE>Roman</VALUE></SETTING> + <SETTING><NAME>MWRez_Language_alignment</NAME><VALUE>Align1</VALUE></SETTING> + <SETTING><NAME>MWRez_Language_filtermode</NAME><VALUE>FilterSkip</VALUE></SETTING> + <SETTING><NAME>MWRez_Language_suppresswarnings</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWRez_Language_escapecontrolchars</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWRez_Language_prefixname</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWRez_Language_filteredtypes</NAME><VALUE>'CODE' 'DATA' 'PICT'</VALUE></SETTING> + + <!-- Settings for "WinRC Compiler" panel --> + <SETTING><NAME>MWWinRC_prefixname</NAME><VALUE></VALUE></SETTING> + + <!-- Settings for "x86 CodeGen" panel --> + <SETTING><NAME>MWCodeGen_X86_processor</NAME><VALUE>Generic</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_X86_alignment</NAME><VALUE>bytes8</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_X86_exceptions</NAME><VALUE>ZeroOverhead</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_X86_extinst_mmx</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_X86_extinst_3dnow</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_X86_use_mmx_3dnow_convention</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_X86_machinecodelisting</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_X86_intrinsics</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_X86_syminfo</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_X86_codeviewinfo</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_X86_extinst_cmov_fcomi</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_X86_extinst_sse</NAME><VALUE>0</VALUE></SETTING> + + <!-- Settings for "x86 Disassembler" panel --> + <SETTING><NAME>PDisasmX86_showHeaders</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>PDisasmX86_showSymTab</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>PDisasmX86_showCode</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>PDisasmX86_showSource</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>PDisasmX86_showHex</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>PDisasmX86_showRelocation</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>PDisasmX86_showComments</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>PDisasmX86_showDebug</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>PDisasmX86_showExceptions</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>PDisasmX86_showData</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>PDisasmX86_showRaw</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>PDisasmX86_verbose</NAME><VALUE>false</VALUE></SETTING> + + <!-- Settings for "x86 Exceptions Panel" panel --> + <SETTING><NAME>MWDebugger_X86_Exceptions</NAME> + <SETTING><VALUE>0</VALUE></SETTING> + <SETTING><VALUE>0</VALUE></SETTING> + <SETTING><VALUE>0</VALUE></SETTING> + <SETTING><VALUE>0</VALUE></SETTING> + <SETTING><VALUE>0</VALUE></SETTING> + <SETTING><VALUE>0</VALUE></SETTING> + <SETTING><VALUE>0</VALUE></SETTING> + <SETTING><VALUE>0</VALUE></SETTING> + <SETTING><VALUE>0</VALUE></SETTING> + <SETTING><VALUE>0</VALUE></SETTING> + <SETTING><VALUE>0</VALUE></SETTING> + <SETTING><VALUE>0</VALUE></SETTING> + <SETTING><VALUE>0</VALUE></SETTING> + <SETTING><VALUE>0</VALUE></SETTING> + <SETTING><VALUE>0</VALUE></SETTING> + <SETTING><VALUE>0</VALUE></SETTING> + <SETTING><VALUE>0</VALUE></SETTING> + <SETTING><VALUE>0</VALUE></SETTING> + <SETTING><VALUE>0</VALUE></SETTING> + <SETTING><VALUE>0</VALUE></SETTING> + <SETTING><VALUE>0</VALUE></SETTING> + <SETTING><VALUE>0</VALUE></SETTING> + <SETTING><VALUE>0</VALUE></SETTING> + <SETTING><VALUE>0</VALUE></SETTING> + </SETTING> + + <!-- Settings for "x86 Global Optimizer" panel --> + <SETTING><NAME>GlobalOptimizer_X86_optimizationlevel</NAME><VALUE>Level0</VALUE></SETTING> + <SETTING><NAME>GlobalOptimizer_X86_optfor</NAME><VALUE>Speed</VALUE></SETTING> + + <!-- Settings for "x86 Linker" panel --> + <SETTING><NAME>MWLinker_X86_entrypointusage</NAME><VALUE>Default</VALUE></SETTING> + <SETTING><NAME>MWLinker_X86_entrypoint</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWLinker_X86_subsystem</NAME><VALUE>WinGUI</VALUE></SETTING> + <SETTING><NAME>MWLinker_X86_subsysmajorid</NAME><VALUE>4</VALUE></SETTING> + <SETTING><NAME>MWLinker_X86_subsysminorid</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWLinker_X86_usrmajorid</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWLinker_X86_usrminorid</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWLinker_X86_commandfile</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWLinker_X86_generatemap</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWLinker_X86_linksym</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWLinker_X86_linkCV</NAME><VALUE>1</VALUE></SETTING> + + <!-- Settings for "x86 Project" panel --> + <SETTING><NAME>MWProject_X86_type</NAME><VALUE>Application</VALUE></SETTING> + <SETTING><NAME>MWProject_X86_outfile</NAME><VALUE>noname.exe</VALUE></SETTING> + <SETTING><NAME>MWProject_X86_baseaddress</NAME><VALUE>4194304</VALUE></SETTING> + <SETTING><NAME>MWProject_X86_maxstacksize</NAME><VALUE>1024</VALUE></SETTING> + <SETTING><NAME>MWProject_X86_minstacksize</NAME><VALUE>4</VALUE></SETTING> + <SETTING><NAME>MWProject_X86_size</NAME><VALUE>1024</VALUE></SETTING> + <SETTING><NAME>MWProject_X86_minsize</NAME><VALUE>4</VALUE></SETTING> + <SETTING><NAME>MWProject_X86_importlib</NAME><VALUE></VALUE></SETTING> + <PANELDATA><NAME>xpidl Settings</NAME><VALUE> + 0001000101000000000000000000000000000000000000000000000000000000 + 0000000000000000 + </VALUE></PANELDATA> + </SETTINGLIST> + <FILELIST> + <FILE> + <PATHTYPE>Name</PATHTYPE> + <PATH>db.c</PATH> + <PATHFORMAT>MacOS</PATHFORMAT> + <FILEKIND>Text</FILEKIND> + <FILEFLAGS>Debug</FILEFLAGS> + </FILE> + <FILE> + <PATHTYPE>Name</PATHTYPE> + <PATH>hash.c</PATH> + <PATHFORMAT>MacOS</PATHFORMAT> + <FILEKIND>Text</FILEKIND> + <FILEFLAGS>Debug</FILEFLAGS> + </FILE> + <FILE> + <PATHTYPE>Name</PATHTYPE> + <PATH>hash_buf.c</PATH> + <PATHFORMAT>MacOS</PATHFORMAT> + <FILEKIND>Text</FILEKIND> + <FILEFLAGS>Debug</FILEFLAGS> + </FILE> + <FILE> + <PATHTYPE>Name</PATHTYPE> + <PATH>hsearch.c</PATH> + <PATHFORMAT>MacOS</PATHFORMAT> + <FILEKIND>Text</FILEKIND> + <FILEFLAGS>Debug</FILEFLAGS> + </FILE> + <FILE> + <PATHTYPE>Name</PATHTYPE> + <PATH>h_bigkey.c</PATH> + <PATHFORMAT>MacOS</PATHFORMAT> + <FILEKIND>Text</FILEKIND> + <FILEFLAGS>Debug</FILEFLAGS> + </FILE> + <FILE> + <PATHTYPE>Name</PATHTYPE> + <PATH>h_func.c</PATH> + <PATHFORMAT>MacOS</PATHFORMAT> + <FILEKIND>Text</FILEKIND> + <FILEFLAGS>Debug</FILEFLAGS> + </FILE> + <FILE> + <PATHTYPE>Name</PATHTYPE> + <PATH>h_log2.c</PATH> + <PATHFORMAT>MacOS</PATHFORMAT> + <FILEKIND>Text</FILEKIND> + <FILEFLAGS>Debug</FILEFLAGS> + </FILE> + <FILE> + <PATHTYPE>Name</PATHTYPE> + <PATH>h_page.c</PATH> + <PATHFORMAT>MacOS</PATHFORMAT> + <FILEKIND>Text</FILEKIND> + <FILEFLAGS>Debug</FILEFLAGS> + </FILE> + <FILE> + <PATHTYPE>Name</PATHTYPE> + <PATH>macstubs.c</PATH> + <PATHFORMAT>MacOS</PATHFORMAT> + <FILEKIND>Text</FILEKIND> + <FILEFLAGS>Debug</FILEFLAGS> + </FILE> + <FILE> + <PATHTYPE>Name</PATHTYPE> + <PATH>NSStdLibStubs</PATH> + <PATHFORMAT>MacOS</PATHFORMAT> + <FILEKIND>Library</FILEKIND> + <FILEFLAGS>Debug</FILEFLAGS> + </FILE> + <FILE> + <PATHTYPE>Name</PATHTYPE> + <PATH>MSL_ShLibRuntime_PPC.Lib</PATH> + <PATHFORMAT>MacOS</PATHFORMAT> + <FILEKIND>Library</FILEKIND> + <FILEFLAGS>Debug</FILEFLAGS> + </FILE> + <FILE> + <PATHTYPE>Name</PATHTYPE> + <PATH>MoreFiles.shlb</PATH> + <PATHFORMAT>MacOS</PATHFORMAT> + <FILEKIND>Library</FILEKIND> + <FILEFLAGS>Debug</FILEFLAGS> + </FILE> + <FILE> + <PATHTYPE>Name</PATHTYPE> + <PATH>NSPR20.shlb</PATH> + <PATHFORMAT>MacOS</PATHFORMAT> + <FILEKIND>Library</FILEKIND> + <FILEFLAGS>Debug</FILEFLAGS> + </FILE> + <FILE> + <PATHTYPE>Name</PATHTYPE> + <PATH>NSRuntime.shlb</PATH> + <PATHFORMAT>MacOS</PATHFORMAT> + <FILEKIND>Library</FILEKIND> + <FILEFLAGS>Debug</FILEFLAGS> + </FILE> + <FILE> + <PATHTYPE>Name</PATHTYPE> + <PATH>InterfacesStubs</PATH> + <PATHFORMAT>MacOS</PATHFORMAT> + <FILEKIND>Library</FILEKIND> + <FILEFLAGS>Debug</FILEFLAGS> + </FILE> + </FILELIST> + <LINKORDER> + <FILEREF> + <PATHTYPE>Name</PATHTYPE> + <PATH>db.c</PATH> + <PATHFORMAT>MacOS</PATHFORMAT> + </FILEREF> + <FILEREF> + <PATHTYPE>Name</PATHTYPE> + <PATH>hash.c</PATH> + <PATHFORMAT>MacOS</PATHFORMAT> + </FILEREF> + <FILEREF> + <PATHTYPE>Name</PATHTYPE> + <PATH>hash_buf.c</PATH> + <PATHFORMAT>MacOS</PATHFORMAT> + </FILEREF> + <FILEREF> + <PATHTYPE>Name</PATHTYPE> + <PATH>hsearch.c</PATH> + <PATHFORMAT>MacOS</PATHFORMAT> + </FILEREF> + <FILEREF> + <PATHTYPE>Name</PATHTYPE> + <PATH>h_bigkey.c</PATH> + <PATHFORMAT>MacOS</PATHFORMAT> + </FILEREF> + <FILEREF> + <PATHTYPE>Name</PATHTYPE> + <PATH>h_func.c</PATH> + <PATHFORMAT>MacOS</PATHFORMAT> + </FILEREF> + <FILEREF> + <PATHTYPE>Name</PATHTYPE> + <PATH>h_log2.c</PATH> + <PATHFORMAT>MacOS</PATHFORMAT> + </FILEREF> + <FILEREF> + <PATHTYPE>Name</PATHTYPE> + <PATH>h_page.c</PATH> + <PATHFORMAT>MacOS</PATHFORMAT> + </FILEREF> + <FILEREF> + <PATHTYPE>Name</PATHTYPE> + <PATH>macstubs.c</PATH> + <PATHFORMAT>MacOS</PATHFORMAT> + </FILEREF> + <FILEREF> + <PATHTYPE>Name</PATHTYPE> + <PATH>NSStdLibStubs</PATH> + <PATHFORMAT>MacOS</PATHFORMAT> + </FILEREF> + <FILEREF> + <PATHTYPE>Name</PATHTYPE> + <PATH>NSPR20.shlb</PATH> + <PATHFORMAT>MacOS</PATHFORMAT> + </FILEREF> + <FILEREF> + <PATHTYPE>Name</PATHTYPE> + <PATH>NSRuntime.shlb</PATH> + <PATHFORMAT>MacOS</PATHFORMAT> + </FILEREF> + <FILEREF> + <PATHTYPE>Name</PATHTYPE> + <PATH>MoreFiles.shlb</PATH> + <PATHFORMAT>MacOS</PATHFORMAT> + </FILEREF> + <FILEREF> + <PATHTYPE>Name</PATHTYPE> + <PATH>MSL_ShLibRuntime_PPC.Lib</PATH> + <PATHFORMAT>MacOS</PATHFORMAT> + </FILEREF> + <FILEREF> + <PATHTYPE>Name</PATHTYPE> + <PATH>InterfacesStubs</PATH> + <PATHFORMAT>MacOS</PATHFORMAT> + </FILEREF> + </LINKORDER> + </TARGET> + <TARGET> + <NAME>DBMDebug.shlb</NAME> + <SETTINGLIST> + + <!-- Settings for "Source Trees" panel --> + <SETTING><NAME>UserSourceTrees</NAME><VALUE></VALUE></SETTING> + + <!-- Settings for "Access Paths" panel --> + <SETTING><NAME>AlwaysSearchUserPaths</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>InterpretDOSAndUnixPaths</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>RequireFrameworkStyleIncludes</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>UserSearchPaths</NAME> + <SETTING> + <SETTING><NAME>SearchPath</NAME> + <SETTING><NAME>Path</NAME><VALUE>:</VALUE></SETTING> + <SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING> + <SETTING><NAME>PathRoot</NAME><VALUE>Project</VALUE></SETTING> + </SETTING> + <SETTING><NAME>Recursive</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>FrameworkPath</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>HostFlags</NAME><VALUE>All</VALUE></SETTING> + </SETTING> + <SETTING> + <SETTING><NAME>SearchPath</NAME> + <SETTING><NAME>Path</NAME><VALUE>::src:</VALUE></SETTING> + <SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING> + <SETTING><NAME>PathRoot</NAME><VALUE>Project</VALUE></SETTING> + </SETTING> + <SETTING><NAME>Recursive</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>FrameworkPath</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>HostFlags</NAME><VALUE>All</VALUE></SETTING> + </SETTING> + <SETTING> + <SETTING><NAME>SearchPath</NAME> + <SETTING><NAME>Path</NAME><VALUE>:::dist:client_debug:</VALUE></SETTING> + <SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING> + <SETTING><NAME>PathRoot</NAME><VALUE>Project</VALUE></SETTING> + </SETTING> + <SETTING><NAME>Recursive</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>FrameworkPath</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>HostFlags</NAME><VALUE>All</VALUE></SETTING> + </SETTING> + <SETTING> + <SETTING><NAME>SearchPath</NAME> + <SETTING><NAME>Path</NAME><VALUE>:::dist:client_stubs:</VALUE></SETTING> + <SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING> + <SETTING><NAME>PathRoot</NAME><VALUE>Project</VALUE></SETTING> + </SETTING> + <SETTING><NAME>Recursive</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>FrameworkPath</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>HostFlags</NAME><VALUE>All</VALUE></SETTING> + </SETTING> + <SETTING> + <SETTING><NAME>SearchPath</NAME> + <SETTING><NAME>Path</NAME><VALUE>:::dist:</VALUE></SETTING> + <SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING> + <SETTING><NAME>PathRoot</NAME><VALUE>Project</VALUE></SETTING> + </SETTING> + <SETTING><NAME>Recursive</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>FrameworkPath</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>HostFlags</NAME><VALUE>All</VALUE></SETTING> + </SETTING> + </SETTING> + <SETTING><NAME>SystemSearchPaths</NAME> + <SETTING> + <SETTING><NAME>SearchPath</NAME> + <SETTING><NAME>Path</NAME><VALUE>:MSL:</VALUE></SETTING> + <SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING> + <SETTING><NAME>PathRoot</NAME><VALUE>CodeWarrior</VALUE></SETTING> + </SETTING> + <SETTING><NAME>Recursive</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>FrameworkPath</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>HostFlags</NAME><VALUE>All</VALUE></SETTING> + </SETTING> + <SETTING> + <SETTING><NAME>SearchPath</NAME> + <SETTING><NAME>Path</NAME><VALUE>:MacOS Support:</VALUE></SETTING> + <SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING> + <SETTING><NAME>PathRoot</NAME><VALUE>CodeWarrior</VALUE></SETTING> + </SETTING> + <SETTING><NAME>Recursive</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>FrameworkPath</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>HostFlags</NAME><VALUE>All</VALUE></SETTING> + </SETTING> + </SETTING> + + <!-- Settings for "Debugger Runtime" panel --> + <SETTING><NAME>MWRuntimeSettings_WorkingDirectory</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWRuntimeSettings_CommandLine</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWRuntimeSettings_HostApplication</NAME> + <SETTING><NAME>Path</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>PathFormat</NAME><VALUE>Generic</VALUE></SETTING> + <SETTING><NAME>PathRoot</NAME><VALUE>Absolute</VALUE></SETTING> + </SETTING> + <SETTING><NAME>MWRuntimeSettings_EnvVars</NAME><VALUE></VALUE></SETTING> + + <!-- Settings for "Target Settings" panel --> + <SETTING><NAME>Linker</NAME><VALUE>MacOS PPC Linker</VALUE></SETTING> + <SETTING><NAME>PreLinker</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>PostLinker</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>Targetname</NAME><VALUE>DBMDebug.shlb</VALUE></SETTING> + <SETTING><NAME>OutputDirectory</NAME> + <SETTING><NAME>Path</NAME><VALUE>:</VALUE></SETTING> + <SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING> + <SETTING><NAME>PathRoot</NAME><VALUE>Project</VALUE></SETTING> + </SETTING> + <SETTING><NAME>SaveEntriesUsingRelativePaths</NAME><VALUE>false</VALUE></SETTING> + + <!-- Settings for "File Mappings" panel --> + <SETTING><NAME>FileMappings</NAME> + <SETTING> + <SETTING><NAME>FileType</NAME><VALUE>APPL</VALUE></SETTING> + <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>EditLanguage</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>Launchable</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>ResourceFile</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING> + </SETTING> + <SETTING> + <SETTING><NAME>FileType</NAME><VALUE>Appl</VALUE></SETTING> + <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>EditLanguage</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>Launchable</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>ResourceFile</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING> + </SETTING> + <SETTING> + <SETTING><NAME>FileType</NAME><VALUE>MMLB</VALUE></SETTING> + <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>Compiler</NAME><VALUE>Lib Import PPC</VALUE></SETTING> + <SETTING><NAME>EditLanguage</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING> + </SETTING> + <SETTING> + <SETTING><NAME>FileType</NAME><VALUE>MPLF</VALUE></SETTING> + <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>Compiler</NAME><VALUE>Lib Import PPC</VALUE></SETTING> + <SETTING><NAME>EditLanguage</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING> + </SETTING> + <SETTING> + <SETTING><NAME>FileType</NAME><VALUE>MWCD</VALUE></SETTING> + <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>EditLanguage</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>Launchable</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>ResourceFile</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING> + </SETTING> + <SETTING> + <SETTING><NAME>FileType</NAME><VALUE>RSRC</VALUE></SETTING> + <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>EditLanguage</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>Launchable</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>ResourceFile</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING> + </SETTING> + <SETTING> + <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING> + <SETTING><NAME>FileExtension</NAME><VALUE>.c</VALUE></SETTING> + <SETTING><NAME>Compiler</NAME><VALUE>MW C/C++ PPC</VALUE></SETTING> + <SETTING><NAME>EditLanguage</NAME><VALUE>C/C++</VALUE></SETTING> + <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING> + </SETTING> + <SETTING> + <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING> + <SETTING><NAME>FileExtension</NAME><VALUE>.c++</VALUE></SETTING> + <SETTING><NAME>Compiler</NAME><VALUE>MW C/C++ PPC</VALUE></SETTING> + <SETTING><NAME>EditLanguage</NAME><VALUE>C/C++</VALUE></SETTING> + <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING> + </SETTING> + <SETTING> + <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING> + <SETTING><NAME>FileExtension</NAME><VALUE>.cc</VALUE></SETTING> + <SETTING><NAME>Compiler</NAME><VALUE>MW C/C++ PPC</VALUE></SETTING> + <SETTING><NAME>EditLanguage</NAME><VALUE>C/C++</VALUE></SETTING> + <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING> + </SETTING> + <SETTING> + <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING> + <SETTING><NAME>FileExtension</NAME><VALUE>.cp</VALUE></SETTING> + <SETTING><NAME>Compiler</NAME><VALUE>MW C/C++ PPC</VALUE></SETTING> + <SETTING><NAME>EditLanguage</NAME><VALUE>C/C++</VALUE></SETTING> + <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING> + </SETTING> + <SETTING> + <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING> + <SETTING><NAME>FileExtension</NAME><VALUE>.cpp</VALUE></SETTING> + <SETTING><NAME>Compiler</NAME><VALUE>MW C/C++ PPC</VALUE></SETTING> + <SETTING><NAME>EditLanguage</NAME><VALUE>C/C++</VALUE></SETTING> + <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING> + </SETTING> + <SETTING> + <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING> + <SETTING><NAME>FileExtension</NAME><VALUE>.exp</VALUE></SETTING> + <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>EditLanguage</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING> + </SETTING> + <SETTING> + <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING> + <SETTING><NAME>FileExtension</NAME><VALUE>.h</VALUE></SETTING> + <SETTING><NAME>Compiler</NAME><VALUE>MW C/C++ PPC</VALUE></SETTING> + <SETTING><NAME>EditLanguage</NAME><VALUE>C/C++</VALUE></SETTING> + <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>IgnoredByMake</NAME><VALUE>true</VALUE></SETTING> + </SETTING> + <SETTING> + <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING> + <SETTING><NAME>FileExtension</NAME><VALUE>.p</VALUE></SETTING> + <SETTING><NAME>Compiler</NAME><VALUE>MW Pascal PPC</VALUE></SETTING> + <SETTING><NAME>EditLanguage</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING> + </SETTING> + <SETTING> + <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING> + <SETTING><NAME>FileExtension</NAME><VALUE>.pas</VALUE></SETTING> + <SETTING><NAME>Compiler</NAME><VALUE>MW Pascal PPC</VALUE></SETTING> + <SETTING><NAME>EditLanguage</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING> + </SETTING> + <SETTING> + <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING> + <SETTING><NAME>FileExtension</NAME><VALUE>.pch</VALUE></SETTING> + <SETTING><NAME>Compiler</NAME><VALUE>MW C/C++ PPC</VALUE></SETTING> + <SETTING><NAME>EditLanguage</NAME><VALUE>C/C++</VALUE></SETTING> + <SETTING><NAME>Precompile</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING> + </SETTING> + <SETTING> + <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING> + <SETTING><NAME>FileExtension</NAME><VALUE>.pch++</VALUE></SETTING> + <SETTING><NAME>Compiler</NAME><VALUE>MW C/C++ PPC</VALUE></SETTING> + <SETTING><NAME>EditLanguage</NAME><VALUE>C/C++</VALUE></SETTING> + <SETTING><NAME>Precompile</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING> + </SETTING> + <SETTING> + <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING> + <SETTING><NAME>FileExtension</NAME><VALUE>.ppu</VALUE></SETTING> + <SETTING><NAME>Compiler</NAME><VALUE>MW Pascal PPC</VALUE></SETTING> + <SETTING><NAME>EditLanguage</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>Precompile</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING> + </SETTING> + <SETTING> + <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING> + <SETTING><NAME>FileExtension</NAME><VALUE>.r</VALUE></SETTING> + <SETTING><NAME>Compiler</NAME><VALUE>Rez</VALUE></SETTING> + <SETTING><NAME>EditLanguage</NAME><VALUE>Rez</VALUE></SETTING> + <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING> + </SETTING> + <SETTING> + <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING> + <SETTING><NAME>FileExtension</NAME><VALUE>.s</VALUE></SETTING> + <SETTING><NAME>Compiler</NAME><VALUE>PPCAsm</VALUE></SETTING> + <SETTING><NAME>EditLanguage</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING> + </SETTING> + <SETTING> + <SETTING><NAME>FileType</NAME><VALUE>XCOF</VALUE></SETTING> + <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>Compiler</NAME><VALUE>XCOFF Import PPC</VALUE></SETTING> + <SETTING><NAME>EditLanguage</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING> + </SETTING> + <SETTING> + <SETTING><NAME>FileType</NAME><VALUE>docu</VALUE></SETTING> + <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>EditLanguage</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>Launchable</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>ResourceFile</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING> + </SETTING> + <SETTING> + <SETTING><NAME>FileType</NAME><VALUE>rsrc</VALUE></SETTING> + <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>EditLanguage</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>Launchable</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>ResourceFile</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING> + </SETTING> + <SETTING> + <SETTING><NAME>FileType</NAME><VALUE>shlb</VALUE></SETTING> + <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>Compiler</NAME><VALUE>PEF Import PPC</VALUE></SETTING> + <SETTING><NAME>EditLanguage</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING> + </SETTING> + <SETTING> + <SETTING><NAME>FileType</NAME><VALUE>stub</VALUE></SETTING> + <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>Compiler</NAME><VALUE>PEF Import PPC</VALUE></SETTING> + <SETTING><NAME>EditLanguage</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING> + </SETTING> + <SETTING> + <SETTING><NAME>FileExtension</NAME><VALUE>.doc</VALUE></SETTING> + <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>EditLanguage</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>Launchable</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>IgnoredByMake</NAME><VALUE>true</VALUE></SETTING> + </SETTING> + </SETTING> + + <!-- Settings for "Build Extras" panel --> + <SETTING><NAME>CacheModDates</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>ActivateBrowser</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>DumpBrowserInfo</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>CacheSubprojects</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>UseThirdPartyDebugger</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>DebuggerAppPath</NAME> + <SETTING><NAME>Path</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>PathFormat</NAME><VALUE>Generic</VALUE></SETTING> + <SETTING><NAME>PathRoot</NAME><VALUE>Absolute</VALUE></SETTING> + </SETTING> + <SETTING><NAME>DebuggerCmdLineArgs</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>DebuggerWorkingDir</NAME> + <SETTING><NAME>Path</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>PathFormat</NAME><VALUE>Generic</VALUE></SETTING> + <SETTING><NAME>PathRoot</NAME><VALUE>Absolute</VALUE></SETTING> + </SETTING> + + <!-- Settings for "Debugger Target" panel --> + <SETTING><NAME>LogSystemMessages</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>AutoTargetDLLs</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>StopAtWatchpoints</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>PauseWhileRunning</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>PauseInterval</NAME><VALUE>5</VALUE></SETTING> + <SETTING><NAME>PauseUIFlags</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>AltExePath</NAME> + <SETTING><NAME>Path</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>PathFormat</NAME><VALUE>Generic</VALUE></SETTING> + <SETTING><NAME>PathRoot</NAME><VALUE>Absolute</VALUE></SETTING> + </SETTING> + <SETTING><NAME>StopAtTempBPOnLaunch</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>CacheSymbolics</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>TempBPFunctionName</NAME><VALUE>main</VALUE></SETTING> + <SETTING><NAME>TempBPType</NAME><VALUE>0</VALUE></SETTING> + + <!-- Settings for "Remote Debug" panel --> + <SETTING><NAME>Enabled</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>ConnectionName</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>DownloadPath</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>LaunchRemoteApp</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>RemoteAppPath</NAME><VALUE></VALUE></SETTING> + + <!-- Settings for "Auto-target" panel --> + <SETTING><NAME>OtherExecutables</NAME><VALUE></VALUE></SETTING> + + <!-- Settings for "Custom Keywords" panel --> + <SETTING><NAME>CustomColor1</NAME> + <SETTING><NAME>Red</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>Green</NAME><VALUE>32767</VALUE></SETTING> + <SETTING><NAME>Blue</NAME><VALUE>0</VALUE></SETTING> + </SETTING> + <SETTING><NAME>CustomColor2</NAME> + <SETTING><NAME>Red</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>Green</NAME><VALUE>32767</VALUE></SETTING> + <SETTING><NAME>Blue</NAME><VALUE>0</VALUE></SETTING> + </SETTING> + <SETTING><NAME>CustomColor3</NAME> + <SETTING><NAME>Red</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>Green</NAME><VALUE>32767</VALUE></SETTING> + <SETTING><NAME>Blue</NAME><VALUE>0</VALUE></SETTING> + </SETTING> + <SETTING><NAME>CustomColor4</NAME> + <SETTING><NAME>Red</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>Green</NAME><VALUE>32767</VALUE></SETTING> + <SETTING><NAME>Blue</NAME><VALUE>0</VALUE></SETTING> + </SETTING> + + <!-- Settings for "C/C++ Compiler" panel --> + <SETTING><NAME>MWFrontEnd_C_cplusplus</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWFrontEnd_C_checkprotos</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWFrontEnd_C_arm</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWFrontEnd_C_trigraphs</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWFrontEnd_C_onlystdkeywords</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWFrontEnd_C_enumsalwaysint</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWFrontEnd_C_mpwpointerstyle</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWFrontEnd_C_prefixname</NAME><VALUE>DBMDebug.Prefix</VALUE></SETTING> + <SETTING><NAME>MWFrontEnd_C_ansistrict</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWFrontEnd_C_mpwcnewline</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWFrontEnd_C_wchar_type</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWFrontEnd_C_enableexceptions</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWFrontEnd_C_dontreusestrings</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWFrontEnd_C_poolstrings</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWFrontEnd_C_dontinline</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWFrontEnd_C_useRTTI</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWFrontEnd_C_multibyteaware</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWFrontEnd_C_unsignedchars</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWFrontEnd_C_autoinline</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWFrontEnd_C_booltruefalse</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWFrontEnd_C_direct_to_som</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWFrontEnd_C_som_env_check</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWFrontEnd_C_alwaysinline</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWFrontEnd_C_inlinelevel</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWFrontEnd_C_ecplusplus</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWFrontEnd_C_objective_c</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWFrontEnd_C_defer_codegen</NAME><VALUE>0</VALUE></SETTING> + + <!-- Settings for "C/C++ Warnings" panel --> + <SETTING><NAME>MWWarning_C_warn_illpragma</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWWarning_C_warn_emptydecl</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWWarning_C_warn_possunwant</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWWarning_C_warn_unusedvar</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWWarning_C_warn_unusedarg</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWWarning_C_warn_extracomma</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWWarning_C_pedantic</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWWarning_C_warningerrors</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWWarning_C_warn_hidevirtual</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWWarning_C_warn_implicitconv</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWWarning_C_warn_notinlined</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWWarning_C_warn_structclass</NAME><VALUE>0</VALUE></SETTING> + + <!-- Settings for "FTP Panel" panel --> + <SETTING><NAME>MWFTP_Post_hostName</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWFTP_Post_username</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWFTP_Post_password</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWFTP_Post_remoteDir</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWFTP_Post_ftp_PathVersion</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWFTP_Post_ftp_PathType</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWFTP_Post_ftp_PathFormat</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWFTP_Post_ftp_tree</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWFTP_Post_uploadDir</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWFTP_Post_ftp_port</NAME><VALUE>21</VALUE></SETTING> + <SETTING><NAME>MWFTP_Post_SendBin</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWFTP_Post_ShouldLog</NAME><VALUE>1</VALUE></SETTING> + + <!-- Settings for "Java Command Line" panel --> + <SETTING><NAME>MWCommandLine_Java_clsName</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWCommandLine_Java_args</NAME><VALUE></VALUE></SETTING> + + <!-- Settings for "PJavaDebugging" panel --> + <SETTING><NAME>MWVJavaDebugging_Protocol</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWVJavaDebugging_JDKVersion</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWVJavaDebugging_TimeOut</NAME><VALUE>10</VALUE></SETTING> + <SETTING><NAME>MWVJavaDebugging_SupportSlowDevices</NAME><VALUE>false</VALUE></SETTING> + + <!-- Settings for "Java Language" panel --> + <SETTING><NAME>MWJava_Language_optimize</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>MWJava_Language_warnDeprecated</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>MWJava_Language_emitMap</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>MWJava_Language_strictFileNames</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>MWJava_Language_strictFileHierarchy</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>MWJava_Language_1_1_Compatible</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>MWJava_Language_emitHeaders</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWJava_Language_headerType</NAME><VALUE>JNINativeHeaders</VALUE></SETTING> + <SETTING><NAME>MWJava_Language_packageFilter</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWJava_Language_genComments</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>MWJava_Language_genHeaders</NAME><VALUE>false</VALUE></SETTING> + + <!-- Settings for "Java MRJAppBuilder" panel --> + <SETTING><NAME>MWJava_MRJAppBuilder_outFile</NAME><VALUE>MRJApplication</VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_merge</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_quitMenu</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_grow</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_stdoutType</NAME><VALUE>Console</VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_stderrType</NAME><VALUE>Console</VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_stdinType</NAME><VALUE>Console</VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_appIconPVersion</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_appIconPType</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_appIconPFormat</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_appIconPTree</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_appIconFile</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_splashScreenPVersion</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_splashScreenPType</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_splashScreenPFormat</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_splashScreenPTree</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_splashScreenPICTFile</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_aboutName</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_stdoutPVersion</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_stdoutPType</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_stdoutPFormat</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_stdoutPTree</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_stdoutFile</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_stdoutAppend</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_stderrPType</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_stderrPFormat</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_stderrPTree</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_stderrFile</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_stderrAppend</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_stdinPType</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_stdinPFormat</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_stdinPTree</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_stdinFile</NAME><VALUE></VALUE></SETTING> + + <!-- Settings for "Java Output" panel --> + <SETTING><NAME>MWJava_Output_outputtype</NAME><VALUE>JarFile</VALUE></SETTING> + <SETTING><NAME>MWJava_Output_outfile</NAME><VALUE>JavaClasses.jar</VALUE></SETTING> + <SETTING><NAME>MWJava_Output_ftype</NAME><VALUE>1514754080</VALUE></SETTING> + <SETTING><NAME>MWJava_Output_fcreator</NAME><VALUE>1297570384</VALUE></SETTING> + <SETTING><NAME>MWJava_Output_compress</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWJava_Output_genManifest</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWJava_Output_trunctype</NAME><VALUE>Front</VALUE></SETTING> + <SETTING><NAME>MWJava_Output_deleteClasses</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWJava_Output_consoleApp</NAME><VALUE>1</VALUE></SETTING> + + <!-- Settings for "Java Project" panel --> + <SETTING><NAME>MWJava_Proj_projtype</NAME><VALUE>Applet</VALUE></SETTING> + <SETTING><NAME>MWJava_Proj_mainClassName</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWJava_Proj_HTMLAppCreator</NAME><VALUE>1463898714</VALUE></SETTING> + <SETTING><NAME>MWJava_Proj_HTMLAppName</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWJava_Proj_PathVersion</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWJava_Proj_PathType</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWJava_Proj_PathFormat</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWJava_Proj_tree</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWJava_Proj_HTMLAppWin32Name</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWJava_Proj_compress</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWJava_Proj_useVM</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWJava_Proj_vmarguments</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWJava_Proj_vmName</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWJava_Proj_simPropFile</NAME><VALUE></VALUE></SETTING> + + <!-- Settings for "JavaDoc Project" panel --> + <SETTING><NAME>MWJavaDoc_Proj_Version</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWJavaDoc_Proj_Depricated</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWJavaDoc_Proj_Author</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWJavaDoc_Proj_Index</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWJavaDoc_Proj_Tree</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWJavaDoc_Proj_SunResolveToSame</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWJavaDoc_Proj_Shortnames</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWJavaDoc_Proj_Folder</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWJavaDoc_Proj_GenerateAPILinks</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWJavaDoc_Proj_scope</NAME><VALUE>Public</VALUE></SETTING> + <SETTING><NAME>MWJavaDoc_Proj_fcreator</NAME><VALUE>1297303877</VALUE></SETTING> + <SETTING><NAME>MWJavaDoc_Proj_encodingName</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWJavaDoc_Proj_decodingName</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWJavaDoc_Proj_javaPackagePath</NAME><VALUE>http://java.sun.com/products/jdk/1.1/docs/api/</VALUE></SETTING> + + <!-- Settings for "MacOS Merge Panel" panel --> + <SETTING><NAME>MWMerge_MacOS_projectType</NAME><VALUE>Application</VALUE></SETTING> + <SETTING><NAME>MWMerge_MacOS_outputName</NAME><VALUE>Merge Out</VALUE></SETTING> + <SETTING><NAME>MWMerge_MacOS_outputCreator</NAME><VALUE>????</VALUE></SETTING> + <SETTING><NAME>MWMerge_MacOS_outputType</NAME><VALUE>APPL</VALUE></SETTING> + <SETTING><NAME>MWMerge_MacOS_suppressWarning</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWMerge_MacOS_copyFragments</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWMerge_MacOS_copyResources</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWMerge_MacOS_flattenResource</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWMerge_MacOS_flatFileName</NAME><VALUE>a.rsrc</VALUE></SETTING> + <SETTING><NAME>MWMerge_MacOS_flatFileOutputPath</NAME> + <SETTING><NAME>Path</NAME><VALUE>:</VALUE></SETTING> + <SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING> + <SETTING><NAME>PathRoot</NAME><VALUE>Project</VALUE></SETTING> + </SETTING> + <SETTING><NAME>MWMerge_MacOS_skipResources</NAME> + <SETTING><VALUE>DLGX</VALUE></SETTING> + <SETTING><VALUE>ckid</VALUE></SETTING> + <SETTING><VALUE>Proj</VALUE></SETTING> + <SETTING><VALUE>WSPC</VALUE></SETTING> + </SETTING> + + <!-- Settings for "Output Flags" panel --> + <SETTING><NAME>FileLocked</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>ResourcesMapIsReadOnly</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>PrinterDriverIsMultiFinderCompatible</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>Invisible</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>HasBundle</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>NameLocked</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>Stationery</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>HasCustomIcon</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>Shared</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>HasBeenInited</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>Label</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>Comments</NAME><VALUE></VALUE></SETTING> + + <!-- Settings for "Packager Panel" panel --> + <SETTING><NAME>MWMacOSPackager_UsePackager</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWMacOSPackager_FolderToPackage</NAME> + <SETTING><NAME>Path</NAME><VALUE>:</VALUE></SETTING> + <SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING> + <SETTING><NAME>PathRoot</NAME><VALUE>Project</VALUE></SETTING> + </SETTING> + <SETTING><NAME>MWMacOSPackager_CreateClassicAlias</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWMacOSPackager_ClassicAliasMethod</NAME><VALUE>UseTargetOutput</VALUE></SETTING> + <SETTING><NAME>MWMacOSPackager_ClassicAliasPath</NAME> + <SETTING><NAME>Path</NAME><VALUE>:</VALUE></SETTING> + <SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING> + <SETTING><NAME>PathRoot</NAME><VALUE>Project</VALUE></SETTING> + </SETTING> + <SETTING><NAME>MWMacOSPackager_CreatePkgInfo</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWMacOSPackager_PkgCreatorType</NAME><VALUE>????</VALUE></SETTING> + <SETTING><NAME>MWMacOSPackager_PkgFileType</NAME><VALUE>APPL</VALUE></SETTING> + + <!-- Settings for "PPC CodeGen" panel --> + <SETTING><NAME>MWCodeGen_PPC_structalignment</NAME><VALUE>PPC</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_PPC_tracebacktables</NAME><VALUE>Inline</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_PPC_processor</NAME><VALUE>Generic</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_PPC_readonlystrings</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_PPC_tocdata</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_PPC_profiler</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_PPC_fpcontract</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_PPC_schedule</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_PPC_peephole</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_PPC_processorspecific</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_PPC_altivec</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_PPC_vectortocdata</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_PPC_vrsave</NAME><VALUE>0</VALUE></SETTING> + + <!-- Settings for "PPC CodeGen Mach-O" panel --> + <SETTING><NAME>MWCodeGen_MachO_structalignment</NAME><VALUE>PPC</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_MachO_tracebacktables</NAME><VALUE>None</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_MachO_processor</NAME><VALUE>Generic</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_MachO_readonlystrings</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_MachO_profiler</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_MachO_fpcontract</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_MachO_schedule</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_MachO_peephole</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_MachO_processorspecific</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_MachO_altivec</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_MachO_vrsave</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_MachO_common</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_MachO_implicit_templates</NAME><VALUE>1</VALUE></SETTING> + + <!-- Settings for "PPC Disassembler" panel --> + <SETTING><NAME>MWDisassembler_PPC_showcode</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWDisassembler_PPC_extended</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWDisassembler_PPC_mix</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWDisassembler_PPC_nohex</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWDisassembler_PPC_showdata</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWDisassembler_PPC_showexceptions</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWDisassembler_PPC_showsym</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWDisassembler_PPC_shownames</NAME><VALUE>1</VALUE></SETTING> + + <!-- Settings for "PPC Global Optimizer" panel --> + <SETTING><NAME>GlobalOptimizer_PPC_optimizationlevel</NAME><VALUE>Level0</VALUE></SETTING> + <SETTING><NAME>GlobalOptimizer_PPC_optfor</NAME><VALUE>Speed</VALUE></SETTING> + + <!-- Settings for "PPC Linker" panel --> + <SETTING><NAME>MWLinker_PPC_linksym</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWLinker_PPC_symfullpath</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWLinker_PPC_linkmap</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWLinker_PPC_nolinkwarnings</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWLinker_PPC_dontdeadstripinitcode</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWLinker_PPC_permitmultdefs</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWLinker_PPC_linkmode</NAME><VALUE>Fast</VALUE></SETTING> + <SETTING><NAME>MWLinker_PPC_initname</NAME><VALUE>__initialize</VALUE></SETTING> + <SETTING><NAME>MWLinker_PPC_mainname</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWLinker_PPC_termname</NAME><VALUE>__terminate</VALUE></SETTING> + + <!-- Settings for "PPC Mach-O Linker" panel --> + <SETTING><NAME>MWLinker_MachO_exports</NAME><VALUE>None</VALUE></SETTING> + <SETTING><NAME>MWLinker_MachO_mainname</NAME><VALUE>start</VALUE></SETTING> + <SETTING><NAME>MWLinker_MachO_currentversion</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWLinker_MachO_compatibleversion</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWLinker_MachO_symfullpath</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWLinker_MachO_supresswarnings</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWLinker_MachO_multisymerror</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWLinker_MachO_prebind</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWLinker_MachO_deadstrip</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWLinker_MachO_objectivecsemantics</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWLinker_MachO_whichfileloaded</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWLinker_MachO_whyfileloaded</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWLinker_MachO_readonlyrelocs</NAME><VALUE>Errors</VALUE></SETTING> + <SETTING><NAME>MWLinker_MachO_undefinedsymbols</NAME><VALUE>Errors</VALUE></SETTING> + <SETTING><NAME>MWLinker_MachO_twolevelnamespace</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWLinker_MachO_stripdebugsymbols</NAME><VALUE>0</VALUE></SETTING> + + <!-- Settings for "PPC Mach-O Target" panel --> + <SETTING><NAME>MWProject_MachO_type</NAME><VALUE>Executable</VALUE></SETTING> + <SETTING><NAME>MWProject_MachO_outfile</NAME><VALUE>a.exe</VALUE></SETTING> + <SETTING><NAME>MWProject_MachO_filecreator</NAME><VALUE>????</VALUE></SETTING> + <SETTING><NAME>MWProject_MachO_filetype</NAME><VALUE>MEXE</VALUE></SETTING> + <SETTING><NAME>MWProject_MachO_stacksize</NAME><VALUE>64</VALUE></SETTING> + <SETTING><NAME>MWProject_MachO_stackaddress</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWProject_MachO_flatrsrc</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWProject_MachO_flatrsrcfilename</NAME><VALUE>a.rsrc</VALUE></SETTING> + <SETTING><NAME>MWProject_MachO_flatrsrcoutputdir</NAME> + <SETTING><NAME>Path</NAME><VALUE>:</VALUE></SETTING> + <SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING> + <SETTING><NAME>PathRoot</NAME><VALUE>Project</VALUE></SETTING> + </SETTING> + <SETTING><NAME>MWProject_MachO_installpath</NAME><VALUE>./</VALUE></SETTING> + + <!-- Settings for "PPC PEF" panel --> + <SETTING><NAME>MWPEF_exports</NAME><VALUE>Pragma</VALUE></SETTING> + <SETTING><NAME>MWPEF_libfolder</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWPEF_sortcode</NAME><VALUE>None</VALUE></SETTING> + <SETTING><NAME>MWPEF_expandbss</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWPEF_sharedata</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWPEF_olddefversion</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWPEF_oldimpversion</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWPEF_currentversion</NAME><VALUE>100</VALUE></SETTING> + <SETTING><NAME>MWPEF_fragmentname</NAME><VALUE>DBM</VALUE></SETTING> + <SETTING><NAME>MWPEF_collapsereloads</NAME><VALUE>0</VALUE></SETTING> + + <!-- Settings for "PPC Project" panel --> + <SETTING><NAME>MWProject_PPC_type</NAME><VALUE>SharedLibrary</VALUE></SETTING> + <SETTING><NAME>MWProject_PPC_outfile</NAME><VALUE>DBMDebug.shlb</VALUE></SETTING> + <SETTING><NAME>MWProject_PPC_filecreator</NAME><VALUE>MOZZ</VALUE></SETTING> + <SETTING><NAME>MWProject_PPC_filetype</NAME><VALUE>shlb</VALUE></SETTING> + <SETTING><NAME>MWProject_PPC_size</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWProject_PPC_minsize</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWProject_PPC_stacksize</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWProject_PPC_flags</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWProject_PPC_symfilename</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWProject_PPC_rsrcname</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWProject_PPC_rsrcheader</NAME><VALUE>Native</VALUE></SETTING> + <SETTING><NAME>MWProject_PPC_rsrctype</NAME><VALUE>????</VALUE></SETTING> + <SETTING><NAME>MWProject_PPC_rsrcid</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWProject_PPC_rsrcflags</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWProject_PPC_rsrcstore</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWProject_PPC_rsrcmerge</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWProject_PPC_flatrsrc</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWProject_PPC_flatrsrcoutputdir</NAME> + <SETTING><NAME>Path</NAME><VALUE>:</VALUE></SETTING> + <SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING> + <SETTING><NAME>PathRoot</NAME><VALUE>Project</VALUE></SETTING> + </SETTING> + <SETTING><NAME>MWProject_PPC_flatrsrcfilename</NAME><VALUE></VALUE></SETTING> + + <!-- Settings for "PPCAsm Panel" panel --> + <SETTING><NAME>MWAssembler_PPC_auxheader</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWAssembler_PPC_symmode</NAME><VALUE>Mac</VALUE></SETTING> + <SETTING><NAME>MWAssembler_PPC_dialect</NAME><VALUE>PPC</VALUE></SETTING> + <SETTING><NAME>MWAssembler_PPC_prefixfile</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWAssembler_PPC_typecheck</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWAssembler_PPC_warnings</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWAssembler_PPC_casesensitive</NAME><VALUE>0</VALUE></SETTING> + + <!-- Settings for "Rez Compiler" panel --> + <SETTING><NAME>MWRez_Language_maxwidth</NAME><VALUE>80</VALUE></SETTING> + <SETTING><NAME>MWRez_Language_script</NAME><VALUE>Roman</VALUE></SETTING> + <SETTING><NAME>MWRez_Language_alignment</NAME><VALUE>Align1</VALUE></SETTING> + <SETTING><NAME>MWRez_Language_filtermode</NAME><VALUE>FilterSkip</VALUE></SETTING> + <SETTING><NAME>MWRez_Language_suppresswarnings</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWRez_Language_escapecontrolchars</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWRez_Language_prefixname</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWRez_Language_filteredtypes</NAME><VALUE>'CODE' 'DATA' 'PICT'</VALUE></SETTING> + + <!-- Settings for "WinRC Compiler" panel --> + <SETTING><NAME>MWWinRC_prefixname</NAME><VALUE></VALUE></SETTING> + + <!-- Settings for "x86 CodeGen" panel --> + <SETTING><NAME>MWCodeGen_X86_processor</NAME><VALUE>Generic</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_X86_alignment</NAME><VALUE>bytes8</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_X86_exceptions</NAME><VALUE>ZeroOverhead</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_X86_extinst_mmx</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_X86_extinst_3dnow</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_X86_use_mmx_3dnow_convention</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_X86_machinecodelisting</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_X86_intrinsics</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_X86_syminfo</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_X86_codeviewinfo</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_X86_extinst_cmov_fcomi</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_X86_extinst_sse</NAME><VALUE>0</VALUE></SETTING> + + <!-- Settings for "x86 Disassembler" panel --> + <SETTING><NAME>PDisasmX86_showHeaders</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>PDisasmX86_showSymTab</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>PDisasmX86_showCode</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>PDisasmX86_showSource</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>PDisasmX86_showHex</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>PDisasmX86_showRelocation</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>PDisasmX86_showComments</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>PDisasmX86_showDebug</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>PDisasmX86_showExceptions</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>PDisasmX86_showData</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>PDisasmX86_showRaw</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>PDisasmX86_verbose</NAME><VALUE>false</VALUE></SETTING> + + <!-- Settings for "x86 Exceptions Panel" panel --> + <SETTING><NAME>MWDebugger_X86_Exceptions</NAME> + <SETTING><VALUE>0</VALUE></SETTING> + <SETTING><VALUE>0</VALUE></SETTING> + <SETTING><VALUE>0</VALUE></SETTING> + <SETTING><VALUE>0</VALUE></SETTING> + <SETTING><VALUE>0</VALUE></SETTING> + <SETTING><VALUE>0</VALUE></SETTING> + <SETTING><VALUE>0</VALUE></SETTING> + <SETTING><VALUE>0</VALUE></SETTING> + <SETTING><VALUE>0</VALUE></SETTING> + <SETTING><VALUE>0</VALUE></SETTING> + <SETTING><VALUE>0</VALUE></SETTING> + <SETTING><VALUE>0</VALUE></SETTING> + <SETTING><VALUE>0</VALUE></SETTING> + <SETTING><VALUE>0</VALUE></SETTING> + <SETTING><VALUE>0</VALUE></SETTING> + <SETTING><VALUE>0</VALUE></SETTING> + <SETTING><VALUE>0</VALUE></SETTING> + <SETTING><VALUE>0</VALUE></SETTING> + <SETTING><VALUE>0</VALUE></SETTING> + <SETTING><VALUE>0</VALUE></SETTING> + <SETTING><VALUE>0</VALUE></SETTING> + <SETTING><VALUE>0</VALUE></SETTING> + <SETTING><VALUE>0</VALUE></SETTING> + <SETTING><VALUE>0</VALUE></SETTING> + </SETTING> + + <!-- Settings for "x86 Global Optimizer" panel --> + <SETTING><NAME>GlobalOptimizer_X86_optimizationlevel</NAME><VALUE>Level0</VALUE></SETTING> + <SETTING><NAME>GlobalOptimizer_X86_optfor</NAME><VALUE>Speed</VALUE></SETTING> + + <!-- Settings for "x86 Linker" panel --> + <SETTING><NAME>MWLinker_X86_entrypointusage</NAME><VALUE>Default</VALUE></SETTING> + <SETTING><NAME>MWLinker_X86_entrypoint</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWLinker_X86_subsystem</NAME><VALUE>WinGUI</VALUE></SETTING> + <SETTING><NAME>MWLinker_X86_subsysmajorid</NAME><VALUE>4</VALUE></SETTING> + <SETTING><NAME>MWLinker_X86_subsysminorid</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWLinker_X86_usrmajorid</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWLinker_X86_usrminorid</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWLinker_X86_commandfile</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWLinker_X86_generatemap</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWLinker_X86_linksym</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWLinker_X86_linkCV</NAME><VALUE>1</VALUE></SETTING> + + <!-- Settings for "x86 Project" panel --> + <SETTING><NAME>MWProject_X86_type</NAME><VALUE>Application</VALUE></SETTING> + <SETTING><NAME>MWProject_X86_outfile</NAME><VALUE>noname.exe</VALUE></SETTING> + <SETTING><NAME>MWProject_X86_baseaddress</NAME><VALUE>4194304</VALUE></SETTING> + <SETTING><NAME>MWProject_X86_maxstacksize</NAME><VALUE>1024</VALUE></SETTING> + <SETTING><NAME>MWProject_X86_minstacksize</NAME><VALUE>4</VALUE></SETTING> + <SETTING><NAME>MWProject_X86_size</NAME><VALUE>1024</VALUE></SETTING> + <SETTING><NAME>MWProject_X86_minsize</NAME><VALUE>4</VALUE></SETTING> + <SETTING><NAME>MWProject_X86_importlib</NAME><VALUE></VALUE></SETTING> + <PANELDATA><NAME>xpidl Settings</NAME><VALUE> + 0001000101000000000000000000000000000000000000000000000000000000 + 0000000000000000 + </VALUE></PANELDATA> + </SETTINGLIST> + <FILELIST> + <FILE> + <PATHTYPE>Name</PATHTYPE> + <PATH>db.c</PATH> + <PATHFORMAT>MacOS</PATHFORMAT> + <FILEKIND>Text</FILEKIND> + <FILEFLAGS>Debug</FILEFLAGS> + </FILE> + <FILE> + <PATHTYPE>Name</PATHTYPE> + <PATH>hash.c</PATH> + <PATHFORMAT>MacOS</PATHFORMAT> + <FILEKIND>Text</FILEKIND> + <FILEFLAGS>Debug</FILEFLAGS> + </FILE> + <FILE> + <PATHTYPE>Name</PATHTYPE> + <PATH>hash_buf.c</PATH> + <PATHFORMAT>MacOS</PATHFORMAT> + <FILEKIND>Text</FILEKIND> + <FILEFLAGS>Debug</FILEFLAGS> + </FILE> + <FILE> + <PATHTYPE>Name</PATHTYPE> + <PATH>hsearch.c</PATH> + <PATHFORMAT>MacOS</PATHFORMAT> + <FILEKIND>Text</FILEKIND> + <FILEFLAGS>Debug</FILEFLAGS> + </FILE> + <FILE> + <PATHTYPE>Name</PATHTYPE> + <PATH>h_bigkey.c</PATH> + <PATHFORMAT>MacOS</PATHFORMAT> + <FILEKIND>Text</FILEKIND> + <FILEFLAGS>Debug</FILEFLAGS> + </FILE> + <FILE> + <PATHTYPE>Name</PATHTYPE> + <PATH>h_func.c</PATH> + <PATHFORMAT>MacOS</PATHFORMAT> + <FILEKIND>Text</FILEKIND> + <FILEFLAGS>Debug</FILEFLAGS> + </FILE> + <FILE> + <PATHTYPE>Name</PATHTYPE> + <PATH>h_log2.c</PATH> + <PATHFORMAT>MacOS</PATHFORMAT> + <FILEKIND>Text</FILEKIND> + <FILEFLAGS>Debug</FILEFLAGS> + </FILE> + <FILE> + <PATHTYPE>Name</PATHTYPE> + <PATH>h_page.c</PATH> + <PATHFORMAT>MacOS</PATHFORMAT> + <FILEKIND>Text</FILEKIND> + <FILEFLAGS>Debug</FILEFLAGS> + </FILE> + <FILE> + <PATHTYPE>Name</PATHTYPE> + <PATH>macstubs.c</PATH> + <PATHFORMAT>MacOS</PATHFORMAT> + <FILEKIND>Text</FILEKIND> + <FILEFLAGS>Debug</FILEFLAGS> + </FILE> + <FILE> + <PATHTYPE>Name</PATHTYPE> + <PATH>NSStdLibStubs</PATH> + <PATHFORMAT>MacOS</PATHFORMAT> + <FILEKIND>Library</FILEKIND> + <FILEFLAGS>Debug</FILEFLAGS> + </FILE> + <FILE> + <PATHTYPE>Name</PATHTYPE> + <PATH>MSL_ShLibRuntime_PPC.Lib</PATH> + <PATHFORMAT>MacOS</PATHFORMAT> + <FILEKIND>Library</FILEKIND> + <FILEFLAGS>Debug</FILEFLAGS> + </FILE> + <FILE> + <PATHTYPE>Name</PATHTYPE> + <PATH>MoreFilesDebug.shlb</PATH> + <PATHFORMAT>MacOS</PATHFORMAT> + <FILEKIND>Library</FILEKIND> + <FILEFLAGS>Debug</FILEFLAGS> + </FILE> + <FILE> + <PATHTYPE>Name</PATHTYPE> + <PATH>NSRuntimeDebug.shlb</PATH> + <PATHFORMAT>MacOS</PATHFORMAT> + <FILEKIND>Library</FILEKIND> + <FILEFLAGS>Debug</FILEFLAGS> + </FILE> + <FILE> + <PATHTYPE>Name</PATHTYPE> + <PATH>NSPR20Debug.shlb</PATH> + <PATHFORMAT>MacOS</PATHFORMAT> + <FILEKIND>Library</FILEKIND> + <FILEFLAGS>Debug</FILEFLAGS> + </FILE> + <FILE> + <PATHTYPE>Name</PATHTYPE> + <PATH>InterfacesStubs</PATH> + <PATHFORMAT>MacOS</PATHFORMAT> + <FILEKIND>Library</FILEKIND> + <FILEFLAGS>Debug</FILEFLAGS> + </FILE> + </FILELIST> + <LINKORDER> + <FILEREF> + <PATHTYPE>Name</PATHTYPE> + <PATH>db.c</PATH> + <PATHFORMAT>MacOS</PATHFORMAT> + </FILEREF> + <FILEREF> + <PATHTYPE>Name</PATHTYPE> + <PATH>hash.c</PATH> + <PATHFORMAT>MacOS</PATHFORMAT> + </FILEREF> + <FILEREF> + <PATHTYPE>Name</PATHTYPE> + <PATH>hash_buf.c</PATH> + <PATHFORMAT>MacOS</PATHFORMAT> + </FILEREF> + <FILEREF> + <PATHTYPE>Name</PATHTYPE> + <PATH>hsearch.c</PATH> + <PATHFORMAT>MacOS</PATHFORMAT> + </FILEREF> + <FILEREF> + <PATHTYPE>Name</PATHTYPE> + <PATH>h_bigkey.c</PATH> + <PATHFORMAT>MacOS</PATHFORMAT> + </FILEREF> + <FILEREF> + <PATHTYPE>Name</PATHTYPE> + <PATH>h_func.c</PATH> + <PATHFORMAT>MacOS</PATHFORMAT> + </FILEREF> + <FILEREF> + <PATHTYPE>Name</PATHTYPE> + <PATH>h_log2.c</PATH> + <PATHFORMAT>MacOS</PATHFORMAT> + </FILEREF> + <FILEREF> + <PATHTYPE>Name</PATHTYPE> + <PATH>h_page.c</PATH> + <PATHFORMAT>MacOS</PATHFORMAT> + </FILEREF> + <FILEREF> + <PATHTYPE>Name</PATHTYPE> + <PATH>macstubs.c</PATH> + <PATHFORMAT>MacOS</PATHFORMAT> + </FILEREF> + <FILEREF> + <PATHTYPE>Name</PATHTYPE> + <PATH>NSStdLibStubs</PATH> + <PATHFORMAT>MacOS</PATHFORMAT> + </FILEREF> + <FILEREF> + <PATHTYPE>Name</PATHTYPE> + <PATH>NSPR20Debug.shlb</PATH> + <PATHFORMAT>MacOS</PATHFORMAT> + </FILEREF> + <FILEREF> + <PATHTYPE>Name</PATHTYPE> + <PATH>MoreFilesDebug.shlb</PATH> + <PATHFORMAT>MacOS</PATHFORMAT> + </FILEREF> + <FILEREF> + <PATHTYPE>Name</PATHTYPE> + <PATH>NSRuntimeDebug.shlb</PATH> + <PATHFORMAT>MacOS</PATHFORMAT> + </FILEREF> + <FILEREF> + <PATHTYPE>Name</PATHTYPE> + <PATH>MSL_ShLibRuntime_PPC.Lib</PATH> + <PATHFORMAT>MacOS</PATHFORMAT> + </FILEREF> + <FILEREF> + <PATHTYPE>Name</PATHTYPE> + <PATH>InterfacesStubs</PATH> + <PATHFORMAT>MacOS</PATHFORMAT> + </FILEREF> + </LINKORDER> + </TARGET> + <TARGET> + <NAME>DBM.o</NAME> + <SETTINGLIST> + + <!-- Settings for "Source Trees" panel --> + <SETTING><NAME>UserSourceTrees</NAME><VALUE></VALUE></SETTING> + + <!-- Settings for "Access Paths" panel --> + <SETTING><NAME>AlwaysSearchUserPaths</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>InterpretDOSAndUnixPaths</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>RequireFrameworkStyleIncludes</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>UserSearchPaths</NAME> + <SETTING> + <SETTING><NAME>SearchPath</NAME> + <SETTING><NAME>Path</NAME><VALUE>:</VALUE></SETTING> + <SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING> + <SETTING><NAME>PathRoot</NAME><VALUE>Project</VALUE></SETTING> + </SETTING> + <SETTING><NAME>Recursive</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>FrameworkPath</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>HostFlags</NAME><VALUE>All</VALUE></SETTING> + </SETTING> + <SETTING> + <SETTING><NAME>SearchPath</NAME> + <SETTING><NAME>Path</NAME><VALUE>::src:</VALUE></SETTING> + <SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING> + <SETTING><NAME>PathRoot</NAME><VALUE>Project</VALUE></SETTING> + </SETTING> + <SETTING><NAME>Recursive</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>FrameworkPath</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>HostFlags</NAME><VALUE>All</VALUE></SETTING> + </SETTING> + <SETTING> + <SETTING><NAME>SearchPath</NAME> + <SETTING><NAME>Path</NAME><VALUE>:::dist:client:</VALUE></SETTING> + <SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING> + <SETTING><NAME>PathRoot</NAME><VALUE>Project</VALUE></SETTING> + </SETTING> + <SETTING><NAME>Recursive</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>FrameworkPath</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>HostFlags</NAME><VALUE>All</VALUE></SETTING> + </SETTING> + <SETTING> + <SETTING><NAME>SearchPath</NAME> + <SETTING><NAME>Path</NAME><VALUE>:::dist:client_stubs:</VALUE></SETTING> + <SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING> + <SETTING><NAME>PathRoot</NAME><VALUE>Project</VALUE></SETTING> + </SETTING> + <SETTING><NAME>Recursive</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>FrameworkPath</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>HostFlags</NAME><VALUE>All</VALUE></SETTING> + </SETTING> + <SETTING> + <SETTING><NAME>SearchPath</NAME> + <SETTING><NAME>Path</NAME><VALUE>:::dist:</VALUE></SETTING> + <SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING> + <SETTING><NAME>PathRoot</NAME><VALUE>Project</VALUE></SETTING> + </SETTING> + <SETTING><NAME>Recursive</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>FrameworkPath</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>HostFlags</NAME><VALUE>All</VALUE></SETTING> + </SETTING> + </SETTING> + <SETTING><NAME>SystemSearchPaths</NAME> + <SETTING> + <SETTING><NAME>SearchPath</NAME> + <SETTING><NAME>Path</NAME><VALUE>:MSL:</VALUE></SETTING> + <SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING> + <SETTING><NAME>PathRoot</NAME><VALUE>CodeWarrior</VALUE></SETTING> + </SETTING> + <SETTING><NAME>Recursive</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>FrameworkPath</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>HostFlags</NAME><VALUE>All</VALUE></SETTING> + </SETTING> + <SETTING> + <SETTING><NAME>SearchPath</NAME> + <SETTING><NAME>Path</NAME><VALUE>:MacOS Support:</VALUE></SETTING> + <SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING> + <SETTING><NAME>PathRoot</NAME><VALUE>CodeWarrior</VALUE></SETTING> + </SETTING> + <SETTING><NAME>Recursive</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>FrameworkPath</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>HostFlags</NAME><VALUE>All</VALUE></SETTING> + </SETTING> + </SETTING> + + <!-- Settings for "Debugger Runtime" panel --> + <SETTING><NAME>MWRuntimeSettings_WorkingDirectory</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWRuntimeSettings_CommandLine</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWRuntimeSettings_HostApplication</NAME> + <SETTING><NAME>Path</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>PathFormat</NAME><VALUE>Generic</VALUE></SETTING> + <SETTING><NAME>PathRoot</NAME><VALUE>Absolute</VALUE></SETTING> + </SETTING> + <SETTING><NAME>MWRuntimeSettings_EnvVars</NAME><VALUE></VALUE></SETTING> + + <!-- Settings for "Target Settings" panel --> + <SETTING><NAME>Linker</NAME><VALUE>MacOS PPC Linker</VALUE></SETTING> + <SETTING><NAME>PreLinker</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>PostLinker</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>Targetname</NAME><VALUE>DBM.o</VALUE></SETTING> + <SETTING><NAME>OutputDirectory</NAME> + <SETTING><NAME>Path</NAME><VALUE>:</VALUE></SETTING> + <SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING> + <SETTING><NAME>PathRoot</NAME><VALUE>Project</VALUE></SETTING> + </SETTING> + <SETTING><NAME>SaveEntriesUsingRelativePaths</NAME><VALUE>false</VALUE></SETTING> + + <!-- Settings for "File Mappings" panel --> + <SETTING><NAME>FileMappings</NAME> + <SETTING> + <SETTING><NAME>FileType</NAME><VALUE>APPL</VALUE></SETTING> + <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>EditLanguage</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>Launchable</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>ResourceFile</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING> + </SETTING> + <SETTING> + <SETTING><NAME>FileType</NAME><VALUE>Appl</VALUE></SETTING> + <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>EditLanguage</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>Launchable</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>ResourceFile</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING> + </SETTING> + <SETTING> + <SETTING><NAME>FileType</NAME><VALUE>MMLB</VALUE></SETTING> + <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>Compiler</NAME><VALUE>Lib Import PPC</VALUE></SETTING> + <SETTING><NAME>EditLanguage</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING> + </SETTING> + <SETTING> + <SETTING><NAME>FileType</NAME><VALUE>MPLF</VALUE></SETTING> + <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>Compiler</NAME><VALUE>Lib Import PPC</VALUE></SETTING> + <SETTING><NAME>EditLanguage</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING> + </SETTING> + <SETTING> + <SETTING><NAME>FileType</NAME><VALUE>MWCD</VALUE></SETTING> + <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>EditLanguage</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>Launchable</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>ResourceFile</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING> + </SETTING> + <SETTING> + <SETTING><NAME>FileType</NAME><VALUE>RSRC</VALUE></SETTING> + <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>EditLanguage</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>Launchable</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>ResourceFile</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING> + </SETTING> + <SETTING> + <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING> + <SETTING><NAME>FileExtension</NAME><VALUE>.c</VALUE></SETTING> + <SETTING><NAME>Compiler</NAME><VALUE>MW C/C++ PPC</VALUE></SETTING> + <SETTING><NAME>EditLanguage</NAME><VALUE>C/C++</VALUE></SETTING> + <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING> + </SETTING> + <SETTING> + <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING> + <SETTING><NAME>FileExtension</NAME><VALUE>.c++</VALUE></SETTING> + <SETTING><NAME>Compiler</NAME><VALUE>MW C/C++ PPC</VALUE></SETTING> + <SETTING><NAME>EditLanguage</NAME><VALUE>C/C++</VALUE></SETTING> + <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING> + </SETTING> + <SETTING> + <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING> + <SETTING><NAME>FileExtension</NAME><VALUE>.cc</VALUE></SETTING> + <SETTING><NAME>Compiler</NAME><VALUE>MW C/C++ PPC</VALUE></SETTING> + <SETTING><NAME>EditLanguage</NAME><VALUE>C/C++</VALUE></SETTING> + <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING> + </SETTING> + <SETTING> + <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING> + <SETTING><NAME>FileExtension</NAME><VALUE>.cp</VALUE></SETTING> + <SETTING><NAME>Compiler</NAME><VALUE>MW C/C++ PPC</VALUE></SETTING> + <SETTING><NAME>EditLanguage</NAME><VALUE>C/C++</VALUE></SETTING> + <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING> + </SETTING> + <SETTING> + <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING> + <SETTING><NAME>FileExtension</NAME><VALUE>.cpp</VALUE></SETTING> + <SETTING><NAME>Compiler</NAME><VALUE>MW C/C++ PPC</VALUE></SETTING> + <SETTING><NAME>EditLanguage</NAME><VALUE>C/C++</VALUE></SETTING> + <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING> + </SETTING> + <SETTING> + <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING> + <SETTING><NAME>FileExtension</NAME><VALUE>.exp</VALUE></SETTING> + <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>EditLanguage</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING> + </SETTING> + <SETTING> + <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING> + <SETTING><NAME>FileExtension</NAME><VALUE>.h</VALUE></SETTING> + <SETTING><NAME>Compiler</NAME><VALUE>MW C/C++ PPC</VALUE></SETTING> + <SETTING><NAME>EditLanguage</NAME><VALUE>C/C++</VALUE></SETTING> + <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>IgnoredByMake</NAME><VALUE>true</VALUE></SETTING> + </SETTING> + <SETTING> + <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING> + <SETTING><NAME>FileExtension</NAME><VALUE>.p</VALUE></SETTING> + <SETTING><NAME>Compiler</NAME><VALUE>MW Pascal PPC</VALUE></SETTING> + <SETTING><NAME>EditLanguage</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING> + </SETTING> + <SETTING> + <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING> + <SETTING><NAME>FileExtension</NAME><VALUE>.pas</VALUE></SETTING> + <SETTING><NAME>Compiler</NAME><VALUE>MW Pascal PPC</VALUE></SETTING> + <SETTING><NAME>EditLanguage</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING> + </SETTING> + <SETTING> + <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING> + <SETTING><NAME>FileExtension</NAME><VALUE>.pch</VALUE></SETTING> + <SETTING><NAME>Compiler</NAME><VALUE>MW C/C++ PPC</VALUE></SETTING> + <SETTING><NAME>EditLanguage</NAME><VALUE>C/C++</VALUE></SETTING> + <SETTING><NAME>Precompile</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING> + </SETTING> + <SETTING> + <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING> + <SETTING><NAME>FileExtension</NAME><VALUE>.pch++</VALUE></SETTING> + <SETTING><NAME>Compiler</NAME><VALUE>MW C/C++ PPC</VALUE></SETTING> + <SETTING><NAME>EditLanguage</NAME><VALUE>C/C++</VALUE></SETTING> + <SETTING><NAME>Precompile</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING> + </SETTING> + <SETTING> + <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING> + <SETTING><NAME>FileExtension</NAME><VALUE>.ppu</VALUE></SETTING> + <SETTING><NAME>Compiler</NAME><VALUE>MW Pascal PPC</VALUE></SETTING> + <SETTING><NAME>EditLanguage</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>Precompile</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING> + </SETTING> + <SETTING> + <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING> + <SETTING><NAME>FileExtension</NAME><VALUE>.r</VALUE></SETTING> + <SETTING><NAME>Compiler</NAME><VALUE>Rez</VALUE></SETTING> + <SETTING><NAME>EditLanguage</NAME><VALUE>Rez</VALUE></SETTING> + <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING> + </SETTING> + <SETTING> + <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING> + <SETTING><NAME>FileExtension</NAME><VALUE>.s</VALUE></SETTING> + <SETTING><NAME>Compiler</NAME><VALUE>PPCAsm</VALUE></SETTING> + <SETTING><NAME>EditLanguage</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING> + </SETTING> + <SETTING> + <SETTING><NAME>FileType</NAME><VALUE>XCOF</VALUE></SETTING> + <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>Compiler</NAME><VALUE>XCOFF Import PPC</VALUE></SETTING> + <SETTING><NAME>EditLanguage</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING> + </SETTING> + <SETTING> + <SETTING><NAME>FileType</NAME><VALUE>docu</VALUE></SETTING> + <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>EditLanguage</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>Launchable</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>ResourceFile</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING> + </SETTING> + <SETTING> + <SETTING><NAME>FileType</NAME><VALUE>rsrc</VALUE></SETTING> + <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>EditLanguage</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>Launchable</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>ResourceFile</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING> + </SETTING> + <SETTING> + <SETTING><NAME>FileType</NAME><VALUE>shlb</VALUE></SETTING> + <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>Compiler</NAME><VALUE>PEF Import PPC</VALUE></SETTING> + <SETTING><NAME>EditLanguage</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING> + </SETTING> + <SETTING> + <SETTING><NAME>FileType</NAME><VALUE>stub</VALUE></SETTING> + <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>Compiler</NAME><VALUE>PEF Import PPC</VALUE></SETTING> + <SETTING><NAME>EditLanguage</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING> + </SETTING> + <SETTING> + <SETTING><NAME>FileExtension</NAME><VALUE>.doc</VALUE></SETTING> + <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>EditLanguage</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>Launchable</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>IgnoredByMake</NAME><VALUE>true</VALUE></SETTING> + </SETTING> + </SETTING> + + <!-- Settings for "Build Extras" panel --> + <SETTING><NAME>CacheModDates</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>ActivateBrowser</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>DumpBrowserInfo</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>CacheSubprojects</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>UseThirdPartyDebugger</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>DebuggerAppPath</NAME> + <SETTING><NAME>Path</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>PathFormat</NAME><VALUE>Generic</VALUE></SETTING> + <SETTING><NAME>PathRoot</NAME><VALUE>Absolute</VALUE></SETTING> + </SETTING> + <SETTING><NAME>DebuggerCmdLineArgs</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>DebuggerWorkingDir</NAME> + <SETTING><NAME>Path</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>PathFormat</NAME><VALUE>Generic</VALUE></SETTING> + <SETTING><NAME>PathRoot</NAME><VALUE>Absolute</VALUE></SETTING> + </SETTING> + + <!-- Settings for "Debugger Target" panel --> + <SETTING><NAME>LogSystemMessages</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>AutoTargetDLLs</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>StopAtWatchpoints</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>PauseWhileRunning</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>PauseInterval</NAME><VALUE>5</VALUE></SETTING> + <SETTING><NAME>PauseUIFlags</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>AltExePath</NAME> + <SETTING><NAME>Path</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>PathFormat</NAME><VALUE>Generic</VALUE></SETTING> + <SETTING><NAME>PathRoot</NAME><VALUE>Absolute</VALUE></SETTING> + </SETTING> + <SETTING><NAME>StopAtTempBPOnLaunch</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>CacheSymbolics</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>TempBPFunctionName</NAME><VALUE>main</VALUE></SETTING> + <SETTING><NAME>TempBPType</NAME><VALUE>0</VALUE></SETTING> + + <!-- Settings for "Remote Debug" panel --> + <SETTING><NAME>Enabled</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>ConnectionName</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>DownloadPath</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>LaunchRemoteApp</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>RemoteAppPath</NAME><VALUE></VALUE></SETTING> + + <!-- Settings for "Auto-target" panel --> + <SETTING><NAME>OtherExecutables</NAME><VALUE></VALUE></SETTING> + + <!-- Settings for "Custom Keywords" panel --> + <SETTING><NAME>CustomColor1</NAME> + <SETTING><NAME>Red</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>Green</NAME><VALUE>32767</VALUE></SETTING> + <SETTING><NAME>Blue</NAME><VALUE>0</VALUE></SETTING> + </SETTING> + <SETTING><NAME>CustomColor2</NAME> + <SETTING><NAME>Red</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>Green</NAME><VALUE>32767</VALUE></SETTING> + <SETTING><NAME>Blue</NAME><VALUE>0</VALUE></SETTING> + </SETTING> + <SETTING><NAME>CustomColor3</NAME> + <SETTING><NAME>Red</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>Green</NAME><VALUE>32767</VALUE></SETTING> + <SETTING><NAME>Blue</NAME><VALUE>0</VALUE></SETTING> + </SETTING> + <SETTING><NAME>CustomColor4</NAME> + <SETTING><NAME>Red</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>Green</NAME><VALUE>32767</VALUE></SETTING> + <SETTING><NAME>Blue</NAME><VALUE>0</VALUE></SETTING> + </SETTING> + + <!-- Settings for "C/C++ Compiler" panel --> + <SETTING><NAME>MWFrontEnd_C_cplusplus</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWFrontEnd_C_checkprotos</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWFrontEnd_C_arm</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWFrontEnd_C_trigraphs</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWFrontEnd_C_onlystdkeywords</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWFrontEnd_C_enumsalwaysint</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWFrontEnd_C_mpwpointerstyle</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWFrontEnd_C_prefixname</NAME><VALUE>DBM.Prefix</VALUE></SETTING> + <SETTING><NAME>MWFrontEnd_C_ansistrict</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWFrontEnd_C_mpwcnewline</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWFrontEnd_C_wchar_type</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWFrontEnd_C_enableexceptions</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWFrontEnd_C_dontreusestrings</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWFrontEnd_C_poolstrings</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWFrontEnd_C_dontinline</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWFrontEnd_C_useRTTI</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWFrontEnd_C_multibyteaware</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWFrontEnd_C_unsignedchars</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWFrontEnd_C_autoinline</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWFrontEnd_C_booltruefalse</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWFrontEnd_C_direct_to_som</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWFrontEnd_C_som_env_check</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWFrontEnd_C_alwaysinline</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWFrontEnd_C_inlinelevel</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWFrontEnd_C_ecplusplus</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWFrontEnd_C_objective_c</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWFrontEnd_C_defer_codegen</NAME><VALUE>0</VALUE></SETTING> + + <!-- Settings for "C/C++ Warnings" panel --> + <SETTING><NAME>MWWarning_C_warn_illpragma</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWWarning_C_warn_emptydecl</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWWarning_C_warn_possunwant</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWWarning_C_warn_unusedvar</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWWarning_C_warn_unusedarg</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWWarning_C_warn_extracomma</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWWarning_C_pedantic</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWWarning_C_warningerrors</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWWarning_C_warn_hidevirtual</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWWarning_C_warn_implicitconv</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWWarning_C_warn_notinlined</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWWarning_C_warn_structclass</NAME><VALUE>0</VALUE></SETTING> + + <!-- Settings for "FTP Panel" panel --> + <SETTING><NAME>MWFTP_Post_hostName</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWFTP_Post_username</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWFTP_Post_password</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWFTP_Post_remoteDir</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWFTP_Post_ftp_PathVersion</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWFTP_Post_ftp_PathType</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWFTP_Post_ftp_PathFormat</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWFTP_Post_ftp_tree</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWFTP_Post_uploadDir</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWFTP_Post_ftp_port</NAME><VALUE>21</VALUE></SETTING> + <SETTING><NAME>MWFTP_Post_SendBin</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWFTP_Post_ShouldLog</NAME><VALUE>1</VALUE></SETTING> + + <!-- Settings for "Java Command Line" panel --> + <SETTING><NAME>MWCommandLine_Java_clsName</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWCommandLine_Java_args</NAME><VALUE></VALUE></SETTING> + + <!-- Settings for "PJavaDebugging" panel --> + <SETTING><NAME>MWVJavaDebugging_Protocol</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWVJavaDebugging_JDKVersion</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWVJavaDebugging_TimeOut</NAME><VALUE>10</VALUE></SETTING> + <SETTING><NAME>MWVJavaDebugging_SupportSlowDevices</NAME><VALUE>false</VALUE></SETTING> + + <!-- Settings for "Java Language" panel --> + <SETTING><NAME>MWJava_Language_optimize</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>MWJava_Language_warnDeprecated</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>MWJava_Language_emitMap</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>MWJava_Language_strictFileNames</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>MWJava_Language_strictFileHierarchy</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>MWJava_Language_1_1_Compatible</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>MWJava_Language_emitHeaders</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWJava_Language_headerType</NAME><VALUE>JNINativeHeaders</VALUE></SETTING> + <SETTING><NAME>MWJava_Language_packageFilter</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWJava_Language_genComments</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>MWJava_Language_genHeaders</NAME><VALUE>false</VALUE></SETTING> + + <!-- Settings for "Java MRJAppBuilder" panel --> + <SETTING><NAME>MWJava_MRJAppBuilder_outFile</NAME><VALUE>MRJApplication</VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_merge</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_quitMenu</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_grow</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_stdoutType</NAME><VALUE>Console</VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_stderrType</NAME><VALUE>Console</VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_stdinType</NAME><VALUE>Console</VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_appIconPVersion</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_appIconPType</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_appIconPFormat</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_appIconPTree</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_appIconFile</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_splashScreenPVersion</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_splashScreenPType</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_splashScreenPFormat</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_splashScreenPTree</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_splashScreenPICTFile</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_aboutName</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_stdoutPVersion</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_stdoutPType</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_stdoutPFormat</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_stdoutPTree</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_stdoutFile</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_stdoutAppend</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_stderrPType</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_stderrPFormat</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_stderrPTree</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_stderrFile</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_stderrAppend</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_stdinPType</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_stdinPFormat</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_stdinPTree</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_stdinFile</NAME><VALUE></VALUE></SETTING> + + <!-- Settings for "Java Output" panel --> + <SETTING><NAME>MWJava_Output_outputtype</NAME><VALUE>JarFile</VALUE></SETTING> + <SETTING><NAME>MWJava_Output_outfile</NAME><VALUE>JavaClasses.jar</VALUE></SETTING> + <SETTING><NAME>MWJava_Output_ftype</NAME><VALUE>1514754080</VALUE></SETTING> + <SETTING><NAME>MWJava_Output_fcreator</NAME><VALUE>1297570384</VALUE></SETTING> + <SETTING><NAME>MWJava_Output_compress</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWJava_Output_genManifest</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWJava_Output_trunctype</NAME><VALUE>Front</VALUE></SETTING> + <SETTING><NAME>MWJava_Output_deleteClasses</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWJava_Output_consoleApp</NAME><VALUE>1</VALUE></SETTING> + + <!-- Settings for "Java Project" panel --> + <SETTING><NAME>MWJava_Proj_projtype</NAME><VALUE>Applet</VALUE></SETTING> + <SETTING><NAME>MWJava_Proj_mainClassName</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWJava_Proj_HTMLAppCreator</NAME><VALUE>1463898714</VALUE></SETTING> + <SETTING><NAME>MWJava_Proj_HTMLAppName</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWJava_Proj_PathVersion</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWJava_Proj_PathType</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWJava_Proj_PathFormat</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWJava_Proj_tree</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWJava_Proj_HTMLAppWin32Name</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWJava_Proj_compress</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWJava_Proj_useVM</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWJava_Proj_vmarguments</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWJava_Proj_vmName</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWJava_Proj_simPropFile</NAME><VALUE></VALUE></SETTING> + + <!-- Settings for "JavaDoc Project" panel --> + <SETTING><NAME>MWJavaDoc_Proj_Version</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWJavaDoc_Proj_Depricated</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWJavaDoc_Proj_Author</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWJavaDoc_Proj_Index</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWJavaDoc_Proj_Tree</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWJavaDoc_Proj_SunResolveToSame</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWJavaDoc_Proj_Shortnames</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWJavaDoc_Proj_Folder</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWJavaDoc_Proj_GenerateAPILinks</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWJavaDoc_Proj_scope</NAME><VALUE>Public</VALUE></SETTING> + <SETTING><NAME>MWJavaDoc_Proj_fcreator</NAME><VALUE>1297303877</VALUE></SETTING> + <SETTING><NAME>MWJavaDoc_Proj_encodingName</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWJavaDoc_Proj_decodingName</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWJavaDoc_Proj_javaPackagePath</NAME><VALUE>http://java.sun.com/products/jdk/1.1/docs/api/</VALUE></SETTING> + + <!-- Settings for "MacOS Merge Panel" panel --> + <SETTING><NAME>MWMerge_MacOS_projectType</NAME><VALUE>Application</VALUE></SETTING> + <SETTING><NAME>MWMerge_MacOS_outputName</NAME><VALUE>Merge Out</VALUE></SETTING> + <SETTING><NAME>MWMerge_MacOS_outputCreator</NAME><VALUE>????</VALUE></SETTING> + <SETTING><NAME>MWMerge_MacOS_outputType</NAME><VALUE>APPL</VALUE></SETTING> + <SETTING><NAME>MWMerge_MacOS_suppressWarning</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWMerge_MacOS_copyFragments</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWMerge_MacOS_copyResources</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWMerge_MacOS_flattenResource</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWMerge_MacOS_flatFileName</NAME><VALUE>a.rsrc</VALUE></SETTING> + <SETTING><NAME>MWMerge_MacOS_flatFileOutputPath</NAME> + <SETTING><NAME>Path</NAME><VALUE>:</VALUE></SETTING> + <SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING> + <SETTING><NAME>PathRoot</NAME><VALUE>Project</VALUE></SETTING> + </SETTING> + <SETTING><NAME>MWMerge_MacOS_skipResources</NAME> + <SETTING><VALUE>DLGX</VALUE></SETTING> + <SETTING><VALUE>ckid</VALUE></SETTING> + <SETTING><VALUE>Proj</VALUE></SETTING> + <SETTING><VALUE>WSPC</VALUE></SETTING> + </SETTING> + + <!-- Settings for "Output Flags" panel --> + <SETTING><NAME>FileLocked</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>ResourcesMapIsReadOnly</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>PrinterDriverIsMultiFinderCompatible</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>Invisible</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>HasBundle</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>NameLocked</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>Stationery</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>HasCustomIcon</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>Shared</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>HasBeenInited</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>Label</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>Comments</NAME><VALUE></VALUE></SETTING> + + <!-- Settings for "Packager Panel" panel --> + <SETTING><NAME>MWMacOSPackager_UsePackager</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWMacOSPackager_FolderToPackage</NAME> + <SETTING><NAME>Path</NAME><VALUE>:</VALUE></SETTING> + <SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING> + <SETTING><NAME>PathRoot</NAME><VALUE>Project</VALUE></SETTING> + </SETTING> + <SETTING><NAME>MWMacOSPackager_CreateClassicAlias</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWMacOSPackager_ClassicAliasMethod</NAME><VALUE>UseTargetOutput</VALUE></SETTING> + <SETTING><NAME>MWMacOSPackager_ClassicAliasPath</NAME> + <SETTING><NAME>Path</NAME><VALUE>:</VALUE></SETTING> + <SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING> + <SETTING><NAME>PathRoot</NAME><VALUE>Project</VALUE></SETTING> + </SETTING> + <SETTING><NAME>MWMacOSPackager_CreatePkgInfo</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWMacOSPackager_PkgCreatorType</NAME><VALUE>????</VALUE></SETTING> + <SETTING><NAME>MWMacOSPackager_PkgFileType</NAME><VALUE>APPL</VALUE></SETTING> + + <!-- Settings for "PPC CodeGen" panel --> + <SETTING><NAME>MWCodeGen_PPC_structalignment</NAME><VALUE>PPC</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_PPC_tracebacktables</NAME><VALUE>None</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_PPC_processor</NAME><VALUE>Generic</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_PPC_readonlystrings</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_PPC_tocdata</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_PPC_profiler</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_PPC_fpcontract</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_PPC_schedule</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_PPC_peephole</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_PPC_processorspecific</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_PPC_altivec</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_PPC_vectortocdata</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_PPC_vrsave</NAME><VALUE>0</VALUE></SETTING> + + <!-- Settings for "PPC CodeGen Mach-O" panel --> + <SETTING><NAME>MWCodeGen_MachO_structalignment</NAME><VALUE>PPC</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_MachO_tracebacktables</NAME><VALUE>None</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_MachO_processor</NAME><VALUE>Generic</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_MachO_readonlystrings</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_MachO_profiler</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_MachO_fpcontract</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_MachO_schedule</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_MachO_peephole</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_MachO_processorspecific</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_MachO_altivec</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_MachO_vrsave</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_MachO_common</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_MachO_implicit_templates</NAME><VALUE>1</VALUE></SETTING> + + <!-- Settings for "PPC Disassembler" panel --> + <SETTING><NAME>MWDisassembler_PPC_showcode</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWDisassembler_PPC_extended</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWDisassembler_PPC_mix</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWDisassembler_PPC_nohex</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWDisassembler_PPC_showdata</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWDisassembler_PPC_showexceptions</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWDisassembler_PPC_showsym</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWDisassembler_PPC_shownames</NAME><VALUE>1</VALUE></SETTING> + + <!-- Settings for "PPC Global Optimizer" panel --> + <SETTING><NAME>GlobalOptimizer_PPC_optimizationlevel</NAME><VALUE>Level0</VALUE></SETTING> + <SETTING><NAME>GlobalOptimizer_PPC_optfor</NAME><VALUE>Speed</VALUE></SETTING> + + <!-- Settings for "PPC Linker" panel --> + <SETTING><NAME>MWLinker_PPC_linksym</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWLinker_PPC_symfullpath</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWLinker_PPC_linkmap</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWLinker_PPC_nolinkwarnings</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWLinker_PPC_dontdeadstripinitcode</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWLinker_PPC_permitmultdefs</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWLinker_PPC_linkmode</NAME><VALUE>Fast</VALUE></SETTING> + <SETTING><NAME>MWLinker_PPC_initname</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWLinker_PPC_mainname</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWLinker_PPC_termname</NAME><VALUE></VALUE></SETTING> + + <!-- Settings for "PPC Mach-O Linker" panel --> + <SETTING><NAME>MWLinker_MachO_exports</NAME><VALUE>None</VALUE></SETTING> + <SETTING><NAME>MWLinker_MachO_mainname</NAME><VALUE>start</VALUE></SETTING> + <SETTING><NAME>MWLinker_MachO_currentversion</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWLinker_MachO_compatibleversion</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWLinker_MachO_symfullpath</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWLinker_MachO_supresswarnings</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWLinker_MachO_multisymerror</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWLinker_MachO_prebind</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWLinker_MachO_deadstrip</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWLinker_MachO_objectivecsemantics</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWLinker_MachO_whichfileloaded</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWLinker_MachO_whyfileloaded</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWLinker_MachO_readonlyrelocs</NAME><VALUE>Errors</VALUE></SETTING> + <SETTING><NAME>MWLinker_MachO_undefinedsymbols</NAME><VALUE>Errors</VALUE></SETTING> + <SETTING><NAME>MWLinker_MachO_twolevelnamespace</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWLinker_MachO_stripdebugsymbols</NAME><VALUE>0</VALUE></SETTING> + + <!-- Settings for "PPC Mach-O Target" panel --> + <SETTING><NAME>MWProject_MachO_type</NAME><VALUE>Executable</VALUE></SETTING> + <SETTING><NAME>MWProject_MachO_outfile</NAME><VALUE>a.exe</VALUE></SETTING> + <SETTING><NAME>MWProject_MachO_filecreator</NAME><VALUE>????</VALUE></SETTING> + <SETTING><NAME>MWProject_MachO_filetype</NAME><VALUE>MEXE</VALUE></SETTING> + <SETTING><NAME>MWProject_MachO_stacksize</NAME><VALUE>64</VALUE></SETTING> + <SETTING><NAME>MWProject_MachO_stackaddress</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWProject_MachO_flatrsrc</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWProject_MachO_flatrsrcfilename</NAME><VALUE>a.rsrc</VALUE></SETTING> + <SETTING><NAME>MWProject_MachO_flatrsrcoutputdir</NAME> + <SETTING><NAME>Path</NAME><VALUE>:</VALUE></SETTING> + <SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING> + <SETTING><NAME>PathRoot</NAME><VALUE>Project</VALUE></SETTING> + </SETTING> + <SETTING><NAME>MWProject_MachO_installpath</NAME><VALUE>./</VALUE></SETTING> + + <!-- Settings for "PPC PEF" panel --> + <SETTING><NAME>MWPEF_exports</NAME><VALUE>Pragma</VALUE></SETTING> + <SETTING><NAME>MWPEF_libfolder</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWPEF_sortcode</NAME><VALUE>None</VALUE></SETTING> + <SETTING><NAME>MWPEF_expandbss</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWPEF_sharedata</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWPEF_olddefversion</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWPEF_oldimpversion</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWPEF_currentversion</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWPEF_fragmentname</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWPEF_collapsereloads</NAME><VALUE>0</VALUE></SETTING> + + <!-- Settings for "PPC Project" panel --> + <SETTING><NAME>MWProject_PPC_type</NAME><VALUE>Library</VALUE></SETTING> + <SETTING><NAME>MWProject_PPC_outfile</NAME><VALUE>DBM.o</VALUE></SETTING> + <SETTING><NAME>MWProject_PPC_filecreator</NAME><VALUE>????</VALUE></SETTING> + <SETTING><NAME>MWProject_PPC_filetype</NAME><VALUE>????</VALUE></SETTING> + <SETTING><NAME>MWProject_PPC_size</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWProject_PPC_minsize</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWProject_PPC_stacksize</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWProject_PPC_flags</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWProject_PPC_symfilename</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWProject_PPC_rsrcname</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWProject_PPC_rsrcheader</NAME><VALUE>Native</VALUE></SETTING> + <SETTING><NAME>MWProject_PPC_rsrctype</NAME><VALUE>????</VALUE></SETTING> + <SETTING><NAME>MWProject_PPC_rsrcid</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWProject_PPC_rsrcflags</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWProject_PPC_rsrcstore</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWProject_PPC_rsrcmerge</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWProject_PPC_flatrsrc</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWProject_PPC_flatrsrcoutputdir</NAME> + <SETTING><NAME>Path</NAME><VALUE>:</VALUE></SETTING> + <SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING> + <SETTING><NAME>PathRoot</NAME><VALUE>Project</VALUE></SETTING> + </SETTING> + <SETTING><NAME>MWProject_PPC_flatrsrcfilename</NAME><VALUE></VALUE></SETTING> + + <!-- Settings for "PPCAsm Panel" panel --> + <SETTING><NAME>MWAssembler_PPC_auxheader</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWAssembler_PPC_symmode</NAME><VALUE>Mac</VALUE></SETTING> + <SETTING><NAME>MWAssembler_PPC_dialect</NAME><VALUE>PPC</VALUE></SETTING> + <SETTING><NAME>MWAssembler_PPC_prefixfile</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWAssembler_PPC_typecheck</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWAssembler_PPC_warnings</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWAssembler_PPC_casesensitive</NAME><VALUE>0</VALUE></SETTING> + + <!-- Settings for "Rez Compiler" panel --> + <SETTING><NAME>MWRez_Language_maxwidth</NAME><VALUE>80</VALUE></SETTING> + <SETTING><NAME>MWRez_Language_script</NAME><VALUE>Roman</VALUE></SETTING> + <SETTING><NAME>MWRez_Language_alignment</NAME><VALUE>Align1</VALUE></SETTING> + <SETTING><NAME>MWRez_Language_filtermode</NAME><VALUE>FilterSkip</VALUE></SETTING> + <SETTING><NAME>MWRez_Language_suppresswarnings</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWRez_Language_escapecontrolchars</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWRez_Language_prefixname</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWRez_Language_filteredtypes</NAME><VALUE>'CODE' 'DATA' 'PICT'</VALUE></SETTING> + + <!-- Settings for "WinRC Compiler" panel --> + <SETTING><NAME>MWWinRC_prefixname</NAME><VALUE></VALUE></SETTING> + + <!-- Settings for "x86 CodeGen" panel --> + <SETTING><NAME>MWCodeGen_X86_processor</NAME><VALUE>Generic</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_X86_alignment</NAME><VALUE>bytes8</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_X86_exceptions</NAME><VALUE>ZeroOverhead</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_X86_extinst_mmx</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_X86_extinst_3dnow</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_X86_use_mmx_3dnow_convention</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_X86_machinecodelisting</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_X86_intrinsics</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_X86_syminfo</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_X86_codeviewinfo</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_X86_extinst_cmov_fcomi</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_X86_extinst_sse</NAME><VALUE>0</VALUE></SETTING> + + <!-- Settings for "x86 Disassembler" panel --> + <SETTING><NAME>PDisasmX86_showHeaders</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>PDisasmX86_showSymTab</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>PDisasmX86_showCode</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>PDisasmX86_showSource</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>PDisasmX86_showHex</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>PDisasmX86_showRelocation</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>PDisasmX86_showComments</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>PDisasmX86_showDebug</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>PDisasmX86_showExceptions</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>PDisasmX86_showData</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>PDisasmX86_showRaw</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>PDisasmX86_verbose</NAME><VALUE>false</VALUE></SETTING> + + <!-- Settings for "x86 Exceptions Panel" panel --> + <SETTING><NAME>MWDebugger_X86_Exceptions</NAME> + <SETTING><VALUE>0</VALUE></SETTING> + <SETTING><VALUE>0</VALUE></SETTING> + <SETTING><VALUE>0</VALUE></SETTING> + <SETTING><VALUE>0</VALUE></SETTING> + <SETTING><VALUE>0</VALUE></SETTING> + <SETTING><VALUE>0</VALUE></SETTING> + <SETTING><VALUE>0</VALUE></SETTING> + <SETTING><VALUE>0</VALUE></SETTING> + <SETTING><VALUE>0</VALUE></SETTING> + <SETTING><VALUE>0</VALUE></SETTING> + <SETTING><VALUE>0</VALUE></SETTING> + <SETTING><VALUE>0</VALUE></SETTING> + <SETTING><VALUE>0</VALUE></SETTING> + <SETTING><VALUE>0</VALUE></SETTING> + <SETTING><VALUE>0</VALUE></SETTING> + <SETTING><VALUE>0</VALUE></SETTING> + <SETTING><VALUE>0</VALUE></SETTING> + <SETTING><VALUE>0</VALUE></SETTING> + <SETTING><VALUE>0</VALUE></SETTING> + <SETTING><VALUE>0</VALUE></SETTING> + <SETTING><VALUE>0</VALUE></SETTING> + <SETTING><VALUE>0</VALUE></SETTING> + <SETTING><VALUE>0</VALUE></SETTING> + <SETTING><VALUE>0</VALUE></SETTING> + </SETTING> + + <!-- Settings for "x86 Global Optimizer" panel --> + <SETTING><NAME>GlobalOptimizer_X86_optimizationlevel</NAME><VALUE>Level0</VALUE></SETTING> + <SETTING><NAME>GlobalOptimizer_X86_optfor</NAME><VALUE>Speed</VALUE></SETTING> + + <!-- Settings for "x86 Linker" panel --> + <SETTING><NAME>MWLinker_X86_entrypointusage</NAME><VALUE>Default</VALUE></SETTING> + <SETTING><NAME>MWLinker_X86_entrypoint</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWLinker_X86_subsystem</NAME><VALUE>WinGUI</VALUE></SETTING> + <SETTING><NAME>MWLinker_X86_subsysmajorid</NAME><VALUE>4</VALUE></SETTING> + <SETTING><NAME>MWLinker_X86_subsysminorid</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWLinker_X86_usrmajorid</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWLinker_X86_usrminorid</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWLinker_X86_commandfile</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWLinker_X86_generatemap</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWLinker_X86_linksym</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWLinker_X86_linkCV</NAME><VALUE>1</VALUE></SETTING> + + <!-- Settings for "x86 Project" panel --> + <SETTING><NAME>MWProject_X86_type</NAME><VALUE>Application</VALUE></SETTING> + <SETTING><NAME>MWProject_X86_outfile</NAME><VALUE>noname.exe</VALUE></SETTING> + <SETTING><NAME>MWProject_X86_baseaddress</NAME><VALUE>4194304</VALUE></SETTING> + <SETTING><NAME>MWProject_X86_maxstacksize</NAME><VALUE>1024</VALUE></SETTING> + <SETTING><NAME>MWProject_X86_minstacksize</NAME><VALUE>4</VALUE></SETTING> + <SETTING><NAME>MWProject_X86_size</NAME><VALUE>1024</VALUE></SETTING> + <SETTING><NAME>MWProject_X86_minsize</NAME><VALUE>4</VALUE></SETTING> + <SETTING><NAME>MWProject_X86_importlib</NAME><VALUE></VALUE></SETTING> + <PANELDATA><NAME>xpidl Settings</NAME><VALUE> + 0001000101000000000000000000000000000000000000000000000000000000 + 0000000000000000 + </VALUE></PANELDATA> + </SETTINGLIST> + <FILELIST> + <FILE> + <PATHTYPE>Name</PATHTYPE> + <PATH>db.c</PATH> + <PATHFORMAT>MacOS</PATHFORMAT> + <FILEKIND>Text</FILEKIND> + <FILEFLAGS>Debug</FILEFLAGS> + </FILE> + <FILE> + <PATHTYPE>Name</PATHTYPE> + <PATH>hash.c</PATH> + <PATHFORMAT>MacOS</PATHFORMAT> + <FILEKIND>Text</FILEKIND> + <FILEFLAGS>Debug</FILEFLAGS> + </FILE> + <FILE> + <PATHTYPE>Name</PATHTYPE> + <PATH>hash_buf.c</PATH> + <PATHFORMAT>MacOS</PATHFORMAT> + <FILEKIND>Text</FILEKIND> + <FILEFLAGS>Debug</FILEFLAGS> + </FILE> + <FILE> + <PATHTYPE>Name</PATHTYPE> + <PATH>hsearch.c</PATH> + <PATHFORMAT>MacOS</PATHFORMAT> + <FILEKIND>Text</FILEKIND> + <FILEFLAGS>Debug</FILEFLAGS> + </FILE> + <FILE> + <PATHTYPE>Name</PATHTYPE> + <PATH>h_bigkey.c</PATH> + <PATHFORMAT>MacOS</PATHFORMAT> + <FILEKIND>Text</FILEKIND> + <FILEFLAGS>Debug</FILEFLAGS> + </FILE> + <FILE> + <PATHTYPE>Name</PATHTYPE> + <PATH>h_func.c</PATH> + <PATHFORMAT>MacOS</PATHFORMAT> + <FILEKIND>Text</FILEKIND> + <FILEFLAGS>Debug</FILEFLAGS> + </FILE> + <FILE> + <PATHTYPE>Name</PATHTYPE> + <PATH>h_log2.c</PATH> + <PATHFORMAT>MacOS</PATHFORMAT> + <FILEKIND>Text</FILEKIND> + <FILEFLAGS>Debug</FILEFLAGS> + </FILE> + <FILE> + <PATHTYPE>Name</PATHTYPE> + <PATH>h_page.c</PATH> + <PATHFORMAT>MacOS</PATHFORMAT> + <FILEKIND>Text</FILEKIND> + <FILEFLAGS>Debug</FILEFLAGS> + </FILE> + <FILE> + <PATHTYPE>Name</PATHTYPE> + <PATH>macstubs.c</PATH> + <PATHFORMAT>MacOS</PATHFORMAT> + <FILEKIND>Text</FILEKIND> + <FILEFLAGS>Debug</FILEFLAGS> + </FILE> + </FILELIST> + <LINKORDER> + <FILEREF> + <PATHTYPE>Name</PATHTYPE> + <PATH>db.c</PATH> + <PATHFORMAT>MacOS</PATHFORMAT> + </FILEREF> + <FILEREF> + <PATHTYPE>Name</PATHTYPE> + <PATH>hash.c</PATH> + <PATHFORMAT>MacOS</PATHFORMAT> + </FILEREF> + <FILEREF> + <PATHTYPE>Name</PATHTYPE> + <PATH>hash_buf.c</PATH> + <PATHFORMAT>MacOS</PATHFORMAT> + </FILEREF> + <FILEREF> + <PATHTYPE>Name</PATHTYPE> + <PATH>hsearch.c</PATH> + <PATHFORMAT>MacOS</PATHFORMAT> + </FILEREF> + <FILEREF> + <PATHTYPE>Name</PATHTYPE> + <PATH>h_bigkey.c</PATH> + <PATHFORMAT>MacOS</PATHFORMAT> + </FILEREF> + <FILEREF> + <PATHTYPE>Name</PATHTYPE> + <PATH>h_func.c</PATH> + <PATHFORMAT>MacOS</PATHFORMAT> + </FILEREF> + <FILEREF> + <PATHTYPE>Name</PATHTYPE> + <PATH>h_log2.c</PATH> + <PATHFORMAT>MacOS</PATHFORMAT> + </FILEREF> + <FILEREF> + <PATHTYPE>Name</PATHTYPE> + <PATH>h_page.c</PATH> + <PATHFORMAT>MacOS</PATHFORMAT> + </FILEREF> + <FILEREF> + <PATHTYPE>Name</PATHTYPE> + <PATH>macstubs.c</PATH> + <PATHFORMAT>MacOS</PATHFORMAT> + </FILEREF> + </LINKORDER> + </TARGET> + <TARGET> + <NAME>DBMDebug.o</NAME> + <SETTINGLIST> + + <!-- Settings for "Source Trees" panel --> + <SETTING><NAME>UserSourceTrees</NAME><VALUE></VALUE></SETTING> + + <!-- Settings for "Access Paths" panel --> + <SETTING><NAME>AlwaysSearchUserPaths</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>InterpretDOSAndUnixPaths</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>RequireFrameworkStyleIncludes</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>UserSearchPaths</NAME> + <SETTING> + <SETTING><NAME>SearchPath</NAME> + <SETTING><NAME>Path</NAME><VALUE>:</VALUE></SETTING> + <SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING> + <SETTING><NAME>PathRoot</NAME><VALUE>Project</VALUE></SETTING> + </SETTING> + <SETTING><NAME>Recursive</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>FrameworkPath</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>HostFlags</NAME><VALUE>All</VALUE></SETTING> + </SETTING> + <SETTING> + <SETTING><NAME>SearchPath</NAME> + <SETTING><NAME>Path</NAME><VALUE>::src:</VALUE></SETTING> + <SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING> + <SETTING><NAME>PathRoot</NAME><VALUE>Project</VALUE></SETTING> + </SETTING> + <SETTING><NAME>Recursive</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>FrameworkPath</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>HostFlags</NAME><VALUE>All</VALUE></SETTING> + </SETTING> + <SETTING> + <SETTING><NAME>SearchPath</NAME> + <SETTING><NAME>Path</NAME><VALUE>:::dist:client:</VALUE></SETTING> + <SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING> + <SETTING><NAME>PathRoot</NAME><VALUE>Project</VALUE></SETTING> + </SETTING> + <SETTING><NAME>Recursive</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>FrameworkPath</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>HostFlags</NAME><VALUE>All</VALUE></SETTING> + </SETTING> + <SETTING> + <SETTING><NAME>SearchPath</NAME> + <SETTING><NAME>Path</NAME><VALUE>:::dist:client_stubs:</VALUE></SETTING> + <SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING> + <SETTING><NAME>PathRoot</NAME><VALUE>Project</VALUE></SETTING> + </SETTING> + <SETTING><NAME>Recursive</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>FrameworkPath</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>HostFlags</NAME><VALUE>All</VALUE></SETTING> + </SETTING> + <SETTING> + <SETTING><NAME>SearchPath</NAME> + <SETTING><NAME>Path</NAME><VALUE>:::dist:</VALUE></SETTING> + <SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING> + <SETTING><NAME>PathRoot</NAME><VALUE>Project</VALUE></SETTING> + </SETTING> + <SETTING><NAME>Recursive</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>FrameworkPath</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>HostFlags</NAME><VALUE>All</VALUE></SETTING> + </SETTING> + </SETTING> + <SETTING><NAME>SystemSearchPaths</NAME> + <SETTING> + <SETTING><NAME>SearchPath</NAME> + <SETTING><NAME>Path</NAME><VALUE>:MSL:</VALUE></SETTING> + <SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING> + <SETTING><NAME>PathRoot</NAME><VALUE>CodeWarrior</VALUE></SETTING> + </SETTING> + <SETTING><NAME>Recursive</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>FrameworkPath</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>HostFlags</NAME><VALUE>All</VALUE></SETTING> + </SETTING> + <SETTING> + <SETTING><NAME>SearchPath</NAME> + <SETTING><NAME>Path</NAME><VALUE>:MacOS Support:</VALUE></SETTING> + <SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING> + <SETTING><NAME>PathRoot</NAME><VALUE>CodeWarrior</VALUE></SETTING> + </SETTING> + <SETTING><NAME>Recursive</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>FrameworkPath</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>HostFlags</NAME><VALUE>All</VALUE></SETTING> + </SETTING> + </SETTING> + + <!-- Settings for "Debugger Runtime" panel --> + <SETTING><NAME>MWRuntimeSettings_WorkingDirectory</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWRuntimeSettings_CommandLine</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWRuntimeSettings_HostApplication</NAME> + <SETTING><NAME>Path</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>PathFormat</NAME><VALUE>Generic</VALUE></SETTING> + <SETTING><NAME>PathRoot</NAME><VALUE>Absolute</VALUE></SETTING> + </SETTING> + <SETTING><NAME>MWRuntimeSettings_EnvVars</NAME><VALUE></VALUE></SETTING> + + <!-- Settings for "Target Settings" panel --> + <SETTING><NAME>Linker</NAME><VALUE>MacOS PPC Linker</VALUE></SETTING> + <SETTING><NAME>PreLinker</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>PostLinker</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>Targetname</NAME><VALUE>DBMDebug.o</VALUE></SETTING> + <SETTING><NAME>OutputDirectory</NAME> + <SETTING><NAME>Path</NAME><VALUE>:</VALUE></SETTING> + <SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING> + <SETTING><NAME>PathRoot</NAME><VALUE>Project</VALUE></SETTING> + </SETTING> + <SETTING><NAME>SaveEntriesUsingRelativePaths</NAME><VALUE>false</VALUE></SETTING> + + <!-- Settings for "File Mappings" panel --> + <SETTING><NAME>FileMappings</NAME> + <SETTING> + <SETTING><NAME>FileType</NAME><VALUE>APPL</VALUE></SETTING> + <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>EditLanguage</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>Launchable</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>ResourceFile</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING> + </SETTING> + <SETTING> + <SETTING><NAME>FileType</NAME><VALUE>Appl</VALUE></SETTING> + <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>EditLanguage</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>Launchable</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>ResourceFile</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING> + </SETTING> + <SETTING> + <SETTING><NAME>FileType</NAME><VALUE>MMLB</VALUE></SETTING> + <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>Compiler</NAME><VALUE>Lib Import PPC</VALUE></SETTING> + <SETTING><NAME>EditLanguage</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING> + </SETTING> + <SETTING> + <SETTING><NAME>FileType</NAME><VALUE>MPLF</VALUE></SETTING> + <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>Compiler</NAME><VALUE>Lib Import PPC</VALUE></SETTING> + <SETTING><NAME>EditLanguage</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING> + </SETTING> + <SETTING> + <SETTING><NAME>FileType</NAME><VALUE>MWCD</VALUE></SETTING> + <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>EditLanguage</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>Launchable</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>ResourceFile</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING> + </SETTING> + <SETTING> + <SETTING><NAME>FileType</NAME><VALUE>RSRC</VALUE></SETTING> + <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>EditLanguage</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>Launchable</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>ResourceFile</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING> + </SETTING> + <SETTING> + <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING> + <SETTING><NAME>FileExtension</NAME><VALUE>.c</VALUE></SETTING> + <SETTING><NAME>Compiler</NAME><VALUE>MW C/C++ PPC</VALUE></SETTING> + <SETTING><NAME>EditLanguage</NAME><VALUE>C/C++</VALUE></SETTING> + <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING> + </SETTING> + <SETTING> + <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING> + <SETTING><NAME>FileExtension</NAME><VALUE>.c++</VALUE></SETTING> + <SETTING><NAME>Compiler</NAME><VALUE>MW C/C++ PPC</VALUE></SETTING> + <SETTING><NAME>EditLanguage</NAME><VALUE>C/C++</VALUE></SETTING> + <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING> + </SETTING> + <SETTING> + <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING> + <SETTING><NAME>FileExtension</NAME><VALUE>.cc</VALUE></SETTING> + <SETTING><NAME>Compiler</NAME><VALUE>MW C/C++ PPC</VALUE></SETTING> + <SETTING><NAME>EditLanguage</NAME><VALUE>C/C++</VALUE></SETTING> + <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING> + </SETTING> + <SETTING> + <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING> + <SETTING><NAME>FileExtension</NAME><VALUE>.cp</VALUE></SETTING> + <SETTING><NAME>Compiler</NAME><VALUE>MW C/C++ PPC</VALUE></SETTING> + <SETTING><NAME>EditLanguage</NAME><VALUE>C/C++</VALUE></SETTING> + <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING> + </SETTING> + <SETTING> + <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING> + <SETTING><NAME>FileExtension</NAME><VALUE>.cpp</VALUE></SETTING> + <SETTING><NAME>Compiler</NAME><VALUE>MW C/C++ PPC</VALUE></SETTING> + <SETTING><NAME>EditLanguage</NAME><VALUE>C/C++</VALUE></SETTING> + <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING> + </SETTING> + <SETTING> + <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING> + <SETTING><NAME>FileExtension</NAME><VALUE>.exp</VALUE></SETTING> + <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>EditLanguage</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING> + </SETTING> + <SETTING> + <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING> + <SETTING><NAME>FileExtension</NAME><VALUE>.h</VALUE></SETTING> + <SETTING><NAME>Compiler</NAME><VALUE>MW C/C++ PPC</VALUE></SETTING> + <SETTING><NAME>EditLanguage</NAME><VALUE>C/C++</VALUE></SETTING> + <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>IgnoredByMake</NAME><VALUE>true</VALUE></SETTING> + </SETTING> + <SETTING> + <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING> + <SETTING><NAME>FileExtension</NAME><VALUE>.p</VALUE></SETTING> + <SETTING><NAME>Compiler</NAME><VALUE>MW Pascal PPC</VALUE></SETTING> + <SETTING><NAME>EditLanguage</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING> + </SETTING> + <SETTING> + <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING> + <SETTING><NAME>FileExtension</NAME><VALUE>.pas</VALUE></SETTING> + <SETTING><NAME>Compiler</NAME><VALUE>MW Pascal PPC</VALUE></SETTING> + <SETTING><NAME>EditLanguage</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING> + </SETTING> + <SETTING> + <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING> + <SETTING><NAME>FileExtension</NAME><VALUE>.pch</VALUE></SETTING> + <SETTING><NAME>Compiler</NAME><VALUE>MW C/C++ PPC</VALUE></SETTING> + <SETTING><NAME>EditLanguage</NAME><VALUE>C/C++</VALUE></SETTING> + <SETTING><NAME>Precompile</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING> + </SETTING> + <SETTING> + <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING> + <SETTING><NAME>FileExtension</NAME><VALUE>.pch++</VALUE></SETTING> + <SETTING><NAME>Compiler</NAME><VALUE>MW C/C++ PPC</VALUE></SETTING> + <SETTING><NAME>EditLanguage</NAME><VALUE>C/C++</VALUE></SETTING> + <SETTING><NAME>Precompile</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING> + </SETTING> + <SETTING> + <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING> + <SETTING><NAME>FileExtension</NAME><VALUE>.ppu</VALUE></SETTING> + <SETTING><NAME>Compiler</NAME><VALUE>MW Pascal PPC</VALUE></SETTING> + <SETTING><NAME>EditLanguage</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>Precompile</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING> + </SETTING> + <SETTING> + <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING> + <SETTING><NAME>FileExtension</NAME><VALUE>.r</VALUE></SETTING> + <SETTING><NAME>Compiler</NAME><VALUE>Rez</VALUE></SETTING> + <SETTING><NAME>EditLanguage</NAME><VALUE>Rez</VALUE></SETTING> + <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING> + </SETTING> + <SETTING> + <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING> + <SETTING><NAME>FileExtension</NAME><VALUE>.s</VALUE></SETTING> + <SETTING><NAME>Compiler</NAME><VALUE>PPCAsm</VALUE></SETTING> + <SETTING><NAME>EditLanguage</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING> + </SETTING> + <SETTING> + <SETTING><NAME>FileType</NAME><VALUE>XCOF</VALUE></SETTING> + <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>Compiler</NAME><VALUE>XCOFF Import PPC</VALUE></SETTING> + <SETTING><NAME>EditLanguage</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING> + </SETTING> + <SETTING> + <SETTING><NAME>FileType</NAME><VALUE>docu</VALUE></SETTING> + <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>EditLanguage</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>Launchable</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>ResourceFile</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING> + </SETTING> + <SETTING> + <SETTING><NAME>FileType</NAME><VALUE>rsrc</VALUE></SETTING> + <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>EditLanguage</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>Launchable</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>ResourceFile</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING> + </SETTING> + <SETTING> + <SETTING><NAME>FileType</NAME><VALUE>shlb</VALUE></SETTING> + <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>Compiler</NAME><VALUE>PEF Import PPC</VALUE></SETTING> + <SETTING><NAME>EditLanguage</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING> + </SETTING> + <SETTING> + <SETTING><NAME>FileType</NAME><VALUE>stub</VALUE></SETTING> + <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>Compiler</NAME><VALUE>PEF Import PPC</VALUE></SETTING> + <SETTING><NAME>EditLanguage</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING> + </SETTING> + <SETTING> + <SETTING><NAME>FileExtension</NAME><VALUE>.doc</VALUE></SETTING> + <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>EditLanguage</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>Launchable</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>IgnoredByMake</NAME><VALUE>true</VALUE></SETTING> + </SETTING> + </SETTING> + + <!-- Settings for "Build Extras" panel --> + <SETTING><NAME>CacheModDates</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>ActivateBrowser</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>DumpBrowserInfo</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>CacheSubprojects</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>UseThirdPartyDebugger</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>DebuggerAppPath</NAME> + <SETTING><NAME>Path</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>PathFormat</NAME><VALUE>Generic</VALUE></SETTING> + <SETTING><NAME>PathRoot</NAME><VALUE>Absolute</VALUE></SETTING> + </SETTING> + <SETTING><NAME>DebuggerCmdLineArgs</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>DebuggerWorkingDir</NAME> + <SETTING><NAME>Path</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>PathFormat</NAME><VALUE>Generic</VALUE></SETTING> + <SETTING><NAME>PathRoot</NAME><VALUE>Absolute</VALUE></SETTING> + </SETTING> + + <!-- Settings for "Debugger Target" panel --> + <SETTING><NAME>LogSystemMessages</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>AutoTargetDLLs</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>StopAtWatchpoints</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>PauseWhileRunning</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>PauseInterval</NAME><VALUE>5</VALUE></SETTING> + <SETTING><NAME>PauseUIFlags</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>AltExePath</NAME> + <SETTING><NAME>Path</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>PathFormat</NAME><VALUE>Generic</VALUE></SETTING> + <SETTING><NAME>PathRoot</NAME><VALUE>Absolute</VALUE></SETTING> + </SETTING> + <SETTING><NAME>StopAtTempBPOnLaunch</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>CacheSymbolics</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>TempBPFunctionName</NAME><VALUE>main</VALUE></SETTING> + <SETTING><NAME>TempBPType</NAME><VALUE>0</VALUE></SETTING> + + <!-- Settings for "Remote Debug" panel --> + <SETTING><NAME>Enabled</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>ConnectionName</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>DownloadPath</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>LaunchRemoteApp</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>RemoteAppPath</NAME><VALUE></VALUE></SETTING> + + <!-- Settings for "Auto-target" panel --> + <SETTING><NAME>OtherExecutables</NAME><VALUE></VALUE></SETTING> + + <!-- Settings for "Custom Keywords" panel --> + <SETTING><NAME>CustomColor1</NAME> + <SETTING><NAME>Red</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>Green</NAME><VALUE>32767</VALUE></SETTING> + <SETTING><NAME>Blue</NAME><VALUE>0</VALUE></SETTING> + </SETTING> + <SETTING><NAME>CustomColor2</NAME> + <SETTING><NAME>Red</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>Green</NAME><VALUE>32767</VALUE></SETTING> + <SETTING><NAME>Blue</NAME><VALUE>0</VALUE></SETTING> + </SETTING> + <SETTING><NAME>CustomColor3</NAME> + <SETTING><NAME>Red</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>Green</NAME><VALUE>32767</VALUE></SETTING> + <SETTING><NAME>Blue</NAME><VALUE>0</VALUE></SETTING> + </SETTING> + <SETTING><NAME>CustomColor4</NAME> + <SETTING><NAME>Red</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>Green</NAME><VALUE>32767</VALUE></SETTING> + <SETTING><NAME>Blue</NAME><VALUE>0</VALUE></SETTING> + </SETTING> + + <!-- Settings for "C/C++ Compiler" panel --> + <SETTING><NAME>MWFrontEnd_C_cplusplus</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWFrontEnd_C_checkprotos</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWFrontEnd_C_arm</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWFrontEnd_C_trigraphs</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWFrontEnd_C_onlystdkeywords</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWFrontEnd_C_enumsalwaysint</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWFrontEnd_C_mpwpointerstyle</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWFrontEnd_C_prefixname</NAME><VALUE>DBMDebug.Prefix</VALUE></SETTING> + <SETTING><NAME>MWFrontEnd_C_ansistrict</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWFrontEnd_C_mpwcnewline</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWFrontEnd_C_wchar_type</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWFrontEnd_C_enableexceptions</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWFrontEnd_C_dontreusestrings</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWFrontEnd_C_poolstrings</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWFrontEnd_C_dontinline</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWFrontEnd_C_useRTTI</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWFrontEnd_C_multibyteaware</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWFrontEnd_C_unsignedchars</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWFrontEnd_C_autoinline</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWFrontEnd_C_booltruefalse</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWFrontEnd_C_direct_to_som</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWFrontEnd_C_som_env_check</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWFrontEnd_C_alwaysinline</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWFrontEnd_C_inlinelevel</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWFrontEnd_C_ecplusplus</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWFrontEnd_C_objective_c</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWFrontEnd_C_defer_codegen</NAME><VALUE>0</VALUE></SETTING> + + <!-- Settings for "C/C++ Warnings" panel --> + <SETTING><NAME>MWWarning_C_warn_illpragma</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWWarning_C_warn_emptydecl</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWWarning_C_warn_possunwant</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWWarning_C_warn_unusedvar</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWWarning_C_warn_unusedarg</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWWarning_C_warn_extracomma</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWWarning_C_pedantic</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWWarning_C_warningerrors</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWWarning_C_warn_hidevirtual</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWWarning_C_warn_implicitconv</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWWarning_C_warn_notinlined</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWWarning_C_warn_structclass</NAME><VALUE>0</VALUE></SETTING> + + <!-- Settings for "FTP Panel" panel --> + <SETTING><NAME>MWFTP_Post_hostName</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWFTP_Post_username</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWFTP_Post_password</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWFTP_Post_remoteDir</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWFTP_Post_ftp_PathVersion</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWFTP_Post_ftp_PathType</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWFTP_Post_ftp_PathFormat</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWFTP_Post_ftp_tree</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWFTP_Post_uploadDir</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWFTP_Post_ftp_port</NAME><VALUE>21</VALUE></SETTING> + <SETTING><NAME>MWFTP_Post_SendBin</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWFTP_Post_ShouldLog</NAME><VALUE>1</VALUE></SETTING> + + <!-- Settings for "Java Command Line" panel --> + <SETTING><NAME>MWCommandLine_Java_clsName</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWCommandLine_Java_args</NAME><VALUE></VALUE></SETTING> + + <!-- Settings for "PJavaDebugging" panel --> + <SETTING><NAME>MWVJavaDebugging_Protocol</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWVJavaDebugging_JDKVersion</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWVJavaDebugging_TimeOut</NAME><VALUE>10</VALUE></SETTING> + <SETTING><NAME>MWVJavaDebugging_SupportSlowDevices</NAME><VALUE>false</VALUE></SETTING> + + <!-- Settings for "Java Language" panel --> + <SETTING><NAME>MWJava_Language_optimize</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>MWJava_Language_warnDeprecated</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>MWJava_Language_emitMap</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>MWJava_Language_strictFileNames</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>MWJava_Language_strictFileHierarchy</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>MWJava_Language_1_1_Compatible</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>MWJava_Language_emitHeaders</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWJava_Language_headerType</NAME><VALUE>JNINativeHeaders</VALUE></SETTING> + <SETTING><NAME>MWJava_Language_packageFilter</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWJava_Language_genComments</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>MWJava_Language_genHeaders</NAME><VALUE>false</VALUE></SETTING> + + <!-- Settings for "Java MRJAppBuilder" panel --> + <SETTING><NAME>MWJava_MRJAppBuilder_outFile</NAME><VALUE>MRJApplication</VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_merge</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_quitMenu</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_grow</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_stdoutType</NAME><VALUE>Console</VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_stderrType</NAME><VALUE>Console</VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_stdinType</NAME><VALUE>Console</VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_appIconPVersion</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_appIconPType</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_appIconPFormat</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_appIconPTree</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_appIconFile</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_splashScreenPVersion</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_splashScreenPType</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_splashScreenPFormat</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_splashScreenPTree</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_splashScreenPICTFile</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_aboutName</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_stdoutPVersion</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_stdoutPType</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_stdoutPFormat</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_stdoutPTree</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_stdoutFile</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_stdoutAppend</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_stderrPType</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_stderrPFormat</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_stderrPTree</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_stderrFile</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_stderrAppend</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_stdinPType</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_stdinPFormat</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_stdinPTree</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_stdinFile</NAME><VALUE></VALUE></SETTING> + + <!-- Settings for "Java Output" panel --> + <SETTING><NAME>MWJava_Output_outputtype</NAME><VALUE>JarFile</VALUE></SETTING> + <SETTING><NAME>MWJava_Output_outfile</NAME><VALUE>JavaClasses.jar</VALUE></SETTING> + <SETTING><NAME>MWJava_Output_ftype</NAME><VALUE>1514754080</VALUE></SETTING> + <SETTING><NAME>MWJava_Output_fcreator</NAME><VALUE>1297570384</VALUE></SETTING> + <SETTING><NAME>MWJava_Output_compress</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWJava_Output_genManifest</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWJava_Output_trunctype</NAME><VALUE>Front</VALUE></SETTING> + <SETTING><NAME>MWJava_Output_deleteClasses</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWJava_Output_consoleApp</NAME><VALUE>1</VALUE></SETTING> + + <!-- Settings for "Java Project" panel --> + <SETTING><NAME>MWJava_Proj_projtype</NAME><VALUE>Applet</VALUE></SETTING> + <SETTING><NAME>MWJava_Proj_mainClassName</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWJava_Proj_HTMLAppCreator</NAME><VALUE>1463898714</VALUE></SETTING> + <SETTING><NAME>MWJava_Proj_HTMLAppName</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWJava_Proj_PathVersion</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWJava_Proj_PathType</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWJava_Proj_PathFormat</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWJava_Proj_tree</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWJava_Proj_HTMLAppWin32Name</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWJava_Proj_compress</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWJava_Proj_useVM</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWJava_Proj_vmarguments</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWJava_Proj_vmName</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWJava_Proj_simPropFile</NAME><VALUE></VALUE></SETTING> + + <!-- Settings for "JavaDoc Project" panel --> + <SETTING><NAME>MWJavaDoc_Proj_Version</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWJavaDoc_Proj_Depricated</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWJavaDoc_Proj_Author</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWJavaDoc_Proj_Index</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWJavaDoc_Proj_Tree</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWJavaDoc_Proj_SunResolveToSame</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWJavaDoc_Proj_Shortnames</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWJavaDoc_Proj_Folder</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWJavaDoc_Proj_GenerateAPILinks</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWJavaDoc_Proj_scope</NAME><VALUE>Public</VALUE></SETTING> + <SETTING><NAME>MWJavaDoc_Proj_fcreator</NAME><VALUE>1297303877</VALUE></SETTING> + <SETTING><NAME>MWJavaDoc_Proj_encodingName</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWJavaDoc_Proj_decodingName</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWJavaDoc_Proj_javaPackagePath</NAME><VALUE>http://java.sun.com/products/jdk/1.1/docs/api/</VALUE></SETTING> + + <!-- Settings for "MacOS Merge Panel" panel --> + <SETTING><NAME>MWMerge_MacOS_projectType</NAME><VALUE>Application</VALUE></SETTING> + <SETTING><NAME>MWMerge_MacOS_outputName</NAME><VALUE>Merge Out</VALUE></SETTING> + <SETTING><NAME>MWMerge_MacOS_outputCreator</NAME><VALUE>????</VALUE></SETTING> + <SETTING><NAME>MWMerge_MacOS_outputType</NAME><VALUE>APPL</VALUE></SETTING> + <SETTING><NAME>MWMerge_MacOS_suppressWarning</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWMerge_MacOS_copyFragments</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWMerge_MacOS_copyResources</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWMerge_MacOS_flattenResource</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWMerge_MacOS_flatFileName</NAME><VALUE>a.rsrc</VALUE></SETTING> + <SETTING><NAME>MWMerge_MacOS_flatFileOutputPath</NAME> + <SETTING><NAME>Path</NAME><VALUE>:</VALUE></SETTING> + <SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING> + <SETTING><NAME>PathRoot</NAME><VALUE>Project</VALUE></SETTING> + </SETTING> + <SETTING><NAME>MWMerge_MacOS_skipResources</NAME> + <SETTING><VALUE>DLGX</VALUE></SETTING> + <SETTING><VALUE>ckid</VALUE></SETTING> + <SETTING><VALUE>Proj</VALUE></SETTING> + <SETTING><VALUE>WSPC</VALUE></SETTING> + </SETTING> + + <!-- Settings for "Output Flags" panel --> + <SETTING><NAME>FileLocked</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>ResourcesMapIsReadOnly</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>PrinterDriverIsMultiFinderCompatible</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>Invisible</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>HasBundle</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>NameLocked</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>Stationery</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>HasCustomIcon</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>Shared</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>HasBeenInited</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>Label</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>Comments</NAME><VALUE></VALUE></SETTING> + + <!-- Settings for "Packager Panel" panel --> + <SETTING><NAME>MWMacOSPackager_UsePackager</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWMacOSPackager_FolderToPackage</NAME> + <SETTING><NAME>Path</NAME><VALUE>:</VALUE></SETTING> + <SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING> + <SETTING><NAME>PathRoot</NAME><VALUE>Project</VALUE></SETTING> + </SETTING> + <SETTING><NAME>MWMacOSPackager_CreateClassicAlias</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWMacOSPackager_ClassicAliasMethod</NAME><VALUE>UseTargetOutput</VALUE></SETTING> + <SETTING><NAME>MWMacOSPackager_ClassicAliasPath</NAME> + <SETTING><NAME>Path</NAME><VALUE>:</VALUE></SETTING> + <SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING> + <SETTING><NAME>PathRoot</NAME><VALUE>Project</VALUE></SETTING> + </SETTING> + <SETTING><NAME>MWMacOSPackager_CreatePkgInfo</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWMacOSPackager_PkgCreatorType</NAME><VALUE>????</VALUE></SETTING> + <SETTING><NAME>MWMacOSPackager_PkgFileType</NAME><VALUE>APPL</VALUE></SETTING> + + <!-- Settings for "PPC CodeGen" panel --> + <SETTING><NAME>MWCodeGen_PPC_structalignment</NAME><VALUE>PPC</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_PPC_tracebacktables</NAME><VALUE>None</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_PPC_processor</NAME><VALUE>Generic</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_PPC_readonlystrings</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_PPC_tocdata</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_PPC_profiler</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_PPC_fpcontract</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_PPC_schedule</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_PPC_peephole</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_PPC_processorspecific</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_PPC_altivec</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_PPC_vectortocdata</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_PPC_vrsave</NAME><VALUE>0</VALUE></SETTING> + + <!-- Settings for "PPC CodeGen Mach-O" panel --> + <SETTING><NAME>MWCodeGen_MachO_structalignment</NAME><VALUE>PPC</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_MachO_tracebacktables</NAME><VALUE>None</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_MachO_processor</NAME><VALUE>Generic</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_MachO_readonlystrings</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_MachO_profiler</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_MachO_fpcontract</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_MachO_schedule</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_MachO_peephole</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_MachO_processorspecific</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_MachO_altivec</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_MachO_vrsave</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_MachO_common</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_MachO_implicit_templates</NAME><VALUE>1</VALUE></SETTING> + + <!-- Settings for "PPC Disassembler" panel --> + <SETTING><NAME>MWDisassembler_PPC_showcode</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWDisassembler_PPC_extended</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWDisassembler_PPC_mix</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWDisassembler_PPC_nohex</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWDisassembler_PPC_showdata</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWDisassembler_PPC_showexceptions</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWDisassembler_PPC_showsym</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWDisassembler_PPC_shownames</NAME><VALUE>1</VALUE></SETTING> + + <!-- Settings for "PPC Global Optimizer" panel --> + <SETTING><NAME>GlobalOptimizer_PPC_optimizationlevel</NAME><VALUE>Level0</VALUE></SETTING> + <SETTING><NAME>GlobalOptimizer_PPC_optfor</NAME><VALUE>Speed</VALUE></SETTING> + + <!-- Settings for "PPC Linker" panel --> + <SETTING><NAME>MWLinker_PPC_linksym</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWLinker_PPC_symfullpath</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWLinker_PPC_linkmap</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWLinker_PPC_nolinkwarnings</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWLinker_PPC_dontdeadstripinitcode</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWLinker_PPC_permitmultdefs</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWLinker_PPC_linkmode</NAME><VALUE>Fast</VALUE></SETTING> + <SETTING><NAME>MWLinker_PPC_initname</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWLinker_PPC_mainname</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWLinker_PPC_termname</NAME><VALUE></VALUE></SETTING> + + <!-- Settings for "PPC Mach-O Linker" panel --> + <SETTING><NAME>MWLinker_MachO_exports</NAME><VALUE>None</VALUE></SETTING> + <SETTING><NAME>MWLinker_MachO_mainname</NAME><VALUE>start</VALUE></SETTING> + <SETTING><NAME>MWLinker_MachO_currentversion</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWLinker_MachO_compatibleversion</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWLinker_MachO_symfullpath</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWLinker_MachO_supresswarnings</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWLinker_MachO_multisymerror</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWLinker_MachO_prebind</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWLinker_MachO_deadstrip</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWLinker_MachO_objectivecsemantics</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWLinker_MachO_whichfileloaded</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWLinker_MachO_whyfileloaded</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWLinker_MachO_readonlyrelocs</NAME><VALUE>Errors</VALUE></SETTING> + <SETTING><NAME>MWLinker_MachO_undefinedsymbols</NAME><VALUE>Errors</VALUE></SETTING> + <SETTING><NAME>MWLinker_MachO_twolevelnamespace</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWLinker_MachO_stripdebugsymbols</NAME><VALUE>0</VALUE></SETTING> + + <!-- Settings for "PPC Mach-O Target" panel --> + <SETTING><NAME>MWProject_MachO_type</NAME><VALUE>Executable</VALUE></SETTING> + <SETTING><NAME>MWProject_MachO_outfile</NAME><VALUE>a.exe</VALUE></SETTING> + <SETTING><NAME>MWProject_MachO_filecreator</NAME><VALUE>????</VALUE></SETTING> + <SETTING><NAME>MWProject_MachO_filetype</NAME><VALUE>MEXE</VALUE></SETTING> + <SETTING><NAME>MWProject_MachO_stacksize</NAME><VALUE>64</VALUE></SETTING> + <SETTING><NAME>MWProject_MachO_stackaddress</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWProject_MachO_flatrsrc</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWProject_MachO_flatrsrcfilename</NAME><VALUE>a.rsrc</VALUE></SETTING> + <SETTING><NAME>MWProject_MachO_flatrsrcoutputdir</NAME> + <SETTING><NAME>Path</NAME><VALUE>:</VALUE></SETTING> + <SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING> + <SETTING><NAME>PathRoot</NAME><VALUE>Project</VALUE></SETTING> + </SETTING> + <SETTING><NAME>MWProject_MachO_installpath</NAME><VALUE>./</VALUE></SETTING> + + <!-- Settings for "PPC PEF" panel --> + <SETTING><NAME>MWPEF_exports</NAME><VALUE>Pragma</VALUE></SETTING> + <SETTING><NAME>MWPEF_libfolder</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWPEF_sortcode</NAME><VALUE>None</VALUE></SETTING> + <SETTING><NAME>MWPEF_expandbss</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWPEF_sharedata</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWPEF_olddefversion</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWPEF_oldimpversion</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWPEF_currentversion</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWPEF_fragmentname</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWPEF_collapsereloads</NAME><VALUE>0</VALUE></SETTING> + + <!-- Settings for "PPC Project" panel --> + <SETTING><NAME>MWProject_PPC_type</NAME><VALUE>Library</VALUE></SETTING> + <SETTING><NAME>MWProject_PPC_outfile</NAME><VALUE>DBMDebug.o</VALUE></SETTING> + <SETTING><NAME>MWProject_PPC_filecreator</NAME><VALUE>????</VALUE></SETTING> + <SETTING><NAME>MWProject_PPC_filetype</NAME><VALUE>????</VALUE></SETTING> + <SETTING><NAME>MWProject_PPC_size</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWProject_PPC_minsize</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWProject_PPC_stacksize</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWProject_PPC_flags</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWProject_PPC_symfilename</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWProject_PPC_rsrcname</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWProject_PPC_rsrcheader</NAME><VALUE>Native</VALUE></SETTING> + <SETTING><NAME>MWProject_PPC_rsrctype</NAME><VALUE>????</VALUE></SETTING> + <SETTING><NAME>MWProject_PPC_rsrcid</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWProject_PPC_rsrcflags</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWProject_PPC_rsrcstore</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWProject_PPC_rsrcmerge</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWProject_PPC_flatrsrc</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWProject_PPC_flatrsrcoutputdir</NAME> + <SETTING><NAME>Path</NAME><VALUE>:</VALUE></SETTING> + <SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING> + <SETTING><NAME>PathRoot</NAME><VALUE>Project</VALUE></SETTING> + </SETTING> + <SETTING><NAME>MWProject_PPC_flatrsrcfilename</NAME><VALUE></VALUE></SETTING> + + <!-- Settings for "PPCAsm Panel" panel --> + <SETTING><NAME>MWAssembler_PPC_auxheader</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWAssembler_PPC_symmode</NAME><VALUE>Mac</VALUE></SETTING> + <SETTING><NAME>MWAssembler_PPC_dialect</NAME><VALUE>PPC</VALUE></SETTING> + <SETTING><NAME>MWAssembler_PPC_prefixfile</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWAssembler_PPC_typecheck</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWAssembler_PPC_warnings</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWAssembler_PPC_casesensitive</NAME><VALUE>0</VALUE></SETTING> + + <!-- Settings for "Rez Compiler" panel --> + <SETTING><NAME>MWRez_Language_maxwidth</NAME><VALUE>80</VALUE></SETTING> + <SETTING><NAME>MWRez_Language_script</NAME><VALUE>Roman</VALUE></SETTING> + <SETTING><NAME>MWRez_Language_alignment</NAME><VALUE>Align1</VALUE></SETTING> + <SETTING><NAME>MWRez_Language_filtermode</NAME><VALUE>FilterSkip</VALUE></SETTING> + <SETTING><NAME>MWRez_Language_suppresswarnings</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWRez_Language_escapecontrolchars</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWRez_Language_prefixname</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWRez_Language_filteredtypes</NAME><VALUE>'CODE' 'DATA' 'PICT'</VALUE></SETTING> + + <!-- Settings for "WinRC Compiler" panel --> + <SETTING><NAME>MWWinRC_prefixname</NAME><VALUE></VALUE></SETTING> + + <!-- Settings for "x86 CodeGen" panel --> + <SETTING><NAME>MWCodeGen_X86_processor</NAME><VALUE>Generic</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_X86_alignment</NAME><VALUE>bytes8</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_X86_exceptions</NAME><VALUE>ZeroOverhead</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_X86_extinst_mmx</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_X86_extinst_3dnow</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_X86_use_mmx_3dnow_convention</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_X86_machinecodelisting</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_X86_intrinsics</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_X86_syminfo</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_X86_codeviewinfo</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_X86_extinst_cmov_fcomi</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_X86_extinst_sse</NAME><VALUE>0</VALUE></SETTING> + + <!-- Settings for "x86 Disassembler" panel --> + <SETTING><NAME>PDisasmX86_showHeaders</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>PDisasmX86_showSymTab</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>PDisasmX86_showCode</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>PDisasmX86_showSource</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>PDisasmX86_showHex</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>PDisasmX86_showRelocation</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>PDisasmX86_showComments</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>PDisasmX86_showDebug</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>PDisasmX86_showExceptions</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>PDisasmX86_showData</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>PDisasmX86_showRaw</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>PDisasmX86_verbose</NAME><VALUE>false</VALUE></SETTING> + + <!-- Settings for "x86 Exceptions Panel" panel --> + <SETTING><NAME>MWDebugger_X86_Exceptions</NAME> + <SETTING><VALUE>0</VALUE></SETTING> + <SETTING><VALUE>0</VALUE></SETTING> + <SETTING><VALUE>0</VALUE></SETTING> + <SETTING><VALUE>0</VALUE></SETTING> + <SETTING><VALUE>0</VALUE></SETTING> + <SETTING><VALUE>0</VALUE></SETTING> + <SETTING><VALUE>0</VALUE></SETTING> + <SETTING><VALUE>0</VALUE></SETTING> + <SETTING><VALUE>0</VALUE></SETTING> + <SETTING><VALUE>0</VALUE></SETTING> + <SETTING><VALUE>0</VALUE></SETTING> + <SETTING><VALUE>0</VALUE></SETTING> + <SETTING><VALUE>0</VALUE></SETTING> + <SETTING><VALUE>0</VALUE></SETTING> + <SETTING><VALUE>0</VALUE></SETTING> + <SETTING><VALUE>0</VALUE></SETTING> + <SETTING><VALUE>0</VALUE></SETTING> + <SETTING><VALUE>0</VALUE></SETTING> + <SETTING><VALUE>0</VALUE></SETTING> + <SETTING><VALUE>0</VALUE></SETTING> + <SETTING><VALUE>0</VALUE></SETTING> + <SETTING><VALUE>0</VALUE></SETTING> + <SETTING><VALUE>0</VALUE></SETTING> + <SETTING><VALUE>0</VALUE></SETTING> + </SETTING> + + <!-- Settings for "x86 Global Optimizer" panel --> + <SETTING><NAME>GlobalOptimizer_X86_optimizationlevel</NAME><VALUE>Level0</VALUE></SETTING> + <SETTING><NAME>GlobalOptimizer_X86_optfor</NAME><VALUE>Speed</VALUE></SETTING> + + <!-- Settings for "x86 Linker" panel --> + <SETTING><NAME>MWLinker_X86_entrypointusage</NAME><VALUE>Default</VALUE></SETTING> + <SETTING><NAME>MWLinker_X86_entrypoint</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWLinker_X86_subsystem</NAME><VALUE>WinGUI</VALUE></SETTING> + <SETTING><NAME>MWLinker_X86_subsysmajorid</NAME><VALUE>4</VALUE></SETTING> + <SETTING><NAME>MWLinker_X86_subsysminorid</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWLinker_X86_usrmajorid</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWLinker_X86_usrminorid</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWLinker_X86_commandfile</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWLinker_X86_generatemap</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWLinker_X86_linksym</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWLinker_X86_linkCV</NAME><VALUE>1</VALUE></SETTING> + + <!-- Settings for "x86 Project" panel --> + <SETTING><NAME>MWProject_X86_type</NAME><VALUE>Application</VALUE></SETTING> + <SETTING><NAME>MWProject_X86_outfile</NAME><VALUE>noname.exe</VALUE></SETTING> + <SETTING><NAME>MWProject_X86_baseaddress</NAME><VALUE>4194304</VALUE></SETTING> + <SETTING><NAME>MWProject_X86_maxstacksize</NAME><VALUE>1024</VALUE></SETTING> + <SETTING><NAME>MWProject_X86_minstacksize</NAME><VALUE>4</VALUE></SETTING> + <SETTING><NAME>MWProject_X86_size</NAME><VALUE>1024</VALUE></SETTING> + <SETTING><NAME>MWProject_X86_minsize</NAME><VALUE>4</VALUE></SETTING> + <SETTING><NAME>MWProject_X86_importlib</NAME><VALUE></VALUE></SETTING> + <PANELDATA><NAME>xpidl Settings</NAME><VALUE> + 0001000101000000000000000000000000000000000000000000000000000000 + 0000000000000000 + </VALUE></PANELDATA> + </SETTINGLIST> + <FILELIST> + <FILE> + <PATHTYPE>Name</PATHTYPE> + <PATH>db.c</PATH> + <PATHFORMAT>MacOS</PATHFORMAT> + <FILEKIND>Text</FILEKIND> + <FILEFLAGS>Debug</FILEFLAGS> + </FILE> + <FILE> + <PATHTYPE>Name</PATHTYPE> + <PATH>hash.c</PATH> + <PATHFORMAT>MacOS</PATHFORMAT> + <FILEKIND>Text</FILEKIND> + <FILEFLAGS>Debug</FILEFLAGS> + </FILE> + <FILE> + <PATHTYPE>Name</PATHTYPE> + <PATH>hash_buf.c</PATH> + <PATHFORMAT>MacOS</PATHFORMAT> + <FILEKIND>Text</FILEKIND> + <FILEFLAGS>Debug</FILEFLAGS> + </FILE> + <FILE> + <PATHTYPE>Name</PATHTYPE> + <PATH>hsearch.c</PATH> + <PATHFORMAT>MacOS</PATHFORMAT> + <FILEKIND>Text</FILEKIND> + <FILEFLAGS>Debug</FILEFLAGS> + </FILE> + <FILE> + <PATHTYPE>Name</PATHTYPE> + <PATH>h_bigkey.c</PATH> + <PATHFORMAT>MacOS</PATHFORMAT> + <FILEKIND>Text</FILEKIND> + <FILEFLAGS>Debug</FILEFLAGS> + </FILE> + <FILE> + <PATHTYPE>Name</PATHTYPE> + <PATH>h_func.c</PATH> + <PATHFORMAT>MacOS</PATHFORMAT> + <FILEKIND>Text</FILEKIND> + <FILEFLAGS>Debug</FILEFLAGS> + </FILE> + <FILE> + <PATHTYPE>Name</PATHTYPE> + <PATH>h_log2.c</PATH> + <PATHFORMAT>MacOS</PATHFORMAT> + <FILEKIND>Text</FILEKIND> + <FILEFLAGS>Debug</FILEFLAGS> + </FILE> + <FILE> + <PATHTYPE>Name</PATHTYPE> + <PATH>h_page.c</PATH> + <PATHFORMAT>MacOS</PATHFORMAT> + <FILEKIND>Text</FILEKIND> + <FILEFLAGS>Debug</FILEFLAGS> + </FILE> + <FILE> + <PATHTYPE>Name</PATHTYPE> + <PATH>macstubs.c</PATH> + <PATHFORMAT>MacOS</PATHFORMAT> + <FILEKIND>Text</FILEKIND> + <FILEFLAGS>Debug</FILEFLAGS> + </FILE> + </FILELIST> + <LINKORDER> + <FILEREF> + <PATHTYPE>Name</PATHTYPE> + <PATH>db.c</PATH> + <PATHFORMAT>MacOS</PATHFORMAT> + </FILEREF> + <FILEREF> + <PATHTYPE>Name</PATHTYPE> + <PATH>hash.c</PATH> + <PATHFORMAT>MacOS</PATHFORMAT> + </FILEREF> + <FILEREF> + <PATHTYPE>Name</PATHTYPE> + <PATH>hash_buf.c</PATH> + <PATHFORMAT>MacOS</PATHFORMAT> + </FILEREF> + <FILEREF> + <PATHTYPE>Name</PATHTYPE> + <PATH>hsearch.c</PATH> + <PATHFORMAT>MacOS</PATHFORMAT> + </FILEREF> + <FILEREF> + <PATHTYPE>Name</PATHTYPE> + <PATH>h_bigkey.c</PATH> + <PATHFORMAT>MacOS</PATHFORMAT> + </FILEREF> + <FILEREF> + <PATHTYPE>Name</PATHTYPE> + <PATH>h_func.c</PATH> + <PATHFORMAT>MacOS</PATHFORMAT> + </FILEREF> + <FILEREF> + <PATHTYPE>Name</PATHTYPE> + <PATH>h_log2.c</PATH> + <PATHFORMAT>MacOS</PATHFORMAT> + </FILEREF> + <FILEREF> + <PATHTYPE>Name</PATHTYPE> + <PATH>h_page.c</PATH> + <PATHFORMAT>MacOS</PATHFORMAT> + </FILEREF> + <FILEREF> + <PATHTYPE>Name</PATHTYPE> + <PATH>macstubs.c</PATH> + <PATHFORMAT>MacOS</PATHFORMAT> + </FILEREF> + </LINKORDER> + </TARGET> + </TARGETLIST> + + <TARGETORDER> + <ORDEREDTARGET><NAME>DBM.shlb</NAME></ORDEREDTARGET> + <ORDEREDTARGET><NAME>DBMDebug.shlb</NAME></ORDEREDTARGET> + <ORDEREDTARGET><NAME>DBM.o</NAME></ORDEREDTARGET> + <ORDEREDTARGET><NAME>DBMDebug.o</NAME></ORDEREDTARGET> + </TARGETORDER> + + <GROUPLIST> + <GROUP><NAME>dbm</NAME> + <FILEREF> + <TARGETNAME>DBM.shlb</TARGETNAME> + <PATHTYPE>Name</PATHTYPE> + <PATH>db.c</PATH> + <PATHFORMAT>MacOS</PATHFORMAT> + </FILEREF> + <FILEREF> + <TARGETNAME>DBM.shlb</TARGETNAME> + <PATHTYPE>Name</PATHTYPE> + <PATH>h_bigkey.c</PATH> + <PATHFORMAT>MacOS</PATHFORMAT> + </FILEREF> + <FILEREF> + <TARGETNAME>DBM.shlb</TARGETNAME> + <PATHTYPE>Name</PATHTYPE> + <PATH>h_func.c</PATH> + <PATHFORMAT>MacOS</PATHFORMAT> + </FILEREF> + <FILEREF> + <TARGETNAME>DBM.shlb</TARGETNAME> + <PATHTYPE>Name</PATHTYPE> + <PATH>h_log2.c</PATH> + <PATHFORMAT>MacOS</PATHFORMAT> + </FILEREF> + <FILEREF> + <TARGETNAME>DBM.shlb</TARGETNAME> + <PATHTYPE>Name</PATHTYPE> + <PATH>h_page.c</PATH> + <PATHFORMAT>MacOS</PATHFORMAT> + </FILEREF> + <FILEREF> + <TARGETNAME>DBM.shlb</TARGETNAME> + <PATHTYPE>Name</PATHTYPE> + <PATH>hash.c</PATH> + <PATHFORMAT>MacOS</PATHFORMAT> + </FILEREF> + <FILEREF> + <TARGETNAME>DBM.shlb</TARGETNAME> + <PATHTYPE>Name</PATHTYPE> + <PATH>hash_buf.c</PATH> + <PATHFORMAT>MacOS</PATHFORMAT> + </FILEREF> + <FILEREF> + <TARGETNAME>DBM.shlb</TARGETNAME> + <PATHTYPE>Name</PATHTYPE> + <PATH>hsearch.c</PATH> + <PATHFORMAT>MacOS</PATHFORMAT> + </FILEREF> + <FILEREF> + <TARGETNAME>DBM.shlb</TARGETNAME> + <PATHTYPE>Name</PATHTYPE> + <PATH>macstubs.c</PATH> + <PATHFORMAT>MacOS</PATHFORMAT> + </FILEREF> + </GROUP> + <GROUP><NAME>Netscape Libraries</NAME> + <FILEREF> + <TARGETNAME>DBM.shlb</TARGETNAME> + <PATHTYPE>Name</PATHTYPE> + <PATH>NSStdLibStubs</PATH> + <PATHFORMAT>MacOS</PATHFORMAT> + </FILEREF> + <GROUP><NAME>Optimized</NAME> + <FILEREF> + <TARGETNAME>DBM.shlb</TARGETNAME> + <PATHTYPE>Name</PATHTYPE> + <PATH>NSRuntime.shlb</PATH> + <PATHFORMAT>MacOS</PATHFORMAT> + </FILEREF> + <FILEREF> + <TARGETNAME>DBM.shlb</TARGETNAME> + <PATHTYPE>Name</PATHTYPE> + <PATH>NSPR20.shlb</PATH> + <PATHFORMAT>MacOS</PATHFORMAT> + </FILEREF> + <FILEREF> + <TARGETNAME>DBM.shlb</TARGETNAME> + <PATHTYPE>Name</PATHTYPE> + <PATH>MoreFiles.shlb</PATH> + <PATHFORMAT>MacOS</PATHFORMAT> + </FILEREF> + </GROUP> + <GROUP><NAME>Debug</NAME> + <FILEREF> + <TARGETNAME>DBMDebug.shlb</TARGETNAME> + <PATHTYPE>Name</PATHTYPE> + <PATH>NSRuntimeDebug.shlb</PATH> + <PATHFORMAT>MacOS</PATHFORMAT> + </FILEREF> + <FILEREF> + <TARGETNAME>DBMDebug.shlb</TARGETNAME> + <PATHTYPE>Name</PATHTYPE> + <PATH>NSPR20Debug.shlb</PATH> + <PATHFORMAT>MacOS</PATHFORMAT> + </FILEREF> + <FILEREF> + <TARGETNAME>DBMDebug.shlb</TARGETNAME> + <PATHTYPE>Name</PATHTYPE> + <PATH>MoreFilesDebug.shlb</PATH> + <PATHFORMAT>MacOS</PATHFORMAT> + </FILEREF> + </GROUP> + </GROUP> + <GROUP><NAME>Apple/Other Libs</NAME> + <FILEREF> + <TARGETNAME>DBM.shlb</TARGETNAME> + <PATHTYPE>Name</PATHTYPE> + <PATH>MSL_ShLibRuntime_PPC.Lib</PATH> + <PATHFORMAT>MacOS</PATHFORMAT> + </FILEREF> + <FILEREF> + <TARGETNAME>DBM.shlb</TARGETNAME> + <PATHTYPE>Name</PATHTYPE> + <PATH>InterfacesStubs</PATH> + <PATHFORMAT>MacOS</PATHFORMAT> + </FILEREF> + </GROUP> + </GROUPLIST> + +</PROJECT> diff --git a/dbm/macbuild/DBMConfig.h b/dbm/macbuild/DBMConfig.h new file mode 100644 index 000000000..e7ec911c6 --- /dev/null +++ b/dbm/macbuild/DBMConfig.h @@ -0,0 +1,23 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- + * + * The contents of this file are subject to the Netscape Public + * License Version 1.1 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.mozilla.org/NPL/ + * + * Software distributed under the License is distributed on an "AS + * IS" basis, WITHOUT WARRANTY OF 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 Netscape + * Communications Corporation. Portions created by Netscape are + * Copyright (C) 1998 Netscape Communications Corporation. All + * Rights Reserved. + * + * Contributor(s): + */ + +#define __DBINTERFACE_PRIVATE 1 diff --git a/dbm/macbuild/DBMDebug.Prefix b/dbm/macbuild/DBMDebug.Prefix new file mode 100644 index 000000000..7d40bdad3 --- /dev/null +++ b/dbm/macbuild/DBMDebug.Prefix @@ -0,0 +1,32 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- + * + * The contents of this file are subject to the Netscape Public + * License Version 1.1 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.mozilla.org/NPL/ + * + * Software distributed under the License is distributed on an "AS + * IS" basis, WITHOUT WARRANTY OF 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 Netscape + * Communications Corporation. Portions created by Netscape are + * Copyright (C) 1998 Netscape Communications Corporation. All + * Rights Reserved. + * + * Contributor(s): + */ + +// +// DBMDebug.Prefix +// +// Global prefix file for the debug DBM project. +// +// + +#include "MacPrefix_debug.h" +#include "DBMConfig.h" + diff --git a/dbm/macbuild/macstubs.c b/dbm/macbuild/macstubs.c new file mode 100644 index 000000000..bbfe69a54 --- /dev/null +++ b/dbm/macbuild/macstubs.c @@ -0,0 +1,8 @@ + +// Hack to define a never-called routine from libdbm +#include "mcom_db.h" + +int mkstemp(const char* /*path*/) +{ + return -1; +} diff --git a/dbm/makefile.win b/dbm/makefile.win new file mode 100644 index 000000000..27470574e --- /dev/null +++ b/dbm/makefile.win @@ -0,0 +1,38 @@ +# The contents of this file are subject to the Netscape Public +# License Version 1.1 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy of +# the License at http://www.mozilla.org/NPL/ +# +# Software distributed under the License is distributed on an "AS +# IS" basis, WITHOUT WARRANTY OF 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 Netscape +# Communications Corporation. Portions created by Netscape are +# Copyright (C) 1998 Netscape Communications Corporation. All +# Rights Reserved. +# +# Contributor(s): + +DEPTH=.. + +#//------------------------------------------------------------------------ +#// +#// Specify any "command" targets. (ie. DIRS, INSTALL_FILES, ...) +#// (these must come before the common makefiles are included) +#// +#// DIRS - There are subdirectories to process +#// +#//------------------------------------------------------------------------ +DIRS = include src + +#//------------------------------------------------------------------------ +#// +#// Include the common makefile rules +#// +#//------------------------------------------------------------------------ +include <$(DEPTH)\config\rules.mak> + diff --git a/dbm/src/.cvsignore b/dbm/src/.cvsignore new file mode 100644 index 000000000..f3c7a7c5d --- /dev/null +++ b/dbm/src/.cvsignore @@ -0,0 +1 @@ +Makefile diff --git a/dbm/src/Makefile.in b/dbm/src/Makefile.in new file mode 100644 index 000000000..d65e0f8e7 --- /dev/null +++ b/dbm/src/Makefile.in @@ -0,0 +1,77 @@ +# +# The contents of this file are subject to the Netscape Public +# License Version 1.1 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy of +# the License at http://www.mozilla.org/NPL/ +# +# Software distributed under the License is distributed on an "AS +# IS" basis, WITHOUT WARRANTY OF 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 Netscape +# Communications Corporation. Portions created by Netscape are +# Copyright (C) 1998 Netscape Communications Corporation. All +# Rights Reserved. +# +# Contributor(s): +# + +DEPTH = ../.. +topsrcdir = @top_srcdir@ +srcdir = @srcdir@ +VPATH = @srcdir@ + +include $(DEPTH)/config/autoconf.mk + +LIBRARY_NAME = mozdbm_s +LIB_IS_C_ONLY = 1 + +ifeq ($(OS_ARCH),WINNT) +LIBRARY_NAME = dbm$(MOZ_BITS) +endif + +CSRCS = \ + db.c \ + h_bigkey.c \ + h_func.c \ + h_log2.c \ + h_page.c \ + hash.c \ + hash_buf.c \ + hsearch.c \ + mktemp.c \ + ndbm.c \ + strerror.c \ + nsres.c \ + $(NULL) + +ifeq ($(OS_ARCH),WINNT) +CSRCS += memmove.c snprintf.c +else +ifeq (,$(filter -DHAVE_MEMMOVE=1,$(DEFS))) +CSRCS += memmove.c +endif + +ifeq (,$(filter -DHAVE_SNPRINTF=1,$(DEFS))) +CSRCS += snprintf.c +endif +endif # WINNT + +LOCAL_INCLUDES = -I$(srcdir)/../include + +FORCE_STATIC_LIB = 1 + +include $(topsrcdir)/config/rules.mk + +DEFINES += -DMEMMOVE -D__DBINTERFACE_PRIVATE $(SECURITY_FLAG) +ifeq ($(OS_ARCH), Linux) +DEFINES += -D_BSD_SOURCE +endif + +ifeq ($(OS_ARCH),AIX) +OS_LIBS += -lc_r +endif + diff --git a/dbm/src/Makefile.win b/dbm/src/Makefile.win new file mode 100644 index 000000000..060a8c48b --- /dev/null +++ b/dbm/src/Makefile.win @@ -0,0 +1,96 @@ +# The contents of this file are subject to the Netscape Public +# License Version 1.1 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy of +# the License at http://www.mozilla.org/NPL/ +# +# Software distributed under the License is distributed on an "AS +# IS" basis, WITHOUT WARRANTY OF 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 Netscape +# Communications Corporation. Portions created by Netscape are +# Copyright (C) 1998 Netscape Communications Corporation. All +# Rights Reserved. +# +# Contributor(s): + + +#//------------------------------------------------------------------------ +#// +#// Makefile to build the cert library +#// +#//------------------------------------------------------------------------ + +!if "$(MOZ_BITS)" == "16" +!ifndef MOZ_DEBUG +OPTIMIZER=-Os -UDEBUG -DNDEBUG +!endif +!endif + +#//------------------------------------------------------------------------ +#// +#// Specify the depth of the current directory relative to the +#// root of NS +#// +#//------------------------------------------------------------------------ +DEPTH= ..\.. + +!ifndef MAKE_OBJ_TYPE +MAKE_OBJ_TYPE=EXE +!endif + +#//------------------------------------------------------------------------ +#// +#// Define any Public Make Variables here: (ie. PDFFILE, MAPFILE, ...) +#// +#//------------------------------------------------------------------------ +LIBNAME=dbm$(MOZ_BITS) +PDBFILE=$(LIBNAME).pdb + +#//------------------------------------------------------------------------ +#// +#// Define the files necessary to build the target (ie. OBJS) +#// +#//------------------------------------------------------------------------ +OBJS= \ + .\$(OBJDIR)\db.obj \ + .\$(OBJDIR)\h_bigkey.obj \ + .\$(OBJDIR)\h_func.obj \ + .\$(OBJDIR)\h_log2.obj \ + .\$(OBJDIR)\h_page.obj \ + .\$(OBJDIR)\hash.obj \ + .\$(OBJDIR)\hash_buf.obj \ + .\$(OBJDIR)\hsearch.obj \ + .\$(OBJDIR)\memmove.obj \ + .\$(OBJDIR)\mktemp.obj \ + .\$(OBJDIR)\ndbm.obj \ + .\$(OBJDIR)\snprintf.obj \ + .\$(OBJDIR)\strerror.obj \ + .\$(OBJDIR)\nsres.obj \ + $(NULL) + +#//------------------------------------------------------------------------ +#// +#// Define any Public Targets here (ie. PROGRAM, LIBRARY, DLL, ...) +#// (these must be defined before the common makefiles are included) +#// +#//------------------------------------------------------------------------ +LIBRARY = .\$(OBJDIR)\$(LIBNAME).lib +LINCS = -I..\include + +#//------------------------------------------------------------------------ +#// +#// Include the common makefile rules +#// +#//------------------------------------------------------------------------ +include <$(DEPTH)/config/rules.mak> + +CFLAGS = $(CFLAGS) -DMOZILLA_CLIENT -D__DBINTERFACE_PRIVATE + +install:: $(LIBRARY) + $(MAKE_INSTALL) $(LIBRARY) $(DIST)\lib + + diff --git a/dbm/src/db.c b/dbm/src/db.c new file mode 100644 index 000000000..e4b1fff8f --- /dev/null +++ b/dbm/src/db.c @@ -0,0 +1,144 @@ +/*- + * Copyright (c) 1991, 1993 + * The Regents of the University of California. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by the University of + * California, Berkeley and its contributors. + * 4. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#if defined(LIBC_SCCS) && !defined(lint) +static char sccsid[] = "@(#)db.c 8.4 (Berkeley) 2/21/94"; +#endif /* LIBC_SCCS and not lint */ + +#include "watcomfx.h" + +#ifndef __DBINTERFACE_PRIVATE +#define __DBINTERFACE_PRIVATE +#endif +#ifdef macintosh +#include <unix.h> +#else +#include <sys/types.h> +#endif + +#include <errno.h> +#include <fcntl.h> +#include <stddef.h> +#include <stdio.h> + +#include "mcom_db.h" + +/* a global flag that locks closed all databases */ +int all_databases_locked_closed = 0; + +/* set or unset a global lock flag to disable the + * opening of any DBM file + */ +void +dbSetOrClearDBLock(DBLockFlagEnum type) +{ + if(type == LockOutDatabase) + all_databases_locked_closed = 1; + else + all_databases_locked_closed = 0; +} + +#if defined(__WATCOMC__) || defined(__WATCOM_CPLUSPLUS__) +DB * +#else +PR_IMPLEMENT(DB *) +#endif +dbopen(const char *fname, int flags,int mode, DBTYPE type, const void *openinfo) +{ + + /* lock out all file databases. Let in-memory databases through + */ + if(all_databases_locked_closed && fname) + { + errno = EINVAL; + return(NULL); + } + +#define DB_FLAGS (DB_LOCK | DB_SHMEM | DB_TXN) + + +#if 0 /* most systems dont have EXLOCK and SHLOCK */ +#define USE_OPEN_FLAGS \ + (O_CREAT | O_EXCL | O_EXLOCK | O_NONBLOCK | O_RDONLY | \ + O_RDWR | O_SHLOCK | O_TRUNC) +#else +#define USE_OPEN_FLAGS \ + (O_CREAT | O_EXCL | O_RDONLY | \ + O_RDWR | O_TRUNC) +#endif + + if ((flags & ~(USE_OPEN_FLAGS | DB_FLAGS)) == 0) + switch (type) { +/* we don't need btree and recno right now */ +#if 0 + case DB_BTREE: + return (__bt_open(fname, flags & USE_OPEN_FLAGS, + mode, openinfo, flags & DB_FLAGS)); + case DB_RECNO: + return (__rec_open(fname, flags & USE_OPEN_FLAGS, + mode, openinfo, flags & DB_FLAGS)); +#endif + + case DB_HASH: + return (__hash_open(fname, flags & USE_OPEN_FLAGS, + mode, (const HASHINFO *)openinfo, flags & DB_FLAGS)); + default: + break; + } + errno = EINVAL; + return (NULL); +} + +static int +__dberr() +{ + return (RET_ERROR); +} + +/* + * __DBPANIC -- Stop. + * + * Parameters: + * dbp: pointer to the DB structure. + */ +void +__dbpanic(DB *dbp) +{ + /* The only thing that can succeed is a close. */ + dbp->del = (int (*)(const struct __db *, const DBT *, uint))__dberr; + dbp->fd = (int (*)(const struct __db *))__dberr; + dbp->get = (int (*)(const struct __db *, const DBT *, DBT *, uint))__dberr; + dbp->put = (int (*)(const struct __db *, DBT *, const DBT *, uint))__dberr; + dbp->seq = (int (*)(const struct __db *, DBT *, DBT *, uint))__dberr; + dbp->sync = (int (*)(const struct __db *, uint))__dberr; +} diff --git a/dbm/src/h_bigkey.c b/dbm/src/h_bigkey.c new file mode 100644 index 000000000..855f10725 --- /dev/null +++ b/dbm/src/h_bigkey.c @@ -0,0 +1,713 @@ +/*- + * Copyright (c) 1990, 1993, 1994 + * The Regents of the University of California. All rights reserved. + * + * This code is derived from software contributed to Berkeley by + * Margo Seltzer. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by the University of + * California, Berkeley and its contributors. + * 4. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#if defined(LIBC_SCCS) && !defined(lint) +static char sccsid[] = "@(#)hash_bigkey.c 8.3 (Berkeley) 5/31/94"; +#endif /* LIBC_SCCS and not lint */ + +#include "watcomfx.h" + +/* + * PACKAGE: hash + * DESCRIPTION: + * Big key/data handling for the hashing package. + * + * ROUTINES: + * External + * __big_keydata + * __big_split + * __big_insert + * __big_return + * __big_delete + * __find_last_page + * Internal + * collect_key + * collect_data + */ + +#if !defined(_WIN32) && !defined(_WINDOWS) && !defined(macintosh) && !defined(XP_OS2_VACPP) +#include <sys/param.h> +#endif + +#include <errno.h> +#include <stdio.h> +#include <stdlib.h> +#include <string.h> + +#ifdef DEBUG +#include <assert.h> +#endif + +#include "mcom_db.h" +#include "hash.h" +#include "page.h" +/* #include "extern.h" */ + +static int collect_key __P((HTAB *, BUFHEAD *, int, DBT *, int)); +static int collect_data __P((HTAB *, BUFHEAD *, int, int)); + +/* + * Big_insert + * + * You need to do an insert and the key/data pair is too big + * + * Returns: + * 0 ==> OK + *-1 ==> ERROR + */ +extern int +__big_insert(HTAB *hashp, BUFHEAD *bufp, const DBT *key, const DBT *val) +{ + register uint16 *p; + uint key_size, n, val_size; + uint16 space, move_bytes, off; + char *cp, *key_data, *val_data; + + cp = bufp->page; /* Character pointer of p. */ + p = (uint16 *)cp; + + key_data = (char *)key->data; + key_size = key->size; + val_data = (char *)val->data; + val_size = val->size; + + /* First move the Key */ + for (space = FREESPACE(p) - BIGOVERHEAD; key_size; + space = FREESPACE(p) - BIGOVERHEAD) { + move_bytes = PR_MIN(space, key_size); + off = OFFSET(p) - move_bytes; + memmove(cp + off, key_data, move_bytes); + key_size -= move_bytes; + key_data += move_bytes; + n = p[0]; + p[++n] = off; + p[0] = ++n; + FREESPACE(p) = off - PAGE_META(n); + OFFSET(p) = off; + p[n] = PARTIAL_KEY; + bufp = __add_ovflpage(hashp, bufp); + if (!bufp) + return (-1); + n = p[0]; + if (!key_size) { + if (FREESPACE(p)) { + move_bytes = PR_MIN(FREESPACE(p), val_size); + off = OFFSET(p) - move_bytes; + p[n] = off; + memmove(cp + off, val_data, move_bytes); + val_data += move_bytes; + val_size -= move_bytes; + p[n - 2] = FULL_KEY_DATA; + FREESPACE(p) = FREESPACE(p) - move_bytes; + OFFSET(p) = off; + } else + p[n - 2] = FULL_KEY; + } + p = (uint16 *)bufp->page; + cp = bufp->page; + bufp->flags |= BUF_MOD; + } + + /* Now move the data */ + for (space = FREESPACE(p) - BIGOVERHEAD; val_size; + space = FREESPACE(p) - BIGOVERHEAD) { + move_bytes = PR_MIN(space, val_size); + /* + * Here's the hack to make sure that if the data ends on the + * same page as the key ends, FREESPACE is at least one. + */ + if (space == val_size && val_size == val->size) + move_bytes--; + off = OFFSET(p) - move_bytes; + memmove(cp + off, val_data, move_bytes); + val_size -= move_bytes; + val_data += move_bytes; + n = p[0]; + p[++n] = off; + p[0] = ++n; + FREESPACE(p) = off - PAGE_META(n); + OFFSET(p) = off; + if (val_size) { + p[n] = FULL_KEY; + bufp = __add_ovflpage(hashp, bufp); + if (!bufp) + return (-1); + cp = bufp->page; + p = (uint16 *)cp; + } else + p[n] = FULL_KEY_DATA; + bufp->flags |= BUF_MOD; + } + return (0); +} + +/* + * Called when bufp's page contains a partial key (index should be 1) + * + * All pages in the big key/data pair except bufp are freed. We cannot + * free bufp because the page pointing to it is lost and we can't get rid + * of its pointer. + * + * Returns: + * 0 => OK + *-1 => ERROR + */ +extern int +__big_delete(HTAB *hashp, BUFHEAD *bufp) +{ + register BUFHEAD *last_bfp, *rbufp; + uint16 *bp, pageno; + int key_done, n; + + rbufp = bufp; + last_bfp = NULL; + bp = (uint16 *)bufp->page; + pageno = 0; + key_done = 0; + + while (!key_done || (bp[2] != FULL_KEY_DATA)) { + if (bp[2] == FULL_KEY || bp[2] == FULL_KEY_DATA) + key_done = 1; + + /* + * If there is freespace left on a FULL_KEY_DATA page, then + * the data is short and fits entirely on this page, and this + * is the last page. + */ + if (bp[2] == FULL_KEY_DATA && FREESPACE(bp)) + break; + pageno = bp[bp[0] - 1]; + rbufp->flags |= BUF_MOD; + rbufp = __get_buf(hashp, pageno, rbufp, 0); + if (last_bfp) + __free_ovflpage(hashp, last_bfp); + last_bfp = rbufp; + if (!rbufp) + return (-1); /* Error. */ + bp = (uint16 *)rbufp->page; + } + + /* + * If we get here then rbufp points to the last page of the big + * key/data pair. Bufp points to the first one -- it should now be + * empty pointing to the next page after this pair. Can't free it + * because we don't have the page pointing to it. + */ + + /* This is information from the last page of the pair. */ + n = bp[0]; + pageno = bp[n - 1]; + + /* Now, bp is the first page of the pair. */ + bp = (uint16 *)bufp->page; + if (n > 2) { + /* There is an overflow page. */ + bp[1] = pageno; + bp[2] = OVFLPAGE; + bufp->ovfl = rbufp->ovfl; + } else + /* This is the last page. */ + bufp->ovfl = NULL; + n -= 2; + bp[0] = n; + FREESPACE(bp) = hashp->BSIZE - PAGE_META(n); + OFFSET(bp) = hashp->BSIZE - 1; + + bufp->flags |= BUF_MOD; + if (rbufp) + __free_ovflpage(hashp, rbufp); + if (last_bfp != rbufp) + __free_ovflpage(hashp, last_bfp); + + hashp->NKEYS--; + return (0); +} +/* + * Returns: + * 0 = key not found + * -1 = get next overflow page + * -2 means key not found and this is big key/data + * -3 error + */ +extern int +__find_bigpair(HTAB *hashp, BUFHEAD *bufp, int ndx, char *key, int size) +{ + register uint16 *bp; + register char *p; + int ksize; + uint16 bytes; + char *kkey; + + bp = (uint16 *)bufp->page; + p = bufp->page; + ksize = size; + kkey = key; + + for (bytes = hashp->BSIZE - bp[ndx]; + bytes <= size && bp[ndx + 1] == PARTIAL_KEY; + bytes = hashp->BSIZE - bp[ndx]) { + if (memcmp(p + bp[ndx], kkey, bytes)) + return (-2); + kkey += bytes; + ksize -= bytes; + bufp = __get_buf(hashp, bp[ndx + 2], bufp, 0); + if (!bufp) + return (-3); + p = bufp->page; + bp = (uint16 *)p; + ndx = 1; + } + + if (bytes != ksize || memcmp(p + bp[ndx], kkey, bytes)) { +#ifdef HASH_STATISTICS + ++hash_collisions; +#endif + return (-2); + } else + return (ndx); +} + +/* + * Given the buffer pointer of the first overflow page of a big pair, + * find the end of the big pair + * + * This will set bpp to the buffer header of the last page of the big pair. + * It will return the pageno of the overflow page following the last page + * of the pair; 0 if there isn't any (i.e. big pair is the last key in the + * bucket) + */ +extern uint16 +__find_last_page(HTAB *hashp, BUFHEAD **bpp) +{ + BUFHEAD *bufp; + uint16 *bp, pageno; + uint n; + + bufp = *bpp; + bp = (uint16 *)bufp->page; + for (;;) { + n = bp[0]; + + /* + * This is the last page if: the tag is FULL_KEY_DATA and + * either only 2 entries OVFLPAGE marker is explicit there + * is freespace on the page. + */ + if (bp[2] == FULL_KEY_DATA && + ((n == 2) || (bp[n] == OVFLPAGE) || (FREESPACE(bp)))) + break; + + /* LJM bound the size of n to reasonable limits + */ + if(n > hashp->BSIZE/sizeof(uint16)) + return(0); + + pageno = bp[n - 1]; + bufp = __get_buf(hashp, pageno, bufp, 0); + if (!bufp) + return (0); /* Need to indicate an error! */ + bp = (uint16 *)bufp->page; + } + + *bpp = bufp; + if (bp[0] > 2) + return (bp[3]); + else + return (0); +} + +/* + * Return the data for the key/data pair that begins on this page at this + * index (index should always be 1). + */ +extern int +__big_return( + HTAB *hashp, + BUFHEAD *bufp, + int ndx, + DBT *val, + int set_current) +{ + BUFHEAD *save_p; + uint16 *bp, len, off, save_addr; + char *tp; + int save_flags; + + bp = (uint16 *)bufp->page; + while (bp[ndx + 1] == PARTIAL_KEY) { + bufp = __get_buf(hashp, bp[bp[0] - 1], bufp, 0); + if (!bufp) + return (-1); + bp = (uint16 *)bufp->page; + ndx = 1; + } + + if (bp[ndx + 1] == FULL_KEY) { + bufp = __get_buf(hashp, bp[bp[0] - 1], bufp, 0); + if (!bufp) + return (-1); + bp = (uint16 *)bufp->page; + save_p = bufp; + save_addr = save_p->addr; + off = bp[1]; + len = 0; + } else + if (!FREESPACE(bp)) { + /* + * This is a hack. We can't distinguish between + * FULL_KEY_DATA that contains complete data or + * incomplete data, so we require that if the data + * is complete, there is at least 1 byte of free + * space left. + */ + off = bp[bp[0]]; + len = bp[1] - off; + save_p = bufp; + save_addr = bufp->addr; + bufp = __get_buf(hashp, bp[bp[0] - 1], bufp, 0); + if (!bufp) + return (-1); + bp = (uint16 *)bufp->page; + } else { + /* The data is all on one page. */ + tp = (char *)bp; + off = bp[bp[0]]; + val->data = (uint8 *)tp + off; + val->size = bp[1] - off; + if (set_current) { + if (bp[0] == 2) { /* No more buckets in + * chain */ + hashp->cpage = NULL; + hashp->cbucket++; + hashp->cndx = 1; + } else { + hashp->cpage = __get_buf(hashp, + bp[bp[0] - 1], bufp, 0); + if (!hashp->cpage) + return (-1); + hashp->cndx = 1; + if (!((uint16 *) + hashp->cpage->page)[0]) { + hashp->cbucket++; + hashp->cpage = NULL; + } + } + } + return (0); + } + + /* pin our saved buf so that we don't lose if + * we run out of buffers */ + save_flags = save_p->flags; + save_p->flags |= BUF_PIN; + val->size = collect_data(hashp, bufp, (int)len, set_current); + save_p->flags = save_flags; + if (val->size == (size_t)-1) + return (-1); + if (save_p->addr != save_addr) { + /* We are pretty short on buffers. */ + errno = EINVAL; /* OUT OF BUFFERS */ + return (-1); + } + memmove(hashp->tmp_buf, (save_p->page) + off, len); + val->data = (uint8 *)hashp->tmp_buf; + return (0); +} + + +/* + * Count how big the total datasize is by looping through the pages. Then + * allocate a buffer and copy the data in the second loop. NOTE: Our caller + * may already have a bp which it is holding onto. The caller is + * responsible for copying that bp into our temp buffer. 'len' is how much + * space to reserve for that buffer. + */ +static int +collect_data( + HTAB *hashp, + BUFHEAD *bufp, + int len, int set) +{ + register uint16 *bp; + BUFHEAD *save_bufp; + int save_flags; + int mylen, totlen; + + /* + * save the input buf head because we need to walk the list twice. + * pin it to make sure it doesn't leave the buffer pool. + * This has the effect of growing the buffer pool if necessary. + */ + save_bufp = bufp; + save_flags = save_bufp->flags; + save_bufp->flags |= BUF_PIN; + + /* read the length of the buffer */ + for (totlen = len; bufp ; bufp = __get_buf(hashp, bp[bp[0]-1], bufp, 0)) { + bp = (uint16 *)bufp->page; + mylen = hashp->BSIZE - bp[1]; + + /* if mylen ever goes negative it means that the + * page is screwed up. + */ + if (mylen < 0) { + save_bufp->flags = save_flags; + return (-1); + } + totlen += mylen; + if (bp[2] == FULL_KEY_DATA) { /* End of Data */ + break; + } + } + + if (!bufp) { + save_bufp->flags = save_flags; + return (-1); + } + + /* allocate a temp buf */ + if (hashp->tmp_buf) + free(hashp->tmp_buf); + if ((hashp->tmp_buf = (char *)malloc((size_t)totlen)) == NULL) { + save_bufp->flags = save_flags; + return (-1); + } + + /* copy the buffers back into temp buf */ + for (bufp = save_bufp; bufp ; + bufp = __get_buf(hashp, bp[bp[0]-1], bufp, 0)) { + bp = (uint16 *)bufp->page; + mylen = hashp->BSIZE - bp[1]; + memmove(&hashp->tmp_buf[len], (bufp->page) + bp[1], (size_t)mylen); + len += mylen; + if (bp[2] == FULL_KEY_DATA) { + break; + } + } + + /* 'clear' the pin flags */ + save_bufp->flags = save_flags; + + /* update the database cursor */ + if (set) { + hashp->cndx = 1; + if (bp[0] == 2) { /* No more buckets in chain */ + hashp->cpage = NULL; + hashp->cbucket++; + } else { + hashp->cpage = __get_buf(hashp, bp[bp[0] - 1], bufp, 0); + if (!hashp->cpage) + return (-1); + else if (!((uint16 *)hashp->cpage->page)[0]) { + hashp->cbucket++; + hashp->cpage = NULL; + } + } + } + return (totlen); +} + +/* + * Fill in the key and data for this big pair. + */ +extern int +__big_keydata( + HTAB *hashp, + BUFHEAD *bufp, + DBT *key, DBT *val, + int set) +{ + key->size = collect_key(hashp, bufp, 0, val, set); + if (key->size == (size_t)-1) + return (-1); + key->data = (uint8 *)hashp->tmp_key; + return (0); +} + +/* + * Count how big the total key size is by recursing through the pages. Then + * collect the data, allocate a buffer and copy the key as you recurse up. + */ +static int +collect_key( + HTAB *hashp, + BUFHEAD *bufp, + int len, + DBT *val, + int set) +{ + BUFHEAD *xbp; + char *p; + int mylen, totlen; + uint16 *bp, save_addr; + + p = bufp->page; + bp = (uint16 *)p; + mylen = hashp->BSIZE - bp[1]; + + save_addr = bufp->addr; + totlen = len + mylen; + if (bp[2] == FULL_KEY || bp[2] == FULL_KEY_DATA) { /* End of Key. */ + if (hashp->tmp_key != NULL) + free(hashp->tmp_key); + if ((hashp->tmp_key = (char *)malloc((size_t)totlen)) == NULL) + return (-1); + if (__big_return(hashp, bufp, 1, val, set)) + return (-1); + } else { + xbp = __get_buf(hashp, bp[bp[0] - 1], bufp, 0); + if (!xbp || ((totlen = + collect_key(hashp, xbp, totlen, val, set)) < 1)) + return (-1); + } + if (bufp->addr != save_addr) { + errno = EINVAL; /* MIS -- OUT OF BUFFERS */ + return (-1); + } + memmove(&hashp->tmp_key[len], (bufp->page) + bp[1], (size_t)mylen); + return (totlen); +} + +/* + * Returns: + * 0 => OK + * -1 => error + */ +extern int +__big_split( + HTAB *hashp, + BUFHEAD *op, /* Pointer to where to put keys that go in old bucket */ + BUFHEAD *np, /* Pointer to new bucket page */ + /* Pointer to first page containing the big key/data */ + BUFHEAD *big_keyp, + uint32 addr, /* Address of big_keyp */ + uint32 obucket,/* Old Bucket */ + SPLIT_RETURN *ret) +{ + register BUFHEAD *tmpp; + register uint16 *tp; + BUFHEAD *bp; + DBT key, val; + uint32 change; + uint16 free_space, n, off; + + bp = big_keyp; + + /* Now figure out where the big key/data goes */ + if (__big_keydata(hashp, big_keyp, &key, &val, 0)) + return (-1); + change = (__call_hash(hashp,(char*) key.data, key.size) != obucket); + + if ((ret->next_addr = __find_last_page(hashp, &big_keyp))) { + if (!(ret->nextp = + __get_buf(hashp, ret->next_addr, big_keyp, 0))) + return (-1);; + } else + ret->nextp = NULL; + + /* Now make one of np/op point to the big key/data pair */ +#ifdef DEBUG + assert(np->ovfl == NULL); +#endif + if (change) + tmpp = np; + else + tmpp = op; + + tmpp->flags |= BUF_MOD; +#ifdef DEBUG1 + (void)fprintf(stderr, + "BIG_SPLIT: %d->ovfl was %d is now %d\n", tmpp->addr, + (tmpp->ovfl ? tmpp->ovfl->addr : 0), (bp ? bp->addr : 0)); +#endif + tmpp->ovfl = bp; /* one of op/np point to big_keyp */ + tp = (uint16 *)tmpp->page; + + +#if 0 /* this get's tripped on database corrupted error */ + assert(FREESPACE(tp) >= OVFLSIZE); +#endif + if(FREESPACE(tp) < OVFLSIZE) + return(DATABASE_CORRUPTED_ERROR); + + n = tp[0]; + off = OFFSET(tp); + free_space = FREESPACE(tp); + tp[++n] = (uint16)addr; + tp[++n] = OVFLPAGE; + tp[0] = n; + OFFSET(tp) = off; + FREESPACE(tp) = free_space - OVFLSIZE; + + /* + * Finally, set the new and old return values. BIG_KEYP contains a + * pointer to the last page of the big key_data pair. Make sure that + * big_keyp has no following page (2 elements) or create an empty + * following page. + */ + + ret->newp = np; + ret->oldp = op; + + tp = (uint16 *)big_keyp->page; + big_keyp->flags |= BUF_MOD; + if (tp[0] > 2) { + /* + * There may be either one or two offsets on this page. If + * there is one, then the overflow page is linked on normally + * and tp[4] is OVFLPAGE. If there are two, tp[4] contains + * the second offset and needs to get stuffed in after the + * next overflow page is added. + */ + n = tp[4]; + free_space = FREESPACE(tp); + off = OFFSET(tp); + tp[0] -= 2; + FREESPACE(tp) = free_space + OVFLSIZE; + OFFSET(tp) = off; + tmpp = __add_ovflpage(hashp, big_keyp); + if (!tmpp) + return (-1); + tp[4] = n; + } else + tmpp = big_keyp; + + if (change) + ret->newp = tmpp; + else + ret->oldp = tmpp; + return (0); +} diff --git a/dbm/src/h_func.c b/dbm/src/h_func.c new file mode 100644 index 000000000..5819efe23 --- /dev/null +++ b/dbm/src/h_func.c @@ -0,0 +1,211 @@ +/*- + * Copyright (c) 1990, 1993 + * The Regents of the University of California. All rights reserved. + * + * This code is derived from software contributed to Berkeley by + * Margo Seltzer. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by the University of + * California, Berkeley and its contributors. + * 4. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#if defined(LIBC_SCCS) && !defined(lint) +static char sccsid[] = "@(#)hash_func.c 8.2 (Berkeley) 2/21/94"; +#endif /* LIBC_SCCS and not lint */ + +#include "watcomfx.h" + +#ifndef macintosh +#include <sys/types.h> +#endif +#include "mcom_db.h" +#include "hash.h" +#include "page.h" +/* #include "extern.h" */ + +#if 0 +static uint32 hash1 __P((const void *, size_t)); +static uint32 hash2 __P((const void *, size_t)); +static uint32 hash3 __P((const void *, size_t)); +#endif +static uint32 hash4 __P((const void *, size_t)); + +/* Global default hash function */ +uint32 (*__default_hash) __P((const void *, size_t)) = hash4; + +/* + * HASH FUNCTIONS + * + * Assume that we've already split the bucket to which this key hashes, + * calculate that bucket, and check that in fact we did already split it. + * + * This came from ejb's hsearch. + */ + +#define PRIME1 37 +#define PRIME2 1048583 + +#if 0 +static uint32 +hash1(const void *keyarg, register size_t len) +{ + register const uint8 *key; + register uint32 h; + + /* Convert string to integer */ + for (key = (const uint8 *)keyarg, h = 0; len--;) + h = h * PRIME1 ^ (*key++ - ' '); + h %= PRIME2; + return (h); +} + +/* + * Phong's linear congruential hash + */ +#define dcharhash(h, c) ((h) = 0x63c63cd9*(h) + 0x9c39c33d + (c)) + +static uint32 +hash2(const void *keyarg, size_t len) +{ + register const uint8 *e, *key; + register uint32 h; + register uint8 c; + + key = (const uint8 *)keyarg; + e = key + len; + for (h = 0; key != e;) { + c = *key++; + if (!c && key > e) + break; + dcharhash(h, c); + } + return (h); +} + +/* + * This is INCREDIBLY ugly, but fast. We break the string up into 8 byte + * units. On the first time through the loop we get the "leftover bytes" + * (strlen % 8). On every other iteration, we perform 8 HASHC's so we handle + * all 8 bytes. Essentially, this saves us 7 cmp & branch instructions. If + * this routine is heavily used enough, it's worth the ugly coding. + * + * OZ's original sdbm hash + */ +static uint32 +hash3(const void *keyarg, register size_t len) +{ + register const uint8 *key; + register size_t loop; + register uint32 h; + +#define HASHC h = *key++ + 65599 * h + + h = 0; + key = (const uint8 *)keyarg; + if (len > 0) { + loop = (len + 8 - 1) >> 3; + + switch (len & (8 - 1)) { + case 0: + do { + HASHC; + /* FALLTHROUGH */ + case 7: + HASHC; + /* FALLTHROUGH */ + case 6: + HASHC; + /* FALLTHROUGH */ + case 5: + HASHC; + /* FALLTHROUGH */ + case 4: + HASHC; + /* FALLTHROUGH */ + case 3: + HASHC; + /* FALLTHROUGH */ + case 2: + HASHC; + /* FALLTHROUGH */ + case 1: + HASHC; + } while (--loop); + } + } + return (h); +} +#endif /* 0 */ + +/* Hash function from Chris Torek. */ +static uint32 +hash4(const void *keyarg, register size_t len) +{ + register const uint8 *key; + register size_t loop; + register uint32 h; + +#define HASH4a h = (h << 5) - h + *key++; +#define HASH4b h = (h << 5) + h + *key++; +#define HASH4 HASH4b + + h = 0; + key = (const uint8 *)keyarg; + if (len > 0) { + loop = (len + 8 - 1) >> 3; + + switch (len & (8 - 1)) { + case 0: + do { + HASH4; + /* FALLTHROUGH */ + case 7: + HASH4; + /* FALLTHROUGH */ + case 6: + HASH4; + /* FALLTHROUGH */ + case 5: + HASH4; + /* FALLTHROUGH */ + case 4: + HASH4; + /* FALLTHROUGH */ + case 3: + HASH4; + /* FALLTHROUGH */ + case 2: + HASH4; + /* FALLTHROUGH */ + case 1: + HASH4; + } while (--loop); + } + } + return (h); +} diff --git a/dbm/src/h_log2.c b/dbm/src/h_log2.c new file mode 100644 index 000000000..4d8b0a715 --- /dev/null +++ b/dbm/src/h_log2.c @@ -0,0 +1,56 @@ +/*- + * Copyright (c) 1990, 1993, 1994 + * The Regents of the University of California. All rights reserved. + * + * This code is derived from software contributed to Berkeley by + * Margo Seltzer. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by the University of + * California, Berkeley and its contributors. + * 4. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#if defined(LIBC_SCCS) && !defined(lint) +static char sccsid[] = "@(#)hash_log2.c 8.2 (Berkeley) 5/31/94"; +#endif /* LIBC_SCCS and not lint */ + +#include "watcomfx.h" + +#include <stdio.h> +#ifndef macintosh +#include <sys/types.h> +#endif +#include "mcom_db.h" + +uint32 __log2(uint32 num) +{ + register uint32 i, limit; + + limit = 1; + for (i = 0; limit < num; limit = limit << 1, i++) {} + return (i); +} diff --git a/dbm/src/h_page.c b/dbm/src/h_page.c new file mode 100644 index 000000000..e11ad9451 --- /dev/null +++ b/dbm/src/h_page.c @@ -0,0 +1,1290 @@ +/*- + * Copyright (c) 1990, 1993, 1994 + * The Regents of the University of California. All rights reserved. + * + * This code is derived from software contributed to Berkeley by + * Margo Seltzer. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by the University of + * California, Berkeley and its contributors. + * 4. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#if defined(unix) +#define MY_LSEEK lseek +#else +#define MY_LSEEK new_lseek +extern long new_lseek(int fd, long pos, int start); +#endif + +#if defined(LIBC_SCCS) && !defined(lint) +static char sccsid[] = "@(#)hash_page.c 8.7 (Berkeley) 8/16/94"; +#endif /* LIBC_SCCS and not lint */ + +#include "watcomfx.h" + +/* + * PACKAGE: hashing + * + * DESCRIPTION: + * Page manipulation for hashing package. + * + * ROUTINES: + * + * External + * __get_page + * __add_ovflpage + * Internal + * overflow_page + * open_temp + */ +#ifndef macintosh +#include <sys/types.h> +#endif + +#if defined(macintosh) +#include <unistd.h> +#endif + +#include <errno.h> +#include <fcntl.h> +#if defined(_WIN32) || defined(_WINDOWS) +#include <io.h> +#endif +#include <signal.h> +#include <stdio.h> +#include <stdlib.h> +#include <string.h> + +#if !defined(_WIN32) && !defined(_WINDOWS) && !defined(macintosh) && !defined(XP_OS2_VACPP) +#include <unistd.h> +#endif + +#include <assert.h> + +#include "mcom_db.h" +#include "hash.h" +#include "page.h" +/* #include "extern.h" */ + +extern int mkstempflags(char *path, int extraFlags); + +static uint32 *fetch_bitmap __P((HTAB *, uint32)); +static uint32 first_free __P((uint32)); +static int open_temp __P((HTAB *)); +static uint16 overflow_page __P((HTAB *)); +static void squeeze_key __P((uint16 *, const DBT *, const DBT *)); +static int ugly_split + __P((HTAB *, uint32, BUFHEAD *, BUFHEAD *, int, int)); + +#define PAGE_INIT(P) { \ + ((uint16 *)(P))[0] = 0; \ + ((uint16 *)(P))[1] = hashp->BSIZE - 3 * sizeof(uint16); \ + ((uint16 *)(P))[2] = hashp->BSIZE; \ +} + +/* implement a new lseek using lseek that + * writes zero's when extending a file + * beyond the end. + */ +long new_lseek(int fd, long offset, int origin) +{ + long cur_pos=0; + long end_pos=0; + long seek_pos=0; + + if(origin == SEEK_CUR) + { + if(offset < 1) + return(lseek(fd, offset, SEEK_CUR)); + + cur_pos = lseek(fd, 0, SEEK_CUR); + + if(cur_pos < 0) + return(cur_pos); + } + + end_pos = lseek(fd, 0, SEEK_END); + if(end_pos < 0) + return(end_pos); + + if(origin == SEEK_SET) + seek_pos = offset; + else if(origin == SEEK_CUR) + seek_pos = cur_pos + offset; + else if(origin == SEEK_END) + seek_pos = end_pos + offset; + else + { + assert(0); + return(-1); + } + + /* the seek position desired is before the + * end of the file. We don't need + * to do anything special except the seek. + */ + if(seek_pos <= end_pos) + return(lseek(fd, seek_pos, SEEK_SET)); + + /* the seek position is beyond the end of the + * file. Write zero's to the end. + * + * we are already at the end of the file so + * we just need to "write()" zeros for the + * difference between seek_pos-end_pos and + * then seek to the position to finish + * the call + */ + { + char buffer[1024]; + long len = seek_pos-end_pos; + memset(&buffer, 0, 1024); + while(len > 0) + { + write(fd, (char*)&buffer, (size_t)(1024 > len ? len : 1024)); + len -= 1024; + } + return(lseek(fd, seek_pos, SEEK_SET)); + } + +} + +/* + * This is called AFTER we have verified that there is room on the page for + * the pair (PAIRFITS has returned true) so we go right ahead and start moving + * stuff on. + */ +static void +putpair(char *p, const DBT *key, DBT * val) +{ + register uint16 *bp, n, off; + + bp = (uint16 *)p; + + /* Enter the key first. */ + n = bp[0]; + + off = OFFSET(bp) - key->size; + memmove(p + off, key->data, key->size); + bp[++n] = off; + + /* Now the data. */ + off -= val->size; + memmove(p + off, val->data, val->size); + bp[++n] = off; + + /* Adjust page info. */ + bp[0] = n; + bp[n + 1] = off - ((n + 3) * sizeof(uint16)); + bp[n + 2] = off; +} + +/* + * Returns: + * 0 OK + * -1 error + */ +extern int +__delpair(HTAB *hashp, BUFHEAD *bufp, int ndx) +{ + register uint16 *bp, newoff; + register int n; + uint16 pairlen; + + bp = (uint16 *)bufp->page; + n = bp[0]; + + if (bp[ndx + 1] < REAL_KEY) + return (__big_delete(hashp, bufp)); + if (ndx != 1) + newoff = bp[ndx - 1]; + else + newoff = hashp->BSIZE; + pairlen = newoff - bp[ndx + 1]; + + if (ndx != (n - 1)) { + /* Hard Case -- need to shuffle keys */ + register int i; + register char *src = bufp->page + (int)OFFSET(bp); + uint32 dst_offset = (uint32)OFFSET(bp) + (uint32)pairlen; + register char *dst = bufp->page + dst_offset; + uint32 length = bp[ndx + 1] - OFFSET(bp); + + /* + * +-----------+XXX+---------+XXX+---------+---------> +infinity + * | | | | + * 0 src_offset dst_offset BSIZE + * + * Dst_offset is > src_offset, so if src_offset were bad, dst_offset + * would be too, therefore we check only dst_offset. + * + * If dst_offset is >= BSIZE, either OFFSET(bp), or pairlen, or both + * is corrupted. + * + * Once we know dst_offset is < BSIZE, we can subtract it from BSIZE + * to get an upper bound on length. + */ + if(dst_offset > (uint32)hashp->BSIZE) + return(DATABASE_CORRUPTED_ERROR); + + if(length > (uint32)(hashp->BSIZE - dst_offset)) + return(DATABASE_CORRUPTED_ERROR); + + memmove(dst, src, length); + + /* Now adjust the pointers */ + for (i = ndx + 2; i <= n; i += 2) { + if (bp[i + 1] == OVFLPAGE) { + bp[i - 2] = bp[i]; + bp[i - 1] = bp[i + 1]; + } else { + bp[i - 2] = bp[i] + pairlen; + bp[i - 1] = bp[i + 1] + pairlen; + } + } + } + /* Finally adjust the page data */ + bp[n] = OFFSET(bp) + pairlen; + bp[n - 1] = bp[n + 1] + pairlen + 2 * sizeof(uint16); + bp[0] = n - 2; + hashp->NKEYS--; + + bufp->flags |= BUF_MOD; + return (0); +} +/* + * Returns: + * 0 ==> OK + * -1 ==> Error + */ +extern int +__split_page(HTAB *hashp, uint32 obucket, uint32 nbucket) +{ + register BUFHEAD *new_bufp, *old_bufp; + register uint16 *ino; + register uint16 *tmp_uint16_array; + register char *np; + DBT key, val; + uint16 n, ndx; + int retval; + uint16 copyto, diff, moved; + size_t off; + char *op; + + copyto = (uint16)hashp->BSIZE; + off = (uint16)hashp->BSIZE; + old_bufp = __get_buf(hashp, obucket, NULL, 0); + if (old_bufp == NULL) + return (-1); + new_bufp = __get_buf(hashp, nbucket, NULL, 0); + if (new_bufp == NULL) + return (-1); + + old_bufp->flags |= (BUF_MOD | BUF_PIN); + new_bufp->flags |= (BUF_MOD | BUF_PIN); + + ino = (uint16 *)(op = old_bufp->page); + np = new_bufp->page; + + moved = 0; + + for (n = 1, ndx = 1; n < ino[0]; n += 2) { + if (ino[n + 1] < REAL_KEY) { + retval = ugly_split(hashp, obucket, old_bufp, new_bufp, + (int)copyto, (int)moved); + old_bufp->flags &= ~BUF_PIN; + new_bufp->flags &= ~BUF_PIN; + return (retval); + + } + key.data = (uint8 *)op + ino[n]; + + /* check here for ino[n] being greater than + * off. If it is then the database has + * been corrupted. + */ + if(ino[n] > off) + return(DATABASE_CORRUPTED_ERROR); + + key.size = off - ino[n]; + +#ifdef DEBUG + /* make sure the size is positive */ + assert(((int)key.size) > -1); +#endif + + if (__call_hash(hashp, (char *)key.data, key.size) == obucket) { + /* Don't switch page */ + diff = copyto - off; + if (diff) { + copyto = ino[n + 1] + diff; + memmove(op + copyto, op + ino[n + 1], + off - ino[n + 1]); + ino[ndx] = copyto + ino[n] - ino[n + 1]; + ino[ndx + 1] = copyto; + } else + copyto = ino[n + 1]; + ndx += 2; + } else { + /* Switch page */ + val.data = (uint8 *)op + ino[n + 1]; + val.size = ino[n] - ino[n + 1]; + + /* if the pair doesn't fit something is horribly + * wrong. LJM + */ + tmp_uint16_array = (uint16*)np; + if(!PAIRFITS(tmp_uint16_array, &key, &val)) + return(DATABASE_CORRUPTED_ERROR); + + putpair(np, &key, &val); + moved += 2; + } + + off = ino[n + 1]; + } + + /* Now clean up the page */ + ino[0] -= moved; + FREESPACE(ino) = copyto - sizeof(uint16) * (ino[0] + 3); + OFFSET(ino) = copyto; + +#ifdef DEBUG3 + (void)fprintf(stderr, "split %d/%d\n", + ((uint16 *)np)[0] / 2, + ((uint16 *)op)[0] / 2); +#endif + /* unpin both pages */ + old_bufp->flags &= ~BUF_PIN; + new_bufp->flags &= ~BUF_PIN; + return (0); +} + +/* + * Called when we encounter an overflow or big key/data page during split + * handling. This is special cased since we have to begin checking whether + * the key/data pairs fit on their respective pages and because we may need + * overflow pages for both the old and new pages. + * + * The first page might be a page with regular key/data pairs in which case + * we have a regular overflow condition and just need to go on to the next + * page or it might be a big key/data pair in which case we need to fix the + * big key/data pair. + * + * Returns: + * 0 ==> success + * -1 ==> failure + */ + +/* the maximum number of loops we will allow UGLY split to chew + * on before we assume the database is corrupted and throw it + * away. + */ +#define MAX_UGLY_SPLIT_LOOPS 10000 + +static int +ugly_split(HTAB *hashp, uint32 obucket, BUFHEAD *old_bufp, + BUFHEAD *new_bufp,/* Same as __split_page. */ int copyto, int moved) + /* int copyto; First byte on page which contains key/data values. */ + /* int moved; Number of pairs moved to new page. */ +{ + register BUFHEAD *bufp; /* Buffer header for ino */ + register uint16 *ino; /* Page keys come off of */ + register uint16 *np; /* New page */ + register uint16 *op; /* Page keys go on to if they aren't moving */ + uint32 loop_detection=0; + + BUFHEAD *last_bfp; /* Last buf header OVFL needing to be freed */ + DBT key, val; + SPLIT_RETURN ret; + uint16 n, off, ov_addr, scopyto; + char *cino; /* Character value of ino */ + int status; + + bufp = old_bufp; + ino = (uint16 *)old_bufp->page; + np = (uint16 *)new_bufp->page; + op = (uint16 *)old_bufp->page; + last_bfp = NULL; + scopyto = (uint16)copyto; /* ANSI */ + + n = ino[0] - 1; + while (n < ino[0]) { + + + /* this function goes nuts sometimes and never returns. + * I havent found the problem yet but I need a solution + * so if we loop too often we assume a database curruption error + * :LJM + */ + loop_detection++; + + if(loop_detection > MAX_UGLY_SPLIT_LOOPS) + return DATABASE_CORRUPTED_ERROR; + + if (ino[2] < REAL_KEY && ino[2] != OVFLPAGE) { + if ((status = __big_split(hashp, old_bufp, + new_bufp, bufp, bufp->addr, obucket, &ret))) + return (status); + old_bufp = ret.oldp; + if (!old_bufp) + return (-1); + op = (uint16 *)old_bufp->page; + new_bufp = ret.newp; + if (!new_bufp) + return (-1); + np = (uint16 *)new_bufp->page; + bufp = ret.nextp; + if (!bufp) + return (0); + cino = (char *)bufp->page; + ino = (uint16 *)cino; + last_bfp = ret.nextp; + } else if (ino[n + 1] == OVFLPAGE) { + ov_addr = ino[n]; + /* + * Fix up the old page -- the extra 2 are the fields + * which contained the overflow information. + */ + ino[0] -= (moved + 2); + FREESPACE(ino) = + scopyto - sizeof(uint16) * (ino[0] + 3); + OFFSET(ino) = scopyto; + + bufp = __get_buf(hashp, ov_addr, bufp, 0); + if (!bufp) + return (-1); + + ino = (uint16 *)bufp->page; + n = 1; + scopyto = hashp->BSIZE; + moved = 0; + + if (last_bfp) + __free_ovflpage(hashp, last_bfp); + last_bfp = bufp; + } + /* Move regular sized pairs of there are any */ + off = hashp->BSIZE; + for (n = 1; (n < ino[0]) && (ino[n + 1] >= REAL_KEY); n += 2) { + cino = (char *)ino; + key.data = (uint8 *)cino + ino[n]; + key.size = off - ino[n]; + val.data = (uint8 *)cino + ino[n + 1]; + val.size = ino[n] - ino[n + 1]; + off = ino[n + 1]; + + if (__call_hash(hashp, (char*)key.data, key.size) == obucket) { + /* Keep on old page */ + if (PAIRFITS(op, (&key), (&val))) + putpair((char *)op, &key, &val); + else { + old_bufp = + __add_ovflpage(hashp, old_bufp); + if (!old_bufp) + return (-1); + op = (uint16 *)old_bufp->page; + putpair((char *)op, &key, &val); + } + old_bufp->flags |= BUF_MOD; + } else { + /* Move to new page */ + if (PAIRFITS(np, (&key), (&val))) + putpair((char *)np, &key, &val); + else { + new_bufp = + __add_ovflpage(hashp, new_bufp); + if (!new_bufp) + return (-1); + np = (uint16 *)new_bufp->page; + putpair((char *)np, &key, &val); + } + new_bufp->flags |= BUF_MOD; + } + } + } + if (last_bfp) + __free_ovflpage(hashp, last_bfp); + return (0); +} + +/* + * Add the given pair to the page + * + * Returns: + * 0 ==> OK + * 1 ==> failure + */ +extern int +__addel(HTAB *hashp, BUFHEAD *bufp, const DBT *key, const DBT * val) +{ + register uint16 *bp, *sop; + int do_expand; + + bp = (uint16 *)bufp->page; + do_expand = 0; + while (bp[0] && (bp[2] < REAL_KEY || bp[bp[0]] < REAL_KEY)) + /* Exception case */ + if (bp[2] == FULL_KEY_DATA && bp[0] == 2) + /* This is the last page of a big key/data pair + and we need to add another page */ + break; + else if (bp[2] < REAL_KEY && bp[bp[0]] != OVFLPAGE) { + bufp = __get_buf(hashp, bp[bp[0] - 1], bufp, 0); + if (!bufp) + { +#ifdef DEBUG + assert(0); +#endif + return (-1); + } + bp = (uint16 *)bufp->page; + } else + /* Try to squeeze key on this page */ + if (FREESPACE(bp) > PAIRSIZE(key, val)) { + { + squeeze_key(bp, key, val); + + /* LJM: I added this because I think it was + * left out on accident. + * if this isn't incremented nkeys will not + * be the actual number of keys in the db. + */ + hashp->NKEYS++; + return (0); + } + } else { + bufp = __get_buf(hashp, bp[bp[0] - 1], bufp, 0); + if (!bufp) + { +#ifdef DEBUG + assert(0); +#endif + return (-1); + } + bp = (uint16 *)bufp->page; + } + + if (PAIRFITS(bp, key, val)) + putpair(bufp->page, key, (DBT *)val); + else { + do_expand = 1; + bufp = __add_ovflpage(hashp, bufp); + if (!bufp) + { +#ifdef DEBUG + assert(0); +#endif + return (-1); + } + sop = (uint16 *)bufp->page; + + if (PAIRFITS(sop, key, val)) + putpair((char *)sop, key, (DBT *)val); + else + if (__big_insert(hashp, bufp, key, val)) + { +#ifdef DEBUG + assert(0); +#endif + return (-1); + } + } + bufp->flags |= BUF_MOD; + /* + * If the average number of keys per bucket exceeds the fill factor, + * expand the table. + */ + hashp->NKEYS++; + if (do_expand || + (hashp->NKEYS / (hashp->MAX_BUCKET + 1) > hashp->FFACTOR)) + return (__expand_table(hashp)); + return (0); +} + +/* + * + * Returns: + * pointer on success + * NULL on error + */ +extern BUFHEAD * +__add_ovflpage(HTAB *hashp, BUFHEAD *bufp) +{ + register uint16 *sp; + uint16 ndx, ovfl_num; +#ifdef DEBUG1 + int tmp1, tmp2; +#endif + sp = (uint16 *)bufp->page; + + /* Check if we are dynamically determining the fill factor */ + if (hashp->FFACTOR == DEF_FFACTOR) { + hashp->FFACTOR = sp[0] >> 1; + if (hashp->FFACTOR < MIN_FFACTOR) + hashp->FFACTOR = MIN_FFACTOR; + } + bufp->flags |= BUF_MOD; + ovfl_num = overflow_page(hashp); +#ifdef DEBUG1 + tmp1 = bufp->addr; + tmp2 = bufp->ovfl ? bufp->ovfl->addr : 0; +#endif + if (!ovfl_num || !(bufp->ovfl = __get_buf(hashp, ovfl_num, bufp, 1))) + return (NULL); + bufp->ovfl->flags |= BUF_MOD; +#ifdef DEBUG1 + (void)fprintf(stderr, "ADDOVFLPAGE: %d->ovfl was %d is now %d\n", + tmp1, tmp2, bufp->ovfl->addr); +#endif + ndx = sp[0]; + /* + * Since a pair is allocated on a page only if there's room to add + * an overflow page, we know that the OVFL information will fit on + * the page. + */ + sp[ndx + 4] = OFFSET(sp); + sp[ndx + 3] = FREESPACE(sp) - OVFLSIZE; + sp[ndx + 1] = ovfl_num; + sp[ndx + 2] = OVFLPAGE; + sp[0] = ndx + 2; +#ifdef HASH_STATISTICS + hash_overflows++; +#endif + return (bufp->ovfl); +} + +/* + * Returns: + * 0 indicates SUCCESS + * -1 indicates FAILURE + */ +extern int +__get_page(HTAB *hashp, + char * p, + uint32 bucket, + int is_bucket, + int is_disk, + int is_bitmap) +{ + register int fd, page; + size_t size; + int rsize; + uint16 *bp; + + fd = hashp->fp; + size = hashp->BSIZE; + + if ((fd == -1) || !is_disk) { + PAGE_INIT(p); + return (0); + } + if (is_bucket) + page = BUCKET_TO_PAGE(bucket); + else + page = OADDR_TO_PAGE(bucket); + if ((MY_LSEEK(fd, (off_t)page << hashp->BSHIFT, SEEK_SET) == -1) || + ((rsize = read(fd, p, size)) == -1)) + return (-1); + + bp = (uint16 *)p; + if (!rsize) + bp[0] = 0; /* We hit the EOF, so initialize a new page */ + else + if ((unsigned)rsize != size) { + errno = EFTYPE; + return (-1); + } + + if (!is_bitmap && !bp[0]) { + PAGE_INIT(p); + } else { + +#ifdef DEBUG + if(BYTE_ORDER == LITTLE_ENDIAN) + { + int is_little_endian; + is_little_endian = BYTE_ORDER; + } + else if(BYTE_ORDER == BIG_ENDIAN) + { + int is_big_endian; + is_big_endian = BYTE_ORDER; + } + else + { + assert(0); + } +#endif + + if (hashp->LORDER != BYTE_ORDER) { + register int i, max; + + if (is_bitmap) { + max = hashp->BSIZE >> 2; /* divide by 4 */ + for (i = 0; i < max; i++) + M_32_SWAP(((int *)p)[i]); + } else { + M_16_SWAP(bp[0]); + max = bp[0] + 2; + + /* bound the size of max by + * the maximum number of entries + * in the array + */ + if((unsigned)max > (size / sizeof(uint16))) + return(DATABASE_CORRUPTED_ERROR); + + /* do the byte order swap + */ + for (i = 1; i <= max; i++) + M_16_SWAP(bp[i]); + } + } + + /* check the validity of the page here + * (after doing byte order swaping if necessary) + */ + if(!is_bitmap && bp[0] != 0) + { + uint16 num_keys = bp[0]; + uint16 offset; + uint16 i; + + /* bp[0] is supposed to be the number of + * entries currently in the page. If + * bp[0] is too large (larger than the whole + * page) then the page is corrupted + */ + if(bp[0] > (size / sizeof(uint16))) + return(DATABASE_CORRUPTED_ERROR); + + /* bound free space */ + if(FREESPACE(bp) > size) + return(DATABASE_CORRUPTED_ERROR); + + /* check each key and data offset to make + * sure they are all within bounds they + * should all be less than the previous + * offset as well. + */ + offset = size; + for(i=1 ; i <= num_keys; i+=2) + { + /* ignore overflow pages etc. */ + if(bp[i+1] >= REAL_KEY) + { + + if(bp[i] > offset || bp[i+1] > bp[i]) + return(DATABASE_CORRUPTED_ERROR); + + offset = bp[i+1]; + } + else + { + /* there are no other valid keys after + * seeing a non REAL_KEY + */ + break; + } + } + } + } + return (0); +} + +/* + * Write page p to disk + * + * Returns: + * 0 ==> OK + * -1 ==>failure + */ +extern int +__put_page(HTAB *hashp, char *p, uint32 bucket, int is_bucket, int is_bitmap) +{ + register int fd, page; + size_t size; + int wsize; + off_t offset; + + size = hashp->BSIZE; + if ((hashp->fp == -1) && open_temp(hashp)) + return (-1); + fd = hashp->fp; + + if (hashp->LORDER != BYTE_ORDER) { + register int i; + register int max; + + if (is_bitmap) { + max = hashp->BSIZE >> 2; /* divide by 4 */ + for (i = 0; i < max; i++) + M_32_SWAP(((int *)p)[i]); + } else { + max = ((uint16 *)p)[0] + 2; + + /* bound the size of max by + * the maximum number of entries + * in the array + */ + if((unsigned)max > (size / sizeof(uint16))) + return(DATABASE_CORRUPTED_ERROR); + + for (i = 0; i <= max; i++) + M_16_SWAP(((uint16 *)p)[i]); + + } + } + + if (is_bucket) + page = BUCKET_TO_PAGE(bucket); + else + page = OADDR_TO_PAGE(bucket); + offset = (off_t)page << hashp->BSHIFT; + if ((MY_LSEEK(fd, offset, SEEK_SET) == -1) || + ((wsize = write(fd, p, size)) == -1)) + /* Errno is set */ + return (-1); + if ((unsigned)wsize != size) { + errno = EFTYPE; + return (-1); + } +#if defined(_WIN32) || defined(_WINDOWS) + if (offset + size > hashp->file_size) { + hashp->updateEOF = 1; + } +#endif + /* put the page back the way it was so that it isn't byteswapped + * if it remains in memory - LJM + */ + if (hashp->LORDER != BYTE_ORDER) { + register int i; + register int max; + + if (is_bitmap) { + max = hashp->BSIZE >> 2; /* divide by 4 */ + for (i = 0; i < max; i++) + M_32_SWAP(((int *)p)[i]); + } else { + uint16 *bp = (uint16 *)p; + + M_16_SWAP(bp[0]); + max = bp[0] + 2; + + /* no need to bound the size if max again + * since it was done already above + */ + + /* do the byte order re-swap + */ + for (i = 1; i <= max; i++) + M_16_SWAP(bp[i]); + } + } + + return (0); +} + +#define BYTE_MASK ((1 << INT_BYTE_SHIFT) -1) +/* + * Initialize a new bitmap page. Bitmap pages are left in memory + * once they are read in. + */ +extern int +__ibitmap(HTAB *hashp, int pnum, int nbits, int ndx) +{ + uint32 *ip; + size_t clearbytes, clearints; + + if ((ip = (uint32 *)malloc((size_t)hashp->BSIZE)) == NULL) + return (1); + hashp->nmaps++; + clearints = ((nbits - 1) >> INT_BYTE_SHIFT) + 1; + clearbytes = clearints << INT_TO_BYTE; + (void)memset((char *)ip, 0, clearbytes); + (void)memset(((char *)ip) + clearbytes, 0xFF, + hashp->BSIZE - clearbytes); + ip[clearints - 1] = ALL_SET << (nbits & BYTE_MASK); + SETBIT(ip, 0); + hashp->BITMAPS[ndx] = (uint16)pnum; + hashp->mapp[ndx] = ip; + return (0); +} + +static uint32 +first_free(uint32 map) +{ + register uint32 i, mask; + + mask = 0x1; + for (i = 0; i < BITS_PER_MAP; i++) { + if (!(mask & map)) + return (i); + mask = mask << 1; + } + return (i); +} + +static uint16 +overflow_page(HTAB *hashp) +{ + register uint32 *freep=NULL; + register int max_free, offset, splitnum; + uint16 addr; + uint32 i; + int bit, first_page, free_bit, free_page, in_use_bits, j; +#ifdef DEBUG2 + int tmp1, tmp2; +#endif + splitnum = hashp->OVFL_POINT; + max_free = hashp->SPARES[splitnum]; + + free_page = (max_free - 1) >> (hashp->BSHIFT + BYTE_SHIFT); + free_bit = (max_free - 1) & ((hashp->BSIZE << BYTE_SHIFT) - 1); + + /* Look through all the free maps to find the first free block */ + first_page = hashp->LAST_FREED >>(hashp->BSHIFT + BYTE_SHIFT); + for ( i = first_page; i <= (unsigned)free_page; i++ ) { + if (!(freep = (uint32 *)hashp->mapp[i]) && + !(freep = fetch_bitmap(hashp, i))) + return (0); + if (i == (unsigned)free_page) + in_use_bits = free_bit; + else + in_use_bits = (hashp->BSIZE << BYTE_SHIFT) - 1; + + if (i == (unsigned)first_page) { + bit = hashp->LAST_FREED & + ((hashp->BSIZE << BYTE_SHIFT) - 1); + j = bit / BITS_PER_MAP; + bit = bit & ~(BITS_PER_MAP - 1); + } else { + bit = 0; + j = 0; + } + for (; bit <= in_use_bits; j++, bit += BITS_PER_MAP) + if (freep[j] != ALL_SET) + goto found; + } + + /* No Free Page Found */ + hashp->LAST_FREED = hashp->SPARES[splitnum]; + hashp->SPARES[splitnum]++; + offset = hashp->SPARES[splitnum] - + (splitnum ? hashp->SPARES[splitnum - 1] : 0); + +#define OVMSG "HASH: Out of overflow pages. Increase page size\n" + if (offset > SPLITMASK) { + if (++splitnum >= NCACHED) { +#ifndef macintosh + (void)write(STDERR_FILENO, OVMSG, sizeof(OVMSG) - 1); +#endif + return (0); + } + hashp->OVFL_POINT = splitnum; + hashp->SPARES[splitnum] = hashp->SPARES[splitnum-1]; + hashp->SPARES[splitnum-1]--; + offset = 1; + } + + /* Check if we need to allocate a new bitmap page */ + if (free_bit == (hashp->BSIZE << BYTE_SHIFT) - 1) { + free_page++; + if (free_page >= NCACHED) { +#ifndef macintosh + (void)write(STDERR_FILENO, OVMSG, sizeof(OVMSG) - 1); +#endif + return (0); + } + /* + * This is tricky. The 1 indicates that you want the new page + * allocated with 1 clear bit. Actually, you are going to + * allocate 2 pages from this map. The first is going to be + * the map page, the second is the overflow page we were + * looking for. The init_bitmap routine automatically, sets + * the first bit of itself to indicate that the bitmap itself + * is in use. We would explicitly set the second bit, but + * don't have to if we tell init_bitmap not to leave it clear + * in the first place. + */ + if (__ibitmap(hashp, + (int)OADDR_OF(splitnum, offset), 1, free_page)) + return (0); + hashp->SPARES[splitnum]++; +#ifdef DEBUG2 + free_bit = 2; +#endif + offset++; + if (offset > SPLITMASK) { + if (++splitnum >= NCACHED) { +#ifndef macintosh + (void)write(STDERR_FILENO, OVMSG, + sizeof(OVMSG) - 1); +#endif + return (0); + } + hashp->OVFL_POINT = splitnum; + hashp->SPARES[splitnum] = hashp->SPARES[splitnum-1]; + hashp->SPARES[splitnum-1]--; + offset = 0; + } + } else { + /* + * Free_bit addresses the last used bit. Bump it to address + * the first available bit. + */ + free_bit++; + SETBIT(freep, free_bit); + } + + /* Calculate address of the new overflow page */ + addr = OADDR_OF(splitnum, offset); +#ifdef DEBUG2 + (void)fprintf(stderr, "OVERFLOW_PAGE: ADDR: %d BIT: %d PAGE %d\n", + addr, free_bit, free_page); +#endif + return (addr); + +found: + bit = bit + first_free(freep[j]); + SETBIT(freep, bit); +#ifdef DEBUG2 + tmp1 = bit; + tmp2 = i; +#endif + /* + * Bits are addressed starting with 0, but overflow pages are addressed + * beginning at 1. Bit is a bit addressnumber, so we need to increment + * it to convert it to a page number. + */ + bit = 1 + bit + (i * (hashp->BSIZE << BYTE_SHIFT)); + if (bit >= hashp->LAST_FREED) + hashp->LAST_FREED = bit - 1; + + /* Calculate the split number for this page */ + for (i = 0; (i < (unsigned)splitnum) && (bit > hashp->SPARES[i]); i++) {} + offset = (i ? bit - hashp->SPARES[i - 1] : bit); + if (offset >= SPLITMASK) + return (0); /* Out of overflow pages */ + addr = OADDR_OF(i, offset); +#ifdef DEBUG2 + (void)fprintf(stderr, "OVERFLOW_PAGE: ADDR: %d BIT: %d PAGE %d\n", + addr, tmp1, tmp2); +#endif + + /* Allocate and return the overflow page */ + return (addr); +} + +/* + * Mark this overflow page as free. + */ +extern void +__free_ovflpage(HTAB *hashp, BUFHEAD *obufp) +{ + uint16 addr; + uint32 *freep; + uint32 bit_address, free_page, free_bit; + uint16 ndx; + + if(!obufp || !obufp->addr) + return; + + addr = obufp->addr; +#ifdef DEBUG1 + (void)fprintf(stderr, "Freeing %d\n", addr); +#endif + ndx = (((uint16)addr) >> SPLITSHIFT); + bit_address = + (ndx ? hashp->SPARES[ndx - 1] : 0) + (addr & SPLITMASK) - 1; + if (bit_address < (uint32)hashp->LAST_FREED) + hashp->LAST_FREED = bit_address; + free_page = (bit_address >> (hashp->BSHIFT + BYTE_SHIFT)); + free_bit = bit_address & ((hashp->BSIZE << BYTE_SHIFT) - 1); + + if (!(freep = hashp->mapp[free_page])) + freep = fetch_bitmap(hashp, free_page); + +#ifdef DEBUG + /* + * This had better never happen. It means we tried to read a bitmap + * that has already had overflow pages allocated off it, and we + * failed to read it from the file. + */ + if (!freep) + { + assert(0); + return; + } +#endif + CLRBIT(freep, free_bit); +#ifdef DEBUG2 + (void)fprintf(stderr, "FREE_OVFLPAGE: ADDR: %d BIT: %d PAGE %d\n", + obufp->addr, free_bit, free_page); +#endif + __reclaim_buf(hashp, obufp); +} + +/* + * Returns: + * 0 success + * -1 failure + */ +static int +open_temp(HTAB *hashp) +{ +#ifdef XP_OS2 + hashp->fp = mkstemp(NULL); +#else +#if !defined(_WIN32) && !defined(_WINDOWS) && !defined(macintosh) + sigset_t set, oset; +#endif +#if !defined(macintosh) + char * tmpdir; + size_t len; + char last; +#endif + static const char namestr[] = "/_hashXXXXXX"; + char filename[1024]; + +#if !defined(_WIN32) && !defined(_WINDOWS) && !defined(macintosh) + /* Block signals; make sure file goes away at process exit. */ + (void)sigfillset(&set); + (void)sigprocmask(SIG_BLOCK, &set, &oset); +#endif + + filename[0] = 0; +#if defined(macintosh) + strcat(filename, namestr + 1); +#else + tmpdir = getenv("TMP"); + if (!tmpdir) + tmpdir = getenv("TMPDIR"); + if (!tmpdir) + tmpdir = getenv("TEMP"); + if (!tmpdir) + tmpdir = "."; + len = strlen(tmpdir); + if (len && len < (sizeof filename - sizeof namestr)) { + strcpy(filename, tmpdir); + } + len = strlen(filename); + last = tmpdir[len - 1]; + strcat(filename, (last == '/' || last == '\\') ? namestr + 1 : namestr); +#endif + +#if defined(_WIN32) || defined(_WINDOWS) + if ((hashp->fp = mkstempflags(filename, _O_BINARY|_O_TEMPORARY)) != -1) { + if (hashp->filename) { + free(hashp->filename); + } + hashp->filename = strdup(filename); + hashp->is_temp = 1; + } +#else + if ((hashp->fp = mkstemp(filename)) != -1) { + (void)unlink(filename); +#if !defined(macintosh) + (void)fcntl(hashp->fp, F_SETFD, 1); +#endif + } +#endif + +#if !defined(_WIN32) && !defined(_WINDOWS) && !defined(macintosh) + (void)sigprocmask(SIG_SETMASK, &oset, (sigset_t *)NULL); +#endif +#endif /* !OS2 */ + return (hashp->fp != -1 ? 0 : -1); +} + +/* + * We have to know that the key will fit, but the last entry on the page is + * an overflow pair, so we need to shift things. + */ +static void +squeeze_key(uint16 *sp, const DBT * key, const DBT * val) +{ + register char *p; + uint16 free_space, n, off, pageno; + + p = (char *)sp; + n = sp[0]; + free_space = FREESPACE(sp); + off = OFFSET(sp); + + pageno = sp[n - 1]; + off -= key->size; + sp[n - 1] = off; + memmove(p + off, key->data, key->size); + off -= val->size; + sp[n] = off; + memmove(p + off, val->data, val->size); + sp[0] = n + 2; + sp[n + 1] = pageno; + sp[n + 2] = OVFLPAGE; + FREESPACE(sp) = free_space - PAIRSIZE(key, val); + OFFSET(sp) = off; +} + +static uint32 * +fetch_bitmap(HTAB *hashp, uint32 ndx) +{ + if (ndx >= (unsigned)hashp->nmaps) + return (NULL); + if ((hashp->mapp[ndx] = (uint32 *)malloc((size_t)hashp->BSIZE)) == NULL) + return (NULL); + if (__get_page(hashp, + (char *)hashp->mapp[ndx], hashp->BITMAPS[ndx], 0, 1, 1)) { + free(hashp->mapp[ndx]); + hashp->mapp[ndx] = NULL; /* NEW: 9-11-95 */ + return (NULL); + } + return (hashp->mapp[ndx]); +} + +#ifdef DEBUG4 +int +print_chain(int addr) +{ + BUFHEAD *bufp; + short *bp, oaddr; + + (void)fprintf(stderr, "%d ", addr); + bufp = __get_buf(hashp, addr, NULL, 0); + bp = (short *)bufp->page; + while (bp[0] && ((bp[bp[0]] == OVFLPAGE) || + ((bp[0] > 2) && bp[2] < REAL_KEY))) { + oaddr = bp[bp[0] - 1]; + (void)fprintf(stderr, "%d ", (int)oaddr); + bufp = __get_buf(hashp, (int)oaddr, bufp, 0); + bp = (short *)bufp->page; + } + (void)fprintf(stderr, "\n"); +} +#endif diff --git a/dbm/src/hash.c b/dbm/src/hash.c new file mode 100644 index 000000000..d984c5f30 --- /dev/null +++ b/dbm/src/hash.c @@ -0,0 +1,1260 @@ +/*- + * Copyright (c) 1990, 1993, 1994 + * The Regents of the University of California. All rights reserved. + * + * This code is derived from software contributed to Berkeley by + * Margo Seltzer. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by the University of + * California, Berkeley and its contributors. + * 4. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#if defined(LIBC_SCCS) && !defined(lint) +static char sccsid[] = "@(#)hash.c 8.9 (Berkeley) 6/16/94"; +#endif /* LIBC_SCCS and not lint */ + +#include "watcomfx.h" + +#if !defined(_WIN32) && !defined(_WINDOWS) && !defined(macintosh) && !defined(XP_OS2_VACPP) +#include <sys/param.h> +#endif + +#if !defined(macintosh) +#ifdef XP_OS2_EMX +#include <sys/types.h> +#endif +#include <sys/stat.h> +#endif + +#if defined(macintosh) +#include <unix.h> +#include <unistd.h> +#endif + +#include <errno.h> +#include <fcntl.h> +#include <stdio.h> +#include <stdlib.h> +#include <string.h> + +#if !defined(_WIN32) && !defined(_WINDOWS) && !defined(macintosh) && !defined(XP_OS2_VACPP) +#include <unistd.h> +#endif +#if defined(_WIN32) || defined(_WINDOWS) +#include <windows.h> +#endif + +#ifdef XP_OS2_VACPP +#include "types.h" +#define EPERM SOCEPERM +#endif + +#include <assert.h> + +#include "mcom_db.h" +#include "hash.h" +#include "page.h" + +/* +#include "extern.h" +*/ +static int alloc_segs __P((HTAB *, int)); +static int flush_meta __P((HTAB *)); +static int hash_access __P((HTAB *, ACTION, DBT *, DBT *)); +static int hash_close __P((DB *)); +static int hash_delete __P((const DB *, const DBT *, uint)); +static int hash_fd __P((const DB *)); +static int hash_get __P((const DB *, const DBT *, DBT *, uint)); +static int hash_put __P((const DB *, DBT *, const DBT *, uint)); +static void *hash_realloc __P((SEGMENT **, size_t, size_t)); +static int hash_seq __P((const DB *, DBT *, DBT *, uint)); +static int hash_sync __P((const DB *, uint)); +static int hdestroy __P((HTAB *)); +static HTAB *init_hash __P((HTAB *, const char *, HASHINFO *)); +static int init_htab __P((HTAB *, int)); +#if BYTE_ORDER == LITTLE_ENDIAN +static void swap_header __P((HTAB *)); +static void swap_header_copy __P((HASHHDR *, HASHHDR *)); +#endif + +/* Fast arithmetic, relying on powers of 2, */ +#define MOD(x, y) ((x) & ((y) - 1)) + +#define RETURN_ERROR(ERR, LOC) { save_errno = ERR; goto LOC; } + +/* Return values */ +#define SUCCESS (0) +#define DBM_ERROR (-1) +#define ABNORMAL (1) + +#ifdef HASH_STATISTICS +int hash_accesses, hash_collisions, hash_expansions, hash_overflows; +#endif + +/* A new Lou (montulli@mozilla.com) routine. + * + * The database is screwed. + * + * This closes the file, flushing buffers as appropriate. + */ +static void +__remove_database(DB *dbp) +{ + HTAB *hashp = (HTAB *)dbp->internal; + + assert(0); + + if (!hashp) + return; + hdestroy(hashp); + dbp->internal = NULL; +} + +/************************** INTERFACE ROUTINES ***************************/ +/* OPEN/CLOSE */ + + +extern DB * +__hash_open(const char *file, int flags, int mode, const HASHINFO *info, int dflags) +{ + HTAB *hashp=NULL; + struct stat statbuf; + DB *dbp; + int bpages, hdrsize, new_table, nsegs, save_errno; + + if ((flags & O_ACCMODE) == O_WRONLY) { + errno = EINVAL; + RETURN_ERROR(ENOMEM, error0); + } + + /* zero the statbuffer so that + * we can check it for a non-zero + * date to see if stat succeeded + */ + memset(&statbuf, 0, sizeof(struct stat)); + + if (!(hashp = (HTAB *)calloc(1, sizeof(HTAB)))) + RETURN_ERROR(ENOMEM, error0); + hashp->fp = NO_FILE; + if(file) + hashp->filename = strdup(file); + + /* + * Even if user wants write only, we need to be able to read + * the actual file, so we need to open it read/write. But, the + * field in the hashp structure needs to be accurate so that + * we can check accesses. + */ + hashp->flags = flags; + + new_table = 0; + if (!file || (flags & O_TRUNC) || (stat(file, &statbuf) && (errno == ENOENT))) + { + if (errno == ENOENT) + errno = 0; /* Just in case someone looks at errno */ + new_table = 1; + } + else if(statbuf.st_mtime && statbuf.st_size == 0) + { + /* check for a zero length file and delete it + * if it exists + */ + new_table = 1; + } + hashp->file_size = statbuf.st_size; + + if (file) { + +#if defined(_WIN32) || defined(_WINDOWS) || defined (macintosh) || defined(XP_OS2_VACPP) + if ((hashp->fp = DBFILE_OPEN(file, flags | O_BINARY, mode)) == -1) + RETURN_ERROR(errno, error0); +#else + if ((hashp->fp = open(file, flags, mode)) == -1) + RETURN_ERROR(errno, error0); + (void)fcntl(hashp->fp, F_SETFD, 1); +/* We can't use fcntl because of NFS bugs. SIGH */ +#if 0 + { + struct flock fl; + memset(&fl, 0, sizeof(fl)); + fl.l_type = F_WRLCK; + if (fcntl(hashp->fp, F_SETLK, &fl) < 0) { +#ifdef DEBUG + fprintf(stderr, "unable to open %s because it's locked (flags=0x%x)\n", file, flags); +#endif + RETURN_ERROR(EACCES, error1); + } + } +#endif + +#endif + } + if (new_table) { + if (!init_hash(hashp, file, (HASHINFO *)info)) + RETURN_ERROR(errno, error1); + } else { + /* Table already exists */ + if (info && info->hash) + hashp->hash = info->hash; + else + hashp->hash = __default_hash; + + hdrsize = read(hashp->fp, (char *)&hashp->hdr, sizeof(HASHHDR)); +#if BYTE_ORDER == LITTLE_ENDIAN + swap_header(hashp); +#endif + if (hdrsize == -1) + RETURN_ERROR(errno, error1); + if (hdrsize != sizeof(HASHHDR)) + RETURN_ERROR(EFTYPE, error1); + /* Verify file type, versions and hash function */ + if (hashp->MAGIC != HASHMAGIC) + RETURN_ERROR(EFTYPE, error1); +#define OLDHASHVERSION 1 + if (hashp->VERSION != HASHVERSION && + hashp->VERSION != OLDHASHVERSION) + RETURN_ERROR(EFTYPE, error1); + if (hashp->hash(CHARKEY, sizeof(CHARKEY)) != hashp->H_CHARKEY) + RETURN_ERROR(EFTYPE, error1); + if (hashp->NKEYS < 0) { + /* + ** OOPS. Old bad database from previously busted + ** code. Blow it away. + */ + close(hashp->fp); + if (remove(file) < 0) { +#if defined(DEBUG) && defined(XP_UNIX) + fprintf(stderr, + "WARNING: You have an old bad cache.db file" + " '%s', and I couldn't remove it!\n", file); +#endif + } else { +#if defined(DEBUG) && defined(XP_UNIX) + fprintf(stderr, + "WARNING: I blew away your %s file because" + " it was bad due to a recently fixed bug\n", + file); +#endif + } + RETURN_ERROR(ENOENT, error0); + } + + /* + * Figure out how many segments we need. Max_Bucket is the + * maximum bucket number, so the number of buckets is + * max_bucket + 1. + */ + nsegs = (hashp->MAX_BUCKET + 1 + hashp->SGSIZE - 1) / + hashp->SGSIZE; + hashp->nsegs = 0; + if (alloc_segs(hashp, nsegs)) + /* + * If alloc_segs fails, table will have been destroyed + * and errno will have been set. + */ + RETURN_ERROR(ENOMEM, error0); + /* Read in bitmaps */ + bpages = (hashp->SPARES[hashp->OVFL_POINT] + + (hashp->BSIZE << BYTE_SHIFT) - 1) >> + (hashp->BSHIFT + BYTE_SHIFT); + + hashp->nmaps = bpages; + (void)memset(&hashp->mapp[0], 0, bpages * sizeof(uint32 *)); + } + + /* Initialize Buffer Manager */ + if (info && info->cachesize) + __buf_init(hashp, (int32) info->cachesize); + else + __buf_init(hashp, DEF_BUFSIZE); + + hashp->new_file = new_table; +#ifdef macintosh + hashp->save_file = file && !(hashp->flags & O_RDONLY); +#else + hashp->save_file = file && (hashp->flags & O_RDWR); +#endif + hashp->cbucket = -1; + if (!(dbp = (DB *)malloc(sizeof(DB)))) { + save_errno = errno; + hdestroy(hashp); + errno = save_errno; + RETURN_ERROR(ENOMEM, error0); + } + dbp->internal = hashp; + dbp->close = hash_close; + dbp->del = hash_delete; + dbp->fd = hash_fd; + dbp->get = hash_get; + dbp->put = hash_put; + dbp->seq = hash_seq; + dbp->sync = hash_sync; + dbp->type = DB_HASH; + +#if 0 +#if defined(DEBUG) && !defined(_WINDOWS) +{ +extern int MKLib_trace_flag; + + if(MKLib_trace_flag) + (void)fprintf(stderr, +"%s\n%s%lx\n%s%d\n%s%d\n%s%d\n%s%d\n%s%d\n%s%d\n%s%d\n%s%d\n%s%d\n%s%x\n%s%x\n%s%d\n%s%d\n", + "init_htab:", + "TABLE POINTER ", (unsigned long) hashp, + "BUCKET SIZE ", hashp->BSIZE, + "BUCKET SHIFT ", hashp->BSHIFT, + "DIRECTORY SIZE ", hashp->DSIZE, + "SEGMENT SIZE ", hashp->SGSIZE, + "SEGMENT SHIFT ", hashp->SSHIFT, + "FILL FACTOR ", hashp->FFACTOR, + "MAX BUCKET ", hashp->MAX_BUCKET, + "OVFL POINT ", hashp->OVFL_POINT, + "LAST FREED ", hashp->LAST_FREED, + "HIGH MASK ", hashp->HIGH_MASK, + "LOW MASK ", hashp->LOW_MASK, + "NSEGS ", hashp->nsegs, + "NKEYS ", hashp->NKEYS); +} +#endif +#endif /* 0 */ +#ifdef HASH_STATISTICS + hash_overflows = hash_accesses = hash_collisions = hash_expansions = 0; +#endif + return (dbp); + +error1: + if (hashp != NULL) + (void)close(hashp->fp); + +error0: + free(hashp); + errno = save_errno; + return (NULL); +} + +static int +hash_close(DB *dbp) +{ + HTAB *hashp; + int retval; + + if (!dbp) + return (DBM_ERROR); + + hashp = (HTAB *)dbp->internal; + if(!hashp) + return (DBM_ERROR); + + retval = hdestroy(hashp); + free(dbp); + return (retval); +} + +static int hash_fd(const DB *dbp) +{ + HTAB *hashp; + + if (!dbp) + return (DBM_ERROR); + + hashp = (HTAB *)dbp->internal; + if(!hashp) + return (DBM_ERROR); + + if (hashp->fp == -1) { + errno = ENOENT; + return (-1); + } + return (hashp->fp); +} + +/************************** LOCAL CREATION ROUTINES **********************/ +static HTAB * +init_hash(HTAB *hashp, const char *file, HASHINFO *info) +{ + struct stat statbuf; + int nelem; + + nelem = 1; + hashp->NKEYS = 0; + hashp->LORDER = BYTE_ORDER; + hashp->BSIZE = DEF_BUCKET_SIZE; + hashp->BSHIFT = DEF_BUCKET_SHIFT; + hashp->SGSIZE = DEF_SEGSIZE; + hashp->SSHIFT = DEF_SEGSIZE_SHIFT; + hashp->DSIZE = DEF_DIRSIZE; + hashp->FFACTOR = DEF_FFACTOR; + hashp->hash = __default_hash; + memset(hashp->SPARES, 0, sizeof(hashp->SPARES)); + memset(hashp->BITMAPS, 0, sizeof (hashp->BITMAPS)); + + /* Fix bucket size to be optimal for file system */ + if (file != NULL) { + if (stat(file, &statbuf)) + return (NULL); + +#if !defined(_WIN32) && !defined(_WINDOWS) && !defined(macintosh) && !defined(VMS) && !defined(XP_OS2) +#if defined(__QNX__) && !defined(__QNXNTO__) + hashp->BSIZE = 512; /* preferred blk size on qnx4 */ +#else + hashp->BSIZE = statbuf.st_blksize; +#endif + + /* new code added by Lou to reduce block + * size down below MAX_BSIZE + */ + if (hashp->BSIZE > MAX_BSIZE) + hashp->BSIZE = MAX_BSIZE; +#endif + hashp->BSHIFT = __log2((uint32)hashp->BSIZE); + } + + if (info) { + if (info->bsize) { + /* Round pagesize up to power of 2 */ + hashp->BSHIFT = __log2(info->bsize); + hashp->BSIZE = 1 << hashp->BSHIFT; + if (hashp->BSIZE > MAX_BSIZE) { + errno = EINVAL; + return (NULL); + } + } + if (info->ffactor) + hashp->FFACTOR = info->ffactor; + if (info->hash) + hashp->hash = info->hash; + if (info->nelem) + nelem = info->nelem; + if (info->lorder) { + if (info->lorder != BIG_ENDIAN && + info->lorder != LITTLE_ENDIAN) { + errno = EINVAL; + return (NULL); + } + hashp->LORDER = info->lorder; + } + } + /* init_htab should destroy the table and set errno if it fails */ + if (init_htab(hashp, nelem)) + return (NULL); + else + return (hashp); +} +/* + * This calls alloc_segs which may run out of memory. Alloc_segs will destroy + * the table and set errno, so we just pass the error information along. + * + * Returns 0 on No Error + */ +static int +init_htab(HTAB *hashp, int nelem) +{ + register int nbuckets, nsegs; + int l2; + + /* + * Divide number of elements by the fill factor and determine a + * desired number of buckets. Allocate space for the next greater + * power of two number of buckets. + */ + nelem = (nelem - 1) / hashp->FFACTOR + 1; + + l2 = __log2((uint32)PR_MAX(nelem, 2)); + nbuckets = 1 << l2; + + hashp->SPARES[l2] = l2 + 1; + hashp->SPARES[l2 + 1] = l2 + 1; + hashp->OVFL_POINT = l2; + hashp->LAST_FREED = 2; + + /* First bitmap page is at: splitpoint l2 page offset 1 */ + if (__ibitmap(hashp, (int)OADDR_OF(l2, 1), l2 + 1, 0)) + return (-1); + + hashp->MAX_BUCKET = hashp->LOW_MASK = nbuckets - 1; + hashp->HIGH_MASK = (nbuckets << 1) - 1; + hashp->HDRPAGES = ((PR_MAX(sizeof(HASHHDR), MINHDRSIZE) - 1) >> + hashp->BSHIFT) + 1; + + nsegs = (nbuckets - 1) / hashp->SGSIZE + 1; + nsegs = 1 << __log2((uint32)nsegs); + + if (nsegs > hashp->DSIZE) + hashp->DSIZE = nsegs; + return (alloc_segs(hashp, nsegs)); +} + +/********************** DESTROY/CLOSE ROUTINES ************************/ + +/* + * Flushes any changes to the file if necessary and destroys the hashp + * structure, freeing all allocated space. + */ +static int +hdestroy(HTAB *hashp) +{ + int i, save_errno; + + save_errno = 0; + +#ifdef HASH_STATISTICS + (void)fprintf(stderr, "hdestroy: accesses %ld collisions %ld\n", + hash_accesses, hash_collisions); + (void)fprintf(stderr, "hdestroy: expansions %ld\n", + hash_expansions); + (void)fprintf(stderr, "hdestroy: overflows %ld\n", + hash_overflows); + (void)fprintf(stderr, "keys %ld maxp %d segmentcount %d\n", + hashp->NKEYS, hashp->MAX_BUCKET, hashp->nsegs); + + for (i = 0; i < NCACHED; i++) + (void)fprintf(stderr, + "spares[%d] = %d\n", i, hashp->SPARES[i]); +#endif + /* + * Call on buffer manager to free buffers, and if required, + * write them to disk. + */ + if (__buf_free(hashp, 1, hashp->save_file)) + save_errno = errno; + if (hashp->dir) { + free(*hashp->dir); /* Free initial segments */ + /* Free extra segments */ + while (hashp->exsegs--) + free(hashp->dir[--hashp->nsegs]); + free(hashp->dir); + } + if (flush_meta(hashp) && !save_errno) + save_errno = errno; + /* Free Bigmaps */ + for (i = 0; i < hashp->nmaps; i++) + if (hashp->mapp[i]) + free(hashp->mapp[i]); + + if (hashp->fp != -1) + (void)close(hashp->fp); + + if(hashp->filename) { +#if defined(_WIN32) || defined(_WINDOWS) || defined(XP_OS2) + if (hashp->is_temp) + (void)unlink(hashp->filename); +#endif + free(hashp->filename); + } + if (hashp->tmp_buf) + free(hashp->tmp_buf); + if (hashp->tmp_key) + free(hashp->tmp_key); + free(hashp); + if (save_errno) { + errno = save_errno; + return (DBM_ERROR); + } + return (SUCCESS); +} + +#if defined(_WIN32) || defined(_WINDOWS) +/* + * Close and reopen file to force file length update on windows. + * + * Returns: + * 0 == OK + * -1 DBM_ERROR + */ +static int +update_EOF(HTAB *hashp) +{ +#if defined(DBM_REOPEN_ON_FLUSH) + char * file = hashp->filename; + off_t file_size; + int flags; + int mode = -1; + struct stat statbuf; + + memset(&statbuf, 0, sizeof statbuf); + + /* make sure we won't lose the file by closing it. */ + if (!file || (stat(file, &statbuf) && (errno == ENOENT))) { + /* pretend we did it. */ + return 0; + } + + (void)close(hashp->fp); + + flags = hashp->flags & ~(O_TRUNC | O_CREAT | O_EXCL); + + if ((hashp->fp = DBFILE_OPEN(file, flags | O_BINARY, mode)) == -1) + return -1; + file_size = lseek(hashp->fp, (off_t)0, SEEK_END); + if (file_size == -1) + return -1; + hashp->file_size = file_size; + return 0; +#else + int fd = hashp->fp; + off_t file_size = lseek(fd, (off_t)0, SEEK_END); + HANDLE handle = (HANDLE)_get_osfhandle(fd); + BOOL cool = FlushFileBuffers(handle); +#ifdef DEBUG3 + if (!cool) { + DWORD err = GetLastError(); + (void)fprintf(stderr, + "FlushFileBuffers failed, last error = %d, 0x%08x\n", + err, err); + } +#endif + if (file_size == -1) + return -1; + hashp->file_size = file_size; + return cool ? 0 : -1; +#endif +} +#endif + +/* + * Write modified pages to disk + * + * Returns: + * 0 == OK + * -1 DBM_ERROR + */ +static int +hash_sync(const DB *dbp, uint flags) +{ + HTAB *hashp; + + if (flags != 0) { + errno = EINVAL; + return (DBM_ERROR); + } + + if (!dbp) + return (DBM_ERROR); + + hashp = (HTAB *)dbp->internal; + if(!hashp) + return (DBM_ERROR); + + if (!hashp->save_file) + return (0); + if (__buf_free(hashp, 0, 1) || flush_meta(hashp)) + return (DBM_ERROR); +#if defined(_WIN32) || defined(_WINDOWS) + if (hashp->updateEOF && hashp->filename && !hashp->is_temp) { + int status = update_EOF(hashp); + hashp->updateEOF = 0; + if (status) + return status; + } +#endif + hashp->new_file = 0; + return (0); +} + +/* + * Returns: + * 0 == OK + * -1 indicates that errno should be set + */ +static int +flush_meta(HTAB *hashp) +{ + HASHHDR *whdrp; +#if BYTE_ORDER == LITTLE_ENDIAN + HASHHDR whdr; +#endif + int fp, i, wsize; + + if (!hashp->save_file) + return (0); + hashp->MAGIC = HASHMAGIC; + hashp->VERSION = HASHVERSION; + hashp->H_CHARKEY = hashp->hash(CHARKEY, sizeof(CHARKEY)); + + fp = hashp->fp; + whdrp = &hashp->hdr; +#if BYTE_ORDER == LITTLE_ENDIAN + whdrp = &whdr; + swap_header_copy(&hashp->hdr, whdrp); +#endif + if ((lseek(fp, (off_t)0, SEEK_SET) == -1) || + ((wsize = write(fp, (char*)whdrp, sizeof(HASHHDR))) == -1)) + return (-1); + else + if (wsize != sizeof(HASHHDR)) { + errno = EFTYPE; + hashp->dbmerrno = errno; + return (-1); + } + for (i = 0; i < NCACHED; i++) + if (hashp->mapp[i]) + if (__put_page(hashp, (char *)hashp->mapp[i], + hashp->BITMAPS[i], 0, 1)) + return (-1); + return (0); +} + +/*******************************SEARCH ROUTINES *****************************/ +/* + * All the access routines return + * + * Returns: + * 0 on SUCCESS + * 1 to indicate an external DBM_ERROR (i.e. key not found, etc) + * -1 to indicate an internal DBM_ERROR (i.e. out of memory, etc) + */ +static int +hash_get( + const DB *dbp, + const DBT *key, + DBT *data, + uint flag) +{ + HTAB *hashp; + int rv; + + hashp = (HTAB *)dbp->internal; + if (!hashp) + return (DBM_ERROR); + + if (flag) { + hashp->dbmerrno = errno = EINVAL; + return (DBM_ERROR); + } + + rv = hash_access(hashp, HASH_GET, (DBT *)key, data); + + if(rv == DATABASE_CORRUPTED_ERROR) + { +#if defined(unix) && defined(DEBUG) + printf("\n\nDBM Database has been corrupted, tell Lou...\n\n"); +#endif + __remove_database((DB *)dbp); + } + + return(rv); +} + +static int +hash_put( + const DB *dbp, + DBT *key, + const DBT *data, + uint flag) +{ + HTAB *hashp; + int rv; + + hashp = (HTAB *)dbp->internal; + if (!hashp) + return (DBM_ERROR); + + if (flag && flag != R_NOOVERWRITE) { + hashp->dbmerrno = errno = EINVAL; + return (DBM_ERROR); + } + if ((hashp->flags & O_ACCMODE) == O_RDONLY) { + hashp->dbmerrno = errno = EPERM; + return (DBM_ERROR); + } + + rv = hash_access(hashp, flag == R_NOOVERWRITE ? + HASH_PUTNEW : HASH_PUT, (DBT *)key, (DBT *)data); + + if(rv == DATABASE_CORRUPTED_ERROR) + { +#if defined(unix) && defined(DEBUG) + printf("\n\nDBM Database has been corrupted, tell Lou...\n\n"); +#endif + __remove_database((DB *)dbp); + } + + return(rv); +} + +static int +hash_delete( + const DB *dbp, + const DBT *key, + uint flag) /* Ignored */ +{ + HTAB *hashp; + int rv; + + hashp = (HTAB *)dbp->internal; + if (!hashp) + return (DBM_ERROR); + + if (flag && flag != R_CURSOR) { + hashp->dbmerrno = errno = EINVAL; + return (DBM_ERROR); + } + if ((hashp->flags & O_ACCMODE) == O_RDONLY) { + hashp->dbmerrno = errno = EPERM; + return (DBM_ERROR); + } + rv = hash_access(hashp, HASH_DELETE, (DBT *)key, NULL); + + if(rv == DATABASE_CORRUPTED_ERROR) + { +#if defined(unix) && defined(DEBUG) + printf("\n\nDBM Database has been corrupted, tell Lou...\n\n"); +#endif + __remove_database((DB *)dbp); + } + + return(rv); +} + +#define MAX_OVERFLOW_HASH_ACCESS_LOOPS 2000 +/* + * Assume that hashp has been set in wrapper routine. + */ +static int +hash_access( + HTAB *hashp, + ACTION action, + DBT *key, DBT *val) +{ + register BUFHEAD *rbufp; + BUFHEAD *bufp, *save_bufp; + register uint16 *bp; + register long n, ndx, off; + register size_t size; + register char *kp; + uint16 pageno; + uint32 ovfl_loop_count=0; + int32 last_overflow_page_no = -1; + +#ifdef HASH_STATISTICS + hash_accesses++; +#endif + + off = hashp->BSIZE; + size = key->size; + kp = (char *)key->data; + rbufp = __get_buf(hashp, __call_hash(hashp, kp, size), NULL, 0); + if (!rbufp) + return (DATABASE_CORRUPTED_ERROR); + save_bufp = rbufp; + + /* Pin the bucket chain */ + rbufp->flags |= BUF_PIN; + for (bp = (uint16 *)rbufp->page, n = *bp++, ndx = 1; ndx < n;) + { + + if (bp[1] >= REAL_KEY) { + /* Real key/data pair */ + if (size == (unsigned long)(off - *bp) && + memcmp(kp, rbufp->page + *bp, size) == 0) + goto found; + off = bp[1]; +#ifdef HASH_STATISTICS + hash_collisions++; +#endif + bp += 2; + ndx += 2; + } else if (bp[1] == OVFLPAGE) { + + /* database corruption: overflow loop detection */ + if(last_overflow_page_no == (int32)*bp) + return (DATABASE_CORRUPTED_ERROR); + + last_overflow_page_no = *bp; + + rbufp = __get_buf(hashp, *bp, rbufp, 0); + if (!rbufp) { + save_bufp->flags &= ~BUF_PIN; + return (DBM_ERROR); + } + + ovfl_loop_count++; + if(ovfl_loop_count > MAX_OVERFLOW_HASH_ACCESS_LOOPS) + return (DATABASE_CORRUPTED_ERROR); + + /* FOR LOOP INIT */ + bp = (uint16 *)rbufp->page; + n = *bp++; + ndx = 1; + off = hashp->BSIZE; + } else if (bp[1] < REAL_KEY) { + if ((ndx = + __find_bigpair(hashp, rbufp, ndx, kp, (int)size)) > 0) + goto found; + if (ndx == -2) { + bufp = rbufp; + if (!(pageno = + __find_last_page(hashp, &bufp))) { + ndx = 0; + rbufp = bufp; + break; /* FOR */ + } + rbufp = __get_buf(hashp, pageno, bufp, 0); + if (!rbufp) { + save_bufp->flags &= ~BUF_PIN; + return (DBM_ERROR); + } + /* FOR LOOP INIT */ + bp = (uint16 *)rbufp->page; + n = *bp++; + ndx = 1; + off = hashp->BSIZE; + } else { + save_bufp->flags &= ~BUF_PIN; + return (DBM_ERROR); + + } + } + } + + /* Not found */ + switch (action) { + case HASH_PUT: + case HASH_PUTNEW: + if (__addel(hashp, rbufp, key, val)) { + save_bufp->flags &= ~BUF_PIN; + return (DBM_ERROR); + } else { + save_bufp->flags &= ~BUF_PIN; + return (SUCCESS); + } + case HASH_GET: + case HASH_DELETE: + default: + save_bufp->flags &= ~BUF_PIN; + return (ABNORMAL); + } + +found: + switch (action) { + case HASH_PUTNEW: + save_bufp->flags &= ~BUF_PIN; + return (ABNORMAL); + case HASH_GET: + bp = (uint16 *)rbufp->page; + if (bp[ndx + 1] < REAL_KEY) { + if (__big_return(hashp, rbufp, ndx, val, 0)) + return (DBM_ERROR); + } else { + val->data = (uint8 *)rbufp->page + (int)bp[ndx + 1]; + val->size = bp[ndx] - bp[ndx + 1]; + } + break; + case HASH_PUT: + if ((__delpair(hashp, rbufp, ndx)) || + (__addel(hashp, rbufp, key, val))) { + save_bufp->flags &= ~BUF_PIN; + return (DBM_ERROR); + } + break; + case HASH_DELETE: + if (__delpair(hashp, rbufp, ndx)) + return (DBM_ERROR); + break; + default: + abort(); + } + save_bufp->flags &= ~BUF_PIN; + return (SUCCESS); +} + +static int +hash_seq( + const DB *dbp, + DBT *key, DBT *data, + uint flag) +{ + register uint32 bucket; + register BUFHEAD *bufp; + HTAB *hashp; + uint16 *bp, ndx; + + hashp = (HTAB *)dbp->internal; + if (!hashp) + return (DBM_ERROR); + + if (flag && flag != R_FIRST && flag != R_NEXT) { + hashp->dbmerrno = errno = EINVAL; + return (DBM_ERROR); + } +#ifdef HASH_STATISTICS + hash_accesses++; +#endif + if ((hashp->cbucket < 0) || (flag == R_FIRST)) { + hashp->cbucket = 0; + hashp->cndx = 1; + hashp->cpage = NULL; + } + + for (bp = NULL; !bp || !bp[0]; ) { + if (!(bufp = hashp->cpage)) { + for (bucket = hashp->cbucket; + bucket <= (uint32)hashp->MAX_BUCKET; + bucket++, hashp->cndx = 1) { + bufp = __get_buf(hashp, bucket, NULL, 0); + if (!bufp) + return (DBM_ERROR); + hashp->cpage = bufp; + bp = (uint16 *)bufp->page; + if (bp[0]) + break; + } + hashp->cbucket = bucket; + if (hashp->cbucket > hashp->MAX_BUCKET) { + hashp->cbucket = -1; + return (ABNORMAL); + } + } else + bp = (uint16 *)hashp->cpage->page; + +#ifdef DEBUG + assert(bp); + assert(bufp); +#endif + while (bp[hashp->cndx + 1] == OVFLPAGE) { + bufp = hashp->cpage = + __get_buf(hashp, bp[hashp->cndx], bufp, 0); + if (!bufp) + return (DBM_ERROR); + bp = (uint16 *)(bufp->page); + hashp->cndx = 1; + } + if (!bp[0]) { + hashp->cpage = NULL; + ++hashp->cbucket; + } + } + ndx = hashp->cndx; + if (bp[ndx + 1] < REAL_KEY) { + if (__big_keydata(hashp, bufp, key, data, 1)) + return (DBM_ERROR); + } else { + key->data = (uint8 *)hashp->cpage->page + bp[ndx]; + key->size = (ndx > 1 ? bp[ndx - 1] : hashp->BSIZE) - bp[ndx]; + data->data = (uint8 *)hashp->cpage->page + bp[ndx + 1]; + data->size = bp[ndx] - bp[ndx + 1]; + ndx += 2; + if (ndx > bp[0]) { + hashp->cpage = NULL; + hashp->cbucket++; + hashp->cndx = 1; + } else + hashp->cndx = ndx; + } + return (SUCCESS); +} + +/********************************* UTILITIES ************************/ + +/* + * Returns: + * 0 ==> OK + * -1 ==> Error + */ +extern int +__expand_table(HTAB *hashp) +{ + uint32 old_bucket, new_bucket; + int new_segnum, spare_ndx; + size_t dirsize; + +#ifdef HASH_STATISTICS + hash_expansions++; +#endif + new_bucket = ++hashp->MAX_BUCKET; + old_bucket = (hashp->MAX_BUCKET & hashp->LOW_MASK); + + new_segnum = new_bucket >> hashp->SSHIFT; + + /* Check if we need a new segment */ + if (new_segnum >= hashp->nsegs) { + /* Check if we need to expand directory */ + if (new_segnum >= hashp->DSIZE) { + /* Reallocate directory */ + dirsize = hashp->DSIZE * sizeof(SEGMENT *); + if (!hash_realloc(&hashp->dir, dirsize, dirsize << 1)) + return (-1); + hashp->DSIZE = dirsize << 1; + } + if ((hashp->dir[new_segnum] = + (SEGMENT)calloc((size_t)hashp->SGSIZE, sizeof(SEGMENT))) == NULL) + return (-1); + hashp->exsegs++; + hashp->nsegs++; + } + /* + * If the split point is increasing (MAX_BUCKET's log base 2 + * * increases), we need to copy the current contents of the spare + * split bucket to the next bucket. + */ + spare_ndx = __log2((uint32)(hashp->MAX_BUCKET + 1)); + if (spare_ndx > hashp->OVFL_POINT) { + hashp->SPARES[spare_ndx] = hashp->SPARES[hashp->OVFL_POINT]; + hashp->OVFL_POINT = spare_ndx; + } + + if (new_bucket > (uint32)hashp->HIGH_MASK) { + /* Starting a new doubling */ + hashp->LOW_MASK = hashp->HIGH_MASK; + hashp->HIGH_MASK = new_bucket | hashp->LOW_MASK; + } + /* Relocate records to the new bucket */ + return (__split_page(hashp, old_bucket, new_bucket)); +} + +/* + * If realloc guarantees that the pointer is not destroyed if the realloc + * fails, then this routine can go away. + */ +static void * +hash_realloc( + SEGMENT **p_ptr, + size_t oldsize, size_t newsize) +{ + register void *p; + + if ((p = malloc(newsize))) { + memmove(p, *p_ptr, oldsize); + memset((char *)p + oldsize, 0, newsize - oldsize); + free(*p_ptr); + *p_ptr = (SEGMENT *)p; + } + return (p); +} + +extern uint32 +__call_hash(HTAB *hashp, char *k, size_t len) +{ + uint32 n, bucket; + + n = hashp->hash(k, len); + bucket = n & hashp->HIGH_MASK; + if (bucket > (uint32)hashp->MAX_BUCKET) + bucket = bucket & hashp->LOW_MASK; + return (bucket); +} + +/* + * Allocate segment table. On error, destroy the table and set errno. + * + * Returns 0 on success + */ +static int +alloc_segs( + HTAB *hashp, + int nsegs) +{ + register int i; + register SEGMENT store; + + int save_errno; + + if ((hashp->dir = + (SEGMENT *)calloc((size_t)hashp->DSIZE, sizeof(SEGMENT *))) == NULL) { + save_errno = errno; + (void)hdestroy(hashp); + errno = save_errno; + return (-1); + } + /* Allocate segments */ + if ((store = + (SEGMENT)calloc((size_t)nsegs << hashp->SSHIFT, sizeof(SEGMENT))) == NULL) { + save_errno = errno; + (void)hdestroy(hashp); + errno = save_errno; + return (-1); + } + for (i = 0; i < nsegs; i++, hashp->nsegs++) + hashp->dir[i] = &store[i << hashp->SSHIFT]; + return (0); +} + +#if BYTE_ORDER == LITTLE_ENDIAN +/* + * Hashp->hdr needs to be byteswapped. + */ +static void +swap_header_copy( + HASHHDR *srcp, HASHHDR *destp) +{ + int i; + + P_32_COPY(srcp->magic, destp->magic); + P_32_COPY(srcp->version, destp->version); + P_32_COPY(srcp->lorder, destp->lorder); + P_32_COPY(srcp->bsize, destp->bsize); + P_32_COPY(srcp->bshift, destp->bshift); + P_32_COPY(srcp->dsize, destp->dsize); + P_32_COPY(srcp->ssize, destp->ssize); + P_32_COPY(srcp->sshift, destp->sshift); + P_32_COPY(srcp->ovfl_point, destp->ovfl_point); + P_32_COPY(srcp->last_freed, destp->last_freed); + P_32_COPY(srcp->max_bucket, destp->max_bucket); + P_32_COPY(srcp->high_mask, destp->high_mask); + P_32_COPY(srcp->low_mask, destp->low_mask); + P_32_COPY(srcp->ffactor, destp->ffactor); + P_32_COPY(srcp->nkeys, destp->nkeys); + P_32_COPY(srcp->hdrpages, destp->hdrpages); + P_32_COPY(srcp->h_charkey, destp->h_charkey); + for (i = 0; i < NCACHED; i++) { + P_32_COPY(srcp->spares[i], destp->spares[i]); + P_16_COPY(srcp->bitmaps[i], destp->bitmaps[i]); + } +} + +static void +swap_header(HTAB *hashp) +{ + HASHHDR *hdrp; + int i; + + hdrp = &hashp->hdr; + + M_32_SWAP(hdrp->magic); + M_32_SWAP(hdrp->version); + M_32_SWAP(hdrp->lorder); + M_32_SWAP(hdrp->bsize); + M_32_SWAP(hdrp->bshift); + M_32_SWAP(hdrp->dsize); + M_32_SWAP(hdrp->ssize); + M_32_SWAP(hdrp->sshift); + M_32_SWAP(hdrp->ovfl_point); + M_32_SWAP(hdrp->last_freed); + M_32_SWAP(hdrp->max_bucket); + M_32_SWAP(hdrp->high_mask); + M_32_SWAP(hdrp->low_mask); + M_32_SWAP(hdrp->ffactor); + M_32_SWAP(hdrp->nkeys); + M_32_SWAP(hdrp->hdrpages); + M_32_SWAP(hdrp->h_charkey); + for (i = 0; i < NCACHED; i++) { + M_32_SWAP(hdrp->spares[i]); + M_16_SWAP(hdrp->bitmaps[i]); + } +} +#endif diff --git a/dbm/src/hash_buf.c b/dbm/src/hash_buf.c new file mode 100644 index 000000000..d1193de6f --- /dev/null +++ b/dbm/src/hash_buf.c @@ -0,0 +1,414 @@ +/*- + * Copyright (c) 1990, 1993, 1994 + * The Regents of the University of California. All rights reserved. + * + * This code is derived from software contributed to Berkeley by + * Margo Seltzer. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by the University of + * California, Berkeley and its contributors. + * 4. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#if defined(LIBC_SCCS) && !defined(lint) +static char sccsid[] = "@(#)hash_buf.c 8.5 (Berkeley) 7/15/94"; +#endif /* LIBC_SCCS and not lint */ + +#include "watcomfx.h" + +/* + * PACKAGE: hash + * + * DESCRIPTION: + * Contains buffer management + * + * ROUTINES: + * External + * __buf_init + * __get_buf + * __buf_free + * __reclaim_buf + * Internal + * newbuf + */ +#if !defined(_WIN32) && !defined(_WINDOWS) && !defined(macintosh) && !defined(XP_OS2_VACPP) +#include <sys/param.h> +#endif + +#include <errno.h> +#include <stddef.h> +#include <stdio.h> +#include <stdlib.h> +#include <string.h> + +#ifdef DEBUG +#include <assert.h> +#endif + +#include "mcom_db.h" +#include "hash.h" +#include "page.h" +/* #include "extern.h" */ + +static BUFHEAD *newbuf __P((HTAB *, uint32, BUFHEAD *)); + +/* Unlink B from its place in the lru */ +#define BUF_REMOVE(B) { \ + (B)->prev->next = (B)->next; \ + (B)->next->prev = (B)->prev; \ +} + +/* Insert B after P */ +#define BUF_INSERT(B, P) { \ + (B)->next = (P)->next; \ + (B)->prev = (P); \ + (P)->next = (B); \ + (B)->next->prev = (B); \ +} + +#define MRU hashp->bufhead.next +#define LRU hashp->bufhead.prev + +#define MRU_INSERT(B) BUF_INSERT((B), &hashp->bufhead) +#define LRU_INSERT(B) BUF_INSERT((B), LRU) + +/* + * We are looking for a buffer with address "addr". If prev_bp is NULL, then + * address is a bucket index. If prev_bp is not NULL, then it points to the + * page previous to an overflow page that we are trying to find. + * + * CAVEAT: The buffer header accessed via prev_bp's ovfl field may no longer + * be valid. Therefore, you must always verify that its address matches the + * address you are seeking. + */ +extern BUFHEAD * +__get_buf(HTAB *hashp, uint32 addr, BUFHEAD *prev_bp, int newpage) +/* If prev_bp set, indicates a new overflow page. */ +{ + register BUFHEAD *bp; + register uint32 is_disk_mask; + register int is_disk, segment_ndx = 0; + SEGMENT segp = 0; + + is_disk = 0; + is_disk_mask = 0; + if (prev_bp) { + bp = prev_bp->ovfl; + if (!bp || (bp->addr != addr)) + bp = NULL; + if (!newpage) + is_disk = BUF_DISK; + } else { + /* Grab buffer out of directory */ + segment_ndx = addr & (hashp->SGSIZE - 1); + + /* valid segment ensured by __call_hash() */ + segp = hashp->dir[addr >> hashp->SSHIFT]; +#ifdef DEBUG + assert(segp != NULL); +#endif + + bp = PTROF(segp[segment_ndx]); + + is_disk_mask = ISDISK(segp[segment_ndx]); + is_disk = is_disk_mask || !hashp->new_file; + } + + if (!bp) { + bp = newbuf(hashp, addr, prev_bp); + if (!bp) + return(NULL); + if(__get_page(hashp, bp->page, addr, !prev_bp, is_disk, 0)) + { + /* free bp and its page */ + if(prev_bp) + { + /* if prev_bp is set then the new page that + * failed is hooked onto prev_bp as an overflow page. + * if we don't remove the pointer to the bad page + * we may try and access it later and we will die + * horribly because it will have already been + * free'd and overwritten with bogus data. + */ + prev_bp->ovfl = NULL; + } + BUF_REMOVE(bp); + free(bp->page); + free(bp); + return (NULL); + } + + if (!prev_bp) + { +#if 0 + /* 16 bit windows and mac can't handle the + * oring of the is disk flag. + */ + segp[segment_ndx] = + (BUFHEAD *)((ptrdiff_t)bp | is_disk_mask); +#else + /* set the is_disk thing inside the structure + */ + bp->is_disk = is_disk_mask; + segp[segment_ndx] = bp; +#endif + } + } else { + BUF_REMOVE(bp); + MRU_INSERT(bp); + } + return (bp); +} + +/* + * We need a buffer for this page. Either allocate one, or evict a resident + * one (if we have as many buffers as we're allowed) and put this one in. + * + * If newbuf finds an error (returning NULL), it also sets errno. + */ +static BUFHEAD * +newbuf(HTAB *hashp, uint32 addr, BUFHEAD *prev_bp) +{ + register BUFHEAD *bp; /* The buffer we're going to use */ + register BUFHEAD *xbp; /* Temp pointer */ + register BUFHEAD *next_xbp; + SEGMENT segp; + int segment_ndx; + uint16 oaddr, *shortp; + + oaddr = 0; + bp = LRU; + /* + * If LRU buffer is pinned, the buffer pool is too small. We need to + * allocate more buffers. + */ + if (hashp->nbufs || (bp->flags & BUF_PIN)) { + /* Allocate a new one */ + if ((bp = (BUFHEAD *)malloc(sizeof(BUFHEAD))) == NULL) + return (NULL); + + /* this memset is supposedly unnecessary but lets add + * it anyways. + */ + memset(bp, 0xff, sizeof(BUFHEAD)); + + if ((bp->page = (char *)malloc((size_t)hashp->BSIZE)) == NULL) { + free(bp); + return (NULL); + } + + /* this memset is supposedly unnecessary but lets add + * it anyways. + */ + memset(bp->page, 0xff, (size_t)hashp->BSIZE); + + if (hashp->nbufs) + hashp->nbufs--; + } else { + /* Kick someone out */ + BUF_REMOVE(bp); + /* + * If this is an overflow page with addr 0, it's already been + * flushed back in an overflow chain and initialized. + */ + if ((bp->addr != 0) || (bp->flags & BUF_BUCKET)) { + /* + * Set oaddr before __put_page so that you get it + * before bytes are swapped. + */ + shortp = (uint16 *)bp->page; + if (shortp[0]) + { + if(shortp[0] > (hashp->BSIZE / sizeof(uint16))) + { + return(NULL); + } + oaddr = shortp[shortp[0] - 1]; + } + if ((bp->flags & BUF_MOD) && __put_page(hashp, bp->page, + bp->addr, (int)IS_BUCKET(bp->flags), 0)) + return (NULL); + /* + * Update the pointer to this page (i.e. invalidate it). + * + * If this is a new file (i.e. we created it at open + * time), make sure that we mark pages which have been + * written to disk so we retrieve them from disk later, + * rather than allocating new pages. + */ + if (IS_BUCKET(bp->flags)) { + segment_ndx = bp->addr & (hashp->SGSIZE - 1); + segp = hashp->dir[bp->addr >> hashp->SSHIFT]; +#ifdef DEBUG + assert(segp != NULL); +#endif + + if (hashp->new_file && + ((bp->flags & BUF_MOD) || + ISDISK(segp[segment_ndx]))) + segp[segment_ndx] = (BUFHEAD *)BUF_DISK; + else + segp[segment_ndx] = NULL; + } + /* + * Since overflow pages can only be access by means of + * their bucket, free overflow pages associated with + * this bucket. + */ + for (xbp = bp; xbp->ovfl;) { + next_xbp = xbp->ovfl; + xbp->ovfl = 0; + xbp = next_xbp; + + /* leave pinned pages alone, we are still using + * them. */ + if (xbp->flags & BUF_PIN) { + continue; + } + + /* Check that ovfl pointer is up date. */ + if (IS_BUCKET(xbp->flags) || + (oaddr != xbp->addr)) + break; + + shortp = (uint16 *)xbp->page; + if (shortp[0]) + { + /* LJM is the number of reported + * pages way too much? + */ + if(shortp[0] > hashp->BSIZE/sizeof(uint16)) + return NULL; + /* set before __put_page */ + oaddr = shortp[shortp[0] - 1]; + } + if ((xbp->flags & BUF_MOD) && __put_page(hashp, + xbp->page, xbp->addr, 0, 0)) + return (NULL); + xbp->addr = 0; + xbp->flags = 0; + BUF_REMOVE(xbp); + LRU_INSERT(xbp); + } + } + } + + /* Now assign this buffer */ + bp->addr = addr; +#ifdef DEBUG1 + (void)fprintf(stderr, "NEWBUF1: %d->ovfl was %d is now %d\n", + bp->addr, (bp->ovfl ? bp->ovfl->addr : 0), 0); +#endif + bp->ovfl = NULL; + if (prev_bp) { + /* + * If prev_bp is set, this is an overflow page, hook it in to + * the buffer overflow links. + */ +#ifdef DEBUG1 + (void)fprintf(stderr, "NEWBUF2: %d->ovfl was %d is now %d\n", + prev_bp->addr, (prev_bp->ovfl ? bp->ovfl->addr : 0), + (bp ? bp->addr : 0)); +#endif + prev_bp->ovfl = bp; + bp->flags = 0; + } else + bp->flags = BUF_BUCKET; + MRU_INSERT(bp); + return (bp); +} + +extern void __buf_init(HTAB *hashp, int32 nbytes) +{ + BUFHEAD *bfp; + int npages; + + bfp = &(hashp->bufhead); + npages = (nbytes + hashp->BSIZE - 1) >> hashp->BSHIFT; + npages = PR_MAX(npages, MIN_BUFFERS); + + hashp->nbufs = npages; + bfp->next = bfp; + bfp->prev = bfp; + /* + * This space is calloc'd so these are already null. + * + * bfp->ovfl = NULL; + * bfp->flags = 0; + * bfp->page = NULL; + * bfp->addr = 0; + */ +} + +extern int +__buf_free(HTAB *hashp, int do_free, int to_disk) +{ + BUFHEAD *bp; + int status = -1; + + /* Need to make sure that buffer manager has been initialized */ + if (!LRU) + return (0); + for (bp = LRU; bp != &hashp->bufhead;) { + /* Check that the buffer is valid */ + if (bp->addr || IS_BUCKET(bp->flags)) { + if (to_disk && (bp->flags & BUF_MOD) && + (status = __put_page(hashp, bp->page, + bp->addr, IS_BUCKET(bp->flags), 0))) { + + if (do_free) { + if (bp->page) + free(bp->page); + BUF_REMOVE(bp); + free(bp); + } + + return (status); + } + } + /* Check if we are freeing stuff */ + if (do_free) { + if (bp->page) + free(bp->page); + BUF_REMOVE(bp); + free(bp); + bp = LRU; + } else + bp = bp->prev; + } + return (0); +} + +extern void +__reclaim_buf(HTAB *hashp, BUFHEAD *bp) +{ + bp->ovfl = 0; + bp->addr = 0; + bp->flags = 0; + BUF_REMOVE(bp); + LRU_INSERT(bp); +} diff --git a/dbm/src/hsearch.c b/dbm/src/hsearch.c new file mode 100644 index 000000000..fb8a58bad --- /dev/null +++ b/dbm/src/hsearch.c @@ -0,0 +1,108 @@ +/*- + * Copyright (c) 1990, 1993 + * The Regents of the University of California. All rights reserved. + * + * This code is derived from software contributed to Berkeley by + * Margo Seltzer. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by the University of + * California, Berkeley and its contributors. + * 4. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#if defined(LIBC_SCCS) && !defined(lint) +static char sccsid[] = "@(#)hsearch.c 8.4 (Berkeley) 7/21/94"; +#endif /* LIBC_SCCS and not lint */ + +#include "watcomfx.h" + +#ifndef macintosh +#include <sys/types.h> +#endif + +#include <fcntl.h> +#include <string.h> + +#include "mcom_db.h" +#include "hsearch.h" + +static DB *dbp = NULL; +static ENTRY retval; + +extern int +hcreate(uint nel) +{ + HASHINFO info; + + info.nelem = nel; + info.bsize = 256; + info.ffactor = 8; + info.cachesize = 0; + info.hash = NULL; + info.lorder = 0; + dbp = (DB *)__hash_open(NULL, O_CREAT | O_RDWR, 0600, &info, 0); + return ((int)dbp); +} + +extern ENTRY * +hsearch(ENTRY item, ACTION action) +{ + DBT key, val; + int status; + + if (!dbp) + return (NULL); + key.data = (uint8 *)item.key; + key.size = strlen(item.key) + 1; + + if (action == ENTER) { + val.data = (uint8 *)item.data; + val.size = strlen(item.data) + 1; + status = (dbp->put)(dbp, &key, &val, R_NOOVERWRITE); + if (status) + return (NULL); + } else { + /* FIND */ + status = (dbp->get)(dbp, &key, &val, 0); + if (status) + return (NULL); + else + item.data = (char *)val.data; + } + retval.key = item.key; + retval.data = item.data; + return (&retval); +} + +extern void +hdestroy() +{ + if (dbp) { + (void)(dbp->close)(dbp); + dbp = NULL; + } +} diff --git a/dbm/src/memmove.c b/dbm/src/memmove.c new file mode 100644 index 000000000..70eb1e5d2 --- /dev/null +++ b/dbm/src/memmove.c @@ -0,0 +1,150 @@ +#if defined(__sun) && !defined(__SVR4) +/*- + * Copyright (c) 1990, 1993 + * The Regents of the University of California. All rights reserved. + * + * This code is derived from software contributed to Berkeley by + * Chris Torek. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by the University of + * California, Berkeley and its contributors. + * 4. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#if defined(LIBC_SCCS) && !defined(lint) +static char sccsid[] = "@(#)bcopy.c 8.1 (Berkeley) 6/4/93"; +#endif /* LIBC_SCCS and not lint */ + +#include "watcomfx.h" + +#ifdef HAVE_SYS_CDEFS_H +#include <sys/cdefs.h> +#else +#include "cdefs.h" +#endif +#include <string.h> + +/* + * sizeof(word) MUST BE A POWER OF TWO + * SO THAT wmask BELOW IS ALL ONES + */ +typedef int word; /* "word" used for optimal copy speed */ + +#define wsize sizeof(word) +#define wmask (wsize - 1) + +/* + * Copy a block of memory, handling overlap. + * This is the routine that actually implements + * (the portable versions of) bcopy, memcpy, and memmove. + */ +#ifdef MEMCOPY +void * +memcpy(dst0, src0, length) +#else +#ifdef MEMMOVE +void * +memmove(dst0, src0, length) +#else +void +bcopy(src0, dst0, length) +#endif +#endif + void *dst0; + const void *src0; + register size_t length; +{ + register char *dst = dst0; + register const char *src = src0; + register size_t t; + + if (length == 0 || dst == src) /* nothing to do */ + goto done; + + /* + * Macros: loop-t-times; and loop-t-times, t>0 + */ +#define TLOOP(s) if (t) TLOOP1(s) +#define TLOOP1(s) do { s; } while (--t) + + if ((unsigned long)dst < (unsigned long)src) { + /* + * Copy forward. + */ + t = (int)src; /* only need low bits */ + if ((t | (int)dst) & wmask) { + /* + * Try to align operands. This cannot be done + * unless the low bits match. + */ + if ((t ^ (int)dst) & wmask || length < wsize) + t = length; + else + t = wsize - (t & wmask); + length -= t; + TLOOP1(*dst++ = *src++); + } + /* + * Copy whole words, then mop up any trailing bytes. + */ + t = length / wsize; + TLOOP(*(word *)dst = *(word *)src; src += wsize; dst += wsize); + t = length & wmask; + TLOOP(*dst++ = *src++); + } else { + /* + * Copy backwards. Otherwise essentially the same. + * Alignment works as before, except that it takes + * (t&wmask) bytes to align, not wsize-(t&wmask). + */ + src += length; + dst += length; + t = (int)src; + if ((t | (int)dst) & wmask) { + if ((t ^ (int)dst) & wmask || length <= wsize) + t = length; + else + t &= wmask; + length -= t; + TLOOP1(*--dst = *--src); + } + t = length / wsize; + TLOOP(src -= wsize; dst -= wsize; *(word *)dst = *(word *)src); + t = length & wmask; + TLOOP(*--dst = *--src); + } +done: +#if defined(MEMCOPY) || defined(MEMMOVE) + return (dst0); +#else + return; +#endif +} +#endif /* no __sgi */ + +/* Some compilers don't like an empty source file. */ +static int dummy = 0; diff --git a/dbm/src/mktemp.c b/dbm/src/mktemp.c new file mode 100644 index 000000000..574eb9fe5 --- /dev/null +++ b/dbm/src/mktemp.c @@ -0,0 +1,168 @@ +/* + * Copyright (c) 1987, 1993 + * The Regents of the University of California. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by the University of + * California, Berkeley and its contributors. + * 4. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#if defined(LIBC_SCCS) && !defined(lint) +static char sccsid[] = "@(#)mktemp.c 8.1 (Berkeley) 6/4/93"; +#endif /* LIBC_SCCS and not lint */ + +#include "watcomfx.h" + +#ifdef macintosh +#include <unix.h> +#else +#include <sys/types.h> +#include <sys/stat.h> +#endif +#include <fcntl.h> +#include <errno.h> +#include <stdio.h> +#include <ctype.h> +#include "mcom_db.h" + +#if !defined(_WINDOWS) && !defined(XP_OS2_VACPP) +#include <unistd.h> +#endif + +#ifdef XP_OS2_VACPP +#define ENOTDIR EBADPOS +#include <process.h> +#include <dirent.h> +#endif + +#ifdef _WINDOWS +#include <process.h> +#include "winfile.h" +#endif + +static int _gettemp(char *path, register int *doopen, int extraFlags); + +int +mkstemp(char *path) +{ +#ifdef XP_OS2 + FILE *temp = tmpfile(); + + return (temp ? fileno(temp) : -1); +#else + int fd; + + return (_gettemp(path, &fd, 0) ? fd : -1); +#endif +} + +int +mkstempflags(char *path, int extraFlags) +{ + int fd; + + return (_gettemp(path, &fd, extraFlags) ? fd : -1); +} + +char * +mktemp(char *path) +{ + return(_gettemp(path, (int *)NULL, 0) ? path : (char *)NULL); +} + +/* NB: This routine modifies its input string, and does not always restore it. +** returns 1 on success, 0 on failure. +*/ +static int +_gettemp(char *path, register int *doopen, int extraFlags) +{ +#if !defined(_WINDOWS) || defined(_WIN32) + extern int errno; +#endif + register char *start, *trv; + struct stat sbuf; + unsigned int pid; + + pid = getpid(); + for (trv = path; *trv; ++trv); /* extra X's get set to 0's */ + while (*--trv == 'X') { + *trv = (pid % 10) + '0'; + pid /= 10; + } + + /* + * check the target directory; if you have six X's and it + * doesn't exist this runs for a *very* long time. + */ + for (start = trv + 1;; --trv) { + char saved; + if (trv <= path) + break; + saved = *trv; + if (saved == '/' || saved == '\\') { + int rv; + *trv = '\0'; + rv = stat(path, &sbuf); + *trv = saved; + if (rv) + return(0); + if (!S_ISDIR(sbuf.st_mode)) { + errno = ENOTDIR; + return(0); + } + break; + } + } + + for (;;) { + if (doopen) { + if ((*doopen = + open(path, O_CREAT|O_EXCL|O_RDWR|extraFlags, 0600)) >= 0) + return(1); + if (errno != EEXIST) + return(0); + } + else if (stat(path, &sbuf)) + return(errno == ENOENT ? 1 : 0); + + /* tricky little algorithm for backward compatibility */ + for (trv = start;;) { + if (!*trv) + return(0); + if (*trv == 'z') + *trv++ = 'a'; + else { + if (isdigit(*trv)) + *trv = 'a'; + else + ++*trv; + break; + } + } + } + /*NOTREACHED*/ +} diff --git a/dbm/src/ndbm.c b/dbm/src/ndbm.c new file mode 100644 index 000000000..03d5cf381 --- /dev/null +++ b/dbm/src/ndbm.c @@ -0,0 +1,199 @@ +/*- + * Copyright (c) 1990, 1993 + * The Regents of the University of California. All rights reserved. + * + * This code is derived from software contributed to Berkeley by + * Margo Seltzer. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by the University of + * California, Berkeley and its contributors. + * 4. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#if defined(LIBC_SCCS) && !defined(lint) +static char sccsid[] = "@(#)ndbm.c 8.4 (Berkeley) 7/21/94"; +#endif /* LIBC_SCCS and not lint */ + +#include "watcomfx.h" + +/* + * This package provides a dbm compatible interface to the new hashing + * package described in db(3). + */ +#if !defined(_WIN32) && !defined(_WINDOWS) && !defined(XP_OS2_VACPP) +#include <sys/param.h> +#endif + +#if defined(__linux) +#include <linux/limits.h> +#endif + +#ifdef __OS2__ +#include "dirent.h" +#endif + +#include <stdio.h> +#include <string.h> + +#include "ndbm.h" +#include "hash.h" + +/* + * Returns: + * *DBM on success + * NULL on failure + */ +extern DBM * +dbm_open(const char *file, int flags, int mode) +{ + HASHINFO info; + char path[MAXPATHLEN]; + + info.bsize = 4096; + info.ffactor = 40; + info.nelem = 1; + info.cachesize = 0; + info.hash = NULL; + info.lorder = 0; + (void)strcpy(path, file); + (void)strcat(path, DBM_SUFFIX); + return ((DBM *)__hash_open(path, flags, mode, &info, 0)); +} + +extern void +dbm_close(DBM *db) +{ + (void)(db->close)(db); +} + +/* + * Returns: + * DATUM on success + * NULL on failure + */ +extern datum +dbm_fetch(DBM *db, datum key) +{ + datum retval; + int status; + + status = (db->get)(db, (DBT *)&key, (DBT *)&retval, 0); + if (status) { + retval.dptr = NULL; + retval.dsize = 0; + } + return (retval); +} + +/* + * Returns: + * DATUM on success + * NULL on failure + */ +extern datum +dbm_firstkey(DBM *db) +{ + int status; + datum retdata, retkey; + + status = (db->seq)(db, (DBT *)&retkey, (DBT *)&retdata, R_FIRST); + if (status) + retkey.dptr = NULL; + return (retkey); +} + +/* + * Returns: + * DATUM on success + * NULL on failure + */ +extern datum +dbm_nextkey(DBM *db) +{ + int status; + datum retdata, retkey; + + status = (db->seq)(db, (DBT *)&retkey, (DBT *)&retdata, R_NEXT); + if (status) + retkey.dptr = NULL; + return (retkey); +} +/* + * Returns: + * 0 on success + * <0 failure + */ +extern int +dbm_delete(DBM *db, datum key) +{ + int status; + + status = (db->del)(db, (DBT *)&key, 0); + if (status) + return (-1); + else + return (0); +} + +/* + * Returns: + * 0 on success + * <0 failure + * 1 if DBM_INSERT and entry exists + */ +extern int +dbm_store(DBM *db, datum key, datum content, int flags) +{ + return ((db->put)(db, (DBT *)&key, (DBT *)&content, + (flags == DBM_INSERT) ? R_NOOVERWRITE : 0)); +} + + +extern int +dbm_error(DBM *db) +{ + HTAB *hp; + + hp = (HTAB *)db->internal; + return (hp->dbmerrno); +} + +extern int +dbm_clearerr(DBM *db) +{ + HTAB *hp; + + hp = (HTAB *)db->internal; + hp->dbmerrno = 0; + return (0); +} + +extern int +dbm_dirfno(DBM *db) +{ + return(((HTAB *)db->internal)->fp); +} diff --git a/dbm/src/nsres.c b/dbm/src/nsres.c new file mode 100644 index 000000000..e383d58e5 --- /dev/null +++ b/dbm/src/nsres.c @@ -0,0 +1,307 @@ +#include "watcomfx.h" + +#include "nsres.h" + +#include <stdio.h> + +#include <stdlib.h> + +#include <string.h> + +struct RESDATABASE +{ + DB *hdb; + NSRESTHREADINFO *threadinfo; + char * pbuf[MAXBUFNUM]; +} ; +typedef struct RESDATABASE * RESHANDLE; + +typedef struct STRINGDATA +{ + char *str; + unsigned int charsetid; +} STRINGDATA; + + +typedef unsigned int CHARSETTYPE; +#define RES_LOCK if (hres->threadinfo) hres->threadinfo->fn_lock(hres->threadinfo->lock); +#define RES_UNLOCK if (hres->threadinfo) hres->threadinfo->fn_unlock(hres->threadinfo->lock); + +int GenKeyData(const char *library, int32 id, DBT *key); + +/* + Right now, the page size used for resource is same as for Navigator cache + database + */ +HASHINFO res_hash_info = { + 32*1024, + 0, + 0, + 0, + 0, /* 64 * 1024U */ + 0}; + +int GenKeyData(const char *library, int32 id, DBT *key) +{ + char idstr[10]; + static char * strdata = NULL; + size_t len; + + if (strdata) + free (strdata); + + if (id == 0) + idstr[0] = '\0'; + else + { + sprintf(idstr, "%d", id); + /* itoa(id, idstr, 10); */ + } + + if (library == NULL) + len = strlen(idstr) + 1; + else + len = strlen(library) + strlen(idstr) + 1; + strdata = (char *) malloc (len); + strcpy(strdata, library); + strcat(strdata, idstr); + + key->size = len; + key->data = strdata; + + return 1; +} + +NSRESHANDLE NSResCreateTable(const char *filename, NSRESTHREADINFO *threadinfo) +{ + RESHANDLE hres; + int flag; + + flag = O_RDWR | O_CREAT; + + hres = (RESHANDLE) malloc ( sizeof(struct RESDATABASE) ); + memset(hres, 0, sizeof(struct RESDATABASE)); + + if (threadinfo && threadinfo->lock && threadinfo->fn_lock + && threadinfo->fn_unlock) + { + hres->threadinfo = (NSRESTHREADINFO *) malloc( sizeof(NSRESTHREADINFO) ); + hres->threadinfo->lock = threadinfo->lock; + hres->threadinfo->fn_lock = threadinfo->fn_lock; + hres->threadinfo->fn_unlock = threadinfo->fn_unlock; + } + + + RES_LOCK + + hres->hdb = dbopen(filename, flag, 0644, DB_HASH, &res_hash_info); + + RES_UNLOCK + + if(!hres->hdb) + return NULL; + + return (NSRESHANDLE) hres; +} + +NSRESHANDLE NSResOpenTable(const char *filename, NSRESTHREADINFO *threadinfo) +{ + RESHANDLE hres; + int flag; + + flag = O_RDONLY; /* only open database for reading */ + + hres = (RESHANDLE) malloc ( sizeof(struct RESDATABASE) ); + memset(hres, 0, sizeof(struct RESDATABASE)); + + if (threadinfo && threadinfo->lock && threadinfo->fn_lock + && threadinfo->fn_unlock) + { + hres->threadinfo = (NSRESTHREADINFO *) malloc( sizeof(NSRESTHREADINFO) ); + hres->threadinfo->lock = threadinfo->lock; + hres->threadinfo->fn_lock = threadinfo->fn_lock; + hres->threadinfo->fn_unlock = threadinfo->fn_unlock; + } + + + RES_LOCK + + hres->hdb = dbopen(filename, flag, 0644, DB_HASH, &res_hash_info); + + RES_UNLOCK + + if(!hres->hdb) + return NULL; + + return (NSRESHANDLE) hres; +} + + + +void NSResCloseTable(NSRESHANDLE handle) +{ + RESHANDLE hres; + int i; + + if (handle == NULL) + return; + hres = (RESHANDLE) handle; + + RES_LOCK + + (*hres->hdb->sync)(hres->hdb, 0); + (*hres->hdb->close)(hres->hdb); + + RES_UNLOCK + + for (i = 0; i < MAXBUFNUM; i++) + { + if (hres->pbuf[i]) + free (hres->pbuf[i]); + } + + if (hres->threadinfo) + free (hres->threadinfo); + free (hres); +} + + +char *NSResLoadString(NSRESHANDLE handle, const char * library, int32 id, + unsigned int charsetid, char *retbuf) +{ + int status; + RESHANDLE hres; + DBT key, data; + if (handle == NULL) + return NULL; + + hres = (RESHANDLE) handle; + GenKeyData(library, id, &key); + + RES_LOCK + + status = (*hres->hdb->get)(hres->hdb, &key, &data, 0); + + RES_UNLOCK + + if (retbuf) + { + memcpy(retbuf, (char *)data.data + sizeof(CHARSETTYPE), data.size - sizeof(CHARSETTYPE)); + return retbuf; + } + else + { + static int WhichString = 0; + static int bFirstTime = 1; + char *szLoadedString; + int i; + + RES_LOCK + + if (bFirstTime) { + for (i = 0; i < MAXBUFNUM; i++) + hres->pbuf[i] = (char *) malloc(MAXSTRINGLEN * sizeof(char)); + bFirstTime = 0; + } + + szLoadedString = hres->pbuf[WhichString]; + WhichString++; + + /* reset to 0, if WhichString reaches to the end */ + if (WhichString == MAXBUFNUM) + WhichString = 0; + + if (status == 0) + memcpy(szLoadedString, (char *) data.data + sizeof(CHARSETTYPE), + data.size - sizeof(CHARSETTYPE)); + else + szLoadedString[0] = 0; + + RES_UNLOCK + + return szLoadedString; + } +} + +int32 NSResGetSize(NSRESHANDLE handle, const char *library, int32 id) +{ + int status; + RESHANDLE hres; + DBT key, data; + if (handle == NULL) + return 0; + hres = (RESHANDLE) handle; + GenKeyData(library, id, &key); + + RES_LOCK + + status = (*hres->hdb->get)(hres->hdb, &key, &data, 0); + + RES_UNLOCK + + return data.size - sizeof(CHARSETTYPE); +} + +int32 NSResLoadResource(NSRESHANDLE handle, const char *library, int32 id, char *retbuf) +{ + int status; + RESHANDLE hres; + DBT key, data; + if (handle == NULL) + return 0; + hres = (RESHANDLE) handle; + GenKeyData(library, id, &key); + + RES_LOCK + + status = (*hres->hdb->get)(hres->hdb, &key, &data, 0); + + RES_UNLOCK + + if (retbuf) + { + memcpy(retbuf, (char *)data.data + sizeof(CHARSETTYPE), data.size - sizeof(CHARSETTYPE)); + return data.size; + } + else + return 0; +} + +int NSResAddString(NSRESHANDLE handle, const char *library, int32 id, + const char *string, unsigned int charset) +{ + int status; + RESHANDLE hres; + DBT key, data; + char * recdata; + + if (handle == NULL) + return 0; + hres = (RESHANDLE) handle; + + GenKeyData(library, id, &key); + + data.size = sizeof(CHARSETTYPE) + (strlen(string) + 1) ; + + recdata = (char *) malloc(data.size) ; + + /* set charset to the first field of record data */ + *((CHARSETTYPE *)recdata) = (CHARSETTYPE)charset; + + /* set data field */ + memcpy(recdata+sizeof(CHARSETTYPE), string, strlen(string) + 1); + + data.data = recdata; + + RES_LOCK + + status = (*hres->hdb->put)(hres->hdb, &key, &data, 0); + + + if (recdata) + free(recdata); + + RES_UNLOCK + + return status; +} diff --git a/dbm/src/snprintf.c b/dbm/src/snprintf.c new file mode 100644 index 000000000..498778572 --- /dev/null +++ b/dbm/src/snprintf.c @@ -0,0 +1,75 @@ +#ifndef HAVE_SNPRINTF + +#include "watcomfx.h" +#include <sys/types.h> +#include <stddef.h> +#include <stdio.h> + +#ifdef HAVE_SYS_CDEFS_H +#include <sys/cdefs.h> +#else +#include "cdefs.h" +#endif + +#include "prtypes.h" + +#include <ncompat.h> + +/* The OS/2 VAC compiler doesn't appear to define __STDC__ and won't let us define it either */ +#if defined(__STDC__) || defined(XP_OS2_VACPP) +#include <stdarg.h> +#else +#include <varargs.h> +#endif + +int +#if defined(__STDC__) || defined(XP_OS2_VACPP) +snprintf(char *str, size_t n, const char *fmt, ...) +#else +snprintf(str, n, fmt, va_alist) + char *str; + size_t n; + const char *fmt; + va_dcl +#endif +{ + va_list ap; +#ifdef VSPRINTF_CHARSTAR + char *rp; +#else + int rval; +#endif +#if defined(__STDC__) || defined(XP_OS2_VACPP) + va_start(ap, fmt); +#else + va_start(ap); +#endif +#ifdef VSPRINTF_CHARSTAR + rp = vsprintf(str, fmt, ap); + va_end(ap); + return (strlen(rp)); +#else + rval = vsprintf(str, fmt, ap); + va_end(ap); + return (rval); +#endif +} + +int +vsnprintf(str, n, fmt, ap) + char *str; + size_t n; + const char *fmt; + va_list ap; +{ +#ifdef VSPRINTF_CHARSTAR + return (strlen(vsprintf(str, fmt, ap))); +#else + return (vsprintf(str, fmt, ap)); +#endif +} + +#endif /* HAVE_SNPRINTF */ + +/* Some compilers don't like an empty source file. */ +static int dummy = 0; diff --git a/dbm/src/strerror.c b/dbm/src/strerror.c new file mode 100644 index 000000000..d1ae2666a --- /dev/null +++ b/dbm/src/strerror.c @@ -0,0 +1,78 @@ +/* + * Copyright (c) 1988, 1993 + * The Regents of the University of California. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by the University of + * California, Berkeley and its contributors. + * 4. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#if defined(LIBC_SCCS) && !defined(lint) +static char sccsid[] = "@(#)strerror.c 8.1 (Berkeley) 6/4/93"; +#endif /* LIBC_SCCS and not lint */ + +#include "watcomfx.h" + +#include <string.h> + +#ifdef _DLL +#define sys_nerr (*_sys_nerr_dll) +#endif + +#ifndef HAVE_STRERROR +#ifndef _AFXDLL +char * +strerror(num) + int num; +{ + extern int sys_nerr; + extern char *sys_errlist[]; +#define UPREFIX "Unknown error: " + static char ebuf[40] = UPREFIX; /* 64-bit number + slop */ + register unsigned int errnum; + register char *p, *t; + char tmp[40]; + + errnum = num; /* convert to unsigned */ + if (errnum < sys_nerr) + return(sys_errlist[errnum]); + + /* Do this by hand, so we don't include stdio(3). */ + t = tmp; + do { + *t++ = "0123456789"[errnum % 10]; + } while (errnum /= 10); + for (p = ebuf + sizeof(UPREFIX) - 1;;) { + *p++ = *--t; + if (t <= tmp) + break; + } + return(ebuf); +} + +#endif +#endif /* !HAVE_STRERROR */ diff --git a/dbm/tests/.cvsignore b/dbm/tests/.cvsignore new file mode 100644 index 000000000..a21fbfc35 --- /dev/null +++ b/dbm/tests/.cvsignore @@ -0,0 +1,3 @@ +Makefile +lots +test.db diff --git a/dbm/tests/Makefile.in b/dbm/tests/Makefile.in new file mode 100644 index 000000000..96cbdf8b5 --- /dev/null +++ b/dbm/tests/Makefile.in @@ -0,0 +1,46 @@ +# +# The contents of this file are subject to the Netscape Public +# License Version 1.1 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy of +# the License at http://www.mozilla.org/NPL/ +# +# Software distributed under the License is distributed on an "AS +# IS" basis, WITHOUT WARRANTY OF 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 Netscape +# Communications Corporation. Portions created by Netscape are +# Copyright (C) 1998 Netscape Communications Corporation. All +# Rights Reserved. +# +# Contributor(s): +# + +DEPTH = ../.. +topsrcdir = @top_srcdir@ +srcdir = @srcdir@ +VPATH = @srcdir@ + +include $(DEPTH)/config/autoconf.mk + +MODULE = dbm +PROGRAM = lots$(BIN_SUFFIX) + +CSRCS = lots.c + +ifeq ($(OS_ARCH),WINNT) +EXTRA_DSO_LIBS = dbm$(MOZ_BITS) +else +EXTRA_DSO_LIBS = mozdbm_s +endif + +LIBS = $(EXTRA_DSO_LIBS) + +include $(topsrcdir)/config/rules.mk + +ifeq ($(OS_ARCH), Linux) +DEFINES += -D_BSD_SOURCE +endif diff --git a/dbm/tests/lots.c b/dbm/tests/lots.c new file mode 100644 index 000000000..0b3191e74 --- /dev/null +++ b/dbm/tests/lots.c @@ -0,0 +1,639 @@ +/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: NPL 1.1/GPL 2.0/LGPL 2.1 + * + * The contents of this file are subject to the Netscape Public License + * Version 1.1 (the "License"); you may not use this file except in + * compliance with the License. You may obtain a copy of the License at + * http://www.mozilla.org/NPL/ + * + * Software distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF 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 + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 1998 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * + * + * Alternatively, the contents of this file may be used under the terms of + * either the GNU General Public License Version 2 or later (the "GPL"), or + * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), + * in which case the provisions of the GPL or the LGPL are applicable instead + * of those above. If you wish to allow use of your version of this file only + * under the terms of either the GPL or the LGPL, and not to allow others to + * use your version of this file under the terms of the NPL, indicate your + * decision by deleting the provisions above and replace them with the notice + * and other provisions required by the GPL or the LGPL. If you do not delete + * the provisions above, a recipient may use your version of this file under + * the terms of any one of the NPL, the GPL or the LGPL. + * + * ***** END LICENSE BLOCK ***** */ + +/* use sequental numbers printed to strings + * to store lots and lots of entries in the + * database. + * + * Start with 100 entries, put them and then + * read them out. Then delete the first + * half and verify that all of the first half + * is gone and then verify that the second + * half is still there. + * Then add the first half back and verify + * again. Then delete the middle third + * and verify again. + * Then increase the size by 1000 and do + * the whole add delete thing again. + * + * The data for each object is the number string translated + * to hex and replicated a random number of times. The + * number of times that the data is replicated is the first + * int32 in the data. + */ + +#include <stdio.h> + +#include <stdlib.h> +#ifdef STDC_HEADERS +#include <stdarg.h> +#else +#include <varargs.h> +#endif + +#ifdef HAVE_MEMORY_H +#include <memory.h> +#endif +#include <string.h> +#include <assert.h> +#include "mcom_db.h" + +DB *database=0; +int MsgPriority=5; + +#if defined(_WINDOWS) && !defined(WIN32) +#define int32 long +#define uint32 unsigned long +#else +#define int32 int +#define uint32 unsigned int +#endif + +typedef enum { +USE_LARGE_KEY, +USE_SMALL_KEY +} key_type_enum; + +#define TraceMe(priority, msg) \ + do { \ + if(priority <= MsgPriority) \ + { \ + ReportStatus msg; \ + } \ + } while(0) + +int +ReportStatus(char *string, ...) +{ + va_list args; + +#ifdef STDC_HEADERS + va_start(args, string); +#else + va_start(args); +#endif + vfprintf(stderr, string, args); + va_end(args); + + fprintf (stderr, "\n"); + + return(0); +} + +int +ReportError(char *string, ...) +{ + va_list args; + +#ifdef STDC_HEADERS + va_start(args, string); +#else + va_start(args); +#endif + fprintf (stderr, "\n "); + vfprintf(stderr, string, args); + fprintf (stderr, "\n"); + va_end(args); + + return(0); +} + +DBT * MakeLargeKey(int32 num) +{ + int32 low_bits; + static DBT rv; + static char *string_rv=0; + int rep_char; + size_t size; + + if(string_rv) + free(string_rv); + + /* generate a really large text key derived from + * an int32 + */ + low_bits = (num % 10000) + 1; + + /* get the repeat char from the low 26 */ + rep_char = (char) ((low_bits % 26) + 'a'); + + /* malloc a string low_bits wide */ + size = low_bits*sizeof(char); + string_rv = (char *)malloc(size); + + memset(string_rv, rep_char, size); + + rv.data = string_rv; + rv.size = size; + + return(&rv); +} + +DBT * MakeSmallKey(int32 num) +{ + static DBT rv; + static char data_string[64]; + + rv.data = data_string; + + sprintf(data_string, "%ld", (long)num); + rv.size = strlen(data_string); + + return(&rv); + +} + +DBT * GenKey(int32 num, key_type_enum key_type) +{ + DBT *key; + + switch(key_type) + { + case USE_LARGE_KEY: + key = MakeLargeKey(num); + break; + case USE_SMALL_KEY: + key = MakeSmallKey(num); + break; + default: + abort(); + break; + } + + return(key); +} + +int +SeqDatabase() +{ + int status; + DBT key, data; + + ReportStatus("SEQuencing through database..."); + + /* seq throught the whole database */ + if(!(status = (*database->seq)(database, &key, &data, R_FIRST))) + { + while(!(status = (database->seq) (database, &key, &data, R_NEXT))); + ; /* null body */ + } + + if(status < 0) + ReportError("Error seq'ing database"); + + return(status); +} + +int +VerifyData(DBT *data, int32 num, key_type_enum key_type) +{ + int32 count, compare_num; + size_t size; + int32 *int32_array; + + /* The first int32 is count + * The other n entries should + * all equal num + */ + if(data->size < sizeof(int32)) + { + ReportError("Data size corrupted"); + return -1; + } + + memcpy(&count, data->data, sizeof(int32)); + + size = sizeof(int32)*(count+1); + + if(size != data->size) + { + ReportError("Data size corrupted"); + return -1; + } + + int32_array = (int32*)data->data; + + for(;count > 0; count--) + { + memcpy(&compare_num, &int32_array[count], sizeof(int32)); + + if(compare_num != num) + { + ReportError("Data corrupted"); + return -1; + } + } + + return(0); +} + + +/* verify that a range of number strings exist + * or don't exist. And that the data is valid + */ +#define SHOULD_EXIST 1 +#define SHOULD_NOT_EXIST 0 +int +VerifyRange(int32 low, int32 high, int32 should_exist, key_type_enum key_type) +{ + DBT *key, data; + int32 num; + int status; + + TraceMe(1, ("Verifying: %ld to %ld, using %s keys", + low, high, key_type == USE_SMALL_KEY ? "SMALL" : "LARGE")); + + for(num = low; num <= high; num++) + { + + key = GenKey(num, key_type); + + status = (*database->get)(database, key, &data, 0); + + if(status == 0) + { + /* got the item */ + if(!should_exist) + { + ReportError("Item exists but shouldn't: %ld", num); + } + else + { + /* else verify the data */ + VerifyData(&data, num, key_type); + } + } + else if(status > 0) + { + /* item not found */ + if(should_exist) + { + ReportError("Item not found but should be: %ld", num); + } + } + else + { + /* database error */ + ReportError("Database error"); + return(-1); + } + + } + + TraceMe(1, ("Correctly verified: %ld to %ld", low, high)); + + return(0); + +} + +DBT * +GenData(int32 num) +{ + int32 n; + static DBT *data=0; + int32 *int32_array; + size_t size; + + if(!data) + { + data = (DBT*)malloc(sizeof(DBT)); + data->size = 0; + data->data = 0; + } + else if(data->data) + { + free(data->data); + } + + n = rand(); + + n = n % 512; /* bound to a 2K size */ + + + size = sizeof(int32)*(n+1); + int32_array = (int32 *) malloc(size); + + memcpy(&int32_array[0], &n, sizeof(int32)); + + for(; n > 0; n--) + { + memcpy(&int32_array[n], &num, sizeof(int32)); + } + + data->data = (void*)int32_array; + data->size = size; + + return(data); +} + +#define ADD_RANGE 1 +#define DELETE_RANGE 2 + +int +AddOrDelRange(int32 low, int32 high, int action, key_type_enum key_type) +{ + DBT *key, *data; +#if 0 /* only do this if your really analy checking the puts */ + DBT tmp_data; +#endif + int32 num; + int status; + + if(action != ADD_RANGE && action != DELETE_RANGE) + assert(0); + + if(action == ADD_RANGE) + { + TraceMe(1, ("Adding: %ld to %ld: %s keys", low, high, + key_type == USE_SMALL_KEY ? "SMALL" : "LARGE")); + } + else + { + TraceMe(1, ("Deleting: %ld to %ld: %s keys", low, high, + key_type == USE_SMALL_KEY ? "SMALL" : "LARGE")); + } + + for(num = low; num <= high; num++) + { + + key = GenKey(num, key_type); + + if(action == ADD_RANGE) + { + data = GenData(num); + status = (*database->put)(database, key, data, 0); + } + else + { + status = (*database->del)(database, key, 0); + } + + if(status < 0) + { + ReportError("Database error %s item: %ld", + action == ADD_RANGE ? "ADDING" : "DELETING", + num); + } + else if(status > 0) + { + ReportError("Could not %s item: %ld", + action == ADD_RANGE ? "ADD" : "DELETE", + num); + } + else if(action == ADD_RANGE) + { +#define SYNC_EVERY_TIME +#ifdef SYNC_EVERY_TIME + status = (*database->sync)(database, 0); + if(status != 0) + ReportError("Database error syncing after add"); +#endif + +#if 0 /* only do this if your really analy checking the puts */ + + /* make sure we can still get it + */ + status = (*database->get)(database, key, &tmp_data, 0); + + if(status != 0) + { + ReportError("Database error checking item just added: %d", + num); + } + else + { + /* now verify that none of the ones we already + * put in have disappeared + */ + VerifyRange(low, num, SHOULD_EXIST, key_type); + } +#endif + + } + } + + + if(action == ADD_RANGE) + { + TraceMe(1, ("Successfully added: %ld to %ld", low, high)); + } + else + { + TraceMe(1, ("Successfully deleted: %ld to %ld", low, high)); + } + + return(0); +} + +int +TestRange(int32 low, int32 range, key_type_enum key_type) +{ + int status; int32 low_of_range1, high_of_range1; int32 low_of_range2, high_of_range2; + int32 low_of_range3, high_of_range3; + + status = AddOrDelRange(low, low+range, ADD_RANGE, key_type); + status = VerifyRange(low, low+range, SHOULD_EXIST, key_type); + + TraceMe(1, ("Finished with sub test 1")); + + SeqDatabase(); + + low_of_range1 = low; + high_of_range1 = low+(range/2); + low_of_range2 = high_of_range1+1; + high_of_range2 = low+range; + status = AddOrDelRange(low_of_range1, high_of_range1, DELETE_RANGE, key_type); + status = VerifyRange(low_of_range1, high_of_range1, SHOULD_NOT_EXIST, key_type); + status = VerifyRange(low_of_range2, low_of_range2, SHOULD_EXIST, key_type); + + TraceMe(1, ("Finished with sub test 2")); + + SeqDatabase(); + + status = AddOrDelRange(low_of_range1, high_of_range1, ADD_RANGE, key_type); + /* the whole thing should exist now */ + status = VerifyRange(low, low+range, SHOULD_EXIST, key_type); + + TraceMe(1, ("Finished with sub test 3")); + + SeqDatabase(); + + status = AddOrDelRange(low_of_range2, high_of_range2, DELETE_RANGE, key_type); + status = VerifyRange(low_of_range1, high_of_range1, SHOULD_EXIST, key_type); + status = VerifyRange(low_of_range2, high_of_range2, SHOULD_NOT_EXIST, key_type); + + TraceMe(1, ("Finished with sub test 4")); + + SeqDatabase(); + + status = AddOrDelRange(low_of_range2, high_of_range2, ADD_RANGE, key_type); + /* the whole thing should exist now */ + status = VerifyRange(low, low+range, SHOULD_EXIST, key_type); + + TraceMe(1, ("Finished with sub test 5")); + + SeqDatabase(); + + low_of_range1 = low; + high_of_range1 = low+(range/3); + low_of_range2 = high_of_range1+1; + high_of_range2 = high_of_range1+(range/3); + low_of_range3 = high_of_range2+1; + high_of_range3 = low+range; + /* delete range 2 */ + status = AddOrDelRange(low_of_range2, high_of_range2, DELETE_RANGE, key_type); + status = VerifyRange(low_of_range1, high_of_range1, SHOULD_EXIST, key_type); + status = VerifyRange(low_of_range2, low_of_range2, SHOULD_NOT_EXIST, key_type); + status = VerifyRange(low_of_range3, low_of_range2, SHOULD_EXIST, key_type); + + TraceMe(1, ("Finished with sub test 6")); + + SeqDatabase(); + + status = AddOrDelRange(low_of_range2, high_of_range2, ADD_RANGE, key_type); + /* the whole thing should exist now */ + status = VerifyRange(low, low+range, SHOULD_EXIST, key_type); + + TraceMe(1, ("Finished with sub test 7")); + + return(0); +} + +#define START_RANGE 109876 +int +main(int argc, char **argv) +{ + int32 i, j=0; + int quick_exit = 0; + int large_keys = 0; + HASHINFO hash_info = { + 16*1024, + 0, + 0, + 0, + 0, + 0}; + + + if(argc > 1) + { + while(argc > 1) + { + if(!strcmp(argv[argc-1], "-quick")) + quick_exit = 1; + else if(!strcmp(argv[argc-1], "-large")) + { + large_keys = 1; + } + argc--; + } + } + + database = dbopen("test.db", O_RDWR | O_CREAT, 0644, DB_HASH, &hash_info); + + if(!database) + { + ReportError("Could not open database"); +#ifdef unix + perror(""); +#endif + exit(1); + } + + if(quick_exit) + { + if(large_keys) + TestRange(START_RANGE, 200, USE_LARGE_KEY); + else + TestRange(START_RANGE, 200, USE_SMALL_KEY); + + (*database->sync)(database, 0); + (*database->close)(database); + exit(0); + } + + for(i=100; i < 10000000; i+=200) + { + if(1 || j) + { + TestRange(START_RANGE, i, USE_LARGE_KEY); + j = 0; + } + else + { + TestRange(START_RANGE, i, USE_SMALL_KEY); + j = 1; + } + + if(1 == rand() % 3) + { + (*database->sync)(database, 0); + } + + if(1 == rand() % 3) + { + /* close and reopen */ + (*database->close)(database); + database = dbopen("test.db", O_RDWR | O_CREAT, 0644, DB_HASH, 0); + if(!database) + { + ReportError("Could not reopen database"); +#ifdef unix + perror(""); +#endif + exit(1); + } + } + else + { + /* reopen database without closeing the other */ + database = dbopen("test.db", O_RDWR | O_CREAT, 0644, DB_HASH, 0); + if(!database) + { + ReportError("Could not reopen database " + "after not closing the other"); +#ifdef unix + perror(""); +#endif + exit(1); + } + } + } + + return(0); +} diff --git a/security/coreconf/AIX.mk b/security/coreconf/AIX.mk new file mode 100644 index 000000000..ce4849c2d --- /dev/null +++ b/security/coreconf/AIX.mk @@ -0,0 +1,84 @@ +# +# The contents of this file are subject to the Mozilla Public +# License Version 1.1 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy of +# the License at http://www.mozilla.org/MPL/ +# +# Software distributed under the License is distributed on an "AS +# IS" basis, WITHOUT WARRANTY OF ANY KIND, 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 Netscape are +# Copyright (C) 1994-2000 Netscape Communications Corporation. All +# Rights Reserved. +# +# Contributor(s): +# +# Alternatively, the contents of this file may be used under the +# terms of the GNU General Public License Version 2 or later (the +# "GPL"), in which case the provisions of the GPL are applicable +# instead of those above. If you wish to allow use of your +# version of this file only under the terms of the GPL and not to +# allow others to use your version of this file under the MPL, +# indicate your decision by deleting the provisions above and +# replace them with the notice and other provisions required by +# the GPL. If you do not delete the provisions above, a recipient +# may use your version of this file under either the MPL or the +# GPL. +# +# Config stuff for AIX. +# +include $(CORE_DEPTH)/coreconf/UNIX.mk + +# +# There are two implementation strategies available on AIX: +# pthreads, and pthreads-user. The default is pthreads. +# In both strategies, we need to use pthread_user.c, instead of +# aix.c. The fact that aix.c is never used is somewhat strange. +# +# So we need to do the following: +# - Default (PTHREADS_USER not defined in the environment or on +# the command line): +# Set PTHREADS_USER=1, USE_PTHREADS=1 +# - PTHREADS_USER=1 set in the environment or on the command line: +# Do nothing. +# +ifeq ($(PTHREADS_USER),1) + USE_PTHREADS = # just to be safe + IMPL_STRATEGY = _PTH_USER +else + USE_PTHREADS = 1 + PTHREADS_USER = 1 +endif + +DEFAULT_COMPILER = xlC_r + +CC = xlC_r +CCC = xlC_r + +CPU_ARCH = rs6000 + +RANLIB = ranlib + +OS_CFLAGS = -DAIX -DSYSV +ifeq ($(CC),xlC_r) + OS_CFLAGS += -qarch=com +endif + +AIX_WRAP = $(DIST)/lib/aixwrap.o +AIX_TMP = $(OBJDIR)/_aix_tmp.o +OS_LIBS += -lsvld +ifdef MAPFILE +EXPORT_RULES = -bexport:$(MAPFILE) +endif +PROCESS_MAP_FILE = grep -v ';+' $(LIBRARY_NAME).def | grep -v ';-' | \ + sed -e 's; DATA ;;' -e 's,;;,,' -e 's,;.*,,' > $@ + +ifdef BUILD_OPT + OPTIMIZER += -qmaxmem=-1 +endif + diff --git a/security/coreconf/AIX3.2.mk b/security/coreconf/AIX3.2.mk new file mode 100644 index 000000000..c93a00eef --- /dev/null +++ b/security/coreconf/AIX3.2.mk @@ -0,0 +1,35 @@ +# +# The contents of this file are subject to the Mozilla Public +# License Version 1.1 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy of +# the License at http://www.mozilla.org/MPL/ +# +# Software distributed under the License is distributed on an "AS +# IS" basis, WITHOUT WARRANTY OF ANY KIND, 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 Netscape are +# Copyright (C) 1994-2000 Netscape Communications Corporation. All +# Rights Reserved. +# +# Contributor(s): +# +# Alternatively, the contents of this file may be used under the +# terms of the GNU General Public License Version 2 or later (the +# "GPL"), in which case the provisions of the GPL are applicable +# instead of those above. If you wish to allow use of your +# version of this file only under the terms of the GPL and not to +# allow others to use your version of this file under the MPL, +# indicate your decision by deleting the provisions above and +# replace them with the notice and other provisions required by +# the GPL. If you do not delete the provisions above, a recipient +# may use your version of this file under either the MPL or the +# GPL. +# +# Config stuff for AIX3.2.5 +# +include $(CORE_DEPTH)/coreconf/AIX.mk diff --git a/security/coreconf/AIX4.1.mk b/security/coreconf/AIX4.1.mk new file mode 100644 index 000000000..115ee8dc8 --- /dev/null +++ b/security/coreconf/AIX4.1.mk @@ -0,0 +1,55 @@ +# +# The contents of this file are subject to the Mozilla Public +# License Version 1.1 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy of +# the License at http://www.mozilla.org/MPL/ +# +# Software distributed under the License is distributed on an "AS +# IS" basis, WITHOUT WARRANTY OF ANY KIND, 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 Netscape are +# Copyright (C) 1994-2000 Netscape Communications Corporation. All +# Rights Reserved. +# +# Contributor(s): +# +# Alternatively, the contents of this file may be used under the +# terms of the GNU General Public License Version 2 or later (the +# "GPL"), in which case the provisions of the GPL are applicable +# instead of those above. If you wish to allow use of your +# version of this file only under the terms of the GPL and not to +# allow others to use your version of this file under the MPL, +# indicate your decision by deleting the provisions above and +# replace them with the notice and other provisions required by +# the GPL. If you do not delete the provisions above, a recipient +# may use your version of this file under either the MPL or the +# GPL. +# +# Config stuff for AIX4.1 +# + +include $(CORE_DEPTH)/coreconf/AIX.mk + + +AIX_LINK_OPTS += -bnso -berok +#AIX_LINK_OPTS += -bnso -berok -brename:.select,.wrap_select -brename:.poll,.wrap_poll -bI:/usr/lib/syscalls.exp + +# The AIX4.1 linker had a bug which always looked for a dynamic library +# with an extension of .a. AIX4.2 fixed this problem +DLL_SUFFIX = a + +OS_LIBS += -lsvld + +# override default value set in suffix.mk, for AIX 4.1 only +DYNAMIC_LIB_EXTENSION = _shr + +# override default value in ruleset.mk +ifdef LIBRARY_NAME + SHARED_LIBRARY = $(OBJDIR)/lib$(LIBRARY_NAME)$(LIBRARY_VERSION)_shr$(JDK_DEBUG_SUFFIX).a +endif + diff --git a/security/coreconf/AIX4.2.mk b/security/coreconf/AIX4.2.mk new file mode 100644 index 000000000..71280fdf7 --- /dev/null +++ b/security/coreconf/AIX4.2.mk @@ -0,0 +1,50 @@ +# +# The contents of this file are subject to the Mozilla Public +# License Version 1.1 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy of +# the License at http://www.mozilla.org/MPL/ +# +# Software distributed under the License is distributed on an "AS +# IS" basis, WITHOUT WARRANTY OF ANY KIND, 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 Netscape are +# Copyright (C) 1994-2000 Netscape Communications Corporation. All +# Rights Reserved. +# +# Contributor(s): +# +# Alternatively, the contents of this file may be used under the +# terms of the GNU General Public License Version 2 or later (the +# "GPL"), in which case the provisions of the GPL are applicable +# instead of those above. If you wish to allow use of your +# version of this file only under the terms of the GPL and not to +# allow others to use your version of this file under the MPL, +# indicate your decision by deleting the provisions above and +# replace them with the notice and other provisions required by +# the GPL. If you do not delete the provisions above, a recipient +# may use your version of this file under either the MPL or the +# GPL. + +# +# Config stuff for AIX4.2 +# + +include $(CORE_DEPTH)/coreconf/AIX.mk + +OS_CFLAGS += -DAIX4_2 +DSO_LDOPTS = -brtl -bM:SRE -bnoentry +MKSHLIB = $(LD) $(DSO_LDOPTS) -lsvld -L/usr/lpp/xlC/lib -lc -lm + +OS_LIBS += -L/usr/lpp/xlC/lib -lc -lm +ifdef MAPFILE +DSO_LDOPTS += -bexport:$(MAPFILE) +else +DSO_LDOPTS += -bexpall +endif + + diff --git a/security/coreconf/AIX4.3.mk b/security/coreconf/AIX4.3.mk new file mode 100644 index 000000000..43ce77bc0 --- /dev/null +++ b/security/coreconf/AIX4.3.mk @@ -0,0 +1,55 @@ +# +# The contents of this file are subject to the Mozilla Public +# License Version 1.1 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy of +# the License at http://www.mozilla.org/MPL/ +# +# Software distributed under the License is distributed on an "AS +# IS" basis, WITHOUT WARRANTY OF ANY KIND, 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 Netscape are +# Copyright (C) 1994-2000 Netscape Communications Corporation. All +# Rights Reserved. +# +# Contributor(s): +# +# Alternatively, the contents of this file may be used under the +# terms of the GNU General Public License Version 2 or later (the +# "GPL"), in which case the provisions of the GPL are applicable +# instead of those above. If you wish to allow use of your +# version of this file only under the terms of the GPL and not to +# allow others to use your version of this file under the MPL, +# indicate your decision by deleting the provisions above and +# replace them with the notice and other provisions required by +# the GPL. If you do not delete the provisions above, a recipient +# may use your version of this file under either the MPL or the +# GPL. +# +# Config stuff for AIX4.3 +# + +include $(CORE_DEPTH)/coreconf/AIX.mk + + +ifeq ($(USE_64), 1) +# Next line replaced by generic name handling in arch.mk +# COMPILER_TAG = _64 + OS_CFLAGS += -DAIX_64BIT + OBJECT_MODE=64 + export OBJECT_MODE +endif +OS_CFLAGS += -DAIX4_3 +DSO_LDOPTS = -brtl -bM:SRE -bnoentry +MKSHLIB = $(LD) $(DSO_LDOPTS) -lsvld -L/usr/lpp/xlC/lib -lc -lm + +OS_LIBS += -L/usr/lpp/xlC/lib -lc -lm +ifdef MAPFILE +DSO_LDOPTS += -bexport:$(MAPFILE) +else +DSO_LDOPTS += -bexpall +endif diff --git a/security/coreconf/AIX5.1.mk b/security/coreconf/AIX5.1.mk new file mode 100644 index 000000000..daa999ba7 --- /dev/null +++ b/security/coreconf/AIX5.1.mk @@ -0,0 +1,54 @@ +# +# The contents of this file are subject to the Mozilla Public +# License Version 1.1 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy of +# the License at http://www.mozilla.org/MPL/ +# +# Software distributed under the License is distributed on an "AS +# IS" basis, WITHOUT WARRANTY OF ANY KIND, 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 Netscape are +# Copyright (C) 1994-2000 Netscape Communications Corporation. All +# Rights Reserved. +# +# Contributor(s): +# +# Alternatively, the contents of this file may be used under the +# terms of the GNU General Public License Version 2 or later (the +# "GPL"), in which case the provisions of the GPL are applicable +# instead of those above. If you wish to allow use of your +# version of this file only under the terms of the GPL and not to +# allow others to use your version of this file under the MPL, +# indicate your decision by deleting the provisions above and +# replace them with the notice and other provisions required by +# the GPL. If you do not delete the provisions above, a recipient +# may use your version of this file under either the MPL or the +# GPL. +# +# Config stuff for AIX5.1 +# + +include $(CORE_DEPTH)/coreconf/AIX.mk + + +ifeq ($(USE_64), 1) +# Next line replaced by generic name handling in arch.mk +# COMPILER_TAG = _64 + OS_CFLAGS += -DAIX_64BIT + OBJECT_MODE=64 + export OBJECT_MODE +endif +DSO_LDOPTS = -brtl -bM:SRE -bnoentry +MKSHLIB = $(LD) $(DSO_LDOPTS) -lsvld -L/usr/lpp/xlC/lib -lc -lm + +OS_LIBS += -L/usr/lpp/xlC/lib -lc -lm +ifdef MAPFILE +DSO_LDOPTS += -bexport:$(MAPFILE) +else +DSO_LDOPTS += -bexpall +endif diff --git a/security/coreconf/BSD_OS.mk b/security/coreconf/BSD_OS.mk new file mode 100644 index 000000000..e91c4a5d6 --- /dev/null +++ b/security/coreconf/BSD_OS.mk @@ -0,0 +1,88 @@ +# +# The contents of this file are subject to the Mozilla Public +# License Version 1.1 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy of +# the License at http://www.mozilla.org/MPL/ +# +# Software distributed under the License is distributed on an "AS +# IS" basis, WITHOUT WARRANTY OF ANY KIND, 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 Netscape are +# Copyright (C) 1994-2000 Netscape Communications Corporation. All +# Rights Reserved. +# +# Contributor(s): Kurt J. Lidl +# +# Alternatively, the contents of this file may be used under the +# terms of the GNU General Public License Version 2 or later (the +# "GPL"), in which case the provisions of the GPL are applicable +# instead of those above. If you wish to allow use of your +# version of this file only under the terms of the GPL and not to +# allow others to use your version of this file under the MPL, +# indicate your decision by deleting the provisions above and +# replace them with the notice and other provisions required by +# the GPL. If you do not delete the provisions above, a recipient +# may use your version of this file under either the MPL or the +# GPL. +# +# Config stuff for BSD/OS +# + +include $(CORE_DEPTH)/coreconf/UNIX.mk + +DEFAULT_COMPILER = gcc +CC = gcc +CCC = g++ +RANLIB = ranlib + +ifeq ($(OS_TEST),i386) + OS_REL_CFLAGS = -D__i386__ + CPU_ARCH = x86 +else +ifeq ($(OS_TEST),ppc) + OS_REL_CFLAGS = -D__ppc__ + CPU_ARCH = ppc +else +ifeq ($(OS_TEST),sparc) + OS_REL_CFLAGS = -D__sparc__ + CPU_ARCH = sparc +else +# treat the ultrasparc like a regular sparc, at least for now! +ifeq ($(OS_TEST),sparc_v9) + OS_REL_CFLAGS = -D__sparc__ + CPU_ARCH = sparc +endif +endif +endif +endif + +DLL_SUFFIX = so + +OS_CFLAGS = $(DSO_CFLAGS) $(OS_REL_CFLAGS) -Wall -DBSD_OS -DBSDI -Dunix -DHAVE_STRERROR -DHAVE_BSD_FLOCK + +ARCH = bsdos + +DSO_CFLAGS = -fPIC -DPIC +DSO_LDOPTS = -shared +DSO_LDFLAGS = +DSO_LDOPTS += -Wl,-soname,lib$(LIBRARY_NAME)$(LIBRARY_VERSION).$(DLL_SUFFIX) + +ifdef LIBRUNPATH +DSO_LDOPTS += -Wl,-R$(LIBRUNPATH) +endif + +MKSHLIB = $(CC) $(DSO_LDOPTS) +ifdef MAPFILE +# Add LD options to restrict exported symbols to those in the map file +endif +# Change PROCESS to put the mapfile in the correct format for this platform +PROCESS_MAP_FILE = cp $(LIBRARY_NAME).def $@ + +G++INCLUDES = -I/usr/include/g++ + +INCLUDES += -I/usr/X11R6/include diff --git a/security/coreconf/BeOS.mk b/security/coreconf/BeOS.mk new file mode 100644 index 000000000..4e8f3b239 --- /dev/null +++ b/security/coreconf/BeOS.mk @@ -0,0 +1,79 @@ +# +# The contents of this file are subject to the Mozilla Public +# License Version 1.1 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy of +# the License at http://www.mozilla.org/MPL/ +# +# Software distributed under the License is distributed on an "AS +# IS" basis, WITHOUT WARRANTY OF ANY KIND, 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 Netscape are +# Copyright (C) 2002 Netscape Communications Corporation. All +# Rights Reserved. +# +# Contributor(s): +# +# Alternatively, the contents of this file may be used under the +# terms of the GNU General Public License Version 2 or later (the +# "GPL"), in which case the provisions of the GPL are applicable +# instead of those above. If you wish to allow use of your +# version of this file only under the terms of the GPL and not to +# allow others to use your version of this file under the MPL, +# indicate your decision by deleting the provisions above and +# replace them with the notice and other provisions required by +# the GPL. If you do not delete the provisions above, a recipient +# may use your version of this file under either the MPL or the +# GPL. +# +# Config stuff for BeOS +# + +include $(CORE_DEPTH)/coreconf/UNIX.mk + +XP_DEFINE := $(XP_DEFINE:-DXP_UNIX=-DXP_BEOS) + +USE_PTHREADS = + +ifeq ($(USE_PTHREADS),1) + IMPL_STRATEGY = _PTH +endif + +CC = gcc +CCC = g++ +RANLIB = ranlib + +DEFAULT_COMPILER = gcc + +ifeq ($(OS_TEST),ppc) + OS_REL_CFLAGS = -Dppc + CPU_ARCH = ppc +else + OS_REL_CFLAGS = -Di386 + CPU_ARCH = x86 +endif + +MKSHLIB = $(CC) -nostart -Wl,-soname -Wl,$(@:$(OBJDIR)/%.so=%.so) +ifdef BUILD_OPT + OPTIMIZER = -O2 +endif + +OS_CFLAGS = $(DSO_CFLAGS) $(OS_REL_CFLAGS) -Wall -pipe +OS_LIBS = -lbe + +DEFINES += -DBEOS + +ifdef USE_PTHREADS + DEFINES += -D_REENTRANT +endif + +ARCH = beos + +DSO_CFLAGS = -fPIC +DSO_LDOPTS = +DSO_LDFLAGS = + diff --git a/security/coreconf/Darwin.mk b/security/coreconf/Darwin.mk new file mode 100644 index 000000000..59f5af8fd --- /dev/null +++ b/security/coreconf/Darwin.mk @@ -0,0 +1,76 @@ +# +# The contents of this file are subject to the Mozilla Public +# License Version 1.1 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy of +# the License at http://www.mozilla.org/MPL/ +# +# Software distributed under the License is distributed on an "AS +# IS" basis, WITHOUT WARRANTY OF ANY KIND, 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 Netscape are +# Copyright (C) 1994-2000 Netscape Communications Corporation. All +# Rights Reserved. +# +# Contributor(s): +# +# Alternatively, the contents of this file may be used under the +# terms of the GNU General Public License Version 2 or later (the +# "GPL"), in which case the provisions of the GPL are applicable +# instead of those above. If you wish to allow use of your +# version of this file only under the terms of the GPL and not to +# allow others to use your version of this file under the MPL, +# indicate your decision by deleting the provisions above and +# replace them with the notice and other provisions required by +# the GPL. If you do not delete the provisions above, a recipient +# may use your version of this file under either the MPL or the +# GPL. +# +# Config stuff for Darwin. +# + +include $(CORE_DEPTH)/coreconf/UNIX.mk + +CC = cc +CCC = c++ +RANLIB = ranlib + +ifeq (86,$(findstring 86,$(OS_TEST))) +OS_REL_CFLAGS = -Di386 +CPU_ARCH = i386 +else +OS_REL_CFLAGS = -Dppc +CPU_ARCH = ppc +endif + +# "Commons" are tentative definitions in a global scope, like this: +# int x; +# The meaning of a common is ambiguous. It may be a true definition: +# int x = 0; +# or it may be a declaration of a symbol defined in another file: +# extern int x; +# Use the -fno-common option to force all commons to become true +# definitions so that the linker can catch multiply-defined symbols. +# Also, common symbols are not allowed with Darwin dynamic libraries. + +OS_CFLAGS = $(DSO_CFLAGS) $(OS_REL_CFLAGS) -Wmost -fpascal-strings -traditional-cpp -fno-common -pipe -DDARWIN -DHAVE_STRERROR -DHAVE_BSD_FLOCK + +ifdef BUILD_OPT +OPTIMIZER = -O2 +endif + +ARCH = darwin + +# May override this with -bundle to create a loadable module. +DSO_LDOPTS = -dynamiclib -compatibility_version 1 -current_version 1 -install_name @executable_path/$(notdir $@) + +MKSHLIB = $(CC) -arch $(CPU_ARCH) $(DSO_LDOPTS) +DLL_SUFFIX = dylib +PROCESS_MAP_FILE = grep -v ';+' $(LIBRARY_NAME).def | grep -v ';-' | \ + sed -e 's; DATA ;;' -e 's,;;,,' -e 's,;.*,,' -e 's,^,_,' > $@ + +G++INCLUDES = -I/usr/include/g++ diff --git a/security/coreconf/FreeBSD.mk b/security/coreconf/FreeBSD.mk new file mode 100644 index 000000000..c07df1a6c --- /dev/null +++ b/security/coreconf/FreeBSD.mk @@ -0,0 +1,82 @@ +# +# The contents of this file are subject to the Mozilla Public +# License Version 1.1 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy of +# the License at http://www.mozilla.org/MPL/ +# +# Software distributed under the License is distributed on an "AS +# IS" basis, WITHOUT WARRANTY OF ANY KIND, 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 Netscape are +# Copyright (C) 1994-2000 Netscape Communications Corporation. All +# Rights Reserved. +# +# Contributor(s): +# +# Alternatively, the contents of this file may be used under the +# terms of the GNU General Public License Version 2 or later (the +# "GPL"), in which case the provisions of the GPL are applicable +# instead of those above. If you wish to allow use of your +# version of this file only under the terms of the GPL and not to +# allow others to use your version of this file under the MPL, +# indicate your decision by deleting the provisions above and +# replace them with the notice and other provisions required by +# the GPL. If you do not delete the provisions above, a recipient +# may use your version of this file under either the MPL or the +# GPL. +# +# Config stuff for FreeBSD +# + +include $(CORE_DEPTH)/coreconf/UNIX.mk + +DEFAULT_COMPILER = gcc +CC = gcc +CCC = g++ +RANLIB = ranlib + +ifeq ($(OS_TEST),alpha) +CPU_ARCH = alpha +else +CPU_ARCH = x86 +endif + +OS_CFLAGS = $(DSO_CFLAGS) -ansi -Wall -DFREEBSD -DHAVE_STRERROR -DHAVE_BSD_FLOCK + +DSO_CFLAGS = -fPIC +DSO_LDOPTS = -shared -Wl,-soname -Wl,$(notdir $@) + +# +# The default implementation strategy for FreeBSD is pthreads. +# +ifndef CLASSIC_NSPR +USE_PTHREADS = 1 +DEFINES += -D_THREAD_SAFE -D_REENTRANT +DSO_LDOPTS += -pthread +endif + +ARCH = freebsd + +MOZ_OBJFORMAT := $(shell test -x /usr/bin/objformat && /usr/bin/objformat || echo aout) + +ifeq ($(MOZ_OBJFORMAT),elf) +DLL_SUFFIX = so +else +DLL_SUFFIX = so.1.0 +endif + +MKSHLIB = $(CC) $(DSO_LDOPTS) +ifdef MAPFILE +# Add LD options to restrict exported symbols to those in the map file +endif +# Change PROCESS to put the mapfile in the correct format for this platform +PROCESS_MAP_FILE = cp $(LIBRARY_NAME).def $@ + +G++INCLUDES = -I/usr/include/g++ + +INCLUDES += -I/usr/X11R6/include diff --git a/security/coreconf/HP-UX.mk b/security/coreconf/HP-UX.mk new file mode 100644 index 000000000..a6a392935 --- /dev/null +++ b/security/coreconf/HP-UX.mk @@ -0,0 +1,76 @@ +# +# The contents of this file are subject to the Mozilla Public +# License Version 1.1 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy of +# the License at http://www.mozilla.org/MPL/ +# +# Software distributed under the License is distributed on an "AS +# IS" basis, WITHOUT WARRANTY OF ANY KIND, 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 Netscape are +# Copyright (C) 1994-2000 Netscape Communications Corporation. All +# Rights Reserved. +# +# Contributor(s): +# +# Alternatively, the contents of this file may be used under the +# terms of the GNU General Public License Version 2 or later (the +# "GPL"), in which case the provisions of the GPL are applicable +# instead of those above. If you wish to allow use of your +# version of this file only under the terms of the GPL and not to +# allow others to use your version of this file under the MPL, +# indicate your decision by deleting the provisions above and +# replace them with the notice and other provisions required by +# the GPL. If you do not delete the provisions above, a recipient +# may use your version of this file under either the MPL or the +# GPL. + +# +# Config stuff for HP-UX +# + +include $(CORE_DEPTH)/coreconf/UNIX.mk + +DEFAULT_COMPILER = cc + +CPU_ARCH = hppa +DLL_SUFFIX = sl +CC = cc +CCC = CC +OS_CFLAGS += -Ae $(DSO_CFLAGS) -DHPUX -D$(CPU_ARCH) -D_HPUX_SOURCE + +ifeq ($(DEFAULT_IMPL_STRATEGY),_PTH) + USE_PTHREADS = 1 + ifeq ($(CLASSIC_NSPR),1) + USE_PTHREADS = + IMPL_STRATEGY = _CLASSIC + endif + ifeq ($(PTHREADS_USER),1) + USE_PTHREADS = + IMPL_STRATEGY = _PTH_USER + endif +endif + +ifdef PTHREADS_USER + OS_CFLAGS += -D_POSIX_C_SOURCE=199506L +endif + +LDFLAGS = -z -Wl,+s + +MKSHLIB = $(LD) $(DSO_LDOPTS) +ifdef MAPFILE +MKSHLIB += -c $(MAPFILE) +endif +PROCESS_MAP_FILE = grep -v ';+' $(LIBRARY_NAME).def | grep -v ';-' | \ + sed -e 's; DATA ;;' -e 's,;;,,' -e 's,;.*,,' -e 's,^,+e ,' > $@ + +DSO_LDOPTS = -b +h $(notdir $@) +DSO_LDFLAGS = + +# +Z generates position independent code for use in shared libraries. +DSO_CFLAGS = +Z diff --git a/security/coreconf/HP-UXA.09.03.mk b/security/coreconf/HP-UXA.09.03.mk new file mode 100644 index 000000000..7ac02ae2a --- /dev/null +++ b/security/coreconf/HP-UXA.09.03.mk @@ -0,0 +1,44 @@ +# +# The contents of this file are subject to the Mozilla Public +# License Version 1.1 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy of +# the License at http://www.mozilla.org/MPL/ +# +# Software distributed under the License is distributed on an "AS +# IS" basis, WITHOUT WARRANTY OF ANY KIND, 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 Netscape are +# Copyright (C) 1994-2000 Netscape Communications Corporation. All +# Rights Reserved. +# +# Contributor(s): +# +# Alternatively, the contents of this file may be used under the +# terms of the GNU General Public License Version 2 or later (the +# "GPL"), in which case the provisions of the GPL are applicable +# instead of those above. If you wish to allow use of your +# version of this file only under the terms of the GPL and not to +# allow others to use your version of this file under the MPL, +# indicate your decision by deleting the provisions above and +# replace them with the notice and other provisions required by +# the GPL. If you do not delete the provisions above, a recipient +# may use your version of this file under either the MPL or the +# GPL. + +# +# On HP-UX 9, the default (and only) implementation strategy is +# classic nspr. +# +ifeq ($(OS_RELEASE),A.09.03) + DEFAULT_IMPL_STRATEGY = _CLASSIC +endif + +# +# Config stuff for HP-UXA.09.03 +# +include $(CORE_DEPTH)/coreconf/HP-UXA.09.mk diff --git a/security/coreconf/HP-UXA.09.07.mk b/security/coreconf/HP-UXA.09.07.mk new file mode 100644 index 000000000..9fcf4c826 --- /dev/null +++ b/security/coreconf/HP-UXA.09.07.mk @@ -0,0 +1,43 @@ +# +# The contents of this file are subject to the Mozilla Public +# License Version 1.1 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy of +# the License at http://www.mozilla.org/MPL/ +# +# Software distributed under the License is distributed on an "AS +# IS" basis, WITHOUT WARRANTY OF ANY KIND, 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 Netscape are +# Copyright (C) 1994-2000 Netscape Communications Corporation. All +# Rights Reserved. +# +# Contributor(s): +# +# Alternatively, the contents of this file may be used under the +# terms of the GNU General Public License Version 2 or later (the +# "GPL"), in which case the provisions of the GPL are applicable +# instead of those above. If you wish to allow use of your +# version of this file only under the terms of the GPL and not to +# allow others to use your version of this file under the MPL, +# indicate your decision by deleting the provisions above and +# replace them with the notice and other provisions required by +# the GPL. If you do not delete the provisions above, a recipient +# may use your version of this file under either the MPL or the +# GPL. +# +# On HP-UX 9, the default (and only) implementation strategy is +# classic nspr. +# +ifeq ($(OS_RELEASE),A.09.07) + DEFAULT_IMPL_STRATEGY = _CLASSIC +endif + +# +# Config stuff for HP-UXA.09.07 +# +include $(CORE_DEPTH)/coreconf/HP-UXA.09.mk diff --git a/security/coreconf/HP-UXA.09.mk b/security/coreconf/HP-UXA.09.mk new file mode 100644 index 000000000..813a16f40 --- /dev/null +++ b/security/coreconf/HP-UXA.09.mk @@ -0,0 +1,38 @@ +# +# The contents of this file are subject to the Mozilla Public +# License Version 1.1 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy of +# the License at http://www.mozilla.org/MPL/ +# +# Software distributed under the License is distributed on an "AS +# IS" basis, WITHOUT WARRANTY OF ANY KIND, 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 Netscape are +# Copyright (C) 1994-2000 Netscape Communications Corporation. All +# Rights Reserved. +# +# Contributor(s): +# +# Alternatively, the contents of this file may be used under the +# terms of the GNU General Public License Version 2 or later (the +# "GPL"), in which case the provisions of the GPL are applicable +# instead of those above. If you wish to allow use of your +# version of this file only under the terms of the GPL and not to +# allow others to use your version of this file under the MPL, +# indicate your decision by deleting the provisions above and +# replace them with the notice and other provisions required by +# the GPL. If you do not delete the provisions above, a recipient +# may use your version of this file under either the MPL or the +# GPL. + +# +# Config stuff for HP-UXA.09 +# +include $(CORE_DEPTH)/coreconf/HP-UX.mk + +OS_CFLAGS += -DHPUX9 diff --git a/security/coreconf/HP-UXB.10.01.mk b/security/coreconf/HP-UXB.10.01.mk new file mode 100644 index 000000000..718ee1184 --- /dev/null +++ b/security/coreconf/HP-UXB.10.01.mk @@ -0,0 +1,40 @@ +# +# The contents of this file are subject to the Mozilla Public +# License Version 1.1 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy of +# the License at http://www.mozilla.org/MPL/ +# +# Software distributed under the License is distributed on an "AS +# IS" basis, WITHOUT WARRANTY OF ANY KIND, 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 Netscape are +# Copyright (C) 1994-2000 Netscape Communications Corporation. All +# Rights Reserved. +# +# Contributor(s): +# +# Alternatively, the contents of this file may be used under the +# terms of the GNU General Public License Version 2 or later (the +# "GPL"), in which case the provisions of the GPL are applicable +# instead of those above. If you wish to allow use of your +# version of this file only under the terms of the GPL and not to +# allow others to use your version of this file under the MPL, +# indicate your decision by deleting the provisions above and +# replace them with the notice and other provisions required by +# the GPL. If you do not delete the provisions above, a recipient +# may use your version of this file under either the MPL or the +# GPL. +# +ifeq ($(OS_RELEASE),B.10.01) + DEFAULT_IMPL_STRATEGY = _CLASSIC +endif + +# +# Config stuff for HP-UXB.10.01 +# +include $(CORE_DEPTH)/coreconf/HP-UXB.10.mk diff --git a/security/coreconf/HP-UXB.10.10.mk b/security/coreconf/HP-UXB.10.10.mk new file mode 100644 index 000000000..54a78e6e2 --- /dev/null +++ b/security/coreconf/HP-UXB.10.10.mk @@ -0,0 +1,50 @@ +# +# The contents of this file are subject to the Mozilla Public +# License Version 1.1 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy of +# the License at http://www.mozilla.org/MPL/ +# +# Software distributed under the License is distributed on an "AS +# IS" basis, WITHOUT WARRANTY OF ANY KIND, 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 Netscape are +# Copyright (C) 1994-2000 Netscape Communications Corporation. All +# Rights Reserved. +# +# Contributor(s): +# +# Alternatively, the contents of this file may be used under the +# terms of the GNU General Public License Version 2 or later (the +# "GPL"), in which case the provisions of the GPL are applicable +# instead of those above. If you wish to allow use of your +# version of this file only under the terms of the GPL and not to +# allow others to use your version of this file under the MPL, +# indicate your decision by deleting the provisions above and +# replace them with the notice and other provisions required by +# the GPL. If you do not delete the provisions above, a recipient +# may use your version of this file under either the MPL or the +# GPL. +# +# On HP-UX 10.10 and 10.20, the default implementation strategy is +# pthreads (actually DCE threads). Classic nspr is also available. +# + +ifeq ($(OS_RELEASE),B.10.10) + DEFAULT_IMPL_STRATEGY = _PTH +endif + +# +# Config stuff for HP-UXB.10.10 +# +include $(CORE_DEPTH)/coreconf/HP-UXB.10.mk + +OS_CFLAGS += -DHPUX10_10 + +ifeq ($(USE_PTHREADS),1) + OS_CFLAGS += -D_REENTRANT +endif diff --git a/security/coreconf/HP-UXB.10.20.mk b/security/coreconf/HP-UXB.10.20.mk new file mode 100644 index 000000000..5c14b9844 --- /dev/null +++ b/security/coreconf/HP-UXB.10.20.mk @@ -0,0 +1,50 @@ +# +# The contents of this file are subject to the Mozilla Public +# License Version 1.1 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy of +# the License at http://www.mozilla.org/MPL/ +# +# Software distributed under the License is distributed on an "AS +# IS" basis, WITHOUT WARRANTY OF ANY KIND, 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 Netscape are +# Copyright (C) 1994-2000 Netscape Communications Corporation. All +# Rights Reserved. +# +# Contributor(s): +# +# Alternatively, the contents of this file may be used under the +# terms of the GNU General Public License Version 2 or later (the +# "GPL"), in which case the provisions of the GPL are applicable +# instead of those above. If you wish to allow use of your +# version of this file only under the terms of the GPL and not to +# allow others to use your version of this file under the MPL, +# indicate your decision by deleting the provisions above and +# replace them with the notice and other provisions required by +# the GPL. If you do not delete the provisions above, a recipient +# may use your version of this file under either the MPL or the +# GPL. +# +# On HP-UX 10.10 and 10.20, the default implementation strategy is +# pthreads (actually DCE threads). Classic nspr is also available. +# + +ifeq ($(OS_RELEASE),B.10.20) + DEFAULT_IMPL_STRATEGY = _PTH +endif + +# +# Config stuff for HP-UXB.10.20 +# +include $(CORE_DEPTH)/coreconf/HP-UXB.10.mk + +OS_CFLAGS += -DHPUX10_20 + +ifeq ($(USE_PTHREADS),1) + OS_CFLAGS += -D_REENTRANT +endif diff --git a/security/coreconf/HP-UXB.10.30.mk b/security/coreconf/HP-UXB.10.30.mk new file mode 100644 index 000000000..ef52d1122 --- /dev/null +++ b/security/coreconf/HP-UXB.10.30.mk @@ -0,0 +1,56 @@ +# +# The contents of this file are subject to the Mozilla Public +# License Version 1.1 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy of +# the License at http://www.mozilla.org/MPL/ +# +# Software distributed under the License is distributed on an "AS +# IS" basis, WITHOUT WARRANTY OF ANY KIND, 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 Netscape are +# Copyright (C) 1994-2000 Netscape Communications Corporation. All +# Rights Reserved. +# +# Contributor(s): +# +# Alternatively, the contents of this file may be used under the +# terms of the GNU General Public License Version 2 or later (the +# "GPL"), in which case the provisions of the GPL are applicable +# instead of those above. If you wish to allow use of your +# version of this file only under the terms of the GPL and not to +# allow others to use your version of this file under the MPL, +# indicate your decision by deleting the provisions above and +# replace them with the notice and other provisions required by +# the GPL. If you do not delete the provisions above, a recipient +# may use your version of this file under either the MPL or the +# GPL. +# +# On HP-UX 10.30 and 11.00, the default implementation strategy is +# pthreads. Classic nspr and pthreads-user are also available. +# + +ifeq ($(OS_RELEASE),B.10.30) + DEFAULT_IMPL_STRATEGY = _PTH +endif + +# +# Config stuff for HP-UXB.10.30. +# +include $(CORE_DEPTH)/coreconf/HP-UXB.10.mk + +OS_CFLAGS += -DHPUX10_30 + +# +# To use the true pthread (kernel thread) library on 10.30 and +# 11.00, we should define _POSIX_C_SOURCE to be 199506L. +# The _REENTRANT macro is deprecated. +# + +ifdef USE_PTHREADS + OS_CFLAGS += -D_POSIX_C_SOURCE=199506L +endif diff --git a/security/coreconf/HP-UXB.10.mk b/security/coreconf/HP-UXB.10.mk new file mode 100644 index 000000000..77ca9bce7 --- /dev/null +++ b/security/coreconf/HP-UXB.10.mk @@ -0,0 +1,38 @@ +# +# The contents of this file are subject to the Mozilla Public +# License Version 1.1 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy of +# the License at http://www.mozilla.org/MPL/ +# +# Software distributed under the License is distributed on an "AS +# IS" basis, WITHOUT WARRANTY OF ANY KIND, 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 Netscape are +# Copyright (C) 1994-2000 Netscape Communications Corporation. All +# Rights Reserved. +# +# Contributor(s): +# +# Alternatively, the contents of this file may be used under the +# terms of the GNU General Public License Version 2 or later (the +# "GPL"), in which case the provisions of the GPL are applicable +# instead of those above. If you wish to allow use of your +# version of this file only under the terms of the GPL and not to +# allow others to use your version of this file under the MPL, +# indicate your decision by deleting the provisions above and +# replace them with the notice and other provisions required by +# the GPL. If you do not delete the provisions above, a recipient +# may use your version of this file under either the MPL or the +# GPL. +# +# Config stuff for HP-UXB.10 +# +include $(CORE_DEPTH)/coreconf/HP-UX.mk + +OS_CFLAGS += -DHPUX10 +OS_LIBS += -lpthread -lm diff --git a/security/coreconf/HP-UXB.11.00.mk b/security/coreconf/HP-UXB.11.00.mk new file mode 100644 index 000000000..0732202ae --- /dev/null +++ b/security/coreconf/HP-UXB.11.00.mk @@ -0,0 +1,55 @@ +# +# The contents of this file are subject to the Mozilla Public +# License Version 1.1 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy of +# the License at http://www.mozilla.org/MPL/ +# +# Software distributed under the License is distributed on an "AS +# IS" basis, WITHOUT WARRANTY OF ANY KIND, 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 Netscape are +# Copyright (C) 1994-2000 Netscape Communications Corporation. All +# Rights Reserved. +# +# Contributor(s): +# +# Alternatively, the contents of this file may be used under the +# terms of the GNU General Public License Version 2 or later (the +# "GPL"), in which case the provisions of the GPL are applicable +# instead of those above. If you wish to allow use of your +# version of this file only under the terms of the GPL and not to +# allow others to use your version of this file under the MPL, +# indicate your decision by deleting the provisions above and +# replace them with the notice and other provisions required by +# the GPL. If you do not delete the provisions above, a recipient +# may use your version of this file under either the MPL or the +# GPL. +# +# On HP-UX 10.30 and 11.00, the default implementation strategy is +# pthreads. Classic nspr and pthreads-user are also available. +# + +ifeq ($(OS_RELEASE),B.11.00) +OS_CFLAGS += -DHPUX10 +DEFAULT_IMPL_STRATEGY = _PTH +endif + +# +# To use the true pthread (kernel thread) library on 10.30 and +# 11.00, we should define _POSIX_C_SOURCE to be 199506L. +# The _REENTRANT macro is deprecated. +# + +ifdef USE_PTHREADS + OS_CFLAGS += -D_POSIX_C_SOURCE=199506L +endif + +# +# Config stuff for HP-UXB.11.00. +# +include $(CORE_DEPTH)/coreconf/HP-UXB.11.mk diff --git a/security/coreconf/HP-UXB.11.11.mk b/security/coreconf/HP-UXB.11.11.mk new file mode 100644 index 000000000..1789b7d7d --- /dev/null +++ b/security/coreconf/HP-UXB.11.11.mk @@ -0,0 +1,55 @@ +# +# The contents of this file are subject to the Mozilla Public +# License Version 1.1 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy of +# the License at http://www.mozilla.org/MPL/ +# +# Software distributed under the License is distributed on an "AS +# IS" basis, WITHOUT WARRANTY OF ANY KIND, 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 Netscape are +# Copyright (C) 2001 Netscape Communications Corporation. All +# Rights Reserved. +# +# Contributor(s): +# +# Alternatively, the contents of this file may be used under the +# terms of the GNU General Public License Version 2 or later (the +# "GPL"), in which case the provisions of the GPL are applicable +# instead of those above. If you wish to allow use of your +# version of this file only under the terms of the GPL and not to +# allow others to use your version of this file under the MPL, +# indicate your decision by deleting the provisions above and +# replace them with the notice and other provisions required by +# the GPL. If you do not delete the provisions above, a recipient +# may use your version of this file under either the MPL or the +# GPL. +# +# On HP-UX 10.30 and 11.x, the default implementation strategy is +# pthreads. Classic nspr and pthreads-user are also available. +# + +ifeq ($(OS_RELEASE),B.11.11) +OS_CFLAGS += -DHPUX10 +DEFAULT_IMPL_STRATEGY = _PTH +endif + +# +# To use the true pthread (kernel thread) library on 10.30 and +# 11.x, we should define _POSIX_C_SOURCE to be 199506L. +# The _REENTRANT macro is deprecated. +# + +ifdef USE_PTHREADS + OS_CFLAGS += -D_POSIX_C_SOURCE=199506L +endif + +# +# Config stuff for HP-UXB.11.11. +# +include $(CORE_DEPTH)/coreconf/HP-UXB.11.mk diff --git a/security/coreconf/HP-UXB.11.20.mk b/security/coreconf/HP-UXB.11.20.mk new file mode 100644 index 000000000..a638736c5 --- /dev/null +++ b/security/coreconf/HP-UXB.11.20.mk @@ -0,0 +1,55 @@ +# +# The contents of this file are subject to the Mozilla Public +# License Version 1.1 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy of +# the License at http://www.mozilla.org/MPL/ +# +# Software distributed under the License is distributed on an "AS +# IS" basis, WITHOUT WARRANTY OF ANY KIND, 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 Netscape are +# Copyright (C) 2002 Netscape Communications Corporation. All +# Rights Reserved. +# +# Contributor(s): +# +# Alternatively, the contents of this file may be used under the +# terms of the GNU General Public License Version 2 or later (the +# "GPL"), in which case the provisions of the GPL are applicable +# instead of those above. If you wish to allow use of your +# version of this file only under the terms of the GPL and not to +# allow others to use your version of this file under the MPL, +# indicate your decision by deleting the provisions above and +# replace them with the notice and other provisions required by +# the GPL. If you do not delete the provisions above, a recipient +# may use your version of this file under either the MPL or the +# GPL. +# +# On HP-UX 10.30 and 11.x, the default implementation strategy is +# pthreads. Classic nspr and pthreads-user are also available. +# + +ifeq ($(OS_RELEASE),B.11.20) +OS_CFLAGS += -DHPUX10 +DEFAULT_IMPL_STRATEGY = _PTH +endif + +# +# To use the true pthread (kernel thread) library on 10.30 and +# 11.x, we should define _POSIX_C_SOURCE to be 199506L. +# The _REENTRANT macro is deprecated. +# + +ifdef USE_PTHREADS + OS_CFLAGS += -D_POSIX_C_SOURCE=199506L +endif + +# +# Config stuff for HP-UXB.11.x. +# +include $(CORE_DEPTH)/coreconf/HP-UXB.11.mk diff --git a/security/coreconf/HP-UXB.11.mk b/security/coreconf/HP-UXB.11.mk new file mode 100644 index 000000000..5b489014f --- /dev/null +++ b/security/coreconf/HP-UXB.11.mk @@ -0,0 +1,73 @@ +# +# The contents of this file are subject to the Mozilla Public +# License Version 1.1 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy of +# the License at http://www.mozilla.org/MPL/ +# +# Software distributed under the License is distributed on an "AS +# IS" basis, WITHOUT WARRANTY OF ANY KIND, 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 Netscape are +# Copyright (C) 1994-2000 Netscape Communications Corporation. All +# Rights Reserved. +# +# Contributor(s): +# +# Alternatively, the contents of this file may be used under the +# terms of the GNU General Public License Version 2 or later (the +# "GPL"), in which case the provisions of the GPL are applicable +# instead of those above. If you wish to allow use of your +# version of this file only under the terms of the GPL and not to +# allow others to use your version of this file under the MPL, +# indicate your decision by deleting the provisions above and +# replace them with the notice and other provisions required by +# the GPL. If you do not delete the provisions above, a recipient +# may use your version of this file under either the MPL or the +# GPL. +# +# Config stuff for HP-UXB.11 +# +include $(CORE_DEPTH)/coreconf/HP-UX.mk + +ifdef USE_LONG_LONGS +USE_HYBRID = 1 +endif + +ifndef NS_USE_GCC + CCC = /opt/aCC/bin/aCC -ext + ifeq ($(USE_64), 1) + ifeq ($(OS_TEST), ia64) + OS_CFLAGS += -Aa +e +p +DD64 + else + OS_CFLAGS += -Aa +e +DA2.0W +DS2.0 +DChpux + endif +# Next line replaced by generic name handling in arch.mk +# COMPILER_TAG = _64 + else + ifeq ($(OS_TEST), ia64) + OS_CFLAGS += -Aa +e +p +DD32 + else + ifdef USE_HYBRID + OS_CFLAGS += -Aa +e +DA2.0 +DS2.0 + else + OS_CFLAGS += +DAportable +DS2.0 + endif + endif + endif +else + CCC = aCC +endif + +OS_CFLAGS += -DHPUX11 +OS_LIBS += -lpthread -lm -lrt +#ifeq ($(USE_64), 1) +#OS_LIBS += -ldl +#else +#OS_LIBS += -ldld +#endif +HPUX11 = 1 diff --git a/security/coreconf/IRIX.mk b/security/coreconf/IRIX.mk new file mode 100644 index 000000000..32e2a4a9a --- /dev/null +++ b/security/coreconf/IRIX.mk @@ -0,0 +1,124 @@ +# +# The contents of this file are subject to the Mozilla Public +# License Version 1.1 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy of +# the License at http://www.mozilla.org/MPL/ +# +# Software distributed under the License is distributed on an "AS +# IS" basis, WITHOUT WARRANTY OF ANY KIND, 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 Netscape are +# Copyright (C) 1994-2000 Netscape Communications Corporation. All +# Rights Reserved. +# +# Contributor(s): +# +# Alternatively, the contents of this file may be used under the +# terms of the GNU General Public License Version 2 or later (the +# "GPL"), in which case the provisions of the GPL are applicable +# instead of those above. If you wish to allow use of your +# version of this file only under the terms of the GPL and not to +# allow others to use your version of this file under the MPL, +# indicate your decision by deleting the provisions above and +# replace them with the notice and other provisions required by +# the GPL. If you do not delete the provisions above, a recipient +# may use your version of this file under either the MPL or the +# GPL. +# +# Config stuff for IRIX +# + +include $(CORE_DEPTH)/coreconf/UNIX.mk + +# +# The default implementation strategy for Irix is classic nspr. +# +ifeq ($(USE_PTHREADS),1) + ifeq ($(USE_N32),1) + IMPL_STRATEGY = _n32_PTH + else + IMPL_STRATEGY = _PTH + endif +endif + +DEFAULT_COMPILER = cc + +ifdef NS_USE_GCC + CC = gcc + AS = $(CC) -x assembler-with-cpp + ODD_CFLAGS = -Wall -Wno-format + ifdef BUILD_OPT + OPTIMIZER = -O6 + endif +else + CC = cc + CCC = CC + ODD_CFLAGS = -fullwarn -xansi -woff 1209 + ifdef BUILD_OPT + ifeq ($(USE_N32),1) + OPTIMIZER = -O -OPT:Olimit=4000 + else + OPTIMIZER = -O -Olimit 4000 + endif + endif + + # For 6.x machines, include this flag + ifeq (6., $(findstring 6., $(OS_RELEASE))) + ifeq ($(USE_N32),1) + ODD_CFLAGS += -n32 -mips3 -exceptions + else + ODD_CFLAGS += -32 -multigot + endif + else + ODD_CFLAGS += -xgot + endif + ifeq ($(USE_N32),1) + OS_CFLAGS += -dollar + endif +endif + +ODD_CFLAGS += -DSVR4 -DIRIX + +CPU_ARCH = mips + +RANLIB = /bin/true +# For purify +# NOTE: should always define _SGI_MP_SOURCE +NOMD_OS_CFLAGS += $(ODD_CFLAGS) -D_SGI_MP_SOURCE + +OS_CFLAGS += $(NOMD_OS_CFLAGS) +ifdef USE_MDUPDATE + OS_CFLAGS += -MDupdate $(DEPENDENCIES) +endif + +ifeq ($(USE_N32),1) + SHLIB_LD_OPTS += -n32 -mips3 +endif + +MKSHLIB += $(LD) $(SHLIB_LD_OPTS) -shared -soname $(@:$(OBJDIR)/%.so=%.so) +ifdef MAPFILE +# Add LD options to restrict exported symbols to those in the map file +endif +# Change PROCESS to put the mapfile in the correct format for this platform +PROCESS_MAP_FILE = cp $(LIBRARY_NAME).def $@ + +DSO_LDOPTS = -elf -shared -all + +ifdef DSO_BACKEND + DSO_LDOPTS += -soname $(DSO_NAME) +endif + +# +# Revision notes: +# +# In the IRIX compilers prior to version 7.2, -n32 implied -mips3. +# Beginning in the 7.2 compilers, -n32 implies -mips4 when the compiler +# is running on a system with a mips4 CPU (e.g. R8K, R10K). +# We want our code to explicitly be mips3 code, so we now explicitly +# set -mips3 whenever we set -n32. +# diff --git a/security/coreconf/IRIX5.2.mk b/security/coreconf/IRIX5.2.mk new file mode 100644 index 000000000..fbb4a137b --- /dev/null +++ b/security/coreconf/IRIX5.2.mk @@ -0,0 +1,35 @@ +# +# The contents of this file are subject to the Mozilla Public +# License Version 1.1 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy of +# the License at http://www.mozilla.org/MPL/ +# +# Software distributed under the License is distributed on an "AS +# IS" basis, WITHOUT WARRANTY OF ANY KIND, 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 Netscape are +# Copyright (C) 1994-2000 Netscape Communications Corporation. All +# Rights Reserved. +# +# Contributor(s): +# +# Alternatively, the contents of this file may be used under the +# terms of the GNU General Public License Version 2 or later (the +# "GPL"), in which case the provisions of the GPL are applicable +# instead of those above. If you wish to allow use of your +# version of this file only under the terms of the GPL and not to +# allow others to use your version of this file under the MPL, +# indicate your decision by deleting the provisions above and +# replace them with the notice and other provisions required by +# the GPL. If you do not delete the provisions above, a recipient +# may use your version of this file under either the MPL or the +# GPL. +# +# Config stuff for IRIX 5.2 +# +include $(CORE_DEPTH)/coreconf/IRIX5.mk diff --git a/security/coreconf/IRIX5.3.mk b/security/coreconf/IRIX5.3.mk new file mode 100644 index 000000000..b7134592b --- /dev/null +++ b/security/coreconf/IRIX5.3.mk @@ -0,0 +1,37 @@ +# +# The contents of this file are subject to the Mozilla Public +# License Version 1.1 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy of +# the License at http://www.mozilla.org/MPL/ +# +# Software distributed under the License is distributed on an "AS +# IS" basis, WITHOUT WARRANTY OF ANY KIND, 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 Netscape are +# Copyright (C) 1994-2000 Netscape Communications Corporation. All +# Rights Reserved. +# +# Contributor(s): +# +# Alternatively, the contents of this file may be used under the +# terms of the GNU General Public License Version 2 or later (the +# "GPL"), in which case the provisions of the GPL are applicable +# instead of those above. If you wish to allow use of your +# version of this file only under the terms of the GPL and not to +# allow others to use your version of this file under the MPL, +# indicate your decision by deleting the provisions above and +# replace them with the notice and other provisions required by +# the GPL. If you do not delete the provisions above, a recipient +# may use your version of this file under either the MPL or the +# GPL. +# +# Config stuff for IRIX 5.3 +# +include $(CORE_DEPTH)/coreconf/IRIX5.mk + +OS_CFLAGS += -DIRIX5_3 diff --git a/security/coreconf/IRIX5.mk b/security/coreconf/IRIX5.mk new file mode 100644 index 000000000..56bfb0ea5 --- /dev/null +++ b/security/coreconf/IRIX5.mk @@ -0,0 +1,40 @@ +# +# The contents of this file are subject to the Mozilla Public +# License Version 1.1 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy of +# the License at http://www.mozilla.org/MPL/ +# +# Software distributed under the License is distributed on an "AS +# IS" basis, WITHOUT WARRANTY OF ANY KIND, 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 Netscape are +# Copyright (C) 1994-2000 Netscape Communications Corporation. All +# Rights Reserved. +# +# Contributor(s): +# +# Alternatively, the contents of this file may be used under the +# terms of the GNU General Public License Version 2 or later (the +# "GPL"), in which case the provisions of the GPL are applicable +# instead of those above. If you wish to allow use of your +# version of this file only under the terms of the GPL and not to +# allow others to use your version of this file under the MPL, +# indicate your decision by deleting the provisions above and +# replace them with the notice and other provisions required by +# the GPL. If you do not delete the provisions above, a recipient +# may use your version of this file under either the MPL or the +# GPL. +# +# Config stuff for IRIX 5 +# + +include $(CORE_DEPTH)/coreconf/IRIX.mk + +ifndef NS_USE_GCC + ODD_CFLAGS += -xgot +endif diff --git a/security/coreconf/IRIX6.2.mk b/security/coreconf/IRIX6.2.mk new file mode 100644 index 000000000..e17a0c3b6 --- /dev/null +++ b/security/coreconf/IRIX6.2.mk @@ -0,0 +1,43 @@ +# +# The contents of this file are subject to the Mozilla Public +# License Version 1.1 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy of +# the License at http://www.mozilla.org/MPL/ +# +# Software distributed under the License is distributed on an "AS +# IS" basis, WITHOUT WARRANTY OF ANY KIND, 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 Netscape are +# Copyright (C) 1994-2000 Netscape Communications Corporation. All +# Rights Reserved. +# +# Contributor(s): +# +# Alternatively, the contents of this file may be used under the +# terms of the GNU General Public License Version 2 or later (the +# "GPL"), in which case the provisions of the GPL are applicable +# instead of those above. If you wish to allow use of your +# version of this file only under the terms of the GPL and not to +# allow others to use your version of this file under the MPL, +# indicate your decision by deleting the provisions above and +# replace them with the notice and other provisions required by +# the GPL. If you do not delete the provisions above, a recipient +# may use your version of this file under either the MPL or the +# GPL. +# +# Config stuff for IRIX 6.2 +# + + +# catch unresolved symbols + +SHLIB_LD_OPTS += -no_unresolved + +include $(CORE_DEPTH)/coreconf/IRIX6.mk + +OS_CFLAGS += -DIRIX6_2 diff --git a/security/coreconf/IRIX6.3.mk b/security/coreconf/IRIX6.3.mk new file mode 100644 index 000000000..a684a1e11 --- /dev/null +++ b/security/coreconf/IRIX6.3.mk @@ -0,0 +1,42 @@ +# +# The contents of this file are subject to the Mozilla Public +# License Version 1.1 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy of +# the License at http://www.mozilla.org/MPL/ +# +# Software distributed under the License is distributed on an "AS +# IS" basis, WITHOUT WARRANTY OF ANY KIND, 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 Netscape are +# Copyright (C) 1994-2000 Netscape Communications Corporation. All +# Rights Reserved. +# +# Contributor(s): +# +# Alternatively, the contents of this file may be used under the +# terms of the GNU General Public License Version 2 or later (the +# "GPL"), in which case the provisions of the GPL are applicable +# instead of those above. If you wish to allow use of your +# version of this file only under the terms of the GPL and not to +# allow others to use your version of this file under the MPL, +# indicate your decision by deleting the provisions above and +# replace them with the notice and other provisions required by +# the GPL. If you do not delete the provisions above, a recipient +# may use your version of this file under either the MPL or the +# GPL. +# +# Config stuff for IRIX 6.3 +# + +# catch unresolved symbols + +SHLIB_LD_OPTS += -no_unresolved + +include $(CORE_DEPTH)/coreconf/IRIX6.mk + +OS_CFLAGS += -DIRIX6_3 diff --git a/security/coreconf/IRIX6.5.mk b/security/coreconf/IRIX6.5.mk new file mode 100644 index 000000000..2341580b4 --- /dev/null +++ b/security/coreconf/IRIX6.5.mk @@ -0,0 +1,45 @@ +# +# The contents of this file are subject to the Mozilla Public +# License Version 1.1 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy of +# the License at http://www.mozilla.org/MPL/ +# +# Software distributed under the License is distributed on an "AS +# IS" basis, WITHOUT WARRANTY OF ANY KIND, 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 Netscape are +# Copyright (C) 1994-2000 Netscape Communications Corporation. All +# Rights Reserved. +# +# Contributor(s): +# +# Alternatively, the contents of this file may be used under the +# terms of the GNU General Public License Version 2 or later (the +# "GPL"), in which case the provisions of the GPL are applicable +# instead of those above. If you wish to allow use of your +# version of this file only under the terms of the GPL and not to +# allow others to use your version of this file under the MPL, +# indicate your decision by deleting the provisions above and +# replace them with the notice and other provisions required by +# the GPL. If you do not delete the provisions above, a recipient +# may use your version of this file under either the MPL or the +# GPL. +# +# Config stuff for IRIX 6.5 +# + +# catch unresolved symbols + +SHLIB_LD_OPTS += -no_unresolved + +include $(CORE_DEPTH)/coreconf/IRIX6.mk + +OS_CFLAGS += -DIRIX6_5 +ifndef NS_USE_GCC +OS_CFLAGS += -mips3 +endif diff --git a/security/coreconf/IRIX6.mk b/security/coreconf/IRIX6.mk new file mode 100644 index 000000000..a401dc6f3 --- /dev/null +++ b/security/coreconf/IRIX6.mk @@ -0,0 +1,47 @@ +# +# The contents of this file are subject to the Mozilla Public +# License Version 1.1 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy of +# the License at http://www.mozilla.org/MPL/ +# +# Software distributed under the License is distributed on an "AS +# IS" basis, WITHOUT WARRANTY OF ANY KIND, 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 Netscape are +# Copyright (C) 1994-2000 Netscape Communications Corporation. All +# Rights Reserved. +# +# Contributor(s): +# +# Alternatively, the contents of this file may be used under the +# terms of the GNU General Public License Version 2 or later (the +# "GPL"), in which case the provisions of the GPL are applicable +# instead of those above. If you wish to allow use of your +# version of this file only under the terms of the GPL and not to +# allow others to use your version of this file under the MPL, +# indicate your decision by deleting the provisions above and +# replace them with the notice and other provisions required by +# the GPL. If you do not delete the provisions above, a recipient +# may use your version of this file under either the MPL or the +# GPL. +# +# Config stuff for IRIX 6 +# + +include $(CORE_DEPTH)/coreconf/IRIX.mk + +ifndef NS_USE_GCC + ifneq ($(USE_N32),1) + OS_CFLAGS += -32 + endif + ODD_CFLAGS += -multigot +endif + +ifeq ($(USE_PTHREADS),1) +OS_LIBS += -lpthread +endif diff --git a/security/coreconf/Linux.mk b/security/coreconf/Linux.mk new file mode 100644 index 000000000..5c346e037 --- /dev/null +++ b/security/coreconf/Linux.mk @@ -0,0 +1,130 @@ +# +# The contents of this file are subject to the Mozilla Public +# License Version 1.1 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy of +# the License at http://www.mozilla.org/MPL/ +# +# Software distributed under the License is distributed on an "AS +# IS" basis, WITHOUT WARRANTY OF ANY KIND, 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 Netscape are +# Copyright (C) 1994-2000 Netscape Communications Corporation. All +# Rights Reserved. +# +# Contributor(s): +# +# Alternatively, the contents of this file may be used under the +# terms of the GNU General Public License Version 2 or later (the +# "GPL"), in which case the provisions of the GPL are applicable +# instead of those above. If you wish to allow use of your +# version of this file only under the terms of the GPL and not to +# allow others to use your version of this file under the MPL, +# indicate your decision by deleting the provisions above and +# replace them with the notice and other provisions required by +# the GPL. If you do not delete the provisions above, a recipient +# may use your version of this file under either the MPL or the +# GPL. +# +# Config stuff for Linux +# + +include $(CORE_DEPTH)/coreconf/UNIX.mk + +# +# The default implementation strategy for Linux is now pthreads +# +USE_PTHREADS = 1 + +ifeq ($(USE_PTHREADS),1) + IMPL_STRATEGY = _PTH +endif + +CC = gcc +CCC = g++ +RANLIB = ranlib + +DEFAULT_COMPILER = gcc + +ifeq ($(OS_TEST),m68k) + OS_REL_CFLAGS = -DLINUX1_2 -D_XOPEN_SOURCE + CPU_ARCH = m68k +else +ifeq ($(OS_TEST),ppc) + OS_REL_CFLAGS = -DLINUX1_2 -D_XOPEN_SOURCE + CPU_ARCH = ppc +else +ifeq ($(OS_TEST),alpha) + OS_REL_CFLAGS = -D_ALPHA_ -DLINUX1_2 -D_XOPEN_SOURCE + CPU_ARCH = alpha +else +ifeq ($(OS_TEST),ia64) + OS_REL_CFLAGS = -DLINUX1_2 -D_XOPEN_SOURCE + CPU_ARCH = ia64 +else +ifeq ($(OS_TEST),sparc) + OS_REL_CFLAGS = -DLINUX1_2 -D_XOPEN_SOURCE + CPU_ARCH = sparc +else +ifeq ($(OS_TEST),sparc64) + OS_REL_CFLAGS = -DLINUX1_2 -D_XOPEN_SOURCE + CPU_ARCH = sparc +else +ifeq (,$(filter-out arm% sa110,$(OS_TEST))) + OS_REL_CFLAGS = -DLINUX1_2 -D_XOPEN_SOURCE + CPU_ARCH = arm +else + OS_REL_CFLAGS = -DLINUX1_2 -Di386 -D_XOPEN_SOURCE + CPU_ARCH = x86 +endif +endif +endif +endif +endif +endif +endif + + +LIBC_TAG = _glibc + +ifeq ($(OS_RELEASE),2.0) + OS_REL_CFLAGS += -DLINUX2_0 + MKSHLIB = $(CC) -shared -Wl,-soname -Wl,$(@:$(OBJDIR)/%.so=%.so) + ifdef BUILD_OPT + OPTIMIZER = -O2 + endif + ifdef MAPFILE + MKSHLIB += -Wl,--version-script,$(MAPFILE) + endif + PROCESS_MAP_FILE = grep -v ';-' $(LIBRARY_NAME).def | \ + sed -e 's,;+,,' -e 's; DATA ;;' -e 's,;;,,' -e 's,;.*,;,' > $@ +endif + +ifeq ($(USE_PTHREADS),1) +OS_PTHREAD = -lpthread +endif + +OS_CFLAGS = $(DSO_CFLAGS) $(OS_REL_CFLAGS) -ansi -Wall -pipe -DLINUX -Dlinux -D_POSIX_SOURCE -D_BSD_SOURCE -DHAVE_STRERROR +OS_LIBS = -L/lib $(OS_PTHREAD) -ldl -lc + +ifdef USE_PTHREADS + DEFINES += -D_REENTRANT +endif + +ARCH = linux + +DSO_CFLAGS = -fPIC +DSO_LDOPTS = -shared +DSO_LDFLAGS = + +# INCLUDES += -I/usr/include -Y/usr/include/linux +G++INCLUDES = -I/usr/include/g++ + +# +# Always set CPU_TAG on Linux, OpenVMS, WINCE. +# +CPU_TAG = _$(CPU_ARCH) diff --git a/security/coreconf/Linux2.1.mk b/security/coreconf/Linux2.1.mk new file mode 100644 index 000000000..f7f7565ac --- /dev/null +++ b/security/coreconf/Linux2.1.mk @@ -0,0 +1,49 @@ +# +# The contents of this file are subject to the Mozilla Public +# License Version 1.1 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy of +# the License at http://www.mozilla.org/MPL/ +# +# Software distributed under the License is distributed on an "AS +# IS" basis, WITHOUT WARRANTY OF ANY KIND, 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 Netscape are +# Copyright (C) 1994-2000 Netscape Communications Corporation. All +# Rights Reserved. +# +# Contributor(s): +# +# Alternatively, the contents of this file may be used under the +# terms of the GNU General Public License Version 2 or later (the +# "GPL"), in which case the provisions of the GPL are applicable +# instead of those above. If you wish to allow use of your +# version of this file only under the terms of the GPL and not to +# allow others to use your version of this file under the MPL, +# indicate your decision by deleting the provisions above and +# replace them with the notice and other provisions required by +# the GPL. If you do not delete the provisions above, a recipient +# may use your version of this file under either the MPL or the +# GPL. +# +# Config stuff for Linux 2.1 (ELF) +# + +include $(CORE_DEPTH)/coreconf/Linux.mk +ifeq ($(OS_RELEASE),2.1) + OS_REL_CFLAGS += -DLINUX2_1 + MKSHLIB = $(CC) -shared -Wl,-soname -Wl,$(@:$(OBJDIR)/%.so=%.so) + ifdef BUILD_OPT + OPTIMIZER = -O2 + endif + ifdef MAPFILE + MKSHLIB += -Wl,--version-script,$(MAPFILE) + endif + PROCESS_MAP_FILE = grep -v ';-' $(LIBRARY_NAME).def | \ + sed -e 's,;+,,' -e 's; DATA ;;' -e 's,;;,,' -e 's,;.*,;,' > $@ +endif + diff --git a/security/coreconf/Linux2.2.mk b/security/coreconf/Linux2.2.mk new file mode 100644 index 000000000..4bdddebfa --- /dev/null +++ b/security/coreconf/Linux2.2.mk @@ -0,0 +1,49 @@ +# +# The contents of this file are subject to the Mozilla Public +# License Version 1.1 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy of +# the License at http://www.mozilla.org/MPL/ +# +# Software distributed under the License is distributed on an "AS +# IS" basis, WITHOUT WARRANTY OF ANY KIND, 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 Netscape are +# Copyright (C) 1994-2000 Netscape Communications Corporation. All +# Rights Reserved. +# +# Contributor(s): +# +# Alternatively, the contents of this file may be used under the +# terms of the GNU General Public License Version 2 or later (the +# "GPL"), in which case the provisions of the GPL are applicable +# instead of those above. If you wish to allow use of your +# version of this file only under the terms of the GPL and not to +# allow others to use your version of this file under the MPL, +# indicate your decision by deleting the provisions above and +# replace them with the notice and other provisions required by +# the GPL. If you do not delete the provisions above, a recipient +# may use your version of this file under either the MPL or the +# GPL. +# +# Config stuff for Linux 2.2 (ELF) +# + +include $(CORE_DEPTH)/coreconf/Linux.mk + +OS_REL_CFLAGS += -DLINUX2_1 +MKSHLIB = $(CC) -shared -Wl,-soname -Wl,$(@:$(OBJDIR)/%.so=%.so) +ifdef BUILD_OPT + OPTIMIZER = -O2 +endif + +ifdef MAPFILE + MKSHLIB += -Wl,--version-script,$(MAPFILE) +endif +PROCESS_MAP_FILE = grep -v ';-' $(LIBRARY_NAME).def | \ + sed -e 's,;+,,' -e 's; DATA ;;' -e 's,;;,,' -e 's,;.*,;,' > $@ + diff --git a/security/coreconf/Linux2.4.mk b/security/coreconf/Linux2.4.mk new file mode 100644 index 000000000..b05d803a3 --- /dev/null +++ b/security/coreconf/Linux2.4.mk @@ -0,0 +1,49 @@ +# +# The contents of this file are subject to the Mozilla Public +# License Version 1.1 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy of +# the License at http://www.mozilla.org/MPL/ +# +# Software distributed under the License is distributed on an "AS +# IS" basis, WITHOUT WARRANTY OF ANY KIND, 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 Netscape are +# Copyright (C) 1994-2000 Netscape Communications Corporation. All +# Rights Reserved. +# +# Contributor(s): +# +# Alternatively, the contents of this file may be used under the +# terms of the GNU General Public License Version 2 or later (the +# "GPL"), in which case the provisions of the GPL are applicable +# instead of those above. If you wish to allow use of your +# version of this file only under the terms of the GPL and not to +# allow others to use your version of this file under the MPL, +# indicate your decision by deleting the provisions above and +# replace them with the notice and other provisions required by +# the GPL. If you do not delete the provisions above, a recipient +# may use your version of this file under either the MPL or the +# GPL. +# +# Config stuff for Linux 2.4 (ELF) +# + +include $(CORE_DEPTH)/coreconf/Linux.mk + +OS_REL_CFLAGS += -DLINUX2_1 +MKSHLIB = $(CC) -shared -Wl,-soname -Wl,$(@:$(OBJDIR)/%.so=%.so) +ifdef BUILD_OPT + OPTIMIZER = -O2 +endif + +ifdef MAPFILE + MKSHLIB += -Wl,--version-script,$(MAPFILE) +endif +PROCESS_MAP_FILE = grep -v ';-' $(LIBRARY_NAME).def | \ + sed -e 's,;+,,' -e 's; DATA ;;' -e 's,;;,,' -e 's,;.*,;,' > $@ + diff --git a/security/coreconf/Linux2.5.mk b/security/coreconf/Linux2.5.mk new file mode 100644 index 000000000..c116b1da8 --- /dev/null +++ b/security/coreconf/Linux2.5.mk @@ -0,0 +1,49 @@ +# +# The contents of this file are subject to the Mozilla Public +# License Version 1.1 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy of +# the License at http://www.mozilla.org/MPL/ +# +# Software distributed under the License is distributed on an "AS +# IS" basis, WITHOUT WARRANTY OF ANY KIND, 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 Netscape are +# Copyright (C) 1994-2000 Netscape Communications Corporation. All +# Rights Reserved. +# +# Contributor(s): +# +# Alternatively, the contents of this file may be used under the +# terms of the GNU General Public License Version 2 or later (the +# "GPL"), in which case the provisions of the GPL are applicable +# instead of those above. If you wish to allow use of your +# version of this file only under the terms of the GPL and not to +# allow others to use your version of this file under the MPL, +# indicate your decision by deleting the provisions above and +# replace them with the notice and other provisions required by +# the GPL. If you do not delete the provisions above, a recipient +# may use your version of this file under either the MPL or the +# GPL. +# +# Config stuff for Linux 2.5 (ELF) +# + +include $(CORE_DEPTH)/coreconf/Linux.mk + +OS_REL_CFLAGS += -DLINUX2_1 +MKSHLIB = $(CC) -shared -Wl,-soname -Wl,$(@:$(OBJDIR)/%.so=%.so) +ifdef BUILD_OPT + OPTIMIZER = -O2 +endif + +ifdef MAPFILE + MKSHLIB += -Wl,--version-script,$(MAPFILE) +endif +PROCESS_MAP_FILE = grep -v ';-' $(LIBRARY_NAME).def | \ + sed -e 's,;+,,' -e 's; DATA ;;' -e 's,;;,,' -e 's,;.*,;,' > $@ + diff --git a/security/coreconf/LinuxELF1.2.mk b/security/coreconf/LinuxELF1.2.mk new file mode 100644 index 000000000..860787958 --- /dev/null +++ b/security/coreconf/LinuxELF1.2.mk @@ -0,0 +1,36 @@ +# +# The contents of this file are subject to the Mozilla Public +# License Version 1.1 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy of +# the License at http://www.mozilla.org/MPL/ +# +# Software distributed under the License is distributed on an "AS +# IS" basis, WITHOUT WARRANTY OF ANY KIND, 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 Netscape are +# Copyright (C) 1994-2000 Netscape Communications Corporation. All +# Rights Reserved. +# +# Contributor(s): +# +# Alternatively, the contents of this file may be used under the +# terms of the GNU General Public License Version 2 or later (the +# "GPL"), in which case the provisions of the GPL are applicable +# instead of those above. If you wish to allow use of your +# version of this file only under the terms of the GPL and not to +# allow others to use your version of this file under the MPL, +# indicate your decision by deleting the provisions above and +# replace them with the notice and other provisions required by +# the GPL. If you do not delete the provisions above, a recipient +# may use your version of this file under either the MPL or the +# GPL. +# +# Config stuff for Linux 1.2 (ELF) +# + +include $(CORE_DEPTH)/coreconf/Linux.mk diff --git a/security/coreconf/LinuxELF2.0.mk b/security/coreconf/LinuxELF2.0.mk new file mode 100644 index 000000000..a85dfafa9 --- /dev/null +++ b/security/coreconf/LinuxELF2.0.mk @@ -0,0 +1,36 @@ +# +# The contents of this file are subject to the Mozilla Public +# License Version 1.1 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy of +# the License at http://www.mozilla.org/MPL/ +# +# Software distributed under the License is distributed on an "AS +# IS" basis, WITHOUT WARRANTY OF ANY KIND, 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 Netscape are +# Copyright (C) 1994-2000 Netscape Communications Corporation. All +# Rights Reserved. +# +# Contributor(s): +# +# Alternatively, the contents of this file may be used under the +# terms of the GNU General Public License Version 2 or later (the +# "GPL"), in which case the provisions of the GPL are applicable +# instead of those above. If you wish to allow use of your +# version of this file only under the terms of the GPL and not to +# allow others to use your version of this file under the MPL, +# indicate your decision by deleting the provisions above and +# replace them with the notice and other provisions required by +# the GPL. If you do not delete the provisions above, a recipient +# may use your version of this file under either the MPL or the +# GPL. +# +# Config stuff for Linux 2.0 (ELF) +# + +include $(CORE_DEPTH)/coreconf/Linux.mk diff --git a/security/coreconf/Makefile b/security/coreconf/Makefile new file mode 100644 index 000000000..fc9f73af2 --- /dev/null +++ b/security/coreconf/Makefile @@ -0,0 +1,43 @@ +# +# The contents of this file are subject to the Mozilla Public +# License Version 1.1 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy of +# the License at http://www.mozilla.org/MPL/ +# +# Software distributed under the License is distributed on an "AS +# IS" basis, WITHOUT WARRANTY OF ANY KIND, 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 Netscape are +# Copyright (C) 1994-2000 Netscape Communications Corporation. All +# Rights Reserved. +# +# Contributor(s): +# +# Alternatively, the contents of this file may be used under the +# terms of the GNU General Public License Version 2 or later (the +# "GPL"), in which case the provisions of the GPL are applicable +# instead of those above. If you wish to allow use of your +# version of this file only under the terms of the GPL and not to +# allow others to use your version of this file under the MPL, +# indicate your decision by deleting the provisions above and +# replace them with the notice and other provisions required by +# the GPL. If you do not delete the provisions above, a recipient +# may use your version of this file under either the MPL or the +# GPL. +# +DEPTH = .. +CORE_DEPTH = .. + +MODULE = coreconf + +DIRS = nsinstall + +include $(DEPTH)/coreconf/config.mk +include $(DEPTH)/coreconf/rules.mk + +export:: libs diff --git a/security/coreconf/NCR3.0.mk b/security/coreconf/NCR3.0.mk new file mode 100644 index 000000000..f29890d73 --- /dev/null +++ b/security/coreconf/NCR3.0.mk @@ -0,0 +1,95 @@ +# +# The contents of this file are subject to the Mozilla Public +# License Version 1.1 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy of +# the License at http://www.mozilla.org/MPL/ +# +# Software distributed under the License is distributed on an "AS +# IS" basis, WITHOUT WARRANTY OF ANY KIND, 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 Netscape are +# Copyright (C) 1994-2000 Netscape Communications Corporation. All +# Rights Reserved. +# +# Contributor(s): +# +# Alternatively, the contents of this file may be used under the +# terms of the GNU General Public License Version 2 or later (the +# "GPL"), in which case the provisions of the GPL are applicable +# instead of those above. If you wish to allow use of your +# version of this file only under the terms of the GPL and not to +# allow others to use your version of this file under the MPL, +# indicate your decision by deleting the provisions above and +# replace them with the notice and other provisions required by +# the GPL. If you do not delete the provisions above, a recipient +# may use your version of this file under either the MPL or the +# GPL. +# +# Config stuff for NCR SysVr4 v 3.0 +# + +include $(CORE_DEPTH)/coreconf/UNIX.mk + +DEFAULT_COMPILER = cc + +### +NS_USE_NATIVE = 1 + +# NS_USE_GCC = 1 + +export PATH:=$(PATH):/opt/ncc/bin +### + +RANLIB = true +GCC_FLAGS_EXTRA += -pipe + +DEFINES += -DSVR4 -DSYSV -DHAVE_STRERROR -DNCR + +OS_CFLAGS += -Hnocopyr -DSVR4 -DSYSV -DHAVE_STRERROR -DNCR -DPRFSTREAMS_BROKEN + +ifdef NS_USE_NATIVE + CC = cc + CCC = ncc + CXX = ncc +# OS_LIBS += -L/opt/ncc/lib +else +# OS_LIBS += +endif + +#OS_LIBS += -lsocket -lnsl -ldl -lc + +MKSHLIB += $(LD) $(DSO_LDOPTS) +#DSO_LDOPTS += -G -z defs +DSO_LDOPTS += -G +ifdef MAPFILE +# Add LD options to restrict exported symbols to those in the map file +endif +# Change PROCESS to put the mapfile in the correct format for this platform +PROCESS_MAP_FILE = cp $(LIBRARY_NAME).def $@ + +CPU_ARCH = x86 +ARCH = ncr + +NOSUCHFILE = /solaris-rm-f-sucks + +# now take care of default GCC (rus@5/5/97) + +ifdef NS_USE_GCC + # if gcc-settings are redefined already - don't touch it + # + ifeq (,$(findstring gcc, $(CC))) + CC = gcc + CCC = g++ + CXX = g++ + # always use -fPIC - some makefiles are still broken and don't distinguish + # situation when they build shared and static libraries + CFLAGS += -fPIC -Wall $(GCC_FLAGS_EXTRA) +# OS_LIBS += -L/usr/local/lib -lstdc++ -lg++ -lgcc + endif +endif +### diff --git a/security/coreconf/NEC4.2.mk b/security/coreconf/NEC4.2.mk new file mode 100644 index 000000000..03d257415 --- /dev/null +++ b/security/coreconf/NEC4.2.mk @@ -0,0 +1,66 @@ +# +# The contents of this file are subject to the Mozilla Public +# License Version 1.1 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy of +# the License at http://www.mozilla.org/MPL/ +# +# Software distributed under the License is distributed on an "AS +# IS" basis, WITHOUT WARRANTY OF ANY KIND, 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 Netscape are +# Copyright (C) 1994-2000 Netscape Communications Corporation. All +# Rights Reserved. +# +# Contributor(s): +# +# Alternatively, the contents of this file may be used under the +# terms of the GNU General Public License Version 2 or later (the +# "GPL"), in which case the provisions of the GPL are applicable +# instead of those above. If you wish to allow use of your +# version of this file only under the terms of the GPL and not to +# allow others to use your version of this file under the MPL, +# indicate your decision by deleting the provisions above and +# replace them with the notice and other provisions required by +# the GPL. If you do not delete the provisions above, a recipient +# may use your version of this file under either the MPL or the +# GPL. +# +# Config stuff for NEC Mips SYSV +# + +include $(CORE_DEPTH)/coreconf/UNIX.mk + +DEFAULT_COMPILER = $(CORE_DEPTH)/build/hcc + +CPU_ARCH = mips + +ifdef NS_USE_GCC +CC = gcc +CCC = g++ +else +CC = $(CORE_DEPTH)/build/hcc +OS_CFLAGS = -Xa -KGnum=0 -KOlimit=4000 +CCC = g++ +endif + +MKSHLIB = $(LD) $(DSO_LDOPTS) +ifdef MAPFILE +# Add LD options to restrict exported symbols to those in the map file +endif +# Change PROCESS to put the mapfile in the correct format for this platform +PROCESS_MAP_FILE = cp $(LIBRARY_NAME).def $@ + +RANLIB = /bin/true + +OS_CFLAGS += $(ODD_CFLAGS) -DSVR4 -D__SVR4 -DNEC -Dnec_ews -DHAVE_STRERROR +OS_LIBS = -lsocket -lnsl -ldl $(LDOPTIONS) +LDOPTIONS = -lc -L/usr/ucblib -lucb + +NOSUCHFILE = /nec-rm-f-sucks + +DSO_LDOPTS = -G diff --git a/security/coreconf/NetBSD.mk b/security/coreconf/NetBSD.mk new file mode 100644 index 000000000..fd7bd2ddf --- /dev/null +++ b/security/coreconf/NetBSD.mk @@ -0,0 +1,86 @@ +# +# The contents of this file are subject to the Mozilla Public +# License Version 1.1 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy of +# the License at http://www.mozilla.org/MPL/ +# +# Software distributed under the License is distributed on an "AS +# IS" basis, WITHOUT WARRANTY OF ANY KIND, 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 Netscape are +# Copyright (C) 1994-2000 Netscape Communications Corporation. All +# Rights Reserved. +# +# Contributor(s): +# +# Alternatively, the contents of this file may be used under the +# terms of the GNU General Public License Version 2 or later (the +# "GPL"), in which case the provisions of the GPL are applicable +# instead of those above. If you wish to allow use of your +# version of this file only under the terms of the GPL and not to +# allow others to use your version of this file under the MPL, +# indicate your decision by deleting the provisions above and +# replace them with the notice and other provisions required by +# the GPL. If you do not delete the provisions above, a recipient +# may use your version of this file under either the MPL or the +# GPL. +# +# Config stuff for NetBSD +# + +include $(CORE_DEPTH)/coreconf/UNIX.mk + +DEFAULT_COMPILER = gcc +CC = gcc +CCC = g++ +RANLIB = ranlib + +CPU_ARCH := $(shell uname -p) +ifeq ($(CPU_ARCH),i386) +OS_REL_CFLAGS = -Di386 +CPU_ARCH = x86 +endif + +ifndef OBJECT_FMT +OBJECT_FMT := $(shell if echo __ELF__ | $${CC:-cc} -E - | grep -q __ELF__ ; then echo a.out ; else echo ELF ; fi) +endif + +ifeq ($(OBJECT_FMT),ELF) +DLL_SUFFIX = so +else +DLL_SUFFIX = so.1.0 +endif + +OS_CFLAGS = $(DSO_CFLAGS) $(OS_REL_CFLAGS) -ansi -Wall -pipe -DNETBSD -Dunix -DHAVE_STRERROR -DHAVE_BSD_FLOCK + +OS_LIBS = -lcompat + +ARCH = netbsd + +DSO_CFLAGS = -fPIC -DPIC +DSO_LDOPTS = -shared +DSO_LDFLAGS = +ifeq ($(OBJECT_FMT),ELF) +DSO_LDOPTS += -Wl,-soname,lib$(LIBRARY_NAME)$(LIBRARY_VERSION).$(DLL_SUFFIX) +endif + +ifdef LIBRUNPATH +DSO_LDOPTS += -Wl,-R$(LIBRUNPATH) +endif + +MKSHLIB = $(CC) $(DSO_LDOPTS) +ifdef MAPFILE +# Add LD options to restrict exported symbols to those in the map file +endif +# Change PROCESS to put the mapfile in the correct format for this platform +PROCESS_MAP_FILE = cp $(LIBRARY_NAME).def $@ + + +G++INCLUDES = -I/usr/include/g++ + +INCLUDES += -I/usr/X11R6/include diff --git a/security/coreconf/OS2.mk b/security/coreconf/OS2.mk new file mode 100644 index 000000000..4b80a7f81 --- /dev/null +++ b/security/coreconf/OS2.mk @@ -0,0 +1,250 @@ +# +# The contents of this file are subject to the Mozilla Public +# License Version 1.1 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy of +# the License at http://www.mozilla.org/MPL/ +# +# Software distributed under the License is distributed on an "AS +# IS" basis, WITHOUT WARRANTY OF ANY KIND, 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 Netscape are +# Copyright (C) 1994-2000 Netscape Communications Corporation. All +# Rights Reserved. +# +# Contributor(s): +# +# Alternatively, the contents of this file may be used under the +# terms of the GNU General Public License Version 2 or later (the +# "GPL"), in which case the provisions of the GPL are applicable +# instead of those above. If you wish to allow use of your +# version of this file only under the terms of the GPL and not to +# allow others to use your version of this file under the MPL, +# indicate your decision by deleting the provisions above and +# replace them with the notice and other provisions required by +# the GPL. If you do not delete the provisions above, a recipient +# may use your version of this file under either the MPL or the +# GPL. +# + +MOZ_WIDGET_TOOLKIT = os2 + +# Specify toolset. Default to EMX. +ifeq ($(MOZ_OS2_TOOLS),VACPP) +XP_OS2_VACPP = 1 +else +ifeq ($(MOZ_OS2_TOOLS),PGCC) +XP_OS2_EMX = 1 +else +MOZ_OS2_TOOLS = EMX +XP_OS2_EMX = 1 +endif +endif + +# XP_PC is for Window and OS2 on Intel X86 +# XP_OS2 is strictly for OS2 only +XP_DEFINE += -DXP_PC=1 -DXP_OS2=1 + +# Override prefix +LIB_PREFIX = $(NULL) + +# Override suffix in suffix.mk +LIB_SUFFIX = lib +DLL_SUFFIX = dll +OBJ_SUFFIX = .obj +ASM_SUFFIX = .asm +PROG_SUFFIX = .exe + + +ifdef XP_OS2_EMX + +CCC = gcc +LINK = gcc +AR = emxomfar -p256 r $@ +# Keep AR_FLAGS blank so that we do not have to change rules.mk +AR_FLAGS = +RANLIB = @echo OS2 RANLIB +BSDECHO = @echo OS2 BSDECHO +IMPLIB = emximp -o +FILTER = emxexp + +ifndef NO_SHARED_LIB +WRAP_MALLOC_LIB = +WRAP_MALLOC_CFLAGS = +DSO_CFLAGS = +DSO_PIC_CFLAGS = +MKSHLIB = $(CXX) $(CXXFLAGS) $(DSO_LDOPTS) -o $@ +MKCSHLIB = $(CC) $(CFLAGS) $(DSO_LDOPTS) -o $@ +MKSHLIB_FORCE_ALL = +MKSHLIB_UNFORCE_ALL = +DSO_LDOPTS = -Zomf -Zdll -Zmt -Zcrtdll -Zlinker /NOO +# DLL_SUFFIX = .dll +SHLIB_LDSTARTFILE = +SHLIB_LDENDFILE = +ifdef MAPFILE +# Add LD options to restrict exported symbols to those in the map file +endif +# Change PROCESS to put the mapfile in the correct format for this platform +PROCESS_MAP_FILE = copy $(LIBRARY_NAME).def $@ + +endif #NO_SHARED_LIB + +OS_CFLAGS = -Wall -W -Wno-unused -Wpointer-arith -Wcast-align -Zmtd -Zomf -Zmt -DDEBUG -DDEBUG_wintrinh -DTRACING -g + +# Where the libraries are +MOZ_COMPONENT_NSPR_LIBS=-L$(DIST)/lib $(NSPR_LIBS) +NSPR_LIBS = -lplds4 -lplc4 -lnspr4 +NSPR_INCLUDE_DIR = + + +ifdef BUILD_OPT +OPTIMIZER = -O6 +DEFINES += -UDEBUG -U_DEBUG -DNDEBUG +DLLFLAGS = -DLL -OUT:$@ -MAP:$(@:.dll=.map) +EXEFLAGS = -PMTYPE:VIO -OUT:$@ -MAP:$(@:.exe=.map) -nologo -NOE +OBJDIR_TAG = _OPT +else +#OPTIMIZER = -O+ -Oi +DEFINES += -DDEBUG -D_DEBUG -DDEBUGPRINTS #HCT Need += to avoid overidding manifest.mn +DLLFLAGS = -DEBUG -DLL -OUT:$@ -MAP:$(@:.dll=.map) +EXEFLAGS = -DEBUG -PMTYPE:VIO -OUT:$@ -MAP:$(@:.exe=.map) -nologo -NOE +OBJDIR_TAG = _DBG +LDFLAGS = -DEBUG +endif # BUILD_OPT + +else # XP_OS2_VACPP + +AS = alp.exe +ifdef BUILD_OPT +ASFLAGS = -Od +else +ASFLAGS = +Od +endif +CCC = icc -q -DXP_OS2 -DOS2=4 -N10 +LINK = -ilink +AR = -ilib /NOL /NOI /O:$(subst /,\\,$@) +# Keep AR_FLAGS blank so that we do not have to change rules.mk +AR_FLAGS = +RANLIB = @echo OS2 RANLIB +BSDECHO = @echo OS2 BSDECHO +IMPLIB = implib /NOL /NOI +FILTER = cppfilt -b -p -q + +ifndef NO_SHARED_LIB +WRAP_MALLOC_LIB = +WRAP_MALLOC_CFLAGS = +DSO_CFLAGS = +DSO_PIC_CFLAGS = +MKSHLIB = $(LD) $(DSO_LDOPTS) +MKCSHLIB = $(LD) $(DSO_LDOPTS) +MKSHLIB_FORCE_ALL = +MKSHLIB_UNFORCE_ALL = +DSO_LDOPTS = +# DLL_SUFFIX = .dll +SHLIB_LDSTARTFILE = +SHLIB_LDENDFILE = +endif #NO_SHARED_LIB + +OS_CFLAGS = /Q /qlibansi /Gd /Gm /Su4 /Mp /Tl- +INCLUDES += -I$(CORE_DEPTH)/../dist/include +DEFINES += -DXP_OS2_VACPP -DTCPV40HDRS + +# Where the libraries are +NSPR_LIBS = $(DIST)/lib/nspr4.lib $(DIST)/lib/plc4.lib $(DIST)/lib/plds4.lib +MOZ_COMPONENT_NSPR_LIBS=-L$(DIST)/lib $(NSPR_LIBS) +NSPR_INCLUDE_DIR = + + +ifdef BUILD_OPT +OPTIMIZER = -Oi -G5 +DEFINES += -UDEBUG -U_DEBUG -DNDEBUG +DLLFLAGS = /DLL /O:$@ /INC:_dllentry /MAP:$(@:.dll=.map) +EXEFLAGS = -PMTYPE:VIO -OUT:$@ -MAP:$(@:.exe=.map) -nologo -NOE +OBJDIR_TAG = _OPT +LDFLAGS = /FREE /NODEBUG /NOE /LINENUMBERS /nologo +else +OS_CFLAGS += /Ti+ +DEFINES += -DDEBUG -D_DEBUG -DDEBUGPRINTS #HCT Need += to avoid overidding manifest.mn +DLLFLAGS = /DEBUG /DLL /O:$@ /INC:_dllentry /MAP:$(@:.dll=.map) +EXEFLAGS = -DEBUG -PMTYPE:VIO -OUT:$@ -MAP:$(@:.exe=.map) -nologo -NOE +OBJDIR_TAG = _DBG +LDFLAGS = /FREE /DE /NOE /LINENUMBERS /nologo +endif # BUILD_OPT + +endif # XP_OS2_VACPP + +# OS/2 use nsinstall that is included in the toolkit. +# since we do not wish to support and maintain 3 version of nsinstall in mozilla, nspr and nss + +ifdef BUILD_TREE +NSINSTALL_DIR = $(BUILD_TREE)/nss +else +NSINSTALL_DIR = $(CORE_DEPTH)/coreconf/nsinstall +endif +# NSINSTALL = $(NSINSTALL_DIR)/$(OBJDIR_NAME)/nsinstall +NSINSTALL = nsinstall # HCT4OS2 +INSTALL = $(NSINSTALL) + +MKDEPEND_DIR = $(CORE_DEPTH)/coreconf/mkdepend +MKDEPEND = $(MKDEPEND_DIR)/$(OBJDIR_NAME)/mkdepend +MKDEPENDENCIES = $(OBJDIR_NAME)/depend.mk + +#################################################################### +# +# One can define the makefile variable NSDISTMODE to control +# how files are published to the 'dist' directory. If not +# defined, the default is "install using relative symbolic +# links". The two possible values are "copy", which copies files +# but preserves source mtime, and "absolute_symlink", which +# installs using absolute symbolic links. The "absolute_symlink" +# option requires NFSPWD. +# - THIS IS NOT PART OF THE NEW BINARY RELEASE PLAN for 9/30/97 +# - WE'RE KEEPING IT ONLY FOR BACKWARDS COMPATIBILITY +#################################################################### + +ifeq ($(NSDISTMODE),copy) + # copy files, but preserve source mtime + INSTALL = $(NSINSTALL) + INSTALL += -t +else + ifeq ($(NSDISTMODE),absolute_symlink) + # install using absolute symbolic links + INSTALL = $(NSINSTALL) + INSTALL += -L `$(NFSPWD)` + else + # install using relative symbolic links + INSTALL = $(NSINSTALL) + INSTALL += -R + endif +endif + +DEFINES += -DXP_OS2 + +define MAKE_OBJDIR +if test ! -d $(@D); then rm -rf $(@D); $(NSINSTALL) -D $(@D); fi +endef + +# +# override the definition of DLL_PREFIX in prefix.mk +# + +ifndef DLL_PREFIX + DLL_PREFIX = $(NULL) +endif + +# +# override the TARGETS defined in ruleset.mk, adding IMPORT_LIBRARY +# +ifndef TARGETS + TARGETS = $(LIBRARY) $(SHARED_LIBRARY) $(IMPORT_LIBRARY) $(PROGRAM) +endif + + +ifdef LIBRARY_NAME + IMPORT_LIBRARY = $(OBJDIR)/$(LIBRARY_NAME)$(LIBRARY_VERSION)$(JDK_DEBUG_SUFFIX).lib +endif + diff --git a/security/coreconf/OSF1.mk b/security/coreconf/OSF1.mk new file mode 100644 index 000000000..16ff9eccb --- /dev/null +++ b/security/coreconf/OSF1.mk @@ -0,0 +1,72 @@ +# +# The contents of this file are subject to the Mozilla Public +# License Version 1.1 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy of +# the License at http://www.mozilla.org/MPL/ +# +# Software distributed under the License is distributed on an "AS +# IS" basis, WITHOUT WARRANTY OF ANY KIND, 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 Netscape are +# Copyright (C) 1994-2000 Netscape Communications Corporation. All +# Rights Reserved. +# +# Contributor(s): +# +# Alternatively, the contents of this file may be used under the +# terms of the GNU General Public License Version 2 or later (the +# "GPL"), in which case the provisions of the GPL are applicable +# instead of those above. If you wish to allow use of your +# version of this file only under the terms of the GPL and not to +# allow others to use your version of this file under the MPL, +# indicate your decision by deleting the provisions above and +# replace them with the notice and other provisions required by +# the GPL. If you do not delete the provisions above, a recipient +# may use your version of this file under either the MPL or the +# GPL. +# +# Config stuff for DEC OSF/1 +# + +# +# The Bourne shell (sh) on OSF1 doesn't handle "set -e" correctly, +# which we use to stop LOOP_OVER_DIRS submakes as soon as any +# submake fails. So we use the Korn shell instead. +# +SHELL = /usr/bin/ksh + +include $(CORE_DEPTH)/coreconf/UNIX.mk + +DEFAULT_COMPILER = cc + +CC = cc +OS_CFLAGS += $(NON_LD_FLAGS) -std1 +CCC = cxx +RANLIB = /bin/true +CPU_ARCH = alpha + +ifdef BUILD_OPT + OPTIMIZER += -Olimit 4000 +endif + +NON_LD_FLAGS += -ieee_with_inexact +OS_CFLAGS += -DOSF1 -D_REENTRANT + +ifeq ($(USE_PTHREADS),1) + OS_CFLAGS += -pthread +endif + +# The command to build a shared library on OSF1. +MKSHLIB += ld -shared -expect_unresolved "*" -soname $(notdir $@) +ifdef MAPFILE +MKSHLIB += -hidden -input $(MAPFILE) +endif +PROCESS_MAP_FILE = grep -v ';+' $(LIBRARY_NAME).def | grep -v ';-' | \ + sed -e 's; DATA ;;' -e 's,;;,,' -e 's,;.*,,' -e 's,^,-exported_symbol ,' > $@ + +DSO_LDOPTS += -shared diff --git a/security/coreconf/OSF1V2.0.mk b/security/coreconf/OSF1V2.0.mk new file mode 100644 index 000000000..de7dab643 --- /dev/null +++ b/security/coreconf/OSF1V2.0.mk @@ -0,0 +1,35 @@ +# +# The contents of this file are subject to the Mozilla Public +# License Version 1.1 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy of +# the License at http://www.mozilla.org/MPL/ +# +# Software distributed under the License is distributed on an "AS +# IS" basis, WITHOUT WARRANTY OF ANY KIND, 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 Netscape are +# Copyright (C) 1994-2000 Netscape Communications Corporation. All +# Rights Reserved. +# +# Contributor(s): +# +# Alternatively, the contents of this file may be used under the +# terms of the GNU General Public License Version 2 or later (the +# "GPL"), in which case the provisions of the GPL are applicable +# instead of those above. If you wish to allow use of your +# version of this file only under the terms of the GPL and not to +# allow others to use your version of this file under the MPL, +# indicate your decision by deleting the provisions above and +# replace them with the notice and other provisions required by +# the GPL. If you do not delete the provisions above, a recipient +# may use your version of this file under either the MPL or the +# GPL. +# +# Config stuff for DEC OSF/1 V2.0 +# +include $(CORE_DEPTH)/coreconf/OSF1.mk diff --git a/security/coreconf/OSF1V3.0.mk b/security/coreconf/OSF1V3.0.mk new file mode 100644 index 000000000..623b2f971 --- /dev/null +++ b/security/coreconf/OSF1V3.0.mk @@ -0,0 +1,35 @@ +# +# The contents of this file are subject to the Mozilla Public +# License Version 1.1 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy of +# the License at http://www.mozilla.org/MPL/ +# +# Software distributed under the License is distributed on an "AS +# IS" basis, WITHOUT WARRANTY OF ANY KIND, 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 Netscape are +# Copyright (C) 1994-2000 Netscape Communications Corporation. All +# Rights Reserved. +# +# Contributor(s): +# +# Alternatively, the contents of this file may be used under the +# terms of the GNU General Public License Version 2 or later (the +# "GPL"), in which case the provisions of the GPL are applicable +# instead of those above. If you wish to allow use of your +# version of this file only under the terms of the GPL and not to +# allow others to use your version of this file under the MPL, +# indicate your decision by deleting the provisions above and +# replace them with the notice and other provisions required by +# the GPL. If you do not delete the provisions above, a recipient +# may use your version of this file under either the MPL or the +# GPL. +# +# Config stuff for DEC OSF/1 V3.0 +# +include $(CORE_DEPTH)/coreconf/OSF1.mk diff --git a/security/coreconf/OSF1V3.2.mk b/security/coreconf/OSF1V3.2.mk new file mode 100644 index 000000000..9d584b37b --- /dev/null +++ b/security/coreconf/OSF1V3.2.mk @@ -0,0 +1,44 @@ +# +# The contents of this file are subject to the Mozilla Public +# License Version 1.1 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy of +# the License at http://www.mozilla.org/MPL/ +# +# Software distributed under the License is distributed on an "AS +# IS" basis, WITHOUT WARRANTY OF ANY KIND, 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 Netscape are +# Copyright (C) 1994-2000 Netscape Communications Corporation. All +# Rights Reserved. +# +# Contributor(s): +# +# Alternatively, the contents of this file may be used under the +# terms of the GNU General Public License Version 2 or later (the +# "GPL"), in which case the provisions of the GPL are applicable +# instead of those above. If you wish to allow use of your +# version of this file only under the terms of the GPL and not to +# allow others to use your version of this file under the MPL, +# indicate your decision by deleting the provisions above and +# replace them with the notice and other provisions required by +# the GPL. If you do not delete the provisions above, a recipient +# may use your version of this file under either the MPL or the +# GPL. +# +# On OSF1 V3.2, classic nspr is the default (and only) implementation +# strategy. +# + +# +# Config stuff for DEC OSF/1 V3.2 +# +include $(CORE_DEPTH)/coreconf/OSF1.mk + +ifeq ($(OS_RELEASE),V3.2) + OS_CFLAGS += -DOSF1V3 +endif diff --git a/security/coreconf/OSF1V4.0.mk b/security/coreconf/OSF1V4.0.mk new file mode 100644 index 000000000..164a6613a --- /dev/null +++ b/security/coreconf/OSF1V4.0.mk @@ -0,0 +1,51 @@ +# +# The contents of this file are subject to the Mozilla Public +# License Version 1.1 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy of +# the License at http://www.mozilla.org/MPL/ +# +# Software distributed under the License is distributed on an "AS +# IS" basis, WITHOUT WARRANTY OF ANY KIND, 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 Netscape are +# Copyright (C) 1994-2000 Netscape Communications Corporation. All +# Rights Reserved. +# +# Contributor(s): +# +# Alternatively, the contents of this file may be used under the +# terms of the GNU General Public License Version 2 or later (the +# "GPL"), in which case the provisions of the GPL are applicable +# instead of those above. If you wish to allow use of your +# version of this file only under the terms of the GPL and not to +# allow others to use your version of this file under the MPL, +# indicate your decision by deleting the provisions above and +# replace them with the notice and other provisions required by +# the GPL. If you do not delete the provisions above, a recipient +# may use your version of this file under either the MPL or the +# GPL. +# +# On OSF1 V4.0, pthreads is the default implementation strategy. +# Classic nspr is also available. +# +ifneq ($(OS_RELEASE),V3.2) + USE_PTHREADS = 1 + ifeq ($(CLASSIC_NSPR), 1) + USE_PTHREADS = + IMPL_STRATEGY := _CLASSIC + endif +endif + +# +# Config stuff for DEC OSF/1 V4.0 +# +include $(CORE_DEPTH)/coreconf/OSF1.mk + +ifeq ($(OS_RELEASE),V4.0) + OS_CFLAGS += -DOSF1V4 +endif diff --git a/security/coreconf/OSF1V4.0B.mk b/security/coreconf/OSF1V4.0B.mk new file mode 100644 index 000000000..73f357d17 --- /dev/null +++ b/security/coreconf/OSF1V4.0B.mk @@ -0,0 +1,35 @@ +# +# The contents of this file are subject to the Mozilla Public +# License Version 1.1 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy of +# the License at http://www.mozilla.org/MPL/ +# +# Software distributed under the License is distributed on an "AS +# IS" basis, WITHOUT WARRANTY OF ANY KIND, 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 Netscape are +# Copyright (C) 1994-2000 Netscape Communications Corporation. All +# Rights Reserved. +# +# Contributor(s): +# +# Alternatively, the contents of this file may be used under the +# terms of the GNU General Public License Version 2 or later (the +# "GPL"), in which case the provisions of the GPL are applicable +# instead of those above. If you wish to allow use of your +# version of this file only under the terms of the GPL and not to +# allow others to use your version of this file under the MPL, +# indicate your decision by deleting the provisions above and +# replace them with the notice and other provisions required by +# the GPL. If you do not delete the provisions above, a recipient +# may use your version of this file under either the MPL or the +# GPL. +# +# Config stuff for DEC OSF/1 V4.0B +# +include $(CORE_DEPTH)/coreconf/OSF1V4.0.mk diff --git a/security/coreconf/OSF1V4.0D.mk b/security/coreconf/OSF1V4.0D.mk new file mode 100644 index 000000000..515c76d5f --- /dev/null +++ b/security/coreconf/OSF1V4.0D.mk @@ -0,0 +1,39 @@ +# +# The contents of this file are subject to the Mozilla Public +# License Version 1.1 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy of +# the License at http://www.mozilla.org/MPL/ +# +# Software distributed under the License is distributed on an "AS +# IS" basis, WITHOUT WARRANTY OF ANY KIND, 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 Netscape are +# Copyright (C) 1994-2000 Netscape Communications Corporation. All +# Rights Reserved. +# +# Contributor(s): +# +# Alternatively, the contents of this file may be used under the +# terms of the GNU General Public License Version 2 or later (the +# "GPL"), in which case the provisions of the GPL are applicable +# instead of those above. If you wish to allow use of your +# version of this file only under the terms of the GPL and not to +# allow others to use your version of this file under the MPL, +# indicate your decision by deleting the provisions above and +# replace them with the notice and other provisions required by +# the GPL. If you do not delete the provisions above, a recipient +# may use your version of this file under either the MPL or the +# GPL. +# +# Config stuff for DEC OSF/1 V4.0D +# +include $(CORE_DEPTH)/coreconf/OSF1V4.0.mk +DEFINES += -DOSF1V4D + +OS_LIBS += -lpthread -lrt + diff --git a/security/coreconf/OSF1V5.0.mk b/security/coreconf/OSF1V5.0.mk new file mode 100644 index 000000000..176ca0845 --- /dev/null +++ b/security/coreconf/OSF1V5.0.mk @@ -0,0 +1,47 @@ +# +# The contents of this file are subject to the Mozilla Public +# License Version 1.1 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy of +# the License at http://www.mozilla.org/MPL/ +# +# Software distributed under the License is distributed on an "AS +# IS" basis, WITHOUT WARRANTY OF ANY KIND, 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 Netscape are +# Copyright (C) 1994-2000 Netscape Communications Corporation. All +# Rights Reserved. +# +# Contributor(s): +# +# Alternatively, the contents of this file may be used under the +# terms of the GNU General Public License Version 2 or later (the +# "GPL"), in which case the provisions of the GPL are applicable +# instead of those above. If you wish to allow use of your +# version of this file only under the terms of the GPL and not to +# allow others to use your version of this file under the MPL, +# indicate your decision by deleting the provisions above and +# replace them with the notice and other provisions required by +# the GPL. If you do not delete the provisions above, a recipient +# may use your version of this file under either the MPL or the +# GPL. +# +# On OSF1 V5.0, pthreads is the default implementation strategy. +# Classic nspr is also available. +# +ifneq ($(OS_RELEASE),V3.2) + USE_PTHREADS = 1 + ifeq ($(CLASSIC_NSPR), 1) + USE_PTHREADS = + IMPL_STRATEGY := _CLASSIC + endif +endif + +# +# Config stuff for DEC OSF/1 V5.0 +# +include $(CORE_DEPTH)/coreconf/OSF1.mk diff --git a/security/coreconf/OSF1V5.1.mk b/security/coreconf/OSF1V5.1.mk new file mode 100644 index 000000000..b08ed99fd --- /dev/null +++ b/security/coreconf/OSF1V5.1.mk @@ -0,0 +1,47 @@ +# +# The contents of this file are subject to the Mozilla Public +# License Version 1.1 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy of +# the License at http://www.mozilla.org/MPL/ +# +# Software distributed under the License is distributed on an "AS +# IS" basis, WITHOUT WARRANTY OF ANY KIND, 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 Netscape are +# Copyright (C) 2001 Netscape Communications Corporation. All +# Rights Reserved. +# +# Contributor(s): +# +# Alternatively, the contents of this file may be used under the +# terms of the GNU General Public License Version 2 or later (the +# "GPL"), in which case the provisions of the GPL are applicable +# instead of those above. If you wish to allow use of your +# version of this file only under the terms of the GPL and not to +# allow others to use your version of this file under the MPL, +# indicate your decision by deleting the provisions above and +# replace them with the notice and other provisions required by +# the GPL. If you do not delete the provisions above, a recipient +# may use your version of this file under either the MPL or the +# GPL. +# +# On OSF1 V5.1, pthreads is the default implementation strategy. +# Classic nspr is also available. +# +ifneq ($(OS_RELEASE),V3.2) + USE_PTHREADS = 1 + ifeq ($(CLASSIC_NSPR), 1) + USE_PTHREADS = + IMPL_STRATEGY := _CLASSIC + endif +endif + +# +# Config stuff for DEC OSF/1 V5.1 +# +include $(CORE_DEPTH)/coreconf/OSF1.mk diff --git a/security/coreconf/OpenBSD.mk b/security/coreconf/OpenBSD.mk new file mode 100644 index 000000000..14fa73489 --- /dev/null +++ b/security/coreconf/OpenBSD.mk @@ -0,0 +1,62 @@ +# +# The contents of this file are subject to the Mozilla Public +# License Version 1.1 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy of +# the License at http://www.mozilla.org/MPL/ +# +# Software distributed under the License is distributed on an "AS +# IS" basis, WITHOUT WARRANTY OF ANY KIND, 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 Netscape are +# Copyright (C) 1994-2000 Netscape Communications Corporation. All +# Rights Reserved. +# +# Contributor(s): +# +# Alternatively, the contents of this file may be used under the +# terms of the GNU General Public License Version 2 or later (the +# "GPL"), in which case the provisions of the GPL are applicable +# instead of those above. If you wish to allow use of your +# version of this file only under the terms of the GPL and not to +# allow others to use your version of this file under the MPL, +# indicate your decision by deleting the provisions above and +# replace them with the notice and other provisions required by +# the GPL. If you do not delete the provisions above, a recipient +# may use your version of this file under either the MPL or the +# GPL. +# +# Config stuff for OpenBSD +# + +include $(CORE_DEPTH)/coreconf/UNIX.mk + +DEFAULT_COMPILER = gcc +CC = gcc +CCC = g++ +RANLIB = ranlib + +CPU_ARCH := $(shell uname -p) +ifeq ($(CPU_ARCH),i386) +OS_REL_CFLAGS = -Di386 +CPU_ARCH = x86 +endif + +DLL_SUFFIX = so.1.0 + +OS_CFLAGS = $(DSO_CFLAGS) $(OS_REL_CFLAGS) -ansi -Wall -pipe -DOPENBSD + +OS_LIBS = + +ARCH = openbsd + +DSO_CFLAGS = -fPIC -DPIC +DSO_LDOPTS = -shared -Wl,-soname,lib$(LIBRARY_NAME)$(LIBRARY_VERSION).$(DLL_SUFFIX) +DSO_LDFLAGS = + +MKSHLIB = $(CC) $(DSO_LDOPTS) + diff --git a/security/coreconf/OpenUNIX.mk b/security/coreconf/OpenUNIX.mk new file mode 100644 index 000000000..22d953df3 --- /dev/null +++ b/security/coreconf/OpenUNIX.mk @@ -0,0 +1,91 @@ +# +# The contents of this file are subject to the Mozilla Public +# License Version 1.1 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy of +# the License at http://www.mozilla.org/MPL/ +# +# Software distributed under the License is distributed on an "AS +# IS" basis, WITHOUT WARRANTY OF ANY KIND, 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 Netscape are +# Copyright (C) 1994-2000 Netscape Communications Corporation. All +# Rights Reserved. +# +# Contributor(s): +# +# Alternatively, the contents of this file may be used under the +# terms of the GNU General Public License Version 2 or later (the +# "GPL"), in which case the provisions of the GPL are applicable +# instead of those above. If you wish to allow use of your +# version of this file only under the terms of the GPL and not to +# allow others to use your version of this file under the MPL, +# indicate your decision by deleting the provisions above and +# replace them with the notice and other provisions required by +# the GPL. If you do not delete the provisions above, a recipient +# may use your version of this file under either the MPL or the +# GPL. +# +# Config stuff for Open UNIX 8. +# + +include $(CORE_DEPTH)/coreconf/UNIX.mk + +DEFAULT_COMPILER = gcc + +CC = gcc +OS_CFLAGS += -fPIC +CCC = g++ +CCC += -DPRFSTREAMS_BROKEN -I/usr/gnu/lib/g++-include +# CCC = $(CORE_DEPTH)/build/hcpp +# CCC += +.cpp +w +RANLIB = /bin/true + +# +# -DSCO_PM - Policy Manager AKA: SCO Licensing +# -DSCO - Changes to Netscape source (consistent with AIX, LINUX, etc..) +# -Dsco - Needed for /usr/include/X11/* +# +OS_CFLAGS += -DSCO_SV -DSYSV -D_SVID3 -DHAVE_STRERROR -DSW_THREADS -DSCO_PM -DSCO -Dsco +#OS_LIBS += -lpmapi -lsocket -lc +MKSHLIB = $(LD) +MKSHLIB += $(DSO_LDOPTS) +XINC = /usr/include/X11 +MOTIFLIB += -lXm +INCLUDES += -I$(XINC) +CPU_ARCH = x86 +GFX_ARCH = x +ARCH = sco +LOCALE_MAP = $(CORE_DEPTH)/cmd/xfe/intl/sco.lm +EN_LOCALE = C +DE_LOCALE = de_DE.ISO8859-1 +FR_LOCALE = fr_FR.ISO8859-1 +JP_LOCALE = ja +SJIS_LOCALE = ja_JP.SJIS +KR_LOCALE = ko_KR.EUC +CN_LOCALE = zh +TW_LOCALE = zh +I2_LOCALE = i2 +LOC_LIB_DIR = /usr/lib/X11 +NOSUCHFILE = /solaris-rm-f-sucks +BSDECHO = /bin/echo +ifdef MAPFILE +# Add LD options to restrict exported symbols to those in the map file +endif +# Change PROCESS to put the mapfile in the correct format for this platform +PROCESS_MAP_FILE = cp $(LIBRARY_NAME).def $@ + +# +# These defines are for building unix plugins +# +BUILD_UNIX_PLUGINS = 1 +#DSO_LDOPTS += -b elf -G -z defs +DSO_LDOPTS += -G +DSO_LDFLAGS += -nostdlib -L/lib -L/usr/lib -lXm -lXt -lX11 -lgen + +# Used for Java compiler +EXPORT_FLAGS += -W l,-Bexport diff --git a/security/coreconf/OpenVMS.mk b/security/coreconf/OpenVMS.mk new file mode 100755 index 000000000..8e9813b32 --- /dev/null +++ b/security/coreconf/OpenVMS.mk @@ -0,0 +1,67 @@ +# +# The contents of this file are subject to the Netscape Public License +# Version 1.1 (the "NPL"); you may not use this file except in +# compliance with the NPL. You may obtain a copy of the NPL at +# http://www.mozilla.org/NPL/ +# +# Software distributed under the NPL is distributed on an "AS IS" basis, +# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL +# for the specific language governing rights and limitations under the +# NPL. +# +# The Initial Developer of this code under the NPL is Netscape +# Communications Corporation. Portions created by Netscape are +# Copyright (C) 1998 Netscape Communications Corporation. All Rights +# Reserved. +# + +# +# Config stuff for Compaq OpenVMS +# + +include $(CORE_DEPTH)/coreconf/UNIX.mk + +ifdef INTERNAL_TOOLS +CC = c89 +CCC = cxx +OPTIMIZER = -O +else +CC = ccc +CCC = ccc +endif + +RANLIB = /bin/true + +CPU_ARCH := $(shell uname -Wh) + +OS_CFLAGS = -DVMS -DVMS_AS_IS -Wc,names=\(short,as\) \ + -DGENERIC_PTHREAD_REDEFINES -DNO_UDSOCK +OS_CXXFLAGS = -DVMS -DVMS_AS_IS -Wc,names=\(short,as\) \ + -DGENERIC_PTHREAD_REDEFINES -DNO_UDSOCK + +# Maybe this should go into rules.mk or something? +ifdef NSPR_INCLUDE_DIR +INCLUDES += -I$(NSPR_INCLUDE_DIR) +endif + +# +# XCFLAGS are the only CFLAGS that are used during a link operation. Defining +# OPTIMIZER in XCFLAGS means that each compilation line gets OPTIMIZER +# included twice, but at least we get OPTIMIZER included in the link +# operations; and OpenVMS needs it! +# +XCFLAGS += $(OPTIMIZER) + +# The command to build a shared library in POSIX on OpenVMS. +MKSHLIB = vmsld_psm OBJDIR=$(OBJDIR) $(OPTIMIZER) +ifdef MAPFILE +# Add LD options to restrict exported symbols to those in the map file +endif +# Change PROCESS to put the mapfile in the correct format for this platform +PROCESS_MAP_FILE = copy $(LIBRARY_NAME).def $@ + + +# +# Always set CPU_TAG on Linux, OpenVMS, WINCE. +# +CPU_TAG = _$(CPU_ARCH) diff --git a/security/coreconf/OpenVMSV7.1-2.mk b/security/coreconf/OpenVMSV7.1-2.mk new file mode 100755 index 000000000..eb7d67a3f --- /dev/null +++ b/security/coreconf/OpenVMSV7.1-2.mk @@ -0,0 +1,22 @@ +# +# The contents of this file are subject to the Netscape Public License +# Version 1.1 (the "NPL"); you may not use this file except in +# compliance with the NPL. You may obtain a copy of the NPL at +# http://www.mozilla.org/NPL/ +# +# Software distributed under the NPL is distributed on an "AS IS" basis, +# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL +# for the specific language governing rights and limitations under the +# NPL. +# +# The Initial Developer of this code under the NPL is Netscape +# Communications Corporation. Portions created by Netscape are +# Copyright (C) 1998 Netscape Communications Corporation. All Rights +# Reserved. +# + +# +# Config stuff for Compaq OpenVMS +# + +include $(CORE_DEPTH)/coreconf/OpenVMS.mk diff --git a/security/coreconf/QNX.mk b/security/coreconf/QNX.mk new file mode 100644 index 000000000..e2758c512 --- /dev/null +++ b/security/coreconf/QNX.mk @@ -0,0 +1,68 @@ +# +# The contents of this file are subject to the Mozilla Public +# License Version 1.1 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy of +# the License at http://www.mozilla.org/MPL/ +# +# Software distributed under the License is distributed on an "AS +# IS" basis, WITHOUT WARRANTY OF ANY KIND, 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 Netscape are +# Copyright (C) 2001 Netscape Communications Corporation. All +# Rights Reserved. +# +# Contributor(s): +# +# Alternatively, the contents of this file may be used under the +# terms of the GNU General Public License Version 2 or later (the +# "GPL"), in which case the provisions of the GPL are applicable +# instead of those above. If you wish to allow use of your +# version of this file only under the terms of the GPL and not to +# allow others to use your version of this file under the MPL, +# indicate your decision by deleting the provisions above and +# replace them with the notice and other provisions required by +# the GPL. If you do not delete the provisions above, a recipient +# may use your version of this file under either the MPL or the +# GPL. +# +# Config stuff for QNX +# + +include $(CORE_DEPTH)/coreconf/UNIX.mk + +USE_PTHREADS = 1 + +ifeq ($(USE_PTHREADS),1) + IMPL_STRATEGY = _PTH +endif + +CC = gcc +CCC = g++ +RANLIB = ranlib + +DEFAULT_COMPILER = gcc +ifeq ($(OS_TEST),ppc) + CPU_ARCH = ppc +else + CPU_ARCH = x86 +endif + +MKSHLIB = $(CC) -shared -Wl,-soname -Wl,$(@:$(OBJDIR)/%.so=%.so) +ifdef BUILD_OPT + OPTIMIZER = -O2 +endif + +OS_CFLAGS = $(DSO_CFLAGS) $(OS_REL_CFLAGS) -Wall -pipe -DNTO -DHAVE_STRERROR -D_QNX_SOURCE -D_POSIX_C_SOURCE=199506 -D_XOPEN_SOURCE=500 + +ifdef USE_PTHREADS + DEFINES += -D_REENTRANT +endif + +DSO_CFLAGS = -fPIC +DSO_LDOPTS = -shared +DSO_LDFLAGS = diff --git a/security/coreconf/README b/security/coreconf/README new file mode 100644 index 000000000..dcacd2a85 --- /dev/null +++ b/security/coreconf/README @@ -0,0 +1,563 @@ +OVERVIEW of "ns/coreconf": + + This README file is an attempt to provide the reader with a simple + synopsis of the "ns/coreconf" build system which was originally + fundamentally designed and built to accomodate Netscape's binary + release model. Wherever possible, an attempt has been made to + comply with the NSPR 2.0 build system, including mimicing the + compiler/linker flags, and directory naming structure. The reader + should keep in mind that the system builds binary releases of + header files, class files, libraries, and executables on numerous + flavors of UNIX and Windows operating systems. Unfortunately, + no serious attempt has ever been made to incorporate an ability to + generate cross-platform binaries on an Apple MacIntosh platform. + + Note that this file will not attempt to redefine or document the + architecture of this system. However, documents on this subject + are available at the following URL: + + http://warp/hardcore/prj-ttools/specs/release/index.html + + + +DEPENDENCIES of "ns/coreconf": + + The "ns/coreconf" build system requires the specified versions of + the following platform-dependent tools: + + UNIX Platforms: + -------------- + gmake (version 3.74 or later) + perl 4.0 (NOTE: perl 5.003 or later recommended) + uname + + Windows Platforms: + ----------------- + gmake 3.74 (must use hacked Netscape version) + shmsdos.exe (contained in Netscape gmake.exe) + nsinstall.exe (contained in Netscape gmake.exe) + perl.exe (version 4.0 for everything except testing; + NOTE: MKS toolkit perl 5.002 is broken) + perl5.exe (for testing; + NOTE: perl 5.003 or later recommended; + MKS toolkit perl 5.002 is broken) + uname.exe (use nstools version) + +ENHANCEMENTS to "ns/coreconf": + + With the advent of Certificate Server 4.0 using the ns/coreconf + build system, several changes had to be made to enhance + ns/coreconf support for building Java/JNI classes/programs, as + well as libraries slated to be released as binaries. While the + following may not represent an exhaustive list of these changes, + it does attempt to be at least somewhat comprehensive: + + (1) During the course of these enhancements, a total of + four files have been modified, and four new files have + been added. + + The following files have been modified: + + - command.mk: removed old definition of JAR + + - config.mk: added include statement of new + "jdk.mk" file + + - ruleset.mk: allowed the $(MKPROG) variable to be + overridden by supplying it with a + default value of $(CC); augmented + numerous definitions to enhance + ability of ns/coreconf to produce + a more robust set of libraries; + added some JNI definitions; PACKAGE + definition may be overridden by new + "jdk.mk" file + + - rules.mk: separated the compile phase of a + program from the link phase of a + program such that a developer can + now strictly override program linkage + by simply supplying a $(MKPROG) + variable; augmented NETLIBDEPTH + to use CORE_DEPTH but retain backward + compatibility; added JNI section; + modified .PRECIOUS rule; + + The following files have been added: + + - README: this file; an ASCII-based text + document used to summarize the + ns/coreconf build system and + suitable (paginated) for printing + + - jdk.mk: a file comprising most (if not all) + of the default Java related build + information; the definitions in this + file are only included if NS_USE_JDK + has been defined + + - jniregen.pl: a perl script used to create a + dependency for when JNI files should + be regenerated (based upon any change + to the ".class" file from which the + ".h" file was originally generated) + + - outofdate.pl: a perl script used to create a + dependency for when ".class" files + should be regenerated (based upon + any change to the ".java" file + from which the ".class" file was + originally generated) + + (2) As stated above, the ns/coreconf build system now separates + the link phase of a program from its compilation phase. + While ns/coreconf still works exactly as it used to because + the $(MKPROG) variable is assigned $(CC) by default, a developer + may now override this behavior by simply supplying their + own unique value for $(MKPROG) on every platform. This allows + a program compiled with $(CC) to link with external libraries + that may contain "C++" linkage. Before this change, a + programmer would need to reference their own local copy of + rules.mk (see the ns/sectools/cmd/pk12util program for + an example of how this used to be accomplished). + + (3) Currently, the ns/coreconf build system differs from the + NSPR 2.0 build system which utilizes an "_s" to denote + static libraries from import libraries. In fact, the + ns/coreconf build system adds no prefixes or suffixes to + distinguish one version of static libraries from another. + Note that both the ns/coreconf build system as well as the + NSPR 2.0 build system do nothing to provide a method of + distinguishing 16-bit from 32-bit static libraries on the + same machine, either, since: + + a) this might only provide difficulty during + development, since static libraries always + need to be embedded within a program + (note this is highly unlikely, since libraries + for different platforms are subdivided via + a well-known subdirectory structure, and + a developer may use multiple trees for + development), + + b) this maintains backwards compatibility, + something very important since no legacy + programs will need to change their link phase, and + + c) Netscape as a company has dropped any plans + of future development of 16-bit products. + + (4) Since several members of the Hardcore Security group did + not favor NSPR 2.0's solution of adding an "_s" to static + libraries on Windows platforms as a method to distinguish + them from their import library cousins, a different solution + was proposed and has been recently implemented for ns/coreconf: + + - a 16 has been added as a suffix to both dynamic and + import libraries built on 16-bit Windows platforms + + - a 32 has been added as a suffix to both dynamic and + import libraries built on 32-bit Windows platforms + + Since, the HCL release process currently only contains a + single instance of building a dynamic library, + ns/security/lib/fortcrypt/fort12.dll, the impact of this + change should be relatively small. + + It should be noted that although this would additionally + limit the 8.3 namespace on 16-bit platforms, it is highly + unlikely that any future development will be performed on + this platform. + + (5) The $(LIBRARY_VERSION) tag has been added to all non-static + libraries created on UNIX operating systems to alleviate + any future confusion for binary releases which utilize this + tag. Again, it should be noted that this tag is only + utilized on non-static libraries, since more than one + version of the library may need to exist simultaneously + if multiple products are utilized. + + Currently, only one HCL released library utilizes this tag: + + ns/security/lib/fortcrypt/fort12.a + (e. g. - in this library, the tag has been set to '12') + + Again, it should be noted that although this would + additionally limit the 8.3 namespace on 16-bit platforms, + it is highly unlikely that any future development will be + performed on this platform. + + (6) The $(JDK_DEBUG_SUFFIX) extension has been added to all + library and program names to support debug versions of + Java programs (e. g. - java_g, javac_g, etc). + + Once again, it should be noted that although this would + additionally limit the 8.3 namespace on 16-bit platforms, + it is highly unlikely that any future Java development + will be performed on this platform. + + (7) Most (if not all) default definitions for java have been + encapsulated within their own file, jdk.mk, which is + always included by default in ns/coreconf/config.mk. + However, the definitions within this file are only ever + activated if NS_USE_JDK has been set to be 1. + + + (8) Two perl scripts (jniregen.pl and outofdate.pl) have been + added to the system to foster a more robust development + environment for composing Java and JNI programs + utilizing the ns/coreconf build system. Both of these + perl scripts are related to resolving dependencies which + can not be accomplished through normal makefile dependencies. + + (9) This file, README, was created in an attempt to allow + developers who have familiarity with ns/coreconf a simple + roadmap for what has changed, as well as a top-level view of + what comprises ns/coreconf. This file was written in + ASCII (rather than HTML) primarily to promote simple + paginated printing. + +OVERVIEW of "config.mk": + + This file contains the configuration information necessary to + build each "Core Components" source module: + + include file name Purpose + =================== ======================================= + arch.mk source and release <architecture> tags + + command.mk default command macros + (NOTE: may be overridden in $(OS_CONFIG).mk) + + $(OS_CONFIG).mk <architecture>-specific macros + (dependent upon <architecture> tags) + + platform.mk source and release <platform> tags + (dependent upon <architecture> tags) + + tree.mk release <tree> tags + (dependent upon <architecture> tags) + + module.mk source and release <component> tags + (NOTE: A component is also called a module + or a subsystem. This file is dependent upon + $(MODULE) being defined on the command + line, as an environment variable, or in + individual makefiles, or more + appropriately, manifest.mn) + + version.mk release <version> tags + (dependent upon $(MODULE) being defined on + the command line, as an environment variable, + or in individual makefiles, or more + appropriately, manifest.mn) + + location.mk macros to figure out binary code location + (dependent upon <platform> tags) + + source.mk <component>-specific source path + (dependent upon <user_source_tree>, + <source_component>, <version>, and + <platform> tags) + + headers.mk include switch for support header files + (dependent upon <tree>, <component>, <version>, + and <platform> tags) + + prefix.mk compute program prefixes + + suffix.mk compute program suffixes + (dependent upon <architecture> tags) + + jdk.mk define JDK + (dependent upon <architecture>, + <source>, and <suffix> tags) + + ruleset.mk Master "Core Components" rule set + (should always be the last file + included by config.mk) + + + +OVERVIEW of "rules.mk": + + The "rules.mk" file consists of four sections. The first section + contains the "master" build rules for all binary releases. While + this section can (and should) largely be thought of as "language" + independent, it does utilize the "perl" scripting language to + perform both the "import" and "release" of binary modules. + + The rules which dwell in this section and their purpose: + + + CATEGORY/rule:: Purpose + =================== ======================================= + + GENERAL + ------- + all:: "default" all-encompassing rule which + performs "export libs program install" + + export:: recursively copy specified + cross-platform header files to the + $(SOURCE_XPHEADERS_DIR) directory; + recursively copy specified + machine-dependent header files to the + $(SOURCE_MDHEADERS_DIR) directory; + although all rules can be written to + repetively "chain" into other sections, + this rule is the most commonly used + rule to "chain" into other sections + such as Java providing a simple + mechanism which allows no need for + developers to memorize specialized + rules + + libs:: recursively build + static (archival) $(LIBRARY), shared + (dynamic link) $(SHARED_LIBRARY), + and/or import $(IMPORT_LIBRARY) + libraries + + program:: recursively build $(PROGRAM) + executable + + install:: recursively copy all libraries to + $(SOURCE_LIB_DIR) directory; + recursively copy all executables to + $(SOURCE_BIN_DIR) directory + + clean:: remove all files specified in the + $(ALL_TRASH) variable + + clobber:: synonym for "clean::" rule + + realclean:: remove all files specified by + $(wildcard *.OBJ), dist, and in + the $(ALL_TRASH) variable + + clobber_all:: synonym for "realclean::" rule + + private_export:: recursively copy specified + cross-platform header files to the + $(SOURCE_XPPRIVATE_DIR) directory + + + IMPORT + ------ + import:: uses perl script to retrieve specified + VERSION of the binary release from + $(RELEASE_TREE) + + RELEASE + ------- + release_clean:: remove all files from the + $(SOURCE_RELEASE_PREFIX) directory + + release:: place specified VERSION of the + binary release in the appropriate + $(RELEASE_TREE) directory + + release_export:: recursively copy specified + cross-platform header files to the + $(SOURCE_XPHEADERS_DIR)/include + directory + + release_md:: recursively copy all libraries to + $(SOURCE_RELEASE_PREFIX)/ + $(SOURCE_RELEASE_LIB_DIR) directory; + recursively copy all executables to + $(SOURCE_RELEASE_PREFIX)/ + $(SOURCE_RELEASE_BIN_DIR) directory + + release_jars:: use perl script to package appropriate + files in the $(XPCLASS_JAR), + $(XPHEADER_JAR), $(MDHEADER_JAR), and + $(MDBINARY_JAR) jar files + + release_cpdistdir:: use perl script to copy the + $(XPCLASS_JAR), $(XPHEADER_JAR), + $(MDHEADER_JAR), and $(MDBINARY_JAR) + jar files to the specified VERSION + of the $(RELEASE_TREE) directory + + + + TOOLS and AUTOMATION + -------------------- + platform:: tool used to display the platform name + as composed within the "arch.mk" file + + autobuild:: automation rule used by "Bonsai" and + "Tinderbox" to automatically generate + binary releases on various platforms + + tests:: automation tool used to run the + "regress" and "reporter" tools + on various regression test suites + + The second section of "rules.mk" primarily contains several + "language" dependent build rules for binary releases. These are + generally "computed" rules (created on the "fly"), and include + rules used by "C", "C++", assembly, the preprocessor, perl, and + the shell. + + The rules which dwell in this section and their purpose: + + + CATEGORY/rule:: Purpose + =================== ============================= + + LIBRARIES + --------- + $(LIBRARY): build the static library + specified by the $(LIBRARY) + variable + + $(IMPORT_LIBRARY): build the import library + specified by the + $(IMPORT_LIBRARY) variable + + $(SHARED_LIBRARY): build the shared + (dynamic link) library + specified by the + $(SHARED_LIBRARY) variable + + + PROGRAMS + -------- + $(PROGRAM): build the binary executable + specified by the $(PROGRAM) + rule + + $(OBJDIR)/ + $(PROG_PREFIX)%.pure: build the "purified" binary + executable specified by this + rule + + + OBJECTS + ------- + $(OBJDIR)/ + $(PROG_PREFIX)%$(OBJ_SUFFIX): build the object file + associated with the + makefile rule dependency: + + %.c = C file + %.cpp = C++ file + %.cc = C++ file + %.s = assembly file + %.S = assembly file + + $(OBJDIR)/ + $(PROG_PREFIX)%: (NOTE: deprecated rule) + build the object file + associated with the + makefile rule dependency: + + %.cpp = C++ file + + MISCELLANEOUS + ------------- + $(DIRS):: specifies a helper method + used by $(LOOP_THROUGH_DIRS) + to recursively change + directories and invoke + $(MAKE) + + %.i: build the preprocessor file + associated with the + makefile rule dependency: + + %.c = C file + %.cpp = C++ file + + %: process the specified file + using the method associated + with the makefile rule + dependency: + + %.pl = perl script + %.sh = shell script + + alltags: tool used to recursively + create a "ctags"-style + file for reference + + The third section of "rules.mk' primarily contains several JAVA + "language" build rules for binary releases. These are also + generally "computed" rules (created on the "fly"). + + The rules which dwell in this section and their purpose: + + + CATEGORY/rule:: Purpose + =================== ============================= + $(JAVA_DESTPATH):: create directory specified + as the Java destination path + for where classes are + deposited + + $(JAVA_DESTPATH)/$(PACKAGE):: create directories specified + within the $(PACKAGE) + variable + + $(JMCSRCDIR):: create directory specified + as the JMC destination path + + $(JRI_HEADER_CFILES): used to generate/regenerate + JRI header files for "C" + + $(JRI_STUB_CFILES): used to generate/regenerate + JRI stub files for "C" + + $(JNI_HEADERS): used to generate/regenerate + JNI header files for "C" + + The fourth section of "rules.mk" primarily contains miscellaneous + build rules for binary releases. Many of these rules are here to + create new subdirectories, manage dependencies, and/or override + standard gmake "Makefile" rules. + + The rules which dwell in this section and their purpose: + + + CATEGORY/rule:: Purpose + =================== ============================= + + $(PUBLIC_EXPORT_DIR):: create directory used to + house public "C" header files + + $(PRIVATE_EXPORT_DIR):: create directory used to + house private "C" header + files + + $(SOURCE_XP_DIR)/ + release/include:: create directory used to + house "C" header files + contained in a release + + $(MKDEPENDENCIES):: for UNIX systems, create + a directory used to house + dependencies and utilize + the $(MKDEPEND) rule to + create them + + $(MKDEPEND):: cd to the dependency + directory and create them + + depend:: if $(OBJS) exist, perform the + $(MKDEPEND) rule followed by + the $(MKDEPENDENCIES) rule + + dependclean:: remove all files contained + in the dependency repository + + .DEFAULT: standard gmake rule + + .SUFFIXES: standard gmake rule + + .PRECIOUS: standard gmake rule + + .PHONY: standard gmake rule + diff --git a/security/coreconf/ReliantUNIX.mk b/security/coreconf/ReliantUNIX.mk new file mode 100644 index 000000000..a3c79ce82 --- /dev/null +++ b/security/coreconf/ReliantUNIX.mk @@ -0,0 +1,88 @@ +# +# The contents of this file are subject to the Mozilla Public +# License Version 1.1 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy of +# the License at http://www.mozilla.org/MPL/ +# +# Software distributed under the License is distributed on an "AS +# IS" basis, WITHOUT WARRANTY OF ANY KIND, 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 Netscape are +# Copyright (C) 1994-2000 Netscape Communications Corporation. All +# Rights Reserved. +# +# Contributor(s): +# +# Alternatively, the contents of this file may be used under the +# terms of the GNU General Public License Version 2 or later (the +# "GPL"), in which case the provisions of the GPL are applicable +# instead of those above. If you wish to allow use of your +# version of this file only under the terms of the GPL and not to +# allow others to use your version of this file under the MPL, +# indicate your decision by deleting the provisions above and +# replace them with the notice and other provisions required by +# the GPL. If you do not delete the provisions above, a recipient +# may use your version of this file under either the MPL or the +# GPL. +# +# Config stuff for ReliantUNIX +# + +include $(CORE_DEPTH)/coreconf/UNIX.mk + +DEFAULT_COMPILER = cc + +ifdef NS_USE_GCC + ## gcc-2.7.2 homebrewn + CC = gcc + CCC = g++ + AS = $(CC) + ASFLAGS += -x assembler-with-cpp + LD = gld + ODD_CFLAGS = -pipe -Wall -Wno-format + ifdef BUILD_OPT + OPTIMIZER += -O6 + endif + MKSHLIB = $(LD) + MKSHLIB += -G -h $(@:$(OBJDIR)/%.so=%.so) + DSO_LDOPTS += -G -Xlinker -Blargedynsym +else + ## native compiler (CDS++ 1.0) +# CC = /usr/bin/cc + CC = cc + CCC = /usr/bin/CC + AS = /usr/bin/cc + ODD_CFLAGS = + ifdef BUILD_OPT + OPTIMIZER += -O -F Olimit,4000 + endif + MKSHLIB = $(CC) + MKSHLIB += -G -h $(@:$(OBJDIR)/%.so=%.so) + DSO_LDOPTS += -G -W l,-Blargedynsym +endif +ifdef MAPFILE +# Add LD options to restrict exported symbols to those in the map file +endif +# Change PROCESS to put the mapfile in the correct format for this platform +PROCESS_MAP_FILE = cp $(LIBRARY_NAME).def $@ + +NOSUCHFILE = /sni-rm-f-sucks +ODD_CFLAGS += -DSVR4 -DSNI -DRELIANTUNIX +CPU_ARCH = mips +RANLIB = /bin/true + +# For purify +NOMD_OS_CFLAGS += $(ODD_CFLAGS) + +# we do not have -MDupdate ... +OS_CFLAGS += $(NOMD_OS_CFLAGS) +OS_LIBS += -lsocket -lnsl -lresolv -lgen -ldl -lc /usr/ucblib/libucb.a + +ifdef DSO_BACKEND + DSO_LDOPTS += -h $(DSO_NAME) +endif diff --git a/security/coreconf/ReliantUNIX5.4.mk b/security/coreconf/ReliantUNIX5.4.mk new file mode 100644 index 000000000..a5bca60a3 --- /dev/null +++ b/security/coreconf/ReliantUNIX5.4.mk @@ -0,0 +1,35 @@ +# +# The contents of this file are subject to the Mozilla Public +# License Version 1.1 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy of +# the License at http://www.mozilla.org/MPL/ +# +# Software distributed under the License is distributed on an "AS +# IS" basis, WITHOUT WARRANTY OF ANY KIND, 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 Netscape are +# Copyright (C) 1994-2000 Netscape Communications Corporation. All +# Rights Reserved. +# +# Contributor(s): +# +# Alternatively, the contents of this file may be used under the +# terms of the GNU General Public License Version 2 or later (the +# "GPL"), in which case the provisions of the GPL are applicable +# instead of those above. If you wish to allow use of your +# version of this file only under the terms of the GPL and not to +# allow others to use your version of this file under the MPL, +# indicate your decision by deleting the provisions above and +# replace them with the notice and other provisions required by +# the GPL. If you do not delete the provisions above, a recipient +# may use your version of this file under either the MPL or the +# GPL. +# +# Config stuff for ReliantUNIX5.4 +# +include $(CORE_DEPTH)/coreconf/ReliantUNIX.mk diff --git a/security/coreconf/SCOOS5.0.mk b/security/coreconf/SCOOS5.0.mk new file mode 100644 index 000000000..b3370a1fd --- /dev/null +++ b/security/coreconf/SCOOS5.0.mk @@ -0,0 +1,36 @@ +# +# The contents of this file are subject to the Mozilla Public +# License Version 1.1 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy of +# the License at http://www.mozilla.org/MPL/ +# +# Software distributed under the License is distributed on an "AS +# IS" basis, WITHOUT WARRANTY OF ANY KIND, 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 Netscape are +# Copyright (C) 1994-2000 Netscape Communications Corporation. All +# Rights Reserved. +# +# Contributor(s): +# +# Alternatively, the contents of this file may be used under the +# terms of the GNU General Public License Version 2 or later (the +# "GPL"), in which case the provisions of the GPL are applicable +# instead of those above. If you wish to allow use of your +# version of this file only under the terms of the GPL and not to +# allow others to use your version of this file under the MPL, +# indicate your decision by deleting the provisions above and +# replace them with the notice and other provisions required by +# the GPL. If you do not delete the provisions above, a recipient +# may use your version of this file under either the MPL or the +# GPL. +# +# Config stuff for SCO OpenServer 5.0 for x86. +# + +include $(CORE_DEPTH)/coreconf/SCO_SV3.2.mk diff --git a/security/coreconf/SCO_SV3.2.mk b/security/coreconf/SCO_SV3.2.mk new file mode 100644 index 000000000..4683783ee --- /dev/null +++ b/security/coreconf/SCO_SV3.2.mk @@ -0,0 +1,91 @@ +# +# The contents of this file are subject to the Mozilla Public +# License Version 1.1 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy of +# the License at http://www.mozilla.org/MPL/ +# +# Software distributed under the License is distributed on an "AS +# IS" basis, WITHOUT WARRANTY OF ANY KIND, 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 Netscape are +# Copyright (C) 1994-2000 Netscape Communications Corporation. All +# Rights Reserved. +# +# Contributor(s): +# +# Alternatively, the contents of this file may be used under the +# terms of the GNU General Public License Version 2 or later (the +# "GPL"), in which case the provisions of the GPL are applicable +# instead of those above. If you wish to allow use of your +# version of this file only under the terms of the GPL and not to +# allow others to use your version of this file under the MPL, +# indicate your decision by deleting the provisions above and +# replace them with the notice and other provisions required by +# the GPL. If you do not delete the provisions above, a recipient +# may use your version of this file under either the MPL or the +# GPL. +# +# Config stuff for SCO Unix for x86. +# + +include $(CORE_DEPTH)/coreconf/UNIX.mk + +DEFAULT_COMPILER = cc + +CC = cc +OS_CFLAGS += -b elf -KPIC +CCC = g++ +CCC += -b elf -DPRFSTREAMS_BROKEN -I/usr/local/lib/g++-include +# CCC = $(CORE_DEPTH)/build/hcpp +# CCC += +.cpp +w +RANLIB = /bin/true + +# +# -DSCO_PM - Policy Manager AKA: SCO Licensing +# -DSCO - Changes to Netscape source (consistent with AIX, LINUX, etc..) +# -Dsco - Needed for /usr/include/X11/* +# +OS_CFLAGS += -DSCO_SV -DSYSV -D_SVID3 -DHAVE_STRERROR -DSW_THREADS -DSCO_PM -DSCO -Dsco +#OS_LIBS += -lpmapi -lsocket -lc +MKSHLIB = $(LD) +MKSHLIB += $(DSO_LDOPTS) +XINC = /usr/include/X11 +MOTIFLIB += -lXm +INCLUDES += -I$(XINC) +CPU_ARCH = x86 +GFX_ARCH = x +ARCH = sco +LOCALE_MAP = $(CORE_DEPTH)/cmd/xfe/intl/sco.lm +EN_LOCALE = C +DE_LOCALE = de_DE.ISO8859-1 +FR_LOCALE = fr_FR.ISO8859-1 +JP_LOCALE = ja +SJIS_LOCALE = ja_JP.SJIS +KR_LOCALE = ko_KR.EUC +CN_LOCALE = zh +TW_LOCALE = zh +I2_LOCALE = i2 +LOC_LIB_DIR = /usr/lib/X11 +NOSUCHFILE = /solaris-rm-f-sucks +BSDECHO = /bin/echo +ifdef MAPFILE +# Add LD options to restrict exported symbols to those in the map file +endif +# Change PROCESS to put the mapfile in the correct format for this platform +PROCESS_MAP_FILE = cp $(LIBRARY_NAME).def $@ + +# +# These defines are for building unix plugins +# +BUILD_UNIX_PLUGINS = 1 +#DSO_LDOPTS += -b elf -G -z defs +DSO_LDOPTS += -b elf -G +DSO_LDFLAGS += -nostdlib -L/lib -L/usr/lib -lXm -lXt -lX11 -lgen + +# Used for Java compiler +EXPORT_FLAGS += -W l,-Bexport diff --git a/security/coreconf/SunOS4.1.3_U1.mk b/security/coreconf/SunOS4.1.3_U1.mk new file mode 100644 index 000000000..1bea16fc3 --- /dev/null +++ b/security/coreconf/SunOS4.1.3_U1.mk @@ -0,0 +1,58 @@ +# +# The contents of this file are subject to the Mozilla Public +# License Version 1.1 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy of +# the License at http://www.mozilla.org/MPL/ +# +# Software distributed under the License is distributed on an "AS +# IS" basis, WITHOUT WARRANTY OF ANY KIND, 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 Netscape are +# Copyright (C) 1994-2000 Netscape Communications Corporation. All +# Rights Reserved. +# +# Contributor(s): +# +# Alternatively, the contents of this file may be used under the +# terms of the GNU General Public License Version 2 or later (the +# "GPL"), in which case the provisions of the GPL are applicable +# instead of those above. If you wish to allow use of your +# version of this file only under the terms of the GPL and not to +# allow others to use your version of this file under the MPL, +# indicate your decision by deleting the provisions above and +# replace them with the notice and other provisions required by +# the GPL. If you do not delete the provisions above, a recipient +# may use your version of this file under either the MPL or the +# GPL. +# +# Config stuff for SunOS4.1 +# + +include $(CORE_DEPTH)/coreconf/UNIX.mk + +DEFAULT_COMPILER = cc + +INCLUDES += -I/usr/dt/include -I/usr/openwin/include -I/home/motif/usr/include + +# SunOS 4 _requires_ that shared libs have a version number. +# XXX FIXME: Version number should use NSPR_VERSION_NUMBER? +DLL_SUFFIX = so.1.0 +CC = gcc +RANLIB = ranlib +CPU_ARCH = sparc + +# Purify doesn't like -MDupdate +NOMD_OS_CFLAGS += -Wall -Wno-format -DSUNOS4 +OS_CFLAGS += $(DSO_CFLAGS) $(NOMD_OS_CFLAGS) -MDupdate $(DEPENDENCIES) +MKSHLIB = $(LD) +MKSHLIB += $(DSO_LDOPTS) +NOSUCHFILE = /solaris-rm-f-sucks +DSO_LDOPTS = + +# -fPIC generates position-independent code for use in a shared library. +DSO_CFLAGS += -fPIC diff --git a/security/coreconf/SunOS5.10.mk b/security/coreconf/SunOS5.10.mk new file mode 100644 index 000000000..afa7ed030 --- /dev/null +++ b/security/coreconf/SunOS5.10.mk @@ -0,0 +1,44 @@ +# +# The contents of this file are subject to the Mozilla Public +# License Version 1.1 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy of +# the License at http://www.mozilla.org/MPL/ +# +# Software distributed under the License is distributed on an "AS +# IS" basis, WITHOUT WARRANTY OF ANY KIND, 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 Netscape are +# Copyright (C) 1994-2000 Netscape Communications Corporation. All +# Rights Reserved. +# +# Contributor(s): +# +# Alternatively, the contents of this file may be used under the +# terms of the GNU General Public License Version 2 or later (the +# "GPL"), in which case the provisions of the GPL are applicable +# instead of those above. If you wish to allow use of your +# version of this file only under the terms of the GPL and not to +# allow others to use your version of this file under the MPL, +# indicate your decision by deleting the provisions above and +# replace them with the notice and other provisions required by +# the GPL. If you do not delete the provisions above, a recipient +# may use your version of this file under either the MPL or the +# GPL. +# +# Config stuff for SunOS5.10 +# + +SOL_CFLAGS += -D_SVID_GETTOD + +include $(CORE_DEPTH)/coreconf/SunOS5.mk + +ifeq ($(OS_RELEASE),5.10) + OS_DEFINES += -DSOLARIS2_10 +endif + +OS_LIBS += -lthread -lnsl -lsocket -lposix4 -ldl -lc diff --git a/security/coreconf/SunOS5.3.mk b/security/coreconf/SunOS5.3.mk new file mode 100644 index 000000000..e103d9f57 --- /dev/null +++ b/security/coreconf/SunOS5.3.mk @@ -0,0 +1,38 @@ +# +# The contents of this file are subject to the Mozilla Public +# License Version 1.1 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy of +# the License at http://www.mozilla.org/MPL/ +# +# Software distributed under the License is distributed on an "AS +# IS" basis, WITHOUT WARRANTY OF ANY KIND, 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 Netscape are +# Copyright (C) 1994-2000 Netscape Communications Corporation. All +# Rights Reserved. +# +# Contributor(s): +# +# Alternatively, the contents of this file may be used under the +# terms of the GNU General Public License Version 2 or later (the +# "GPL"), in which case the provisions of the GPL are applicable +# instead of those above. If you wish to allow use of your +# version of this file only under the terms of the GPL and not to +# allow others to use your version of this file under the MPL, +# indicate your decision by deleting the provisions above and +# replace them with the notice and other provisions required by +# the GPL. If you do not delete the provisions above, a recipient +# may use your version of this file under either the MPL or the +# GPL. +# +# Config stuff for SunOS5.3 +# + +SOL_CFLAGS = + +include $(CORE_DEPTH)/coreconf/SunOS5.mk diff --git a/security/coreconf/SunOS5.4.mk b/security/coreconf/SunOS5.4.mk new file mode 100644 index 000000000..fe24c33e0 --- /dev/null +++ b/security/coreconf/SunOS5.4.mk @@ -0,0 +1,38 @@ +# +# The contents of this file are subject to the Mozilla Public +# License Version 1.1 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy of +# the License at http://www.mozilla.org/MPL/ +# +# Software distributed under the License is distributed on an "AS +# IS" basis, WITHOUT WARRANTY OF ANY KIND, 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 Netscape are +# Copyright (C) 1994-2000 Netscape Communications Corporation. All +# Rights Reserved. +# +# Contributor(s): +# +# Alternatively, the contents of this file may be used under the +# terms of the GNU General Public License Version 2 or later (the +# "GPL"), in which case the provisions of the GPL are applicable +# instead of those above. If you wish to allow use of your +# version of this file only under the terms of the GPL and not to +# allow others to use your version of this file under the MPL, +# indicate your decision by deleting the provisions above and +# replace them with the notice and other provisions required by +# the GPL. If you do not delete the provisions above, a recipient +# may use your version of this file under either the MPL or the +# GPL. +# +# Config stuff for SunOS5.4 +# + +SOL_CFLAGS = + +include $(CORE_DEPTH)/coreconf/SunOS5.mk diff --git a/security/coreconf/SunOS5.4_i86pc.mk b/security/coreconf/SunOS5.4_i86pc.mk new file mode 100644 index 000000000..35dfdb86a --- /dev/null +++ b/security/coreconf/SunOS5.4_i86pc.mk @@ -0,0 +1,67 @@ +# +# The contents of this file are subject to the Mozilla Public +# License Version 1.1 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy of +# the License at http://www.mozilla.org/MPL/ +# +# Software distributed under the License is distributed on an "AS +# IS" basis, WITHOUT WARRANTY OF ANY KIND, 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 Netscape are +# Copyright (C) 1994-2000 Netscape Communications Corporation. All +# Rights Reserved. +# +# Contributor(s): +# +# Alternatively, the contents of this file may be used under the +# terms of the GNU General Public License Version 2 or later (the +# "GPL"), in which case the provisions of the GPL are applicable +# instead of those above. If you wish to allow use of your +# version of this file only under the terms of the GPL and not to +# allow others to use your version of this file under the MPL, +# indicate your decision by deleting the provisions above and +# replace them with the notice and other provisions required by +# the GPL. If you do not delete the provisions above, a recipient +# may use your version of this file under either the MPL or the +# GPL. +# +# Config stuff for Solaris 2.4 on x86 +# + +include $(CORE_DEPTH)/coreconf/UNIX.mk + +DEFAULT_COMPILER = cc + +ifdef NS_USE_GCC + CC = gcc + OS_CFLAGS += -Wall -Wno-format + CCC = g++ + CCC += -Wall -Wno-format + ASFLAGS += -x assembler-with-cpp + OS_CFLAGS += $(NOMD_OS_CFLAGS) + ifdef USE_MDUPDATE + OS_CFLAGS += -MDupdate $(DEPENDENCIES) + endif +else + CC = cc + CCC = CC + ASFLAGS += -Wa,-P + OS_CFLAGS += $(NOMD_OS_CFLAGS) +endif + +CPU_ARCH = x86 + +MKSHLIB = $(LD) +MKSHLIB += $(DSO_LDOPTS) +NOSUCHFILE = /solx86-rm-f-sucks +RANLIB = echo + +# for purify +NOMD_OS_CFLAGS += -DSVR4 -DSYSV -D_REENTRANT -DSOLARIS -D__svr4__ -Di386 + +DSO_LDOPTS += -G diff --git a/security/coreconf/SunOS5.5.1.mk b/security/coreconf/SunOS5.5.1.mk new file mode 100644 index 000000000..f85932b59 --- /dev/null +++ b/security/coreconf/SunOS5.5.1.mk @@ -0,0 +1,44 @@ +# +# The contents of this file are subject to the Mozilla Public +# License Version 1.1 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy of +# the License at http://www.mozilla.org/MPL/ +# +# Software distributed under the License is distributed on an "AS +# IS" basis, WITHOUT WARRANTY OF ANY KIND, 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 Netscape are +# Copyright (C) 1994-2000 Netscape Communications Corporation. All +# Rights Reserved. +# +# Contributor(s): +# +# Alternatively, the contents of this file may be used under the +# terms of the GNU General Public License Version 2 or later (the +# "GPL"), in which case the provisions of the GPL are applicable +# instead of those above. If you wish to allow use of your +# version of this file only under the terms of the GPL and not to +# allow others to use your version of this file under the MPL, +# indicate your decision by deleting the provisions above and +# replace them with the notice and other provisions required by +# the GPL. If you do not delete the provisions above, a recipient +# may use your version of this file under either the MPL or the +# GPL. +# +# Config stuff for SunOS5.5.1 +# + +SOL_CFLAGS += -D_SVID_GETTOD + +include $(CORE_DEPTH)/coreconf/SunOS5.mk + +ifeq ($(OS_RELEASE),5.5.1) + OS_DEFINES += -DSOLARIS2_5 +endif + +OS_LIBS += -lthread -lnsl -lsocket -lposix4 -ldl -lc diff --git a/security/coreconf/SunOS5.5.1_i86pc.mk b/security/coreconf/SunOS5.5.1_i86pc.mk new file mode 100644 index 000000000..a8a111dde --- /dev/null +++ b/security/coreconf/SunOS5.5.1_i86pc.mk @@ -0,0 +1,46 @@ +# +# The contents of this file are subject to the Mozilla Public +# License Version 1.1 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy of +# the License at http://www.mozilla.org/MPL/ +# +# Software distributed under the License is distributed on an "AS +# IS" basis, WITHOUT WARRANTY OF ANY KIND, 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 Netscape are +# Copyright (C) 1994-2000 Netscape Communications Corporation. All +# Rights Reserved. +# +# Contributor(s): +# +# Alternatively, the contents of this file may be used under the +# terms of the GNU General Public License Version 2 or later (the +# "GPL"), in which case the provisions of the GPL are applicable +# instead of those above. If you wish to allow use of your +# version of this file only under the terms of the GPL and not to +# allow others to use your version of this file under the MPL, +# indicate your decision by deleting the provisions above and +# replace them with the notice and other provisions required by +# the GPL. If you do not delete the provisions above, a recipient +# may use your version of this file under either the MPL or the +# GPL. +# +# Config stuff for Solaris 2.5.1 on x86 +# + +SOL_CFLAGS = -D_SVID_GETTOD + +include $(CORE_DEPTH)/coreconf/SunOS5.mk + +CPU_ARCH = x86 +ARCHFLAG = +OS_DEFINES += -Di386 + +ifeq ($(OS_RELEASE),5.5.1_i86pc) + OS_DEFINES += -DSOLARIS2_5 +endif diff --git a/security/coreconf/SunOS5.5.mk b/security/coreconf/SunOS5.5.mk new file mode 100644 index 000000000..e83356f15 --- /dev/null +++ b/security/coreconf/SunOS5.5.mk @@ -0,0 +1,42 @@ +# +# The contents of this file are subject to the Mozilla Public +# License Version 1.1 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy of +# the License at http://www.mozilla.org/MPL/ +# +# Software distributed under the License is distributed on an "AS +# IS" basis, WITHOUT WARRANTY OF ANY KIND, 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 Netscape are +# Copyright (C) 1994-2000 Netscape Communications Corporation. All +# Rights Reserved. +# +# Contributor(s): +# +# Alternatively, the contents of this file may be used under the +# terms of the GNU General Public License Version 2 or later (the +# "GPL"), in which case the provisions of the GPL are applicable +# instead of those above. If you wish to allow use of your +# version of this file only under the terms of the GPL and not to +# allow others to use your version of this file under the MPL, +# indicate your decision by deleting the provisions above and +# replace them with the notice and other provisions required by +# the GPL. If you do not delete the provisions above, a recipient +# may use your version of this file under either the MPL or the +# GPL. +# +# Config stuff for SunOS5.5 +# + +SOL_CFLAGS += -D_SVID_GETTOD + +include $(CORE_DEPTH)/coreconf/SunOS5.mk + +ifeq ($(OS_RELEASE),5.5) + OS_DEFINES += -DSOLARIS2_5 +endif diff --git a/security/coreconf/SunOS5.6.mk b/security/coreconf/SunOS5.6.mk new file mode 100644 index 000000000..774d2b7a6 --- /dev/null +++ b/security/coreconf/SunOS5.6.mk @@ -0,0 +1,44 @@ +# +# The contents of this file are subject to the Mozilla Public +# License Version 1.1 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy of +# the License at http://www.mozilla.org/MPL/ +# +# Software distributed under the License is distributed on an "AS +# IS" basis, WITHOUT WARRANTY OF ANY KIND, 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 Netscape are +# Copyright (C) 1994-2000 Netscape Communications Corporation. All +# Rights Reserved. +# +# Contributor(s): +# +# Alternatively, the contents of this file may be used under the +# terms of the GNU General Public License Version 2 or later (the +# "GPL"), in which case the provisions of the GPL are applicable +# instead of those above. If you wish to allow use of your +# version of this file only under the terms of the GPL and not to +# allow others to use your version of this file under the MPL, +# indicate your decision by deleting the provisions above and +# replace them with the notice and other provisions required by +# the GPL. If you do not delete the provisions above, a recipient +# may use your version of this file under either the MPL or the +# GPL. +# +# Config stuff for SunOS5.6 +# + +SOL_CFLAGS += -D_SVID_GETTOD + +include $(CORE_DEPTH)/coreconf/SunOS5.mk + +ifeq ($(OS_RELEASE),5.6) + OS_DEFINES += -DSOLARIS2_6 +endif + +OS_LIBS += -lthread -lnsl -lsocket -lposix4 -ldl -lc diff --git a/security/coreconf/SunOS5.6_i86pc.mk b/security/coreconf/SunOS5.6_i86pc.mk new file mode 100644 index 000000000..763c6810f --- /dev/null +++ b/security/coreconf/SunOS5.6_i86pc.mk @@ -0,0 +1,46 @@ +# +# The contents of this file are subject to the Mozilla Public +# License Version 1.1 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy of +# the License at http://www.mozilla.org/MPL/ +# +# Software distributed under the License is distributed on an "AS +# IS" basis, WITHOUT WARRANTY OF ANY KIND, 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 Netscape are +# Copyright (C) 1994-2000 Netscape Communications Corporation. All +# Rights Reserved. +# +# Contributor(s): +# +# Alternatively, the contents of this file may be used under the +# terms of the GNU General Public License Version 2 or later (the +# "GPL"), in which case the provisions of the GPL are applicable +# instead of those above. If you wish to allow use of your +# version of this file only under the terms of the GPL and not to +# allow others to use your version of this file under the MPL, +# indicate your decision by deleting the provisions above and +# replace them with the notice and other provisions required by +# the GPL. If you do not delete the provisions above, a recipient +# may use your version of this file under either the MPL or the +# GPL. +# +# Config stuff for Solaris 2.6 on x86 +# + +SOL_CFLAGS = -D_SVID_GETTOD + +include $(CORE_DEPTH)/coreconf/SunOS5.mk + +CPU_ARCH = x86 +ARCHFLAG = +OS_DEFINES += -Di386 + +ifeq ($(OS_RELEASE),5.6_i86pc) + OS_DEFINES += -DSOLARIS2_6 +endif diff --git a/security/coreconf/SunOS5.7.mk b/security/coreconf/SunOS5.7.mk new file mode 100644 index 000000000..dd676e2a9 --- /dev/null +++ b/security/coreconf/SunOS5.7.mk @@ -0,0 +1,44 @@ +# +# The contents of this file are subject to the Mozilla Public +# License Version 1.1 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy of +# the License at http://www.mozilla.org/MPL/ +# +# Software distributed under the License is distributed on an "AS +# IS" basis, WITHOUT WARRANTY OF ANY KIND, 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 Netscape are +# Copyright (C) 1994-2000 Netscape Communications Corporation. All +# Rights Reserved. +# +# Contributor(s): +# +# Alternatively, the contents of this file may be used under the +# terms of the GNU General Public License Version 2 or later (the +# "GPL"), in which case the provisions of the GPL are applicable +# instead of those above. If you wish to allow use of your +# version of this file only under the terms of the GPL and not to +# allow others to use your version of this file under the MPL, +# indicate your decision by deleting the provisions above and +# replace them with the notice and other provisions required by +# the GPL. If you do not delete the provisions above, a recipient +# may use your version of this file under either the MPL or the +# GPL. +# +# Config stuff for SunOS5.7 +# + +SOL_CFLAGS += -D_SVID_GETTOD + +include $(CORE_DEPTH)/coreconf/SunOS5.mk + +ifeq ($(OS_RELEASE),5.7) + OS_DEFINES += -DSOLARIS2_7 +endif + +OS_LIBS += -lthread -lnsl -lsocket -lposix4 -ldl -lc diff --git a/security/coreconf/SunOS5.7_i86pc.mk b/security/coreconf/SunOS5.7_i86pc.mk new file mode 100644 index 000000000..6ece4defb --- /dev/null +++ b/security/coreconf/SunOS5.7_i86pc.mk @@ -0,0 +1,48 @@ +# +# The contents of this file are subject to the Mozilla Public +# License Version 1.1 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy of +# the License at http://www.mozilla.org/MPL/ +# +# Software distributed under the License is distributed on an "AS +# IS" basis, WITHOUT WARRANTY OF ANY KIND, 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 Netscape are +# Copyright (C) 1994-2000 Netscape Communications Corporation. All +# Rights Reserved. +# +# Contributor(s): +# +# Alternatively, the contents of this file may be used under the +# terms of the GNU General Public License Version 2 or later (the +# "GPL"), in which case the provisions of the GPL are applicable +# instead of those above. If you wish to allow use of your +# version of this file only under the terms of the GPL and not to +# allow others to use your version of this file under the MPL, +# indicate your decision by deleting the provisions above and +# replace them with the notice and other provisions required by +# the GPL. If you do not delete the provisions above, a recipient +# may use your version of this file under either the MPL or the +# GPL. +# +# Config stuff for Solaris 7 on x86 +# + +SOL_CFLAGS = -D_SVID_GETTOD + +include $(CORE_DEPTH)/coreconf/SunOS5.mk + +CPU_ARCH = x86 +ARCHFLAG = +OS_DEFINES += -Di386 + +ifeq ($(OS_RELEASE),5.7_i86pc) + OS_DEFINES += -DSOLARIS2_7 +endif + +OS_LIBS += -lthread -lnsl -lsocket -lposix4 -ldl -lc diff --git a/security/coreconf/SunOS5.8.mk b/security/coreconf/SunOS5.8.mk new file mode 100644 index 000000000..95fc01090 --- /dev/null +++ b/security/coreconf/SunOS5.8.mk @@ -0,0 +1,44 @@ +# +# The contents of this file are subject to the Mozilla Public +# License Version 1.1 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy of +# the License at http://www.mozilla.org/MPL/ +# +# Software distributed under the License is distributed on an "AS +# IS" basis, WITHOUT WARRANTY OF ANY KIND, 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 Netscape are +# Copyright (C) 1994-2000 Netscape Communications Corporation. All +# Rights Reserved. +# +# Contributor(s): +# +# Alternatively, the contents of this file may be used under the +# terms of the GNU General Public License Version 2 or later (the +# "GPL"), in which case the provisions of the GPL are applicable +# instead of those above. If you wish to allow use of your +# version of this file only under the terms of the GPL and not to +# allow others to use your version of this file under the MPL, +# indicate your decision by deleting the provisions above and +# replace them with the notice and other provisions required by +# the GPL. If you do not delete the provisions above, a recipient +# may use your version of this file under either the MPL or the +# GPL. +# +# Config stuff for SunOS5.8 +# + +SOL_CFLAGS += -D_SVID_GETTOD + +include $(CORE_DEPTH)/coreconf/SunOS5.mk + +ifeq ($(OS_RELEASE),5.8) + OS_DEFINES += -DSOLARIS2_8 +endif + +OS_LIBS += -lthread -lnsl -lsocket -lposix4 -ldl -lc diff --git a/security/coreconf/SunOS5.8_i86pc.mk b/security/coreconf/SunOS5.8_i86pc.mk new file mode 100644 index 000000000..58b66b503 --- /dev/null +++ b/security/coreconf/SunOS5.8_i86pc.mk @@ -0,0 +1,48 @@ +# +# The contents of this file are subject to the Mozilla Public +# License Version 1.1 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy of +# the License at http://www.mozilla.org/MPL/ +# +# Software distributed under the License is distributed on an "AS +# IS" basis, WITHOUT WARRANTY OF ANY KIND, 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 Netscape are +# Copyright (C) 2000 Netscape Communications Corporation. All +# Rights Reserved. +# +# Contributor(s): +# +# Alternatively, the contents of this file may be used under the +# terms of the GNU General Public License Version 2 or later (the +# "GPL"), in which case the provisions of the GPL are applicable +# instead of those above. If you wish to allow use of your +# version of this file only under the terms of the GPL and not to +# allow others to use your version of this file under the MPL, +# indicate your decision by deleting the provisions above and +# replace them with the notice and other provisions required by +# the GPL. If you do not delete the provisions above, a recipient +# may use your version of this file under either the MPL or the +# GPL. +# +# Config stuff for Solaris 8 on x86 +# + +SOL_CFLAGS = -D_SVID_GETTOD + +include $(CORE_DEPTH)/coreconf/SunOS5.mk + +CPU_ARCH = x86 +ARCHFLAG = +OS_DEFINES += -Di386 + +ifeq ($(OS_RELEASE),5.8_i86pc) + OS_DEFINES += -DSOLARIS2_8 +endif + +OS_LIBS += -lthread -lnsl -lsocket -lposix4 -ldl -lc diff --git a/security/coreconf/SunOS5.9.mk b/security/coreconf/SunOS5.9.mk new file mode 100755 index 000000000..63a1a003b --- /dev/null +++ b/security/coreconf/SunOS5.9.mk @@ -0,0 +1,44 @@ +# +# The contents of this file are subject to the Mozilla Public +# License Version 1.1 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy of +# the License at http://www.mozilla.org/MPL/ +# +# Software distributed under the License is distributed on an "AS +# IS" basis, WITHOUT WARRANTY OF ANY KIND, 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 Netscape are +# Copyright (C) 1994-2000 Netscape Communications Corporation. All +# Rights Reserved. +# +# Contributor(s): +# +# Alternatively, the contents of this file may be used under the +# terms of the GNU General Public License Version 2 or later (the +# "GPL"), in which case the provisions of the GPL are applicable +# instead of those above. If you wish to allow use of your +# version of this file only under the terms of the GPL and not to +# allow others to use your version of this file under the MPL, +# indicate your decision by deleting the provisions above and +# replace them with the notice and other provisions required by +# the GPL. If you do not delete the provisions above, a recipient +# may use your version of this file under either the MPL or the +# GPL. +# +# Config stuff for SunOS5.9 +# + +SOL_CFLAGS += -D_SVID_GETTOD + +include $(CORE_DEPTH)/coreconf/SunOS5.mk + +ifeq ($(OS_RELEASE),5.9) + OS_DEFINES += -DSOLARIS2_9 +endif + +OS_LIBS += -lthread -lnsl -lsocket -lposix4 -ldl -lc diff --git a/security/coreconf/SunOS5.9_i86pc.mk b/security/coreconf/SunOS5.9_i86pc.mk new file mode 100755 index 000000000..8ad8d0ba5 --- /dev/null +++ b/security/coreconf/SunOS5.9_i86pc.mk @@ -0,0 +1,48 @@ +# +# The contents of this file are subject to the Mozilla Public +# License Version 1.1 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy of +# the License at http://www.mozilla.org/MPL/ +# +# Software distributed under the License is distributed on an "AS +# IS" basis, WITHOUT WARRANTY OF ANY KIND, 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 Netscape are +# Copyright (C) 2000 Netscape Communications Corporation. All +# Rights Reserved. +# +# Contributor(s): +# +# Alternatively, the contents of this file may be used under the +# terms of the GNU General Public License Version 2 or later (the +# "GPL"), in which case the provisions of the GPL are applicable +# instead of those above. If you wish to allow use of your +# version of this file only under the terms of the GPL and not to +# allow others to use your version of this file under the MPL, +# indicate your decision by deleting the provisions above and +# replace them with the notice and other provisions required by +# the GPL. If you do not delete the provisions above, a recipient +# may use your version of this file under either the MPL or the +# GPL. +# +# Config stuff for Solaris 9 on x86 +# + +SOL_CFLAGS = -D_SVID_GETTOD + +include $(CORE_DEPTH)/coreconf/SunOS5.mk + +CPU_ARCH = x86 +ARCHFLAG = +OS_DEFINES += -Di386 + +ifeq ($(OS_RELEASE),5.9_i86pc) + OS_DEFINES += -DSOLARIS2_9 +endif + +OS_LIBS += -lthread -lnsl -lsocket -lposix4 -ldl -lc diff --git a/security/coreconf/SunOS5.mk b/security/coreconf/SunOS5.mk new file mode 100644 index 000000000..47ed8333f --- /dev/null +++ b/security/coreconf/SunOS5.mk @@ -0,0 +1,158 @@ +# +# The contents of this file are subject to the Mozilla Public +# License Version 1.1 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy of +# the License at http://www.mozilla.org/MPL/ +# +# Software distributed under the License is distributed on an "AS +# IS" basis, WITHOUT WARRANTY OF ANY KIND, 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 Netscape are +# Copyright (C) 1994-2000 Netscape Communications Corporation. All +# Rights Reserved. +# +# Contributor(s): +# +# Alternatively, the contents of this file may be used under the +# terms of the GNU General Public License Version 2 or later (the +# "GPL"), in which case the provisions of the GPL are applicable +# instead of those above. If you wish to allow use of your +# version of this file only under the terms of the GPL and not to +# allow others to use your version of this file under the MPL, +# indicate your decision by deleting the provisions above and +# replace them with the notice and other provisions required by +# the GPL. If you do not delete the provisions above, a recipient +# may use your version of this file under either the MPL or the +# GPL. +# +# Config stuff for SunOS5.x +# + +include $(CORE_DEPTH)/coreconf/UNIX.mk + +# +# Temporary define for the Client; to be removed when binary release is used +# +ifdef MOZILLA_CLIENT + LOCAL_THREADS_ONLY = 1 + ifndef NS_USE_NATIVE + NS_USE_GCC = 1 + endif +endif + +# Sun's WorkShop defines v8, v8plus and v9 architectures. +# gcc on Solaris defines v8 and v9 "cpus". +# gcc's v9 is equivalent to Workshop's v8plus. +# gcc apparently has no equivalent to Workshop's v9 +# We always use Sun's assembler and linker, which use Sun's naming convention. + +ifeq ($(USE_64), 1) + ifdef NS_USE_GCC + ARCHFLAG= UNKNOWN + else + ARCHFLAG=-xarch=v9 + endif + LD=/usr/ccs/bin/ld +else + ifdef NS_USE_GCC + ifdef USE_HYBRID + ARCHFLAG=-mcpu=v9 -Wa,-xarch=v8plus + else + ARCHFLAG=-mcpu=v8 + endif + else + ifdef USE_HYBRID + ARCHFLAG=-xarch=v8plus + else + ARCHFLAG=-xarch=v8 + endif + endif +endif + +# +# The default implementation strategy for Solaris is classic nspr. +# +ifeq ($(USE_PTHREADS),1) + IMPL_STRATEGY = _PTH +else + ifeq ($(LOCAL_THREADS_ONLY),1) + IMPL_STRATEGY = _LOCAL + endif +endif + +# +# Temporary define for the Client; to be removed when binary release is used +# +ifdef MOZILLA_CLIENT + IMPL_STRATEGY = +endif + +DEFAULT_COMPILER = cc + +ifdef NS_USE_GCC + CC = gcc + OS_CFLAGS += -Wall -Wno-format + CCC = g++ + CCC += -Wall -Wno-format + ASFLAGS += -x assembler-with-cpp + OS_CFLAGS += $(NOMD_OS_CFLAGS) + ifdef USE_MDUPDATE + OS_CFLAGS += -MDupdate $(DEPENDENCIES) + endif + OS_CFLAGS += $(ARCHFLAG) +else + CC = cc + CCC = CC + ASFLAGS += -Wa,-P + OS_CFLAGS += $(NOMD_OS_CFLAGS) $(ARCHFLAG) + ifndef BUILD_OPT + OS_CFLAGS += -xs +# else +# OPTIMIZER += -fast + endif + +endif + +INCLUDES += -I/usr/dt/include -I/usr/openwin/include + +RANLIB = echo +CPU_ARCH = sparc +OS_DEFINES += -DSVR4 -DSYSV -D__svr4 -D__svr4__ -DSOLARIS + +ifneq ($(LOCAL_THREADS_ONLY),1) + OS_DEFINES += -D_REENTRANT +endif + +# Purify doesn't like -MDupdate +NOMD_OS_CFLAGS += $(DSO_CFLAGS) $(OS_DEFINES) $(SOL_CFLAGS) + +MKSHLIB = $(LD) $(DSO_LDOPTS) +ifdef MAPFILE + MKSHLIB += -M $(MAPFILE) +endif +PROCESS_MAP_FILE = grep -v ';-' $(LIBRARY_NAME).def | \ + sed -e 's,;+,,' -e 's; DATA ;;' -e 's,;;,,' -e 's,;.*,;,' > $@ + + + + +# ld options: +# -G: produce a shared object +# -z defs: no unresolved symbols allowed +DSO_LDOPTS += -G -h $(notdir $@) + +# -KPIC generates position independent code for use in shared libraries. +# (Similarly for -fPIC in case of gcc.) +ifdef NS_USE_GCC + DSO_CFLAGS += -fPIC +else + DSO_CFLAGS += -KPIC +endif + +NOSUCHFILE = /solaris-rm-f-sucks + diff --git a/security/coreconf/UNIX.mk b/security/coreconf/UNIX.mk new file mode 100644 index 000000000..b47bb8ac4 --- /dev/null +++ b/security/coreconf/UNIX.mk @@ -0,0 +1,92 @@ +# +# The contents of this file are subject to the Mozilla Public +# License Version 1.1 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy of +# the License at http://www.mozilla.org/MPL/ +# +# Software distributed under the License is distributed on an "AS +# IS" basis, WITHOUT WARRANTY OF ANY KIND, 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 Netscape are +# Copyright (C) 1994-2000 Netscape Communications Corporation. All +# Rights Reserved. +# +# Contributor(s): +# +# Alternatively, the contents of this file may be used under the +# terms of the GNU General Public License Version 2 or later (the +# "GPL"), in which case the provisions of the GPL are applicable +# instead of those above. If you wish to allow use of your +# version of this file only under the terms of the GPL and not to +# allow others to use your version of this file under the MPL, +# indicate your decision by deleting the provisions above and +# replace them with the notice and other provisions required by +# the GPL. If you do not delete the provisions above, a recipient +# may use your version of this file under either the MPL or the +# GPL. +# + +XP_DEFINE += -DXP_UNIX +LIB_SUFFIX = a +DLL_SUFFIX = so +AR = ar +AR += cr $@ +LDOPTS += -L$(SOURCE_LIB_DIR) + +ifdef BUILD_OPT + OPTIMIZER += -O + DEFINES += -UDEBUG -DNDEBUG +else + OPTIMIZER += -g + DEFINES += -DDEBUG -UNDEBUG -DDEBUG_$(shell whoami) +endif + +ifdef BUILD_TREE +NSINSTALL_DIR = $(BUILD_TREE)/nss +NSINSTALL = $(BUILD_TREE)/nss/nsinstall +else +NSINSTALL_DIR = $(CORE_DEPTH)/coreconf/nsinstall +NSINSTALL = $(NSINSTALL_DIR)/$(OBJDIR_NAME)/nsinstall +endif + +MKDEPEND_DIR = $(CORE_DEPTH)/coreconf/mkdepend +MKDEPEND = $(MKDEPEND_DIR)/$(OBJDIR_NAME)/mkdepend +MKDEPENDENCIES = $(OBJDIR_NAME)/depend.mk + +#################################################################### +# +# One can define the makefile variable NSDISTMODE to control +# how files are published to the 'dist' directory. If not +# defined, the default is "install using relative symbolic +# links". The two possible values are "copy", which copies files +# but preserves source mtime, and "absolute_symlink", which +# installs using absolute symbolic links. The "absolute_symlink" +# option requires NFSPWD. +# - THIS IS NOT PART OF THE NEW BINARY RELEASE PLAN for 9/30/97 +# - WE'RE KEEPING IT ONLY FOR BACKWARDS COMPATIBILITY +#################################################################### + +ifeq ($(NSDISTMODE),copy) + # copy files, but preserve source mtime + INSTALL = $(NSINSTALL) + INSTALL += -t +else + ifeq ($(NSDISTMODE),absolute_symlink) + # install using absolute symbolic links + INSTALL = $(NSINSTALL) + INSTALL += -L `$(NFSPWD)` + else + # install using relative symbolic links + INSTALL = $(NSINSTALL) + INSTALL += -R + endif +endif + +define MAKE_OBJDIR +if test ! -d $(@D); then rm -rf $(@D); $(NSINSTALL) -D $(@D); fi +endef diff --git a/security/coreconf/UNIXWARE2.1.mk b/security/coreconf/UNIXWARE2.1.mk new file mode 100644 index 000000000..da6e2e895 --- /dev/null +++ b/security/coreconf/UNIXWARE2.1.mk @@ -0,0 +1,57 @@ +# +# The contents of this file are subject to the Mozilla Public +# License Version 1.1 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy of +# the License at http://www.mozilla.org/MPL/ +# +# Software distributed under the License is distributed on an "AS +# IS" basis, WITHOUT WARRANTY OF ANY KIND, 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 Netscape are +# Copyright (C) 1994-2000 Netscape Communications Corporation. All +# Rights Reserved. +# +# Contributor(s): +# +# Alternatively, the contents of this file may be used under the +# terms of the GNU General Public License Version 2 or later (the +# "GPL"), in which case the provisions of the GPL are applicable +# instead of those above. If you wish to allow use of your +# version of this file only under the terms of the GPL and not to +# allow others to use your version of this file under the MPL, +# indicate your decision by deleting the provisions above and +# replace them with the notice and other provisions required by +# the GPL. If you do not delete the provisions above, a recipient +# may use your version of this file under either the MPL or the +# GPL. +# + +# +# Config stuff for SCO Unixware 2.1 +# + +include $(CORE_DEPTH)/coreconf/UNIX.mk + +DEFAULT_COMPILER = $(CORE_DEPTH)/build/hcc + +CC = $(CORE_DEPTH)/build/hcc +CCC = $(CORE_DEPTH)/build/hcpp +RANLIB = true +OS_CFLAGS = -KPIC -DSVR4 -DSYSV -DUNIXWARE +MKSHLIB = $(LD) +MKSHLIB += $(DSO_LDOPTS) +DSO_LDOPTS += -G +CPU_ARCH = x86 +ARCH = sco +NOSUCHFILE = /solaris-rm-f-sucks +ifdef MAPFILE +# Add LD options to restrict exported symbols to those in the map file +endif +# Change PROCESS to put the mapfile in the correct format for this platform +PROCESS_MAP_FILE = cp $(LIBRARY_NAME).def $@ + diff --git a/security/coreconf/WIN16.mk b/security/coreconf/WIN16.mk new file mode 100644 index 000000000..00121150c --- /dev/null +++ b/security/coreconf/WIN16.mk @@ -0,0 +1,209 @@ +# +# The contents of this file are subject to the Mozilla Public +# License Version 1.1 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy of +# the License at http://www.mozilla.org/MPL/ +# +# Software distributed under the License is distributed on an "AS +# IS" basis, WITHOUT WARRANTY OF ANY KIND, 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 Netscape are +# Copyright (C) 1994-2000 Netscape Communications Corporation. All +# Rights Reserved. +# +# Contributor(s): +# +# Alternatively, the contents of this file may be used under the +# terms of the GNU General Public License Version 2 or later (the +# "GPL"), in which case the provisions of the GPL are applicable +# instead of those above. If you wish to allow use of your +# version of this file only under the terms of the GPL and not to +# allow others to use your version of this file under the MPL, +# indicate your decision by deleting the provisions above and +# replace them with the notice and other provisions required by +# the GPL. If you do not delete the provisions above, a recipient +# may use your version of this file under either the MPL or the +# GPL. +# + +# +# win16_3.11.mk -- Make configuration for Win16 +# +# This file configures gmake to build the Win16 variant of +# NSPR 2.0. This file has the function of two files commonly +# used on other platforms, for example: winnt.mk and +# winnt4.0.mk. ... The packaging is easier and there is only +# one variant of the Win16 target. +# +# Win16 is built using the Watcom C/C++ version 11.0 +# compiler. You gotta set up the compiler first. +# The Watcom compiler depends on a few environment +# variables; these environment variables define where the +# compiler components are installed; they must be set before +# running the make. +# +# Notes: +# OS_CFLAGS is the command line options for the compiler when +# building the .DLL object files. +# OS_EXE_CFLAGS is the command line options for the compiler +# when building the .EXE object files; this is for the test +# programs. +# the macro OS_CFLAGS is set to OS_EXE_CFLAGS inside of the +# makefile for the pr/tests directory. ... Hack. +# +# +# +# + +# -- configuration ----------------------------------------- + +DEFAULT_COMPILER = wcc + +CC = wcc +CCC = wcl +LINK = wlink +AR = wlib +AR += -q $@ +RC = wrc.exe +RC += /r /dWIN16=1 /bt=windows +RANLIB = echo +BSDECHO = echo +NSINSTALL_DIR = $(CORE_DEPTH)/coreconf/nsinstall +NSINSTALL = nsinstall +INSTALL = $(NSINSTALL) +MAKE_OBJDIR = mkdir +MAKE_OBJDIR += $(OBJDIR) +XP_DEFINE += -DXP_PC +LIB_SUFFIX = lib +DLL_SUFFIX = dll + +ifdef BUILD_OPT + OPTIMIZER = -oneatx -oh -oi -ei -3 -fpi87 -fp3 +else + OPTIMIZER += -d2 -hc -DDEBUG +# OPTIMIZER += -d2 -hw -DDEBUG +# LDFLAGS += -DEBUG -DEBUGTYPE:CV +endif + +# +# $(CPU_ARCH) has been commented out so that its contents +# are not added to the WIN16_?.OBJ names thus expanding +# them beyond the 8.3 character limit for this platform. +# +#CPU_ARCH = x386 +# +# added "-s" to avoid dependency on watcom's libs (e.g. on _STK) +# added "-zt3" for compatibility with MSVC's "/Gt3" option +# +OS_CFLAGS += -ml -3 -bd -zc -zu -bt=windows -s -zt3 -d_X86_ -dWIN16 -d_WINDLL +#OS_EXE_CFLAGS += -ml -3 -bt=windows -d_X86_ -dWIN16 +OS_LIB_FLAGS = -c -iro + +# Name of the binary code directories +OS_DLL_OPTION = CASEEXACT +OS_DLLFLAGS = +OS_LIBS = +W16_EXPORTS = # +ifdef MAPFILE +# Add LD options to restrict exported symbols to those in the map file +endif +# Change PROCESS to put the mapfile in the correct format for this platform +PROCESS_MAP_FILE = copy $(LIBRARY_NAME).def $@ + + +# +# The following is NOT needed for the NSPR 2.0 library. +# + +OS_CFLAGS += -d_WINDOWS -d_MSC_VER=700 + +# +# override the definitions of RELEASE_TREE found in tree.mk +# +ifndef RELEASE_TREE + ifdef BUILD_SHIP + ifdef USE_SHIPS + RELEASE_TREE = $(NTBUILD_SHIP) + else + RELEASE_TREE = //redbuild/components + endif + else + RELEASE_TREE = //redbuild/components + endif +endif + +# +# override the definitions of LIB_PREFIX and DLL_PREFIX in prefix.mk +# +ifndef LIB_PREFIX + LIB_PREFIX = $(NULL) +endif + +ifndef DLL_PREFIX + DLL_PREFIX = $(NULL) +endif + +# +# override the definitions of various _SUFFIX symbols in suffix.mk +# + +# +# Object suffixes +# +ifndef OBJ_SUFFIX + OBJ_SUFFIX = .obj +endif + +# +# Assembler source suffixes +# +ifndef ASM_SUFFIX + ASM_SUFFIX = .asm +endif + +# +# Library suffixes +# +ifndef IMPORT_LIB_SUFFIX + IMPORT_LIB_SUFFIX = .$(LIB_SUFFIX) +endif + +ifndef DYNAMIC_LIB_SUFFIX_FOR_LINKING + DYNAMIC_LIB_SUFFIX_FOR_LINKING = $(IMPORT_LIB_SUFFIX) +endif + +# +# Program suffixes +# +ifndef PROG_SUFFIX + PROG_SUFFIX = .exe +endif + +# +# When the processor is NOT 386-based on Windows NT, override the +# value of $(CPU_TAG). For WinNT, 95, 16, not CE. +# +ifneq ($(CPU_ARCH),x386) + CPU_TAG = _$(CPU_ARCH) +endif + +# +# override ruleset.mk, removing the "lib" prefix for library names, and +# adding the "32" after the LIBRARY_VERSION. +# +ifdef LIBRARY_NAME + SHARED_LIBRARY = $(OBJDIR)/$(LIBRARY_NAME)$(LIBRARY_VERSION)32$(JDK_DEBUG_SUFFIX).dll + IMPORT_LIBRARY = $(OBJDIR)/$(LIBRARY_NAME)$(LIBRARY_VERSION)32$(JDK_DEBUG_SUFFIX).lib +endif + +# +# override the TARGETS defined in ruleset.mk, adding IMPORT_LIBRARY +# +ifndef TARGETS + TARGETS = $(LIBRARY) $(SHARED_LIBRARY) $(IMPORT_LIBRARY) $(PROGRAM) +endif diff --git a/security/coreconf/WIN32.mk b/security/coreconf/WIN32.mk new file mode 100644 index 000000000..1c438cf64 --- /dev/null +++ b/security/coreconf/WIN32.mk @@ -0,0 +1,198 @@ +# +# The contents of this file are subject to the Mozilla Public +# License Version 1.1 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy of +# the License at http://www.mozilla.org/MPL/ +# +# Software distributed under the License is distributed on an "AS +# IS" basis, WITHOUT WARRANTY OF ANY KIND, 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 Netscape are +# Copyright (C) 1994-2000 Netscape Communications Corporation. All +# Rights Reserved. +# +# Contributor(s): +# +# Alternatively, the contents of this file may be used under the +# terms of the GNU General Public License Version 2 or later (the +# "GPL"), in which case the provisions of the GPL are applicable +# instead of those above. If you wish to allow use of your +# version of this file only under the terms of the GPL and not to +# allow others to use your version of this file under the MPL, +# indicate your decision by deleting the provisions above and +# replace them with the notice and other provisions required by +# the GPL. If you do not delete the provisions above, a recipient +# may use your version of this file under either the MPL or the +# GPL. +# + +# +# Configuration common to all versions of Windows NT +# and Windows 95 +# + +DEFAULT_COMPILER = cl + +CC = cl +CCC = cl +LINK = link +AR = lib +AR += -NOLOGO -OUT:"$@" +RANLIB = echo +BSDECHO = echo + +ifdef BUILD_TREE +NSINSTALL_DIR = $(BUILD_TREE)/nss +else +NSINSTALL_DIR = $(CORE_DEPTH)/coreconf/nsinstall +endif +NSINSTALL = nsinstall + +MKDEPEND_DIR = $(CORE_DEPTH)/coreconf/mkdepend +MKDEPEND = $(MKDEPEND_DIR)/$(OBJDIR_NAME)/mkdepend.exe +# Note: MKDEPENDENCIES __MUST__ be a relative pathname, not absolute. +# If it is absolute, gmake will crash unless the named file exists. +MKDEPENDENCIES = $(OBJDIR_NAME)/depend.mk + +INSTALL = $(NSINSTALL) +MAKE_OBJDIR = mkdir +MAKE_OBJDIR += $(OBJDIR) +RC = rc.exe +GARBAGE += $(OBJDIR)/vc20.pdb $(OBJDIR)/vc40.pdb +XP_DEFINE += -DXP_PC +LIB_SUFFIX = lib +DLL_SUFFIX = dll + +ifdef BUILD_OPT + OS_CFLAGS += -MD + OPTIMIZER += -O2 + DEFINES += -UDEBUG -U_DEBUG -DNDEBUG + DLLFLAGS += -OUT:"$@" +else + # + # Define USE_DEBUG_RTL if you want to use the debug runtime library + # (RTL) in the debug build + # + ifdef USE_DEBUG_RTL + OS_CFLAGS += -MDd + else + OS_CFLAGS += -MD + endif + OPTIMIZER += -Od -Z7 + #OPTIMIZER += -Zi -Fd$(OBJDIR)/ -Od + DEFINES += -DDEBUG -D_DEBUG -UNDEBUG -DDEBUG_$(USERNAME) + DLLFLAGS += -DEBUG -DEBUGTYPE:CV -OUT:"$@" + LDFLAGS += -DEBUG -DEBUGTYPE:CV +endif + +DEFINES += -DWIN32 +ifdef MAPFILE +DLLFLAGS += -DEF:$(MAPFILE) +endif +# Change PROCESS to put the mapfile in the correct format for this platform +PROCESS_MAP_FILE = cp $(LIBRARY_NAME).def $@ + + +# +# The following is NOT needed for the NSPR 2.0 library. +# + +DEFINES += -D_WINDOWS + +# override default, which is ASFLAGS = CFLAGS +AS = ml.exe +ASFLAGS = -Cp -Sn -Zi -coff $(INCLUDES) + +# +# override the definitions of RELEASE_TREE found in tree.mk +# +ifndef RELEASE_TREE + ifdef BUILD_SHIP + ifdef USE_SHIPS + RELEASE_TREE = $(NTBUILD_SHIP) + else + RELEASE_TREE = //redbuild/components + endif + else + RELEASE_TREE = //redbuild/components + endif +endif + +# +# override the definitions of LIB_PREFIX and DLL_PREFIX in prefix.mk +# + +ifndef LIB_PREFIX + LIB_PREFIX = $(NULL) +endif + +ifndef DLL_PREFIX + DLL_PREFIX = $(NULL) +endif + +# +# override the definitions of various _SUFFIX symbols in suffix.mk +# + +# +# Object suffixes +# +ifndef OBJ_SUFFIX + OBJ_SUFFIX = .obj +endif + +# +# Assembler source suffixes +# +ifndef ASM_SUFFIX + ASM_SUFFIX = .asm +endif + +# +# Library suffixes +# + +ifndef IMPORT_LIB_SUFFIX + IMPORT_LIB_SUFFIX = .$(LIB_SUFFIX) +endif + +ifndef DYNAMIC_LIB_SUFFIX_FOR_LINKING + DYNAMIC_LIB_SUFFIX_FOR_LINKING = $(IMPORT_LIB_SUFFIX) +endif + +# +# Program suffixes +# +ifndef PROG_SUFFIX + PROG_SUFFIX = .exe +endif + +# +# When the processor is NOT 386-based on Windows NT, override the +# value of $(CPU_TAG). For WinNT, 95, 16, not CE. +# +ifneq ($(CPU_ARCH),x386) + CPU_TAG = _$(CPU_ARCH) +endif + +# +# override ruleset.mk, removing the "lib" prefix for library names, and +# adding the "32" after the LIBRARY_VERSION. +# +ifdef LIBRARY_NAME + SHARED_LIBRARY = $(OBJDIR)/$(LIBRARY_NAME)$(LIBRARY_VERSION)32$(JDK_DEBUG_SUFFIX).dll + IMPORT_LIBRARY = $(OBJDIR)/$(LIBRARY_NAME)$(LIBRARY_VERSION)32$(JDK_DEBUG_SUFFIX).lib +endif + +# +# override the TARGETS defined in ruleset.mk, adding IMPORT_LIBRARY +# +ifndef TARGETS + TARGETS = $(LIBRARY) $(SHARED_LIBRARY) $(IMPORT_LIBRARY) $(PROGRAM) +endif + diff --git a/security/coreconf/WIN954.0.mk b/security/coreconf/WIN954.0.mk new file mode 100644 index 000000000..24a44c1ff --- /dev/null +++ b/security/coreconf/WIN954.0.mk @@ -0,0 +1,59 @@ +# +# The contents of this file are subject to the Mozilla Public +# License Version 1.1 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy of +# the License at http://www.mozilla.org/MPL/ +# +# Software distributed under the License is distributed on an "AS +# IS" basis, WITHOUT WARRANTY OF ANY KIND, 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 Netscape are +# Copyright (C) 1994-2000 Netscape Communications Corporation. All +# Rights Reserved. +# +# Contributor(s): +# +# Alternatively, the contents of this file may be used under the +# terms of the GNU General Public License Version 2 or later (the +# "GPL"), in which case the provisions of the GPL are applicable +# instead of those above. If you wish to allow use of your +# version of this file only under the terms of the GPL and not to +# allow others to use your version of this file under the MPL, +# indicate your decision by deleting the provisions above and +# replace them with the notice and other provisions required by +# the GPL. If you do not delete the provisions above, a recipient +# may use your version of this file under either the MPL or the +# GPL. +# + +# +# Config stuff for WIN95 +# +# This makefile defines the following variables: +# OS_CFLAGS and OS_DLLFLAGS. + +include $(CORE_DEPTH)/coreconf/WIN32.mk + +ifeq ($(CPU_ARCH), x386) + OS_CFLAGS += -W3 -nologo + DEFINES += -D_X86_ +else + ifeq ($(CPU_ARCH), MIPS) + #OS_CFLAGS += -W3 -nologo + #DEFINES += -D_MIPS_ + OS_CFLAGS += -W3 -nologo + else + ifeq ($(CPU_ARCH), ALPHA) + OS_CFLAGS += -W3 -nologo + DEFINES += -D_ALPHA_=1 + endif + endif +endif + +OS_DLLFLAGS += -nologo -DLL -SUBSYSTEM:WINDOWS -PDB:NONE +DEFINES += -DWIN95 diff --git a/security/coreconf/WINCE.mk b/security/coreconf/WINCE.mk new file mode 100644 index 000000000..035e3c884 --- /dev/null +++ b/security/coreconf/WINCE.mk @@ -0,0 +1,207 @@ +# +# The contents of this file are subject to the Mozilla Public +# License Version 1.1 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy of +# the License at http://www.mozilla.org/MPL/ +# +# Software distributed under the License is distributed on an "AS +# IS" basis, WITHOUT WARRANTY OF ANY KIND, 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 Netscape are +# Copyright (C) 1994-2000 Netscape Communications Corporation. All +# Rights Reserved. +# +# Contributor(s): +# +# Alternatively, the contents of this file may be used under the +# terms of the GNU General Public License Version 2 or later (the +# "GPL"), in which case the provisions of the GPL are applicable +# instead of those above. If you wish to allow use of your +# version of this file only under the terms of the GPL and not to +# allow others to use your version of this file under the MPL, +# indicate your decision by deleting the provisions above and +# replace them with the notice and other provisions required by +# the GPL. If you do not delete the provisions above, a recipient +# may use your version of this file under either the MPL or the +# GPL. +# + +# +# Configuration common to all versions of Windows CE and Pocket PC x. +# + +ifeq ($(CPU_ARCH),x86) + DEFAULT_COMPILER = cl + CC = cl + CCC = cl +else +ifeq ($(CPU_ARCH),ARM) + DEFAULT_COMPILER = clarm + CC = clarm + CCC = clarm +else +include CPU_ARCH_is_not_recognized +include _$(CPU_ARCH) +endif +endif + +LINK = link +AR = lib +AR += -NOLOGO -OUT:"$@" +RANLIB = echo +BSDECHO = echo + +ifdef BUILD_TREE +NSINSTALL_DIR = $(BUILD_TREE)/nss +else +NSINSTALL_DIR = $(CORE_DEPTH)/coreconf/nsinstall +endif +NSINSTALL = nsinstall + +MKDEPEND_DIR = $(CORE_DEPTH)/coreconf/mkdepend +MKDEPEND = $(MKDEPEND_DIR)/$(OBJDIR_NAME)/mkdepend.exe +# Note: MKDEPENDENCIES __MUST__ be a relative pathname, not absolute. +# If it is absolute, gmake will crash unless the named file exists. +MKDEPENDENCIES = $(OBJDIR_NAME)/depend.mk + +INSTALL = $(NSINSTALL) +MAKE_OBJDIR = mkdir +MAKE_OBJDIR += $(OBJDIR) +RC = rc.exe +GARBAGE += $(OBJDIR)/vc20.pdb $(OBJDIR)/vc40.pdb +XP_DEFINE += -DXP_PC +LIB_SUFFIX = lib +DLL_SUFFIX = dll + +ifdef BUILD_OPT +# OS_CFLAGS += -MD + OPTIMIZER += -O2 + DEFINES += -UDEBUG -U_DEBUG -DNDEBUG + DLLFLAGS += -OUT:"$@" +else + # + # Define USE_DEBUG_RTL if you want to use the debug runtime library + # (RTL) in the debug build + # + ifdef USE_DEBUG_RTL +# OS_CFLAGS += -MDd + else +# OS_CFLAGS += -MD + endif + OPTIMIZER += -Od -Z7 + #OPTIMIZER += -Zi -Fd$(OBJDIR)/ -Od + DEFINES += -DDEBUG -D_DEBUG -UNDEBUG -DDEBUG_$(USERNAME) + DLLFLAGS += -DEBUG -DEBUGTYPE:CV -OUT:"$@" + LDFLAGS += -DEBUG -DEBUGTYPE:CV +endif + +# DEFINES += -DWIN32 + +ifdef MAPFILE + DLLFLAGS += -DEF:$(MAPFILE) +endif + +# Change PROCESS to put the mapfile in the correct format for this platform +PROCESS_MAP_FILE = cp $(LIBRARY_NAME).def $@ + +# +# The following is NOT needed for the NSPR 2.0 library. +# + +DEFINES += -D_WINDOWS + +# override default, which is ASFLAGS = CFLAGS +AS = ml.exe +ASFLAGS = -Cp -Sn -Zi -coff $(INCLUDES) + +# +# override the definitions of RELEASE_TREE found in tree.mk +# +ifndef RELEASE_TREE + ifdef BUILD_SHIP + ifdef USE_SHIPS + RELEASE_TREE = $(NTBUILD_SHIP) + else + RELEASE_TREE = //redbuild/components + endif + else + RELEASE_TREE = //redbuild/components + endif +endif + +# +# override the definitions of LIB_PREFIX and DLL_PREFIX in prefix.mk +# + +ifndef LIB_PREFIX + LIB_PREFIX = $(NULL) +endif + +ifndef DLL_PREFIX + DLL_PREFIX = $(NULL) +endif + +# +# override the definitions of various _SUFFIX symbols in suffix.mk +# + +# +# Object suffixes +# +ifndef OBJ_SUFFIX + OBJ_SUFFIX = .obj +endif + +# +# Assembler source suffixes +# +ifndef ASM_SUFFIX + ASM_SUFFIX = .asm +endif + +# +# Library suffixes +# + +ifndef IMPORT_LIB_SUFFIX + IMPORT_LIB_SUFFIX = .$(LIB_SUFFIX) +endif + +ifndef DYNAMIC_LIB_SUFFIX_FOR_LINKING + DYNAMIC_LIB_SUFFIX_FOR_LINKING = $(IMPORT_LIB_SUFFIX) +endif + +# +# Program suffixes +# +ifndef PROG_SUFFIX + PROG_SUFFIX = .exe +endif + +# +# override ruleset.mk, removing the "lib" prefix for library names, and +# adding the "32" after the LIBRARY_VERSION. +# +ifdef LIBRARY_NAME + SHARED_LIBRARY = $(OBJDIR)/$(LIBRARY_NAME)$(LIBRARY_VERSION)32$(JDK_DEBUG_SUFFIX).dll + IMPORT_LIBRARY = $(OBJDIR)/$(LIBRARY_NAME)$(LIBRARY_VERSION)32$(JDK_DEBUG_SUFFIX).lib +endif + +# +# override the TARGETS defined in ruleset.mk, adding IMPORT_LIBRARY +# +ifndef TARGETS + TARGETS = $(LIBRARY) $(SHARED_LIBRARY) $(IMPORT_LIBRARY) $(PROGRAM) +endif + + +# +# Always set CPU_TAG on Linux, OpenVMS, WINCE. +# +CPU_TAG = _$(CPU_ARCH) + diff --git a/security/coreconf/WINCE3.0.mk b/security/coreconf/WINCE3.0.mk new file mode 100644 index 000000000..ddf7a4c7b --- /dev/null +++ b/security/coreconf/WINCE3.0.mk @@ -0,0 +1,99 @@ +# +# The contents of this file are subject to the Mozilla Public +# License Version 1.1 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy of +# the License at http://www.mozilla.org/MPL/ +# +# Software distributed under the License is distributed on an "AS +# IS" basis, WITHOUT WARRANTY OF ANY KIND, 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 Netscape are +# Copyright (C) 1994-2000 Netscape Communications Corporation. All +# Rights Reserved. +# +# Contributor(s): +# +# Alternatively, the contents of this file may be used under the +# terms of the GNU General Public License Version 2 or later (the +# "GPL"), in which case the provisions of the GPL are applicable +# instead of those above. If you wish to allow use of your +# version of this file only under the terms of the GPL and not to +# allow others to use your version of this file under the MPL, +# indicate your decision by deleting the provisions above and +# replace them with the notice and other provisions required by +# the GPL. If you do not delete the provisions above, a recipient +# may use your version of this file under either the MPL or the +# GPL. +# + +# +# Config stuff for WINCE 3.0 (MS Pocket PC 2002) +# +# CPU_ARCH must already be defined to one of: +# x86, ARM +# +# This makefile defines the following variables: +# OS_CFLAGS, and OS_DLLFLAGS. + +include $(CORE_DEPTH)/coreconf/WINCE.mk + +CEVersion = 300 +CePlatform = WIN32_PLATFORM_PSPC=310 + +ifeq ($(CPU_ARCH), x86) + DEFINES += -D_X86_ -D_i386_ -Di_386_ -Dx86 + OS_CFLAGS += -Gs8192 -GF + OS_DLLFLAGS += -machine:IX86 +else +ifeq ($(CPU_ARCH), ARM) + DEFINES += -DARM -D_ARM_ + OS_DLLFLAGS += -machine:ARM +else + include CPU_ARCH_is_undefined +endif +endif + +DEFINES += -D_WIN32_WCE=300 -DUNDER_CE=300 +DEFINES += -DWIN32_PLATFORM_PSPC=310 +DEFINES += -DUNICODE -D_UNICODE +OS_CFLAGS += -W3 -nologo + +OS_DLLFLAGS += -DLL + +LINKFLAGS = -nologo -PDB:NONE -subsystem:windowsce,3.00 \ + -nodefaultlib:libc.lib \ + -nodefaultlib:libcd.lib \ + -nodefaultlib:libcmt.lib \ + -nodefaultlib:libcmtd.lib \ + -nodefaultlib:msvcrt.lib \ + -nodefaultlib:msvcrtd.lib \ + -nodefaultlib:oldnames.lib \ + $(NULL) + +LINK += $(LINKFLAGS) +LDFLAGS += $(LINKFLAGS) + +OS_LIBS= coredll.lib corelibc.lib + +#DLLBASE = -base:"0x00100000" -stack:0x10000,0x1000 -entry:"_DllMainCRTStartup" +DLLBASE += -align:"4096" + +#SUB_SHLOBJS = +#EXTRA_LIBS = +#EXTRA_SHARED_LIBS = +#OS_LIBS= +#LD_LIBS= + +# +# Win NT needs -GT so that fibers can work +# +#OS_CFLAGS += -GT +#DEFINES += -DWINNT + +# WINNT uses the lib prefix, Win95 and WinCE don't +#NSPR31_LIB_PREFIX = lib diff --git a/security/coreconf/WINNT3.51.mk b/security/coreconf/WINNT3.51.mk new file mode 100644 index 000000000..b422b2b56 --- /dev/null +++ b/security/coreconf/WINNT3.51.mk @@ -0,0 +1,64 @@ +# +# The contents of this file are subject to the Mozilla Public +# License Version 1.1 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy of +# the License at http://www.mozilla.org/MPL/ +# +# Software distributed under the License is distributed on an "AS +# IS" basis, WITHOUT WARRANTY OF ANY KIND, 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 Netscape are +# Copyright (C) 1994-2000 Netscape Communications Corporation. All +# Rights Reserved. +# +# Contributor(s): +# +# Alternatively, the contents of this file may be used under the +# terms of the GNU General Public License Version 2 or later (the +# "GPL"), in which case the provisions of the GPL are applicable +# instead of those above. If you wish to allow use of your +# version of this file only under the terms of the GPL and not to +# allow others to use your version of this file under the MPL, +# indicate your decision by deleting the provisions above and +# replace them with the notice and other provisions required by +# the GPL. If you do not delete the provisions above, a recipient +# may use your version of this file under either the MPL or the +# GPL. +# + +# +# Config stuff for WINNT 3.51 +# +# This makefile defines the following variables: +# OS_CFLAGS and OS_DLLFLAGS. +# It has the following internal variables: +# OS_PROC_CFLAGS and OS_WIN_CFLAGS. + +include $(CORE_DEPTH)/coreconf/WIN32.mk + +ifeq ($(CPU_ARCH), x386) + OS_PROC_CFLAGS += -D_X86_ +else + ifeq ($(CPU_ARCH), MIPS) + OS_PROC_CFLAGS += -D_MIPS_ + else + ifeq ($(CPU_ARCH), ALPHA) + OS_PROC_CFLAGS += -D_ALPHA_ + endif + endif +endif + +OS_WIN_CFLAGS += -W3 +OS_CFLAGS += -nologo $(OS_WIN_CFLAGS) $(OS_PROC_CFLAGS) +#OS_DLLFLAGS += -nologo -DLL -PDB:NONE -SUBSYSTEM:WINDOWS +OS_DLLFLAGS += -nologo -DLL -PDB:NONE -SUBSYSTEM:WINDOWS +# +# Win NT needs -GT so that fibers can work +# +OS_CFLAGS += -GT +OS_CFLAGS += -DWINNT diff --git a/security/coreconf/WINNT4.0.mk b/security/coreconf/WINNT4.0.mk new file mode 100644 index 000000000..7fc5a54d6 --- /dev/null +++ b/security/coreconf/WINNT4.0.mk @@ -0,0 +1,65 @@ +# +# The contents of this file are subject to the Mozilla Public +# License Version 1.1 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy of +# the License at http://www.mozilla.org/MPL/ +# +# Software distributed under the License is distributed on an "AS +# IS" basis, WITHOUT WARRANTY OF ANY KIND, 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 Netscape are +# Copyright (C) 1994-2000 Netscape Communications Corporation. All +# Rights Reserved. +# +# Contributor(s): +# +# Alternatively, the contents of this file may be used under the +# terms of the GNU General Public License Version 2 or later (the +# "GPL"), in which case the provisions of the GPL are applicable +# instead of those above. If you wish to allow use of your +# version of this file only under the terms of the GPL and not to +# allow others to use your version of this file under the MPL, +# indicate your decision by deleting the provisions above and +# replace them with the notice and other provisions required by +# the GPL. If you do not delete the provisions above, a recipient +# may use your version of this file under either the MPL or the +# GPL. +# + +# +# Config stuff for WINNT 4.0 +# +# This makefile defines the following variables: +# OS_CFLAGS and OS_DLLFLAGS. + +include $(CORE_DEPTH)/coreconf/WIN32.mk + +ifeq ($(CPU_ARCH), x386) + OS_CFLAGS += -W3 -nologo + DEFINES += -D_X86_ +else + ifeq ($(CPU_ARCH), MIPS) + #OS_CFLAGS += -W3 -nologo + #DEFINES += -D_MIPS_ + OS_CFLAGS += -W3 -nologo + else + ifeq ($(CPU_ARCH), ALPHA) + OS_CFLAGS += -W3 -nologo + DEFINES += -D_ALPHA_=1 + endif + endif +endif + +OS_DLLFLAGS += -nologo -DLL -SUBSYSTEM:WINDOWS -PDB:NONE +# +# Win NT needs -GT so that fibers can work +# +OS_CFLAGS += -GT +DEFINES += -DWINNT + +NSPR31_LIB_PREFIX = lib diff --git a/security/coreconf/WINNT5.0.mk b/security/coreconf/WINNT5.0.mk new file mode 100644 index 000000000..303b98007 --- /dev/null +++ b/security/coreconf/WINNT5.0.mk @@ -0,0 +1,65 @@ +# +# The contents of this file are subject to the Mozilla Public +# License Version 1.1 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy of +# the License at http://www.mozilla.org/MPL/ +# +# Software distributed under the License is distributed on an "AS +# IS" basis, WITHOUT WARRANTY OF ANY KIND, 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 Netscape are +# Copyright (C) 1994-2000 Netscape Communications Corporation. All +# Rights Reserved. +# +# Contributor(s): +# +# Alternatively, the contents of this file may be used under the +# terms of the GNU General Public License Version 2 or later (the +# "GPL"), in which case the provisions of the GPL are applicable +# instead of those above. If you wish to allow use of your +# version of this file only under the terms of the GPL and not to +# allow others to use your version of this file under the MPL, +# indicate your decision by deleting the provisions above and +# replace them with the notice and other provisions required by +# the GPL. If you do not delete the provisions above, a recipient +# may use your version of this file under either the MPL or the +# GPL. +# + +# +# Config stuff for WINNT 5.0 (Windows 2000) +# +# This makefile defines the following variables: +# OS_CFLAGS and OS_DLLFLAGS. + +include $(CORE_DEPTH)/coreconf/WIN32.mk + +ifeq ($(CPU_ARCH), x386) + OS_CFLAGS += -W3 -nologo + DEFINES += -D_X86_ +else + ifeq ($(CPU_ARCH), MIPS) + #OS_CFLAGS += -W3 -nologo + #DEFINES += -D_MIPS_ + OS_CFLAGS += -W3 -nologo + else + ifeq ($(CPU_ARCH), ALPHA) + OS_CFLAGS += -W3 -nologo + DEFINES += -D_ALPHA_=1 + endif + endif +endif + +OS_DLLFLAGS += -nologo -DLL -SUBSYSTEM:WINDOWS -PDB:NONE +# +# Win NT needs -GT so that fibers can work +# +OS_CFLAGS += -GT +DEFINES += -DWINNT + +NSPR31_LIB_PREFIX = lib diff --git a/security/coreconf/WINNT5.1.mk b/security/coreconf/WINNT5.1.mk new file mode 100644 index 000000000..f9c7ed1c8 --- /dev/null +++ b/security/coreconf/WINNT5.1.mk @@ -0,0 +1,65 @@ +# +# The contents of this file are subject to the Mozilla Public +# License Version 1.1 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy of +# the License at http://www.mozilla.org/MPL/ +# +# Software distributed under the License is distributed on an "AS +# IS" basis, WITHOUT WARRANTY OF ANY KIND, 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 Netscape are +# Copyright (C) 1994-2000 Netscape Communications Corporation. All +# Rights Reserved. +# +# Contributor(s): +# +# Alternatively, the contents of this file may be used under the +# terms of the GNU General Public License Version 2 or later (the +# "GPL"), in which case the provisions of the GPL are applicable +# instead of those above. If you wish to allow use of your +# version of this file only under the terms of the GPL and not to +# allow others to use your version of this file under the MPL, +# indicate your decision by deleting the provisions above and +# replace them with the notice and other provisions required by +# the GPL. If you do not delete the provisions above, a recipient +# may use your version of this file under either the MPL or the +# GPL. +# + +# +# Config stuff for WINNT 5.1 (Windows XP) +# +# This makefile defines the following variables: +# OS_CFLAGS and OS_DLLFLAGS. + +include $(CORE_DEPTH)/coreconf/WIN32.mk + +ifeq ($(CPU_ARCH), x386) + OS_CFLAGS += -W3 -nologo + DEFINES += -D_X86_ +else + ifeq ($(CPU_ARCH), MIPS) + #OS_CFLAGS += -W3 -nologo + #DEFINES += -D_MIPS_ + OS_CFLAGS += -W3 -nologo + else + ifeq ($(CPU_ARCH), ALPHA) + OS_CFLAGS += -W3 -nologo + DEFINES += -D_ALPHA_=1 + endif + endif +endif + +OS_DLLFLAGS += -nologo -DLL -SUBSYSTEM:WINDOWS -PDB:NONE +# +# Win NT needs -GT so that fibers can work +# +OS_CFLAGS += -GT +DEFINES += -DWINNT + +NSPR31_LIB_PREFIX = lib diff --git a/security/coreconf/arch.mk b/security/coreconf/arch.mk new file mode 100644 index 000000000..277232c0c --- /dev/null +++ b/security/coreconf/arch.mk @@ -0,0 +1,333 @@ +# +# The contents of this file are subject to the Mozilla Public +# License Version 1.1 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy of +# the License at http://www.mozilla.org/MPL/ +# +# Software distributed under the License is distributed on an "AS +# IS" basis, WITHOUT WARRANTY OF ANY KIND, 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 Netscape are +# Copyright (C) 1994-2000 Netscape Communications Corporation. All +# Rights Reserved. +# +# Contributor(s): +# +# Alternatively, the contents of this file may be used under the +# terms of the GNU General Public License Version 2 or later (the +# "GPL"), in which case the provisions of the GPL are applicable +# instead of those above. If you wish to allow use of your +# version of this file only under the terms of the GPL and not to +# allow others to use your version of this file under the MPL, +# indicate your decision by deleting the provisions above and +# replace them with the notice and other provisions required by +# the GPL. If you do not delete the provisions above, a recipient +# may use your version of this file under either the MPL or the +# GPL. +# + +####################################################################### +# Master "Core Components" macros for getting the OS architecture # +# defines these symbols: +# 64BIT_TAG +# OS_ARCH (from uname -r) +# OS_TEST (from uname -m) +# OS_RELEASE (from uname -v and/or -r) +# OS_TARGET User defined, or set to OS_ARCH +# CPU_ARCH (from unmame -m or -p, ONLY on WINNT) +# OS_CONFIG OS_TARGET + OS_RELEASE +# OBJDIR_TAG +# OBJDIR_NAME +####################################################################### + +# +# Macros for getting the OS architecture +# + +ifeq ($(USE_64), 1) + 64BIT_TAG=_64 +else + 64BIT_TAG= +endif + +OS_ARCH := $(subst /,_,$(shell uname -s)) + +# +# Attempt to differentiate between sparc and x86 Solaris +# + +OS_TEST := $(shell uname -m) +ifeq ($(OS_TEST),i86pc) + OS_RELEASE := $(shell uname -r)_$(OS_TEST) +else + OS_RELEASE := $(shell uname -r) +endif + +# +# Force the IRIX64 machines to use IRIX. +# + +ifeq ($(OS_ARCH),IRIX64) + OS_ARCH = IRIX +endif + +# +# Force the older BSD/OS versions to use the new arch name. +# + +ifeq ($(OS_ARCH),BSD_386) + OS_ARCH = BSD_OS +endif + +# +# Catch Deterim if SVR4 is NCR or UNIXWARE +# + +ifeq ($(OS_ARCH),UNIX_SV) + ifneq ($(findstring NCR, $(shell grep NCR /etc/bcheckrc | head -1 )),) + OS_ARCH = NCR + else + # Make UnixWare something human readable + OS_ARCH = UNIXWARE + endif + + # Get the OS release number, not 4.2 + OS_RELEASE := $(shell uname -v) +endif + +ifeq ($(OS_ARCH),UNIX_System_V) + OS_ARCH = NEC +endif + +ifeq ($(OS_ARCH),AIX) + OS_RELEASE := $(shell uname -v).$(shell uname -r) +endif + +# +# Distinguish between OSF1 V4.0B and V4.0D +# + +ifeq ($(OS_ARCH)$(OS_RELEASE),OSF1V4.0) + OS_VERSION := $(shell uname -v) + ifeq ($(OS_VERSION),564) + OS_RELEASE := V4.0B + endif + ifeq ($(OS_VERSION),878) + OS_RELEASE := V4.0D + endif +endif + +# +# SINIX changes name to ReliantUNIX with 5.43 +# + +ifeq ($(OS_ARCH),ReliantUNIX-N) + OS_ARCH = ReliantUNIX + OS_RELEASE = 5.4 +endif + +ifeq ($(OS_ARCH),SINIX-N) + OS_ARCH = ReliantUNIX + OS_RELEASE = 5.4 +endif + +# +# Handle FreeBSD 2.2-STABLE and Linux 2.0.30-osfmach3 +# + +ifeq (,$(filter-out Linux FreeBSD,$(OS_ARCH))) + OS_RELEASE := $(shell echo $(OS_RELEASE) | sed 's/-.*//') +endif + +ifeq ($(OS_ARCH),Linux) + OS_RELEASE := $(basename $(OS_RELEASE)) +endif + +# +# For OS/2 +# +ifeq ($(OS_ARCH),OS_2) + OS_ARCH = OS2 + OS_RELEASE := $(shell uname -v) +endif + +ifneq (,$(findstring OpenVMS,$(OS_ARCH))) + OS_ARCH = OpenVMS + OS_RELEASE := $(shell uname -v) +endif + +####################################################################### +# Master "Core Components" macros for getting the OS target # +####################################################################### + +# +# Note: OS_TARGET should be specified on the command line for gmake. +# When OS_TARGET=WIN95 is specified, then a Windows 95 target is built. +# The difference between the Win95 target and the WinNT target is that +# the WinNT target uses Windows NT specific features not available +# in Windows 95. The Win95 target will run on Windows NT, but (supposedly) +# at lesser performance (the Win95 target uses threads; the WinNT target +# uses fibers). +# +# When OS_TARGET=WIN16 is specified, then a Windows 3.11 (16bit) target +# is built. See: win16_3.11.mk for lots more about the Win16 target. +# +# If OS_TARGET is not specified, it defaults to $(OS_ARCH), i.e., no +# cross-compilation. +# + +# +# The following hack allows one to build on a WIN95 machine (as if +# s/he were cross-compiling on a WINNT host for a WIN95 target). +# It also accomodates for MKS's and Cygwin's uname.exe. +# +ifeq ($(OS_ARCH),WIN95) + OS_ARCH = WINNT + OS_TARGET = WIN95 +endif +ifeq ($(OS_ARCH),Windows_95) + OS_ARCH = Windows_NT + OS_TARGET = WIN95 +endif +ifeq ($(OS_ARCH),CYGWIN_95-4.0) + OS_ARCH = CYGWIN_NT-4.0 + OS_TARGET = WIN95 +endif +ifeq ($(OS_ARCH),CYGWIN_98-4.10) + OS_ARCH = CYGWIN_NT-4.0 + OS_TARGET = WIN95 +endif + +# +# On WIN32, we also define the variable CPU_ARCH, if it isn't already. +# +ifndef CPU_ARCH + ifeq ($(OS_ARCH), WINNT) + CPU_ARCH := $(shell uname -p) + ifeq ($(CPU_ARCH),I386) + CPU_ARCH = x386 + endif + endif +endif + +# If uname -s returns "Windows_NT", we assume that we are using +# the uname.exe in MKS toolkit. +# +# The -r option of MKS uname only returns the major version number. +# So we need to use its -v option to get the minor version number. +# Moreover, it doesn't have the -p option, so we need to use uname -m. +# +ifeq ($(OS_ARCH), Windows_NT) + OS_ARCH = WINNT + OS_MINOR_RELEASE := $(shell uname -v) + ifeq ($(OS_MINOR_RELEASE),00) + OS_MINOR_RELEASE = 0 + endif + OS_RELEASE := $(OS_RELEASE).$(OS_MINOR_RELEASE) + ifndef CPU_ARCH + CPU_ARCH := $(shell uname -m) + # + # MKS's uname -m returns "586" on a Pentium machine. + # + ifneq (,$(findstring 86,$(CPU_ARCH))) + CPU_ARCH = x386 + endif + endif +endif +# +# If uname -s returns "CYGWIN_NT-4.0", we assume that we are using +# the uname.exe in the Cygwin tools. +# +ifeq (CYGWIN_NT,$(findstring CYGWIN_NT,$(OS_ARCH))) + OS_RELEASE := $(patsubst CYGWIN_NT-%,%,$(OS_ARCH)) + OS_ARCH = WINNT + ifndef CPU_ARCH + CPU_ARCH := $(shell uname -m) + # + # Cygwin's uname -m returns "i686" on a Pentium Pro machine. + # + ifneq (,$(findstring 86,$(CPU_ARCH))) + CPU_ARCH = x386 + endif + endif +endif + +ifndef OS_TARGET + OS_TARGET = $(OS_ARCH) +endif + +ifeq ($(OS_TARGET), WIN95) + OS_RELEASE = 4.0 +endif + +ifeq ($(OS_TARGET), WIN16) + OS_RELEASE = +# OS_RELEASE = _3.11 +endif + +ifdef OS_TARGET_RELEASE + OS_RELEASE = $(OS_TARGET_RELEASE) +endif + +# +# This variable is used to get OS_CONFIG.mk. +# + +OS_CONFIG = $(OS_TARGET)$(OS_RELEASE) + +# +# OBJDIR_TAG depends on the predefined variable BUILD_OPT, +# to distinguish between debug and release builds. +# + +ifdef BUILD_OPT + ifeq ($(OS_TARGET),WIN16) + OBJDIR_TAG = _O + else + OBJDIR_TAG = $(64BIT_TAG)_OPT + endif +else + ifdef BUILD_IDG + ifeq ($(OS_TARGET),WIN16) + OBJDIR_TAG = _I + else + OBJDIR_TAG = $(64BIT_TAG)_IDG + endif + else + ifeq ($(OS_TARGET),WIN16) + OBJDIR_TAG = _D + else + OBJDIR_TAG = $(64BIT_TAG)_DBG + endif + endif +endif + +# +# The following flags are defined in the individual $(OS_CONFIG).mk +# files. +# +# CPU_TAG is defined if the CPU is not the most common CPU. +# COMPILER_TAG is defined if the compiler is not the native compiler. +# IMPL_STRATEGY may be defined too. +# + +OBJDIR_NAME = $(OS_TARGET)$(OS_RELEASE)$(CPU_TAG)$(COMPILER_TAG)$(LIBC_TAG)$(IMPL_STRATEGY)$(OBJDIR_TAG).OBJ + +ifeq (,$(filter-out WINNT WIN95 WINCE,$(OS_TARGET))) # list omits WIN16 +ifndef BUILD_OPT +# +# Define USE_DEBUG_RTL if you want to use the debug runtime library +# (RTL) in the debug build +# +ifdef USE_DEBUG_RTL + OBJDIR_NAME = $(OS_TARGET)$(OS_RELEASE)$(CPU_TAG)$(COMPILER_TAG)$(IMPL_STRATEGY)$(OBJDIR_TAG).OBJD +endif +endif +endif + +MK_ARCH = included diff --git a/security/coreconf/command.mk b/security/coreconf/command.mk new file mode 100644 index 000000000..96cddff68 --- /dev/null +++ b/security/coreconf/command.mk @@ -0,0 +1,55 @@ +# +# The contents of this file are subject to the Mozilla Public +# License Version 1.1 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy of +# the License at http://www.mozilla.org/MPL/ +# +# Software distributed under the License is distributed on an "AS +# IS" basis, WITHOUT WARRANTY OF ANY KIND, 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 Netscape are +# Copyright (C) 1994-2000 Netscape Communications Corporation. All +# Rights Reserved. +# +# Contributor(s): +# +# Alternatively, the contents of this file may be used under the +# terms of the GNU General Public License Version 2 or later (the +# "GPL"), in which case the provisions of the GPL are applicable +# instead of those above. If you wish to allow use of your +# version of this file only under the terms of the GPL and not to +# allow others to use your version of this file under the MPL, +# indicate your decision by deleting the provisions above and +# replace them with the notice and other provisions required by +# the GPL. If you do not delete the provisions above, a recipient +# may use your version of this file under either the MPL or the +# GPL. +# + +####################################################################### +# Master "Core Components" default command macros; # +# can be overridden in <arch>.mk # +####################################################################### + +AS = $(CC) +ASFLAGS += $(CFLAGS) +CCF = $(CC) $(CFLAGS) +LINK_DLL = $(LINK) $(OS_DLLFLAGS) $(DLLFLAGS) +LINK_EXE = $(LINK) $(OS_LFLAGS) $(LFLAGS) +NFSPWD = $(NSINSTALL_DIR)/nfspwd +CFLAGS = $(OPTIMIZER) $(OS_CFLAGS) $(XP_DEFINE) $(DEFINES) $(INCLUDES) \ + $(XCFLAGS) +RANLIB = echo +TAR = /bin/tar +# +# For purify +# +NOMD_CFLAGS += $(OPTIMIZER) $(NOMD_OS_CFLAGS) $(XP_DEFINE) $(DEFINES) \ + $(INCLUDES) $(XCFLAGS) + +MK_COMMAND = included diff --git a/security/coreconf/config.mk b/security/coreconf/config.mk new file mode 100644 index 000000000..01b633be8 --- /dev/null +++ b/security/coreconf/config.mk @@ -0,0 +1,169 @@ +# +# The contents of this file are subject to the Mozilla Public +# License Version 1.1 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy of +# the License at http://www.mozilla.org/MPL/ +# +# Software distributed under the License is distributed on an "AS +# IS" basis, WITHOUT WARRANTY OF ANY KIND, 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 Netscape are +# Copyright (C) 1994-2000 Netscape Communications Corporation. All +# Rights Reserved. +# +# Contributor(s): +# +# Alternatively, the contents of this file may be used under the +# terms of the GNU General Public License Version 2 or later (the +# "GPL"), in which case the provisions of the GPL are applicable +# instead of those above. If you wish to allow use of your +# version of this file only under the terms of the GPL and not to +# allow others to use your version of this file under the MPL, +# indicate your decision by deleting the provisions above and +# replace them with the notice and other provisions required by +# the GPL. If you do not delete the provisions above, a recipient +# may use your version of this file under either the MPL or the +# GPL. +# +# Configuration information for building in the "Core Components" source module +# + +####################################################################### +# [1.0] Master "Core Components" source and release <architecture> # +# tags # +####################################################################### +ifndef MK_ARCH +include $(CORE_DEPTH)/coreconf/arch.mk +endif + +####################################################################### +# [2.0] Master "Core Components" default command macros # +# (NOTE: may be overridden in $(OS_TARGET)$(OS_RELEASE).mk) # +####################################################################### +ifndef MK_COMMAND +include $(CORE_DEPTH)/coreconf/command.mk +endif + +####################################################################### +# [3.0] Master "Core Components" <architecture>-specific macros # +# (dependent upon <architecture> tags) # +# # +# We are moving towards just having a $(OS_TARGET).mk file # +# as opposed to multiple $(OS_TARGET)$(OS_RELEASE).mk files, # +# one for each OS release. # +####################################################################### + +TARGET_OSES = FreeBSD BSD_OS NetBSD OpenUNIX OS2 QNX Darwin BeOS OpenBSD + +ifeq (,$(filter-out $(TARGET_OSES),$(OS_TARGET))) +include $(CORE_DEPTH)/coreconf/$(OS_TARGET).mk +else +include $(CORE_DEPTH)/coreconf/$(OS_TARGET)$(OS_RELEASE).mk +endif + +####################################################################### +# [4.0] Master "Core Components" source and release <platform> tags # +# (dependent upon <architecture> tags) # +####################################################################### +ifndef PLATFORM +PLATFORM = $(OBJDIR_NAME) +endif + +####################################################################### +# [5.0] Master "Core Components" release <tree> tags # +# (dependent upon <architecture> tags) # +####################################################################### +ifndef MK_TREE +include $(CORE_DEPTH)/coreconf/tree.mk +endif + +####################################################################### +# [6.0] Master "Core Components" source and release <component> tags # +# NOTE: A component is also called a module or a subsystem. # +# (dependent upon $(MODULE) being defined on the # +# command line, as an environment variable, or in individual # +# makefiles, or more appropriately, manifest.mn) # +####################################################################### +ifndef MK_MODULE +include $(CORE_DEPTH)/coreconf/module.mk +endif + +####################################################################### +# [7.0] Master "Core Components" release <version> tags # +# (dependent upon $(MODULE) being defined on the # +# command line, as an environment variable, or in individual # +# makefiles, or more appropriately, manifest.mn) # +####################################################################### +ifndef MK_VERSION +include $(CORE_DEPTH)/coreconf/version.mk +endif + +####################################################################### +# [8.0] Master "Core Components" macros to figure out # +# binary code location # +# (dependent upon <platform> tags) # +####################################################################### +ifndef MK_LOCATION +include $(CORE_DEPTH)/coreconf/location.mk +endif + +####################################################################### +# [9.0] Master "Core Components" <component>-specific source path # +# (dependent upon <user_source_tree>, <source_component>, # +# <version>, and <platform> tags) # +####################################################################### +ifndef MK_SOURCE +include $(CORE_DEPTH)/coreconf/source.mk +endif + +####################################################################### +# [10.0] Master "Core Components" include switch for support header # +# files # +# (dependent upon <tree>, <component>, <version>, # +# and <platform> tags) # +####################################################################### +ifndef MK_HEADERS +include $(CORE_DEPTH)/coreconf/headers.mk +endif + +####################################################################### +# [11.0] Master "Core Components" for computing program prefixes # +####################################################################### +ifndef MK_PREFIX +include $(CORE_DEPTH)/coreconf/prefix.mk +endif + +####################################################################### +# [12.0] Master "Core Components" for computing program suffixes # +# (dependent upon <architecture> tags) # +####################################################################### +ifndef MK_SUFFIX +include $(CORE_DEPTH)/coreconf/suffix.mk +endif + +####################################################################### +# [13.0] Master "Core Components" for defining JDK # +# (dependent upon <architecture>, <source>, and <suffix> tags)# +####################################################################### +ifdef NS_USE_JDK +include $(CORE_DEPTH)/coreconf/jdk.mk +endif + +####################################################################### +# [14.0] Master "Core Components" rule set # +####################################################################### +ifndef MK_RULESET +include $(CORE_DEPTH)/coreconf/ruleset.mk +endif + +####################################################################### +# [15.0] Dependencies. +####################################################################### + +-include $(MKDEPENDENCIES) + diff --git a/security/coreconf/coreconf.pl b/security/coreconf/coreconf.pl new file mode 100644 index 000000000..8471b0ead --- /dev/null +++ b/security/coreconf/coreconf.pl @@ -0,0 +1,156 @@ +# +# The contents of this file are subject to the Mozilla Public +# License Version 1.1 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy of +# the License at http://www.mozilla.org/MPL/ +# +# Software distributed under the License is distributed on an "AS +# IS" basis, WITHOUT WARRANTY OF ANY KIND, 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 Netscape are +# Copyright (C) 1994-2000 Netscape Communications Corporation. All +# Rights Reserved. +# +# Contributor(s): +# +# Alternatively, the contents of this file may be used under the +# terms of the GNU General Public License Version 2 or later (the +# "GPL"), in which case the provisions of the GPL are applicable +# instead of those above. If you wish to allow use of your +# version of this file only under the terms of the GPL and not to +# allow others to use your version of this file under the MPL, +# indicate your decision by deleting the provisions above and +# replace them with the notice and other provisions required by +# the GPL. If you do not delete the provisions above, a recipient +# may use your version of this file under either the MPL or the +# GPL. +# +sub recursive_copy { + local($fromdir); + local($todir); + local(@dirlist); + $fromdir = shift; + $todir = shift; + + print STDERR "recursive copy called with $fromdir, $todir\n"; + +#remove any trailing slashes. + $fromdir =~ s/\/$//; + $todir =~ s/\/$//; + + opendir(DIR, $fromdir); + @dirlist = readdir DIR; + close DIR; + + + foreach $file (@dirlist) { + if (! (($file eq "." ) || ($file eq "..") )) { + + if (-d "$fromdir/$file") { + print STDERR "handling directory $todir/$file\n"; + &rec_mkdir("$todir/$file"); + &recursive_copy("$fromdir/$file","$todir/$file"); + } + else { + print STDERR "handling file $fromdir/$file\n"; + &my_copy("$fromdir/$file","$todir/$file"); + } + } + } +} + +sub parse_argv { + +# print STDERR "Parsing Variables\n"; + + foreach $q ( @ARGV ) { + if (! ($q =~ /=/)) { + $var{$lastassigned} .= " $q"; + } + else { + $q =~ /^([^=]*)=(.*)/; + $left = $1; + $right = $2; + + $right =~ s/ *$//; + $var{$left} = $right; + + $lastassigned = $left; + + } + print STDERR "Assigned $lastassigned = $var{$lastassigned}\n"; + } +} + + +# usage: &my_copy("dir/fromfile","dir2/tofile"); +# do a 'copy' - files only, 'to' MUST be a filename, not a directory. + +# fix this to be able to use copy on win nt. + +sub my_copy { + local($from); + local($to); + local($cpcmd); + + $from = shift; + $to = shift; + + if ( ! defined $var{OS_ARCH}) { + die "OS_ARCH not defined!"; + } + else { + if ($var{OS_ARCH} eq 'WINNT') { + $cpcmd = 'cp'; + } + else { + $cpcmd = 'cp'; + } + print STDERR "COPYING: $cpcmd $from $to\n"; + system("$cpcmd $from $to"); + } +} + + +sub old_my_copy { + local($from); + local($to); + + $from = shift; + $to = shift; + open(FIN, "<$from") || die("Can't read from file $from\n"); + if ( ! open(FOUT,">$to")) { + close FIN; + die "Can't write to file $to\n"; + } + while (read(FIN, $buf, 100000)) { + print FOUT $buf; + } + close (FIN); + close (FOUT); +} + +sub rec_mkdir { + local($arg); + local($t); + local($q); + + $arg = shift; + $t = ""; + foreach $q (split(/\//,$arg)) { + $t .= $q; + if (! ($t =~ /\.\.$/)) { + if ($t =~ /./) { + mkdir($t,0775); + } + } + $t.= '/'; + } +} + +1; diff --git a/security/coreconf/cpdist.pl b/security/coreconf/cpdist.pl new file mode 100755 index 000000000..cea077990 --- /dev/null +++ b/security/coreconf/cpdist.pl @@ -0,0 +1,195 @@ +#! /usr/local/bin/perl +# +# The contents of this file are subject to the Mozilla Public +# License Version 1.1 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy of +# the License at http://www.mozilla.org/MPL/ +# +# Software distributed under the License is distributed on an "AS +# IS" basis, WITHOUT WARRANTY OF ANY KIND, 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 Netscape are +# Copyright (C) 1994-2000 Netscape Communications Corporation. All +# Rights Reserved. +# +# Contributor(s): +# +# Alternatively, the contents of this file may be used under the +# terms of the GNU General Public License Version 2 or later (the +# "GPL"), in which case the provisions of the GPL are applicable +# instead of those above. If you wish to allow use of your +# version of this file only under the terms of the GPL and not to +# allow others to use your version of this file under the MPL, +# indicate your decision by deleting the provisions above and +# replace them with the notice and other provisions required by +# the GPL. If you do not delete the provisions above, a recipient +# may use your version of this file under either the MPL or the +# GPL. +# +require('coreconf.pl'); + +#######-- read in variables on command line into %var + +&parse_argv; + +### do the copy + +print STDERR "RELEASE TREE / MODULE = $var{RELEASE_TREE} $var{MODULE}\n"; + + + +# 1 +if ($var{RELEASE} eq "") { exit; } # Can't do release here, so exit. + +# 2 +#if (! ($var{RELEASE} =~ /\//)) { # if no specific version is specified in RELEASE variable +# $component = $var{RELEASE}; +#} +#else { # if a subcomponent/version is given in the RELEASE variable +# $var{RELEASE} =~ m|^([^/]*)/|; +# $component = $1; # everything before the first slash; +# } + +# 3 +$path = $var{RELEASE}; + + +# 4 +# find out what directory we would create for 'today' + +$year = (localtime)[5] + 1900; +$month = (localtime)[4] + 1; +$day = (localtime)[3]; +$today = sprintf( "%d%02d%02d", $year, $month, $day ); + +# 5 +# if version is null, then set the version to today. +if ($var{"RELEASE_VERSION"} eq "") { + $var{"RELEASE_VERSION"} = $today; +} + +#6 +$version = $var{"RELEASE_VERSION"}; # set RELEASE_VERSION to passed in variable + +#7 +# if version is today, then we will want to make a 'current' link. + +if ($version eq $today) { + $create_current = 1; +} + +#8 +# version can be a) passed in value from command line, b) value in manifest.mn +# or c) computed value such as '19970909' + + +$dir = "$var{'RELEASE_TREE'}/$path"; + +#9 +if (! (-e "$dir/$version" && -d "$dir/$version")) { + print "making dir $dir \n"; + &rec_mkdir("$dir/$version"); +} + + + +print "version = $version\n"; +print "path = $path\n"; +print "var{release_tree} = $var{'RELEASE_TREE'}\n"; +print "dir = $dir = RELEASE_TREE/path\n"; + + +#10 +if ($create_current == 1) { + +# unlinking and linking always occurs, even if the link is correct + print "unlinking $dir/current\n"; + unlink("$dir/current"); + + print "putting version number $today into 'current' file.."; + + open(FILE,">$dir/current") || die " couldn't open current\n"; + print FILE "$today\n"; + close(FILE); + print " ..done\n" + +} + +&rec_mkdir("$dir/$version/$var{'RELEASE_MD_DIR'}"); +&rec_mkdir("$dir/$version/$var{'RELEASE_XP_DIR'}"); + + + + +foreach $jarfile (split(/ /,$var{FILES}) ) { + print STDERR "---------------------------------------------\n"; + + $jarinfo = $var{$jarfile}; + + ($jardir,$jaropts) = split(/\|/,$jarinfo); + + if ($jaropts =~ /f/) { + print STDERR "Copying files $jardir....\n"; + } + else { + print STDERR "Copying jar file $jarfile....\n"; + } + + print "jaropts = $jaropts\n"; + + if ($jaropts =~ /m/) { + $destdir = $var{"RELEASE_MD_DIR"}; + print "found m, using MD dir $destdir\n"; + } + elsif ($jaropts =~ /x/) { + $destdir = $var{"RELEASE_XP_DIR"}; + print "found x, using XP dir $destdir\n"; + } + else { + die "Error: must specify m or x in jar options in $jarinfo line\n"; + } + + + $distdir = "$dir/$version/$destdir"; + + + + if ($jaropts =~ /f/) { + + print "splitting: \"$jardir\"\n"; + for $srcfile (split(/ /,$jardir)) { + +#if srcfile has a slash + if ($srcfile =~ m|/|) { +#pull out everything before the last slash into $1 + $srcfile =~ m|(.*)/|; + $distsubdir = "/$1"; + print "making dir $distdir$distsubdir\n"; + &rec_mkdir("$distdir$distsubdir"); + } + print "copy: from $srcfile\n"; + print " to $distdir$distsubdir\n"; + $srcprefix = ""; + if ($jaropts =~/m/) { + $srcprefix = "$var{'PLATFORM'}/"; + } + system("cp $srcprefix$srcfile $distdir$distsubdir"); + } + } + else { + $srcfile = "$var{SOURCE_RELEASE_PREFIX}/$jardir/$jarfile"; + + print "copy: from $srcfile\n"; + print " to $distdir\n"; + + system("cp $srcfile $distdir"); + + } + + } + diff --git a/security/coreconf/headers.mk b/security/coreconf/headers.mk new file mode 100644 index 000000000..ff2da9a7f --- /dev/null +++ b/security/coreconf/headers.mk @@ -0,0 +1,60 @@ +# +# The contents of this file are subject to the Mozilla Public +# License Version 1.1 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy of +# the License at http://www.mozilla.org/MPL/ +# +# Software distributed under the License is distributed on an "AS +# IS" basis, WITHOUT WARRANTY OF ANY KIND, 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 Netscape are +# Copyright (C) 1994-2000 Netscape Communications Corporation. All +# Rights Reserved. +# +# Contributor(s): +# +# Alternatively, the contents of this file may be used under the +# terms of the GNU General Public License Version 2 or later (the +# "GPL"), in which case the provisions of the GPL are applicable +# instead of those above. If you wish to allow use of your +# version of this file only under the terms of the GPL and not to +# allow others to use your version of this file under the MPL, +# indicate your decision by deleting the provisions above and +# replace them with the notice and other provisions required by +# the GPL. If you do not delete the provisions above, a recipient +# may use your version of this file under either the MPL or the +# GPL. +# + +####################################################################### +# Master "Core Components" include switch for support header files # +####################################################################### + +# +# Always append source-side machine-dependent (md) and cross-platform +# (xp) include paths +# + +INCLUDES += -I$(SOURCE_MDHEADERS_DIR) + +ifneq ($(OS_TARGET),WIN16) + INCLUDES += -I$(SOURCE_XPHEADERS_DIR) +endif + +# +# Only append source-side private cross-platform include paths for +# sectools +# + +INCLUDES += -I$(SOURCE_XPPRIVATE_DIR) + +ifdef MOZILLA_CLIENT + INCLUDES += -I$(SOURCE_XP_DIR)/include $(MOZILLA_INCLUDES) +endif + +MK_HEADERS = included diff --git a/security/coreconf/import.pl b/security/coreconf/import.pl new file mode 100755 index 000000000..0bba3c820 --- /dev/null +++ b/security/coreconf/import.pl @@ -0,0 +1,218 @@ +#! /usr/local/bin/perl +# +# The contents of this file are subject to the Mozilla Public +# License Version 1.1 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy of +# the License at http://www.mozilla.org/MPL/ +# +# Software distributed under the License is distributed on an "AS +# IS" basis, WITHOUT WARRANTY OF ANY KIND, 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 Netscape are +# Copyright (C) 1994-2000 Netscape Communications Corporation. All +# Rights Reserved. +# +# Contributor(s): +# +# Alternatively, the contents of this file may be used under the +# terms of the GNU General Public License Version 2 or later (the +# "GPL"), in which case the provisions of the GPL are applicable +# instead of those above. If you wish to allow use of your +# version of this file only under the terms of the GPL and not to +# allow others to use your version of this file under the MPL, +# indicate your decision by deleting the provisions above and +# replace them with the notice and other provisions required by +# the GPL. If you do not delete the provisions above, a recipient +# may use your version of this file under either the MPL or the +# GPL. +# + +print STDERR "import.pl\n"; + +require('coreconf.pl'); + + +$returncode =0; + + +#######-- read in variables on command line into %var + +$var{ZIP} = "zip"; +$var{UNZIP} = "unzip -o"; + +&parse_argv; + +if (! ($var{IMPORTS} =~ /\w/)) { + print STDERR "nothing to import\n"; +} + +######-- Do the import! + +foreach $import (split(/ /,$var{IMPORTS}) ) { + + print STDERR "\n\nIMPORTING .... $import\n-----------------------------\n"; + + +# if a specific version specified in IMPORT variable +# (if $import has a slash in it) + + if ($import =~ /\//) { + # $component=everything before the first slash of $import + + $import =~ m|^([^/]*)/|; + $component = $1; + + $import =~ m|^(.*)/([^/]*)$|; + + # $path=everything before the last slash of $import + $path = $1; + + # $version=everything after the last slash of $import + $version = $2; + + if ($var{VERSION} ne "current") { + $version = $var{VERSION}; + } + } + else { + $component = $import; + $path = $import; + $version = $var{VERSION}; + } + + $releasejardir = "$var{RELEASE_TREE}/$path"; + if ($version eq "current") { + print STDERR "Current version specified. Reading 'current' file ... \n"; + + open(CURRENT,"$releasejardir/current") || die "NO CURRENT FILE\n"; + $version = <CURRENT>; + $version =~ s/(\r?\n)*$//; # remove any trailing [CR/]LF's + close(CURRENT); + print STDERR "Using version $version\n"; + if ( $version eq "") { + die "Current version file empty. Stopping\n"; + } + } + + $releasejardir = "$releasejardir/$version"; + if ( ! -d $releasejardir) { + die "$releasejardir doesn't exist (Invalid Version?)\n"; + } + foreach $jarfile (split(/ /,$var{FILES})) { + + ($relpath,$distpath,$options) = split(/\|/, $var{$jarfile}); + + if ($var{'OVERRIDE_IMPORT_CHECK'} eq 'YES') { + $options =~ s/v//g; + } + + if ( $relpath ne "") { $releasejarpathname = "$releasejardir/$relpath";} + else { $releasejarpathname = $releasejardir; } + +# If a component doesn't have IDG versions, import the DBG ones + if( ! -e "$releasejarpathname/$jarfile" ) { + if( $relpath =~ /IDG\.OBJ$/ ) { + $relpath =~ s/IDG.OBJ/DBG.OBJ/; + $releasejarpathname = "$releasejardir/$relpath"; + } elsif( $relpath =~ /IDG\.OBJD$/ ) { + $relpath =~ s/IDG.OBJD/DBG.OBJD/; + $releasejarpathname = "$releasejardir/$relpath"; + } + } + + if (-e "$releasejarpathname/$jarfile") { + print STDERR "\nWorking on jarfile: $jarfile\n"; + + if ($distpath =~ m|/$|) { + $distpathname = "$distpath$component"; + } + else { + $distpathname = "$distpath"; + } + + +#the block below is used to determine whether or not the xp headers have +#already been imported for this component + + $doimport = 1; + if ($options =~ /v/) { # if we should check the imported version + print STDERR "Checking if version file exists $distpathname/version\n"; + if (-e "$distpathname/version") { + open( VFILE, "<$distpathname/version") || + die "Cannot open $distpathname/version for reading. Permissions?\n"; + $importversion = <VFILE>; + close (VFILE); + $importversion =~ s/\r?\n$//; # Strip off any trailing CR/LF + if ($version eq $importversion) { + print STDERR "$distpathname version '$importversion' already imported. Skipping...\n"; + $doimport =0; + } + } + } + + if ($doimport == 1) { + if (! -d "$distpathname") { + &rec_mkdir("$distpathname"); + } + # delete the stuff in there already. + # (this should really be recursive delete.) + + if ($options =~ /v/) { + $remheader = "\nREMOVING files in '$distpathname/' :"; + opendir(DIR,"$distpathname") || + die ("Cannot read directory $distpathname\n"); + @filelist = readdir(DIR); + closedir(DIR); + foreach $file ( @filelist ) { + if (! ($file =~ m!/.?.$!) ) { + if (! (-d $file)) { + $file =~ m!([^/]*)$!; + print STDERR "$remheader $1"; + $remheader = " "; + unlink "$distpathname/$file"; + } + } + } + } + + + print STDERR "\n\n"; + + print STDERR "\nExtracting jarfile '$jarfile' to local directory $distpathname/\n"; + + print STDERR "$var{UNZIP} $releasejarpathname/$jarfile -d $distpathname\n"; + system("$var{UNZIP} $releasejarpathname/$jarfile -d $distpathname"); + + $r = $?; + + if ($options =~ /v/) { + if ($r == 0) { + unlink ("$distpathname/version"); + if (open(VFILE,">$distpathname/version")) { + print VFILE "$version\n"; + close(VFILE); + } + } + else { + print STDERR "Could not create '$distpathname/version'. Permissions?\n"; + $returncode ++; + } + } + } # if (doimport) + } # if (-e releasejarpathname/jarfile) + } # foreach jarfile) +} # foreach IMPORT + + + +exit($returncode); + + + + + diff --git a/security/coreconf/jdk.mk b/security/coreconf/jdk.mk new file mode 100644 index 000000000..8189808c8 --- /dev/null +++ b/security/coreconf/jdk.mk @@ -0,0 +1,627 @@ +# +# The contents of this file are subject to the Mozilla Public +# License Version 1.1 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy of +# the License at http://www.mozilla.org/MPL/ +# +# Software distributed under the License is distributed on an "AS +# IS" basis, WITHOUT WARRANTY OF ANY KIND, 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 Netscape are +# Copyright (C) 1994-2000 Netscape Communications Corporation. All +# Rights Reserved. +# +# Contributor(s): +# +# Alternatively, the contents of this file may be used under the +# terms of the GNU General Public License Version 2 or later (the +# "GPL"), in which case the provisions of the GPL are applicable +# instead of those above. If you wish to allow use of your +# version of this file only under the terms of the GPL and not to +# allow others to use your version of this file under the MPL, +# indicate your decision by deleting the provisions above and +# replace them with the notice and other provisions required by +# the GPL. If you do not delete the provisions above, a recipient +# may use your version of this file under either the MPL or the +# GPL. +# + +ifdef NS_USE_JDK +####################################################################### +# [1] Define preliminary JDK "Core Components" toolset options # +####################################################################### + +# set default JDK java threading model +ifeq ($(JDK_THREADING_MODEL),) + JDK_THREADING_MODEL = native_threads +# no such thing as -native flag + JDK_THREADING_MODEL_OPT = +endif + +####################################################################### +# [2] Define platform-independent JDK "Core Components" options # +####################################################################### + +# set default location of the java classes repository +ifeq ($(JAVA_DESTPATH),) +ifdef BUILD_OPT + JAVA_DESTPATH = $(SOURCE_CLASSES_DIR) +else + JAVA_DESTPATH = $(SOURCE_CLASSES_DBG_DIR) +endif +endif + +# set default location of the package under the java classes repository +# note that this overrides the default package value in ruleset.mk +ifeq ($(PACKAGE),) + PACKAGE = . +endif + +# set default location of the java source code repository +ifeq ($(JAVA_SOURCEPATH),) + JAVA_SOURCEPATH = . +endif + +# add JNI directory to default include search path +ifneq ($(JNI_GEN),) + ifdef NSBUILDROOT + INCLUDES += -I$(JNI_GEN_DIR) -I$(SOURCE_XP_DIR) + else + INCLUDES += -I$(JNI_GEN_DIR) + endif +endif + +####################################################################### +# [3] Define platform-dependent JDK "Core Components" options # +####################################################################### + +# set [Microsoft Windows] platforms +ifeq ($(OS_ARCH), WINNT) + JAVA_CLASSES = $(JAVA_HOME)/lib/classes.zip + + ifeq ($(JRE_HOME),) + JRE_HOME = $(JAVA_HOME) + JRE_CLASSES = $(JAVA_CLASSES) + else + ifeq ($(JRE_CLASSES),) + JRE_CLASSES = $(JRE_HOME)/lib/classes.zip + endif + endif + + PATH_SEPARATOR = ; + + # (2) specify "header" information + JAVA_ARCH = win32 + + INCLUDES += -I$(JAVA_HOME)/include + INCLUDES += -I$(JAVA_HOME)/include/$(JAVA_ARCH) + + # (3) specify "linker" information + JAVA_CPU = + + JAVA_LIBDIR = lib + + JAVA_CLIBS = + + JAVA_LIBS = -LIBPATH:$(JAVA_HOME)/$(JAVA_LIBDIR) jvm.lib + JAVA_LIBS += $(JAVA_CLIBS) + + LDFLAGS += $(JAVA_LIBS) + + # currently, disable JIT option on this platform + JDK_JIT_OPT = -nojit +endif + +# set [Sun Solaris] platforms +ifeq ($(OS_ARCH), SunOS) + JAVA_CLASSES = $(JAVA_HOME)/lib/classes.zip + + ifeq ($(JRE_HOME),) + JRE_HOME = $(JAVA_HOME) + JRE_CLASSES = $(JAVA_CLASSES) + else + ifeq ($(JRE_CLASSES),) + JRE_CLASSES = $(JRE_HOME)/lib/classes.zip + endif + endif + + PATH_SEPARATOR = : + + # (2) specify "header" information + JAVA_ARCH = solaris + + INCLUDES += -I$(JAVA_HOME)/include + INCLUDES += -I$(JAVA_HOME)/include/$(JAVA_ARCH) + + # (3) specify "linker" information +ifeq ($(USE_64), 1) + JAVA_CPU = $(shell uname -p)v9 +else + JAVA_CPU = $(shell uname -p) +endif + +ifeq ($(JDK_VERSION), 1.1) + JAVA_LIBDIR = lib/$(JAVA_CPU) +else + JAVA_LIBDIR = jre/lib/$(JAVA_CPU) +endif + + # ** IMPORTANT ** having -lthread before -lnspr is critical on solaris + # when linking with -ljava as nspr redefines symbols in libthread that + # cause JNI executables to fail with assert of bad thread stack values. + JAVA_CLIBS = -lthread + +ifneq ($(JDK_VERSION), 1.1) +ifeq ($(USE_64), 1) + JAVA_LIBS += -L$(JAVA_HOME)/$(JAVA_LIBDIR)/server +else + JAVA_LIBS += -L$(JAVA_HOME)/$(JAVA_LIBDIR)/classic +endif + JAVA_LIBS += -L$(JAVA_HOME)/$(JAVA_LIBDIR) + JAVA_LIBS += -ljvm -ljava +else + JAVA_LIBS += -L$(JAVA_HOME)/$(JAVA_LIBDIR)/$(JDK_THREADING_MODEL) -ljava +endif + JAVA_LIBS += $(JAVA_CLIBS) + + LDFLAGS += $(JAVA_LIBS) + + # currently, disable JIT option on this platform + JDK_JIT_OPT = +endif + +# set [Hewlett Packard HP-UX] platforms +ifeq ($(OS_ARCH), HP-UX) + JAVA_CLASSES = $(JAVA_HOME)/lib/classes.zip + + ifeq ($(JRE_HOME),) + JRE_HOME = $(JAVA_HOME) + JRE_CLASSES = $(JAVA_CLASSES) + else + ifeq ($(JRE_CLASSES),) + JRE_CLASSES = $(JRE_HOME)/lib/classes.zip + endif + endif + + PATH_SEPARATOR = : + + # (2) specify "header" information + JAVA_ARCH = hp-ux + + INCLUDES += -I$(JAVA_HOME)/include + INCLUDES += -I$(JAVA_HOME)/include/$(JAVA_ARCH) + + # (3) specify "linker" information + JAVA_CPU = PA_RISC + + JAVA_LIBDIR = jre/lib/$(JAVA_CPU) + + JAVA_CLIBS = + + JAVA_LIBS = -L$(JAVA_HOME)/$(JAVA_LIBDIR)/$(JDK_THREADING_MODEL) -lhpi + JAVA_LIBS += -L$(JAVA_HOME)/$(JAVA_LIBDIR)/classic -ljvm + JAVA_LIBS += -L$(JAVA_HOME)/$(JAVA_LIBDIR) -ljava + JAVA_LIBS += $(JAVA_CLIBS) + + LDFLAGS += $(JAVA_LIBS) + + # no JIT option available on this platform + JDK_JIT_OPT = +endif + +# set [Redhat Linux] platforms +ifeq ($(OS_ARCH), Linux) + JAVA_CLASSES = $(JAVA_HOME)/lib/classes.zip + + ifeq ($(JRE_HOME),) + JRE_HOME = $(JAVA_HOME) + JRE_CLASSES = $(JAVA_CLASSES) + else + ifeq ($(JRE_CLASSES),) + JRE_CLASSES = $(JRE_HOME)/lib/classes.zip + endif + endif + + PATH_SEPARATOR = : + + # (2) specify "header" information + JAVA_ARCH = linux + + INCLUDES += -I$(JAVA_HOME)/include + INCLUDES += -I$(JAVA_HOME)/include/$(JAVA_ARCH) + + # (3) specify "linker" information + JAVA_CPU = i386 + + JAVA_LIBDIR = jre/lib/$(JAVA_CPU) + + JAVA_CLIBS = + + JAVA_LIBS = -L$(JAVA_HOME)/$(JAVA_LIBDIR)/$(JDK_THREADING_MODEL) -lhpi + ifeq ($(JDK_VERSION), 1.4) + JAVA_LIBS += -L$(JAVA_HOME)/$(JAVA_LIBDIR)/server -ljvm + else + JAVA_LIBS += -L$(JAVA_HOME)/$(JAVA_LIBDIR)/classic -ljvm + endif + JAVA_LIBS += -L$(JAVA_HOME)/$(JAVA_LIBDIR) -ljava + JAVA_LIBS += $(JAVA_CLIBS) + + LDFLAGS += $(JAVA_LIBS) + + # no JIT option available on this platform + JDK_JIT_OPT = +endif + +# set [IBM AIX] platforms +ifeq ($(OS_ARCH), AIX) + JAVA_CLASSES = $(JAVA_HOME)/lib/classes.zip + + ifeq ($(JRE_HOME),) + JRE_HOME = $(JAVA_HOME) + JRE_CLASSES = $(JAVA_CLASSES) + else + ifeq ($(JRE_CLASSES),) + JRE_CLASSES = $(JRE_HOME)/lib/classes.zip + endif + endif + + PATH_SEPARATOR = : + + # (2) specify "header" information + JAVA_ARCH = aix + + INCLUDES += -I$(JAVA_HOME)/include + INCLUDES += -I$(JAVA_HOME)/include/$(JAVA_ARCH) + + # (3) specify "linker" information + JAVA_CPU = aix + + JAVA_LIBDIR = jre/bin + + JAVA_CLIBS = + + JAVA_LIBS = -L$(JAVA_HOME)/$(JAVA_LIBDIR) -lhpi + JAVA_LIBS += -L$(JAVA_HOME)/$(JAVA_LIBDIR)/classic -ljvm + JAVA_LIBS += -L$(JAVA_HOME)/$(JAVA_LIBDIR) -ljava + JAVA_LIBS += $(JAVA_CLIBS) + + LDFLAGS += $(JAVA_LIBS) + + # no JIT option available on this platform + JDK_JIT_OPT = +endif + +# set [Digital UNIX] platforms +ifeq ($(OS_ARCH), OSF1) + JAVA_CLASSES = $(JAVA_HOME)/lib/classes.zip + + ifeq ($(JRE_HOME),) + JRE_HOME = $(JAVA_HOME) + JRE_CLASSES = $(JAVA_CLASSES) + else + ifeq ($(JRE_CLASSES),) + JRE_CLASSES = $(JRE_HOME)/lib/classes.zip + endif + endif + + PATH_SEPARATOR = : + + # (2) specify "header" information + JAVA_ARCH = alpha + + INCLUDES += -I$(JAVA_HOME)/include + INCLUDES += -I$(JAVA_HOME)/include/$(JAVA_ARCH) + + # (3) specify "linker" information + JAVA_CPU = alpha + + JAVA_LIBDIR = jre/lib/$(JAVA_CPU) + + JAVA_CLIBS = + + JAVA_LIBS = -L$(JAVA_HOME)/$(JAVA_LIBDIR)/$(JDK_THREADING_MODEL) -lhpi + JAVA_LIBS += -L$(JAVA_HOME)/$(JAVA_LIBDIR)/classic -ljvm + JAVA_LIBS += -L$(JAVA_HOME)/$(JAVA_LIBDIR) -ljava + JAVA_LIBS += $(JAVA_CLIBS) + + LDFLAGS += $(JAVA_LIBS) + + # no JIT option available on this platform + JDK_JIT_OPT = +endif + +# set [Silicon Graphics IRIX] platforms +ifeq ($(OS_ARCH), IRIX) + JAVA_CLASSES = $(JAVA_HOME)/lib/dev.jar:$(JAVA_HOME)/lib/rt.jar + + ifeq ($(JRE_HOME),) + JRE_HOME = $(JAVA_HOME) + JRE_CLASSES = $(JAVA_CLASSES) + else + ifeq ($(JRE_CLASSES),) + JRE_CLASSES = $(JRE_HOME)/lib/dev.jar:$(JRE_HOME)/lib/rt.jar + endif + endif + + PATH_SEPARATOR = : + + # (2) specify "header" information + JAVA_ARCH = irix + + INCLUDES += -I$(JAVA_HOME)/include + INCLUDES += -I$(JAVA_HOME)/include/$(JAVA_ARCH) + + # (3) specify "-n32 linker" information + JAVA_CPU = sgi + + JAVA_LIBDIR = lib32/$(JAVA_CPU) + + JAVA_CLIBS = + + JAVA_LIBS = -L$(JAVA_HOME)/$(JAVA_LIBDIR)/$(JDK_THREADING_MODEL) -lhpi + JAVA_LIBS += -lirixextra + JAVA_LIBS += -L$(JAVA_HOME)/$(JAVA_LIBDIR)/classic -ljvm + JAVA_LIBS += -L$(JAVA_HOME)/$(JAVA_LIBDIR) -ljava + JAVA_LIBS += $(JAVA_CLIBS) + + LDFLAGS += $(JAVA_LIBS) + + # no JIT option available on this platform + JDK_JIT_OPT = +endif + +####################################################################### +# [4] Define remaining JDK "Core Components" default toolset options # +####################################################################### + +# set JDK optimization model +ifeq ($(BUILD_OPT),1) + JDK_OPTIMIZER_OPT = -O +else + JDK_OPTIMIZER_OPT = -g +endif + +# set minimal JDK debugging model +ifeq ($(JDK_DEBUG),1) + JDK_DEBUG_OPT = -debug +else + JDK_DEBUG_OPT = +endif + +# set default path to repository for JDK classes +ifeq ($(JDK_CLASS_REPOSITORY_OPT),) + JDK_CLASS_REPOSITORY_OPT = -d $(JAVA_DESTPATH) +endif + +# define a default JDK classpath +ifeq ($(JDK_CLASSPATH),) + JDK_CLASSPATH = '$(JAVA_DESTPATH)$(PATH_SEPARATOR)$(JAVA_SOURCEPATH)$(PATH_SEPARATOR)$(JAVA_CLASSES)' +endif + +# by default, override CLASSPATH environment variable using the JDK classpath option with $(JDK_CLASSPATH) +ifeq ($(JDK_CLASSPATH_OPT),) + JDK_CLASSPATH_OPT = -classpath $(JDK_CLASSPATH) +endif + +ifeq ($(USE_64), 1) + JDK_USE_64 = -d64 +endif + +endif + + +####################################################################### +# [5] Define JDK "Core Components" toolset; # +# (always allow a user to override these values) # +####################################################################### + +# +# (1) appletviewer +# + +ifeq ($(APPLETVIEWER),) + APPLETVIEWER_PROG = $(JAVA_HOME)/bin/appletviewer$(PROG_SUFFIX) + APPLETVIEWER_FLAGS = $(JDK_THREADING_MODEL_OPT) + APPLETVIEWER_FLAGS += $(JDK_DEBUG_OPT) + APPLETVIEWER_FLAGS += $(JDK_JIT_OPT) + APPLETVIEWER = $(APPLETVIEWER_PROG) $(APPLETVIEWER_FLAGS) +endif + +# +# (2) jar +# + +ifeq ($(JAR),) + JAR_PROG = $(JAVA_HOME)/bin/jar$(PROG_SUFFIX) + JAR_FLAGS = $(JDK_THREADING_MODEL_OPT) + JAR = $(JAR_PROG) $(JAR_FLAGS) +endif + +# +# (3) java +# + +ifeq ($(JAVA),) + JAVA_PROG = $(JAVA_HOME)/bin/java$(PROG_SUFFIX) + JAVA_FLAGS = $(JDK_THREADING_MODEL_OPT) + JAVA_FLAGS += $(JDK_DEBUG_OPT) + JAVA_FLAGS += $(JDK_CLASSPATH_OPT) + JAVA_FLAGS += $(JDK_JIT_OPT) + JAVA_FLAGS += $(JDK_USE_64) + JAVA = $(JAVA_PROG) $(JAVA_FLAGS) +endif + +# +# (4) javac +# + +ifeq ($(JAVAC),) + JAVAC_PROG = $(JAVA_HOME)/bin/javac$(PROG_SUFFIX) + JAVAC_FLAGS = $(JDK_THREADING_MODEL_OPT) + JAVAC_FLAGS += $(JDK_OPTIMIZER_OPT) + JAVAC_FLAGS += $(JDK_DEBUG_OPT) + JAVAC_FLAGS += $(JDK_CLASSPATH_OPT) + JAVAC_FLAGS += $(JDK_CLASS_REPOSITORY_OPT) + JAVAC_FLAGS += $(JDK_USE_64) + JAVAC = $(JAVAC_PROG) $(JAVAC_FLAGS) +endif + +# +# (5) javadoc +# + +ifeq ($(JAVADOC),) + JAVADOC_PROG = $(JAVA_HOME)/bin/javadoc$(PROG_SUFFIX) + JAVADOC_FLAGS = $(JDK_THREADING_MODEL_OPT) + JAVADOC_FLAGS += $(JDK_CLASSPATH_OPT) + JAVADOC = $(JAVADOC_PROG) $(JAVADOC_FLAGS) +endif + +# +# (6) javah +# + +ifeq ($(JAVAH),) + JAVAH_PROG = $(JAVA_HOME)/bin/javah$(PROG_SUFFIX) + JAVAH_FLAGS = $(JDK_THREADING_MODEL_OPT) + JAVAH_FLAGS += $(JDK_CLASSPATH_OPT) + JAVAH = $(JAVAH_PROG) $(JAVAH_FLAGS) +endif + +# +# (7) javakey +# + +ifeq ($(JAVAKEY),) + JAVAKEY_PROG = $(JAVA_HOME)/bin/javakey$(PROG_SUFFIX) + JAVAKEY_FLAGS = $(JDK_THREADING_MODEL_OPT) + JAVAKEY = $(JAVAKEY_PROG) $(JAVAKEY_FLAGS) +endif + +# +# (8) javap +# + +ifeq ($(JAVAP),) + JAVAP_PROG = $(JAVA_HOME)/bin/javap$(PROG_SUFFIX) + JAVAP_FLAGS = $(JDK_THREADING_MODEL_OPT) + JAVAP_FLAGS += $(JDK_CLASSPATH_OPT) + JAVAP = $(JAVAP_PROG) $(JAVAP_FLAGS) +endif + +# +# (9) javat +# + +ifeq ($(JAVAT),) + JAVAT_PROG = $(JAVA_HOME)/bin/javat$(PROG_SUFFIX) + JAVAT_FLAGS = $(JDK_THREADING_MODEL_OPT) + JAVAT = $(JAVAT_PROG) $(JAVAT_FLAGS) +endif + +# +# (10) javaverify +# + +ifeq ($(JAVAVERIFY),) + JAVAVERIFY_PROG = $(JAVA_HOME)/bin/javaverify$(PROG_SUFFIX) + JAVAVERIFY_FLAGS = $(JDK_THREADING_MODEL_OPT) + JAVAVERIFY = $(JAVAVERIFY_PROG) $(JAVAVERIFY_FLAGS) +endif + +# +# (11) javaw +# + +ifeq ($(JAVAW),) + jJAVAW_PROG = $(JAVA_HOME)/bin/javaw$(PROG_SUFFIX) + jJAVAW_FLAGS = $(JDK_THREADING_MODEL_OPT) + jJAVAW_FLAGS += $(JDK_DEBUG_OPT) + jJAVAW_FLAGS += $(JDK_CLASSPATH_OPT) + jJAVAW_FLAGS += $(JDK_JIT_OPT) + jJAVAW = $(JAVAW_PROG) $(JAVAW_FLAGS) +endif + +# +# (12) jdb +# + +ifeq ($(JDB),) + JDB_PROG = $(JAVA_HOME)/bin/jdb$(PROG_SUFFIX) + JDB_FLAGS = $(JDK_THREADING_MODEL_OPT) + JDB_FLAGS += $(JDK_DEBUG_OPT) + JDB_FLAGS += $(JDK_CLASSPATH_OPT) + JDB_FLAGS += $(JDK_JIT_OPT) + JDB = $(JDB_PROG) $(JDB_FLAGS) +endif + +# +# (13) jre +# + +ifeq ($(JRE),) + JRE_PROG = $(JAVA_HOME)/bin/jre$(PROG_SUFFIX) + JRE_FLAGS = $(JDK_THREADING_MODEL_OPT) + JRE_FLAGS += $(JDK_CLASSPATH_OPT) + JRE_FLAGS += $(JDK_JIT_OPT) + JRE = $(JRE_PROG) $(JRE_FLAGS) +endif + +# +# (14) jrew +# + +ifeq ($(JREW),) + JREW_PROG = $(JAVA_HOME)/bin/jrew$(PROG_SUFFIX) + JREW_FLAGS = $(JDK_THREADING_MODEL_OPT) + JREW_FLAGS += $(JDK_CLASSPATH_OPT) + JREW_FLAGS += $(JDK_JIT_OPT) + JREW = $(JREW_PROG) $(JREW_FLAGS) +endif + +# +# (15) native2ascii +# + +ifeq ($(NATIVE2ASCII),) + NATIVE2ASCII_PROG = $(JAVA_HOME)/bin/native2ascii$(PROG_SUFFIX) + NATIVE2ASCII_FLAGS = $(JDK_THREADING_MODEL_OPT) + NATIVE2ASCII = $(NATIVE2ASCII_PROG) $(NATIVE2ASCII_FLAGS) +endif + +# +# (16) rmic +# + +ifeq ($(RMIC),) + RMIC_PROG = $(JAVA_HOME)/bin/rmic$(PROG_SUFFIX) + RMIC_FLAGS = $(JDK_THREADING_MODEL_OPT) + RMIC_FLAGS += $(JDK_OPTIMIZER_OPT) + RMIC_FLAGS += $(JDK_CLASSPATH_OPT) + RMIC = $(RMIC_PROG) $(RMIC_FLAGS) +endif + +# +# (17) rmiregistry +# + +ifeq ($(RMIREGISTRY),) + RMIREGISTRY_PROG = $(JAVA_HOME)/bin/rmiregistry$(PROG_SUFFIX) + RMIREGISTRY_FLAGS = $(JDK_THREADING_MODEL_OPT) + RMIREGISTRY = $(RMIREGISTRY_PROG) $(RMIREGISTRY_FLAGS) +endif + +# +# (18) serialver +# + +ifeq ($(SERIALVER),) + SERIALVER_PROG = $(JAVA_HOME)/bin/serialver$(PROG_SUFFIX) + SERIALVER_FLAGS = $(JDK_THREADING_MODEL_OPT) + SERIALVER = $(SERIALVER_PROG) $(SERIALVER_FLAGS) +endif diff --git a/security/coreconf/jniregen.pl b/security/coreconf/jniregen.pl new file mode 100755 index 000000000..8bdd24448 --- /dev/null +++ b/security/coreconf/jniregen.pl @@ -0,0 +1,107 @@ +#!/usr/local/bin/perl +# +# The contents of this file are subject to the Mozilla Public +# License Version 1.1 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy of +# the License at http://www.mozilla.org/MPL/ +# +# Software distributed under the License is distributed on an "AS +# IS" basis, WITHOUT WARRANTY OF ANY KIND, 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 Netscape are +# Copyright (C) 1994-2000 Netscape Communications Corporation. All +# Rights Reserved. +# +# Contributor(s): +# +# Alternatively, the contents of this file may be used under the +# terms of the GNU General Public License Version 2 or later (the +# "GPL"), in which case the provisions of the GPL are applicable +# instead of those above. If you wish to allow use of your +# version of this file only under the terms of the GPL and not to +# allow others to use your version of this file under the MPL, +# indicate your decision by deleting the provisions above and +# replace them with the notice and other provisions required by +# the GPL. If you do not delete the provisions above, a recipient +# may use your version of this file under either the MPL or the +# GPL. +# + +# Input: -d dir -j javahcmd foo1 foo2 . . . +# Compares generated "_jni/foo1.h" file with "foo1.class", and +# generated "_jni/foo2.h" file with "foo2.class", etc. +# (NOTE: unlike its closely related cousin, outofdate.pl, +# the "-d dir" must always be specified) +# Runs the javahcmd on all files that are different. +# +# Returns: list of headers which are OLDER than corresponding class +# files (non-existant class files are considered to be real old :-) + +my $javah = ""; +my $classdir = ""; + +while(1) { + if ($ARGV[0] eq '-d') { + $classdir = $ARGV[1]; + $classdir .= "/"; + shift; + shift; + } elsif($ARGV[0] eq '-j') { + $javah = $ARGV[1]; + shift; + shift; + } else { + last; + } +} + +if( $javah eq "") { + die "Must specify -j <javah command>"; +} +if( $classdir eq "") { + die "Must specify -d <classdir>"; +} + +foreach $filename (@ARGV) +{ + $headerfilename = "_jni/"; + $headerfilename .= $filename; + $headerfilename =~ s/\./_/g; + $headerfilename .= ".h"; + + $classfilename = $filename; + $classfilename =~ s|\.|/|g; + $classfilename .= ".class"; + + $classfilename = $classdir . $classfilename; + + + ( $dev, $ino, $mode, $nlink, $uid, $gid, $rdev, $size, $atime, $headermtime, + $ctime, $blksize, $blocks ) = stat( $headerfilename ); + + ( $dev, $ino, $mode, $nlink, $uid, $gid, $rdev, $size, $atime, $classmtime, + $ctime, $blksize, $blocks ) = stat( $classfilename ); + + if( $headermtime < $classmtime ) + { + # NOTE: Since this is used by "javah", and "javah" refuses to overwrite + # an existing file, we force an unlink from this script, since + # we actually want to regenerate the header file at this time. + unlink $headerfilename; + push @filelist, $filename; + } +} + +if( @filelist ) { + $cmd = "$javah " . join(" ",@filelist); + $cmd =~ s/\'/\"/g; # because windows doesn't understand single quote + print "$cmd\n"; + exit (system($cmd) >> 8); +} else { + print "All JNI header files up to date.\n" +} diff --git a/security/coreconf/location.mk b/security/coreconf/location.mk new file mode 100644 index 000000000..060bb47ee --- /dev/null +++ b/security/coreconf/location.mk @@ -0,0 +1,66 @@ +# +# The contents of this file are subject to the Mozilla Public +# License Version 1.1 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy of +# the License at http://www.mozilla.org/MPL/ +# +# Software distributed under the License is distributed on an "AS +# IS" basis, WITHOUT WARRANTY OF ANY KIND, 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 Netscape are +# Copyright (C) 1994-2000 Netscape Communications Corporation. All +# Rights Reserved. +# +# Contributor(s): +# +# Alternatively, the contents of this file may be used under the +# terms of the GNU General Public License Version 2 or later (the +# "GPL"), in which case the provisions of the GPL are applicable +# instead of those above. If you wish to allow use of your +# version of this file only under the terms of the GPL and not to +# allow others to use your version of this file under the MPL, +# indicate your decision by deleting the provisions above and +# replace them with the notice and other provisions required by +# the GPL. If you do not delete the provisions above, a recipient +# may use your version of this file under either the MPL or the +# GPL. +# + +####################################################################### +# Master "Core Components" macros to figure out binary code location # +####################################################################### + +# +# Figure out where the binary code lives. +# + +ifdef BUILD_TREE +ifdef LIBRARY_NAME +BUILD = $(BUILD_TREE)/nss/$(LIBRARY_NAME) +OBJDIR = $(BUILD_TREE)/nss/$(LIBRARY_NAME) +DEPENDENCIES = $(BUILD_TREE)/nss/$(LIBRARY_NAME)/.md +else +BUILD = $(BUILD_TREE)/nss +OBJDIR = $(BUILD_TREE)/nss +DEPENDENCIES = $(BUILD_TREE)/nss/.md +endif +else +BUILD = $(PLATFORM) +OBJDIR = $(PLATFORM) +DEPENDENCIES = $(PLATFORM)/.md +endif + +DIST = $(SOURCE_PREFIX)/$(PLATFORM) + +ifdef BUILD_DEBUG_GC + DEFINES += -DDEBUG_GC +endif + +GARBAGE += $(DEPENDENCIES) core $(wildcard core.[0-9]*) + +MK_LOCATION = included diff --git a/security/coreconf/makefile.win b/security/coreconf/makefile.win new file mode 100644 index 000000000..c3abce76b --- /dev/null +++ b/security/coreconf/makefile.win @@ -0,0 +1,100 @@ +# +# The contents of this file are subject to the Mozilla Public +# License Version 1.1 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy of +# the License at http://www.mozilla.org/MPL/ +# +# Software distributed under the License is distributed on an "AS +# IS" basis, WITHOUT WARRANTY OF ANY KIND, 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 Netscape are +# Copyright (C) 1994-2000 Netscape Communications Corporation. All +# Rights Reserved. +# +# Contributor(s): +# +# Alternatively, the contents of this file may be used under the +# terms of the GNU General Public License Version 2 or later (the +# "GPL"), in which case the provisions of the GPL are applicable +# instead of those above. If you wish to allow use of your +# version of this file only under the terms of the GPL and not to +# allow others to use your version of this file under the MPL, +# indicate your decision by deleting the provisions above and +# replace them with the notice and other provisions required by +# the GPL. If you do not delete the provisions above, a recipient +# may use your version of this file under either the MPL or the +# GPL. +# + +# +# An NMAKE file to set up and adjust coreconf's build system for +# Client build. Client build should invoke NMAKE on this file +# instead of invoking gmake directly. +# + +NS_DEPTH = .. +include <$(NS_DEPTH)\config\config.mak> +#include <$(NS_DEPTH)\config\rules.mak> + +# +# Backslashes are escape characters to gmake, so flip all backslashes +# in $(MOZ_TOOLS) to forward slashes and pass that to gmake. +# + +GMAKE = $(MOZ_TOOLS)\bin\gmake.exe MOZ_TOOLS_FLIPPED=$(MOZ_TOOLS:\=/) + +GMAKE = $(GMAKE) PR_CLIENT_BUILD=1 PR_CLIENT_BUILD_WINDOWS=1 + +# +# The Client's debug build uses MSVC's debug runtime library (/MDd). +# + +!ifdef MOZ_DEBUG +GMAKE = $(GMAKE) USE_DEBUG_RTL=1 +!else +GMAKE = $(GMAKE) BUILD_OPT=1 +!endif + +!if "$(MOZ_BITS)" == "16" +GMAKE = $(GMAKE) OS_TARGET=WIN16 +!else + +GMAKE = $(GMAKE) OS_TARGET=WIN95 +!ifdef MOZ_DEBUG +PR_OBJDIR = WIN954.0_DBG.OBJD +!else +PR_OBJDIR = WIN954.0_OPT.OBJ +!endif + +!endif + +# +# The rules. Simply invoke gmake with the same target +# for Win16, use the watcom compiler with the MSVC headers and libs +# + +# this rule is needed so that nmake with no explicit target will only build +# all, and not build all the targets named below in succession! +default:: all + +# a rule like this one must only be used for explicitly named targets! +all depend export libs install clobber clobber_all clean:: +!if "$(MOZ_BITS)" == "16" + set PATH=%WATCPATH% + set INCLUDE=%MSVC_INC% + set LIB=%MSVC_LIB% +!endif + $(GMAKE) $@ +!if "$(MOZ_BITS)" == "16" + set PATH=%MSVCPATH% + set INCLUDE=%MSVC_INC% + set LIB=%MSVC_LIB% +!endif + +show: + @echo "MAKEFLAGS = $(MAKEFLAGS)" diff --git a/security/coreconf/module.mk b/security/coreconf/module.mk new file mode 100644 index 000000000..6a9d49f59 --- /dev/null +++ b/security/coreconf/module.mk @@ -0,0 +1,65 @@ +# +# The contents of this file are subject to the Mozilla Public +# License Version 1.1 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy of +# the License at http://www.mozilla.org/MPL/ +# +# Software distributed under the License is distributed on an "AS +# IS" basis, WITHOUT WARRANTY OF ANY KIND, 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 Netscape are +# Copyright (C) 1994-2000 Netscape Communications Corporation. All +# Rights Reserved. +# +# Contributor(s): +# +# Alternatively, the contents of this file may be used under the +# terms of the GNU General Public License Version 2 or later (the +# "GPL"), in which case the provisions of the GPL are applicable +# instead of those above. If you wish to allow use of your +# version of this file only under the terms of the GPL and not to +# allow others to use your version of this file under the MPL, +# indicate your decision by deleting the provisions above and +# replace them with the notice and other provisions required by +# the GPL. If you do not delete the provisions above, a recipient +# may use your version of this file under either the MPL or the +# GPL. +# + +####################################################################### +# The master "Core Components" source and release component directory # +# names are ALWAYS identical and are the value of $(MODULE). # +# NOTE: A component is also called a module or a subsystem. # +####################################################################### + +# +# All "Core Components" <component>-specific source-side tags must +# always be identified for compiling/linking purposes +# + +ifndef JAVA_SOURCE_COMPONENT + JAVA_SOURCE_COMPONENT = java +endif + +ifndef NETLIB_SOURCE_COMPONENT + NETLIB_SOURCE_COMPONENT = netlib +endif + +ifndef NSPR_SOURCE_COMPONENT + NSPR_SOURCE_COMPONENT = nspr20 +endif + +ifndef SECTOOLS_SOURCE_COMPONENT + SECTOOLS_SOURCE_COMPONENT = sectools +endif + +ifndef SECURITY_SOURCE_COMPONENT + SECURITY_SOURCE_COMPONENT = security +endif + +MK_MODULE = included diff --git a/security/coreconf/nsinstall/Makefile b/security/coreconf/nsinstall/Makefile new file mode 100644 index 000000000..625d4bc77 --- /dev/null +++ b/security/coreconf/nsinstall/Makefile @@ -0,0 +1,68 @@ +# +# The contents of this file are subject to the Mozilla Public +# License Version 1.1 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy of +# the License at http://www.mozilla.org/MPL/ +# +# Software distributed under the License is distributed on an "AS +# IS" basis, WITHOUT WARRANTY OF ANY KIND, 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 Netscape are +# Copyright (C) 1994-2000 Netscape Communications Corporation. All +# Rights Reserved. +# +# Contributor(s): +# +# Alternatively, the contents of this file may be used under the +# terms of the GNU General Public License Version 2 or later (the +# "GPL"), in which case the provisions of the GPL are applicable +# instead of those above. If you wish to allow use of your +# version of this file only under the terms of the GPL and not to +# allow others to use your version of this file under the MPL, +# indicate your decision by deleting the provisions above and +# replace them with the notice and other provisions required by +# the GPL. If you do not delete the provisions above, a recipient +# may use your version of this file under either the MPL or the +# GPL. +# + +DEPTH = ../.. +CORE_DEPTH = ../.. + +MODULE = coreconf + +CSRCS = nsinstall.c pathsub.c + +PLSRCS = nfspwd.pl + +PROGRAM = nsinstall + + +include $(DEPTH)/coreconf/config.mk + +ifeq (,$(filter-out OS2 WIN%,$(OS_TARGET))) +PROGRAM = +else +TARGETS = $(PROGRAM) $(PLSRCS:.pl=) +endif + +ifdef NATIVE_CC +CC=$(NATIVE_CC) +endif + +ifdef NATIVE_FLAGS +OS_CFLAGS=$(NATIVE_FLAGS) +endif + +include $(DEPTH)/coreconf/rules.mk + +# Redefine MAKE_OBJDIR for just this directory +define MAKE_OBJDIR +if test ! -d $(@D); then rm -rf $(@D); mkdir $(@D); fi +endef + diff --git a/security/coreconf/nsinstall/nfspwd b/security/coreconf/nsinstall/nfspwd new file mode 100755 index 000000000..339abead3 --- /dev/null +++ b/security/coreconf/nsinstall/nfspwd @@ -0,0 +1,46 @@ +#! perl +# +# The contents of this file are subject to the Mozilla Public +# License Version 1.1 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy of +# the License at http://www.mozilla.org/MPL/ +# +# Software distributed under the License is distributed on an "AS +# IS" basis, WITHOUT WARRANTY OF ANY KIND, 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 Netscape are +# Copyright (C) 1994-2000 Netscape Communications Corporation. All +# Rights Reserved. +# +# Contributor(s): +# +# Alternatively, the contents of this file may be used under the +# terms of the GNU General Public License Version 2 or later (the +# "GPL"), in which case the provisions of the GPL are applicable +# instead of those above. If you wish to allow use of your +# version of this file only under the terms of the GPL and not to +# allow others to use your version of this file under the MPL, +# indicate your decision by deleting the provisions above and +# replace them with the notice and other provisions required by +# the GPL. If you do not delete the provisions above, a recipient +# may use your version of this file under either the MPL or the +# GPL. +# + +require "fastcwd.pl"; + +$_ = &fastcwd; +if (m@^/[uh]/@o || s@^/tmp_mnt/@/@o) { + print("$_\n"); +} elsif ((($user, $rest) = m@^/usr/people/(\w+)/(.*)@o) + && readlink("/u/$user") eq "/usr/people/$user") { + print("/u/$user/$rest\n"); +} else { + chop($host = `hostname`); + print("/h/$host$_\n"); +} diff --git a/security/coreconf/nsinstall/nfspwd.pl b/security/coreconf/nsinstall/nfspwd.pl new file mode 100644 index 000000000..339abead3 --- /dev/null +++ b/security/coreconf/nsinstall/nfspwd.pl @@ -0,0 +1,46 @@ +#! perl +# +# The contents of this file are subject to the Mozilla Public +# License Version 1.1 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy of +# the License at http://www.mozilla.org/MPL/ +# +# Software distributed under the License is distributed on an "AS +# IS" basis, WITHOUT WARRANTY OF ANY KIND, 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 Netscape are +# Copyright (C) 1994-2000 Netscape Communications Corporation. All +# Rights Reserved. +# +# Contributor(s): +# +# Alternatively, the contents of this file may be used under the +# terms of the GNU General Public License Version 2 or later (the +# "GPL"), in which case the provisions of the GPL are applicable +# instead of those above. If you wish to allow use of your +# version of this file only under the terms of the GPL and not to +# allow others to use your version of this file under the MPL, +# indicate your decision by deleting the provisions above and +# replace them with the notice and other provisions required by +# the GPL. If you do not delete the provisions above, a recipient +# may use your version of this file under either the MPL or the +# GPL. +# + +require "fastcwd.pl"; + +$_ = &fastcwd; +if (m@^/[uh]/@o || s@^/tmp_mnt/@/@o) { + print("$_\n"); +} elsif ((($user, $rest) = m@^/usr/people/(\w+)/(.*)@o) + && readlink("/u/$user") eq "/usr/people/$user") { + print("/u/$user/$rest\n"); +} else { + chop($host = `hostname`); + print("/h/$host$_\n"); +} diff --git a/security/coreconf/nsinstall/nsinstall.c b/security/coreconf/nsinstall/nsinstall.c new file mode 100644 index 000000000..0c9915926 --- /dev/null +++ b/security/coreconf/nsinstall/nsinstall.c @@ -0,0 +1,434 @@ +/* + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS + * IS" basis, WITHOUT WARRANTY OF ANY KIND, 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 Netscape are + * Copyright (C) 1994-2000 Netscape Communications Corporation. All + * Rights Reserved. + * + * Contributor(s): + * + * Alternatively, the contents of this file may be used under the + * terms of the GNU General Public License Version 2 or later (the + * "GPL"), in which case the provisions of the GPL are applicable + * instead of those above. If you wish to allow use of your + * version of this file only under the terms of the GPL and not to + * allow others to use your version of this file under the MPL, + * indicate your decision by deleting the provisions above and + * replace them with the notice and other provisions required by + * the GPL. If you do not delete the provisions above, a recipient + * may use your version of this file under either the MPL or the + * GPL. + */ + +/* +** Netscape portable install command. +*/ +#include <stdio.h> /* OSF/1 requires this before grp.h, so put it first */ +#include <assert.h> +#include <fcntl.h> +#include <string.h> +#if defined(_WINDOWS) +#include <windows.h> +typedef unsigned int mode_t; +#else +#include <grp.h> +#include <pwd.h> +#include <errno.h> +#include <stdlib.h> +#include <unistd.h> +#include <utime.h> +#endif +#include <sys/types.h> +#include <sys/stat.h> +#include "pathsub.h" + +#define HAVE_LCHOWN + +#if defined(AIX) || defined(BSDI) || defined(HPUX) || defined(LINUX) || defined(SUNOS4) || defined(SCO) || defined(UNIXWARE) || defined(VMS) || defined(NTO) || defined(DARWIN) || defined(BEOS) +#undef HAVE_LCHOWN +#endif + +#define HAVE_FCHMOD + +#if defined(BEOS) +#undef HAVE_FCHMOD +#endif + +#ifdef LINUX +#include <getopt.h> +#endif + +#if defined(SCO) || defined(UNIXWARE) || defined(SNI) || defined(NCR) || defined(NEC) +#if !defined(S_ISLNK) && defined(S_IFLNK) +#define S_ISLNK(a) (((a) & S_IFMT) == S_IFLNK) +#endif +#endif + +#if defined(SNI) +extern int fchmod(int fildes, mode_t mode); +#endif + + +#ifdef GETCWD_CANT_MALLOC +/* + * this should probably go into a utility library in case other applications + * need it. + */ +static char * +getcwd_do_malloc(char *path, int len) { + + if (!path) { + path = malloc(PATH_MAX +1); + if (!path) return NULL; + } + return getcwd(path, PATH_MAX); +} +#define GETCWD getcwd_do_malloc +#else +#define GETCWD getcwd +#endif + + +static void +usage(void) +{ + fprintf(stderr, + "usage: %s [-C cwd] [-L linkprefix] [-m mode] [-o owner] [-g group]\n" + " %*s [-DdltR] file [file ...] directory\n", + program, (int)strlen(program), ""); + exit(2); +} + +/* this is more-or-less equivalent to mkdir -p */ +static int +mkdirs(char *path, mode_t mode) +{ + char * cp; + int rv; + struct stat sb; + + if (!path || !path[0]) + fail("Null pointer or empty string passed to mkdirs()"); + while (*path == '/' && path[1] == '/') + path++; + while ((cp = strrchr(path, '/')) && cp[1] == '\0') + *cp = '\0'; + if (cp && cp != path) { + *cp = '\0'; + if ((stat(path, &sb) < 0 || !S_ISDIR(sb.st_mode)) && + mkdirs(path, mode) < 0) { + return -1; + } + *cp = '/'; + } + rv = mkdir(path, mode); + if (rv) { + if (errno != EEXIST) + fail("mkdirs cannot make %s", path); + fprintf(stderr, "directory creation race: %s\n", path); + if (!stat(path, &sb) && S_ISDIR(sb.st_mode)) + rv = 0; + } + return rv; +} + +static uid_t +touid(char *owner) +{ + struct passwd *pw; + uid_t uid; + char *cp; + + if (!owner || !owner[0]) + fail("Null pointer or empty string passed to touid()"); + pw = getpwnam(owner); + if (pw) + return pw->pw_uid; + uid = strtol(owner, &cp, 0); + if (uid == 0 && cp == owner) + fail("cannot find uid for %s", owner); + return uid; +} + +static gid_t +togid(char *group) +{ + struct group *gr; + gid_t gid; + char *cp; + + if (!group || !group[0]) + fail("Null pointer or empty string passed to togid()"); + gr = getgrnam(group); + if (gr) + return gr->gr_gid; + gid = strtol(group, &cp, 0); + if (gid == 0 && cp == group) + fail("cannot find gid for %s", group); + return gid; +} + +void * const uninit = (void *)0xdeadbeef; + +int +main(int argc, char **argv) +{ + char * base = uninit; + char * bp = uninit; + char * cp = uninit; + char * cwd = 0; + char * group = 0; + char * linkname = 0; + char * linkprefix = 0; + char * name = uninit; + char * owner = 0; + char * todir = uninit; + char * toname = uninit; + + int bnlen = -1; + int cc = 0; + int dodir = 0; + int dolink = 0; + int dorelsymlink = 0; + int dotimes = 0; + int exists = 0; + int fromfd = -1; + int len = -1; + int lplen = 0; + int onlydir = 0; + int opt = -1; + int tdlen = -1; + int tofd = -1; + int wc = -1; + + mode_t mode = 0755; + + uid_t uid = -1; + gid_t gid = -1; + + struct stat sb; + struct stat tosb; + struct utimbuf utb; + char buf[BUFSIZ]; + + program = strrchr(argv[0], '/'); + if (!program) + program = strrchr(argv[0], '\\'); + program = program ? program+1 : argv[0]; + + + while ((opt = getopt(argc, argv, "C:DdlL:Rm:o:g:t")) != EOF) { + switch (opt) { + case 'C': cwd = optarg; break; + case 'D': onlydir = 1; break; + case 'd': dodir = 1; break; + case 'l': dolink = 1; break; + case 'L': + linkprefix = optarg; + lplen = strlen(linkprefix); + dolink = 1; + break; + case 'R': dolink = dorelsymlink = 1; break; + case 'm': + mode = strtoul(optarg, &cp, 8); + if (mode == 0 && cp == optarg) + usage(); + break; + case 'o': owner = optarg; break; + case 'g': group = optarg; break; + case 't': dotimes = 1; break; + default: usage(); + } + } + + argc -= optind; + argv += optind; + if (argc < 2 - onlydir) + usage(); + + todir = argv[argc-1]; + if ((stat(todir, &sb) < 0 || !S_ISDIR(sb.st_mode)) && + mkdirs(todir, 0777) < 0) { + fail("cannot mkdir -p %s", todir); + } + if (onlydir) + return 0; + + if (!cwd) { + cwd = GETCWD(0, PATH_MAX); + if (!cwd) + fail("could not get CWD"); + } + + /* make sure we can get into todir. */ + xchdir(todir); + todir = GETCWD(0, PATH_MAX); + if (!todir) + fail("could not get CWD in todir"); + tdlen = strlen(todir); + + /* back to original directory. */ + xchdir(cwd); + + uid = owner ? touid(owner) : -1; + gid = group ? togid(group) : -1; + + while (--argc > 0) { + name = *argv++; + len = strlen(name); + base = xbasename(name); + bnlen = strlen(base); + toname = (char*)xmalloc(tdlen + 1 + bnlen + 1); + sprintf(toname, "%s/%s", todir, base); +retry: + exists = (lstat(toname, &tosb) == 0); + + if (dodir) { + /* -d means create a directory, always */ + if (exists && !S_ISDIR(tosb.st_mode)) { + int rv = unlink(toname); + if (rv) + fail("cannot unlink %s", toname); + exists = 0; + } + if (!exists && mkdir(toname, mode) < 0) { + /* we probably have two nsinstall programs in a race here. */ + if (errno == EEXIST && !stat(toname, &sb) && + S_ISDIR(sb.st_mode)) { + fprintf(stderr, "directory creation race: %s\n", toname); + goto retry; + } + fail("cannot make directory %s", toname); + } + if ((owner || group) && chown(toname, uid, gid) < 0) + fail("cannot change owner of %s", toname); + } else if (dolink) { + if (*name == '/') { + /* source is absolute pathname, link to it directly */ + linkname = 0; + } else { + if (linkprefix) { + /* -L implies -l and prefixes names with a $cwd arg. */ + len += lplen + 1; + linkname = (char*)xmalloc(len + 1); + sprintf(linkname, "%s/%s", linkprefix, name); + } else if (dorelsymlink) { + /* Symlink the relative path from todir to source name. */ + linkname = (char*)xmalloc(PATH_MAX); + + if (*todir == '/') { + /* todir is absolute: skip over common prefix. */ + lplen = relatepaths(todir, cwd, linkname); + strcpy(linkname + lplen, name); + } else { + /* todir is named by a relative path: reverse it. */ + reversepath(todir, name, len, linkname); + xchdir(cwd); + } + + len = strlen(linkname); + } + name = linkname; + } + + /* Check for a pre-existing symlink with identical content. */ + if (exists && + (!S_ISLNK(tosb.st_mode) || + readlink(toname, buf, sizeof buf) != len || + strncmp(buf, name, len) != 0)) { + int rmrv; + rmrv = (S_ISDIR(tosb.st_mode) ? rmdir : unlink)(toname); + if (rmrv < 0) { + fail("destination exists, cannot remove %s", toname); + } + exists = 0; + } + if (!exists && symlink(name, toname) < 0) { + if (errno == EEXIST) { + fprintf(stderr, "symlink creation race: %s\n", toname); + goto retry; + } + diagnosePath(toname); + fail("cannot make symbolic link %s", toname); + } +#ifdef HAVE_LCHOWN + if ((owner || group) && lchown(toname, uid, gid) < 0) + fail("cannot change owner of %s", toname); +#endif + + if (linkname) { + free(linkname); + linkname = 0; + } + } else { + /* Copy from name to toname, which might be the same file. */ + fromfd = open(name, O_RDONLY); + if (fromfd < 0 || fstat(fromfd, &sb) < 0) + fail("cannot access %s", name); + if (exists && + (!S_ISREG(tosb.st_mode) || access(toname, W_OK) < 0)) { + int rmrv; + rmrv = (S_ISDIR(tosb.st_mode) ? rmdir : unlink)(toname); + if (rmrv < 0) { + fail("destination exists, cannot remove %s", toname); + } + } + tofd = open(toname, O_CREAT | O_WRONLY, 0666); + if (tofd < 0) + fail("cannot create %s", toname); + + bp = buf; + while ((cc = read(fromfd, bp, sizeof buf)) > 0) { + while ((wc = write(tofd, bp, cc)) > 0) { + if ((cc -= wc) == 0) + break; + bp += wc; + } + if (wc < 0) + fail("cannot write to %s", toname); + } + if (cc < 0) + fail("cannot read from %s", name); + + if (ftruncate(tofd, sb.st_size) < 0) + fail("cannot truncate %s", toname); + if (dotimes) { + utb.actime = sb.st_atime; + utb.modtime = sb.st_mtime; + if (utime(toname, &utb) < 0) + fail("cannot set times of %s", toname); + } +#ifdef HAVE_FCHMOD + if (fchmod(tofd, mode) < 0) +#else + if (chmod(toname, mode) < 0) +#endif + fail("cannot change mode of %s", toname); + if ((owner || group) && fchown(tofd, uid, gid) < 0) + fail("cannot change owner of %s", toname); + + /* Must check for delayed (NFS) write errors on close. */ + if (close(tofd) < 0) + fail("close reports write error on %s", toname); + close(fromfd); + } + + free(toname); + } + + free(cwd); + free(todir); + return 0; +} + diff --git a/security/coreconf/nsinstall/pathsub.c b/security/coreconf/nsinstall/pathsub.c new file mode 100644 index 000000000..9266b48c7 --- /dev/null +++ b/security/coreconf/nsinstall/pathsub.c @@ -0,0 +1,303 @@ +/* + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS + * IS" basis, WITHOUT WARRANTY OF ANY KIND, 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 Netscape are + * Copyright (C) 1994-2000 Netscape Communications Corporation. All + * Rights Reserved. + * + * Contributor(s): + * + * Alternatively, the contents of this file may be used under the + * terms of the GNU General Public License Version 2 or later (the + * "GPL"), in which case the provisions of the GPL are applicable + * instead of those above. If you wish to allow use of your + * version of this file only under the terms of the GPL and not to + * allow others to use your version of this file under the MPL, + * indicate your decision by deleting the provisions above and + * replace them with the notice and other provisions required by + * the GPL. If you do not delete the provisions above, a recipient + * may use your version of this file under either the MPL or the + * GPL. + */ + +/* +** Pathname subroutines. +*/ +#include <assert.h> +#if defined(FREEBSD) || defined(BSDI) || defined(DARWIN) +#include <sys/types.h> +#endif /* FREEBSD */ +#include <dirent.h> +#include <errno.h> +#include <stdarg.h> +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#include <unistd.h> +#include <sys/types.h> +#include <sys/stat.h> +#include "pathsub.h" +#ifdef USE_REENTRANT_LIBC +#include "libc_r.h" +#endif /* USE_REENTRANT_LIBC */ + +char *program; + +void +fail(char *format, ...) +{ + int error; + va_list ap; + +#ifdef USE_REENTRANT_LIBC + R_STRERROR_INIT_R(); +#endif + + error = errno; + fprintf(stderr, "%s: ", program); + va_start(ap, format); + vfprintf(stderr, format, ap); + va_end(ap); + if (error) { + +#ifdef USE_REENTRANT_LIBC + R_STRERROR_R(errno); + fprintf(stderr, ": %s", r_strerror_r); +#else + fprintf(stderr, ": %s", strerror(errno)); +#endif + } + + putc('\n', stderr); + abort(); + exit(1); +} + +char * +getcomponent(char *path, char *name) +{ + if (*path == '\0') + return 0; + if (*path == '/') { + *name++ = '/'; + } else { + do { + *name++ = *path++; + } while (*path != '/' && *path != '\0'); + } + *name = '\0'; + while (*path == '/') + path++; + return path; +} + +#ifdef UNIXWARE +/* The static buffer in Unixware's readdir is too small. */ +struct dirent * readdir(DIR *d) +{ + static struct dirent *buf = NULL; +#define MAX_PATH_LEN 1024 + + if (buf == NULL) + buf = (struct dirent *)xmalloc(sizeof(struct dirent) + MAX_PATH_LEN) ; + return readdir_r(d, buf); +} +#endif + +/* APPARENT BUG - ignores argument "dir", uses ".." instead. */ +char * +ino2name(ino_t ino, char *dir) +{ + DIR *dp; + struct dirent *ep; + char *name; + + dp = opendir(".."); /* XXX */ + if (!dp) + fail("cannot read parent directory"); + for (;;) { + if (!(ep = readdir(dp))) + fail("cannot find current directory"); + if (ep->d_ino == ino) + break; + } + name = xstrdup(ep->d_name); + closedir(dp); + return name; +} + +void * +xmalloc(size_t size) +{ + void *p; + + if (size <= 0) + fail("attempted to allocate %u bytes", size); + p = malloc(size); + if (!p) + fail("cannot allocate %u bytes", size); + return p; +} + +char * +xstrdup(char *s) +{ + if (!s || !s[0]) + fail("Null pointer or empty string passed to xstrdup()"); + return strcpy((char*)xmalloc(strlen(s) + 1), s); +} + +char * +xbasename(char *path) +{ + char *cp; + + if (!path || !path[0]) + fail("Null pointer or empty string passed to xbasename()"); + while ((cp = strrchr(path, '/')) && cp[1] == '\0') + *cp = '\0'; + if (!cp) return path; + return cp + 1; +} + +void +xchdir(char *dir) +{ + if (!dir || !dir[0]) + fail("Null pointer or empty string passed to xchdir()"); + if (chdir(dir) < 0) + fail("cannot change directory to %s", dir); +} + +int +relatepaths(char *from, char *to, char *outpath) +{ + char *cp, *cp2; + int len; + char buf[NAME_MAX]; + + assert(*from == '/' && *to == '/'); + if (!from || *from != '/') + fail("relatepaths: from path does not start with /"); + if (!to || *to != '/') + fail("relatepaths: to path does not start with /"); + + for (cp = to, cp2 = from; *cp == *cp2; cp++, cp2++) + if (*cp == '\0') + break; + while (cp[-1] != '/') + cp--, cp2--; + if (cp - 1 == to) { + /* closest common ancestor is /, so use full pathname */ + len = strlen(strcpy(outpath, to)); + if (outpath[len] != '/') { + outpath[len++] = '/'; + outpath[len] = '\0'; + } + } else { + len = 0; + while ((cp2 = getcomponent(cp2, buf)) != 0) { + strcpy(outpath + len, "../"); + len += 3; + } + while ((cp = getcomponent(cp, buf)) != 0) { + sprintf(outpath + len, "%s/", buf); + len += strlen(outpath + len); + } + } + return len; +} + +void +reversepath(char *inpath, char *name, int len, char *outpath) +{ + char *cp, *cp2; + char buf[NAME_MAX]; + struct stat sb; + + cp = strcpy(outpath + PATH_MAX - (len + 1), name); + cp2 = inpath; + while ((cp2 = getcomponent(cp2, buf)) != 0) { + if (strcmp(buf, ".") == 0) + continue; + if (strcmp(buf, "..") == 0) { + if (stat(".", &sb) < 0) + fail("cannot stat current directory"); + name = ino2name(sb.st_ino, ".."); + len = strlen(name); + cp -= len + 1; + strcpy(cp, name); + cp[len] = '/'; + free(name); + xchdir(".."); + } else { + cp -= 3; + strncpy(cp, "../", 3); + xchdir(buf); + } + } + strcpy(outpath, cp); +} + +void +diagnosePath(const char * path) +{ + char * myPath; + char * slash; + int rv; + struct stat sb; + char buf[BUFSIZ]; + + if (!path || !path[0]) + fail("Null pointer or empty string passed to mkdirs()"); + myPath = strdup(path); + if (!myPath) + fail("strdup() failed!"); + do { + rv = lstat(myPath, &sb); + if (rv < 0) { + perror(myPath); + } else if (S_ISLNK(sb.st_mode)) { + rv = readlink(myPath, buf, sizeof buf); + if (rv < 0) { + perror("readlink"); + buf[0] = 0; + } else { + buf[rv] = 0; + } + fprintf(stderr, "%s is a link to %s\n", myPath, buf); + } else if (S_ISDIR(sb.st_mode)) { + fprintf(stderr, "%s is a directory\n", myPath); + rv = access(myPath, X_OK); + if (rv < 0) { + fprintf(stderr, "%s: no search permission\n", myPath); + } + } else { + fprintf(stderr, "%s is a file !?!\n", myPath); + rv = access(myPath, F_OK); + if (rv < 0) { + fprintf(stderr, "%s does not exist\n", myPath); + } + } + + /* chop path off one level. */ + slash = strrchr(myPath, '/'); + if (!slash) + slash = strrchr(myPath, '\\'); + if (!slash) + slash = myPath; + *slash = 0; + } while (myPath[0]); + free(myPath); +} diff --git a/security/coreconf/nsinstall/pathsub.h b/security/coreconf/nsinstall/pathsub.h new file mode 100644 index 000000000..718c2206f --- /dev/null +++ b/security/coreconf/nsinstall/pathsub.h @@ -0,0 +1,77 @@ +/* + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS + * IS" basis, WITHOUT WARRANTY OF ANY KIND, 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 Netscape are + * Copyright (C) 1994-2000 Netscape Communications Corporation. All + * Rights Reserved. + * + * Contributor(s): + * + * Alternatively, the contents of this file may be used under the + * terms of the GNU General Public License Version 2 or later (the + * "GPL"), in which case the provisions of the GPL are applicable + * instead of those above. If you wish to allow use of your + * version of this file only under the terms of the GPL and not to + * allow others to use your version of this file under the MPL, + * indicate your decision by deleting the provisions above and + * replace them with the notice and other provisions required by + * the GPL. If you do not delete the provisions above, a recipient + * may use your version of this file under either the MPL or the + * GPL. + */ + +#ifndef pathsub_h___ +#define pathsub_h___ +/* +** Pathname subroutines. +** +** Brendan Eich, 8/29/95 +*/ +#include <limits.h> +#include <sys/types.h> + +#if SUNOS4 +#include "sunos4.h" +#endif + +#ifndef PATH_MAX +#define PATH_MAX 1024 +#endif + +/* + * Just keep sane lengths + */ +#undef NAME_MAX +#define NAME_MAX 256 + +extern char *program; + +extern void fail(char *format, ...); +extern char *getcomponent(char *path, char *name); +extern char *ino2name(ino_t ino, char *dir); +extern void *xmalloc(size_t size); +extern char *xstrdup(char *s); +extern char *xbasename(char *path); +extern void xchdir(char *dir); + +/* Relate absolute pathnames from and to returning the result in outpath. */ +extern int relatepaths(char *from, char *to, char *outpath); + +/* NOTE: changes current working directory -- caveat emptor */ +extern void reversepath(char *inpath, char *name, int len, char *outpath); + +/* stats every directory in path, reports results. */ +extern void diagnosePath(const char * path); + +#endif /* pathsub_h___ */ diff --git a/security/coreconf/nsinstall/sunos4.h b/security/coreconf/nsinstall/sunos4.h new file mode 100644 index 000000000..9bdae872c --- /dev/null +++ b/security/coreconf/nsinstall/sunos4.h @@ -0,0 +1,163 @@ +/* +# The contents of this file are subject to the Mozilla Public +# License Version 1.1 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy of +# the License at http://www.mozilla.org/MPL/ +# +# Software distributed under the License is distributed on an "AS +# IS" basis, WITHOUT WARRANTY OF ANY KIND, 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 Netscape are +# Copyright (C) 1994-2000 Netscape Communications Corporation. All +# Rights Reserved. +# +# Contributor(s): +# +# Alternatively, the contents of this file may be used under the +# terms of the GNU General Public License Version 2 or later (the +# "GPL"), in which case the provisions of the GPL are applicable +# instead of those above. If you wish to allow use of your +# version of this file only under the terms of the GPL and not to +# allow others to use your version of this file under the MPL, +# indicate your decision by deleting the provisions above and +# replace them with the notice and other provisions required by +# the GPL. If you do not delete the provisions above, a recipient +# may use your version of this file under either the MPL or the +# GPL. + */ + +#ifndef pr_sunos4_h___ +#define pr_sunos4_h___ + +#ifndef SVR4 + +/* +** Hodge podge of random missing prototypes for the Sunos4 system +*/ +#include <stdio.h> +#include <stdarg.h> +#include <time.h> +#include <limits.h> +#include <sys/types.h> + +#define PATH_MAX _POSIX_PATH_MAX + +struct timeval; +struct timezone; +struct itimerval; +struct sockaddr; +struct stat; +struct tm; + +/* ctype.h */ +extern int tolower(int); +extern int toupper(int); + +/* errno.h */ +extern char *sys_errlist[]; +extern int sys_nerr; + +#define strerror(e) sys_errlist[((unsigned)(e) < sys_nerr) ? e : 0] + +extern void perror(const char *); + +/* getopt */ +extern char *optarg; +extern int optind; +extern int getopt(int argc, char **argv, char *spec); + +/* math.h */ +extern int srandom(long val); +extern long random(void); + +/* memory.h */ +#define memmove(to,from,len) bcopy((char*)(from),(char*)(to),len) + +extern void bcopy(const char *, char *, int); + +/* signal.h */ +/* +** SunOS4 sigaction hides interrupts by default, so we can safely define +** SA_RESTART to 0 (HP-UX is a counter-example -- its sigaction does not +** hide interrupts but lacks an SA_RESTART option; you must use sigvector +** and tweak the sigcontext from within each signal handler!). +*/ +#define SA_RESTART 0 +#define SA_SIGINFO 0 + +/* stdio.h */ +extern int printf(const char *, ...); +extern int fprintf(FILE *, const char *, ...); +extern int vprintf(const char *, va_list); +extern int vfprintf(FILE *, const char *, va_list); +extern char *vsprintf(char *, const char *, va_list); +extern int scanf(const char *, ...); +extern int sscanf(const char *, const char *, ...); +extern int fscanf(FILE *, const char *, ...); +extern int fgetc(FILE *); +extern int fputc(int, FILE *); +extern int fputs(const char *, FILE *); +extern int puts(const char *); +extern int fread(void *, size_t, size_t, FILE *); +extern int fwrite(const char *, int, int, FILE *); +extern int fseek(FILE *, long, int); +extern long ftell(FILE *); +extern int rewind(FILE *); +extern int fflush(FILE *); +extern int _flsbuf(unsigned char, FILE *); +extern int fclose(FILE *); +extern int remove(const char *); +extern int setvbuf(FILE *, char *, int, size_t); +extern int system(const char *); +extern FILE *popen(const char *, const char *); +extern int pclose(FILE *); + +/* stdlib.h */ +#define strtoul strtol + +extern int isatty(int fildes); +extern long strtol(const char *, char **, int); +extern int putenv(const char *); +extern void srand48(long); +extern long lrand48(void); +extern double drand48(void); + +/* string.h */ +extern int strcasecmp(const char *, const char *); +extern int strncasecmp(const char *, const char *, size_t); +extern int strcoll(const char *, const char *); + +/* time.h */ +extern time_t mktime(struct tm *); +extern size_t strftime(char *, size_t, const char *, const struct tm *); +extern int gettimeofday(struct timeval *, struct timezone *); +extern int setitimer(int, struct itimerval *, struct itimerval *); +extern time_t time(time_t *); +extern time_t timegm(struct tm *); +extern struct tm *localtime(const time_t *); +extern struct tm *gmtime(const time_t *); + +/* unistd.h */ +extern int rename(const char *, const char *); +extern int ioctl(int, int, int *arg); +extern int connect(int, struct sockaddr *, int); +extern int readlink(const char *, char *, int); +extern int symlink(const char *, const char *); +extern int ftruncate(int, off_t); +extern int fchmod(int, mode_t); +extern int fchown(int, uid_t, gid_t); +extern int lstat(const char *, struct stat *); +extern int fstat(int, struct stat *); +extern int select(int, fd_set *, fd_set *, fd_set *, struct timeval *); +extern int gethostname(char *, int); +extern char *getwd(char *); +extern int getpagesize(void); + +#endif /* SVR4 */ + +#endif /* pr_sunos4_h___ */ diff --git a/security/coreconf/outofdate.pl b/security/coreconf/outofdate.pl new file mode 100755 index 000000000..1044639e8 --- /dev/null +++ b/security/coreconf/outofdate.pl @@ -0,0 +1,67 @@ +#!/usr/local/bin/perl +# +# The contents of this file are subject to the Mozilla Public +# License Version 1.1 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy of +# the License at http://www.mozilla.org/MPL/ +# +# Software distributed under the License is distributed on an "AS +# IS" basis, WITHOUT WARRANTY OF ANY KIND, 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 Netscape are +# Copyright (C) 1994-2000 Netscape Communications Corporation. All +# Rights Reserved. +# +# Contributor(s): +# +# Alternatively, the contents of this file may be used under the +# terms of the GNU General Public License Version 2 or later (the +# "GPL"), in which case the provisions of the GPL are applicable +# instead of those above. If you wish to allow use of your +# version of this file only under the terms of the GPL and not to +# allow others to use your version of this file under the MPL, +# indicate your decision by deleting the provisions above and +# replace them with the notice and other provisions required by +# the GPL. If you do not delete the provisions above, a recipient +# may use your version of this file under either the MPL or the +# GPL. +# + +#Input: [-d dir] foo1.java foo2.java +#Compares with: foo1.class foo2.class (if -d specified, checks in 'dir', +# otherwise assumes .class files in same directory as .java files) +#Returns: list of input arguments which are newer than corresponding class +#files (non-existant class files are considered to be real old :-) + +$found = 1; + +if ($ARGV[0] eq '-d') { + $classdir = $ARGV[1]; + $classdir .= "/"; + shift; + shift; +} else { + $classdir = "./"; +} + +foreach $filename (@ARGV) { + $classfilename = $classdir; + $classfilename .= $filename; + $classfilename =~ s/.java$/.class/; + ($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,$atime,$mtime, + $ctime,$blksize,$blocks) = stat($filename); + ($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,$atime,$classmtime, + $ctime,$blksize,$blocks) = stat($classfilename); +# print $filename, " ", $mtime, ", ", $classfilename, " ", $classmtime, "\n"; + if ($mtime > $classmtime) { + print $filename, " "; + $found = 0; + } +} + +print "\n"; diff --git a/security/coreconf/platform.mk b/security/coreconf/platform.mk new file mode 100644 index 000000000..a4826d315 --- /dev/null +++ b/security/coreconf/platform.mk @@ -0,0 +1,38 @@ +# +# The contents of this file are subject to the Mozilla Public +# License Version 1.1 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy of +# the License at http://www.mozilla.org/MPL/ +# +# Software distributed under the License is distributed on an "AS +# IS" basis, WITHOUT WARRANTY OF ANY KIND, 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 Netscape are +# Copyright (C) 1994-2000 Netscape Communications Corporation. All +# Rights Reserved. +# +# Contributor(s): +# +# Alternatively, the contents of this file may be used under the +# terms of the GNU General Public License Version 2 or later (the +# "GPL"), in which case the provisions of the GPL are applicable +# instead of those above. If you wish to allow use of your +# version of this file only under the terms of the GPL and not to +# allow others to use your version of this file under the MPL, +# indicate your decision by deleting the provisions above and +# replace them with the notice and other provisions required by +# the GPL. If you do not delete the provisions above, a recipient +# may use your version of this file under either the MPL or the +# GPL. +# + +####################################################################### +# Master "Core Components" <platform> tag # +####################################################################### + +PLATFORM = $(OBJDIR_NAME) diff --git a/security/coreconf/prefix.mk b/security/coreconf/prefix.mk new file mode 100644 index 000000000..efcdd3c44 --- /dev/null +++ b/security/coreconf/prefix.mk @@ -0,0 +1,72 @@ +# +# The contents of this file are subject to the Mozilla Public +# License Version 1.1 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy of +# the License at http://www.mozilla.org/MPL/ +# +# Software distributed under the License is distributed on an "AS +# IS" basis, WITHOUT WARRANTY OF ANY KIND, 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 Netscape are +# Copyright (C) 1994-2000 Netscape Communications Corporation. All +# Rights Reserved. +# +# Contributor(s): +# +# Alternatively, the contents of this file may be used under the +# terms of the GNU General Public License Version 2 or later (the +# "GPL"), in which case the provisions of the GPL are applicable +# instead of those above. If you wish to allow use of your +# version of this file only under the terms of the GPL and not to +# allow others to use your version of this file under the MPL, +# indicate your decision by deleting the provisions above and +# replace them with the notice and other provisions required by +# the GPL. If you do not delete the provisions above, a recipient +# may use your version of this file under either the MPL or the +# GPL. +# + +####################################################################### +# Master "Core Components" for computing program prefixes # +####################################################################### + +# +# Object prefixes +# + +ifndef OBJ_PREFIX + OBJ_PREFIX = +endif + +# +# Library suffixes +# + +ifndef LIB_PREFIX + LIB_PREFIX = lib +endif + + +ifndef DLL_PREFIX + DLL_PREFIX = lib +endif + + +ifndef IMPORT_LIB_PREFIX + IMPORT_LIB_PREFIX = +endif + +# +# Program prefixes +# + +ifndef PROG_PREFIX + PROG_PREFIX = +endif + +MK_PREFIX = included diff --git a/security/coreconf/release.pl b/security/coreconf/release.pl new file mode 100755 index 000000000..0a16727e1 --- /dev/null +++ b/security/coreconf/release.pl @@ -0,0 +1,136 @@ +#! /usr/local/bin/perl +# +# The contents of this file are subject to the Mozilla Public +# License Version 1.1 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy of +# the License at http://www.mozilla.org/MPL/ +# +# Software distributed under the License is distributed on an "AS +# IS" basis, WITHOUT WARRANTY OF ANY KIND, 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 Netscape are +# Copyright (C) 1994-2000 Netscape Communications Corporation. All +# Rights Reserved. +# +# Contributor(s): +# +# Alternatively, the contents of this file may be used under the +# terms of the GNU General Public License Version 2 or later (the +# "GPL"), in which case the provisions of the GPL are applicable +# instead of those above. If you wish to allow use of your +# version of this file only under the terms of the GPL and not to +# allow others to use your version of this file under the MPL, +# indicate your decision by deleting the provisions above and +# replace them with the notice and other provisions required by +# the GPL. If you do not delete the provisions above, a recipient +# may use your version of this file under either the MPL or the +# GPL. +# + + +require('coreconf.pl'); + +#######-- read in variables on command line into %var + +$var{ZIP} = "zip"; + +&parse_argv; + + +######-- Do the packaging of jars. + +foreach $jarfile (split(/ /,$var{FILES}) ) { + print STDERR "---------------------------------------------\n"; + print STDERR "Packaging jar file $jarfile....\n"; + + $jarinfo = $var{$jarfile}; + + ($jardir,$jaropts) = split(/\|/,$jarinfo); + + $zipoptions = "-T"; + if ($jaropts =~ /a/) { + if ($var{OS_ARCH} eq 'WINNT') { + $zipoptions .= ' -ll'; + } + } + +# don't compress jar files containing classes since some java +# implementations do not implement decompression correctly + if ( ($jarfile eq 'xpclass.jar') || ($jarfile eq 'xpclass_dbg.jar') ) { + $zipoptions .= ' -0'; + } + + +# just in case the directory ends in a /, remove it + if ($jardir =~ /\/$/) { + chop $jardir; + } + + $dirdepth --; + + print STDERR "jardir = $jardir\n"; + system("ls $jardir"); + + if (-d $jardir) { + + +# count the number of slashes + + $slashes =0; + + foreach $i (split(//,$jardir)) { + if ($i =~ /\//) { + $slashes++; + } + } + + $dotdots =0; + + foreach $i (split(m|/|,$jardir)) { + if ($i eq '..') { + $dotdots ++; + } + } + + $dirdepth = ($slashes +1) - (2*$dotdots); + + print STDERR "changing dir $jardir\n"; + chdir($jardir); + print STDERR "making dir META-INF\n"; + mkdir("META-INF",0755); + + $filelist = ""; + opendir(DIR,"."); + while ($_ = readdir(DIR)) { + if (! ( ($_ eq '.') || ($_ eq '..'))) { + if ( $jaropts =~ /i/) { + if (! /^include$/) { + $filelist .= "$_ "; + } + } + else { + $filelist .= "$_ "; + } + } + } + closedir(DIR); + + print STDERR "zip $zipoptions -r $jarfile $filelist\n"; + system("zip $zipoptions -r $jarfile $filelist"); + rmdir("META-INF"); + for $i (1 .. $dirdepth) { + chdir(".."); + print STDERR "chdir ..\n"; + } + } + else { + print STDERR "Directory $jardir doesn't exist\n"; + } + +} + diff --git a/security/coreconf/rules.mk b/security/coreconf/rules.mk new file mode 100644 index 000000000..c53c1ffc5 --- /dev/null +++ b/security/coreconf/rules.mk @@ -0,0 +1,943 @@ +# +# The contents of this file are subject to the Mozilla Public +# License Version 1.1 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy of +# the License at http://www.mozilla.org/MPL/ +# +# Software distributed under the License is distributed on an "AS +# IS" basis, WITHOUT WARRANTY OF ANY KIND, 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 Netscape are +# Copyright (C) 1994-2000 Netscape Communications Corporation. All +# Rights Reserved. +# +# Contributor(s): +# +# Alternatively, the contents of this file may be used under the +# terms of the GNU General Public License Version 2 or later (the +# "GPL"), in which case the provisions of the GPL are applicable +# instead of those above. If you wish to allow use of your +# version of this file only under the terms of the GPL and not to +# allow others to use your version of this file under the MPL, +# indicate your decision by deleting the provisions above and +# replace them with the notice and other provisions required by +# the GPL. If you do not delete the provisions above, a recipient +# may use your version of this file under either the MPL or the +# GPL. +# + +####################################################################### +### ### +### R U L E S O F E N G A G E M E N T ### +### ### +####################################################################### + +####################################################################### +# Double-Colon rules for utilizing the binary release model. # +####################################################################### + +all:: export libs + +ifeq ($(AUTOCLEAN),1) +autobuild:: clean export private_export libs program install +else +autobuild:: export private_export libs program install +endif + +platform:: + @echo $(OBJDIR_NAME) + +ifeq (,$(filter-out WIN%,$(OS_TARGET))) +USE_NT_C_SYNTAX=1 +endif + +ifdef XP_OS2_VACPP +USE_NT_C_SYNTAX=1 +endif + +# +# IMPORTS will always be associated with a component. Therefore, +# the "import" rule will always change directory to the top-level +# of a component, and traverse the IMPORTS keyword from the +# "manifest.mn" file located at this level only. +# +# note: if there is a trailing slash, the component will be appended +# (see import.pl - only used for xpheader.jar) + +import:: + @echo "== import.pl ==" + @perl -I$(CORE_DEPTH)/coreconf $(CORE_DEPTH)/coreconf/import.pl \ + "RELEASE_TREE=$(RELEASE_TREE)" \ + "IMPORTS=$(IMPORTS)" \ + "VERSION=$(VERSION)" \ + "OS_ARCH=$(OS_ARCH)" \ + "PLATFORM=$(PLATFORM)" \ + "OVERRIDE_IMPORT_CHECK=$(OVERRIDE_IMPORT_CHECK)" \ + "ALLOW_VERSION_OVERRIDE=$(ALLOW_VERSION_OVERRIDE)" \ + "SOURCE_RELEASE_PREFIX=$(SOURCE_RELEASE_XP_DIR)" \ + "SOURCE_MD_DIR=$(SOURCE_MD_DIR)" \ + "SOURCE_XP_DIR=$(SOURCE_XP_DIR)" \ + "FILES=$(IMPORT_XPCLASS_JAR) $(XPHEADER_JAR) $(MDHEADER_JAR) $(MDBINARY_JAR)" \ + "$(IMPORT_XPCLASS_JAR)=$(IMPORT_XP_DIR)|$(IMPORT_XPCLASS_DIR)|" \ + "$(XPHEADER_JAR)=$(IMPORT_XP_DIR)|$(SOURCE_XP_DIR)/public/|v" \ + "$(MDHEADER_JAR)=$(IMPORT_MD_DIR)|$(SOURCE_MD_DIR)/include|" \ + "$(MDBINARY_JAR)=$(IMPORT_MD_DIR)|$(SOURCE_MD_DIR)|" + +export:: + +$(LOOP_OVER_DIRS) + +private_export:: + +$(LOOP_OVER_DIRS) + +release_export:: + +$(LOOP_OVER_DIRS) + +release_classes:: + +$(LOOP_OVER_DIRS) + +libs program install:: $(TARGETS) +ifdef LIBRARY + $(INSTALL) -m 664 $(LIBRARY) $(SOURCE_LIB_DIR) +endif +ifdef SHARED_LIBRARY + $(INSTALL) -m 775 $(SHARED_LIBRARY) $(SOURCE_LIB_DIR) +ifeq ($(OS_TARGET),OpenVMS) + $(INSTALL) -m 775 $(SHARED_LIBRARY:$(DLL_SUFFIX)=vms) $(SOURCE_LIB_DIR) +endif +endif +ifdef IMPORT_LIBRARY + $(INSTALL) -m 775 $(IMPORT_LIBRARY) $(SOURCE_LIB_DIR) +endif +ifdef PROGRAM + $(INSTALL) -m 775 $(PROGRAM) $(SOURCE_BIN_DIR) +endif +ifdef PROGRAMS + $(INSTALL) -m 775 $(PROGRAMS) $(SOURCE_BIN_DIR) +endif + +$(LOOP_OVER_DIRS) + +tests:: + +$(LOOP_OVER_DIRS) + +clean clobber:: + rm -rf $(ALL_TRASH) + +$(LOOP_OVER_DIRS) + +realclean clobber_all:: + rm -rf $(wildcard *.OBJ) dist $(ALL_TRASH) + +$(LOOP_OVER_DIRS) + +#ifdef ALL_PLATFORMS +#all_platforms:: $(NFSPWD) +# @d=`$(NFSPWD)`; \ +# if test ! -d LOGS; then rm -rf LOGS; mkdir LOGS; fi; \ +# for h in $(PLATFORM_HOSTS); do \ +# echo "On $$h: $(MAKE) $(ALL_PLATFORMS) >& LOGS/$$h.log";\ +# rsh $$h -n "(chdir $$d; \ +# $(MAKE) $(ALL_PLATFORMS) >& LOGS/$$h.log; \ +# echo DONE) &" 2>&1 > LOGS/$$h.pid & \ +# sleep 1; \ +# done +# +#$(NFSPWD): +# cd $(@D); $(MAKE) $(@F) +#endif + +####################################################################### +# Double-Colon rules for populating the binary release model. # +####################################################################### + + +release_clean:: + rm -rf $(SOURCE_XP_DIR)/release/$(RELEASE_MD_DIR) + +release:: release_clean release_export release_classes release_policy release_md release_jars release_cpdistdir + +release_cpdistdir:: + @echo "== cpdist.pl ==" + @perl -I$(CORE_DEPTH)/coreconf $(CORE_DEPTH)/coreconf/cpdist.pl \ + "RELEASE_TREE=$(RELEASE_TREE)" \ + "CORE_DEPTH=$(CORE_DEPTH)" \ + "MODULE=${MODULE}" \ + "OS_ARCH=$(OS_ARCH)" \ + "RELEASE=$(RELEASE)" \ + "PLATFORM=$(PLATFORM)" \ + "RELEASE_VERSION=$(RELEASE_VERSION)" \ + "SOURCE_RELEASE_PREFIX=$(SOURCE_RELEASE_XP_DIR)" \ + "RELEASE_XP_DIR=$(RELEASE_XP_DIR)" \ + "RELEASE_MD_DIR=$(RELEASE_MD_DIR)" \ + "FILES=$(XPCLASS_JAR) $(XPCLASS_DBG_JAR) $(XPHEADER_JAR) $(MDHEADER_JAR) $(MDBINARY_JAR) XP_FILES MD_FILES" \ + "$(XPCLASS_JAR)=$(SOURCE_RELEASE_CLASSES_DIR)|x"\ + "$(XPCLASS_DBG_JAR)=$(SOURCE_RELEASE_CLASSES_DBG_DIR)|x"\ + "$(XPHEADER_JAR)=$(SOURCE_RELEASE_XPHEADERS_DIR)|x" \ + "$(MDHEADER_JAR)=$(SOURCE_RELEASE_MDHEADERS_DIR)|m" \ + "$(MDBINARY_JAR)=$(SOURCE_RELEASE_MD_DIR)|m" \ + "XP_FILES=$(XP_FILES)|xf" \ + "MD_FILES=$(MD_FILES)|mf" + + +# $(SOURCE_RELEASE_xxx_JAR) is a name like yyy.jar +# $(SOURCE_RELEASE_xx_DIR) is a name like + +release_jars:: + @echo "== release.pl ==" + @perl -I$(CORE_DEPTH)/coreconf $(CORE_DEPTH)/coreconf/release.pl \ + "RELEASE_TREE=$(RELEASE_TREE)" \ + "PLATFORM=$(PLATFORM)" \ + "OS_ARCH=$(OS_ARCH)" \ + "RELEASE_VERSION=$(RELEASE_VERSION)" \ + "SOURCE_RELEASE_DIR=$(SOURCE_RELEASE_DIR)" \ + "FILES=$(XPCLASS_JAR) $(XPCLASS_DBG_JAR) $(XPHEADER_JAR) $(MDHEADER_JAR) $(MDBINARY_JAR)" \ + "$(XPCLASS_JAR)=$(SOURCE_RELEASE_PREFIX)/$(SOURCE_RELEASE_CLASSES_DIR)|b"\ + "$(XPCLASS_DBG_JAR)=$(SOURCE_RELEASE_PREFIX)/$(SOURCE_RELEASE_CLASSES_DBG_DIR)|b"\ + "$(XPHEADER_JAR)=$(SOURCE_RELEASE_PREFIX)/$(SOURCE_RELEASE_XPHEADERS_DIR)|a" \ + "$(MDHEADER_JAR)=$(SOURCE_RELEASE_PREFIX)/$(SOURCE_RELEASE_MDHEADERS_DIR)|a" \ + "$(MDBINARY_JAR)=$(SOURCE_RELEASE_PREFIX)/$(SOURCE_RELEASE_MD_DIR)|bi" + +# Rules for releasing classes. +# We have to do some REALLY gross stuff to deal with multiple classes in one +# file, as well as nested classes, which have a filename of the form +# ContainingClass$NestedClass.class. +# RELEASE_CLASSES simply performs a required patsubst on CLASSES +# RELEASE_CLASS_PATH is RELEASE_CLASSES with the path (in ns/dist) prepended +# RELEASE_NESTED is all the nested classes in RELEASE_CLASS_PATH. We use a +# foreach and wildcard to get all the files that start out like one of the +# class files, then have a $. So, for each class file, we look for file$* +# RELEASE_FILES is the combination of RELEASE_NESTED and the class files +# specified by RELEASE_CLASSES which have .class appended to them. Note that +# the RELEASE_NESTED don't need to have .class appended because they were +# read in from the wildcard as complete filenames. +# +# The _DBG versions are the debuggable ones. +ifneq ($(CLASSES),) + +RELEASE_CLASSES := $(patsubst %,%,$(CLASSES)) + +ifdef BUILD_OPT + RELEASE_CLASS_PATH := $(patsubst %,$(SOURCE_CLASSES_DIR)/$(PACKAGE)/%, $(RELEASE_CLASSES)) + RELEASE_NESTED := $(foreach file,$(RELEASE_CLASS_PATH),$(wildcard $(file)$$*)) + RELEASE_FILES := $(patsubst %,%.class,$(RELEASE_CLASS_PATH)) $(RELEASE_NESTED) +else + RELEASE_DBG_CLASS_PATH:= $(patsubst %,$(SOURCE_CLASSES_DBG_DIR)/$(PACKAGE)/%, $(RELEASE_CLASSES)) + RELEASE_DBG_NESTED := $(foreach file,$(RELEASE_DBG_CLASS_PATH),$(wildcard $(file)$$*)) + RELEASE_DBG_FILES := $(patsubst %,%.class,$(RELEASE_DBG_CLASS_PATH)) $(RELEASE_DBG_NESTED) +endif + +# Substitute \$ for $ so the shell doesn't choke +ifdef BUILD_OPT +release_classes:: + $(INSTALL) -m 444 $(subst $$,\$$,$(RELEASE_FILES)) $(SOURCE_RELEASE_PREFIX)/$(SOURCE_RELEASE_CLASSES_DIR)/$(PACKAGE) +else +release_classes:: + $(INSTALL) -m 444 $(subst $$,\$$,$(RELEASE_DBG_FILES)) $(SOURCE_RELEASE_PREFIX)/$(SOURCE_RELEASE_CLASSES_DBG_DIR)/$(PACKAGE) +endif + +endif + +release_policy:: + +$(LOOP_OVER_DIRS) + +ifndef NO_MD_RELEASE + ifdef LIBRARY + MD_LIB_RELEASE_FILES += $(LIBRARY) + endif + ifdef SHARED_LIBRARY + MD_LIB_RELEASE_FILES += $(SHARED_LIBRARY) + endif + ifdef IMPORT_LIBRARY + MD_LIB_RELEASE_FILES += $(IMPORT_LIBRARY) + endif + ifdef PROGRAM + MD_BIN_RELEASE_FILES += $(PROGRAM) + endif + ifdef PROGRAMS + MD_BIN_RELEASE_FILES += $(PROGRAMS) + endif +endif + +release_md:: +ifneq ($(MD_LIB_RELEASE_FILES),) + $(INSTALL) -m 444 $(MD_LIB_RELEASE_FILES) $(SOURCE_RELEASE_PREFIX)/$(SOURCE_RELEASE_LIB_DIR) +endif +ifneq ($(MD_BIN_RELEASE_FILES),) + $(INSTALL) -m 555 $(MD_BIN_RELEASE_FILES) $(SOURCE_RELEASE_PREFIX)/$(SOURCE_RELEASE_BIN_DIR) +endif + +$(LOOP_OVER_DIRS) + + +alltags: + rm -f TAGS + find . -name dist -prune -o \( -name '*.[hc]' -o -name '*.cp' -o -name '*.cpp' \) -print | xargs etags -a + find . -name dist -prune -o \( -name '*.[hc]' -o -name '*.cp' -o -name '*.cpp' \) -print | xargs ctags -a + +ifdef XP_OS2_VACPP +# list of libs (such as -lnspr4) do not work for our compiler +# change it to be $(DIST)/lib/nspr4.lib +EXTRA_SHARED_LIBS := $(filter-out -L%,$(EXTRA_SHARED_LIBS)) +EXTRA_SHARED_LIBS := $(patsubst -l%,$(DIST)/lib/%.$(LIB_SUFFIX),$(EXTRA_SHARED_LIBS)) +endif + +$(PROGRAM): $(OBJS) $(EXTRA_LIBS) + @$(MAKE_OBJDIR) +ifeq (,$(filter-out WIN%,$(OS_TARGET))) + $(MKPROG) $(subst /,\\,$(OBJS)) -Fe$@ -link $(LDFLAGS) $(subst /,\\,$(EXTRA_LIBS) $(EXTRA_SHARED_LIBS) $(OS_LIBS)) +else +ifdef XP_OS2_VACPP + $(MKPROG) -Fe$@ $(CFLAGS) $(OBJS) $(EXTRA_LIBS) $(EXTRA_SHARED_LIBS) $(OS_LIBS) +else + $(MKPROG) -o $@ $(CFLAGS) $(OBJS) $(LDFLAGS) $(EXTRA_LIBS) $(EXTRA_SHARED_LIBS) $(OS_LIBS) +endif +endif + +get_objs: + @echo $(OBJS) + +$(LIBRARY): $(OBJS) + @$(MAKE_OBJDIR) + rm -f $@ +ifeq (,$(filter-out WIN%,$(OS_TARGET))) + $(AR) $(subst /,\\,$(OBJS)) +else + $(AR) $(OBJS) +endif + $(RANLIB) $@ + + +ifeq ($(OS_TARGET),OS2) +$(IMPORT_LIBRARY): $(SHARED_LIBRARY) + rm -f $@ + $(IMPLIB) $@ $(patsubst %.lib,%.dll.def,$@) + $(RANLIB) $@ +endif + +ifdef SHARED_LIBRARY_LIBS +ifdef BUILD_TREE +SUB_SHLOBJS = $(foreach dir,$(SHARED_LIBRARY_DIRS),$(shell $(MAKE) -C $(dir) --no-print-directory get_objs)) +else +SUB_SHLOBJS = $(foreach dir,$(SHARED_LIBRARY_DIRS),$(addprefix $(dir)/,$(shell $(MAKE) -C $(dir) --no-print-directory get_objs))) +endif +endif + +$(SHARED_LIBRARY): $(OBJS) $(RES) $(MAPFILE) + @$(MAKE_OBJDIR) + rm -f $@ +ifeq ($(OS_TARGET)$(OS_RELEASE), AIX4.1) + echo "#!" > $(OBJDIR)/lib$(LIBRARY_NAME)_syms + nm -B -C -g $(OBJS) \ + | awk '/ [T,D] / {print $$3}' \ + | sed -e 's/^\.//' \ + | sort -u >> $(OBJDIR)/lib$(LIBRARY_NAME)_syms + $(LD) $(XCFLAGS) -o $@ $(OBJS) -bE:$(OBJDIR)/lib$(LIBRARY_NAME)_syms \ + -bM:SRE -bnoentry $(OS_LIBS) $(EXTRA_LIBS) $(EXTRA_SHARED_LIBS) +else +ifeq (,$(filter-out WIN%,$(OS_TARGET))) + $(LINK_DLL) -MAP $(DLLBASE) $(subst /,\\,$(OBJS) $(SUB_SHLOBJS) $(EXTRA_LIBS) $(EXTRA_SHARED_LIBS) $(OS_LIBS) $(LD_LIBS) $(RES)) +else +ifeq ($(OS_TARGET),OS2) + @cmd /C "echo LIBRARY $(notdir $(basename $(SHARED_LIBRARY))) INITINSTANCE TERMINSTANCE >$@.def" + @cmd /C "echo PROTMODE >>$@.def" + @cmd /C "echo CODE LOADONCALL MOVEABLE DISCARDABLE >>$@.def" + @cmd /C "echo DATA PRELOAD MOVEABLE MULTIPLE NONSHARED >>$@.def" + @cmd /C "echo EXPORTS >>$@.def" + $(FILTER) $(OBJS) >>$@.def +ifdef SUB_SHLOBJS + @echo Number of words in OBJ list = $(words $(SUB_SHLOBJS)) + @echo If above number is over 100, need to reedit coreconf/rules.mk + -$(FILTER) $(wordlist 1,20,$(SUB_SHLOBJS)) >>$@.def + -$(FILTER) $(wordlist 21,40,$(SUB_SHLOBJS)) >>$@.def + -$(FILTER) $(wordlist 41,60,$(SUB_SHLOBJS)) >>$@.def + -$(FILTER) $(wordlist 61,80,$(SUB_SHLOBJS)) >>$@.def + -$(FILTER) $(wordlist 81,100,$(SUB_SHLOBJS)) >>$@.def +endif +endif #OS2 +ifdef XP_OS2_VACPP + $(MKSHLIB) $(DLLFLAGS) $(LDFLAGS) $(OBJS) $(SUB_SHLOBJS) $(LD_LIBS) $(EXTRA_LIBS) $(EXTRA_SHARED_LIBS) $@.def +else + $(MKSHLIB) -o $@ $(OBJS) $(SUB_SHLOBJS) $(LD_LIBS) $(EXTRA_LIBS) $(EXTRA_SHARED_LIBS) +endif + chmod +x $@ +ifeq ($(OS_TARGET),OpenVMS) + @echo "`translate $@`" > $(@:$(DLL_SUFFIX)=vms) +endif +ifeq ($(OS_TARGET),Darwin) +ifdef MAPFILE + nmedit -s $(MAPFILE) $@ +endif +endif +endif +endif + +ifeq (,$(filter-out WIN%,$(OS_TARGET))) +$(RES): $(RESNAME) + @$(MAKE_OBJDIR) +# The resource compiler does not understand the -U option. + $(RC) $(filter-out -U%,$(DEFINES)) $(INCLUDES) -Fo$@ $< + @echo $(RES) finished +endif + +$(MAPFILE): $(LIBRARY_NAME).def + @$(MAKE_OBJDIR) + $(PROCESS_MAP_FILE) + + +$(OBJDIR)/$(PROG_PREFIX)%$(PROG_SUFFIX): $(OBJDIR)/$(PROG_PREFIX)%$(OBJ_SUFFIX) + @$(MAKE_OBJDIR) +ifeq (,$(filter-out WIN%,$(OS_TARGET))) + $(MKPROG) $(OBJDIR)/$(PROG_PREFIX)$*$(OBJ_SUFFIX) -Fe$@ -link \ + $(LDFLAGS) $(EXTRA_LIBS) $(EXTRA_SHARED_LIBS) $(OS_LIBS) +else + $(MKPROG) -o $@ $(OBJDIR)/$(PROG_PREFIX)$*$(OBJ_SUFFIX) \ + $(LDFLAGS) $(EXTRA_LIBS) $(EXTRA_SHARED_LIBS) $(OS_LIBS) +endif + +WCCFLAGS1 := $(subst /,\\,$(CFLAGS)) +WCCFLAGS2 := $(subst -I,-i=,$(WCCFLAGS1)) +WCCFLAGS3 := $(subst -D,-d,$(WCCFLAGS2)) + +$(OBJDIR)/$(PROG_PREFIX)%$(OBJ_SUFFIX): %.c + @$(MAKE_OBJDIR) +ifdef USE_NT_C_SYNTAX + $(CC) -Fo$@ -c $(CFLAGS) $< +else + $(CC) -o $@ -c $(CFLAGS) $< +endif + +$(PROG_PREFIX)%$(OBJ_SUFFIX): %.c +ifdef USE_NT_C_SYNTAX + $(CC) -Fo$@ -c $(CFLAGS) $< +else + $(CC) -o $@ -c $(CFLAGS) $< +endif + +ifneq (,$(filter-out WIN%,$(OS_TARGET))) +$(OBJDIR)/$(PROG_PREFIX)%$(OBJ_SUFFIX): %.s + @$(MAKE_OBJDIR) + $(AS) -o $@ $(ASFLAGS) -c $< +endif + +$(OBJDIR)/$(PROG_PREFIX)%$(OBJ_SUFFIX): %.asm + @$(MAKE_OBJDIR) +ifdef XP_OS2_VACPP + $(AS) -Fdo:$(OBJDIR) $(ASFLAGS) $(subst /,\\,$<) +else + $(AS) -Fo$@ $(ASFLAGS) -c $< +endif + +$(OBJDIR)/$(PROG_PREFIX)%$(OBJ_SUFFIX): %.S + @$(MAKE_OBJDIR) + $(AS) -o $@ $(ASFLAGS) -c $< + +$(OBJDIR)/$(PROG_PREFIX)%: %.cpp + @$(MAKE_OBJDIR) +ifdef USE_NT_C_SYNTAX + $(CCC) -Fo$@ -c $(CFLAGS) $< +else + $(CCC) -o $@ -c $(CFLAGS) $< +endif + +# +# Please keep the next two rules in sync. +# +$(OBJDIR)/$(PROG_PREFIX)%$(OBJ_SUFFIX): %.cc + @$(MAKE_OBJDIR) + $(CCC) -o $@ -c $(CFLAGS) $< + +$(OBJDIR)/$(PROG_PREFIX)%$(OBJ_SUFFIX): %.cpp + @$(MAKE_OBJDIR) +ifdef STRICT_CPLUSPLUS_SUFFIX + echo "#line 1 \"$<\"" | cat - $< > $(OBJDIR)/t_$*.cc + $(CCC) -o $@ -c $(CFLAGS) $(OBJDIR)/t_$*.cc + rm -f $(OBJDIR)/t_$*.cc +else +ifdef USE_NT_C_SYNTAX + $(CCC) -Fo$@ -c $(CFLAGS) $< +else + $(CCC) -o $@ -c $(CFLAGS) $< +endif +endif #STRICT_CPLUSPLUS_SUFFIX + +%.i: %.cpp + $(CCC) -C -E $(CFLAGS) $< > $*.i + +%.i: %.c +ifeq (,$(filter-out WIN%,$(OS_TARGET))) + $(CC) -C /P $(CFLAGS) $< +else + $(CC) -C -E $(CFLAGS) $< > $*.i +endif + +ifneq (,$(filter-out WIN%,$(OS_TARGET))) +%.i: %.s + $(CC) -C -E $(CFLAGS) $< > $*.i +endif + +%: %.pl + rm -f $@; cp $*.pl $@; chmod +x $@ + +%: %.sh + rm -f $@; cp $*.sh $@; chmod +x $@ + +ifdef DIRS +$(DIRS):: + @if test -d $@; then \ + set $(EXIT_ON_ERROR); \ + echo "cd $@; $(MAKE)"; \ + cd $@; $(MAKE); \ + set +e; \ + else \ + echo "Skipping non-directory $@..."; \ + fi; \ + $(CLICK_STOPWATCH) +endif + +################################################################################ +# Bunch of things that extend the 'export' rule (in order): +################################################################################ + +$(JAVA_DESTPATH) $(JAVA_DESTPATH)/$(PACKAGE) $(JMCSRCDIR):: + @if test ! -d $@; then \ + echo Creating $@; \ + rm -rf $@; \ + $(NSINSTALL) -D $@; \ + fi + +################################################################################ +## IDL_GEN + +ifneq ($(IDL_GEN),) + +#export:: +# $(IDL2JAVA) $(IDL_GEN) + +#all:: export + +#clobber:: +# rm -f $(IDL_GEN:.idl=.class) # XXX wrong! + +endif + +################################################################################ +### JSRCS -- for compiling java files +### +### NOTE: For backwards compatibility, if $(NETLIBDEPTH) is defined, +### replace $(CORE_DEPTH) with $(NETLIBDEPTH). +### + +ifneq ($(JSRCS),) +ifneq ($(JAVAC),) +ifdef NETLIBDEPTH + CORE_DEPTH := $(NETLIBDEPTH) +endif + +JAVA_EXPORT_SRCS=$(shell perl $(CORE_DEPTH)/coreconf/outofdate.pl $(PERLARG) -d $(JAVA_DESTPATH)/$(PACKAGE) $(JSRCS) $(PRIVATE_JSRCS)) + +export:: $(JAVA_DESTPATH) $(JAVA_DESTPATH)/$(PACKAGE) +ifneq ($(JAVA_EXPORT_SRCS),) + $(JAVAC) $(JAVA_EXPORT_SRCS) +endif + +all:: export + +clobber:: + rm -f $(SOURCE_XP_DIR)/classes/$(PACKAGE)/*.class + +endif +endif + +# +# JDIRS -- like JSRCS, except you can give a list of directories and it will +# compile all the out-of-date java files in those directories. +# +# NOTE: recursing through these can speed things up, but they also cause +# some builds to run out of memory +# +# NOTE: For backwards compatibility, if $(NETLIBDEPTH) is defined, +# replace $(CORE_DEPTH) with $(NETLIBDEPTH). +# +ifdef JDIRS +ifneq ($(JAVAC),) +ifdef NETLIBDEPTH + CORE_DEPTH := $(NETLIBDEPTH) +endif + +# !!!!! THIS WILL CRASH SHMSDOS.EXE !!!!! +# shmsdos does not support shell variables. It will crash when it tries +# to parse the '=' character. A solution is to rewrite outofdate.pl so it +# takes the Javac command as an argument and executes the command itself, +# instead of returning a list of files. +export:: $(JAVA_DESTPATH) $(JAVA_DESTPATH)/$(PACKAGE) + @echo "!!! THIS COMMAND IS BROKEN ON WINDOWS--SEE rules.mk FOR DETAILS !!!" + return -1 + @for d in $(JDIRS); do \ + if test -d $$d; then \ + set $(EXIT_ON_ERROR); \ + files=`echo $$d/*.java`; \ + list=`perl $(CORE_DEPTH)/coreconf/outofdate.pl $(PERLARG) \ + -d $(JAVA_DESTPATH)/$(PACKAGE) $$files`; \ + if test "$${list}x" != "x"; then \ + echo Building all java files in $$d; \ + echo $(JAVAC) $$list; \ + $(JAVAC) $$list; \ + fi; \ + set +e; \ + else \ + echo "Skipping non-directory $$d..."; \ + fi; \ + $(CLICK_STOPWATCH); \ + done +endif +endif + +# +# JDK_GEN -- for generating "old style" native methods +# +# Generate JDK Headers and Stubs into the '_gen' and '_stubs' directory +# +# NOTE: For backwards compatibility, if $(NETLIBDEPTH) is defined, +# replace $(CORE_DEPTH) with $(NETLIBDEPTH). +# +ifneq ($(JDK_GEN),) +ifneq ($(JAVAH),) +ifdef NSBUILDROOT + INCLUDES += -I$(JDK_GEN_DIR) -I$(SOURCE_XP_DIR) +else + INCLUDES += -I$(JDK_GEN_DIR) +endif + +ifdef NETLIBDEPTH + CORE_DEPTH := $(NETLIBDEPTH) +endif + +JDK_PACKAGE_CLASSES := $(JDK_GEN) +JDK_PATH_CLASSES := $(subst .,/,$(JDK_PACKAGE_CLASSES)) +JDK_HEADER_CLASSFILES := $(patsubst %,$(JAVA_DESTPATH)/%.class,$(JDK_PATH_CLASSES)) +JDK_STUB_CLASSFILES := $(patsubst %,$(JAVA_DESTPATH)/%.class,$(JDK_PATH_CLASSES)) +JDK_HEADER_CFILES := $(patsubst %,$(JDK_GEN_DIR)/%.h,$(JDK_GEN)) +JDK_STUB_CFILES := $(patsubst %,$(JDK_STUB_DIR)/%.c,$(JDK_GEN)) + +$(JDK_HEADER_CFILES): $(JDK_HEADER_CLASSFILES) +$(JDK_STUB_CFILES): $(JDK_STUB_CLASSFILES) + +export:: + @echo Generating/Updating JDK headers + $(JAVAH) -d $(JDK_GEN_DIR) $(JDK_PACKAGE_CLASSES) + @echo Generating/Updating JDK stubs + $(JAVAH) -stubs -d $(JDK_STUB_DIR) $(JDK_PACKAGE_CLASSES) +ifndef NO_MAC_JAVA_SHIT + @if test ! -d $(CORE_DEPTH)/lib/mac/Java/; then \ + echo "!!! You need to have a ns/lib/mac/Java directory checked out."; \ + echo "!!! This allows us to automatically update generated files for the mac."; \ + echo "!!! If you see any modified files there, please check them in."; \ + fi + @echo Generating/Updating JDK headers for the Mac + $(JAVAH) -mac -d $(CORE_DEPTH)/lib/mac/Java/_gen $(JDK_PACKAGE_CLASSES) + @echo Generating/Updating JDK stubs for the Mac + $(JAVAH) -mac -stubs -d $(CORE_DEPTH)/lib/mac/Java/_stubs $(JDK_PACKAGE_CLASSES) +endif +endif +endif + +# +# JRI_GEN -- for generating "old style" JRI native methods +# +# Generate JRI Headers and Stubs into the 'jri' directory +# +# NOTE: For backwards compatibility, if $(NETLIBDEPTH) is defined, +# replace $(CORE_DEPTH) with $(NETLIBDEPTH). +# +ifneq ($(JRI_GEN),) +ifneq ($(JAVAH),) +ifdef NSBUILDROOT + INCLUDES += -I$(JRI_GEN_DIR) -I$(SOURCE_XP_DIR) +else + INCLUDES += -I$(JRI_GEN_DIR) +endif + +ifdef NETLIBDEPTH + CORE_DEPTH := $(NETLIBDEPTH) +endif + +JRI_PACKAGE_CLASSES := $(JRI_GEN) +JRI_PATH_CLASSES := $(subst .,/,$(JRI_PACKAGE_CLASSES)) +JRI_HEADER_CLASSFILES := $(patsubst %,$(JAVA_DESTPATH)/%.class,$(JRI_PATH_CLASSES)) +JRI_STUB_CLASSFILES := $(patsubst %,$(JAVA_DESTPATH)/%.class,$(JRI_PATH_CLASSES)) +JRI_HEADER_CFILES := $(patsubst %,$(JRI_GEN_DIR)/%.h,$(JRI_GEN)) +JRI_STUB_CFILES := $(patsubst %,$(JRI_GEN_DIR)/%.c,$(JRI_GEN)) + +$(JRI_HEADER_CFILES): $(JRI_HEADER_CLASSFILES) +$(JRI_STUB_CFILES): $(JRI_STUB_CLASSFILES) + +export:: + @echo Generating/Updating JRI headers + $(JAVAH) -jri -d $(JRI_GEN_DIR) $(JRI_PACKAGE_CLASSES) + @echo Generating/Updating JRI stubs + $(JAVAH) -jri -stubs -d $(JRI_GEN_DIR) $(JRI_PACKAGE_CLASSES) +ifndef NO_MAC_JAVA_SHIT + @if test ! -d $(CORE_DEPTH)/lib/mac/Java/; then \ + echo "!!! You need to have a ns/lib/mac/Java directory checked out."; \ + echo "!!! This allows us to automatically update generated files for the mac."; \ + echo "!!! If you see any modified files there, please check them in."; \ + fi + @echo Generating/Updating JRI headers for the Mac + $(JAVAH) -jri -mac -d $(CORE_DEPTH)/lib/mac/Java/_jri $(JRI_PACKAGE_CLASSES) + @echo Generating/Updating JRI stubs for the Mac + $(JAVAH) -jri -mac -stubs -d $(CORE_DEPTH)/lib/mac/Java/_jri $(JRI_PACKAGE_CLASSES) +endif +endif +endif + +# +# JNI_GEN -- for generating JNI native methods +# +# Generate JNI Headers into the 'jni' directory +# +ifneq ($(JNI_GEN),) +ifneq ($(JAVAH),) +JNI_HEADERS := $(patsubst %,$(JNI_GEN_DIR)/%.h,$(JNI_GEN)) + +export:: + @if test ! -d $(JNI_GEN_DIR); then \ + echo $(JAVAH) -jni -d $(JNI_GEN_DIR) $(JNI_GEN); \ + $(JAVAH) -jni -d $(JNI_GEN_DIR) $(JNI_GEN); \ + else \ + echo "Checking for out of date header files" ; \ + perl $(CORE_DEPTH)/coreconf/jniregen.pl $(PERLARG) \ + -d $(JAVA_DESTPATH) -j "$(JAVAH) -jni -d $(JNI_GEN_DIR)" $(JNI_GEN);\ + fi +endif +endif + +# +# JMC_EXPORT -- for declaring which java classes are to be exported for jmc +# +ifneq ($(JMC_EXPORT),) +JMC_EXPORT_PATHS := $(subst .,/,$(JMC_EXPORT)) +JMC_EXPORT_FILES := $(patsubst %,$(JAVA_DESTPATH)/$(PACKAGE)/%.class,$(JMC_EXPORT_PATHS)) + +# +# We're doing NSINSTALL -t here (copy mode) because calling INSTALL will pick up +# your NSDISTMODE and make links relative to the current directory. This is a +# problem because the source isn't in the current directory: +# +export:: $(JMC_EXPORT_FILES) $(JMCSRCDIR) + $(NSINSTALL) -t -m 444 $(JMC_EXPORT_FILES) $(JMCSRCDIR) +endif + +# +# JMC_GEN -- for generating java modules +# +# Provide default export & install rules when using JMC_GEN +# +ifneq ($(JMC_GEN),) +ifneq ($(JMC),) + INCLUDES += -I$(JMC_GEN_DIR) -I. + JMC_HEADERS := $(patsubst %,$(JMC_GEN_DIR)/%.h,$(JMC_GEN)) + JMC_STUBS := $(patsubst %,$(JMC_GEN_DIR)/%.c,$(JMC_GEN)) + JMC_OBJS := $(patsubst %,$(OBJDIR)/%$(OBJ_SUFFIX),$(JMC_GEN)) + +$(JMC_GEN_DIR)/M%.h: $(JMCSRCDIR)/%.class + $(JMC) -d $(JMC_GEN_DIR) -interface $(JMC_GEN_FLAGS) $(?F:.class=) + +$(JMC_GEN_DIR)/M%.c: $(JMCSRCDIR)/%.class + $(JMC) -d $(JMC_GEN_DIR) -module $(JMC_GEN_FLAGS) $(?F:.class=) + +$(OBJDIR)/M%$(OBJ_SUFFIX): $(JMC_GEN_DIR)/M%.h $(JMC_GEN_DIR)/M%.c + @$(MAKE_OBJDIR) + $(CC) -o $@ -c $(CFLAGS) $(JMC_GEN_DIR)/M$*.c + +export:: $(JMC_HEADERS) $(JMC_STUBS) +endif +endif + +# +# Copy each element of EXPORTS to $(SOURCE_XP_DIR)/public/$(MODULE)/ +# +PUBLIC_EXPORT_DIR = $(SOURCE_XP_DIR)/public/$(MODULE) + +ifneq ($(EXPORTS),) +$(PUBLIC_EXPORT_DIR):: + @if test ! -d $@; then \ + echo Creating $@; \ + $(NSINSTALL) -D $@; \ + fi + +export:: $(PUBLIC_EXPORT_DIR) + +export:: $(EXPORTS) + $(INSTALL) -m 444 $^ $(PUBLIC_EXPORT_DIR) + +export:: $(BUILT_SRCS) +endif + +# Duplicate export rule for private exports, with different directories + +PRIVATE_EXPORT_DIR = $(SOURCE_XP_DIR)/private/$(MODULE) + +ifneq ($(PRIVATE_EXPORTS),) +$(PRIVATE_EXPORT_DIR):: + @if test ! -d $@; then \ + echo Creating $@; \ + $(NSINSTALL) -D $@; \ + fi + +private_export:: $(PRIVATE_EXPORT_DIR) + +private_export:: $(PRIVATE_EXPORTS) + $(INSTALL) -m 444 $^ $(PRIVATE_EXPORT_DIR) +else +private_export:: + @echo There are no private exports.; +endif + +########################################################################## +### RULES FOR RUNNING REGRESSION SUITE TESTS +### REQUIRES 'REGRESSION_SPEC' TO BE SET TO THE NAME OF A REGRESSION SPECFILE +### AND RESULTS_SUBDIR TO BE SET TO SOMETHING LIKE SECURITY/PKCS5 +########################################################################## + +TESTS_DIR = $(RESULTS_DIR)/$(RESULTS_SUBDIR)/$(OS_TARGET)$(OS_RELEASE)$(CPU_TAG)$(COMPILER_TAG)$(IMPL_STRATEGY) + +ifneq ($(REGRESSION_SPEC),) + +ifneq ($(BUILD_OPT),) +REGDATE = $(subst \ ,, $(shell perl $(CORE_DEPTH)/$(MODULE)/scripts/now)) +endif + +tests:: $(REGRESSION_SPEC) + cd $(PLATFORM); \ + ../$(SOURCE_MD_DIR)/bin/regress$(PROG_SUFFIX) specfile=../$(REGRESSION_SPEC) progress $(EXTRA_REGRESS_OPTIONS); \ + if test ! -d $(TESTS_DIR); then \ + echo Creating $(TESTS_DIR); \ + $(NSINSTALL) -D $(TESTS_DIR); \ + fi +ifneq ($(BUILD_OPT),) + $(NSINSTALL) -m 664 $(PLATFORM)/$(REGDATE).sum $(TESTS_DIR); \ + $(NSINSTALL) -m 664 $(PLATFORM)/$(REGDATE).htm $(TESTS_DIR); \ + echo "Please now make sure your results files are copied to $(TESTS_DIR), "; \ + echo "then run 'reporter specfile=$(RESULTS_DIR)/rptspec'" +endif +else +tests:: + @echo Error: you didn't specify REGRESSION_SPEC in your manifest.mn file!; +endif + + +# Duplicate export rule for releases, with different directories + +ifneq ($(EXPORTS),) +$(SOURCE_RELEASE_XP_DIR)/include:: + @if test ! -d $@; then \ + echo Creating $@; \ + $(NSINSTALL) -D $@; \ + fi + +release_export:: $(SOURCE_RELEASE_XP_DIR)/include + +release_export:: $(EXPORTS) + $(INSTALL) -m 444 $^ $(SOURCE_RELEASE_XP_DIR)/include +endif + + + + +################################################################################ + +-include $(DEPENDENCIES) + +ifneq (,$(filter-out OS2 WIN%,$(OS_TARGET))) +# Can't use sed because of its 4000-char line length limit, so resort to perl +.DEFAULT: + @perl -e ' \ + open(MD, "< $(DEPENDENCIES)"); \ + while (<MD>) { \ + if (m@ \.*/*$< @) { \ + $$found = 1; \ + last; \ + } \ + } \ + if ($$found) { \ + print "Removing stale dependency $< from $(DEPENDENCIES)\n"; \ + seek(MD, 0, 0); \ + $$tmpname = "$(OBJDIR)/fix.md" . $$$$; \ + open(TMD, "> " . $$tmpname); \ + while (<MD>) { \ + s@ \.*/*$< @ @; \ + if (!print TMD "$$_") { \ + unlink(($$tmpname)); \ + exit(1); \ + } \ + } \ + close(TMD); \ + if (!rename($$tmpname, "$(DEPENDENCIES)")) { \ + unlink(($$tmpname)); \ + } \ + } elsif ("$<" ne "$(DEPENDENCIES)") { \ + print "$(MAKE): *** No rule to make target $<. Stop.\n"; \ + exit(1); \ + }' +endif + +############################################################################# +# X dependency system +############################################################################# + +ifdef MKDEPENDENCIES + +# For Windows, $(MKDEPENDENCIES) must be -included before including rules.mk + +$(MKDEPENDENCIES):: + @$(MAKE_OBJDIR) + touch $(MKDEPENDENCIES) + chmod u+w $(MKDEPENDENCIES) +#on NT, the preceeding touch command creates a read-only file !?!?! +#which is why we have to explicitly chmod it. + $(MKDEPEND) -p$(OBJDIR_NAME)/ -o'$(OBJ_SUFFIX)' -f$(MKDEPENDENCIES) \ +$(NOMD_CFLAGS) $(YOPT) $(CSRCS) $(CPPSRCS) $(ASFILES) + +$(MKDEPEND):: $(MKDEPEND_DIR)/*.c $(MKDEPEND_DIR)/*.h + cd $(MKDEPEND_DIR); $(MAKE) + +ifdef OBJS +depend:: $(MKDEPEND) $(MKDEPENDENCIES) +else +depend:: +endif + +$(LOOP_OVER_DIRS) + +dependclean:: + rm -f $(MKDEPENDENCIES) + +$(LOOP_OVER_DIRS) + +#-include $(NSINSTALL_DIR)/$(OBJDIR)/depend.mk + +else +depend:: +endif + +################################################################################ +# Special gmake rules. +################################################################################ + +# +# 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. +# +.SUFFIXES: +.SUFFIXES: .out .a .ln .o .obj .c .cc .C .cpp .y .l .s .S .h .sh .i .pl .class .java .html .asm + +# +# Don't delete these files if we get killed. +# +.PRECIOUS: .java $(JDK_HEADERS) $(JDK_STUBS) $(JRI_HEADERS) $(JRI_STUBS) $(JMC_HEADERS) $(JMC_STUBS) $(JNI_HEADERS) + +# +# Fake targets. Always run these rules, even if a file/directory with that +# name already exists. +# +.PHONY: all all_platforms alltags boot clean clobber clobber_all export install libs program realclean release $(OBJDIR) $(DIRS) + diff --git a/security/coreconf/ruleset.mk b/security/coreconf/ruleset.mk new file mode 100644 index 000000000..8a9385c9a --- /dev/null +++ b/security/coreconf/ruleset.mk @@ -0,0 +1,237 @@ +# +# The contents of this file are subject to the Mozilla Public +# License Version 1.1 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy of +# the License at http://www.mozilla.org/MPL/ +# +# Software distributed under the License is distributed on an "AS +# IS" basis, WITHOUT WARRANTY OF ANY KIND, 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 Netscape are +# Copyright (C) 1994-2000 Netscape Communications Corporation. All +# Rights Reserved. +# +# Contributor(s): +# +# Alternatively, the contents of this file may be used under the +# terms of the GNU General Public License Version 2 or later (the +# "GPL"), in which case the provisions of the GPL are applicable +# instead of those above. If you wish to allow use of your +# version of this file only under the terms of the GPL and not to +# allow others to use your version of this file under the MPL, +# indicate your decision by deleting the provisions above and +# replace them with the notice and other provisions required by +# the GPL. If you do not delete the provisions above, a recipient +# may use your version of this file under either the MPL or the +# GPL. +# + +####################################################################### +# # +# Parameters to this makefile (set these in this file): # +# # +# a) # +# TARGETS -- the target to create # +# (defaults to $LIBRARY $PROGRAM) # +# b) # +# DIRS -- subdirectories for make to recurse on # +# (the 'all' rule builds $TARGETS $DIRS) # +# c) # +# CSRCS, CPPSRCS -- .c and .cpp files to compile # +# (used to define $OBJS) # +# d) # +# PROGRAM -- the target program name to create from $OBJS # +# ($OBJDIR automatically prepended to it) # +# e) # +# LIBRARY -- the target library name to create from $OBJS # +# ($OBJDIR automatically prepended to it) # +# f) # +# JSRCS -- java source files to compile into class files # +# (if you don't specify this it will default # +# to *.java) # +# g) # +# PACKAGE -- the package to put the .class files into # +# (e.g. netscape/applet) # +# (NOTE: the default definition for this may be # +# overridden if "jdk.mk" is included) # +# h) # +# JMC_EXPORT -- java files to be exported for use by JMC_GEN # +# (this is a list of Class names) # +# i) # +# JRI_GEN -- files to run through javah to generate headers # +# and stubs # +# (output goes into the _jri sub-dir) # +# j) # +# JMC_GEN -- files to run through jmc to generate headers # +# and stubs # +# (output goes into the _jmc sub-dir) # +# k) # +# JNI_GEN -- files to run through javah to generate headers # +# (output goes into the _jni sub-dir) # +# # +####################################################################### + +# +# CPU_TAG is now defined in the $(TARGET).mk files +# + +ifndef COMPILER_TAG + ifneq ($(DEFAULT_COMPILER), $(CC)) +# +# Temporary define for the Client; to be removed when binary release is used +# + ifdef MOZILLA_CLIENT + COMPILER_TAG = + else + COMPILER_TAG = _$(CC) + endif + else + COMPILER_TAG = + endif +endif + +ifeq ($(MKPROG),) + MKPROG = $(CC) +endif + +# +# This makefile contains rules for building the following kinds of +# objects: +# - (1) LIBRARY: a static (archival) library +# - (2) SHARED_LIBRARY: a shared (dynamic link) library +# - (3) IMPORT_LIBRARY: an import library, defined in $(OS_TARGET).mk +# - (4) PROGRAM: an executable binary +# +# NOTE: The names of libraries can be generated by simply specifying +# LIBRARY_NAME (and LIBRARY_VERSION in the case of non-static libraries). +# LIBRARY and SHARED_LIBRARY may be defined differently in $(OS_TARGET).mk +# + +ifdef LIBRARY_NAME + ifndef LIBRARY + LIBRARY = $(OBJDIR)/$(LIB_PREFIX)$(LIBRARY_NAME).$(LIB_SUFFIX) + endif + ifndef SHARED_LIBRARY + SHARED_LIBRARY = $(OBJDIR)/$(DLL_PREFIX)$(LIBRARY_NAME)$(LIBRARY_VERSION)$(JDK_DEBUG_SUFFIX).$(DLL_SUFFIX) + endif +endif + +# +# Common rules used by lots of makefiles... +# + +ifdef PROGRAM + PROGRAM := $(addprefix $(OBJDIR)/, $(PROGRAM)$(JDK_DEBUG_SUFFIX)$(PROG_SUFFIX)) +endif + +ifdef PROGRAMS + PROGRAMS := $(addprefix $(OBJDIR)/, $(PROGRAMS:%=%$(JDK_DEBUG_SUFFIX)$(PROG_SUFFIX))) +endif + +ifndef TARGETS + TARGETS = $(LIBRARY) $(SHARED_LIBRARY) $(PROGRAM) +endif + +ifndef OBJS + SIMPLE_OBJS = $(JRI_STUB_CFILES) \ + $(addsuffix $(OBJ_SUFFIX), $(JMC_GEN)) \ + $(CSRCS:.c=$(OBJ_SUFFIX)) \ + $(CPPSRCS:.cpp=$(OBJ_SUFFIX)) \ + $(ASFILES:$(ASM_SUFFIX)=$(OBJ_SUFFIX)) \ + $(BUILT_CSRCS:.c=$(OBJ_SUFFIX)) \ + $(BUILT_CPPSRCS:.cpp=$(OBJ_SUFFIX)) \ + $(BUILT_ASFILES:$(ASM_SUFFIX)=$(OBJ_SUFFIX)) + OBJS = $(addprefix $(OBJDIR)/$(PROG_PREFIX), $(SIMPLE_OBJS)) +endif + +ifndef BUILT_SRCS + BUILT_SRCS = $(addprefix $(OBJDIR)/$(PROG_PREFIX), \ + $(BUILT_CSRCS) $(BUILT_CPPSRCS) $(BUILT_ASFILES)) +endif + + +ifeq (,$(filter-out WIN%,$(OS_TARGET))) + MAKE_OBJDIR = $(INSTALL) -D $(OBJDIR) +else + define MAKE_OBJDIR + if test ! -d $(@D); then rm -rf $(@D); $(NSINSTALL) -D $(@D); fi + endef +endif + +ifndef PACKAGE + PACKAGE = . +endif + +ALL_TRASH := $(TARGETS) $(OBJS) $(OBJDIR) LOGS TAGS $(GARBAGE) \ + $(NOSUCHFILE) $(JDK_HEADER_CFILES) $(JDK_STUB_CFILES) \ + $(JRI_HEADER_CFILES) $(JRI_STUB_CFILES) $(JNI_HEADERS) \ + $(JMC_STUBS) $(JMC_HEADERS) $(JMC_EXPORT_FILES) \ + so_locations _gen _jmc _jri _jni _stubs \ + $(wildcard $(JAVA_DESTPATH)/$(PACKAGE)/*.class) \ + $(BUILT_SRCS) + +ifdef JDIRS + ALL_TRASH += $(addprefix $(JAVA_DESTPATH)/,$(JDIRS)) +endif + +ifdef NSBUILDROOT + JDK_GEN_DIR = $(SOURCE_XP_DIR)/_gen + JMC_GEN_DIR = $(SOURCE_XP_DIR)/_jmc + JNI_GEN_DIR = $(SOURCE_XP_DIR)/_jni + JRI_GEN_DIR = $(SOURCE_XP_DIR)/_jri + JDK_STUB_DIR = $(SOURCE_XP_DIR)/_stubs +else + JDK_GEN_DIR = _gen + JMC_GEN_DIR = _jmc + JNI_GEN_DIR = _jni + JRI_GEN_DIR = _jri + JDK_STUB_DIR = _stubs +endif + +# +# If this is an "official" build, try to build everything. +# I.e., don't exit on errors. +# + +ifdef BUILD_OFFICIAL + EXIT_ON_ERROR = +e + CLICK_STOPWATCH = date +else + EXIT_ON_ERROR = -e + CLICK_STOPWATCH = true +endif + +ifdef REQUIRES + MODULE_INCLUDES := $(addprefix -I$(SOURCE_XP_DIR)/public/, $(REQUIRES)) + INCLUDES += $(MODULE_INCLUDES) + ifeq ($(MODULE), sectools) + PRIVATE_INCLUDES := $(addprefix -I$(SOURCE_XP_DIR)/private/, $(REQUIRES)) + INCLUDES += $(PRIVATE_INCLUDES) + endif +endif + +ifdef SYSTEM_INCL_DIR + YOPT = -Y$(SYSTEM_INCL_DIR) +endif + +ifdef DIRS + LOOP_OVER_DIRS = \ + @for directory in $(DIRS); do \ + if test -d $$directory; then \ + set $(EXIT_ON_ERROR); \ + echo "cd $$directory; $(MAKE) $@"; \ + $(MAKE) -C $$directory $@; \ + set +e; \ + else \ + echo "Skipping non-directory $$directory..."; \ + fi; \ + $(CLICK_STOPWATCH); \ + done +endif + +MK_RULESET = included diff --git a/security/coreconf/source.mk b/security/coreconf/source.mk new file mode 100644 index 000000000..2eb9d1d7b --- /dev/null +++ b/security/coreconf/source.mk @@ -0,0 +1,188 @@ +# +# The contents of this file are subject to the Mozilla Public +# License Version 1.1 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy of +# the License at http://www.mozilla.org/MPL/ +# +# Software distributed under the License is distributed on an "AS +# IS" basis, WITHOUT WARRANTY OF ANY KIND, 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 Netscape are +# Copyright (C) 1994-2000 Netscape Communications Corporation. All +# Rights Reserved. +# +# Contributor(s): +# +# Alternatively, the contents of this file may be used under the +# terms of the GNU General Public License Version 2 or later (the +# "GPL"), in which case the provisions of the GPL are applicable +# instead of those above. If you wish to allow use of your +# version of this file only under the terms of the GPL and not to +# allow others to use your version of this file under the MPL, +# indicate your decision by deleting the provisions above and +# replace them with the notice and other provisions required by +# the GPL. If you do not delete the provisions above, a recipient +# may use your version of this file under either the MPL or the +# GPL. +# + +####################################################################### +# Master <component>-specific source import/export directories # +####################################################################### + +# +# <user_source_tree> master import/export directory prefix +# + +ifndef SOURCE_PREFIX + ifndef BUILD_TREE + SOURCE_PREFIX = $(CORE_DEPTH)/../dist + else + SOURCE_PREFIX = $(BUILD_TREE)/dist + endif +endif + +# +# <user_source_tree> cross-platform (xp) master import/export directory +# + +ifndef SOURCE_XP_DIR + SOURCE_XP_DIR = $(SOURCE_PREFIX) +endif + +# +# <user_source_tree> cross-platform (xp) import/export directories +# + +SOURCE_CLASSES_DIR = $(SOURCE_XP_DIR)/classes +SOURCE_CLASSES_DBG_DIR = $(SOURCE_XP_DIR)/classes_DBG +SOURCE_XPHEADERS_DIR = $(SOURCE_XP_DIR)/public/$(MODULE) +SOURCE_XPPRIVATE_DIR = $(SOURCE_XP_DIR)/private/$(MODULE) + +ifdef BUILD_OPT + IMPORT_XPCLASS_DIR = $(SOURCE_CLASSES_DIR) +else + IMPORT_XPCLASS_DIR = $(SOURCE_CLASSES_DBG_DIR) +endif + +# +# <user_source_tree> machine-dependent (md) master import/export directory +# + +ifndef SOURCE_MD_DIR + SOURCE_MD_DIR = $(SOURCE_PREFIX)/$(PLATFORM) +endif + +# +# <user_source_tree> machine-dependent (md) import/export directories +# + +#This is where we install built executables and (for Windows only) DLLs. +ifndef SOURCE_BIN_DIR + SOURCE_BIN_DIR = $(SOURCE_MD_DIR)/bin +endif + +#This is where we install built libraries (.a, .so, .lib). +ifndef SOURCE_LIB_DIR + SOURCE_LIB_DIR = $(SOURCE_MD_DIR)/lib +endif + +# This is where NSPR header files are found. +ifndef SOURCE_MDHEADERS_DIR + SOURCE_MDHEADERS_DIR = $(SOURCE_MD_DIR)/include +endif + +####################################################################### +# Master <component>-specific source release directories and files # +####################################################################### + +# +# <user_source_tree> source-side master release directory prefix +# NOTE: export control policy enforced for XP and MD files released to +# the staging area +# + +ifeq ($(POLICY), domestic) + SOURCE_RELEASE_PREFIX = $(SOURCE_PREFIX)/release/domestic +else + ifeq ($(POLICY), export) + SOURCE_RELEASE_PREFIX = $(SOURCE_PREFIX)/release/export + else + ifeq ($(POLICY), france) + SOURCE_RELEASE_PREFIX = $(SOURCE_PREFIX)/release/france + else +#We shouldn't have to put another directory under here, but without it the perl +#script for releasing doesn't find the directory. It thinks it doesn't exist. +#So we're adding this no-policy directory so that the script for releasing works +#in all casese when policy is not set. This doesn't affect where the final jar +#files land, only where they are placed in the local tree when building the jar +#files. When there is no policy, the jar files will still land in +#<dist>/<module>/<date>/<platform> like they used to. + SOURCE_RELEASE_PREFIX = $(SOURCE_PREFIX)/release/no-policy + endif + endif +endif + +# +# <user_source_tree> cross-platform (xp) source-side master release directory +# + +SOURCE_RELEASE_XP_DIR = $(SOURCE_RELEASE_PREFIX) + +# +# <user_source_tree> cross-platform (xp) source-side release directories +# + +SOURCE_RELEASE_CLASSES_DIR = classes +SOURCE_RELEASE_CLASSES_DBG_DIR = classes_DBG +SOURCE_RELEASE_XPHEADERS_DIR = include + +# +# <user_source_tree> cross-platform (xp) JAR source-side release files +# + +XPCLASS_JAR = xpclass.jar +XPCLASS_DBG_JAR = xpclass_dbg.jar +XPHEADER_JAR = xpheader.jar + +ifdef BUILD_OPT + IMPORT_XPCLASS_JAR = $(XPCLASS_JAR) +else + IMPORT_XPCLASS_JAR = $(XPCLASS_DBG_JAR) +endif + +# +# <user_source_tree> machine-dependent (md) source-side master release directory +# + +SOURCE_RELEASE_MD_DIR = $(PLATFORM) + +# +# <user_source_tree> machine-dependent (md) source-side release directories +# + +SOURCE_RELEASE_BIN_DIR = $(PLATFORM)/bin +SOURCE_RELEASE_LIB_DIR = $(PLATFORM)/lib +SOURCE_RELEASE_MDHEADERS_DIR = $(PLATFORM)/include +SOURCE_RELEASE_SPEC_DIR = $(SOURCE_RELEASE_MD_DIR) + +# +# <user_source_tree> machine-dependent (md) JAR/tar source-side release files +# + +MDBINARY_JAR = mdbinary.jar +MDHEADER_JAR = mdheader.jar + + +# Where to put the results + +ifneq ($(RESULTS_DIR),) + RESULTS_DIR = $(RELEASE_TREE)/sectools/results +endif + +MK_SOURCE = included diff --git a/security/coreconf/suffix.mk b/security/coreconf/suffix.mk new file mode 100644 index 000000000..4366befc4 --- /dev/null +++ b/security/coreconf/suffix.mk @@ -0,0 +1,95 @@ +# +# The contents of this file are subject to the Mozilla Public +# License Version 1.1 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy of +# the License at http://www.mozilla.org/MPL/ +# +# Software distributed under the License is distributed on an "AS +# IS" basis, WITHOUT WARRANTY OF ANY KIND, 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 Netscape are +# Copyright (C) 1994-2000 Netscape Communications Corporation. All +# Rights Reserved. +# +# Contributor(s): +# +# Alternatively, the contents of this file may be used under the +# terms of the GNU General Public License Version 2 or later (the +# "GPL"), in which case the provisions of the GPL are applicable +# instead of those above. If you wish to allow use of your +# version of this file only under the terms of the GPL and not to +# allow others to use your version of this file under the MPL, +# indicate your decision by deleting the provisions above and +# replace them with the notice and other provisions required by +# the GPL. If you do not delete the provisions above, a recipient +# may use your version of this file under either the MPL or the +# GPL. +# + +####################################################################### +# Master "Core Components" suffixes # +####################################################################### + +# +# Object suffixes (OS2 and WIN% override this) +# +ifndef OBJ_SUFFIX + OBJ_SUFFIX = .o +endif + +# +# Assembler source suffixes (OS2 and WIN% override this) +# +ifndef ASM_SUFFIX + ASM_SUFFIX = .s +endif + +# +# Library suffixes +# +STATIC_LIB_EXTENSION = + +ifndef DYNAMIC_LIB_EXTENSION + DYNAMIC_LIB_EXTENSION = +endif + + +ifndef STATIC_LIB_SUFFIX + STATIC_LIB_SUFFIX = .$(LIB_SUFFIX) +endif + + +ifndef DYNAMIC_LIB_SUFFIX + DYNAMIC_LIB_SUFFIX = .$(DLL_SUFFIX) +endif + +# WIN% overridese this +ifndef IMPORT_LIB_SUFFIX + IMPORT_LIB_SUFFIX = +endif + + +ifndef STATIC_LIB_SUFFIX_FOR_LINKING + STATIC_LIB_SUFFIX_FOR_LINKING = $(STATIC_LIB_SUFFIX) +endif + + +# WIN% overridese this +ifndef DYNAMIC_LIB_SUFFIX_FOR_LINKING + DYNAMIC_LIB_SUFFIX_FOR_LINKING = $(DYNAMIC_LIB_SUFFIX) +endif + +# +# Program suffixes (OS2 and WIN% override this) +# + +ifndef PROG_SUFFIX + PROG_SUFFIX = +endif + +MK_SUFFIX = included diff --git a/security/coreconf/tree.mk b/security/coreconf/tree.mk new file mode 100644 index 000000000..273a47c1e --- /dev/null +++ b/security/coreconf/tree.mk @@ -0,0 +1,80 @@ +# +# The contents of this file are subject to the Mozilla Public +# License Version 1.1 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy of +# the License at http://www.mozilla.org/MPL/ +# +# Software distributed under the License is distributed on an "AS +# IS" basis, WITHOUT WARRANTY OF ANY KIND, 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 Netscape are +# Copyright (C) 1994-2000 Netscape Communications Corporation. All +# Rights Reserved. +# +# Contributor(s): +# +# Alternatively, the contents of this file may be used under the +# terms of the GNU General Public License Version 2 or later (the +# "GPL"), in which case the provisions of the GPL are applicable +# instead of those above. If you wish to allow use of your +# version of this file only under the terms of the GPL and not to +# allow others to use your version of this file under the MPL, +# indicate your decision by deleting the provisions above and +# replace them with the notice and other provisions required by +# the GPL. If you do not delete the provisions above, a recipient +# may use your version of this file under either the MPL or the +# GPL. +# + +####################################################################### +# Master "Core Components" file system "release" prefixes # +####################################################################### + +# Windows platforms override this. See WIN32.mk or WIN16.mk. +ifndef RELEASE_TREE + ifdef BUILD_SHIP + ifdef USE_SHIPS + RELEASE_TREE = $(BUILD_SHIP) + else + RELEASE_TREE = /share/builds/components + endif + else + RELEASE_TREE = /share/builds/components + endif +endif + +# +# NOTE: export control policy enforced for XP and MD files +# released to the binary release tree +# + +ifeq ($(POLICY), domestic) + RELEASE_XP_DIR = domestic + RELEASE_MD_DIR = domestic/$(PLATFORM) +else + ifeq ($(POLICY), export) + RELEASE_XP_DIR = export + RELEASE_MD_DIR = export/$(PLATFORM) + else + ifeq ($(POLICY), france) + RELEASE_XP_DIR = france + RELEASE_MD_DIR = france/$(PLATFORM) + else + RELEASE_XP_DIR = + RELEASE_MD_DIR = $(PLATFORM) + endif + endif +endif + + +REPORTER_TREE = $(subst \,\\,$(RELEASE_TREE)) + +IMPORT_XP_DIR = +IMPORT_MD_DIR = $(PLATFORM) + +MK_TREE = included diff --git a/security/coreconf/version.mk b/security/coreconf/version.mk new file mode 100644 index 000000000..7d459a95f --- /dev/null +++ b/security/coreconf/version.mk @@ -0,0 +1,105 @@ +# +# The contents of this file are subject to the Mozilla Public +# License Version 1.1 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy of +# the License at http://www.mozilla.org/MPL/ +# +# Software distributed under the License is distributed on an "AS +# IS" basis, WITHOUT WARRANTY OF ANY KIND, 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 Netscape are +# Copyright (C) 1994-2000 Netscape Communications Corporation. All +# Rights Reserved. +# +# Contributor(s): +# +# Alternatively, the contents of this file may be used under the +# terms of the GNU General Public License Version 2 or later (the +# "GPL"), in which case the provisions of the GPL are applicable +# instead of those above. If you wish to allow use of your +# version of this file only under the terms of the GPL and not to +# allow others to use your version of this file under the MPL, +# indicate your decision by deleting the provisions above and +# replace them with the notice and other provisions required by +# the GPL. If you do not delete the provisions above, a recipient +# may use your version of this file under either the MPL or the +# GPL. +# + +####################################################################### +# Build master "Core Components" release version directory name # +####################################################################### + +# +# Always set CURRENT_VERSION_SYMLINK to the <current> symbolic link. +# + +CURRENT_VERSION_SYMLINK = current + + +# +# For the sake of backwards compatibility (*sigh*) ... +# + +ifndef VERSION + ifdef BUILD_NUM + VERSION = $(BUILD_NUM) + endif +endif + +ifndef RELEASE_VERSION + ifdef BUILD_NUM + RELEASE_VERSION = $(BUILD_NUM) + endif +endif + +# +# If VERSION has still NOT been set on the command line, +# as an environment variable, by the individual Makefile, or +# by the <component>-specific "version.mk" file, set VERSION equal +# to $(CURRENT_VERSION_SYMLINK). + +ifndef VERSION + VERSION = $(CURRENT_VERSION_SYMLINK) +endif + +# If RELEASE_VERSION has still NOT been set on the command line, +# as an environment variable, by the individual Makefile, or +# by the <component>-specific "version.mk" file, automatically +# generate the next available version number via a perl script. +# + +ifndef RELEASE_VERSION + RELEASE_VERSION = +endif + +# +# Set <component>-specific versions for compiliation and linkage. +# + +ifndef JAVA_VERSION + JAVA_VERSION = $(CURRENT_VERSION_SYMLINK) +endif + +ifndef NETLIB_VERSION + NETLIB_VERSION = $(CURRENT_VERSION_SYMLINK) +endif + +ifndef NSPR_VERSION + NSPR_VERSION = $(CURRENT_VERSION_SYMLINK) +endif + +ifndef SECTOOLS_VERSION + SECTOOLS_VERSION = $(CURRENT_VERSION_SYMLINK) +endif + +ifndef SECURITY_VERSION + SECURITY_VERSION = $(CURRENT_VERSION_SYMLINK) +endif + +MK_VERSION = included diff --git a/security/coreconf/version.pl b/security/coreconf/version.pl new file mode 100644 index 000000000..47a71395b --- /dev/null +++ b/security/coreconf/version.pl @@ -0,0 +1,76 @@ +#!/usr/sbin/perl +# +# The contents of this file are subject to the Mozilla Public +# License Version 1.1 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy of +# the License at http://www.mozilla.org/MPL/ +# +# Software distributed under the License is distributed on an "AS +# IS" basis, WITHOUT WARRANTY OF ANY KIND, 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 Netscape are +# Copyright (C) 1994-2000 Netscape Communications Corporation. All +# Rights Reserved. +# +# Contributor(s): +# +# Alternatively, the contents of this file may be used under the +# terms of the GNU General Public License Version 2 or later (the +# "GPL"), in which case the provisions of the GPL are applicable +# instead of those above. If you wish to allow use of your +# version of this file only under the terms of the GPL and not to +# allow others to use your version of this file under the MPL, +# indicate your decision by deleting the provisions above and +# replace them with the notice and other provisions required by +# the GPL. If you do not delete the provisions above, a recipient +# may use your version of this file under either the MPL or the +# GPL. +# + +# Compose lowercase alphabet +@alphabet = ( "a", "b", "c", "d", "e", "f", "g", "h", + "i", "j", "k", "l", "m", "n", "o", "p", + "q", "r", "s", "t", "u", "v", "w", "x", + "y", "z" ); + +# Compute year +$year = (localtime)[5] + 1900; + +# Compute month +$month = (localtime)[4] + 1; + +# Compute day +$day = (localtime)[3]; + +# Compute base build number +$version = sprintf( "%d%02d%02d", $year, $month, $day ); +$directory = sprintf( "%s\/%s\/%d%02d%02d", $ARGV[0], $ARGV[1], $year, $month, $day ); + +# Print out the name of the first version directory which does not exist +#if( ! -e $directory ) +#{ + print $version; +#} +#else +#{ +# # Loop through combinations +# foreach $ch1 (@alphabet) +# { +# foreach $ch2 (@alphabet) +# { +# $version = sprintf( "%d%02d%02d%s%s", $year, $month, $day, $ch1, $ch2 ); +# $directory = sprintf( "%s\/%s\/%d%02d%02d%s%s", $ARGV[0], $ARGV[1], $year, $month, $day, $ch1, $ch2 ); +# if( ! -e $directory ) +# { +# print STDOUT $version; +# exit; +# } +# } +# } +#} + diff --git a/security/dbm/Makefile b/security/dbm/Makefile new file mode 100644 index 000000000..34cd6d899 --- /dev/null +++ b/security/dbm/Makefile @@ -0,0 +1,80 @@ +#! gmake +# +# The contents of this file are subject to the Mozilla Public +# License Version 1.1 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy of +# the License at http://www.mozilla.org/MPL/ +# +# Software distributed under the License is distributed on an "AS +# IS" basis, WITHOUT WARRANTY OF ANY KIND, 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 Netscape are +# Copyright (C) 1994-2000 Netscape Communications Corporation. All +# Rights Reserved. +# +# Contributor(s): +# +# Alternatively, the contents of this file may be used under the +# terms of the GNU General Public License Version 2 or later (the +# "GPL"), in which case the provisions of the GPL are applicable +# instead of those above. If you wish to allow use of your +# version of this file only under the terms of the GPL and not to +# allow others to use your version of this file under the MPL, +# indicate your decision by deleting the provisions above and +# replace them with the notice and other provisions required by +# the GPL. If you do not delete the provisions above, a recipient +# may use your version of this file under either the MPL or the +# GPL. +# + +####################################################################### +# (1) Include initial platform-independent assignments (MANDATORY). # +####################################################################### + +include manifest.mn + +####################################################################### +# (2) Include "global" configuration information. (OPTIONAL) # +####################################################################### + +include $(CORE_DEPTH)/coreconf/config.mk + +####################################################################### +# (3) Include "component" configuration information. (OPTIONAL) # +####################################################################### + + + +####################################################################### +# (4) Include "local" platform-dependent assignments (OPTIONAL). # +####################################################################### + + + +####################################################################### +# (5) Execute "global" rules. (OPTIONAL) # +####################################################################### + +include $(CORE_DEPTH)/coreconf/rules.mk + +####################################################################### +# (6) Execute "component" rules. (OPTIONAL) # +####################################################################### + + + +####################################################################### +# (7) Execute "local" rules. (OPTIONAL). # +####################################################################### + +coreconf_hack: + cd ../coreconf; gmake + gmake import + +RelEng_bld: coreconf_hack + gmake diff --git a/security/dbm/config/config.mk b/security/dbm/config/config.mk new file mode 100644 index 000000000..753364931 --- /dev/null +++ b/security/dbm/config/config.mk @@ -0,0 +1,67 @@ +#! gmake +# +# The contents of this file are subject to the Mozilla Public +# License Version 1.1 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy of +# the License at http://www.mozilla.org/MPL/ +# +# Software distributed under the License is distributed on an "AS +# IS" basis, WITHOUT WARRANTY OF ANY KIND, 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 Netscape are +# Copyright (C) 1994-2000 Netscape Communications Corporation. All +# Rights Reserved. +# +# Contributor(s): +# +# Alternatively, the contents of this file may be used under the +# terms of the GNU General Public License Version 2 or later (the +# "GPL"), in which case the provisions of the GPL are applicable +# instead of those above. If you wish to allow use of your +# version of this file only under the terms of the GPL and not to +# allow others to use your version of this file under the MPL, +# indicate your decision by deleting the provisions above and +# replace them with the notice and other provisions required by +# the GPL. If you do not delete the provisions above, a recipient +# may use your version of this file under either the MPL or the +# GPL. +# + +# +# These macros are defined by mozilla's configure script. +# We define them manually here. +# + +DEFINES += -DSTDC_HEADERS -DHAVE_STRERROR + +# +# Most platforms have snprintf, so it's simpler to list the exceptions. +# +HAVE_SNPRINTF = 1 +# +# OSF1 V4.0D doesn't have snprintf but V5.0A does. +# +ifeq ($(OS_TARGET)$(OS_RELEASE),OSF1V4.0D) +HAVE_SNPRINTF = +endif +ifdef HAVE_SNPRINTF +DEFINES += -DHAVE_SNPRINTF +endif + +ifeq (,$(filter-out IRIX Linux,$(OS_TARGET))) +DEFINES += -DHAVE_SYS_CDEFS_H +endif + +ifeq (,$(filter-out DGUX NCR ReliantUNIX SCO_SV SCOOS UNIXWARE,$(OS_TARGET))) +DEFINES += -DHAVE_SYS_BYTEORDER_H +endif + +# +# None of the platforms that we are interested in need to +# define HAVE_MEMORY_H. +# diff --git a/security/dbm/include/Makefile b/security/dbm/include/Makefile new file mode 100644 index 000000000..ba4dd8ddf --- /dev/null +++ b/security/dbm/include/Makefile @@ -0,0 +1,76 @@ +#! gmake +# +# The contents of this file are subject to the Mozilla Public +# License Version 1.1 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy of +# the License at http://www.mozilla.org/MPL/ +# +# Software distributed under the License is distributed on an "AS +# IS" basis, WITHOUT WARRANTY OF ANY KIND, 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 Netscape are +# Copyright (C) 1994-2000 Netscape Communications Corporation. All +# Rights Reserved. +# +# Contributor(s): +# +# Alternatively, the contents of this file may be used under the +# terms of the GNU General Public License Version 2 or later (the +# "GPL"), in which case the provisions of the GPL are applicable +# instead of those above. If you wish to allow use of your +# version of this file only under the terms of the GPL and not to +# allow others to use your version of this file under the MPL, +# indicate your decision by deleting the provisions above and +# replace them with the notice and other provisions required by +# the GPL. If you do not delete the provisions above, a recipient +# may use your version of this file under either the MPL or the +# GPL. +# + +####################################################################### +# (1) Include initial platform-independent assignments (MANDATORY). # +####################################################################### + +include manifest.mn + +####################################################################### +# (2) Include "global" configuration information. (OPTIONAL) # +####################################################################### + +include $(CORE_DEPTH)/coreconf/config.mk + +####################################################################### +# (3) Include "component" configuration information. (OPTIONAL) # +####################################################################### + + + +####################################################################### +# (4) Include "local" platform-dependent assignments (OPTIONAL). # +####################################################################### + + + +####################################################################### +# (5) Execute "global" rules. (OPTIONAL) # +####################################################################### + +include $(CORE_DEPTH)/coreconf/rules.mk + +####################################################################### +# (6) Execute "component" rules. (OPTIONAL) # +####################################################################### + + + +####################################################################### +# (7) Execute "local" rules. (OPTIONAL). # +####################################################################### + + + diff --git a/security/dbm/include/manifest.mn b/security/dbm/include/manifest.mn new file mode 100644 index 000000000..886fedd98 --- /dev/null +++ b/security/dbm/include/manifest.mn @@ -0,0 +1,57 @@ +#! gmake +# +# The contents of this file are subject to the Mozilla Public +# License Version 1.1 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy of +# the License at http://www.mozilla.org/MPL/ +# +# Software distributed under the License is distributed on an "AS +# IS" basis, WITHOUT WARRANTY OF ANY KIND, 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 Netscape are +# Copyright (C) 1994-2000 Netscape Communications Corporation. All +# Rights Reserved. +# +# Contributor(s): +# +# Alternatively, the contents of this file may be used under the +# terms of the GNU General Public License Version 2 or later (the +# "GPL"), in which case the provisions of the GPL are applicable +# instead of those above. If you wish to allow use of your +# version of this file only under the terms of the GPL and not to +# allow others to use your version of this file under the MPL, +# indicate your decision by deleting the provisions above and +# replace them with the notice and other provisions required by +# the GPL. If you do not delete the provisions above, a recipient +# may use your version of this file under either the MPL or the +# GPL. +# + +CORE_DEPTH = ../.. + +VPATH = $(CORE_DEPTH)/../dbm/include + +MODULE = dbm + +EXPORTS = nsres.h \ + cdefs.h \ + mcom_db.h \ + ncompat.h \ + winfile.h \ + $(NULL) + +PRIVATE_EXPORTS = hsearch.h \ + page.h \ + extern.h \ + ndbm.h \ + queue.h \ + hash.h \ + mpool.h \ + search.h \ + $(NULL) + diff --git a/security/dbm/manifest.mn b/security/dbm/manifest.mn new file mode 100644 index 000000000..11f4f4237 --- /dev/null +++ b/security/dbm/manifest.mn @@ -0,0 +1,45 @@ +#! gmake +# +# The contents of this file are subject to the Mozilla Public +# License Version 1.1 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy of +# the License at http://www.mozilla.org/MPL/ +# +# Software distributed under the License is distributed on an "AS +# IS" basis, WITHOUT WARRANTY OF ANY KIND, 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 Netscape are +# Copyright (C) 1994-2000 Netscape Communications Corporation. All +# Rights Reserved. +# +# Contributor(s): +# +# Alternatively, the contents of this file may be used under the +# terms of the GNU General Public License Version 2 or later (the +# "GPL"), in which case the provisions of the GPL are applicable +# instead of those above. If you wish to allow use of your +# version of this file only under the terms of the GPL and not to +# allow others to use your version of this file under the MPL, +# indicate your decision by deleting the provisions above and +# replace them with the notice and other provisions required by +# the GPL. If you do not delete the provisions above, a recipient +# may use your version of this file under either the MPL or the +# GPL. +# + +CORE_DEPTH = .. + +MODULE = dbm + +IMPORTS = nspr20/v4.1.2 + +RELEASE = dbm + +DIRS = include \ + src \ + $(NULL) diff --git a/security/dbm/src/Makefile b/security/dbm/src/Makefile new file mode 100644 index 000000000..8fce98394 --- /dev/null +++ b/security/dbm/src/Makefile @@ -0,0 +1,76 @@ +#! gmake +# +# The contents of this file are subject to the Mozilla Public +# License Version 1.1 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy of +# the License at http://www.mozilla.org/MPL/ +# +# Software distributed under the License is distributed on an "AS +# IS" basis, WITHOUT WARRANTY OF ANY KIND, 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 Netscape are +# Copyright (C) 1994-2000 Netscape Communications Corporation. All +# Rights Reserved. +# +# Contributor(s): +# +# Alternatively, the contents of this file may be used under the +# terms of the GNU General Public License Version 2 or later (the +# "GPL"), in which case the provisions of the GPL are applicable +# instead of those above. If you wish to allow use of your +# version of this file only under the terms of the GPL and not to +# allow others to use your version of this file under the MPL, +# indicate your decision by deleting the provisions above and +# replace them with the notice and other provisions required by +# the GPL. If you do not delete the provisions above, a recipient +# may use your version of this file under either the MPL or the +# GPL. +# + +####################################################################### +# (1) Include initial platform-independent assignments (MANDATORY). # +####################################################################### + +include manifest.mn + +####################################################################### +# (2) Include "global" configuration information. (OPTIONAL) # +####################################################################### + +include $(CORE_DEPTH)/coreconf/config.mk + +####################################################################### +# (3) Include "component" configuration information. (OPTIONAL) # +####################################################################### + +include $(CORE_DEPTH)/dbm/config/config.mk + +####################################################################### +# (4) Include "local" platform-dependent assignments (OPTIONAL). # +####################################################################### + +include config.mk + +####################################################################### +# (5) Execute "global" rules. (OPTIONAL) # +####################################################################### + +include $(CORE_DEPTH)/coreconf/rules.mk + +####################################################################### +# (6) Execute "component" rules. (OPTIONAL) # +####################################################################### + + + +####################################################################### +# (7) Execute "local" rules. (OPTIONAL). # +####################################################################### + + + diff --git a/security/dbm/src/config.mk b/security/dbm/src/config.mk new file mode 100644 index 000000000..370fd75d6 --- /dev/null +++ b/security/dbm/src/config.mk @@ -0,0 +1,63 @@ +#! gmake +# +# The contents of this file are subject to the Mozilla Public +# License Version 1.1 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy of +# the License at http://www.mozilla.org/MPL/ +# +# Software distributed under the License is distributed on an "AS +# IS" basis, WITHOUT WARRANTY OF ANY KIND, 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 Netscape are +# Copyright (C) 1994-2000 Netscape Communications Corporation. All +# Rights Reserved. +# +# Contributor(s): +# +# Alternatively, the contents of this file may be used under the +# terms of the GNU General Public License Version 2 or later (the +# "GPL"), in which case the provisions of the GPL are applicable +# instead of those above. If you wish to allow use of your +# version of this file only under the terms of the GPL and not to +# allow others to use your version of this file under the MPL, +# indicate your decision by deleting the provisions above and +# replace them with the notice and other provisions required by +# the GPL. If you do not delete the provisions above, a recipient +# may use your version of this file under either the MPL or the +# GPL. +# + +DEFINES += -DMEMMOVE -D__DBINTERFACE_PRIVATE $(SECURITY_FLAG) + +INCLUDES += -I$(CORE_DEPTH)/../dbm/include + +# +# Currently, override TARGETS variable so that only static libraries +# are specifed as dependencies within rules.mk. +# + +TARGETS = $(LIBRARY) +SHARED_LIBRARY = +IMPORT_LIBRARY = +PURE_LIBRARY = +PROGRAM = + +ifdef SHARED_LIBRARY + ifeq (,$(filter-out WINNT WIN95 WINCE,$(OS_TARGET))) # list omits WIN16 + DLLBASE=/BASE:0x30000000 + RES=$(OBJDIR)/dbm.res + RESNAME=../include/dbm.rc + endif + ifeq ($(DLL_SUFFIX),dll) + DEFINES += -D_DLL + endif +endif + +ifeq ($(OS_TARGET),AIX) + OS_LIBS += -lc_r +endif diff --git a/security/dbm/src/dirent.c b/security/dbm/src/dirent.c new file mode 100644 index 000000000..001a48c5c --- /dev/null +++ b/security/dbm/src/dirent.c @@ -0,0 +1,348 @@ +#ifdef OS2 + +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#include <ctype.h> + +#include <dirent.h> +#include <errno.h> + +/*#ifndef __EMX__ +#include <libx.h> +#endif */ + +#define INCL_DOSFILEMGR +#define INCL_DOSERRORS +#include <os2.h> + +#if OS2 >= 2 +# define FFBUF FILEFINDBUF3 +# define Word ULONG + /* + * LS20 recommends a request count of 100, but according to the + * APAR text it does not lead to missing files, just to funny + * numbers of returned entries. + * + * LS30 HPFS386 requires a count greater than 2, or some files + * are missing (those starting with a character less that '.'). + * + * Novell looses entries which overflow the buffer. In previous + * versions of dirent2, this could have lead to missing files + * when the average length of 100 directory entries was 40 bytes + * or more (quite unlikely for files on a Novell server). + * + * Conclusion: Make sure that the entries all fit into the buffer + * and that the buffer is large enough for more than 2 entries + * (each entry is at most 300 bytes long). And ignore the LS20 + * effect. + */ +# define Count 25 +# define BufSz (25 * (sizeof(FILEFINDBUF3)+1)) +#else +# define FFBUF FILEFINDBUF +# define Word USHORT +# define BufSz 1024 +# define Count 3 +#endif + +#if defined(__IBMC__) || defined(__IBMCPP__) + #define error(rc) _doserrno = rc, errno = EOS2ERR +#elif defined(MICROSOFT) + #define error(rc) _doserrno = rc, errno = 255 +#else + #define error(rc) errno = 255 +#endif + +struct _dirdescr { + HDIR handle; /* DosFindFirst handle */ + char fstype; /* filesystem type */ + Word count; /* valid entries in <ffbuf> */ + long number; /* absolute number of next entry */ + int index; /* relative number of next entry */ + FFBUF * next; /* pointer to next entry */ + char name[MAXPATHLEN+3]; /* directory name */ + unsigned attrmask; /* attribute mask for seekdir */ + struct dirent entry; /* buffer for directory entry */ + BYTE ffbuf[BufSz]; +}; + +/* + * Return first char of filesystem type, or 0 if unknown. + */ +static char +getFSType(const char *path) +{ + static char cache[1+26]; + char drive[3], info[512]; + Word unit, infolen; + char r; + + if (isalpha(path[0]) && path[1] == ':') { + unit = toupper(path[0]) - '@'; + path += 2; + } else { + ULONG driveMap; +#if OS2 >= 2 + if (DosQueryCurrentDisk(&unit, &driveMap)) +#else + if (DosQCurDisk(&unit, &driveMap)) +#endif + return 0; + } + + if ((path[0] == '\\' || path[0] == '/') + && (path[1] == '\\' || path[1] == '/')) + return 0; + + if (cache [unit]) + return cache [unit]; + + drive[0] = '@' + unit; + drive[1] = ':'; + drive[2] = '\0'; + infolen = sizeof info; +#if OS2 >= 2 + if (DosQueryFSAttach(drive, 0, FSAIL_QUERYNAME, (PVOID)info, &infolen)) + return 0; + if (infolen >= sizeof(FSQBUFFER2)) { + FSQBUFFER2 *p = (FSQBUFFER2 *)info; + r = p->szFSDName[p->cbName]; + } else +#else + if (DosQFSAttach((PSZ)drive, 0, FSAIL_QUERYNAME, (PVOID)info, &infolen, 0)) + return 0; + if (infolen >= 9) { + char *p = info + sizeof(USHORT); + p += sizeof(USHORT) + *(USHORT *)p + 1 + sizeof(USHORT); + r = *p; + } else +#endif + r = 0; + return cache [unit] = r; +} + +char * +abs_path(const char *name, char *buffer, int len) +{ + char buf[4]; + if (isalpha(name[0]) && name[1] == ':' && name[2] == '\0') { + buf[0] = name[0]; + buf[1] = name[1]; + buf[2] = '.'; + buf[3] = '\0'; + name = buf; + } +#if OS2 >= 2 + if (DosQueryPathInfo((PSZ)name, FIL_QUERYFULLNAME, buffer, len)) +#else + if (DosQPathInfo((PSZ)name, FIL_QUERYFULLNAME, (PBYTE)buffer, len, 0L)) +#endif + return NULL; + return buffer; +} + +DIR * +openxdir(const char *path, unsigned att_mask) +{ + DIR *dir; + char name[MAXPATHLEN+3]; + Word rc; + + dir = malloc(sizeof(DIR)); + if (dir == NULL) { + errno = ENOMEM; + return NULL; + } + + strncpy(name, path, MAXPATHLEN); + name[MAXPATHLEN] = '\0'; + switch (name[strlen(name)-1]) { + default: + strcat(name, "\\"); + case '\\': + case '/': + case ':': + ; + } + strcat(name, "."); + if (!abs_path(name, dir->name, MAXPATHLEN+1)) + strcpy(dir->name, name); + if (dir->name[strlen(dir->name)-1] == '\\') + strcat(dir->name, "*"); + else + strcat(dir->name, "\\*"); + + dir->fstype = getFSType(dir->name); + dir->attrmask = att_mask | A_DIR; + + dir->handle = HDIR_CREATE; + dir->count = 100; +#if OS2 >= 2 + rc = DosFindFirst(dir->name, &dir->handle, dir->attrmask, + dir->ffbuf, sizeof dir->ffbuf, &dir->count, FIL_STANDARD); +#else + rc = DosFindFirst((PSZ)dir->name, &dir->handle, dir->attrmask, + (PFILEFINDBUF)dir->ffbuf, sizeof dir->ffbuf, &dir->count, 0); +#endif + switch (rc) { + default: + free(dir); + error(rc); + return NULL; + case NO_ERROR: + case ERROR_NO_MORE_FILES: + ; + } + + dir->number = 0; + dir->index = 0; + dir->next = (FFBUF *)dir->ffbuf; + + return (DIR *)dir; +} + +DIR * +opendir(const char *pathname) +{ + return openxdir(pathname, 0); +} + +struct dirent * +readdir(DIR *dir) +{ + static int dummy_ino = 2; + + if (dir->index == dir->count) { + Word rc; + dir->count = 100; +#if OS2 >= 2 + rc = DosFindNext(dir->handle, dir->ffbuf, + sizeof dir->ffbuf, &dir->count); +#else + rc = DosFindNext(dir->handle, (PFILEFINDBUF)dir->ffbuf, + sizeof dir->ffbuf, &dir->count); +#endif + if (rc) { + error(rc); + return NULL; + } + + dir->index = 0; + dir->next = (FFBUF *)dir->ffbuf; + } + + if (dir->index == dir->count) + return NULL; + + memcpy(dir->entry.d_name, dir->next->achName, dir->next->cchName); + dir->entry.d_name[dir->next->cchName] = '\0'; + dir->entry.d_ino = dummy_ino++; + dir->entry.d_reclen = dir->next->cchName; + dir->entry.d_namlen = dir->next->cchName; + dir->entry.d_size = dir->next->cbFile; + dir->entry.d_attribute = dir->next->attrFile; + dir->entry.d_time = *(USHORT *)&dir->next->ftimeLastWrite; + dir->entry.d_date = *(USHORT *)&dir->next->fdateLastWrite; + + switch (dir->fstype) { + case 'F': /* FAT */ + case 'C': /* CDFS */ + if (dir->next->attrFile & FILE_DIRECTORY) + strupr(dir->entry.d_name); + else + strlwr(dir->entry.d_name); + } + +#if OS2 >= 2 + dir->next = (FFBUF *)((BYTE *)dir->next + dir->next->oNextEntryOffset); +#else + dir->next = (FFBUF *)((BYTE *)dir->next->achName + dir->next->cchName + 1); +#endif + ++dir->number; + ++dir->index; + + return &dir->entry; +} + +long +telldir(DIR *dir) +{ + return dir->number; +} + +void +seekdir(DIR *dir, long off) +{ + if (dir->number > off) { + char name[MAXPATHLEN+2]; + Word rc; + + DosFindClose(dir->handle); + + strcpy(name, dir->name); + strcat(name, "*"); + + dir->handle = HDIR_CREATE; + dir->count = 32767; +#if OS2 >= 2 + rc = DosFindFirst(name, &dir->handle, dir->attrmask, + dir->ffbuf, sizeof dir->ffbuf, &dir->count, FIL_STANDARD); +#else + rc = DosFindFirst((PSZ)name, &dir->handle, dir->attrmask, + (PFILEFINDBUF)dir->ffbuf, sizeof dir->ffbuf, &dir->count, 0); +#endif + switch (rc) { + default: + error(rc); + return; + case NO_ERROR: + case ERROR_NO_MORE_FILES: + ; + } + + dir->number = 0; + dir->index = 0; + dir->next = (FFBUF *)dir->ffbuf; + } + + while (dir->number < off && readdir(dir)) + ; +} + +void +closedir(DIR *dir) +{ + DosFindClose(dir->handle); + free(dir); +} + +/*****************************************************************************/ + +#ifdef TEST + +main(int argc, char **argv) +{ + int i; + DIR *dir; + struct dirent *ep; + + for (i = 1; i < argc; ++i) { + dir = opendir(argv[i]); + if (!dir) + continue; + while (ep = readdir(dir)) + if (strchr("\\/:", argv[i] [strlen(argv[i]) - 1])) + printf("%s%s\n", argv[i], ep->d_name); + else + printf("%s/%s\n", argv[i], ep->d_name); + closedir(dir); + } + + return 0; +} + +#endif + +#endif /* OS2 */ + diff --git a/security/dbm/src/dirent.h b/security/dbm/src/dirent.h new file mode 100644 index 000000000..07a6c0ac8 --- /dev/null +++ b/security/dbm/src/dirent.h @@ -0,0 +1,97 @@ +#ifndef __DIRENT_H__ +#define __DIRENT_H__ +/* + * @(#)msd_dir.h 1.4 87/11/06 Public Domain. + * + * A public domain implementation of BSD directory routines for + * MS-DOS. Written by Michael Rendell ({uunet,utai}michael@garfield), + * August 1897 + * + * Extended by Peter Lim (lim@mullian.oz) to overcome some MS DOS quirks + * and returns 2 more pieces of information - file size & attribute. + * Plus a little reshuffling of some #define's positions December 1987 + * + * Some modifications by Martin Junius 02-14-89 + * + * AK900712 + * AK910410 abs_path - make absolute path + * + */ + +#ifdef __EMX__ +#include <sys/param.h> +#else +#if defined(__IBMC__) || defined(__IBMCPP__) || defined(XP_W32_MSVC) +#include <stdio.h> +#ifdef MAXPATHLEN + #undef MAXPATHLEN +#endif +#define MAXPATHLEN (FILENAME_MAX*4) +#define MAXNAMLEN FILENAME_MAX + +#else +#include <param.h> +#endif +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +/* attribute stuff */ +#ifndef A_RONLY +# define A_RONLY 0x01 +# define A_HIDDEN 0x02 +# define A_SYSTEM 0x04 +# define A_LABEL 0x08 +# define A_DIR 0x10 +# define A_ARCHIVE 0x20 +#endif + +struct dirent { +#if defined(OS2) || defined(WIN32) /* use the layout of EMX to avoid trouble */ + int d_ino; /* Dummy */ + int d_reclen; /* Dummy, same as d_namlen */ + int d_namlen; /* length of name */ + char d_name[MAXNAMLEN + 1]; + unsigned long d_size; + unsigned short d_attribute; /* attributes (see above) */ + unsigned short d_time; /* modification time */ + unsigned short d_date; /* modification date */ +#else + char d_name[MAXNAMLEN + 1]; /* garentee null termination */ + char d_attribute; /* .. extension .. */ + unsigned long d_size; /* .. extension .. */ +#endif +}; + +typedef struct _dirdescr DIR; +/* the structs do not have to be defined here */ + +extern DIR *opendir(const char *); +extern DIR *openxdir(const char *, unsigned); +extern struct dirent *readdir(DIR *); +extern void seekdir(DIR *, long); +extern long telldir(DIR *); +extern void closedir(DIR *); +#define rewinddir(dirp) seekdir(dirp, 0L) + +extern char * abs_path(const char *name, char *buffer, int len); + +#ifndef S_IFMT +#define S_IFMT ( S_IFDIR | S_IFREG ) +#endif + +#ifndef S_ISDIR +#define S_ISDIR( m ) (((m) & S_IFMT) == S_IFDIR) +#endif + +#ifndef S_ISREG +#define S_ISREG( m ) (((m) & S_IFMT) == S_IFREG) +#endif + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/security/dbm/src/manifest.mn b/security/dbm/src/manifest.mn new file mode 100644 index 000000000..80f2abfd0 --- /dev/null +++ b/security/dbm/src/manifest.mn @@ -0,0 +1,61 @@ +#! gmake +# +# The contents of this file are subject to the Mozilla Public +# License Version 1.1 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy of +# the License at http://www.mozilla.org/MPL/ +# +# Software distributed under the License is distributed on an "AS +# IS" basis, WITHOUT WARRANTY OF ANY KIND, 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 Netscape are +# Copyright (C) 1994-2000 Netscape Communications Corporation. All +# Rights Reserved. +# +# Contributor(s): +# +# Alternatively, the contents of this file may be used under the +# terms of the GNU General Public License Version 2 or later (the +# "GPL"), in which case the provisions of the GPL are applicable +# instead of those above. If you wish to allow use of your +# version of this file only under the terms of the GPL and not to +# allow others to use your version of this file under the MPL, +# indicate your decision by deleting the provisions above and +# replace them with the notice and other provisions required by +# the GPL. If you do not delete the provisions above, a recipient +# may use your version of this file under either the MPL or the +# GPL. +# + +CORE_DEPTH = ../.. + +VPATH = $(CORE_DEPTH)/../dbm/src + +MODULE = dbm + +# +# memmove.c, snprintf.c, and strerror.c are not in CSRCS because +# the Standard C Library has memmove and strerror and DBM is not +# using snprintf. +# + +CSRCS = db.c \ + h_bigkey.c \ + h_func.c \ + h_log2.c \ + h_page.c \ + hash.c \ + hash_buf.c \ + hsearch.c \ + mktemp.c \ + ndbm.c \ + nsres.c \ + dirent.c \ + $(NULL) + +LIBRARY_NAME = dbm diff --git a/security/dbm/tests/Makefile b/security/dbm/tests/Makefile new file mode 100644 index 000000000..fe132e19c --- /dev/null +++ b/security/dbm/tests/Makefile @@ -0,0 +1,69 @@ +#! gmake +# +# The contents of this file are subject to the Mozilla Public +# License Version 1.1 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy of +# the License at http://www.mozilla.org/MPL/ +# +# Software distributed under the License is distributed on an "AS +# IS" basis, WITHOUT WARRANTY OF ANY KIND, 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 Netscape are +# Copyright (C) 1994-2000 Netscape Communications Corporation. All +# Rights Reserved. +# +# Contributor(s): +# +# Alternatively, the contents of this file may be used under the +# terms of the GNU General Public License Version 2 or later (the +# "GPL"), in which case the provisions of the GPL are applicable +# instead of those above. If you wish to allow use of your +# version of this file only under the terms of the GPL and not to +# allow others to use your version of this file under the MPL, +# indicate your decision by deleting the provisions above and +# replace them with the notice and other provisions required by +# the GPL. If you do not delete the provisions above, a recipient +# may use your version of this file under either the MPL or the +# GPL. +# +DEPTH = ../.. +CORE_DEPTH = ../.. + +VPATH = $(CORE_DEPTH)/../dbm/tests + +MODULE = dbm + +CSRCS = lots.c + +PROGRAM = lots + +include $(DEPTH)/coreconf/config.mk + +include $(DEPTH)/dbm/config/config.mk + +ifeq (,$(filter-out WIN%,$(OS_TARGET))) +LIBDBM = ../src/$(PLATFORM)/dbm$(STATIC_LIB_SUFFIX) +else +LIBDBM = ../src/$(PLATFORM)/libdbm$(STATIC_LIB_SUFFIX) +endif + +INCLUDES += -I$(CORE_DEPTH)/../dbm/include + +LDFLAGS = $(LDOPTS) $(LIBDBM) + +include $(DEPTH)/coreconf/rules.mk + +lots.pure: lots + purify $(CC) -o lots.pure $(CFLAGS) $(OBJS) $(MYLIBS) + +crash: crash.o $(MYLIBS) + $(CC) -o crash $(CFLAGS) $^ + +crash.pure: crash.o $(MYLIBS) + purify $(CC) -o crash.pure $(CFLAGS) $^ + diff --git a/security/nss/cmd/certutil/certutil.c b/security/nss/cmd/certutil/certutil.c index 3b89e394e..0d7caafe5 100644 --- a/security/nss/cmd/certutil/certutil.c +++ b/security/nss/cmd/certutil/certutil.c @@ -695,22 +695,22 @@ ValidateCert(CERTCertDBHandle *handle, char *name, char *date, SECStatus rv; CERTCertificate *cert = NULL; int64 timeBoundary; - SECCertUsage usage; + SECCertificateUsage usage; CERTVerifyLog reallog; CERTVerifyLog *log = NULL; switch (*certUsage) { case 'C': - usage = certUsageSSLClient; + usage = certificateUsageSSLClient; break; case 'V': - usage = certUsageSSLServer; + usage = certificateUsageSSLServer; break; case 'S': - usage = certUsageEmailSigner; + usage = certificateUsageEmailSigner; break; case 'R': - usage = certUsageEmailRecipient; + usage = certificateUsageEmailRecipient; break; default: PORT_SetError (SEC_ERROR_INVALID_ARGS); @@ -747,8 +747,8 @@ ValidateCert(CERTCertDBHandle *handle, char *name, char *date, } } - rv = CERT_VerifyCert(handle, cert, checkSig, usage, - timeBoundary, pwdata, log); + rv = CERT_VerifyCertificate(handle, cert, checkSig, usage, + timeBoundary, pwdata, log, &usage); if ( log ) { if ( log->head == NULL ) { fprintf(stdout, "%s: certificate is valid\n", progName); diff --git a/security/nss/cmd/crlutil/crlutil.c b/security/nss/cmd/crlutil/crlutil.c index 5ccddf446..ef64fcd7a 100644 --- a/security/nss/cmd/crlutil/crlutil.c +++ b/security/nss/cmd/crlutil/crlutil.c @@ -45,6 +45,7 @@ #include "cert.h" #include "certdb.h" #include "nss.h" +#include "pk11func.h" #define SEC_CERT_DB_EXISTS 0 #define SEC_CREATE_CERT_DB 1 @@ -92,7 +93,6 @@ static void ListCRLNames (CERTCertDBHandle *certHandle, int crlType) CERTName *name = NULL; PRArenaPool *arena = NULL; SECStatus rv; - void *mark; do { arena = PORT_NewArena (SEC_ASN1_DEFAULT_ARENA_SIZE); @@ -173,12 +173,13 @@ static SECStatus DeleteCRL (CERTCertDBHandle *certHandle, char *name, int type) } SECStatus ImportCRL (CERTCertDBHandle *certHandle, char *url, int type, - PRFileDesc *inFile) + PRFileDesc *inFile, PRBool bypassChecks) { CERTCertificate *cert = NULL; CERTSignedCrl *crl = NULL; SECItem crlDER; int rv; + PRInt32 importOptions; crlDER.data = NULL; @@ -189,8 +190,13 @@ SECStatus ImportCRL (CERTCertDBHandle *certHandle, char *url, int type, SECU_PrintError(progName, "unable to read input file"); return (SECFailure); } - - crl = CERT_ImportCRL (certHandle, &crlDER, url, type, NULL); + + importOptions = CRL_IMPORT_DEFAULT_OPTIONS; + if (PR_TRUE == bypassChecks) { + importOptions |= CRL_IMPORT_BYPASS_CHECKS; + } + crl = PK11_ImportCRL(PK11_GetInternalKeySlot(), &crlDER, url, type, + NULL, importOptions, NULL, CRL_DECODE_DONT_COPY_DER); if (!crl) { const char *errString; @@ -213,7 +219,7 @@ static void Usage(char *progName) fprintf(stderr, "Usage: %s -L [-n nickname[ [-d keydir] [-t crlType]\n" " %s -D -n nickname [-d keydir]\n" - " %s -I -i crl -t crlType [-u url] [-d keydir]\n", + " %s -I -i crl -t crlType [-u url] [-d keydir] [-B]\n", progName, progName, progName); fprintf (stderr, "%-15s List CRL\n", "-L"); @@ -236,6 +242,7 @@ static void Usage(char *progName) fprintf(stderr, "%-20s CRL Types (default is SEC_CRL_TYPE):\n", " "); fprintf(stderr, "%-20s \t 0 - SEC_KRL_TYPE\n", " "); fprintf(stderr, "%-20s \t 1 - SEC_CRL_TYPE\n", " "); + fprintf(stderr, "\n%-20s Bypass CA certificate checks.\n", "-B"); exit(-1); } @@ -248,7 +255,6 @@ int main(int argc, char **argv) PRFileDesc *inFile; int listCRL; int importCRL; - int opt; int deleteCRL; int rv; char *nickName; @@ -257,6 +263,7 @@ int main(int argc, char **argv) PLOptState *optstate; PLOptStatus status; SECStatus secstatus; + PRBool bypassChecks = PR_FALSE; progName = strrchr(argv[0], '/'); progName = progName ? progName+1 : argv[0]; @@ -272,13 +279,17 @@ int main(int argc, char **argv) /* * Parse command line arguments */ - optstate = PL_CreateOptState(argc, argv, "IALd:i:Dn:Ct:u:"); + optstate = PL_CreateOptState(argc, argv, "BIALd:i:Dn:Ct:u:"); while ((status = PL_GetNextOpt(optstate)) == PL_OPT_OK) { switch (optstate->option) { case '?': Usage(progName); break; + case 'B': + bypassChecks = PR_TRUE; + break; + case 'C': listCRL = 1; break; @@ -353,7 +364,7 @@ int main(int argc, char **argv) else if (listCRL) ListCRL (certHandle, nickName, crlType); else if (importCRL) - rv = ImportCRL (certHandle, url, crlType, inFile); + rv = ImportCRL (certHandle, url, crlType, inFile, bypassChecks); return (rv); } diff --git a/security/nss/cmd/crmftest/testcrmf.c b/security/nss/cmd/crmftest/testcrmf.c index 42e02a38c..e9bb08bdb 100644 --- a/security/nss/cmd/crmftest/testcrmf.c +++ b/security/nss/cmd/crmftest/testcrmf.c @@ -1272,6 +1272,7 @@ certdb_name_cb(void *arg, int dbVersion) break; case 5: dbver = "5"; + break; case 4: default: dbver = ""; diff --git a/security/nss/cmd/modutil/README.TXT b/security/nss/cmd/modutil/README.TXT deleted file mode 100644 index 279e3ebe6..000000000 --- a/security/nss/cmd/modutil/README.TXT +++ /dev/null @@ -1,7 +0,0 @@ - CRYPTOGRAPHIC MODULE UTILITY (modutil)
- VERSION 1.0
- ===============================================
-
-The file specification.html documentats the software.
-
-The file pk11jar.html documents the PKCS #11 JAR format.
diff --git a/security/nss/cmd/pk12util/pk12util.c b/security/nss/cmd/pk12util/pk12util.c index 6c272b841..1a6163aab 100644 --- a/security/nss/cmd/pk12util/pk12util.c +++ b/security/nss/cmd/pk12util/pk12util.c @@ -54,8 +54,10 @@ Usage(char *progName) FPS "Usage: %s -i importfile [-d certdir] [-P dbprefix] [-h tokenname]\n", progName); FPS "\t\t [-k slotpwfile | -K slotpw] [-w p12filepwfile | -W p12filepw]\n"); + FPS "\t\t [-v]\n"); FPS "Usage: %s -o exportfile -n certname [-d certdir] [-P dbprefix]\n", progName); FPS "\t\t [-k slotpwfile | -K slotpw] [-w p12filepwfile | -W p12filepw]\n"); + FPS "\t\t [-v]\n"); exit(PK12UERR_USAGE); } @@ -711,7 +713,6 @@ enum { opt_Import, opt_SlotPWFile, opt_SlotPW, - opt_Mode, opt_Nickname, opt_Export, opt_P12FilePWFile, @@ -727,7 +728,6 @@ static secuCommandFlag pk12util_options[] = { /* opt_Import */ 'i', PR_TRUE, 0, PR_FALSE }, { /* opt_SlotPWFile */ 'k', PR_TRUE, 0, PR_FALSE }, { /* opt_SlotPW */ 'K', PR_TRUE, 0, PR_FALSE }, - { /* opt_Mode */ 'm', PR_TRUE, 0, PR_FALSE }, { /* opt_Nickname */ 'n', PR_TRUE, 0, PR_FALSE }, { /* opt_Export */ 'o', PR_TRUE, 0, PR_FALSE }, { /* opt_P12FilePWFile */ 'w', PR_TRUE, 0, PR_FALSE }, diff --git a/security/nss/cmd/signtool/README.TXT b/security/nss/cmd/signtool/README.TXT deleted file mode 100644 index db79ec992..000000000 --- a/security/nss/cmd/signtool/README.TXT +++ /dev/null @@ -1,119 +0,0 @@ - Signing Tool (signtool)
- 1.3 Release Notes
- ========================================
-
-Documentation is provided online at mozilla.org
-
-Problems or questions not covered by the online documentation can be
-discussed in the DevEdge Security Newsgroup.
-
-=== New Features in 1.3
-=======================
-
-The security library components have been upgraded to utilize NSS_2_7_1_RTM.
-This means that the maximum RSA keysize now supported should be 4096 bits.
-
-=== Zigbert 0.6 Support
-=======================
-This program was previously named Zigbert. The last version of zigbert
-was Zigbert 0.6. Because all the functionality of Zigbert is maintained in
-signtool 1.2, Zigbert is no longer supported. If you have problems
-using Zigbert, please upgrade to signtool 1.2.
-
-=== New Features in 1.2
-=======================
-
-Certificate Generation Improvements
------------------------------------
-Two new options have been added to control generation of self-signed object
-signing certificates with the -G option. The -s option takes the size (in bits)
-of the generated RSA private key. The -t option takes the name of the PKCS #11
-token on which to generate the keypair and install the certificate. Both
-options are optional. By default, the private key is 1024 bits and is generated
-on the internal software token.
-
-
-=== New Features in 1.1
-=======================
-
-File I/O
---------
-Signtool can now read its options from a command file specified with the -f
-option on the command line. The format for the file is described in the
-documentation.
-Error messages and informational output can be redirected to an output file
-by supplying the "--outfile" option on the command line or the "outfile="
-option in the command file.
-
-New Options
------------
-"--norecurse" tells Signtool not to recurse into subdirectories when signing
-directories or parsing HTML with the -J option.
-"--leavearc" tells Signtool not to delete the temporary .arc directories
-produced by the -J option. This can aid debugging.
-"--verbosity" tells Signtool how much information to display. 0 is the
-default. -1 suppresses most messages, except for errors.
-
-=== Bug Fixes in 1.1
-====================
-
--J option revamped
-------------------
-The -J option, which parses HTML files, extracts Java and Javascript code,
-and stores them in signed JAR files, has been re-implemented. Several bugs
-have been fixed:
-- CODEBASE attribute is no longer ignored
-- CLASS and SRC attributes can be be paths ("xxx/xxx/x.class") rather than
- just filenames ("x.class").
-- LINK tags are handled correctly
-- various HTML parsing bugs fixed
-- error messages are more informative
-
-No Password on Key Database
----------------------------
-If you had not yet set a Communicator password (which locks key3.db, the
-key database), signtool would fail with a cryptic error message whenever it
-attempted to verify the password. Now this condition is detected at the
-beginning of the program, and a more informative message is displayed.
-
--x and -e Options
------------------
-Previously, only one of each of these options could be specified on the command
-line. Now arbitrarily many can be specified. For example, to sign only files
-with .class or .js extensions, the arguments "-eclass -ejs" could both be
-specified. To exclude the directories "subdir1" and "subdir2" from signing,
-the arguments "-x subdir1 -x subdir2" could both be specified.
-
-New Features in 1.0
-===================
-
-Creation of JAR files
-----------------------
-The -Z option causes signtool to output a JAR file formed by storing the
-signed archive in ZIP format. This eliminates the need to use a separate ZIP
-utility. The -c option specifies the compression level of the resulting
-JAR file.
-
-Generation of Object-Signing Certificates and Keys
---------------------------------------------------
-The -G option will create a new, self-signed object-signing certificate
-which can be used for testing purposes. The generated certificate and
-associated public and private keys will be installed in the cert7.db and
-key3.db files in the directory specified with the -d option (unless the key
-is generated on an external token using the -t option). On Unix systems,
-if no directory is specified, the user's Netscape directory (~/.netscape)
-will be used. In addition, the certificate is output in X509 format to the
-files x509.raw and x509.cacert in the current directory. x509.cacert can
-be published on a web page and imported into browsers that visit that page.
-
-Extraction and Signing of JavaScript from HTML
-----------------------------------------------
-The -J option activates the same functionality provided by the signpages
-Perl script. It will parse a directory of html files, creating archives
-of the JavaScript called from the HTML. These archives are then signed and
-made into JAR files.
-
-Enhanced Smart Card Support
----------------------------
-Certificates that reside on smart cards are displayed when using the -L and
--l options.
diff --git a/security/nss/cmd/tests/Makefile b/security/nss/cmd/tests/Makefile new file mode 100644 index 000000000..da66e20df --- /dev/null +++ b/security/nss/cmd/tests/Makefile @@ -0,0 +1,73 @@ +#! gmake +# +# The contents of this file are subject to the Mozilla Public +# License Version 1.1 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy of +# the License at http://www.mozilla.org/MPL/ +# +# Software distributed under the License is distributed on an "AS +# IS" basis, WITHOUT WARRANTY OF ANY KIND, 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 Netscape are +# Copyright (C) 1994-2000 Netscape Communications Corporation. All +# Rights Reserved. +# +# Contributor(s): +# +# Alternatively, the contents of this file may be used under the +# terms of the GNU General Public License Version 2 or later (the +# "GPL"), in which case the provisions of the GPL are applicable +# instead of those above. If you wish to allow use of your +# version of this file only under the terms of the GPL and not to +# allow others to use your version of this file under the MPL, +# indicate your decision by deleting the provisions above and +# replace them with the notice and other provisions required by +# the GPL. If you do not delete the provisions above, a recipient +# may use your version of this file under either the MPL or the +# GPL. +# + +####################################################################### +# (1) Include initial platform-independent assignments (MANDATORY). # +####################################################################### + +include manifest.mn + +####################################################################### +# (2) Include "global" configuration information. (OPTIONAL) # +####################################################################### + +include $(CORE_DEPTH)/coreconf/config.mk + +####################################################################### +# (3) Include "component" configuration information. (OPTIONAL) # +####################################################################### + +####################################################################### +# (4) Include "local" platform-dependent assignments (OPTIONAL). # +####################################################################### +include ../platlibs.mk + +####################################################################### +# (5) Execute "global" rules. (OPTIONAL) # +####################################################################### + +include $(CORE_DEPTH)/coreconf/rules.mk + +####################################################################### +# (6) Execute "component" rules. (OPTIONAL) # +####################################################################### + + + +####################################################################### +# (7) Execute "local" rules. (OPTIONAL). # +####################################################################### + + +include ../platrules.mk diff --git a/security/nss/cmd/tests/manifest.mn b/security/nss/cmd/tests/manifest.mn new file mode 100644 index 000000000..528cc7678 --- /dev/null +++ b/security/nss/cmd/tests/manifest.mn @@ -0,0 +1,50 @@ +# +# The contents of this file are subject to the Mozilla Public +# License Version 1.1 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy of +# the License at http://www.mozilla.org/MPL/ +# +# Software distributed under the License is distributed on an "AS +# IS" basis, WITHOUT WARRANTY OF ANY KIND, 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 Netscape are +# Copyright (C) 1994-2000 Netscape Communications Corporation. All +# Rights Reserved. +# +# Contributor(s): +# +# Alternatively, the contents of this file may be used under the +# terms of the GNU General Public License Version 2 or later (the +# "GPL"), in which case the provisions of the GPL are applicable +# instead of those above. If you wish to allow use of your +# version of this file only under the terms of the GPL and not to +# allow others to use your version of this file under the MPL, +# indicate your decision by deleting the provisions above and +# replace them with the notice and other provisions required by +# the GPL. If you do not delete the provisions above, a recipient +# may use your version of this file under either the MPL or the +# GPL. +# + +CORE_DEPTH = ../../.. + +# MODULE public and private header directories are implicitly REQUIRED. +MODULE = security + +CSRCS = vercrt.c \ + vercrtfps.c + +# The MODULE is always implicitly required. +# Listing it here in REQUIRES makes it appear twice in the cc command line. +REQUIRES = dbm seccmd + +PROGRAMS = $(CSRCS:.c=) + +TARGETS = $(PROGRAMS) + +NO_MD_RELEASE = 1 diff --git a/security/nss/lib/dev/devobject.c b/security/nss/lib/dev/devobject.c deleted file mode 100644 index 7818cac93..000000000 --- a/security/nss/lib/dev/devobject.c +++ /dev/null @@ -1,1139 +0,0 @@ -/* - * The contents of this file are subject to the Mozilla Public - * License Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS - * IS" basis, WITHOUT WARRANTY OF ANY KIND, 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 Netscape are - * Copyright (C) 1994-2000 Netscape Communications Corporation. All - * Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the - * terms of the GNU General Public License Version 2 or later (the - * "GPL"), in which case the provisions of the GPL are applicable - * instead of those above. If you wish to allow use of your - * version of this file only under the terms of the GPL and not to - * allow others to use your version of this file under the MPL, - * indicate your decision by deleting the provisions above and - * replace them with the notice and other provisions required by - * the GPL. If you do not delete the provisions above, a recipient - * may use your version of this file under either the MPL or the - * GPL. - */ - -#ifdef DEBUG -static const char CVS_ID[] = "@(#) $RCSfile$ $Revision$ $Date$ $Name$"; -#endif /* DEBUG */ - -#ifndef DEV_H -#include "dev.h" -#endif /* DEV_H */ - -#ifndef DEVM_H -#include "devm.h" -#endif /* DEVM_H */ - -#ifndef NSSCKEPV_H -#include "nssckepv.h" -#endif /* NSSCKEPV_H */ - -#ifndef CKHELPER_H -#include "ckhelper.h" -#endif /* CKHELPER_H */ - -#ifndef BASE_H -#include "base.h" -#endif /* BASE_H */ - -/* XXX */ -#ifndef PKI_H -#include "pki.h" -#endif /* PKI_H */ - -/* XXX */ -#ifndef NSSPKI_H -#include "nsspki.h" -#endif /* NSSPKI_H */ - -#ifdef NSS_3_4_CODE -#include "pkim.h" /* for cert decoding */ -#include "pk11func.h" /* for PK11_HasRootCerts */ -#include "pki3hack.h" /* for STAN_ForceCERTCertificateUpdate */ -#endif - -/* The number of object handles to grab during each call to C_FindObjects */ -#define OBJECT_STACK_SIZE 16 - -NSS_IMPLEMENT PRStatus -nssToken_DeleteStoredObject -( - nssCryptokiInstance *instance -) -{ - CK_RV ckrv; - PRStatus nssrv; - PRBool createdSession = PR_FALSE; - NSSToken *token = instance->token; - void *epv = token->epv; - nssSession *session = NULL; - if (nssCKObject_IsAttributeTrue(instance->handle, CKA_TOKEN, - token->defaultSession, - token->slot, &nssrv)) { - if (nssSession_IsReadWrite(token->defaultSession)) { - session = token->defaultSession; - } else { - session = nssSlot_CreateSession(token->slot, NULL, PR_TRUE); - createdSession = PR_TRUE; - } - } - if (session == NULL) { - return PR_FAILURE; - } - nssSession_EnterMonitor(session); - ckrv = CKAPI(epv)->C_DestroyObject(session->handle, instance->handle); - nssSession_ExitMonitor(session); - if (createdSession) { - nssSession_Destroy(session); - } - if (ckrv != CKR_OK) { - return PR_FAILURE; - } - return PR_SUCCESS; -} - -static CK_OBJECT_HANDLE -import_object -( - NSSToken *tok, - nssSession *sessionOpt, - CK_ATTRIBUTE_PTR objectTemplate, - CK_ULONG otsize -) -{ - nssSession *session = NULL; - PRBool createdSession = PR_FALSE; - void *epv = tok->epv; - CK_OBJECT_HANDLE object; - CK_RV ckrv; - if (nssCKObject_IsTokenObjectTemplate(objectTemplate, otsize)) { - if (sessionOpt) { - if (!nssSession_IsReadWrite(sessionOpt)) { - return CK_INVALID_HANDLE; - } else { - session = sessionOpt; - } - } else if (nssSession_IsReadWrite(tok->defaultSession)) { - session = tok->defaultSession; - } else { - session = nssSlot_CreateSession(tok->slot, NULL, PR_TRUE); - createdSession = PR_TRUE; - } - } else { - session = (sessionOpt) ? sessionOpt : tok->defaultSession; - } - if (session == NULL) { - return CK_INVALID_HANDLE; - } - nssSession_EnterMonitor(session); - ckrv = CKAPI(epv)->C_CreateObject(session->handle, - objectTemplate, otsize, - &object); - nssSession_ExitMonitor(session); - if (createdSession) { - nssSession_Destroy(session); - } - if (ckrv != CKR_OK) { - return CK_INVALID_HANDLE; - } - return object; -} - -static CK_OBJECT_HANDLE -find_object_by_template -( - NSSToken *tok, - nssSession *sessionOpt, - CK_ATTRIBUTE_PTR cktemplate, - CK_ULONG ctsize -) -{ - CK_SESSION_HANDLE hSession; - CK_OBJECT_HANDLE rvObject = CK_INVALID_HANDLE; - CK_ULONG count = 0; - CK_RV ckrv; - void *epv = tok->epv; - nssSession *session; - session = (sessionOpt) ? sessionOpt : tok->defaultSession; - hSession = session->handle; - nssSession_EnterMonitor(session); - ckrv = CKAPI(epv)->C_FindObjectsInit(hSession, cktemplate, ctsize); - if (ckrv != CKR_OK) { - nssSession_ExitMonitor(session); - return CK_INVALID_HANDLE; - } - ckrv = CKAPI(epv)->C_FindObjects(hSession, &rvObject, 1, &count); - if (ckrv != CKR_OK) { - nssSession_ExitMonitor(session); - return CK_INVALID_HANDLE; - } - ckrv = CKAPI(epv)->C_FindObjectsFinal(hSession); - nssSession_ExitMonitor(session); - if (ckrv != CKR_OK) { - return CK_INVALID_HANDLE; - } - return rvObject; -} - -static PRStatus -traverse_objects_by_template -( - NSSToken *tok, - nssSession *sessionOpt, - CK_ATTRIBUTE_PTR obj_template, - CK_ULONG otsize, - PRStatus (*callback)(NSSToken *t, nssSession *session, - CK_OBJECT_HANDLE h, void *arg), - void *arg -) -{ - NSSSlot *slot; - PRStatus cbrv; - PRUint32 i; - CK_RV ckrv; - CK_ULONG count; - CK_OBJECT_HANDLE *objectStack; - CK_OBJECT_HANDLE startOS[OBJECT_STACK_SIZE]; - CK_SESSION_HANDLE hSession; - NSSArena *objectArena = NULL; - nssSession *session; - nssList *objectList = NULL; - int objectStackSize = OBJECT_STACK_SIZE; - void *epv = tok->epv; - slot = tok->slot; - objectStack = startOS; - session = (sessionOpt) ? sessionOpt : tok->defaultSession; - hSession = session->handle; - nssSession_EnterMonitor(session); - ckrv = CKAPI(epv)->C_FindObjectsInit(hSession, obj_template, otsize); - if (ckrv != CKR_OK) { - nssSession_ExitMonitor(session); - goto loser; - } - while (PR_TRUE) { - ckrv = CKAPI(epv)->C_FindObjects(hSession, objectStack, - objectStackSize, &count); - if (ckrv != CKR_OK) { - nssSession_ExitMonitor(session); - goto loser; - } - if (count == objectStackSize) { - if (!objectList) { - objectArena = NSSArena_Create(); - objectList = nssList_Create(objectArena, PR_FALSE); - } - nssList_Add(objectList, objectStack); - objectStackSize = objectStackSize * 2; - objectStack = nss_ZNEWARRAY(objectArena, CK_OBJECT_HANDLE, - objectStackSize); - if (objectStack == NULL) { - count =0; - break; - /* return what we can */ - } - } else { - break; - } - } - ckrv = CKAPI(epv)->C_FindObjectsFinal(hSession); - nssSession_ExitMonitor(session); - if (ckrv != CKR_OK) { - goto loser; - } - if (objectList) { - nssListIterator *objects; - CK_OBJECT_HANDLE *localStack; - objects = nssList_CreateIterator(objectList); - objectStackSize = OBJECT_STACK_SIZE; - for (localStack = (CK_OBJECT_HANDLE *)nssListIterator_Start(objects); - localStack != NULL; - localStack = (CK_OBJECT_HANDLE *)nssListIterator_Next(objects)) { - for (i=0; i< objectStackSize; i++) { - cbrv = (*callback)(tok, session, localStack[i], arg); - } - objectStackSize = objectStackSize * 2; - } - nssListIterator_Finish(objects); - nssListIterator_Destroy(objects); - } - for (i=0; i<count; i++) { - cbrv = (*callback)(tok, session, objectStack[i], arg); - } - if (objectArena) - NSSArena_Destroy(objectArena); - return PR_SUCCESS; -loser: - if (objectArena) - NSSArena_Destroy(objectArena); - return PR_FAILURE; -} - -static nssCryptokiInstance * -create_cryptoki_instance -( - NSSArena *arena, - NSSToken *t, - CK_OBJECT_HANDLE h, - PRBool isTokenObject -) -{ - PRStatus nssrv; - nssCryptokiInstance *instance; - CK_ATTRIBUTE cert_template = { CKA_LABEL, NULL, 0 }; - nssrv = nssCKObject_GetAttributes(h, &cert_template, 1, - arena, t->defaultSession, t->slot); - if (nssrv != PR_SUCCESS) { - /* a failure here indicates a device error */ - return NULL; - } - instance = nss_ZNEW(arena, nssCryptokiInstance); - if (!instance) { - return NULL; - } - instance->handle = h; - instance->token = t; - instance->isTokenObject = isTokenObject; - NSS_CK_ATTRIBUTE_TO_UTF8(&cert_template, instance->label); - return instance; -} - -#ifdef NSS_3_4_CODE -/* exposing this for the smart card cache code */ -NSS_IMPLEMENT nssCryptokiInstance * -nssCryptokiInstance_Create -( - NSSArena *arena, - NSSToken *t, - CK_OBJECT_HANDLE h, - PRBool isTokenObject -) -{ - return create_cryptoki_instance(arena, t, h, isTokenObject); -} -#endif - -static NSSCertificateType -nss_cert_type_from_ck_attrib(CK_ATTRIBUTE_PTR attrib) -{ - CK_CERTIFICATE_TYPE ckCertType; - if (!attrib->pValue) { - /* default to PKIX */ - return NSSCertificateType_PKIX; - } - ckCertType = *((CK_ULONG *)attrib->pValue); - switch (ckCertType) { - case CKC_X_509: - return NSSCertificateType_PKIX; - default: - break; - } - return NSSCertificateType_Unknown; -} - -/* Create a certificate from an object handle. */ -static NSSCertificate * -get_token_cert -( - NSSToken *token, - nssSession *sessionOpt, - CK_OBJECT_HANDLE handle -) -{ - NSSCertificate *rvCert; - NSSArena *arena; - nssSession *session; - PRStatus nssrv; - CK_ULONG template_size; - CK_ATTRIBUTE cert_template[] = { - { CKA_CERTIFICATE_TYPE, NULL, 0 }, - { CKA_ID, NULL, 0 }, - { CKA_VALUE, NULL, 0 }, - { CKA_ISSUER, NULL, 0 }, - { CKA_SERIAL_NUMBER, NULL, 0 }, - { CKA_SUBJECT, NULL, 0 }, - { CKA_NETSCAPE_EMAIL, NULL, 0 } - }; - template_size = sizeof(cert_template) / sizeof(cert_template[0]); - session = (sessionOpt) ? sessionOpt : token->defaultSession; - arena = nssArena_Create(); - if (!arena) { - return NULL; - } - rvCert = nss_ZNEW(arena, NSSCertificate); - if (!rvCert) { - NSSArena_Destroy(arena); - return NULL; - } - nssrv = nssPKIObject_Initialize(&rvCert->object, arena, - token->trustDomain, NULL); - if (nssrv != PR_SUCCESS) { - goto loser; - } - nssrv = nssCKObject_GetAttributes(handle, - cert_template, template_size, - arena, session, token->slot); - if (nssrv != PR_SUCCESS) { - goto loser; - } - rvCert->type = nss_cert_type_from_ck_attrib(&cert_template[0]); - NSS_CK_ATTRIBUTE_TO_ITEM(&cert_template[1], &rvCert->id); - NSS_CK_ATTRIBUTE_TO_ITEM(&cert_template[2], &rvCert->encoding); - NSS_CK_ATTRIBUTE_TO_ITEM(&cert_template[3], &rvCert->issuer); - NSS_CK_ATTRIBUTE_TO_ITEM(&cert_template[4], &rvCert->serial); - NSS_CK_ATTRIBUTE_TO_ITEM(&cert_template[5], &rvCert->subject); - NSS_CK_ATTRIBUTE_TO_UTF8(&cert_template[6], rvCert->email); - /* XXX this would be better accomplished by dividing attributes to - * retrieve into "required" and "optional" - */ - if (rvCert->encoding.size == 0 || - rvCert->issuer.size == 0 || - rvCert->serial.size == 0 || - rvCert->subject.size == 0) - { - /* received a bum object from the token */ - goto loser; - } -#ifdef NSS_3_4_CODE - /* nss 3.4 database doesn't associate email address with cert */ - if (!rvCert->email) { - nssDecodedCert *dc; - NSSASCII7 *email; - dc = nssCertificate_GetDecoding(rvCert); - if (dc) { - email = dc->getEmailAddress(dc); - if (email) - rvCert->email = nssUTF8_Duplicate(email, arena); - } else { - goto loser; - } - } - /* nss 3.4 must deal with tokens that do not follow the PKCS#11 - * standard and return decoded serial numbers. The easiest way to - * work around this is just to grab the serial # from the full encoding - */ - if (PR_TRUE) { - nssDecodedCert *dc; - dc = nssCertificate_GetDecoding(rvCert); - if (dc) { - PRStatus sn_stat; - sn_stat = dc->getDERSerialNumber(dc, &rvCert->serial, arena); - if (sn_stat != PR_SUCCESS) { - goto loser; - } - } else { - goto loser; - } - } -#endif - return rvCert; -loser: - nssPKIObject_Destroy(&rvCert->object); - return (NSSCertificate *)NULL; -} - -NSS_IMPLEMENT PRStatus -nssToken_ImportCertificate -( - NSSToken *tok, - nssSession *sessionOpt, - NSSCertificate *cert, - NSSUTF8 *nickname, - PRBool asTokenObject -) -{ - nssCryptokiInstance *instance; - CK_CERTIFICATE_TYPE cert_type = CKC_X_509; - CK_OBJECT_HANDLE handle; - CK_ATTRIBUTE_PTR attr; - CK_ATTRIBUTE cert_tmpl[9]; - CK_ULONG ctsize; - NSS_CK_TEMPLATE_START(cert_tmpl, attr, ctsize); - if (asTokenObject) { - NSS_CK_SET_ATTRIBUTE_ITEM(attr, CKA_TOKEN, &g_ck_true); - } else { - NSS_CK_SET_ATTRIBUTE_ITEM(attr, CKA_TOKEN, &g_ck_false); - } - NSS_CK_SET_ATTRIBUTE_ITEM(attr, CKA_CLASS, &g_ck_class_cert); - NSS_CK_SET_ATTRIBUTE_VAR( attr, CKA_CERTIFICATE_TYPE, cert_type); - NSS_CK_SET_ATTRIBUTE_ITEM(attr, CKA_ID, &cert->id); - NSS_CK_SET_ATTRIBUTE_UTF8(attr, CKA_LABEL, nickname); - NSS_CK_SET_ATTRIBUTE_ITEM(attr, CKA_VALUE, &cert->encoding); - NSS_CK_SET_ATTRIBUTE_ITEM(attr, CKA_ISSUER, &cert->issuer); - NSS_CK_SET_ATTRIBUTE_ITEM(attr, CKA_SUBJECT, &cert->subject); - NSS_CK_SET_ATTRIBUTE_ITEM(attr, CKA_SERIAL_NUMBER, &cert->serial); - NSS_CK_TEMPLATE_FINISH(cert_tmpl, attr, ctsize); - /* Import the certificate onto the token */ - handle = import_object(tok, sessionOpt, cert_tmpl, ctsize); - if (handle == CK_INVALID_HANDLE) { - return PR_FAILURE; - } - instance = create_cryptoki_instance(cert->object.arena, - tok, handle, asTokenObject); - if (!instance) { - /* XXX destroy object */ - return PR_FAILURE; - } - nssList_Add(cert->object.instanceList, instance); - /* XXX Fix this! */ - nssListIterator_Destroy(cert->object.instances); - cert->object.instances = nssList_CreateIterator(cert->object.instanceList); - return PR_SUCCESS; -} - -static PRBool -compare_cert_by_encoding(void *a, void *b) -{ - NSSCertificate *c1 = (NSSCertificate *)a; - NSSCertificate *c2 = (NSSCertificate *)b; - return (nssItem_Equal(&c1->encoding, &c2->encoding, NULL)); -} - -static PRStatus -retrieve_cert(NSSToken *t, nssSession *session, CK_OBJECT_HANDLE h, void *arg) -{ - PRStatus nssrv; - PRBool found, inCache; - nssTokenCertSearch *search = (nssTokenCertSearch *)arg; - NSSCertificate *cert = NULL; - nssListIterator *instances; - nssCryptokiInstance *ci; - CK_ATTRIBUTE derValue = { CKA_VALUE, NULL, 0 }; - inCache = PR_FALSE; - if (search->cached) { - NSSCertificate csi; /* a fake cert for indexing */ - nssrv = nssCKObject_GetAttributes(h, &derValue, 1, - NULL, session, t->slot); - NSS_CK_ATTRIBUTE_TO_ITEM(&derValue, &csi.encoding); - cert = (NSSCertificate *)nssList_Get(search->cached, &csi); - nss_ZFreeIf(csi.encoding.data); - } - found = PR_FALSE; - if (cert) { - inCache = PR_TRUE; - nssCertificate_AddRef(cert); - instances = cert->object.instances; - for (ci = (nssCryptokiInstance *)nssListIterator_Start(instances); - ci != (nssCryptokiInstance *)NULL; - ci = (nssCryptokiInstance *)nssListIterator_Next(instances)) - { - /* The builtins token will not return the same handle for objects - * during the lifetime of the token. Thus, assuming the found - * object is the same as the cached object if there is already an - * instance for the token. - */ - if (ci->token == t) { - found = PR_TRUE; - break; - } - } - nssListIterator_Finish(instances); - } else { - cert = get_token_cert(t, session, h); - if (!cert) return PR_FAILURE; - } - if (!found) { - PRBool isTokenObject; - /* XXX this is incorrect if the search is over both types */ - isTokenObject = (search->searchType == nssTokenSearchType_TokenOnly) ? - PR_TRUE : PR_FALSE; - ci = create_cryptoki_instance(cert->object.arena, t, h, isTokenObject); - if (!ci) { - NSSCertificate_Destroy(cert); - return PR_FAILURE; - } - nssList_Add(cert->object.instanceList, ci); - /* XXX Fix this! */ - nssListIterator_Destroy(cert->object.instances); - cert->object.instances = nssList_CreateIterator(cert->object.instanceList); - /* The cert was already discovered. If it was made into a - * CERTCertificate, we need to update it here, because we have found - * another instance of it. This new instance may cause the slot - * and nickname fields of the cert to change. - */ - if (cert->decoding && inCache) { - (void)STAN_ForceCERTCertificateUpdate(cert); - } - } - if (!inCache) { - nssrv = (*search->callback)(cert, search->cbarg); - } else { - nssrv = PR_SUCCESS; /* cached entries already handled */ - } -#ifdef NSS_3_4_CODE - CERT_DestroyCertificate(STAN_GetCERTCertificate(cert)); -#else - NSSCertificate_Destroy(cert); -#endif - - return nssrv; -} - -/* traverse all certificates - this should only happen if the token - * has been marked as "traversable" - */ -NSS_IMPLEMENT PRStatus -nssToken_TraverseCertificates -( - NSSToken *token, - nssSession *sessionOpt, - nssTokenCertSearch *search -) -{ - PRStatus nssrv; - CK_ATTRIBUTE_PTR attr; - CK_ATTRIBUTE cert_template[2]; - CK_ULONG ctsize; - NSS_CK_TEMPLATE_START(cert_template, attr, ctsize); - /* Set the search to token/session only if provided */ - if (search->searchType == nssTokenSearchType_SessionOnly) { - NSS_CK_SET_ATTRIBUTE_ITEM(attr, CKA_TOKEN, &g_ck_false); - } else if (search->searchType == nssTokenSearchType_TokenOnly) { - NSS_CK_SET_ATTRIBUTE_ITEM(attr, CKA_TOKEN, &g_ck_true); - } - NSS_CK_SET_ATTRIBUTE_ITEM(attr, CKA_CLASS, &g_ck_class_cert); - NSS_CK_TEMPLATE_FINISH(cert_template, attr, ctsize); - if (search->cached) { - nssList_SetCompareFunction(search->cached, compare_cert_by_encoding); - } - nssrv = traverse_objects_by_template(token, sessionOpt, - cert_template, ctsize, - retrieve_cert, search); - return nssrv; -} - -NSS_IMPLEMENT PRStatus -nssToken_TraverseCertificatesBySubject -( - NSSToken *token, - nssSession *sessionOpt, - NSSDER *subject, - nssTokenCertSearch *search -) -{ - PRStatus nssrv; - CK_ATTRIBUTE_PTR attr; - CK_ATTRIBUTE subj_template[3]; - CK_ULONG stsize; - NSS_CK_TEMPLATE_START(subj_template, attr, stsize); - /* Set the search to token/session only if provided */ - if (search->searchType == nssTokenSearchType_SessionOnly) { - NSS_CK_SET_ATTRIBUTE_ITEM(attr, CKA_TOKEN, &g_ck_false); - } else if (search->searchType == nssTokenSearchType_TokenOnly) { - NSS_CK_SET_ATTRIBUTE_ITEM(attr, CKA_TOKEN, &g_ck_true); - } - NSS_CK_SET_ATTRIBUTE_ITEM(attr, CKA_CLASS, &g_ck_class_cert); - NSS_CK_SET_ATTRIBUTE_ITEM(attr, CKA_SUBJECT, subject); - NSS_CK_TEMPLATE_FINISH(subj_template, attr, stsize); - if (search->cached) { - nssList_SetCompareFunction(search->cached, compare_cert_by_encoding); - } - /* now traverse the token certs matching this template */ - nssrv = traverse_objects_by_template(token, sessionOpt, - subj_template, stsize, - retrieve_cert, search); - return nssrv; -} - -NSS_IMPLEMENT PRStatus -nssToken_TraverseCertificatesByNickname -( - NSSToken *token, - nssSession *sessionOpt, - NSSUTF8 *name, - nssTokenCertSearch *search -) -{ - PRStatus nssrv; - CK_ATTRIBUTE_PTR attr; - CK_ATTRIBUTE nick_template[3]; - CK_ULONG ntsize; - NSS_CK_TEMPLATE_START(nick_template, attr, ntsize); - NSS_CK_SET_ATTRIBUTE_UTF8(attr, CKA_LABEL, name); - /* Set the search to token/session only if provided */ - if (search->searchType == nssTokenSearchType_SessionOnly) { - NSS_CK_SET_ATTRIBUTE_ITEM(attr, CKA_TOKEN, &g_ck_false); - } else if (search->searchType == nssTokenSearchType_TokenOnly) { - NSS_CK_SET_ATTRIBUTE_ITEM(attr, CKA_TOKEN, &g_ck_true); - } - NSS_CK_SET_ATTRIBUTE_ITEM(attr, CKA_CLASS, &g_ck_class_cert); - NSS_CK_TEMPLATE_FINISH(nick_template, attr, ntsize); - if (search->cached) { - nssList_SetCompareFunction(search->cached, compare_cert_by_encoding); - } - /* now traverse the token certs matching this template */ - nssrv = traverse_objects_by_template(token, sessionOpt, - nick_template, ntsize, - retrieve_cert, search); - if (nssrv != PR_SUCCESS) { - return nssrv; - } - /* This is to workaround the fact that PKCS#11 doesn't specify - * whether the '\0' should be included. XXX Is that still true? - * im - this is not needed by the current softoken. However, I'm - * leaving it in until I have surveyed more tokens to see if it needed. - * well, its needed by the builtin token... - */ - nick_template[0].ulValueLen++; - nssrv = traverse_objects_by_template(token, sessionOpt, - nick_template, ntsize, - retrieve_cert, search); - return nssrv; -} - -NSS_IMPLEMENT PRStatus -nssToken_TraverseCertificatesByEmail -( - NSSToken *token, - nssSession *sessionOpt, - NSSASCII7 *email, - nssTokenCertSearch *search -) -{ - PRStatus nssrv; - CK_ATTRIBUTE_PTR attr; - CK_ATTRIBUTE email_template[3]; - CK_ULONG etsize; - NSS_CK_TEMPLATE_START(email_template, attr, etsize); - NSS_CK_SET_ATTRIBUTE_UTF8(attr, CKA_NETSCAPE_EMAIL, email); - /* Set the search to token/session only if provided */ - if (search->searchType == nssTokenSearchType_SessionOnly) { - NSS_CK_SET_ATTRIBUTE_ITEM(attr, CKA_TOKEN, &g_ck_false); - } else if (search->searchType == nssTokenSearchType_TokenOnly) { - NSS_CK_SET_ATTRIBUTE_ITEM(attr, CKA_TOKEN, &g_ck_true); - } - NSS_CK_SET_ATTRIBUTE_ITEM(attr, CKA_CLASS, &g_ck_class_cert); - NSS_CK_TEMPLATE_FINISH(email_template, attr, etsize); - if (search->cached) { - nssList_SetCompareFunction(search->cached, compare_cert_by_encoding); - } - /* now traverse the token certs matching this template */ - nssrv = traverse_objects_by_template(token, sessionOpt, - email_template, etsize, - retrieve_cert, search); - if (nssrv != PR_SUCCESS) { - return nssrv; - } -#if 0 - /* This is to workaround the fact that PKCS#11 doesn't specify - * whether the '\0' should be included. XXX Is that still true? - */ - email_tmpl[0].ulValueLen--; - nssrv = traverse_objects_by_template(token, sessionOpt, - email_tmpl, etsize, - retrieve_cert, search); -#endif - return nssrv; -} - -/* XXX these next two need to create instances as needed */ - -NSS_IMPLEMENT NSSCertificate * -nssToken_FindCertificateByIssuerAndSerialNumber -( - NSSToken *token, - nssSession *sessionOpt, - NSSDER *issuer, - NSSDER *serial, - nssTokenSearchType searchType -) -{ - NSSCertificate *rvCert = NULL; - nssSession *session; - PRStatus nssrv; - CK_OBJECT_HANDLE object; - CK_ATTRIBUTE_PTR attr; - CK_ATTRIBUTE cert_template[4]; - CK_ULONG ctsize; - NSS_CK_TEMPLATE_START(cert_template, attr, ctsize); - /* Set the search to token/session only if provided */ - if (searchType == nssTokenSearchType_SessionOnly) { - NSS_CK_SET_ATTRIBUTE_ITEM(attr, CKA_TOKEN, &g_ck_false); - } else if (searchType == nssTokenSearchType_TokenOnly) { - NSS_CK_SET_ATTRIBUTE_ITEM(attr, CKA_TOKEN, &g_ck_true); - } - /* Set the unique id */ - NSS_CK_SET_ATTRIBUTE_ITEM(attr, CKA_CLASS, &g_ck_class_cert); - NSS_CK_SET_ATTRIBUTE_ITEM(attr, CKA_ISSUER, issuer); - NSS_CK_SET_ATTRIBUTE_ITEM(attr, CKA_SERIAL_NUMBER, serial); - NSS_CK_TEMPLATE_FINISH(cert_template, attr, ctsize); - /* get the object handle */ - object = find_object_by_template(token, sessionOpt, cert_template, ctsize); - if (object == CK_INVALID_HANDLE) { - return NULL; - } - session = (sessionOpt) ? sessionOpt : token->defaultSession; - rvCert = get_token_cert(token, sessionOpt, object); - if (rvCert) { - PRBool isTokenObject; - nssCryptokiInstance *instance; - isTokenObject = nssCKObject_IsAttributeTrue(object, CKA_TOKEN, - session, token->slot, - &nssrv); - instance = create_cryptoki_instance(rvCert->object.arena, - token, object, isTokenObject); - if (!instance) { - NSSCertificate_Destroy(rvCert); - return NULL; - } - nssList_Add(rvCert->object.instanceList, instance); - /* XXX Fix this! */ - nssListIterator_Destroy(rvCert->object.instances); - rvCert->object.instances = nssList_CreateIterator(rvCert->object.instanceList); - } - return rvCert; -} - -NSS_IMPLEMENT NSSCertificate * -nssToken_FindCertificateByEncodedCertificate -( - NSSToken *token, - nssSession *sessionOpt, - NSSBER *encodedCertificate, - nssTokenSearchType searchType -) -{ - NSSCertificate *rvCert = NULL; - nssSession *session; - PRStatus nssrv; - CK_OBJECT_HANDLE object; - CK_ATTRIBUTE_PTR attr; - CK_ATTRIBUTE cert_template[3]; - CK_ULONG ctsize; - NSS_CK_TEMPLATE_START(cert_template, attr, ctsize); - /* Set the search to token/session only if provided */ - if (searchType == nssTokenSearchType_SessionOnly) { - NSS_CK_SET_ATTRIBUTE_ITEM(attr, CKA_TOKEN, &g_ck_false); - } else if (searchType == nssTokenSearchType_TokenOnly) { - NSS_CK_SET_ATTRIBUTE_ITEM(attr, CKA_TOKEN, &g_ck_true); - } - NSS_CK_SET_ATTRIBUTE_ITEM(attr, CKA_CLASS, &g_ck_class_cert); - NSS_CK_SET_ATTRIBUTE_ITEM(attr, CKA_VALUE, encodedCertificate); - NSS_CK_TEMPLATE_FINISH(cert_template, attr, ctsize); - /* get the object handle */ - object = find_object_by_template(token, sessionOpt, cert_template, ctsize); - if (object == CK_INVALID_HANDLE) { - return NULL; - } - session = (sessionOpt) ? sessionOpt : token->defaultSession; - rvCert = get_token_cert(token, sessionOpt, object); - if (rvCert) { - PRBool isTokenObject; - nssCryptokiInstance *instance; - isTokenObject = nssCKObject_IsAttributeTrue(object, CKA_TOKEN, - session, token->slot, - &nssrv); - instance = create_cryptoki_instance(rvCert->object.arena, - token, object, isTokenObject); - if (!instance) { - NSSCertificate_Destroy(rvCert); - return NULL; - } - nssList_Add(rvCert->object.instanceList, instance); - /* XXX Fix this! */ - nssListIterator_Destroy(rvCert->object.instances); - rvCert->object.instances = nssList_CreateIterator(rvCert->object.instanceList); - } - return rvCert; -} - -static void -sha1_hash(NSSItem *input, NSSItem *output) -{ - NSSAlgorithmAndParameters *ap; - NSSToken *token = STAN_GetDefaultCryptoToken(); - ap = NSSAlgorithmAndParameters_CreateSHA1Digest(NULL); - (void)nssToken_Digest(token, NULL, ap, input, output, NULL); -#ifdef NSS_3_4_CODE - PK11_FreeSlot(token->pk11slot); -#endif - nss_ZFreeIf(ap); -} - -static void -md5_hash(NSSItem *input, NSSItem *output) -{ - NSSAlgorithmAndParameters *ap; - NSSToken *token = STAN_GetDefaultCryptoToken(); - ap = NSSAlgorithmAndParameters_CreateMD5Digest(NULL); - (void)nssToken_Digest(token, NULL, ap, input, output, NULL); -#ifdef NSS_3_4_CODE - PK11_FreeSlot(token->pk11slot); -#endif - nss_ZFreeIf(ap); -} - -NSS_IMPLEMENT PRStatus -nssToken_ImportTrust -( - NSSToken *tok, - nssSession *sessionOpt, - NSSTrust *trust, - PRBool asTokenObject -) -{ - CK_OBJECT_HANDLE handle; - CK_OBJECT_CLASS tobjc = CKO_NETSCAPE_TRUST; - CK_ATTRIBUTE_PTR attr; - CK_ATTRIBUTE trust_tmpl[10]; - CK_ULONG tsize; - PRUint8 sha1[20]; /* this is cheating... */ - PRUint8 md5[16]; - NSSItem sha1_result, md5_result; - NSSCertificate *c = trust->certificate; - sha1_result.data = sha1; sha1_result.size = sizeof sha1; - md5_result.data = md5; md5_result.size = sizeof md5; - sha1_hash(&c->encoding, &sha1_result); - md5_hash(&c->encoding, &md5_result); - NSS_CK_TEMPLATE_START(trust_tmpl, attr, tsize); - if (asTokenObject) { - NSS_CK_SET_ATTRIBUTE_ITEM(attr, CKA_TOKEN, &g_ck_true); - } else { - NSS_CK_SET_ATTRIBUTE_ITEM(attr, CKA_TOKEN, &g_ck_false); - } - NSS_CK_SET_ATTRIBUTE_VAR( attr, CKA_CLASS, tobjc); - NSS_CK_SET_ATTRIBUTE_ITEM(attr, CKA_ISSUER, &c->issuer); - NSS_CK_SET_ATTRIBUTE_ITEM(attr, CKA_SERIAL_NUMBER, &c->serial); - NSS_CK_SET_ATTRIBUTE_ITEM(attr, CKA_CERT_SHA1_HASH, &sha1_result); - NSS_CK_SET_ATTRIBUTE_ITEM(attr, CKA_CERT_MD5_HASH, &md5_result); - /* now set the trust values */ - NSS_CK_SET_ATTRIBUTE_VAR(attr, CKA_TRUST_SERVER_AUTH, trust->serverAuth); - NSS_CK_SET_ATTRIBUTE_VAR(attr, CKA_TRUST_CLIENT_AUTH, trust->clientAuth); - NSS_CK_SET_ATTRIBUTE_VAR(attr, CKA_TRUST_CODE_SIGNING, trust->codeSigning); - NSS_CK_SET_ATTRIBUTE_VAR(attr, CKA_TRUST_EMAIL_PROTECTION, - trust->emailProtection); - NSS_CK_TEMPLATE_FINISH(trust_tmpl, attr, tsize); - /* import the trust object onto the token */ - handle = import_object(tok, NULL, trust_tmpl, tsize); - if (handle != CK_INVALID_HANDLE) { - nssCryptokiInstance *instance; - instance = create_cryptoki_instance(trust->object.arena, - tok, handle, asTokenObject); - if (!instance) { - return PR_FAILURE; - } - nssList_Add(trust->object.instanceList, instance); - /* XXX Fix this! */ - nssListIterator_Destroy(trust->object.instances); - trust->object.instances = nssList_CreateIterator(trust->object.instanceList); - tok->hasNoTrust = PR_FALSE; - return PR_SUCCESS; - } - return PR_FAILURE; -} - -NSS_IMPLEMENT PRStatus -nssToken_SetTrustCache -( - NSSToken *token -) -{ - CK_OBJECT_CLASS tobjc = CKO_NETSCAPE_TRUST; - CK_ATTRIBUTE_PTR attr; - CK_ATTRIBUTE tobj_template[2]; - CK_ULONG tobj_size; - CK_OBJECT_HANDLE obj; - nssSession *session = token->defaultSession; - - NSS_CK_TEMPLATE_START(tobj_template, attr, tobj_size); - NSS_CK_SET_ATTRIBUTE_VAR( attr, CKA_CLASS, tobjc); - NSS_CK_SET_ATTRIBUTE_ITEM(attr, CKA_TOKEN, &g_ck_true); - NSS_CK_TEMPLATE_FINISH(tobj_template, attr, tobj_size); - - obj = find_object_by_template(token, session, - tobj_template, tobj_size); - token->hasNoTrust = PR_FALSE; - if (obj == CK_INVALID_HANDLE) { - token->hasNoTrust = PR_TRUE; - } - return PR_SUCCESS; -} - -NSS_IMPLEMENT PRStatus -nssToken_SetCrlCache -( - NSSToken *token -) -{ - CK_OBJECT_CLASS tobjc = CKO_NETSCAPE_CRL; - CK_ATTRIBUTE_PTR attr; - CK_ATTRIBUTE tobj_template[2]; - CK_ULONG tobj_size; - CK_OBJECT_HANDLE obj; - nssSession *session = token->defaultSession; - - NSS_CK_TEMPLATE_START(tobj_template, attr, tobj_size); - NSS_CK_SET_ATTRIBUTE_VAR( attr, CKA_CLASS, tobjc); - NSS_CK_SET_ATTRIBUTE_ITEM(attr, CKA_TOKEN, &g_ck_true); - NSS_CK_TEMPLATE_FINISH(tobj_template, attr, tobj_size); - - obj = find_object_by_template(token, session, - tobj_template, tobj_size); - token->hasNoCrls = PR_TRUE; - if (obj == CK_INVALID_HANDLE) { - token->hasNoCrls = PR_TRUE; - } - return PR_SUCCESS; -} - -static CK_OBJECT_HANDLE -get_cert_trust_handle -( - NSSToken *token, - nssSession *session, - NSSCertificate *c, - nssTokenSearchType searchType -) -{ - CK_OBJECT_CLASS tobjc = CKO_NETSCAPE_TRUST; - CK_ATTRIBUTE_PTR attr; - CK_ATTRIBUTE tobj_template[5]; - CK_ULONG tobj_size; - PRUint8 sha1[20]; /* this is cheating... */ - NSSItem sha1_result; - - if (token->hasNoTrust) { - return CK_INVALID_HANDLE; - } - sha1_result.data = sha1; sha1_result.size = sizeof sha1; - sha1_hash(&c->encoding, &sha1_result); - NSS_CK_TEMPLATE_START(tobj_template, attr, tobj_size); - if (searchType == nssTokenSearchType_SessionOnly) { - NSS_CK_SET_ATTRIBUTE_ITEM(attr, CKA_TOKEN, &g_ck_false); - } else if (searchType == nssTokenSearchType_TokenOnly) { - NSS_CK_SET_ATTRIBUTE_ITEM(attr, CKA_TOKEN, &g_ck_true); - } - NSS_CK_SET_ATTRIBUTE_VAR( attr, CKA_CLASS, tobjc); - NSS_CK_SET_ATTRIBUTE_ITEM(attr, CKA_CERT_SHA1_HASH, &sha1_result); -#ifdef NSS_3_4_CODE - if (!PK11_HasRootCerts(token->pk11slot)) { -#endif - NSS_CK_SET_ATTRIBUTE_ITEM(attr, CKA_ISSUER, &c->issuer); - NSS_CK_SET_ATTRIBUTE_ITEM(attr, CKA_SERIAL_NUMBER , &c->serial); -#ifdef NSS_3_4_CODE - } - /* - * we need to arrange for the built-in token to lose the bottom 2 - * attributes so that old built-in tokens will continue to work. - */ -#endif - NSS_CK_TEMPLATE_FINISH(tobj_template, attr, tobj_size); - return find_object_by_template(token, session, - tobj_template, tobj_size); -} - -NSS_IMPLEMENT NSSTrust * -nssToken_FindTrustForCert -( - NSSToken *token, - nssSession *sessionOpt, - NSSCertificate *c, - nssTokenSearchType searchType -) -{ - PRStatus nssrv; - NSSTrust *rvTrust; - nssSession *session; - NSSArena *arena; - nssCryptokiInstance *instance; - PRBool isTokenObject; - CK_BBOOL isToken; - CK_TRUST saTrust, caTrust, epTrust, csTrust; - CK_OBJECT_HANDLE tobjID; - CK_ATTRIBUTE_PTR attr; - CK_ATTRIBUTE trust_template[5]; - CK_ULONG trust_size; - session = (sessionOpt) ? sessionOpt : token->defaultSession; - tobjID = get_cert_trust_handle(token, session, c, searchType); - if (tobjID == CK_INVALID_HANDLE) { - return NULL; - } - /* Then use the trust object to find the trust settings */ - NSS_CK_TEMPLATE_START(trust_template, attr, trust_size); - NSS_CK_SET_ATTRIBUTE_VAR(attr, CKA_TOKEN, isToken); - NSS_CK_SET_ATTRIBUTE_VAR(attr, CKA_TRUST_SERVER_AUTH, saTrust); - NSS_CK_SET_ATTRIBUTE_VAR(attr, CKA_TRUST_CLIENT_AUTH, caTrust); - NSS_CK_SET_ATTRIBUTE_VAR(attr, CKA_TRUST_EMAIL_PROTECTION, epTrust); - NSS_CK_SET_ATTRIBUTE_VAR(attr, CKA_TRUST_CODE_SIGNING, csTrust); - NSS_CK_TEMPLATE_FINISH(trust_template, attr, trust_size); - nssrv = nssCKObject_GetAttributes(tobjID, - trust_template, trust_size, - NULL, session, token->slot); - if (nssrv != PR_SUCCESS) { - return NULL; - } - arena = nssArena_Create(); - if (!arena) { - return NULL; - } - rvTrust = nss_ZNEW(arena, NSSTrust); - if (!rvTrust) { - nssArena_Destroy(arena); - return NULL; - } - nssrv = nssPKIObject_Initialize(&rvTrust->object, arena, - token->trustDomain, NULL); - if (nssrv != PR_SUCCESS) { - goto loser; - } - isTokenObject = (isToken == CK_TRUE) ? PR_TRUE : PR_FALSE; - instance = create_cryptoki_instance(arena, token, tobjID, isTokenObject); - if (!instance) { - goto loser; - } - rvTrust->serverAuth = saTrust; - rvTrust->clientAuth = caTrust; - rvTrust->emailProtection = epTrust; - rvTrust->codeSigning = csTrust; - return rvTrust; -loser: - nssPKIObject_Destroy(&rvTrust->object); - return (NSSTrust *)NULL; -} - -NSS_IMPLEMENT PRBool -nssToken_HasCrls -( - NSSToken *tok -) -{ - return !tok->hasNoCrls; -} - -NSS_IMPLEMENT PRStatus -nssToken_SetHasCrls -( - NSSToken *tok -) -{ - tok->hasNoCrls = PR_FALSE; - return PR_SUCCESS; -} - -NSS_IMPLEMENT PRBool -nssToken_IsPresent -( - NSSToken *token -) -{ - return nssSlot_IsTokenPresent(token->slot); -} - diff --git a/security/nss/lib/pk11wrap/pk11pqg.h b/security/nss/lib/pk11wrap/pk11pqg.h index 389946ff1..20becf821 100644 --- a/security/nss/lib/pk11wrap/pk11pqg.h +++ b/security/nss/lib/pk11wrap/pk11pqg.h @@ -40,6 +40,8 @@ #include "blapit.h" #include "pqgutil.h" +SEC_BEGIN_PROTOS + /* Generate PQGParams and PQGVerify structs. * Length of seed and length of h both equal length of P. * All lengths are specified by "j", according to the table above. @@ -146,4 +148,6 @@ extern SECStatus PK11_PQG_GetSeedFromVerify(const PQGVerify *verify, **************************************************************************/ extern SECStatus PK11_PQG_GetHFromVerify(const PQGVerify *verify, SECItem * h); +SEC_END_PROTOS + #endif diff --git a/security/nss/tests/qa_stat b/security/nss/tests/qa_stat index aa3e4bb88..c902ee713 100755 --- a/security/nss/tests/qa_stat +++ b/security/nss/tests/qa_stat @@ -62,7 +62,8 @@ echo >$RSH_FILE TMPFILES="$TMPFILES $WARNINGLIST $RSH_FILE " RSH_WAIT_TIME=80 #maximum time allowed for the 2 rsh to finish... #TOTAL_TESTS=106 -TOTAL_TESTS=244 #3.4 +TOTAL_TESTS=252 #tip +#TOTAL_TESTS=244 #3.4 #TOTAL_TESTS=123 #3.3.2 BCT_TOTAL_TESTS=122 #3.2.2 #TOTAL_TESTS=133 #tip |