[-]
[+]
|
Changed |
mozilla-nspr.changes
|
|
[-]
[+]
|
Changed |
mozilla-nspr.spec
^
|
|
[-]
[+]
|
Added |
baselibs.conf
^
|
@@ -0,0 +1 @@
+mozilla-nspr
|
[-]
[+]
|
Deleted |
nspr-4.7.1.tar.bz2/mozilla/nsprpub/lib/libc/src/strccmp.c
^
|
@@ -1,115 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is the Netscape Portable Runtime (NSPR).
- *
- * The Initial Developer of the Original Code is
- * Netscape Communications Corporation.
- * Portions created by the Initial Developer are Copyright (C) 1998-2000
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-#include "plstr.h"
-
-static const unsigned char uc[] =
-{
- '\000', '\001', '\002', '\003', '\004', '\005', '\006', '\007',
- '\010', '\011', '\012', '\013', '\014', '\015', '\016', '\017',
- '\020', '\021', '\022', '\023', '\024', '\025', '\026', '\027',
- '\030', '\031', '\032', '\033', '\034', '\035', '\036', '\037',
- ' ', '!', '"', '#', '$', '%', '&', '\'',
- '(', ')', '*', '+', ',', '-', '.', '/',
- '0', '1', '2', '3', '4', '5', '6', '7',
- '8', '9', ':', ';', '<', '=', '>', '?',
- '@', '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', '[', '\\', ']', '^', '_',
- '`', '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', '{', '|', '}', '~', '\177',
- 0200, 0201, 0202, 0203, 0204, 0205, 0206, 0207,
- 0210, 0211, 0212, 0213, 0214, 0215, 0216, 0217,
- 0220, 0221, 0222, 0223, 0224, 0225, 0226, 0227,
- 0230, 0231, 0232, 0233, 0234, 0235, 0236, 0237,
- 0240, 0241, 0242, 0243, 0244, 0245, 0246, 0247,
- 0250, 0251, 0252, 0253, 0254, 0255, 0256, 0257,
- 0260, 0261, 0262, 0263, 0264, 0265, 0266, 0267,
- 0270, 0271, 0272, 0273, 0274, 0275, 0276, 0277,
- 0300, 0301, 0302, 0303, 0304, 0305, 0306, 0307,
- 0310, 0311, 0312, 0313, 0314, 0315, 0316, 0317,
- 0320, 0321, 0322, 0323, 0324, 0325, 0326, 0327,
- 0330, 0331, 0332, 0333, 0334, 0335, 0336, 0337,
- 0340, 0341, 0342, 0343, 0344, 0345, 0346, 0347,
- 0350, 0351, 0352, 0353, 0354, 0355, 0356, 0357,
- 0360, 0361, 0362, 0363, 0364, 0365, 0366, 0367,
- 0370, 0371, 0372, 0373, 0374, 0375, 0376, 0377
-};
-
-PR_IMPLEMENT(PRIntn)
-PL_strcasecmp(const char *a, const char *b)
-{
- const unsigned char *ua = (const unsigned char *)a;
- const unsigned char *ub = (const unsigned char *)b;
-
- if( ((const char *)0 == a) || (const char *)0 == b )
- return (PRIntn)(a-b);
-
- while( (uc[*ua] == uc[*ub]) && ('\0' != *a) )
- {
- a++;
- ua++;
- ub++;
- }
-
- return (PRIntn)(uc[*ua] - uc[*ub]);
-}
-
-PR_IMPLEMENT(PRIntn)
-PL_strncasecmp(const char *a, const char *b, PRUint32 max)
-{
- const unsigned char *ua = (const unsigned char *)a;
- const unsigned char *ub = (const unsigned char *)b;
-
- if( ((const char *)0 == a) || (const char *)0 == b )
- return (PRIntn)(a-b);
-
- while( max && (uc[*ua] == uc[*ub]) && ('\0' != *a) )
- {
- a++;
- ua++;
- ub++;
- max--;
- }
-
- if( 0 == max ) return (PRIntn)0;
-
- return (PRIntn)(uc[*ua] - uc[*ub]);
-}
|
[-]
[+]
|
Deleted |
nspr-4.7.1.tar.bz2/mozilla/nsprpub/lib/libc/src/strcstr.c
^
|
@@ -1,124 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is the Netscape Portable Runtime (NSPR).
- *
- * The Initial Developer of the Original Code is
- * Netscape Communications Corporation.
- * Portions created by the Initial Developer are Copyright (C) 1998-2000
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-#include "plstr.h"
-
-PR_IMPLEMENT(char *)
-PL_strcasestr(const char *big, const char *little)
-{
- PRUint32 ll;
-
- if( ((const char *)0 == big) || ((const char *)0 == little) ) return (char *)0;
- if( ((char)0 == *big) || ((char)0 == *little) ) return (char *)0;
-
- ll = PL_strlen(little);
-
- for( ; *big; big++ )
- /* obvious improvement available here */
- if( 0 == PL_strncasecmp(big, little, ll) )
- return (char *)big;
-
- return (char *)0;
-}
-
-PR_IMPLEMENT(char *)
-PL_strcaserstr(const char *big, const char *little)
-{
- const char *p;
- PRUint32 bl, ll;
-
- if( ((const char *)0 == big) || ((const char *)0 == little) ) return (char *)0;
- if( ((char)0 == *big) || ((char)0 == *little) ) return (char *)0;
-
- bl = PL_strlen(big);
- ll = PL_strlen(little);
- if( bl < ll ) return (char *)0;
- p = &big[ bl - ll ];
-
- for( ; p >= big; p-- )
- /* obvious improvement available here */
- if( 0 == PL_strncasecmp(p, little, ll) )
- return (char *)p;
-
- return (char *)0;
-}
-
-PR_IMPLEMENT(char *)
-PL_strncasestr(const char *big, const char *little, PRUint32 max)
-{
- PRUint32 ll;
-
- if( ((const char *)0 == big) || ((const char *)0 == little) ) return (char *)0;
- if( ((char)0 == *big) || ((char)0 == *little) ) return (char *)0;
-
- ll = PL_strlen(little);
- if( ll > max ) return (char *)0;
- max -= ll;
- max++;
-
- for( ; max && *big; big++, max-- )
- /* obvious improvement available here */
- if( 0 == PL_strncasecmp(big, little, ll) )
- return (char *)big;
-
- return (char *)0;
-}
-
-PR_IMPLEMENT(char *)
-PL_strncaserstr(const char *big, const char *little, PRUint32 max)
-{
- const char *p;
- PRUint32 ll;
-
- if( ((const char *)0 == big) || ((const char *)0 == little) ) return (char *)0;
- if( ((char)0 == *big) || ((char)0 == *little) ) return (char *)0;
-
- ll = PL_strlen(little);
-
- for( p = big; max && *p; p++, max-- )
- ;
-
- p -= ll;
- if( p < big ) return (char *)0;
-
- for( ; p >= big; p-- )
- /* obvious improvement available here */
- if( 0 == PL_strncasecmp(p, little, ll) )
- return (char *)p;
-
- return (char *)0;
-}
|
[-]
[+]
|
Deleted |
nspr-4.7.1.tar.bz2/mozilla/nsprpub/pr/src/md/os2/os2vacpp.asm
^
|
@@ -1,266 +0,0 @@
-; -*- Mode: asm; tab-width: 8; c-basic-offset: 4 -*-
-
-; ***** BEGIN LICENSE BLOCK *****
-; Version: MPL 1.1/GPL 2.0/LGPL 2.1
-;
-; The contents of this file are subject to the Mozilla Public License Version
-; 1.1 (the "License"); you may not use this file except in compliance with
-; the License. You may obtain a copy of the License at
-; http://www.mozilla.org/MPL/
-;
-; Software distributed under the License is distributed on an "AS IS" basis,
-; WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
-; for the specific language governing rights and limitations under the
-; License.
-;
-; The Original Code is the Netscape Portable Runtime (NSPR).
-;
-; The Initial Developer of the Original Code is
-; IBM Corporation.
-; Portions created by the Initial Developer are Copyright (C) 2001
-; the Initial Developer. All Rights Reserved.
-;
-; Contributor(s):
-;
-; Alternatively, the contents of this file may be used under the terms of
-; either the GNU General Public License Version 2 or later (the "GPL"), or
-; the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
-; in which case the provisions of the GPL or the LGPL are applicable instead
-; of those above. If you wish to allow use of your version of this file only
-; under the terms of either the GPL or the LGPL, and not to allow others to
-; use your version of this file under the terms of the MPL, indicate your
-; decision by deleting the provisions above and replace them with the notice
-; and other provisions required by the GPL or the LGPL. If you do not delete
-; the provisions above, a recipient may use your version of this file under
-; the terms of any one of the MPL, the GPL or the LGPL.
-;
-; ***** END LICENSE BLOCK *****
-
-; Windows uses inline assembly for their atomic functions, so we have
-; created an assembly file for VACPP on OS/2.
-;
-; This assembly file also contains an implementation of RAM semaphores.
-;
-; Notes:
-; The ulTIDPID element of the RAMSEM structure is overloaded in the 386
-; implementation to hold the TID:PID in the lower 31 bits and the lock
-; bit in the high bit
-
- page ,132
-
- .486P
- ASSUME CS:FLAT, DS:FLAT, SS:FLAT, ES:FLAT, FS:FLAT
-
- EXTRN Dos32PostEventSem:PROC
- EXTRN Dos32WaitEventSem:PROC
- EXTRN Dos32ResetEventSem:PROC
-
-ramsem STRUC
- ramsem_ulTIDPID DD ?
- ramsem_hevSem DD ?
- ramsem_cLocks DD ?
- ramsem_cWaiting DW ?
- ramsem_cPosts DW ?
-ramsem ENDS
-
-ERROR_SEM_TIMEOUT equ 121
-ERROR_NOT_OWNER equ 288
-SEM_RELEASE_UNOWNED equ 1
-SEM_RELEASE_ALL equ 2
-TS_LOCKBIT equ 31
-
-
-DATA SEGMENT DWORD USE32 PUBLIC 'DATA'
-
- EXTRN plisCurrent:DWORD
-
-DATA ENDS
-
-CODE32 SEGMENT USE32 PUBLIC 'CODE'
-
- PUBLIC SemRequest486
- PUBLIC SemReleasex86
-
- PUBLIC _PR_MD_ATOMIC_SET
- PUBLIC _PR_MD_ATOMIC_ADD
- PUBLIC _PR_MD_ATOMIC_INCREMENT
- PUBLIC _PR_MD_ATOMIC_DECREMENT
-
-;;;---------------------------------------------------------------------------
-;;; APIRET _Optlink SemRequest(PRAMSEM pramsem, ULONG ulTimeout);
-;;;
-;;; Registers:
-;;; EAX - packed TID:PID word
-;;; ECX - address of RAMSEM structure
-;;; EDX - length of timeout in milli-seconds
-;;;---------------------------------------------------------------------------
-
- ALIGN 10H
-SemRequest486 PROC
- push ebx ; Save ebx (volatile)
- mov ecx, eax ; PRAMSEM must be in ecx,
- ; not eax, for cmpxchg
-
- mov ebx, dword ptr [plisCurrent]
- mov eax, dword ptr [ebx+4] ; Place thread id in high
- ; word, process id in low
- mov ax, word ptr [ebx] ; word
- mov ebx,eax
-
-req486_test:
- xor eax,eax
- cmp (ramsem PTR [ecx]).ramsem_ulTIDPID, ebx ; If we own the sem, just
- jz short req486_inc_exit ; increment the use count
-
- lock inc (ramsem PTR [ecx]).ramsem_cWaiting ; inc waiting flag
-
-; lock ; Uncomment for SMP
- DB 0F0h
-; cmpxchg (ramsem PTR [ecx]).ramsem_ulTIDPID, ebx
-; (byte 3 is the offset of ulProcessThread into the RAMSEM structure)
- DB 00Fh
- DB 0B1h
- DB 019h
- jnz short req486_sleep
-
-req486_inc_exit:
- lock inc (ramsem PTR [ecx]).ramsem_cLocks
-
-req486_exit:
- pop ebx ; Restore ebx
- ret
-
-req486_sleep:
- push ecx ; Save ecx (volatile)
- push edx ; Save edx (volatile)
- push edx ; timeout
- push (ramsem PTR [ecx]).ramsem_hevSem
- call Dos32WaitEventSem
- add esp, 8
- pop edx ; restore edx
- pop ecx ; restore ecx
- or eax, eax
- jne req486_exit ; Exit, if error
-
- push ecx ; Save ecx (volatile)
- push edx ; Save edx (volatile)
- sub esp, 4 ; Use stack space for
- push esp ; dummy pulPostCt
- push (ramsem PTR [ecx]).ramsem_hevSem
- call Dos32ResetEventSem
- add esp, 12
- pop edx ; restore edx
- pop ecx ; restore ecx
- jmp req486_test ; Retry the semaphore
-
-SemRequest486 ENDP
-
-;;;---------------------------------------------------------------------
-;;; APIRET _Optlink SemReleasex86(PRAMSEM pramsem, ULONG flFlags);
-;;;
-;;; Registers:
-;;; EAX - address of RAMSEM structure
-;;; ECX - temporary variable
-;;; EDX - flags
-;;;---------------------------------------------------------------------
-
- ALIGN 10H
-SemReleasex86 PROC
- test edx, SEM_RELEASE_UNOWNED ; If set, don't bother
- jnz short rel_ownerok ; getting/checking PID/TID
-
- push ebx ; Save ebx (volatile)
- mov ebx, dword ptr [plisCurrent]
- mov ecx, dword ptr [ebx+4] ; Place thread id in high
- ; word, process id in low
- mov cx, word ptr [ebx] ; word
- pop ebx ; Restore ebx
-
- sub ecx, (ramsem PTR [eax]).ramsem_ulTIDPID ; This thread the owner?
- shl ecx,1 ; Don't compare top bit
- jnz short rel_notowner
-
-rel_ownerok:
- test edx, SEM_RELEASE_ALL
- jnz short rel_clear
-
- lock dec (ramsem PTR [eax]).ramsem_cLocks
- jnz short rel_exit
-
-rel_disown:
- mov (ramsem PTR [eax]).ramsem_ulTIDPID, 0
-
- lock inc (ramsem PTR [eax]).ramsem_cPosts
- mov cx, (ramsem PTR [eax]).ramsem_cWaiting
- cmp (ramsem PTR [eax]).ramsem_cPosts, cx
- jne short rel_post
-
-rel_exit:
- xor eax, eax
- ret
-
-rel_clear:
- lock mov (ramsem PTR [eax]).ramsem_cLocks,0
- jmp rel_disown
-
-rel_notowner:
- mov eax, ERROR_NOT_OWNER
- ret
-
-rel_post:
- mov (ramsem PTR [eax]).ramsem_cPosts, cx
- push (ramsem PTR [eax]).ramsem_hevSem
- call Dos32PostEventSem
- add esp,4
- xor eax,eax
- ret
-SemReleasex86 ENDP
-
-;;;---------------------------------------------------------------------
-;;; PRInt32 _Optlink _PR_MD_ATOMIC_SET(PRInt32* val, PRInt32 newval)
-;;;---------------------------------------------------------------------
- ALIGN 10H
-_PR_MD_ATOMIC_SET proc
- xchg dword ptr [eax],edx
- mov eax, edx;
- ret
-_PR_MD_ATOMIC_SET endp
-
-;;;---------------------------------------------------------------------
-;;; PRInt32 _Optlink _PR_MD_ATOMIC_ADD(PRInt32* ptr, PRInt32 val)
-;;;---------------------------------------------------------------------
- ALIGN 10H
-_PR_MD_ATOMIC_ADD proc
- mov ecx, edx
- lock xadd dword ptr [eax], edx
- mov eax, edx
- add eax, ecx
- ret
-_PR_MD_ATOMIC_ADD endp
-
-;;;---------------------------------------------------------------------
-;;; PRInt32 _Optlink _PR_MD_ATOMIC_INCREMENT(PRInt32* val)
-;;;---------------------------------------------------------------------
- ALIGN 10H
-_PR_MD_ATOMIC_INCREMENT proc
- mov edx, 1
- lock xadd dword ptr [eax], edx
- mov eax, edx
- inc eax
- ret
-_PR_MD_ATOMIC_INCREMENT endp
-
-;;;---------------------------------------------------------------------
-;;; PRInt32 _Optlink _PR_MD_ATOMIC_DECREMENT(PRInt32* val)
-;;;---------------------------------------------------------------------
- ALIGN 10H
-_PR_MD_ATOMIC_DECREMENT proc
- mov edx, 0ffffffffh
- lock xadd dword ptr [eax], edx
- mov eax, edx
- dec eax
- ret
-_PR_MD_ATOMIC_DECREMENT endp
-
-CODE32 ENDS
-END
|
[-]
[+]
|
Deleted |
nspr-4.7.1.tar.bz2/mozilla/nsprpub/pr/src/md/unix/os_SunOS.s
^
|
@@ -1,71 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is the Netscape Portable Runtime (NSPR).
- *
- * The Initial Developer of the Original Code is
- * Netscape Communications Corporation.
- * Portions created by the Initial Developer are Copyright (C) 1998-2000
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
- .text
-
-/*
- * sol_getsp()
- *
- * Return the current sp (for debugging)
- */
- .global sol_getsp
-sol_getsp:
- retl
- mov %sp, %o0
-
-
-/*
- * sol_curthread()
- *
- * Return a unique identifier for the currently active thread.
- */
- .global sol_curthread
-sol_curthread:
- retl
- mov %g7, %o0
-
-
- .global __MD_FlushRegisterWindows
- .global _MD_FlushRegisterWindows
-
-__MD_FlushRegisterWindows:
-_MD_FlushRegisterWindows:
-
- ta 3
- ret
- restore
-
|
[-]
[+]
|
Changed |
nspr-4.7.2.tar.bz2/mozilla/nsprpub/admin/repackage.sh
^
|
@@ -64,10 +64,10 @@
#
# ------------------------------------------------------------------
-FROMTOP=/share/builds/components/nspr20/v4.7.1
-TOTOP=./v4.7.1
-NSPRDIR=nspr-4.7.1
-SOURCETAG=NSPR_4_7_1_RTM
+FROMTOP=/share/builds/components/nspr20/v4.7.2
+TOTOP=./v4.7.2
+NSPRDIR=nspr-4.7.2
+SOURCETAG=NSPR_4_7_2_RTM
#
# enumerate Unix object directories on /s/b/c
|
[-]
[+]
|
Changed |
nspr-4.7.2.tar.bz2/mozilla/nsprpub/config/Makefile.in
^
|
@@ -102,16 +102,8 @@
endif
endif
-ifeq ($(MOZ_OS2_TOOLS),EMX)
+ifeq ($(OS_ARCH), OS2)
XCFLAGS = $(OS_CFLAGS)
-ifeq ($(MOZ_OS2_EMX_OBJECTFORMAT),OMF)
-XLDOPTS = -Zlinker /PM:VIO
-endif
-endif
-
-ifeq ($(MOZ_OS2_TOOLS),PGCC)
-XCFLAGS = $(OS_CFLAGS)
-XLDOPTS = -Zlinker /PM:VIO
endif
include $(topsrcdir)/config/rules.mk
@@ -149,11 +141,7 @@
$(OBJDIR)/%$(PROG_SUFFIX): $(OBJDIR)/%.$(OBJ_SUFFIX)
@$(MAKE_OBJDIR)
-ifeq ($(MOZ_OS2_TOOLS),VACPP)
- $(LD) $(EXEFLAGS) $<
-else
$(CC) $(XCFLAGS) $< $(LDFLAGS) $(XLDOPTS) $(OUTOPTION)$@
-endif
install:: nspr.m4
$(NSINSTALL) -D $(DESTDIR)$(datadir)/aclocal
|
[-]
[+]
|
Changed |
nspr-4.7.2.tar.bz2/mozilla/nsprpub/config/now.c
^
|
@@ -40,12 +40,10 @@
#if defined(VMS)
#include <sys/timeb.h>
-#elif defined(XP_UNIX) || defined(XP_OS2_EMX) || defined(XP_BEOS)
+#elif defined(XP_UNIX) || defined(XP_OS2) || defined(XP_BEOS)
#include <sys/time.h>
#elif defined(WIN32)
#include <windows.h>
-#elif defined(XP_OS2_VACPP)
-#include <sys/timeb.h>
#else
#error "Architecture not supported"
#endif
@@ -72,7 +70,7 @@
now *= 1000000;
now += (1000 * b.millitm);
fprintf(stdout, "%Ld", now);
-#elif defined(XP_UNIX) || defined(XP_OS2_EMX) || defined(XP_BEOS)
+#elif defined(XP_UNIX) || defined(XP_OS2) || defined(XP_BEOS)
long long now;
struct timeval tv;
#ifdef HAVE_SVID_GETTOD
@@ -106,32 +104,6 @@
fprintf(stdout, "%I64d", now);
#endif
-#elif defined(XP_OS2_VACPP)
-/* no long long or i64 so we use a string */
-#include <string.h>
- char buf[24];
- char tbuf[7];
- time_t now;
- long mtime;
- int i;
-
- struct timeb b;
- ftime(&b);
- now = b.time;
- _ltoa(now, buf, 10);
-
- mtime = b.millitm * 1000;
- if (mtime == 0){
- ++now;
- strcat(buf, "000000");
- } else {
- _ltoa(mtime, tbuf, 10);
- for (i = strlen(tbuf); i < 6; ++i)
- strcat(buf, "0");
- strcat(buf, tbuf);
- }
- fprintf(stdout, "%s", buf);
-
#else
#error "Architecture not supported"
#endif
|
[-]
[+]
|
Changed |
nspr-4.7.2.tar.bz2/mozilla/nsprpub/config/rules.mk
^
|
@@ -164,10 +164,6 @@
$(addprefix $(OBJDIR)/,$(ASFILES:.$(ASM_SUFFIX)=.$(OBJ_SUFFIX)))
endif
-ifeq ($(MOZ_OS2_TOOLS),VACPP)
-EXTRA_LIBS := $(patsubst -l%,$(DIST)/lib/%.$(LIB_SUFFIX),$(EXTRA_LIBS))
-endif
-
ALL_TRASH = $(TARGETS) $(OBJS) $(RES) $(filter-out . .., $(OBJDIR)) LOGS TAGS $(GARBAGE) \
$(NOSUCHFILE) \
so_locations
@@ -306,11 +302,7 @@
fi
endif # MSVC with manifest tool
else # WINNT && !GCC
-ifeq ($(MOZ_OS2_TOOLS),VACPP)
- $(CC) $(OBJS) -Fe$@ $(LDFLAGS) $(OS_LIBS) $(EXTRA_LIBS)
-else
$(CC) -o $@ $(CFLAGS) $(OBJS) $(LDFLAGS)
-endif
endif # WINNT && !GCC
ifdef ENABLE_STRIP
$(STRIP) $@
@@ -319,11 +311,7 @@
$(LIBRARY): $(OBJS)
@$(MAKE_OBJDIR)
rm -f $@
-ifeq ($(MOZ_OS2_TOOLS),VACPP)
- $(AR) $(subst /,\\,$(OBJS)) $(AR_FLAGS)
-else
$(AR) $(AR_FLAGS) $(OBJS) $(AR_EXTRA_ARGS)
-endif
$(RANLIB) $@
ifeq ($(OS_TARGET), OS2)
@@ -353,9 +341,6 @@
fi
endif # MSVC with manifest tool
else # WINNT && !GCC
-ifeq ($(MOZ_OS2_TOOLS),VACPP)
- $(LINK_DLL) $(DLLBASE) $(OBJS) $(OS_LIBS) $(EXTRA_LIBS) $(MAPFILE)
-else # !os2 vacpp
ifeq ($(OS_TARGET), OpenVMS)
@if test ! -f $(VMS_SYMVEC_FILE); then \
if test -f $(VMS_SYMVEC_FILE_MODULE); then \
@@ -365,7 +350,6 @@
fi
endif # OpenVMS
$(MKSHLIB) $(OBJS) $(RES) $(EXTRA_LIBS)
-endif # OS2 vacpp
endif # WINNT && !GCC
endif # AIX 4.1
ifdef ENABLE_STRIP
@@ -396,16 +380,11 @@
echo CODE LOADONCALL MOVEABLE DISCARDABLE >> $@
echo DATA PRELOAD MOVEABLE MULTIPLE NONSHARED >> $@
echo EXPORTS >> $@
-ifeq ($(MOZ_OS2_TOOLS),VACPP)
- grep -v ';+' $< | grep -v ';-' | \
- sed -e 's; DATA ;;' -e 's,;;,,' -e 's,;.*,,' >> $@
-else
grep -v ';+' $< | grep -v ';-' | \
sed -e 's; DATA ;;' -e 's,;;,,' -e 's,;.*,,' -e 's,\([\t ]*\),\1_,' | \
awk 'BEGIN {ord=1;} { print($$0 " @" ord " RESIDENTNAME"); ord++;}' >> $@
$(ADD_TO_DEF_FILE)
endif
-endif
#
# Translate source filenames to absolute paths. This is required for
@@ -430,16 +409,12 @@
ifeq ($(NS_USE_GCC)_$(OS_ARCH),_WINNT)
$(CCC) -Fo$@ -c $(CCCFLAGS) $(call abspath,$<)
else
-ifeq ($(MOZ_OS2_TOOLS),VACPP)
- $(CCC) -Fo$@ -c $(CCCFLAGS) $(call abspath,$<)
-else
ifdef NEED_ABSOLUTE_PATH
$(CCC) -o $@ -c $(CCCFLAGS) $(call abspath,$<)
else
$(CCC) -o $@ -c $(CCCFLAGS) $<
endif
endif
-endif
WCCFLAGS1 = $(subst /,\\,$(CFLAGS))
WCCFLAGS2 = $(subst -I,-i=,$(WCCFLAGS1))
@@ -449,28 +424,18 @@
ifeq ($(NS_USE_GCC)_$(OS_ARCH),_WINNT)
$(CC) -Fo$@ -c $(CFLAGS) $(call abspath,$<)
else
-ifeq ($(MOZ_OS2_TOOLS),VACPP)
- $(CC) -Fo$@ -c $(CFLAGS) $(call abspath,$<)
-else
ifdef NEED_ABSOLUTE_PATH
$(CC) -o $@ -c $(CFLAGS) $(call abspath,$<)
else
$(CC) -o $@ -c $(CFLAGS) $<
endif
endif
-endif
$(OBJDIR)/%.$(OBJ_SUFFIX): %.s
@$(MAKE_OBJDIR)
$(AS) -o $@ $(ASFLAGS) -c $<
-ifeq ($(MOZ_OS2_TOOLS),VACPP)
-$(OBJDIR)/%.$(OBJ_SUFFIX): %.asm
- @$(MAKE_OBJDIR)
- $(AS) -Fdo:./$(OBJDIR) $(ASFLAGS) $<
-endif
-
%.i: %.c
$(CC) -C -E $(CFLAGS) $< > $*.i
|
[-]
[+]
|
Changed |
nspr-4.7.2.tar.bz2/mozilla/nsprpub/configure
^
|
@@ -64,9 +64,6 @@
--with-bthreads Use system bthreads library as thread subsystem
(BeOS only)"
ac_help="$ac_help
- --with-native-threads Use native system threads as thread subsystem
- (Solaris only)"
-ac_help="$ac_help
--enable-ipv6 Compile ipv6 support"
ac_help="$ac_help
--enable-boehm Enable the Boehm Garbage Collector"
@@ -628,7 +625,7 @@
fi
echo $ac_n "checking host system type""... $ac_c" 1>&6
-echo "configure:632: checking host system type" >&5
+echo "configure:629: checking host system type" >&5
host_alias=$host
case "$host_alias" in
@@ -649,7 +646,7 @@
echo "$ac_t""$host" 1>&6
echo $ac_n "checking target system type""... $ac_c" 1>&6
-echo "configure:653: checking target system type" >&5
+echo "configure:650: checking target system type" >&5
target_alias=$target
case "$target_alias" in
@@ -667,7 +664,7 @@
echo "$ac_t""$target" 1>&6
echo $ac_n "checking build system type""... $ac_c" 1>&6
-echo "configure:671: checking build system type" >&5
+echo "configure:668: checking build system type" >&5
build_alias=$build
case "$build_alias" in
@@ -692,7 +689,7 @@
MOD_MAJOR_VERSION=4
MOD_MINOR_VERSION=7
-MOD_PATCH_VERSION=1
+MOD_PATCH_VERSION=2
NSPR_MODNAME=nspr20
_HAVE_PTHREADS=
USE_PTHREADS=
@@ -739,7 +736,7 @@
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:743: checking for $ac_word" >&5
+echo "configure:740: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1067,7 +1064,7 @@
# Extract the first word of "$WHOAMI whoami", so it can be a program name with args.
set dummy $WHOAMI whoami; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1071: checking for $ac_word" >&5
+echo "configure:1068: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_WHOAMI'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1138,13 +1135,13 @@
_SAVE_LDFLAGS="$LDFLAGS"
echo $ac_n "checking for $host compiler""... $ac_c" 1>&6
-echo "configure:1142: checking for $host compiler" >&5
+echo "configure:1139: checking for $host compiler" >&5
for ac_prog in $HOST_CC gcc cc /usr/ucb/cc
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1148: checking for $ac_word" >&5
+echo "configure:1145: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_HOST_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1190,16 +1187,16 @@
LDFLAGS="$HOST_LDFLAGS"
echo $ac_n "checking whether the $host compiler ($HOST_CC $HOST_CFLAGS $HOST_LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:1194: checking whether the $host compiler ($HOST_CC $HOST_CFLAGS $HOST_LDFLAGS) works" >&5
+echo "configure:1191: checking whether the $host compiler ($HOST_CC $HOST_CFLAGS $HOST_LDFLAGS) works" >&5
cat > conftest.$ac_ext <<EOF
-#line 1196 "configure"
+#line 1193 "configure"
#include "confdefs.h"
int main() {
return(0);
; return 0; }
EOF
-if { (eval echo configure:1203: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1200: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_prog_host_cc_works=1 echo "$ac_t""yes" 1>&6
else
@@ -1228,7 +1225,7 @@
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1232: checking for $ac_word" >&5
+echo "configure:1229: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1262,7 +1259,7 @@
# Extract the first word of "gcc", so it can be a program name with args.
set dummy gcc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1266: checking for $ac_word" >&5
+echo "configure:1263: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1292,7 +1289,7 @@
# Extract the first word of "cc", so it can be a program name with args.
set dummy cc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1296: checking for $ac_word" >&5
+echo "configure:1293: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1343,7 +1340,7 @@
# Extract the first word of "cl", so it can be a program name with args.
set dummy cl; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1347: checking for $ac_word" >&5
+echo "configure:1344: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1375,7 +1372,7 @@
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:1379: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+echo "configure:1376: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
@@ -1386,12 +1383,12 @@
cat > conftest.$ac_ext << EOF
-#line 1390 "configure"
+#line 1387 "configure"
#include "confdefs.h"
main(){return(0);}
EOF
-if { (eval echo configure:1395: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1392: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ac_cv_prog_cc_works=yes
# If we can't run a trivial program, we are probably using a cross compiler.
if (./conftest; exit) 2>/dev/null; then
@@ -1417,12 +1414,12 @@
{ echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
-echo "configure:1421: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:1418: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
cross_compiling=$ac_cv_prog_cc_cross
echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
-echo "configure:1426: checking whether we are using GNU C" >&5
+echo "configure:1423: checking whether we are using GNU C" >&5
if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1431,7 +1428,7 @@
yes;
#endif
EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1435: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
+if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1432: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
ac_cv_prog_gcc=yes
else
ac_cv_prog_gcc=no
@@ -1450,7 +1447,7 @@
ac_save_CFLAGS="$CFLAGS"
CFLAGS=
echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:1454: checking whether ${CC-cc} accepts -g" >&5
+echo "configure:1451: checking whether ${CC-cc} accepts -g" >&5
if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1487,7 +1484,7 @@
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1491: checking for $ac_word" >&5
+echo "configure:1488: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1523,7 +1520,7 @@
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1527: checking for $ac_word" >&5
+echo "configure:1524: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1555,7 +1552,7 @@
echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:1559: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5
+echo "configure:1556: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5
ac_ext=C
# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
@@ -1566,12 +1563,12 @@
cat > conftest.$ac_ext << EOF
-#line 1570 "configure"
+#line 1567 "configure"
#include "confdefs.h"
int main(){return(0);}
EOF
-if { (eval echo configure:1575: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1572: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ac_cv_prog_cxx_works=yes
# If we can't run a trivial program, we are probably using a cross compiler.
if (./conftest; exit) 2>/dev/null; then
@@ -1597,12 +1594,12 @@
{ echo "configure: error: installation or configuration problem: C++ compiler cannot create executables." 1>&2; exit 1; }
fi
echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
-echo "configure:1601: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:1598: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5
echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6
cross_compiling=$ac_cv_prog_cxx_cross
echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6
-echo "configure:1606: checking whether we are using GNU C++" >&5
+echo "configure:1603: checking whether we are using GNU C++" >&5
if eval "test \"`echo '$''{'ac_cv_prog_gxx'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1611,7 +1608,7 @@
yes;
#endif
EOF
-if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:1615: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
+if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:1612: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
ac_cv_prog_gxx=yes
else
ac_cv_prog_gxx=no
@@ -1630,7 +1627,7 @@
ac_save_CXXFLAGS="$CXXFLAGS"
CXXFLAGS=
echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6
-echo "configure:1634: checking whether ${CXX-g++} accepts -g" >&5
+echo "configure:1631: checking whether ${CXX-g++} accepts -g" >&5
if eval "test \"`echo '$''{'ac_cv_prog_cxx_g'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1675,7 +1672,7 @@
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1679: checking for $ac_word" >&5
+echo "configure:1676: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1710,7 +1707,7 @@
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1714: checking for $ac_word" >&5
+echo "configure:1711: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1745,7 +1742,7 @@
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1749: checking for $ac_word" >&5
+echo "configure:1746: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_AS'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1780,7 +1777,7 @@
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1784: checking for $ac_word" >&5
+echo "configure:1781: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_LD'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1815,7 +1812,7 @@
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1819: checking for $ac_word" >&5
+echo "configure:1816: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1850,7 +1847,7 @@
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1854: checking for $ac_word" >&5
+echo "configure:1851: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_WINDRES'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1885,7 +1882,7 @@
# Extract the first word of "gcc", so it can be a program name with args.
set dummy gcc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1889: checking for $ac_word" >&5
+echo "configure:1886: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1915,7 +1912,7 @@
# Extract the first word of "cc", so it can be a program name with args.
set dummy cc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1919: checking for $ac_word" >&5
+echo "configure:1916: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1966,7 +1963,7 @@
# Extract the first word of "cl", so it can be a program name with args.
set dummy cl; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1970: checking for $ac_word" >&5
+echo "configure:1967: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1998,7 +1995,7 @@
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:2002: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+echo "configure:1999: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
@@ -2009,12 +2006,12 @@
cat > conftest.$ac_ext << EOF
-#line 2013 "configure"
+#line 2010 "configure"
#include "confdefs.h"
main(){return(0);}
EOF
-if { (eval echo configure:2018: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2015: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ac_cv_prog_cc_works=yes
# If we can't run a trivial program, we are probably using a cross compiler.
if (./conftest; exit) 2>/dev/null; then
@@ -2040,12 +2037,12 @@
{ echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
-echo "configure:2044: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:2041: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
cross_compiling=$ac_cv_prog_cc_cross
echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
-echo "configure:2049: checking whether we are using GNU C" >&5
+echo "configure:2046: checking whether we are using GNU C" >&5
if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2054,7 +2051,7 @@
yes;
#endif
EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2058: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
+if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2055: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
ac_cv_prog_gcc=yes
else
ac_cv_prog_gcc=no
@@ -2073,7 +2070,7 @@
ac_save_CFLAGS="$CFLAGS"
CFLAGS=
echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:2077: checking whether ${CC-cc} accepts -g" >&5
+echo "configure:2074: checking whether ${CC-cc} accepts -g" >&5
if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2113,7 +2110,7 @@
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2117: checking for $ac_word" >&5
+echo "configure:2114: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2145,7 +2142,7 @@
echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:2149: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5
+echo "configure:2146: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5
ac_ext=C
# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
@@ -2156,12 +2153,12 @@
cat > conftest.$ac_ext << EOF
-#line 2160 "configure"
+#line 2157 "configure"
#include "confdefs.h"
int main(){return(0);}
EOF
-if { (eval echo configure:2165: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2162: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ac_cv_prog_cxx_works=yes
# If we can't run a trivial program, we are probably using a cross compiler.
if (./conftest; exit) 2>/dev/null; then
@@ -2187,12 +2184,12 @@
{ echo "configure: error: installation or configuration problem: C++ compiler cannot create executables." 1>&2; exit 1; }
fi
echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
-echo "configure:2191: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:2188: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5
echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6
cross_compiling=$ac_cv_prog_cxx_cross
echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6
-echo "configure:2196: checking whether we are using GNU C++" >&5
+echo "configure:2193: checking whether we are using GNU C++" >&5
if eval "test \"`echo '$''{'ac_cv_prog_gxx'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2201,7 +2198,7 @@
yes;
#endif
EOF
-if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:2205: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
+if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:2202: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
ac_cv_prog_gxx=yes
else
ac_cv_prog_gxx=no
@@ -2220,7 +2217,7 @@
ac_save_CXXFLAGS="$CXXFLAGS"
CXXFLAGS=
echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6
-echo "configure:2224: checking whether ${CXX-g++} accepts -g" >&5
+echo "configure:2221: checking whether ${CXX-g++} accepts -g" >&5
if eval "test \"`echo '$''{'ac_cv_prog_cxx_g'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2254,7 +2251,7 @@
fi
fi
echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
-echo "configure:2258: checking how to run the C preprocessor" >&5
+echo "configure:2255: checking how to run the C preprocessor" >&5
# On Suns, sometimes $CPP names a directory.
if test -n "$CPP" && test -d "$CPP"; then
CPP=
@@ -2269,13 +2266,13 @@
# On the NeXT, cc -E runs the code through the compiler's parser,
# not just through cpp.
cat > conftest.$ac_ext <<EOF
-#line 2273 "configure"
+#line 2270 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2279: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2276: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
:
@@ -2286,13 +2283,13 @@
rm -rf conftest*
CPP="${CC-cc} -E -traditional-cpp"
cat > conftest.$ac_ext <<EOF
-#line 2290 "configure"
+#line 2287 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2296: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2293: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
:
@@ -2303,13 +2300,13 @@
rm -rf conftest*
CPP="${CC-cc} -nologo -E"
cat > conftest.$ac_ext <<EOF
-#line 2307 "configure"
+#line 2304 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2313: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2310: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
:
@@ -2336,7 +2333,7 @@
# Extract the first word of "ranlib", so it can be a program name with args.
set dummy ranlib; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2340: checking for $ac_word" >&5
+echo "configure:2337: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2368,7 +2365,7 @@
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2372: checking for $ac_word" >&5
+echo "configure:2369: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_AS'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2409,7 +2406,7 @@
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2413: checking for $ac_word" >&5
+echo "configure:2410: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_AR'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2450,7 +2447,7 @@
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2454: checking for $ac_word" >&5
+echo "configure:2451: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_LD'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2491,7 +2488,7 @@
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2495: checking for $ac_word" >&5
+echo "configure:2492: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_STRIP'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2532,7 +2529,7 @@
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2536: checking for $ac_word" >&5
+echo "configure:2533: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_WINDRES'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2600,7 +2597,7 @@
fi
echo $ac_n "checking for gcc -pipe support""... $ac_c" 1>&6
-echo "configure:2604: checking for gcc -pipe support" >&5
+echo "configure:2601: checking for gcc -pipe support" >&5
if test -n "$GNU_CC" && test -n "$GNU_CXX" && test -n "$GNU_AS"; then
echo '#include <stdio.h>' > dummy-hello.c
echo 'int main() { printf("Hello World\n"); return 0; }' >> dummy-hello.c
@@ -2615,14 +2612,14 @@
_SAVE_CFLAGS=$CFLAGS
CFLAGS="$CFLAGS -pipe"
cat > conftest.$ac_ext <<EOF
-#line 2619 "configure"
+#line 2616 "configure"
#include "confdefs.h"
#include <stdio.h>
int main() {
printf("Hello World\n");
; return 0; }
EOF
-if { (eval echo configure:2626: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2623: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
_res_gcc_pipe="yes"
else
@@ -2649,7 +2646,7 @@
if test "$GNU_CC"; then
echo $ac_n "checking for visibility(hidden) attribute""... $ac_c" 1>&6
-echo "configure:2653: checking for visibility(hidden) attribute" >&5
+echo "configure:2650: checking for visibility(hidden) attribute" >&5
if eval "test \"`echo '$''{'ac_cv_visibility_hidden'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2673,7 +2670,7 @@
EOF
echo $ac_n "checking for visibility pragma support""... $ac_c" 1>&6
-echo "configure:2677: checking for visibility pragma support" >&5
+echo "configure:2674: checking for visibility pragma support" >&5
if eval "test \"`echo '$''{'ac_cv_visibility_pragma'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2726,7 +2723,7 @@
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2730: checking for $ac_word" >&5
+echo "configure:2727: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_PERL'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2983,17 +2980,17 @@
DSO_LDOPTS='-brtl -bnortllib -bM:SRE -bnoentry -bexpall -blibpath:/usr/lib:/lib'
ac_safe=`echo "sys/atomic_op.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for sys/atomic_op.h""... $ac_c" 1>&6
-echo "configure:2987: checking for sys/atomic_op.h" >&5
+echo "configure:2984: checking for sys/atomic_op.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2992 "configure"
+#line 2989 "configure"
#include "confdefs.h"
#include <sys/atomic_op.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2997: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2994: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -3150,7 +3147,7 @@
_DEBUG_FLAGS='-gdwarf-2 -O0'
MKSHLIB='$(CCC) $(DSO_LDOPTS) -o $@'
echo $ac_n "checking for gethostbyaddr in -lbind""... $ac_c" 1>&6
-echo "configure:3154: checking for gethostbyaddr in -lbind" >&5
+echo "configure:3151: checking for gethostbyaddr in -lbind" >&5
ac_lib_var=`echo bind'_'gethostbyaddr | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -3158,7 +3155,7 @@
ac_save_LIBS="$LIBS"
LIBS="-lbind $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 3162 "configure"
+#line 3159 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -3169,7 +3166,7 @@
gethostbyaddr()
; return 0; }
EOF
-if { (eval echo configure:3173: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3170: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -3349,23 +3346,22 @@
#define HAVE_BSD_FLOCK 1
EOF
+ cat >> confdefs.h <<\EOF
+#define HAVE_SOCKLEN_T 1
+EOF
+
CFLAGS="$CFLAGS -Wmost -fno-common"
case "${target_cpu}" in
i*86*)
- cat >> confdefs.h <<\EOF
-#define i386 1
-EOF
-
- CPU_ARCH=i386
- PR_MD_ASFILES=os_Darwin_x86.s
+ if test -n "$USE_64"; then
+ CPU_ARCH=x86_64
+ CC="$CC -arch x86_64"
+ else
+ CPU_ARCH=i386
+ fi
;;
*)
- cat >> confdefs.h <<\EOF
-#define ppc 1
-EOF
-
CPU_ARCH=ppc
- PR_MD_ASFILES=os_Darwin_ppc.s
;;
esac
DSO_CFLAGS=-fPIC
@@ -3376,6 +3372,7 @@
USE_PTHREADS=1
MDCPUCFG_H=_darwin.cfg
PR_MD_CSRCS=darwin.c
+ PR_MD_ASFILES=os_Darwin.s
# Add Mac OS X support for loading CFM & CFBundle plugins
if test -f /System/Library/Frameworks/Carbon.framework/Carbon; then
@@ -3516,7 +3513,7 @@
EOF
CFLAGS="$CFLAGS $(DSO_CFLAGS) -ansi -Wall"
- MOZ_OBJFORMAT=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
+ MOZ_OBJFORMAT=`test -x /usr/bin/objformat && /usr/bin/objformat || echo elf`
if test "$MOZ_OBJFORMAT" = "elf"; then
DLL_SUFFIX=so
else
@@ -3737,7 +3734,7 @@
if test "$DEFAULT_IMPL_STRATEGY" = "_EMU"; then
USE_NSPR_THREADS=1
USE_PTHREADS=
- USE_USER_THREADS=
+ USE_USER_PTHREADS=
elif test "$DEFAULT_IMPL_STRATEGY" = "_PTH"; then
USE_PTHREADS=1
if test "$USE_NSPR_THREADS"; then
@@ -4504,17 +4501,17 @@
_OPTIMIZE_FLAGS="$_OPTIMIZE_FLAGS -Olimit 4000"
ac_safe=`echo "machine/builtins.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for machine/builtins.h""... $ac_c" 1>&6
-echo "configure:4508: checking for machine/builtins.h" >&5
+echo "configure:4505: checking for machine/builtins.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4513 "configure"
+#line 4510 "configure"
#include "confdefs.h"
#include <machine/builtins.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4518: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4515: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -4732,7 +4729,7 @@
;;
*-solaris*)
- if test -z "$USE_USER_THREADS" && test -z "$USE_NATIVE_THREADS"; then
+ if test -z "$USE_NSPR_THREADS"; then
USE_PTHREADS=1
fi
cat >> confdefs.h <<\EOF
@@ -4763,6 +4760,7 @@
#define HAVE_FCNTL_FILE_LOCKING 1
EOF
+ CPU_ARCH=`uname -p`
MDCPUCFG_H=_solaris.cfg
PR_MD_CSRCS=solaris.c
LD=/usr/ccs/bin/ld
@@ -4773,10 +4771,10 @@
if `$CC -print-prog-name=ld` -v 2>&1 | grep -c GNU >/dev/null; then
GCC_USE_GNU_LD=1
fi
- DSO_LDOPTS='-shared -Wl,-h,$(notdir $@),-z,combreloc,-z,defs,-z,ignore'
+ DSO_LDOPTS='-shared -Wl,-h,$(notdir $@),-z,combreloc,-z,defs,-z,ignore,-Bdirect'
else
DSO_CFLAGS=-KPIC
- DSO_LDOPTS='-G -h $(notdir $@) -z combreloc -z defs -z ignore'
+ DSO_LDOPTS='-G -h $(notdir $@) -z combreloc -z defs -z ignore -Bdirect'
fi
if test -n "$GNU_CC"; then
CFLAGS="$CFLAGS -Wall"
@@ -4892,8 +4890,8 @@
;;
esac
- if test "$OS_TEST" = "sun4u"; then
- # 64-bit Solaris requires SPARC V9 architecture, so the following
+ if test "$CPU_ARCH" = "sparc"; then
+ # 64-bit Solaris SPARC requires V9 architecture, so the following
# is not needed.
if test -z "$USE_64"; then
ULTRASPARC_LIBRARY=nspr_flt
@@ -4978,92 +4976,37 @@
MDCPUCFG_H=_os2.cfg
RESOLVE_LINK_SYMBOLS=1
- # EMX/GCC build
- if test -n "$GNU_CC"; then
- cat >> confdefs.h <<\EOF
-#define XP_OS2_EMX 1
-EOF
-
- cat >> confdefs.h <<\EOF
+ cat >> confdefs.h <<\EOF
#define OS2 1
EOF
- AR=emxomfar
- AR_FLAGS='r $@'
- CFLAGS="$CFLAGS -Wall -Zomf"
- CXXFLAGS="$CFLAGS -Wall -Zomf"
- MKSHLIB='$(CC) $(DSO_LDOPTS) -o $@'
- DSO_CFLAGS=
- DSO_LDOPTS='-Zomf -Zdll -Zmap'
- LDFLAGS='-Zmap'
- _OPTIMIZE_FLAGS="-O2 -s"
- _DEBUG_FLAGS="-g -fno-inline"
- if test -n "$MOZ_OPTIMIZE"; then
- DSO_LDOPTS="$DSO_LDOPTS -Zlinker /EXEPACK:2 -Zlinker /PACKCODE -Zlinker /PACKDATA"
- fi
- OS_LIBS="-lsocket"
- IMPLIB='emximp -o'
- FILTER='emxexp -o'
- if test -n "$MOZ_OS2_HIGH_MEMORY"; then
- DSO_LDOPTS="$DSO_LDOPTS -Zhigh-mem"
- LDFLAGS="$LDFLAGS -Zhigh-mem"
- cat >> confdefs.h <<\EOF
+ AR=emxomfar
+ AR_FLAGS='r $@'
+ CFLAGS="$CFLAGS -Wall -Zomf"
+ CXXFLAGS="$CFLAGS -Wall -Zomf"
+ MKSHLIB='$(CC) $(DSO_LDOPTS) -o $@'
+ DSO_CFLAGS=
+ DSO_LDOPTS='-Zomf -Zdll -Zmap'
+ LDFLAGS='-Zmap'
+ _OPTIMIZE_FLAGS="-O2 -s"
+ _DEBUG_FLAGS="-g -fno-inline"
+ if test -n "$MOZ_OPTIMIZE"; then
+ DSO_LDOPTS="$DSO_LDOPTS -Zlinker /EXEPACK:2 -Zlinker /PACKCODE -Zlinker /PACKDATA"
+ fi
+ OS_LIBS="-lsocket"
+ IMPLIB='emximp -o'
+ FILTER='emxexp -o'
+ if test -n "$MOZ_OS2_HIGH_MEMORY"; then
+ DSO_LDOPTS="$DSO_LDOPTS -Zhigh-mem"
+ LDFLAGS="$LDFLAGS -Zhigh-mem"
+ cat >> confdefs.h <<\EOF
#define MOZ_OS2_HIGH_MEMORY 1
EOF
- fi
-
- # GCC for OS/2 currently predefines these, but we don't want them
- DEFINES="$DEFINES -Uunix -U__unix -U__unix__"
-
- # Visual Age C++ build
- elif test "$VACPP" = "yes"; then
- cat >> confdefs.h <<\EOF
-#define XP_OS2_VACPP 1
-EOF
-
- cat >> confdefs.h <<\EOF
-#define OS2 4
-EOF
-
- cat >> confdefs.h <<\EOF
-#define _X86_ 1
-EOF
-
- OBJ_SUFFIX=obj
- AS=alp
- ASFLAGS='-Mb'
- ASM_SUFFIX=asm
- AR=-ilib
- AR_FLAGS='/NOL /NOI /O:$(subst /,\\,$@)'
- CFLAGS='/Q /qlibansi /Gd+ /Gm+ /Su4 /Mp /Tl9'
- HOST_CFLAGS="$CFLAGS"
- OS_CFLAGS='/Q /qlibansi /Gd+ /Gm+ /Su4 /Mp /Tl9'
- OS_EXE_CFLAGS='/Q /qlibansi /Gd+ /Gm+ /Su4 /Mp /Tl9'
- CXXFLAGS='/Q /qlibansi /Gd+ /Gm+ /Su4 /Mp /Tl9'
- OS_LIBS='so32dll.lib tcp32dll.lib'
- LD='-ilink'
- MKSHLIB='$(LD) $(DSO_LDOPTS)'
- IMPLIB='implib -nologo -noignorecase'
- FILTER='cppfilt -q -B -P'
- _OPTIMIZE_FLAGS='/O+ /Gl+ /qtune=pentium /qarch=pentium'
- _DEBUG_FLAGS='/Ti+ '
- LDFLAGS='/NOL /M /L'
- DLLFLAGS="$DLLFLAGS /O:\$@ /DLL /INC:_dllentry /MAP:\$(@:.dll=.map) /L /NOL"
- EXEFLAGS='/OUT:$@ /PMTYPE:VIO /MAP:$(@:.exe=.map) /L /NOL'
- if test -n "$MOZ_DEBUG"; then
- LDFLAGS="$LDFLAGS /DE"
- DLLFLAGS="$DLLFLAGS /DE"
- EXEFLAGS="$EXEFLAGS /DE"
- fi
- if test -n "$MOZ_OPTIMIZE"; then
- LDFLAGS="$LDFLAGS /OPTFUNC /EXEPACK:2 /PACKCODE /PACKDATA"
- DLLFLAGS="$DLLFLAGS /OPTFUNC /EXEPACK:2 /PACKCODE /PACKDATA"
- EXEFLAGS="$EXEFLAGS /OPTFUNC /EXEPACK:2 /PACKCODE /PACKDATA"
- fi
- LIBNSPR='$(dist_libdir)/nspr$(MOD_MAJOR_VERSION).$(LIB_SUFFIX)'
- LIBPLC='$(dist_libdir)/plc$(MOD_MAJOR_VERSION).$(LIB_SUFFIX)'
fi
+
+ # GCC for OS/2 currently predefines these, but we don't want them
+ DEFINES="$DEFINES -Uunix -U__unix -U__unix__"
;;
*)
@@ -5084,7 +5027,7 @@
;;
*)
echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
-echo "configure:5088: checking for dlopen in -ldl" >&5
+echo "configure:5031: checking for dlopen in -ldl" >&5
ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -5092,7 +5035,7 @@
ac_save_LIBS="$LIBS"
LIBS="-ldl $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 5096 "configure"
+#line 5039 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -5103,7 +5046,7 @@
dlopen()
; return 0; }
EOF
-if { (eval echo configure:5107: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5050: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -5120,17 +5063,17 @@
echo "$ac_t""yes" 1>&6
ac_safe=`echo "dlfcn.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for dlfcn.h""... $ac_c" 1>&6
-echo "configure:5124: checking for dlfcn.h" >&5
+echo "configure:5067: checking for dlfcn.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5129 "configure"
+#line 5072 "configure"
#include "confdefs.h"
#include <dlfcn.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5134: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:5077: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -5163,13 +5106,13 @@
if test $ac_cv_prog_gcc = yes; then
echo $ac_n "checking whether ${CC-cc} needs -traditional""... $ac_c" 1>&6
-echo "configure:5167: checking whether ${CC-cc} needs -traditional" >&5
+echo "configure:5110: checking whether ${CC-cc} needs -traditional" >&5
if eval "test \"`echo '$''{'ac_cv_prog_gcc_traditional'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_pattern="Autoconf.*'x'"
cat > conftest.$ac_ext <<EOF
-#line 5173 "configure"
+#line 5116 "configure"
#include "confdefs.h"
#include <sgtty.h>
Autoconf TIOCGETP
@@ -5187,7 +5130,7 @@
if test $ac_cv_prog_gcc_traditional = no; then
cat > conftest.$ac_ext <<EOF
-#line 5191 "configure"
+#line 5134 "configure"
#include "confdefs.h"
#include <termio.h>
Autoconf TCGETA
@@ -5211,12 +5154,12 @@
for ac_func in lchown strerror
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:5215: checking for $ac_func" >&5
+echo "configure:5158: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5220 "configure"
+#line 5163 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -5239,7 +5182,7 @@
; return 0; }
EOF
-if { (eval echo configure:5243: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5186: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -5280,7 +5223,7 @@
if test -z "$GNU_CC"; then
echo $ac_n "checking for +Olit support""... $ac_c" 1>&6
-echo "configure:5284: checking for +Olit support" >&5
+echo "configure:5227: checking for +Olit support" >&5
if eval "test \"`echo '$''{'ac_cv_hpux_usable_olit_option'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -5319,7 +5262,7 @@
*)
echo $ac_n "checking for pthread_create in -lpthreads""... $ac_c" 1>&6
-echo "configure:5323: checking for pthread_create in -lpthreads" >&5
+echo "configure:5266: checking for pthread_create in -lpthreads" >&5
echo "
#include <pthread.h>
void *foo(void *v) { return v; }
@@ -5341,7 +5284,7 @@
echo "$ac_t""no" 1>&6
echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6
-echo "configure:5345: checking for pthread_create in -lpthread" >&5
+echo "configure:5288: checking for pthread_create in -lpthread" >&5
echo "
#include <pthread.h>
void *foo(void *v) { return v; }
@@ -5363,7 +5306,7 @@
echo "$ac_t""no" 1>&6
echo $ac_n "checking for pthread_create in -lc_r""... $ac_c" 1>&6
-echo "configure:5367: checking for pthread_create in -lc_r" >&5
+echo "configure:5310: checking for pthread_create in -lc_r" >&5
echo "
#include <pthread.h>
void *foo(void *v) { return v; }
@@ -5385,7 +5328,7 @@
echo "$ac_t""no" 1>&6
echo $ac_n "checking for pthread_create in -lc""... $ac_c" 1>&6
-echo "configure:5389: checking for pthread_create in -lc" >&5
+echo "configure:5332: checking for pthread_create in -lc" >&5
echo "
#include <pthread.h>
void *foo(void *v) { return v; }
@@ -5484,19 +5427,6 @@
fi
;;
-
-*-solaris*)
- # Check whether --with-native-threads or --without-native-threads was given.
-if test "${with_native_threads+set}" = set; then
- withval="$with_native_threads"
- if test "$withval" = "yes"; then
- USE_NATIVE_THREADS=1
- USE_USER_PTHREADS=
- USE_PTHREADS=
- fi
-fi
-
- ;;
esac
fi # SKIP_LIBRARY_CHECKS
@@ -5530,7 +5460,7 @@
rm -f conftest*
ac_cv_have_dash_pthread=no
echo $ac_n "checking whether ${CC-cc} accepts -pthread""... $ac_c" 1>&6
-echo "configure:5534: checking whether ${CC-cc} accepts -pthread" >&5
+echo "configure:5464: checking whether ${CC-cc} accepts -pthread" >&5
echo 'int main() { return 0; }' | cat > conftest.c
${CC-cc} -pthread -o conftest conftest.c > conftest.out 2>&1
if test $? -eq 0; then
@@ -5553,7 +5483,7 @@
ac_cv_have_dash_pthreads=no
if test "$ac_cv_have_dash_pthread" = "no"; then
echo $ac_n "checking whether ${CC-cc} accepts -pthreads""... $ac_c" 1>&6
-echo "configure:5557: checking whether ${CC-cc} accepts -pthreads" >&5
+echo "configure:5487: checking whether ${CC-cc} accepts -pthreads" >&5
echo 'int main() { return 0; }' | cat > conftest.c
${CC-cc} -pthreads -o conftest conftest.c > conftest.out 2>&1
if test $? -eq 0; then
@@ -5784,20 +5714,13 @@
fi
;;
*-solaris*)
- if test -n "$USE_NATIVE_THREADS"; then
+ if test -n "$USE_NSPR_THREADS"; then
cat >> confdefs.h <<\EOF
-#define _PR_GLOBAL_THREADS_ONLY 1
-EOF
-
- else
- if test -n "$USE_NSPR_THREADS"; then
- cat >> confdefs.h <<\EOF
#define _PR_LOCAL_THREADS_ONLY 1
EOF
- fi
fi
- if test -z "$USE_NSPR_THREADS"; then
+ if test -n "$USE_PTHREADS"; then
cat >> confdefs.h <<\EOF
#define _REENTRANT 1
EOF
@@ -5816,9 +5739,6 @@
if test -n "$USE_64"; then
PR_MD_ASFILES=os_SunOS_sparcv9.s
fi
- if test -n "$USE_NATIVE_THREADS"; then
- PR_MD_ASFILES="$PR_MD_ASFILES os_SunOS.s"
- fi
fi
fi
;;
@@ -5972,7 +5892,6 @@
-
MAKEFILES="
Makefile
config/Makefile
@@ -6218,7 +6137,6 @@
s%@USE_PTHREADS@%$USE_PTHREADS%g
s%@USE_BTHREADS@%$USE_BTHREADS%g
s%@USE_USER_PTHREADS@%$USE_USER_PTHREADS%g
-s%@USE_NATIVE_THREADS@%$USE_NATIVE_THREADS%g
s%@USE_NSPR_THREADS@%$USE_NSPR_THREADS%g
s%@LIBNSPR@%$LIBNSPR%g
s%@LIBPLC@%$LIBPLC%g
|
[-]
[+]
|
Changed |
nspr-4.7.2.tar.bz2/mozilla/nsprpub/configure.in
^
|
@@ -50,7 +50,7 @@
dnl ========================================================
MOD_MAJOR_VERSION=4
MOD_MINOR_VERSION=7
-MOD_PATCH_VERSION=1
+MOD_PATCH_VERSION=2
NSPR_MODNAME=nspr20
_HAVE_PTHREADS=
USE_PTHREADS=
@@ -996,17 +996,19 @@
AC_DEFINE(XP_UNIX)
AC_DEFINE(DARWIN)
AC_DEFINE(HAVE_BSD_FLOCK)
+ AC_DEFINE(HAVE_SOCKLEN_T)
CFLAGS="$CFLAGS -Wmost -fno-common"
case "${target_cpu}" in
i*86*)
- AC_DEFINE(i386)
- CPU_ARCH=i386
- PR_MD_ASFILES=os_Darwin_x86.s
+ if test -n "$USE_64"; then
+ CPU_ARCH=x86_64
+ CC="$CC -arch x86_64"
+ else
+ CPU_ARCH=i386
+ fi
;;
*)
- AC_DEFINE(ppc)
CPU_ARCH=ppc
- PR_MD_ASFILES=os_Darwin_ppc.s
;;
esac
DSO_CFLAGS=-fPIC
@@ -1017,6 +1019,7 @@
USE_PTHREADS=1
MDCPUCFG_H=_darwin.cfg
PR_MD_CSRCS=darwin.c
+ PR_MD_ASFILES=os_Darwin.s
# Add Mac OS X support for loading CFM & CFBundle plugins
if test -f /System/Library/Frameworks/Carbon.framework/Carbon; then
@@ -1166,7 +1169,7 @@
AC_DEFINE(HAVE_BSD_FLOCK)
AC_DEFINE(HAVE_SOCKLEN_T)
CFLAGS="$CFLAGS $(DSO_CFLAGS) -ansi -Wall"
- MOZ_OBJFORMAT=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
+ MOZ_OBJFORMAT=`test -x /usr/bin/objformat && /usr/bin/objformat || echo elf`
if test "$MOZ_OBJFORMAT" = "elf"; then
DLL_SUFFIX=so
else
@@ -1315,7 +1318,7 @@
if test "$DEFAULT_IMPL_STRATEGY" = "_EMU"; then
USE_NSPR_THREADS=1
USE_PTHREADS=
- USE_USER_THREADS=
+ USE_USER_PTHREADS=
elif test "$DEFAULT_IMPL_STRATEGY" = "_PTH"; then
USE_PTHREADS=1
if test "$USE_NSPR_THREADS"; then
@@ -1970,7 +1973,7 @@
;;
*-solaris*)
- if test -z "$USE_USER_THREADS" && test -z "$USE_NATIVE_THREADS"; then
+ if test -z "$USE_NSPR_THREADS"; then
USE_PTHREADS=1
fi
AC_DEFINE(XP_UNIX)
@@ -1980,6 +1983,7 @@
AC_DEFINE(__svr4__)
AC_DEFINE(SOLARIS)
AC_DEFINE(HAVE_FCNTL_FILE_LOCKING)
+ CPU_ARCH=`uname -p`
MDCPUCFG_H=_solaris.cfg
PR_MD_CSRCS=solaris.c
LD=/usr/ccs/bin/ld
@@ -1990,10 +1994,10 @@
if `$CC -print-prog-name=ld` -v 2>&1 | grep -c GNU >/dev/null; then
GCC_USE_GNU_LD=1
fi
- DSO_LDOPTS='-shared -Wl,-h,$(notdir $@),-z,combreloc,-z,defs,-z,ignore'
+ DSO_LDOPTS='-shared -Wl,-h,$(notdir $@),-z,combreloc,-z,defs,-z,ignore,-Bdirect'
else
DSO_CFLAGS=-KPIC
- DSO_LDOPTS='-G -h $(notdir $@) -z combreloc -z defs -z ignore'
+ DSO_LDOPTS='-G -h $(notdir $@) -z combreloc -z defs -z ignore -Bdirect'
fi
if test -n "$GNU_CC"; then
CFLAGS="$CFLAGS -Wall"
@@ -2088,8 +2092,8 @@
AC_DEFINE(_PR_INET6)
;;
esac
- if test "$OS_TEST" = "sun4u"; then
- # 64-bit Solaris requires SPARC V9 architecture, so the following
+ if test "$CPU_ARCH" = "sparc"; then
+ # 64-bit Solaris SPARC requires V9 architecture, so the following
# is not needed.
if test -z "$USE_64"; then
ULTRASPARC_LIBRARY=nspr_flt
@@ -2138,74 +2142,31 @@
MDCPUCFG_H=_os2.cfg
RESOLVE_LINK_SYMBOLS=1
- # EMX/GCC build
- if test -n "$GNU_CC"; then
- AC_DEFINE(XP_OS2_EMX)
- AC_DEFINE(OS2)
- AR=emxomfar
- AR_FLAGS='r $@'
- CFLAGS="$CFLAGS -Wall -Zomf"
- CXXFLAGS="$CFLAGS -Wall -Zomf"
- MKSHLIB='$(CC) $(DSO_LDOPTS) -o $@'
- DSO_CFLAGS=
- DSO_LDOPTS='-Zomf -Zdll -Zmap'
- LDFLAGS='-Zmap'
- _OPTIMIZE_FLAGS="-O2 -s"
- _DEBUG_FLAGS="-g -fno-inline"
- if test -n "$MOZ_OPTIMIZE"; then
- DSO_LDOPTS="$DSO_LDOPTS -Zlinker /EXEPACK:2 -Zlinker /PACKCODE -Zlinker /PACKDATA"
- fi
- OS_LIBS="-lsocket"
- IMPLIB='emximp -o'
- FILTER='emxexp -o'
- if test -n "$MOZ_OS2_HIGH_MEMORY"; then
- DSO_LDOPTS="$DSO_LDOPTS -Zhigh-mem"
- LDFLAGS="$LDFLAGS -Zhigh-mem"
- AC_DEFINE(MOZ_OS2_HIGH_MEMORY)
- fi
-
- # GCC for OS/2 currently predefines these, but we don't want them
- DEFINES="$DEFINES -Uunix -U__unix -U__unix__"
-
- # Visual Age C++ build
- elif test "$VACPP" = "yes"; then
- AC_DEFINE(XP_OS2_VACPP)
- AC_DEFINE(OS2,4)
- AC_DEFINE(_X86_)
- OBJ_SUFFIX=obj
- AS=alp
- ASFLAGS='-Mb'
- ASM_SUFFIX=asm
- AR=-ilib
- AR_FLAGS='/NOL /NOI /O:$(subst /,\\,$@)'
- CFLAGS='/Q /qlibansi /Gd+ /Gm+ /Su4 /Mp /Tl9'
- HOST_CFLAGS="$CFLAGS"
- OS_CFLAGS='/Q /qlibansi /Gd+ /Gm+ /Su4 /Mp /Tl9'
- OS_EXE_CFLAGS='/Q /qlibansi /Gd+ /Gm+ /Su4 /Mp /Tl9'
- CXXFLAGS='/Q /qlibansi /Gd+ /Gm+ /Su4 /Mp /Tl9'
- OS_LIBS='so32dll.lib tcp32dll.lib'
- LD='-ilink'
- MKSHLIB='$(LD) $(DSO_LDOPTS)'
- IMPLIB='implib -nologo -noignorecase'
- FILTER='cppfilt -q -B -P'
- _OPTIMIZE_FLAGS='/O+ /Gl+ /qtune=pentium /qarch=pentium'
- _DEBUG_FLAGS='/Ti+ '
- LDFLAGS='/NOL /M /L'
- DLLFLAGS="$DLLFLAGS /O:\$@ /DLL /INC:_dllentry /MAP:\$(@:.dll=.map) /L /NOL"
- EXEFLAGS='/OUT:$@ /PMTYPE:VIO /MAP:$(@:.exe=.map) /L /NOL'
- if test -n "$MOZ_DEBUG"; then
- LDFLAGS="$LDFLAGS /DE"
- DLLFLAGS="$DLLFLAGS /DE"
- EXEFLAGS="$EXEFLAGS /DE"
- fi
- if test -n "$MOZ_OPTIMIZE"; then
- LDFLAGS="$LDFLAGS /OPTFUNC /EXEPACK:2 /PACKCODE /PACKDATA"
- DLLFLAGS="$DLLFLAGS /OPTFUNC /EXEPACK:2 /PACKCODE /PACKDATA"
- EXEFLAGS="$EXEFLAGS /OPTFUNC /EXEPACK:2 /PACKCODE /PACKDATA"
- fi
- LIBNSPR='$(dist_libdir)/nspr$(MOD_MAJOR_VERSION).$(LIB_SUFFIX)'
- LIBPLC='$(dist_libdir)/plc$(MOD_MAJOR_VERSION).$(LIB_SUFFIX)'
+ AC_DEFINE(OS2)
+ AR=emxomfar
+ AR_FLAGS='r $@'
+ CFLAGS="$CFLAGS -Wall -Zomf"
+ CXXFLAGS="$CFLAGS -Wall -Zomf"
+ MKSHLIB='$(CC) $(DSO_LDOPTS) -o $@'
+ DSO_CFLAGS=
+ DSO_LDOPTS='-Zomf -Zdll -Zmap'
+ LDFLAGS='-Zmap'
+ _OPTIMIZE_FLAGS="-O2 -s"
+ _DEBUG_FLAGS="-g -fno-inline"
+ if test -n "$MOZ_OPTIMIZE"; then
+ DSO_LDOPTS="$DSO_LDOPTS -Zlinker /EXEPACK:2 -Zlinker /PACKCODE -Zlinker /PACKDATA"
+ fi
+ OS_LIBS="-lsocket"
+ IMPLIB='emximp -o'
+ FILTER='emxexp -o'
+ if test -n "$MOZ_OS2_HIGH_MEMORY"; then
+ DSO_LDOPTS="$DSO_LDOPTS -Zhigh-mem"
+ LDFLAGS="$LDFLAGS -Zhigh-mem"
+ AC_DEFINE(MOZ_OS2_HIGH_MEMORY)
fi
+
+ # GCC for OS/2 currently predefines these, but we don't want them
+ DEFINES="$DEFINES -Uunix -U__unix -U__unix__"
;;
*)
@@ -2448,17 +2409,6 @@
USE_PTHREADS=
fi])
;;
-
-*-solaris*)
- AC_ARG_WITH(native-threads,
- [ --with-native-threads Use native system threads as thread subsystem
- (Solaris only)],
- [ if test "$withval" = "yes"; then
- USE_NATIVE_THREADS=1
- USE_USER_PTHREADS=
- USE_PTHREADS=
- fi])
- ;;
esac
fi # SKIP_LIBRARY_CHECKS
@@ -2668,14 +2618,10 @@
fi
;;
*-solaris*)
- if test -n "$USE_NATIVE_THREADS"; then
- AC_DEFINE(_PR_GLOBAL_THREADS_ONLY)
- else
- if test -n "$USE_NSPR_THREADS"; then
- AC_DEFINE(_PR_LOCAL_THREADS_ONLY)
- fi
+ if test -n "$USE_NSPR_THREADS"; then
+ AC_DEFINE(_PR_LOCAL_THREADS_ONLY)
fi
- if test -z "$USE_NSPR_THREADS"; then
+ if test -n "$USE_PTHREADS"; then
AC_DEFINE(_REENTRANT)
AC_DEFINE(HAVE_POINTER_LOCALTIME_R)
if test "$OS_TEST" = "i86pc"; then
@@ -2688,9 +2634,6 @@
if test -n "$USE_64"; then
PR_MD_ASFILES=os_SunOS_sparcv9.s
fi
- if test -n "$USE_NATIVE_THREADS"; then
- PR_MD_ASFILES="$PR_MD_ASFILES os_SunOS.s"
- fi
fi
fi
;;
@@ -2780,7 +2723,6 @@
AC_SUBST(USE_PTHREADS)
AC_SUBST(USE_BTHREADS)
AC_SUBST(USE_USER_PTHREADS)
-AC_SUBST(USE_NATIVE_THREADS)
AC_SUBST(USE_NSPR_THREADS)
AC_SUBST(LIBNSPR)
|
[-]
[+]
|
Changed |
nspr-4.7.2.tar.bz2/mozilla/nsprpub/lib/ds/Makefile.in
^
|
@@ -162,12 +162,8 @@
ifeq ($(NS_USE_GCC)_$(OS_ARCH),_WINNT)
$(CC) -Fo$@ -c $(CFLAGS) -I$(OBJDIR) $<
else
-ifeq ($(MOZ_OS2_TOOLS), VACPP)
- $(CC) -Fo$@ -c $(CFLAGS) -I$(OBJDIR) $<
-else
$(CC) -o $@ -c $(CFLAGS) -I$(OBJDIR) $<
endif
-endif
#
# Version information generation (end)
#
|
[-]
[+]
|
Changed |
nspr-4.7.2.tar.bz2/mozilla/nsprpub/lib/ds/plarena.c
^
|
@@ -64,6 +64,7 @@
static PRLock *arenaLock;
static PRCallOnceType once;
+static const PRCallOnceType pristineCallOnce;
/*
** InitializeArenas() -- Initialize arena operations.
@@ -371,6 +372,7 @@
PR_DestroyLock(arenaLock);
arenaLock = NULL;
}
+ once = pristineCallOnce;
}
#ifdef PL_ARENAMETER
|
[-]
[+]
|
Changed |
nspr-4.7.2.tar.bz2/mozilla/nsprpub/lib/ds/plhash.h
^
|
@@ -52,15 +52,8 @@
typedef PLHashNumber (PR_CALLBACK *PLHashFunction)(const void *key);
typedef PRIntn (PR_CALLBACK *PLHashComparator)(const void *v1, const void *v2);
-#if defined(XP_OS2_VACPP) && defined(VACPP_FLIP) /* for nsSpaceManager.cpp */
-PR_END_EXTERN_C /* and nsHTMLDocument.cpp */
-#endif
typedef PRIntn (PR_CALLBACK *PLHashEnumerator)(PLHashEntry *he, PRIntn i, void *arg);
-#if defined(XP_OS2_VACPP) && defined(VACPP_FLIP)
-PR_BEGIN_EXTERN_C
-#endif
-
/* Flag bits in PLHashEnumerator's return value */
#define HT_ENUMERATE_NEXT 0 /* continue enumerating entries */
#define HT_ENUMERATE_STOP 1 /* stop enumerating entries */
|
[-]
[+]
|
Changed |
nspr-4.7.2.tar.bz2/mozilla/nsprpub/lib/libc/src/Makefile.in
^
|
@@ -54,13 +54,12 @@
strlen.c \
strcpy.c \
strdup.c \
+ strcase.c \
strcat.c \
strcmp.c \
- strccmp.c \
strchr.c \
strpbrk.c \
strstr.c \
- strcstr.c \
strtok.c \
base64.c \
plerror.c \
@@ -165,12 +164,8 @@
ifeq ($(NS_USE_GCC)_$(OS_ARCH),_WINNT)
$(CC) -Fo$@ -c $(CFLAGS) -I$(OBJDIR) $<
else
-ifeq ($(MOZ_OS2_TOOLS), VACPP)
- $(CC) -Fo$@ -c $(CFLAGS) -I$(OBJDIR) $<
-else
$(CC) -o $@ -c $(CFLAGS) -I$(OBJDIR) $<
endif
-endif
#
# Version information generation (end)
#
|
[-]
[+]
|
Added |
nspr-4.7.2.tar.bz2/mozilla/nsprpub/lib/libc/src/strcase.c
^
|
@@ -0,0 +1,202 @@
+/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is the Netscape Portable Runtime (NSPR).
+ *
+ * The Initial Developer of the Original Code is
+ * Netscape Communications Corporation.
+ * Portions created by the Initial Developer are Copyright (C) 1998-2000
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s):
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+#include "plstr.h"
+#include <string.h>
+
+static const unsigned char uc[] =
+{
+ '\000', '\001', '\002', '\003', '\004', '\005', '\006', '\007',
+ '\010', '\011', '\012', '\013', '\014', '\015', '\016', '\017',
+ '\020', '\021', '\022', '\023', '\024', '\025', '\026', '\027',
+ '\030', '\031', '\032', '\033', '\034', '\035', '\036', '\037',
+ ' ', '!', '"', '#', '$', '%', '&', '\'',
+ '(', ')', '*', '+', ',', '-', '.', '/',
+ '0', '1', '2', '3', '4', '5', '6', '7',
+ '8', '9', ':', ';', '<', '=', '>', '?',
+ '@', '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', '[', '\\', ']', '^', '_',
+ '`', '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', '{', '|', '}', '~', '\177',
+ 0200, 0201, 0202, 0203, 0204, 0205, 0206, 0207,
+ 0210, 0211, 0212, 0213, 0214, 0215, 0216, 0217,
+ 0220, 0221, 0222, 0223, 0224, 0225, 0226, 0227,
+ 0230, 0231, 0232, 0233, 0234, 0235, 0236, 0237,
+ 0240, 0241, 0242, 0243, 0244, 0245, 0246, 0247,
+ 0250, 0251, 0252, 0253, 0254, 0255, 0256, 0257,
+ 0260, 0261, 0262, 0263, 0264, 0265, 0266, 0267,
+ 0270, 0271, 0272, 0273, 0274, 0275, 0276, 0277,
+ 0300, 0301, 0302, 0303, 0304, 0305, 0306, 0307,
+ 0310, 0311, 0312, 0313, 0314, 0315, 0316, 0317,
+ 0320, 0321, 0322, 0323, 0324, 0325, 0326, 0327,
+ 0330, 0331, 0332, 0333, 0334, 0335, 0336, 0337,
+ 0340, 0341, 0342, 0343, 0344, 0345, 0346, 0347,
+ 0350, 0351, 0352, 0353, 0354, 0355, 0356, 0357,
+ 0360, 0361, 0362, 0363, 0364, 0365, 0366, 0367,
+ 0370, 0371, 0372, 0373, 0374, 0375, 0376, 0377
+};
+
+PR_IMPLEMENT(PRIntn)
+PL_strcasecmp(const char *a, const char *b)
+{
+ const unsigned char *ua = (const unsigned char *)a;
+ const unsigned char *ub = (const unsigned char *)b;
+
+ if( ((const char *)0 == a) || (const char *)0 == b )
+ return (PRIntn)(a-b);
+
+ while( (uc[*ua] == uc[*ub]) && ('\0' != *a) )
+ {
+ a++;
+ ua++;
+ ub++;
+ }
+
+ return (PRIntn)(uc[*ua] - uc[*ub]);
+}
+
+PR_IMPLEMENT(PRIntn)
+PL_strncasecmp(const char *a, const char *b, PRUint32 max)
+{
+ const unsigned char *ua = (const unsigned char *)a;
+ const unsigned char *ub = (const unsigned char *)b;
+
+ if( ((const char *)0 == a) || (const char *)0 == b )
+ return (PRIntn)(a-b);
+
+ while( max && (uc[*ua] == uc[*ub]) && ('\0' != *a) )
+ {
+ a++;
+ ua++;
+ ub++;
+ max--;
+ }
+
+ if( 0 == max ) return (PRIntn)0;
+
+ return (PRIntn)(uc[*ua] - uc[*ub]);
+}
+
+PR_IMPLEMENT(char *)
+PL_strcasestr(const char *big, const char *little)
+{
+ PRUint32 ll;
+
+ if( ((const char *)0 == big) || ((const char *)0 == little) ) return (char *)0;
+ if( ((char)0 == *big) || ((char)0 == *little) ) return (char *)0;
+
+ ll = strlen(little);
+
+ for( ; *big; big++ )
+ /* obvious improvement available here */
+ if( 0 == PL_strncasecmp(big, little, ll) )
+ return (char *)big;
+
+ return (char *)0;
+}
+
+PR_IMPLEMENT(char *)
+PL_strcaserstr(const char *big, const char *little)
+{
+ const char *p;
+ PRUint32 bl, ll;
+
+ if( ((const char *)0 == big) || ((const char *)0 == little) ) return (char *)0;
+ if( ((char)0 == *big) || ((char)0 == *little) ) return (char *)0;
+
+ bl = strlen(big);
+ ll = strlen(little);
+ if( bl < ll ) return (char *)0;
+ p = &big[ bl - ll ];
+
+ for( ; p >= big; p-- )
+ /* obvious improvement available here */
+ if( 0 == PL_strncasecmp(p, little, ll) )
+ return (char *)p;
+
+ return (char *)0;
+}
+
+PR_IMPLEMENT(char *)
+PL_strncasestr(const char *big, const char *little, PRUint32 max)
+{
+ PRUint32 ll;
+
+ if( ((const char *)0 == big) || ((const char *)0 == little) ) return (char *)0;
+ if( ((char)0 == *big) || ((char)0 == *little) ) return (char *)0;
+
+ ll = strlen(little);
+ if( ll > max ) return (char *)0;
+ max -= ll;
+ max++;
+
+ for( ; max && *big; big++, max-- )
+ /* obvious improvement available here */
+ if( 0 == PL_strncasecmp(big, little, ll) )
+ return (char *)big;
+
+ return (char *)0;
+}
+
+PR_IMPLEMENT(char *)
+PL_strncaserstr(const char *big, const char *little, PRUint32 max)
+{
+ const char *p;
+ PRUint32 ll;
+
+ if( ((const char *)0 == big) || ((const char *)0 == little) ) return (char *)0;
+ if( ((char)0 == *big) || ((char)0 == *little) ) return (char *)0;
+
+ ll = strlen(little);
+
+ for( p = big; max && *p; p++, max-- )
+ ;
+
+ p -= ll;
+ if( p < big ) return (char *)0;
+
+ for( ; p >= big; p-- )
+ /* obvious improvement available here */
+ if( 0 == PL_strncasecmp(p, little, ll) )
+ return (char *)p;
+
+ return (char *)0;
+}
|
[-]
[+]
|
Changed |
nspr-4.7.2.tar.bz2/mozilla/nsprpub/lib/msgc/tests/Makefile.in
^
|
@@ -92,15 +92,8 @@
endif
ifeq ($(OS_ARCH),OS2)
-ifeq ($(MOZ_OS2_TOOLS),VACPP)
- LDOPTS = -NOE -DEBUG -nologo -PMTYPE:VIO
- LIBPR = $(dist_libdir)/nspr$(NSPR_VERSION).lib
- LIBPLC = $(dist_libdir)/plc$(NSPR_VERSION).lib
- LIBGC= $(dist_libdir)/msgc$(GC_VERSION).lib
-else
LDOPTS += -Zomf -Zlinker /PM:VIO
endif
-endif
ifneq ($(OS_ARCH), WINNT)
PWD = $(shell pwd)
@@ -160,22 +153,13 @@
endif
endif
-ifneq ($(LOCAL_THREADS_ONLY),1)
-# SunOS 5.4 and 5.5 need to link with -lthread or -lpthread,
-# even though we already linked with these system libraries
-# when we built libnspr.so.
-ifeq ($(OS_RELEASE), 5.4)
-EXTRA_LIBS = -lthread
-endif
-
+# SunOS 5.5 needs to link with -lpthread, even though we already
+# linked with this system library when we built libnspr.so.
ifeq ($(OS_RELEASE), 5.5)
ifdef USE_PTHREADS
EXTRA_LIBS = -lpthread
-else
-EXTRA_LIBS = -lthread
endif
endif
-endif # LOCAL_THREADS_ONLY
endif # SunOS
ifeq ($(OS_ARCH),NEC)
|
[-]
[+]
|
Changed |
nspr-4.7.2.tar.bz2/mozilla/nsprpub/lib/prstreams/Makefile.in
^
|
@@ -93,9 +93,7 @@
OS_LIBS = user32.lib
else
ifeq ($(OS_ARCH),OS2)
- ifneq ($(MOZ_OS2_TOOLS),VACPP)
- OS_LIBS = -lstdcpp
- endif
+ OS_LIBS = -lstdcpp
else
ifeq ($(OS_ARCH), AIX)
ifeq ($(OS_RELEASE), 4.1)
@@ -183,12 +181,8 @@
ifeq ($(OS_ARCH), WINNT)
$(CC) -o $@ -c $(CFLAGS) -I$(OBJDIR) $<
else
-ifeq ($(MOZ_OS2_TOOLS), VACPP)
- $(CC) -Fo$@ -c $(CFLAGS) -I$(OBJDIR) $<
-else
$(CC) -o $@ -c $(CFLAGS) -I$(OBJDIR) $<
endif
-endif
#
# Version information generation (end)
#
|
[-]
[+]
|
Changed |
nspr-4.7.2.tar.bz2/mozilla/nsprpub/lib/prstreams/tests/testprstrm/Makefile.in
^
|
@@ -91,13 +91,7 @@
endif
ifeq ($(OS_ARCH),OS2)
- ifeq ($(MOZ_OS2_TOOLS),VACPP)
- LDOPTS = -NOE -DEBUG -nologo -PMTYPE:VIO /S:32768
- LIBPR = $(dist_libdir)/nspr$(MOD_MAJOR_VERSION).lib
- LIBPRSTRMS = $(dist_libdir)/prstrms$(MOD_MAJOR_VERSION).$(LIB_SUFFIX)
- else
- LDOPTS += -Zomf -Zlinker /PM:VIO -lstdcpp
- endif
+LDOPTS += -Zomf -Zlinker /PM:VIO -lstdcpp
endif
ifneq ($(OS_ARCH), WINNT)
@@ -135,13 +129,10 @@
LDOPTS += -Xlinker -R -Xlinker $(PWD)/$(dist_libdir)
else
LDOPTS += -R $(PWD)/$(dist_libdir)
-# CC on SunOS 5.4 and 5.5.x need to link with -lthread or -lpthread
-# (or use the -mt switch) even though we already linked with these
-# system libraries when we built libnspr.so.
+# CC on SunOS 5.5.x needs to link with -lpthread even though we already
+# linked with this system library when we built libnspr.so.
ifdef USE_PTHREADS
EXTRA_LIBS = -lpthread
-else
-EXTRA_LIBS = -lthread
endif # USE_PTHREADS
endif # NS_USE_GCC
endif # 4.1.3_U1
|
[-]
[+]
|
Changed |
nspr-4.7.2.tar.bz2/mozilla/nsprpub/lib/prstreams/tests/testprstrm/testprstrm.cpp
^
|
@@ -40,7 +40,7 @@
#include "prio.h"
#include <string.h>
#include <stdio.h>
-#if defined(XP_UNIX) || defined(XP_OS2_EMX)
+#if defined(XP_UNIX) || defined(XP_OS2)
#include <sys/types.h>
#include <sys/stat.h>
#endif
@@ -55,9 +55,6 @@
} threadarg;
void
-#ifdef XP_OS2_VACPP
-_Optlink
-#endif
threadmain(void *mytag)
{
threadarg arg;
|
[-]
[+]
|
Changed |
nspr-4.7.2.tar.bz2/mozilla/nsprpub/lib/tests/Makefile.in
^
|
@@ -99,14 +99,7 @@
endif
ifeq ($(OS_ARCH),OS2)
- ifeq ($(MOZ_OS2_TOOLS),VACPP)
- LDOPTS = -NOE -DEBUG -nologo -PMTYPE:VIO /S:32768
- LIBPR = $(dist_libdir)/nspr$(MOD_MAJOR_VERSION).lib
- LIBPLC = $(dist_libdir)/plc$(MOD_MAJOR_VERSION).lib
- LIBPLDS= $(dist_libdir)/plds$(MOD_MAJOR_VERSION).$(LIB_SUFFIX)
- else
- LDOPTS += -Zomf -Zlinker /PM:VIO
- endif
+LDOPTS += -Zomf -Zlinker /PM:VIO
endif
ifneq ($(OS_ARCH), WINNT)
@@ -159,18 +152,11 @@
endif
endif
-# SunOS 5.4 and 5.5 need to link with -lthread or -lpthread,
-# even though we already linked with these system libraries
-# when we built libnspr.so.
-ifeq ($(OS_RELEASE), 5.4)
-EXTRA_LIBS = -lthread
-endif
-
+# SunOS 5.5 needs to link with -lpthread, even though we already
+# linked with this system library when we built libnspr.so.
ifeq ($(OS_RELEASE), 5.5)
ifdef USE_PTHREADS
EXTRA_LIBS = -lpthread
-else
-EXTRA_LIBS = -lthread
endif
endif
endif # SunOS
|
[-]
[+]
|
Changed |
nspr-4.7.2.tar.bz2/mozilla/nsprpub/pkg/linux/Makefile.in
^
|
@@ -38,7 +38,7 @@
#
# ***** END LICENSE BLOCK *****
#
-#ident "$Id: Makefile.in,v 1.10 2005/11/18 21:50:20 christophe.ravel.bugs%sun.com Exp $"
+#ident "$Id: Makefile.in,v 1.11 2008/10/20 22:38:45 christophe.ravel.bugs%sun.com Exp $"
#
MOD_DEPTH = ../..
@@ -74,7 +74,7 @@
(cd $(dist_includedir) && tar cphf - .) \
| (mkdir -p opt/sun/private/include/nspr && cd opt/sun/private/include/nspr && tar xvfBp -)
(cd opt/sun/private/include/nspr && \
- rm -rf md private obsolete/pralarm.h obsolete/probslet.h obsolete/prsem.h)
+ rm -rf md)
tar czvf SOURCES/$(NAME)-$(VERSION).tar.gz opt
echo "%define name $(NAME)" >$(SPECFILE)
echo "%define version $(VERSION)" >>$(SPECFILE)
@@ -100,6 +100,7 @@
echo "%dir /opt/sun/private/include" >>$(SPECFILE)
echo "%dir /opt/sun/private/include/nspr" >>$(SPECFILE)
echo "%dir /opt/sun/private/include/nspr/obsolete" >>$(SPECFILE)
+ echo "%dir /opt/sun/private/include/nspr/private" >>$(SPECFILE)
find opt -type f \( -name "*.h" \) \
| sed -e "s-^-/-" >>$(SPECFILE)
rpmbuild $(RPMTARGET) -bb $(SPECFILE)
|
[-]
[+]
|
Changed |
nspr-4.7.2.tar.bz2/mozilla/nsprpub/pkg/solaris/SUNWprd/prototype
^
|
@@ -38,7 +38,7 @@
#
# ***** END LICENSE BLOCK *****
#
-#ident "$Id: prototype,v 1.4 2006/04/05 20:57:09 wtchang%redhat.com Exp $"
+#ident "$Id: prototype,v 1.5 2008/10/20 22:38:46 christophe.ravel.bugs%sun.com Exp $"
#
# This required package information file contains a list of package contents.
# The 'pkgmk' command uses this file to identify the contents of a package
@@ -63,7 +63,11 @@
d none usr/include 0755 root bin
d none usr/include/mps 0755 root bin
d none usr/include/mps/obsolete 0755 root bin
+d none usr/include/mps/private 0755 root bin
+f none usr/include/mps/obsolete/pralarm.h 0644 root bin
+f none usr/include/mps/obsolete/probslet.h 0644 root bin
f none usr/include/mps/obsolete/protypes.h 0644 root bin
+f none usr/include/mps/obsolete/prsem.h 0644 root bin
f none usr/include/mps/prcpucfg.h 0644 root bin
f none usr/include/mps/nspr.h 0644 root bin
f none usr/include/mps/pratom.h 0644 root bin
@@ -81,6 +85,9 @@
f none usr/include/mps/prinrval.h 0644 root bin
f none usr/include/mps/prio.h 0644 root bin
f none usr/include/mps/pripcsem.h 0644 root bin
+f none usr/include/mps/private/pprio.h 0644 root bin
+f none usr/include/mps/private/pprthred.h 0644 root bin
+f none usr/include/mps/private/prpriv.h 0644 root bin
f none usr/include/mps/prlink.h 0644 root bin
f none usr/include/mps/prlock.h 0644 root bin
f none usr/include/mps/prlog.h 0644 root bin
|
[-]
[+]
|
Changed |
nspr-4.7.2.tar.bz2/mozilla/nsprpub/pr/include/md/_beos.h
^
|
@@ -56,6 +56,7 @@
#ifdef BONE_VERSION
#define _PR_HAVE_SOCKADDR_LEN
+#define HAVE_NETINET_TCP_H
#endif
#define PR_LINKER_ARCH "beos"
|
[-]
[+]
|
Changed |
nspr-4.7.2.tar.bz2/mozilla/nsprpub/pr/include/md/_darwin.cfg
^
|
@@ -44,7 +44,7 @@
#define PR_AF_INET6 30 /* same as AF_INET6 */
-#if defined(i386)
+#if defined(__i386__) || defined(__x86_64__)
#undef IS_BIG_ENDIAN
#define IS_LITTLE_ENDIAN 1
#else
@@ -52,12 +52,60 @@
#define IS_BIG_ENDIAN 1
#endif
+#ifdef __x86_64__
+#define IS_64
+#endif
+
#ifndef HAVE_LONG_LONG
#define HAVE_LONG_LONG
#endif
#undef HAVE_ALIGNED_DOUBLES
#define HAVE_ALIGNED_LONGLONGS 1
+#ifdef IS_64
+
+#define PR_BYTES_PER_BYTE 1
+#define PR_BYTES_PER_SHORT 2
+#define PR_BYTES_PER_INT 4
+#define PR_BYTES_PER_INT64 8
+#define PR_BYTES_PER_LONG 8
+#define PR_BYTES_PER_FLOAT 4
+#define PR_BYTES_PER_DOUBLE 8
+#define PR_BYTES_PER_WORD 8
+#define PR_BYTES_PER_DWORD 8
+
+#define PR_BITS_PER_BYTE 8
+#define PR_BITS_PER_SHORT 16
+#define PR_BITS_PER_INT 32
+#define PR_BITS_PER_INT64 64
+#define PR_BITS_PER_LONG 64
+#define PR_BITS_PER_FLOAT 32
+#define PR_BITS_PER_DOUBLE 64
+#define PR_BITS_PER_WORD 64
+#define PR_BITS_PER_DWORD 64
+
+#define PR_BITS_PER_BYTE_LOG2 3
+#define PR_BITS_PER_SHORT_LOG2 4
+#define PR_BITS_PER_INT_LOG2 5
+#define PR_BITS_PER_INT64_LOG2 6
+#define PR_BITS_PER_LONG_LOG2 6
+#define PR_BITS_PER_FLOAT_LOG2 5
+#define PR_BITS_PER_DOUBLE_LOG2 6
+#define PR_BITS_PER_WORD_LOG2 6
+#define PR_BITS_PER_DWORD_LOG2 6
+
+#define PR_ALIGN_OF_SHORT 2
+#define PR_ALIGN_OF_INT 4
+#define PR_ALIGN_OF_LONG 8
+#define PR_ALIGN_OF_INT64 8
+#define PR_ALIGN_OF_FLOAT 4
+#define PR_ALIGN_OF_DOUBLE 8
+#define PR_ALIGN_OF_POINTER 8
+#define PR_ALIGN_OF_WORD 8
+#define PR_ALIGN_OF_DWORD 8
+
+#else /* IS_64 */
+
#define PR_BYTES_PER_BYTE 1
#define PR_BYTES_PER_SHORT 2
#define PR_BYTES_PER_INT 4
@@ -98,6 +146,8 @@
#define PR_ALIGN_OF_POINTER 4
#define PR_ALIGN_OF_WORD 4
+#endif /* IS_64 */
+
#ifndef NO_NSPR_10_SUPPORT
#define BYTES_PER_BYTE PR_BYTES_PER_BYTE
|
[-]
[+]
|
Changed |
nspr-4.7.2.tar.bz2/mozilla/nsprpub/pr/include/md/_darwin.h
^
|
@@ -50,6 +50,8 @@
#define _PR_SI_SYSNAME "DARWIN"
#ifdef __i386__
#define _PR_SI_ARCHITECTURE "x86"
+#elif defined(__x86_64__)
+#define _PR_SI_ARCHITECTURE "x86-64"
#elif defined(__ppc__)
#define _PR_SI_ARCHITECTURE "ppc"
#endif
@@ -62,7 +64,11 @@
#undef HAVE_STACK_GROWING_UP
#define HAVE_DLL
+#ifdef __x86_64__
+#define USE_DLFCN
+#else
#define USE_MACH_DYLD
+#endif
#define _PR_HAVE_SOCKADDR_LEN
#define _PR_STAT_HAS_ST_ATIMESPEC
#define _PR_HAVE_LARGE_OFF_T
@@ -102,7 +108,7 @@
#define IPV6_V6ONLY 27
#endif
-#if defined(__ppc__)
+#ifdef __ppc__
#define _PR_HAVE_ATOMIC_OPS
#define _MD_INIT_ATOMIC()
extern PRInt32 _PR_DarwinPPC_AtomicIncrement(PRInt32 *val);
@@ -113,7 +119,9 @@
#define _MD_ATOMIC_SET(val, newval) _PR_DarwinPPC_AtomicSet(val, newval)
extern PRInt32 _PR_DarwinPPC_AtomicAdd(PRInt32 *ptr, PRInt32 val);
#define _MD_ATOMIC_ADD(ptr, val) _PR_DarwinPPC_AtomicAdd(ptr, val)
-#elif defined(__i386__)
+#endif /* __ppc__ */
+
+#ifdef __i386__
#define _PR_HAVE_ATOMIC_OPS
#define _MD_INIT_ATOMIC()
extern PRInt32 _PR_Darwin_x86_AtomicIncrement(PRInt32 *val);
@@ -126,6 +134,19 @@
#define _MD_ATOMIC_ADD(ptr, val) _PR_Darwin_x86_AtomicAdd(ptr, val)
#endif /* __i386__ */
+#ifdef __x86_64__
+#define _PR_HAVE_ATOMIC_OPS
+#define _MD_INIT_ATOMIC()
+extern PRInt32 _PR_Darwin_x86_64_AtomicIncrement(PRInt32 *val);
+#define _MD_ATOMIC_INCREMENT(val) _PR_Darwin_x86_64_AtomicIncrement(val)
+extern PRInt32 _PR_Darwin_x86_64_AtomicDecrement(PRInt32 *val);
+#define _MD_ATOMIC_DECREMENT(val) _PR_Darwin_x86_64_AtomicDecrement(val)
+extern PRInt32 _PR_Darwin_x86_64_AtomicSet(PRInt32 *val, PRInt32 newval);
+#define _MD_ATOMIC_SET(val, newval) _PR_Darwin_x86_64_AtomicSet(val, newval)
+extern PRInt32 _PR_Darwin_x86_64_AtomicAdd(PRInt32 *ptr, PRInt32 val);
+#define _MD_ATOMIC_ADD(ptr, val) _PR_Darwin_x86_64_AtomicAdd(ptr, val)
+#endif /* __x86_64__ */
+
#define USE_SETJMP
#if !defined(_PR_PTHREADS)
|
[-]
[+]
|
Changed |
nspr-4.7.2.tar.bz2/mozilla/nsprpub/pr/include/md/_linux.cfg
^
|
@@ -331,6 +331,52 @@
#define PR_BYTES_PER_WORD_LOG2 2
#define PR_BYTES_PER_DWORD_LOG2 3
+#elif defined(__sparc__) && defined (__arch64__)
+
+#undef IS_LITTLE_ENDIAN
+#define IS_BIG_ENDIAN 1
+#define IS_64
+
+#define PR_BYTES_PER_BYTE 1
+#define PR_BYTES_PER_SHORT 2
+#define PR_BYTES_PER_INT 4
+#define PR_BYTES_PER_INT64 8
+#define PR_BYTES_PER_LONG 8
+#define PR_BYTES_PER_FLOAT 4
+#define PR_BYTES_PER_DOUBLE 8
+#define PR_BYTES_PER_WORD 8
+#define PR_BYTES_PER_DWORD 8
+
+#define PR_BITS_PER_BYTE 8
+#define PR_BITS_PER_SHORT 16
+#define PR_BITS_PER_INT 32
+#define PR_BITS_PER_INT64 64
+#define PR_BITS_PER_LONG 64
+#define PR_BITS_PER_FLOAT 32
+#define PR_BITS_PER_DOUBLE 64
+#define PR_BITS_PER_WORD 64
+
+#define PR_BITS_PER_BYTE_LOG2 3
+#define PR_BITS_PER_SHORT_LOG2 4
+#define PR_BITS_PER_INT_LOG2 5
+#define PR_BITS_PER_INT64_LOG2 6
+#define PR_BITS_PER_LONG_LOG2 6
+#define PR_BITS_PER_FLOAT_LOG2 5
+#define PR_BITS_PER_DOUBLE_LOG2 6
+#define PR_BITS_PER_WORD_LOG2 6
+
+#define PR_ALIGN_OF_SHORT 2
+#define PR_ALIGN_OF_INT 4
+#define PR_ALIGN_OF_INT64 8
+#define PR_ALIGN_OF_LONG 8
+#define PR_ALIGN_OF_FLOAT 4
+#define PR_ALIGN_OF_DOUBLE 8
+#define PR_ALIGN_OF_POINTER 8
+#define PR_ALIGN_OF_WORD 8
+
+#define PR_BYTES_PER_WORD_LOG2 3
+#define PR_BYTES_PER_DWORD_LOG2 3
+
#elif defined(__sparc__)
#undef IS_LITTLE_ENDIAN
|
[-]
[+]
|
Changed |
nspr-4.7.2.tar.bz2/mozilla/nsprpub/pr/include/md/_linux.h
^
|
@@ -63,6 +63,8 @@
#define _PR_SI_ARCHITECTURE "x86-64"
#elif defined(__mc68000__)
#define _PR_SI_ARCHITECTURE "m68k"
+#elif defined(__sparc__) && defined(__arch64__)
+#define _PR_SI_ARCHITECTURE "sparc64"
#elif defined(__sparc__)
#define _PR_SI_ARCHITECTURE "sparc"
#elif defined(__i386__)
|
[-]
[+]
|
Changed |
nspr-4.7.2.tar.bz2/mozilla/nsprpub/pr/include/md/_os2.h
^
|
@@ -53,34 +53,6 @@
#include <errno.h>
-#ifdef XP_OS2_VACPP
-/* TODO RAMSEMs need to be written for GCC/EMX */
-#define USE_RAMSEM
-#endif
-
-#ifdef USE_RAMSEM
-#pragma pack(4)
-
-#pragma pack(2)
-typedef struct _RAMSEM
-{
- ULONG ulTIDPID;
- ULONG hevSem;
- ULONG cLocks;
- USHORT cWaiting;
- USHORT cPosts;
-} RAMSEM, *PRAMSEM;
-
-typedef struct _CRITICAL_SECTION
-{
- ULONG ulReserved[4]; /* Same size as RAMSEM */
-} CRITICAL_SECTION, *PCRITICAL_SECTION, *LPCRITICAL_SECTION;
-#pragma pack(4)
-
-APIRET _Optlink SemRequest486(PRAMSEM, ULONG);
-APIRET _Optlink SemReleasex86(PRAMSEM, ULONG);
-#endif
-
/*
* Internal configuration macros
*/
@@ -94,6 +66,7 @@
#undef HAVE_THREAD_AFFINITY
#define _PR_HAVE_THREADSAFE_GETHOST
#define _PR_HAVE_ATOMIC_OPS
+#define HAVE_NETINET_TCP_H
#define HANDLE unsigned long
#define HINSTANCE HMODULE
@@ -187,11 +160,7 @@
};
struct _MDLock {
-#ifdef USE_RAMSEM
- CRITICAL_SECTION mutex; /* this is recursive on NT */
-#else
- HMTX mutex; /* this is recursive on NT */
-#endif
+ HMTX mutex; /* this is recursive on OS/2 */
/*
* When notifying cvars, there is no point in actually
@@ -252,10 +221,6 @@
/* --- Socket IO stuff --- */
/* The ones that don't map directly may need to be re-visited... */
-#ifdef XP_OS2_VACPP
-#define EPIPE EBADF
-#define EIO ECONNREFUSED
-#endif
#define _MD_EACCES EACCES
#define _MD_EADDRINUSE EADDRINUSE
#define _MD_EADDRNOTAVAIL EADDRNOTAVAIL
@@ -292,11 +257,7 @@
#define _MD_CLOSE_SOCKET _MD_CloseSocket
#define _MD_SENDTO (_PR_MD_SENDTO)
#define _MD_RECVFROM (_PR_MD_RECVFROM)
-#ifdef XP_OS2_VACPP
-#define _MD_SOCKETPAIR(s, type, proto, sv) -1
-#else
#define _MD_SOCKETPAIR (_PR_MD_SOCKETPAIR)
-#endif
#define _MD_GETSOCKNAME (_PR_MD_GETSOCKNAME)
#define _MD_GETPEERNAME (_PR_MD_GETPEERNAME)
#define _MD_GETSOCKOPT (_PR_MD_GETSOCKOPT)
@@ -376,26 +337,11 @@
#define _PR_LOCK _MD_LOCK
#define _PR_UNLOCK _MD_UNLOCK
-#ifdef USE_RAMSEM
-#define _MD_NEW_LOCK (_PR_MD_NEW_LOCK)
-#define _MD_FREE_LOCK(lock) (DosCloseEventSem(((PRAMSEM)(&((lock)->mutex)))->hevSem))
-#define _MD_LOCK(lock) (SemRequest486(&((lock)->mutex), -1))
-#define _MD_TEST_AND_LOCK(lock) (SemRequest486(&((lock)->mutex), -1),0)
-#define _MD_UNLOCK(lock) \
- PR_BEGIN_MACRO \
- if (0 != (lock)->notified.length) { \
- md_UnlockAndPostNotifies((lock), NULL, NULL); \
- } else { \
- SemReleasex86( &(lock)->mutex, 0 ); \
- } \
- PR_END_MACRO
-#else
#define _MD_NEW_LOCK (_PR_MD_NEW_LOCK)
#define _MD_FREE_LOCK(lock) (DosCloseMutexSem((lock)->mutex))
#define _MD_LOCK(lock) (DosRequestMutexSem((lock)->mutex, SEM_INDEFINITE_WAIT))
#define _MD_TEST_AND_LOCK(lock) (DosRequestMutexSem((lock)->mutex, SEM_INDEFINITE_WAIT),0)
#define _MD_UNLOCK (_PR_MD_UNLOCK)
-#endif
/* --- lock and cv waiting --- */
#define _MD_WAIT (_PR_MD_WAIT)
|
[-]
[+]
|
Changed |
nspr-4.7.2.tar.bz2/mozilla/nsprpub/pr/include/md/_os2_errors.h
^
|
@@ -130,10 +130,8 @@
NSPR_API(void) _MD_os2_map_shutdown_error(PRInt32 err);
#define _PR_MD_MAP_SHUTDOWN_ERROR _MD_os2_map_shutdown_error
-#ifndef XP_OS2_VACPP
NSPR_API(void) _MD_os2_map_socketpair_error(int err);
#define _PR_MD_MAP_SOCKETPAIR_ERROR _MD_os2_map_socketpair_error
-#endif
NSPR_API(void) _MD_os2_map_getsockname_error(PRInt32 err);
#define _PR_MD_MAP_GETSOCKNAME_ERROR _MD_os2_map_getsockname_error
|
[-]
[+]
|
Changed |
nspr-4.7.2.tar.bz2/mozilla/nsprpub/pr/include/md/_pcos.h
^
|
@@ -56,7 +56,7 @@
** Routines for processing command line arguments
*/
PR_BEGIN_EXTERN_C
-#ifndef XP_OS2_EMX
+#ifndef XP_OS2
extern char *optarg;
extern int optind;
extern int getopt(int argc, char **argv, char *spec);
@@ -69,7 +69,7 @@
** These definitions are from:
** <dirent.h>
*/
-#ifdef XP_OS2_EMX
+#ifdef XP_OS2
#include <sys/types.h>
#endif
#include <sys/stat.h>
|
[-]
[+]
|
Changed |
nspr-4.7.2.tar.bz2/mozilla/nsprpub/pr/include/md/_pth.h
^
|
@@ -147,7 +147,7 @@
|| defined(HPUX) || defined(FREEBSD) \
|| defined(NETBSD) || defined(OPENBSD) || defined(BSDI) \
|| defined(VMS) || defined(NTO) || defined(DARWIN) \
- || defined(UNIXWARE) || defined(RISCOS)
+ || defined(UNIXWARE) || defined(RISCOS) || defined(SYMBIAN)
#ifdef __GNU__
/* Hurd pthreads don't have an invalid value for pthread_t. -- rmh */
#error Using Hurd pthreads
@@ -204,7 +204,7 @@
|| defined(LINUX) || defined(__GNU__)|| defined(__GLIBC__) \
|| defined(FREEBSD) || defined(NETBSD) || defined(OPENBSD) \
|| defined(BSDI) || defined(VMS) || defined(UNIXWARE) \
- || defined(DARWIN)
+ || defined(DARWIN) || defined(SYMBIAN)
#define PT_NO_SIGTIMEDWAIT
#endif
@@ -235,7 +235,7 @@
#endif /* defined(_PR_DCETHREADS) */
#elif defined(LINUX) || defined(__GNU__) || defined(__GLIBC__) \
- || defined(FREEBSD)
+ || defined(FREEBSD) || defined(SYMBIAN)
#define PT_PRIO_MIN sched_get_priority_min(SCHED_OTHER)
#define PT_PRIO_MAX sched_get_priority_max(SCHED_OTHER)
#elif defined(NTO)
@@ -295,7 +295,7 @@
|| defined(LINUX) || defined(__GNU__) || defined(__GLIBC__) \
|| defined(FREEBSD) || defined(NETBSD) || defined(OPENBSD) \
|| defined(BSDI) || defined(NTO) || defined(DARWIN) \
- || defined(UNIXWARE) || defined(RISCOS)
+ || defined(UNIXWARE) || defined(RISCOS) || defined(SYMBIAN)
#define _PT_PTHREAD_YIELD() sched_yield()
#else
#error "Need to define _PT_PTHREAD_YIELD for this platform"
|
[-]
[+]
|
Changed |
nspr-4.7.2.tar.bz2/mozilla/nsprpub/pr/include/md/_solaris.h
^
|
@@ -75,16 +75,12 @@
* Intel x86 has atomic instructions.
*
* Sparc v8 does not have instructions to efficiently implement
- * atomic increment/decrement operations. In the local threads
- * only and pthreads versions, we use the default atomic routine
- * implementation in pratom.c. The obsolete global threads only
- * version uses a global mutex_t to implement the atomic routines
- * in solaris.c, which is actually equivalent to the default
- * implementation.
+ * atomic increment/decrement operations. We use the default
+ * atomic routine implementation in pratom.c.
*
* 64-bit Solaris requires sparc v9, which has atomic instructions.
*/
-#if defined(i386) || defined(_PR_GLOBAL_THREADS_ONLY) || defined(IS_64)
+#if defined(i386) || defined(IS_64)
#define _PR_HAVE_ATOMIC_OPS
#endif
@@ -140,7 +136,7 @@
PRUint32 __sin6_src_id;
};
#endif
-#if defined(_PR_GLOBAL_THREADS_ONLY) || defined(_PR_PTHREADS)
+#if defined(_PR_PTHREADS)
#define _PR_HAVE_GETHOST_R
#define _PR_HAVE_GETHOST_R_POINTER
#endif
@@ -177,281 +173,10 @@
#define _MD_EARLY_INIT _MD_EarlyInit
#define _MD_FINAL_INIT _PR_UnixInit
-#elif defined(_PR_GLOBAL_THREADS_ONLY)
-
-#include "prthread.h"
-
-#include <ucontext.h>
-
-/*
-** Iinitialization Related definitions
-*/
-
-NSPR_API(void) _MD_EarlyInit(void);
-
-#define _MD_EARLY_INIT _MD_EarlyInit
-#define _MD_FINAL_INIT _PR_UnixInit
-
-#define _MD_GET_SP(threadp) threadp->md.sp
-
-/*
-** Clean-up the thread machine dependent data structure
-*/
-#define _MD_INIT_THREAD _MD_InitializeThread
-#define _MD_INIT_ATTACHED_THREAD _MD_InitializeThread
-
-NSPR_API(PRStatus) _MD_CreateThread(PRThread *thread,
- void (*start)(void *),
- PRThreadPriority priority,
- PRThreadScope scope,
- PRThreadState state,
- PRUint32 stackSize);
-#define _MD_CREATE_THREAD _MD_CreateThread
-
-#define _PR_CONTEXT_TYPE ucontext_t
-
-#define CONTEXT(_thread) (&(_thread)->md.context)
-
-#include <thread.h>
-#include <sys/lwp.h>
-#include <synch.h>
-
-extern struct PRLock *_pr_schedLock;
-
-/*
-** Thread Local Storage
-*/
-
-#define THREAD_KEY_T thread_key_t
-
-extern struct PRThread *_pr_attached_thread_tls();
-extern struct PRThread *_pr_current_thread_tls();
-extern struct _PRCPU *_pr_current_cpu_tls();
-extern struct PRThread *_pr_last_thread_tls();
-
-extern THREAD_KEY_T threadid_key;
-extern THREAD_KEY_T cpuid_key;
-extern THREAD_KEY_T last_thread_key;
-
-#define _MD_GET_ATTACHED_THREAD() _pr_attached_thread_tls()
-#define _MD_CURRENT_THREAD() _pr_current_thread_tls()
-#define _MD_CURRENT_CPU() _pr_current_cpu_tls()
-#define _MD_LAST_THREAD() _pr_last_thread_tls()
-
-#define _MD_SET_CURRENT_THREAD(newval) \
- PR_BEGIN_MACRO \
- thr_setspecific(threadid_key, (void *)newval); \
- PR_END_MACRO
-
-#define _MD_SET_CURRENT_CPU(newval) \
- PR_BEGIN_MACRO \
- thr_setspecific(cpuid_key, (void *)newval); \
- PR_END_MACRO
-
-#define _MD_SET_LAST_THREAD(newval) \
- PR_BEGIN_MACRO \
- thr_setspecific(last_thread_key, (void *)newval); \
- PR_END_MACRO
-
-#define _MD_CLEAN_THREAD(_thread) _MD_cleanup_thread(_thread)
-extern void _MD_exit_thread(PRThread *thread);
-#define _MD_EXIT_THREAD(thread) _MD_exit_thread(thread)
-
-#define _MD_SUSPEND_THREAD(thread) _MD_Suspend(thread)
-#define _MD_RESUME_THREAD(thread) thr_continue((thread)->md.handle)
-
-/* XXXX Needs to be defined - Prashant */
-#define _MD_SUSPEND_CPU(cpu)
-#define _MD_RESUME_CPU(cpu)
-
-extern void _MD_Begin_SuspendAll(void);
-extern void _MD_End_SuspendAll(void);
-extern void _MD_End_ResumeAll(void);
-#define _MD_BEGIN_SUSPEND_ALL() _MD_Begin_SuspendAll()
-#define _MD_BEGIN_RESUME_ALL()
-#define _MD_END_SUSPEND_ALL() _MD_End_SuspendAll()
-#define _MD_END_RESUME_ALL() _MD_End_ResumeAll()
-
-#define _MD_INIT_LOCKS()
-#define _MD_NEW_LOCK(md_lockp) (mutex_init(&((md_lockp)->lock),USYNC_THREAD,NULL) ? PR_FAILURE : PR_SUCCESS)
-#define _MD_FREE_LOCK(md_lockp) mutex_destroy(&((md_lockp)->lock))
-#define _MD_UNLOCK(md_lockp) mutex_unlock(&((md_lockp)->lock))
-#define _MD_TEST_AND_LOCK(md_lockp) mutex_trylock(&((md_lockp)->lock))
-struct _MDLock;
-NSPR_API(void) _MD_lock(struct _MDLock *md_lock);
-#undef PROFILE_LOCKS
-#ifndef PROFILE_LOCKS
-#define _MD_LOCK(md_lockp) _MD_lock(md_lockp)
-#else
-#define _MD_LOCK(md_lockp) \
- PR_BEGIN_MACRO \
- int rv = _MD_TEST_AND_LOCK(md_lockp); \
- if (rv == 0) { \
- (md_lockp)->hitcount++; \
- } else { \
- (md_lockp)->misscount++; \
- _MD_lock(md_lockp); \
- } \
- PR_END_MACRO
-#endif
-
-#define _PR_LOCK_HEAP() if (_pr_heapLock) _MD_LOCK(&_pr_heapLock->md)
-#define _PR_UNLOCK_HEAP() if (_pr_heapLock) _MD_UNLOCK(&_pr_heapLock->md)
-
-#define _MD_ATTACH_THREAD(threadp)
-
-
-#define THR_KEYCREATE thr_keycreate
-#define THR_SELF thr_self
-#define _MD_NEW_CV(condp) cond_init(&((condp)->cv), USYNC_THREAD, 0)
-#define COND_WAIT(condp, mutexp) cond_wait(condp, mutexp)
-#define COND_TIMEDWAIT(condp, mutexp, tspec) \
- cond_timedwait(condp, mutexp, tspec)
-#define _MD_NOTIFY_CV(condp, lockp) cond_signal(&((condp)->cv))
-#define _MD_NOTIFYALL_CV(condp,unused) cond_broadcast(&((condp)->cv))
-#define _MD_FREE_CV(condp) cond_destroy(&((condp)->cv))
-#define _MD_YIELD() thr_yield()
-#include <time.h>
-/*
- * Because clock_gettime() on Solaris/x86 2.4 always generates a
- * segmentation fault, we use an emulated version _pr_solx86_clock_gettime(),
- * which is implemented using gettimeofday().
- */
-#if defined(i386) && defined(SOLARIS2_4)
-extern int _pr_solx86_clock_gettime(clockid_t clock_id, struct timespec *tp);
-#define GETTIME(tt) _pr_solx86_clock_gettime(CLOCK_REALTIME, (tt))
-#else
-#define GETTIME(tt) clock_gettime(CLOCK_REALTIME, (tt))
-#endif /* i386 && SOLARIS2_4 */
-
-#define MUTEX_T mutex_t
-#define COND_T cond_t
-
-#define _MD_NEW_SEM(md_semp,_val) sema_init(&((md_semp)->sem),_val,USYNC_THREAD,NULL)
-#define _MD_DESTROY_SEM(md_semp) sema_destroy(&((md_semp)->sem))
-#define _MD_WAIT_SEM(md_semp) sema_wait(&((md_semp)->sem))
-#define _MD_POST_SEM(md_semp) sema_post(&((md_semp)->sem))
-
-#define _MD_SAVE_ERRNO(_thread)
-#define _MD_RESTORE_ERRNO(_thread)
-#define _MD_INIT_RUNNING_CPU(cpu) _MD_unix_init_running_cpu(cpu)
-
-extern struct _MDLock _pr_ioq_lock;
-#define _MD_IOQ_LOCK() _MD_LOCK(&_pr_ioq_lock)
-#define _MD_IOQ_UNLOCK() _MD_UNLOCK(&_pr_ioq_lock)
-
-extern PRStatus _MD_wait(struct PRThread *, PRIntervalTime timeout);
-#define _MD_WAIT _MD_wait
-
-extern PRStatus _MD_WakeupWaiter(struct PRThread *);
-#define _MD_WAKEUP_WAITER _MD_WakeupWaiter
-
-NSPR_API(void) _MD_InitIO(void);
-#define _MD_INIT_IO _MD_InitIO
-
-#define _MD_INIT_CONTEXT(_thread, _sp, _main, status) \
- PR_BEGIN_MACRO \
- *status = PR_TRUE; \
- PR_END_MACRO
-#define _MD_SWITCH_CONTEXT(_thread)
-#define _MD_RESTORE_CONTEXT(_newThread)
-
-struct _MDLock {
- MUTEX_T lock;
-#ifdef PROFILE_LOCKS
- PRInt32 hitcount;
- PRInt32 misscount;
-#endif
-};
-
-struct _MDCVar {
- COND_T cv;
-};
-
-struct _MDSemaphore {
- sema_t sem;
-};
-
-struct _MDThread {
- _PR_CONTEXT_TYPE context;
- thread_t handle;
- lwpid_t lwpid;
- uint_t sp; /* stack pointer */
- uint_t threadID; /* ptr to solaris-internal thread id structures */
- struct _MDSemaphore waiter_sem;
-};
-
-struct _MDThreadStack {
- PRInt8 notused;
-};
-
-struct _MDSegment {
- PRInt8 notused;
-};
-
-/*
- * md-specific cpu structure field, common to all Unix platforms
- */
-#define _PR_MD_MAX_OSFD FD_SETSIZE
-
-struct _MDCPU_Unix {
- PRCList ioQ;
- PRUint32 ioq_timeout;
- PRInt32 ioq_max_osfd;
- PRInt32 ioq_osfd_cnt;
-#ifndef _PR_USE_POLL
- fd_set fd_read_set, fd_write_set, fd_exception_set;
- PRInt16 fd_read_cnt[_PR_MD_MAX_OSFD],fd_write_cnt[_PR_MD_MAX_OSFD],
- fd_exception_cnt[_PR_MD_MAX_OSFD];
-#else
- struct pollfd *ioq_pollfds;
- int ioq_pollfds_size;
-#endif /* _PR_USE_POLL */
-};
-
-#define _PR_IOQ(_cpu) ((_cpu)->md.md_unix.ioQ)
-#define _PR_ADD_TO_IOQ(_pq, _cpu) PR_APPEND_LINK(&_pq.links, &_PR_IOQ(_cpu))
-#define _PR_FD_READ_SET(_cpu) ((_cpu)->md.md_unix.fd_read_set)
-#define _PR_FD_READ_CNT(_cpu) ((_cpu)->md.md_unix.fd_read_cnt)
-#define _PR_FD_WRITE_SET(_cpu) ((_cpu)->md.md_unix.fd_write_set)
-#define _PR_FD_WRITE_CNT(_cpu) ((_cpu)->md.md_unix.fd_write_cnt)
-#define _PR_FD_EXCEPTION_SET(_cpu) ((_cpu)->md.md_unix.fd_exception_set)
-#define _PR_FD_EXCEPTION_CNT(_cpu) ((_cpu)->md.md_unix.fd_exception_cnt)
-#define _PR_IOQ_TIMEOUT(_cpu) ((_cpu)->md.md_unix.ioq_timeout)
-#define _PR_IOQ_MAX_OSFD(_cpu) ((_cpu)->md.md_unix.ioq_max_osfd)
-#define _PR_IOQ_OSFD_CNT(_cpu) ((_cpu)->md.md_unix.ioq_osfd_cnt)
-#define _PR_IOQ_POLLFDS(_cpu) ((_cpu)->md.md_unix.ioq_pollfds)
-#define _PR_IOQ_POLLFDS_SIZE(_cpu) ((_cpu)->md.md_unix.ioq_pollfds_size)
-
-#define _PR_IOQ_MIN_POLLFDS_SIZE(_cpu) 32
-
-
-struct _MDCPU {
- struct _MDCPU_Unix md_unix;
-};
-
-/* The following defines the unwrapped versions of select() and poll(). */
-extern int _select(int nfds, fd_set *readfds, fd_set *writefds,
- fd_set *exceptfds, struct timeval *timeout);
-#define _MD_SELECT _select
-
-#include <poll.h>
-#define _MD_POLL _poll
-extern int _poll(struct pollfd *fds, unsigned long nfds, int timeout);
-
-PR_BEGIN_EXTERN_C
-
-/*
-** Missing function prototypes
-*/
-extern int gethostname (char *name, int namelen);
-
-PR_END_EXTERN_C
-
-#else /* _PR_GLOBAL_THREADS_ONLY */
+#else /* _PR_PTHREADS */
/*
- * LOCAL_THREADS_ONLY implementation on Solaris
+ * _PR_LOCAL_THREADS_ONLY implementation on Solaris
*/
#include "prthread.h"
@@ -462,7 +187,7 @@
#include <synch.h>
/*
-** Iinitialization Related definitions
+** Initialization Related definitions
*/
NSPR_API(void) _MD_EarlyInit(void);
@@ -798,7 +523,7 @@
PR_END_EXTERN_C
-#endif /* _PR_GLOBAL_THREADS_ONLY */
+#endif /* _PR_PTHREADS */
extern void _MD_solaris_map_sendfile_error(int err);
|
[-]
[+]
|
Added |
nspr-4.7.2.tar.bz2/mozilla/nsprpub/pr/include/md/_symbian.cfg
^
|
@@ -0,0 +1,162 @@
+/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is the Netscape Portable Runtime (NSPR).
+ *
+ * The Initial Developer of the Original Code is
+ * Netscape Communications Corporation.
+ * Portions created by the Initial Developer are Copyright (C) 1998-2000
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s):
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+#ifndef nspr_cpucfg___
+#define nspr_cpucfg___
+
+#ifndef XP_UNIX
+#define XP_UNIX
+#endif
+
+#ifndef SYMBIAN
+#define SYMBIAN
+#endif
+
+#define PR_AF_INET6 0x0806 /* same as AF_INET6 */
+
+#ifdef __arm__
+
+#define IS_LITTLE_ENDIAN 1
+#undef IS_BIG_ENDIAN
+
+#define PR_BYTES_PER_BYTE 1
+#define PR_BYTES_PER_SHORT 2
+#define PR_BYTES_PER_INT 4
+#define PR_BYTES_PER_INT64 8
+#define PR_BYTES_PER_LONG 4
+#define PR_BYTES_PER_FLOAT 4
+#define PR_BYTES_PER_DOUBLE 8
+#define PR_BYTES_PER_WORD 4
+#define PR_BYTES_PER_DWORD 8
+
+#define PR_BITS_PER_BYTE 8
+#define PR_BITS_PER_SHORT 16
+#define PR_BITS_PER_INT 32
+#define PR_BITS_PER_INT64 64
+#define PR_BITS_PER_LONG 32
+#define PR_BITS_PER_FLOAT 32
+#define PR_BITS_PER_DOUBLE 64
+#define PR_BITS_PER_WORD 32
+
+#define PR_BITS_PER_BYTE_LOG2 3
+#define PR_BITS_PER_SHORT_LOG2 4
+#define PR_BITS_PER_INT_LOG2 5
+#define PR_BITS_PER_INT64_LOG2 6
+#define PR_BITS_PER_LONG_LOG2 5
+#define PR_BITS_PER_FLOAT_LOG2 5
+#define PR_BITS_PER_DOUBLE_LOG2 6
+#define PR_BITS_PER_WORD_LOG2 5
+
+#define PR_ALIGN_OF_SHORT 2
+#define PR_ALIGN_OF_INT 4
+#define PR_ALIGN_OF_LONG 4
+#define PR_ALIGN_OF_FLOAT 4
+#define PR_ALIGN_OF_POINTER 4
+#define PR_ALIGN_OF_WORD 4
+#ifdef __WINS__
+#define PR_ALIGN_OF_INT64 4
+#define PR_ALIGN_OF_DOUBLE 4
+#else
+#define PR_ALIGN_OF_INT64 8
+#define PR_ALIGN_OF_DOUBLE 8
+#endif
+
+#define PR_BYTES_PER_WORD_LOG2 2
+#define PR_BYTES_PER_DWORD_LOG2 3
+
+#else
+
+#error "Unknown CPU architecture"
+
+#endif
+
+#ifndef HAVE_LONG_LONG
+#define HAVE_LONG_LONG
+#endif
+#if PR_ALIGN_OF_DOUBLE == 8
+#define HAVE_ALIGNED_DOUBLES
+#endif
+#if PR_ALIGN_OF_INT64 == 8
+#define HAVE_ALIGNED_LONGLONGS
+#endif
+
+#ifndef NO_NSPR_10_SUPPORT
+
+#define BYTES_PER_BYTE PR_BYTES_PER_BYTE
+#define BYTES_PER_SHORT PR_BYTES_PER_SHORT
+#define BYTES_PER_INT PR_BYTES_PER_INT
+#define BYTES_PER_INT64 PR_BYTES_PER_INT64
+#define BYTES_PER_LONG PR_BYTES_PER_LONG
+#define BYTES_PER_FLOAT PR_BYTES_PER_FLOAT
+#define BYTES_PER_DOUBLE PR_BYTES_PER_DOUBLE
+#define BYTES_PER_WORD PR_BYTES_PER_WORD
+#define BYTES_PER_DWORD PR_BYTES_PER_DWORD
+
+#define BITS_PER_BYTE PR_BITS_PER_BYTE
+#define BITS_PER_SHORT PR_BITS_PER_SHORT
+#define BITS_PER_INT PR_BITS_PER_INT
+#define BITS_PER_INT64 PR_BITS_PER_INT64
+#define BITS_PER_LONG PR_BITS_PER_LONG
+#define BITS_PER_FLOAT PR_BITS_PER_FLOAT
+#define BITS_PER_DOUBLE PR_BITS_PER_DOUBLE
+#define BITS_PER_WORD PR_BITS_PER_WORD
+
+#define BITS_PER_BYTE_LOG2 PR_BITS_PER_BYTE_LOG2
+#define BITS_PER_SHORT_LOG2 PR_BITS_PER_SHORT_LOG2
+#define BITS_PER_INT_LOG2 PR_BITS_PER_INT_LOG2
+#define BITS_PER_INT64_LOG2 PR_BITS_PER_INT64_LOG2
+#define BITS_PER_LONG_LOG2 PR_BITS_PER_LONG_LOG2
+#define BITS_PER_FLOAT_LOG2 PR_BITS_PER_FLOAT_LOG2
+#define BITS_PER_DOUBLE_LOG2 PR_BITS_PER_DOUBLE_LOG2
+#define BITS_PER_WORD_LOG2 PR_BITS_PER_WORD_LOG2
+
+#define ALIGN_OF_SHORT PR_ALIGN_OF_SHORT
+#define ALIGN_OF_INT PR_ALIGN_OF_INT
+#define ALIGN_OF_LONG PR_ALIGN_OF_LONG
+#define ALIGN_OF_INT64 PR_ALIGN_OF_INT64
+#define ALIGN_OF_FLOAT PR_ALIGN_OF_FLOAT
+#define ALIGN_OF_DOUBLE PR_ALIGN_OF_DOUBLE
+#define ALIGN_OF_POINTER PR_ALIGN_OF_POINTER
+#define ALIGN_OF_WORD PR_ALIGN_OF_WORD
+
+#define BYTES_PER_WORD_LOG2 PR_BYTES_PER_WORD_LOG2
+#define BYTES_PER_DWORD_LOG2 PR_BYTES_PER_DWORD_LOG2
+#define WORDS_PER_DWORD_LOG2 PR_WORDS_PER_DWORD_LOG2
+
+#endif /* NO_NSPR_10_SUPPORT */
+
+#endif /* nspr_cpucfg___ */
|
[-]
[+]
|
Added |
nspr-4.7.2.tar.bz2/mozilla/nsprpub/pr/include/md/_symbian.h
^
|
@@ -0,0 +1,83 @@
+/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is the Netscape Portable Runtime (NSPR).
+ *
+ * The Initial Developer of the Original Code is
+ * Netscape Communications Corporation.
+ * Portions created by the Initial Developer are Copyright (C) 1998-2000
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s):
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+#ifndef nspr_symbian_defs_h___
+#define nspr_symbian_defs_h___
+
+#include "prthread.h"
+
+/*
+ * Internal configuration macros
+ */
+
+#define _PR_SI_SYSNAME "SYMBIAN"
+#ifdef __arm__
+#define _PR_SI_ARCHITECTURE "arm"
+#else
+#error "Unknown CPU architecture"
+#endif
+#define PR_DLL_SUFFIX ".dll"
+
+#undef HAVE_STACK_GROWING_UP
+
+#ifdef DYNAMIC_LIBRARY
+#define HAVE_DLL
+#define USE_DLFCN
+#endif
+
+#define _PR_STAT_HAS_ONLY_ST_ATIME
+#define _PR_NO_LARGE_FILES
+#define _PR_HAVE_SYSV_SEMAPHORES
+#define PR_HAVE_SYSV_NAMED_SHARED_MEMORY
+
+#ifndef _PR_PTHREADS
+#error "Classic NSPR is not implemented"
+#endif
+
+extern void _MD_EarlyInit(void);
+extern PRIntervalTime _PR_UNIX_GetInterval(void);
+extern PRIntervalTime _PR_UNIX_TicksPerSecond(void);
+
+#define _MD_EARLY_INIT _MD_EarlyInit
+#define _MD_FINAL_INIT _PR_UnixInit
+#define _MD_GET_INTERVAL _PR_UNIX_GetInterval
+#define _MD_INTERVAL_PER_SEC _PR_UNIX_TicksPerSecond
+
+/* For writev() */
+#include <sys/uio.h>
+
+#endif /* nspr_symbian_defs_h___ */
|
[-]
[+]
|
Changed |
nspr-4.7.2.tar.bz2/mozilla/nsprpub/pr/include/md/_unixos.h
^
|
@@ -68,6 +68,8 @@
*
* In The Single UNIX(R) Specification, Version 2,
* the header file for select() is <sys/time.h>.
+ * In Version 3, the header file for select() is
+ * changed to <sys/select.h>.
*
* fd_set is defined in <sys/types.h>. Usually
* <sys/time.h> includes <sys/types.h>, but on some
@@ -76,10 +78,14 @@
*/
#include <sys/time.h>
#include <sys/types.h>
-#if defined(AIX) /* Only pre-4.2 AIX needs it, but for simplicity... */
+#if defined(AIX) || defined(SYMBIAN)
#include <sys/select.h>
#endif
+#ifndef SYMBIAN
+#define HAVE_NETINET_TCP_H
+#endif
+
#define _PR_HAVE_O_APPEND
#define PR_DIRECTORY_SEPARATOR '/'
|
[-]
[+]
|
Changed |
nspr-4.7.2.tar.bz2/mozilla/nsprpub/pr/include/md/prosdep.h
^
|
@@ -141,6 +141,9 @@
#elif defined(RISCOS)
#include "md/_riscos.h"
+#elif defined(SYMBIAN)
+#include "md/_symbian.h"
+
#else
#error unknown Unix flavor
|
[-]
[+]
|
Changed |
nspr-4.7.2.tar.bz2/mozilla/nsprpub/pr/include/prinet.h
^
|
@@ -38,12 +38,12 @@
/*
* File: prinet.h
* Description:
- * Header file used to find the system header files for socket support.
+ * Header file used to find the system header files for socket support[1].
* This file serves the following purposes:
* - A cross-platform, "get-everything" socket header file. On
* Unix, socket support is scattered in several header files,
* while Windows and Mac have a "get-everything" socket header
- * file.
+ * file[2].
* - NSPR needs the following macro definitions and function
* prototype declarations from these header files:
* AF_INET
@@ -52,8 +52,14 @@
* NSPR does not define its own versions of these macros and
* functions. It simply uses the native versions, which have
* the same names on all supported platforms.
- * This file is intended to be included by nspr20 public header
+ * This file is intended to be included by NSPR public header
* files, such as prio.h. One should not include this file directly.
+ *
+ * Notes:
+ * 1. This file should have been an internal header. Please do not
+ * depend on it to pull in the system header files you need.
+ * 2. WARNING: This file is no longer cross-platform as it is a no-op
+ * for WIN32! See the comment in the WIN32 section for details.
*/
#ifndef prinet_h__
@@ -103,7 +109,14 @@
#elif defined(WIN32)
-/* Do not include any system header files. */
+/*
+ * Do not include any system header files.
+ *
+ * Originally we were including <windows.h>. It slowed down the
+ * compilation of files that included NSPR headers, so we removed
+ * the <windows.h> inclusion at customer's request, which created
+ * an unfortunate inconsistency with other platforms.
+ */
#elif defined(WIN16)
|
[-]
[+]
|
Changed |
nspr-4.7.2.tar.bz2/mozilla/nsprpub/pr/include/prinit.h
^
|
@@ -63,10 +63,10 @@
** The format of the version string is
** "<major version>.<minor version>[.<patch level>] [<Beta>]"
*/
-#define PR_VERSION "4.7.1"
+#define PR_VERSION "4.7.2"
#define PR_VMAJOR 4
#define PR_VMINOR 7
-#define PR_VPATCH 1
+#define PR_VPATCH 2
#define PR_BETA PR_FALSE
/*
|
[-]
[+]
|
Changed |
nspr-4.7.2.tar.bz2/mozilla/nsprpub/pr/include/prio.h
^
|
@@ -197,7 +197,7 @@
PRIPv6Addr ip; /* the actual 128 bits of address */
PRUint32 scope_id; /* set of interfaces for a scope */
} ipv6;
-#if defined(XP_UNIX) || defined(XP_OS2_EMX)
+#if defined(XP_UNIX) || defined(XP_OS2)
struct { /* Unix domain socket address */
PRUint16 family; /* address family (AF_UNIX) */
#ifdef XP_OS2
|
[-]
[+]
|
Changed |
nspr-4.7.2.tar.bz2/mozilla/nsprpub/pr/include/private/pprio.h
^
|
@@ -65,8 +65,20 @@
NSPR_API(const PRIOMethods*) PR_GetPipeMethods(void);
/*
-** Convert a NSPR Socket Handle to a Native Socket handle.
-** This function will be obsoleted with the next release; avoid using it.
+** Convert a NSPR socket handle to a native socket handle.
+**
+** Using this function makes your code depend on the properties of the
+** current NSPR implementation, which may change (although extremely
+** unlikely because of NSPR's backward compatibility requirement). Avoid
+** using it if you can.
+**
+** If you use this function, you need to understand what NSPR does to
+** the native handle. For example, NSPR puts native socket handles in
+** non-blocking mode or associates them with an I/O completion port (the
+** WINNT build configuration only). Your use of the native handle should
+** not interfere with NSPR's use of the native handle. If your code
+** changes the configuration of the native handle, (e.g., changes it to
+** blocking or closes it), NSPR will not work correctly.
*/
NSPR_API(PROsfd) PR_FileDesc2NativeHandle(PRFileDesc *);
NSPR_API(void) PR_ChangeFileDescNativeHandle(PRFileDesc *, PROsfd);
|
[-]
[+]
|
Changed |
nspr-4.7.2.tar.bz2/mozilla/nsprpub/pr/include/private/primpl.h
^
|
@@ -1398,7 +1398,7 @@
** struct sockaddr_in6.
*/
-#if defined(XP_UNIX) || defined(XP_OS2_EMX)
+#if defined(XP_UNIX) || defined(XP_OS2)
#define PR_NETADDR_SIZE(_addr) \
((_addr)->raw.family == PR_AF_INET \
? sizeof((_addr)->inet) \
@@ -1414,7 +1414,7 @@
#else
-#if defined(XP_UNIX) || defined(XP_OS2_EMX)
+#if defined(XP_UNIX) || defined(XP_OS2)
#define PR_NETADDR_SIZE(_addr) \
((_addr)->raw.family == PR_AF_INET \
? sizeof((_addr)->inet) \
|
[-]
[+]
|
Changed |
nspr-4.7.2.tar.bz2/mozilla/nsprpub/pr/include/prtypes.h
^
|
@@ -177,20 +177,26 @@
#define PR_CALLBACK_DECL
#define PR_STATIC_CALLBACK(__x) static __x
-#elif defined(XP_OS2_VACPP)
+#elif defined(SYMBIAN)
-#define PR_EXPORT(__type) extern __type
-#define PR_EXPORT_DATA(__type) extern __type
-#define PR_IMPORT(__type) extern __type
-#define PR_IMPORT_DATA(__type) extern __type
+#define PR_EXPORT(__type) extern __declspec(dllexport) __type
+#define PR_EXPORT_DATA(__type) extern __declspec(dllexport) __type
+#ifdef __WINS__
+#define PR_IMPORT(__type) extern __declspec(dllexport) __type
+#define PR_IMPORT_DATA(__type) extern __declspec(dllexport) __type
+#else
+#define PR_IMPORT(__type) extern __declspec(dllimport) __type
+#define PR_IMPORT_DATA(__type) extern __declspec(dllimport) __type
+#endif
#define PR_EXTERN(__type) extern __type
#define PR_IMPLEMENT(__type) __type
#define PR_EXTERN_DATA(__type) extern __type
#define PR_IMPLEMENT_DATA(__type) __type
-#define PR_CALLBACK _Optlink
+
+#define PR_CALLBACK
#define PR_CALLBACK_DECL
-#define PR_STATIC_CALLBACK(__x) static __x PR_CALLBACK
+#define PR_STATIC_CALLBACK(__x) static __x
#else /* Unix */
|
[-]
[+]
|
Changed |
nspr-4.7.2.tar.bz2/mozilla/nsprpub/pr/src/Makefile.in
^
|
@@ -48,11 +48,6 @@
DIRS = io linking malloc md memory misc threads
-# For VAC++ 4 geticcdata rule in config/OS2.mk
-ifeq ($(MOZ_OS2_TOOLS),VACPP)
-CSRCS = prvrsion.c
-endif
-
ifeq ($(USE_PTHREADS), 1)
DIRS += pthreads
endif
@@ -97,17 +92,13 @@
ifdef USE_PTHREADS
OS_LIBS = -lpthread ${LIBRT} -lsocket -lnsl -ldl -lc
else
-ifdef LOCAL_THREADS_ONLY
OS_LIBS = -lsocket -lnsl -ldl -lc
-else
-OS_LIBS = -lthread ${LIBRT} -lsocket -lnsl -ldl -lc
-endif # LOCAL_THREADS_ONLY
endif # USE_PTHREADS
-ifeq ($(OS_TEST),sun4u)
+ifeq ($(CPU_ARCH),sparc)
ifndef USE_64
DSO_LDOPTS += -Wl,-f,\$$ORIGIN/cpu/\$$ISALIST/lib$(ULTRASPARC_LIBRARY)$(LIBRARY_VERSION).so
endif
-endif # sun4u
+endif # sparc
endif # 4.1.3_U1
endif # SunOS
@@ -242,6 +233,7 @@
threads/$(OBJDIR)/prrwlock.$(OBJ_SUFFIX) \
threads/$(OBJDIR)/prtpd.$(OBJ_SUFFIX) \
linking/$(OBJDIR)/prlink.$(OBJ_SUFFIX) \
+ malloc/$(OBJDIR)/prmalloc.$(OBJ_SUFFIX) \
malloc/$(OBJDIR)/prmem.$(OBJ_SUFFIX) \
md/$(OBJDIR)/prosdep.$(OBJ_SUFFIX) \
memory/$(OBJDIR)/prshm.$(OBJ_SUFFIX) \
@@ -269,11 +261,6 @@
misc/$(OBJDIR)/prtrace.$(OBJ_SUFFIX) \
misc/$(OBJDIR)/prtime.$(OBJ_SUFFIX)
-# ilib now rejects empty objects
-ifneq ($(MOZ_OS2_TOOLS),VACPP)
-OBJS += malloc/$(OBJDIR)/prmalloc.$(OBJ_SUFFIX)
-endif
-
ifdef USE_PTHREADS
OBJS += \
pthreads/$(OBJDIR)/ptsynch.$(OBJ_SUFFIX) \
@@ -385,12 +372,8 @@
ifeq ($(NS_USE_GCC)_$(OS_ARCH),_WINNT)
$(CC) -Fo$@ -c $(CFLAGS) -I$(OBJDIR) $<
else
-ifeq ($(MOZ_OS2_TOOLS), VACPP)
- $(CC) -Fo$@ -c $(CFLAGS) -I$(OBJDIR) $<
-else
$(CC) -o $@ -c $(CFLAGS) -I$(OBJDIR) $<
endif
-endif
#
# Version information generation (end)
#
|
[-]
[+]
|
Changed |
nspr-4.7.2.tar.bz2/mozilla/nsprpub/pr/src/cplus/tests/Makefile.in
^
|
@@ -109,22 +109,13 @@
endif
endif
- ifneq ($(LOCAL_THREADS_ONLY),1)
-# SunOS 5.4 and 5.5 need to link with -lthread or -lpthread,
-# even though we already linked with these system libraries
-# when we built libnspr.so.
- ifeq ($(OS_RELEASE), 5.4)
- EXTRA_LIBS = -lthread
+# SunOS 5.5 needs to link with -lpthread, even though we already
+# linked with this system library when we built libnspr.so.
+ ifeq ($(OS_RELEASE), 5.5)
+ ifdef USE_PTHREADS
+ EXTRA_LIBS = -lpthread
endif
-
- ifeq ($(OS_RELEASE), 5.5)
- ifdef USE_PTHREADS
- EXTRA_LIBS = -lpthread
- else
- EXTRA_LIBS = -lthread
- endif
- endif
- endif # LOCAL_THREADS_ONLY
+ endif
endif # SunOS
ifeq ($(OS_ARCH), WINNT)
@@ -139,13 +130,7 @@
endif
ifeq ($(OS_ARCH),OS2)
- ifeq ($(MOZ_OS2_TOOLS),VACPP)
- LDOPTS = -NOE -DEBUG -nologo -PMTYPE:VIO
- LIBPR = $(dist_libdir)/nspr$(MOD_MAJOR_VERSION).lib
- LIBPLC = $(dist_libdir)/plc$(MOD_MAJOR_VERSION).lib
- else
- LDOPTS += -Zomf -Zlinker /PM:VIO -lstdcpp
- endif
+LDOPTS += -Zomf -Zlinker /PM:VIO -lstdcpp
endif
ifneq ($(OS_ARCH), WINNT)
|
[-]
[+]
|
Changed |
nspr-4.7.2.tar.bz2/mozilla/nsprpub/pr/src/io/Makefile.in
^
|
@@ -85,13 +85,5 @@
include $(topsrcdir)/config/rules.mk
-# An OS/2 Optimization bug causes PR_snprintf() to produce wrong result.
-# This suppresses optimization for this single compilation unit.
-ifeq ($(MOZ_OS2_TOOLS),VACPP)
-$(OBJDIR)/prprf.obj: prprf.c
- @$(MAKE_OBJDIR)
- $(CC) -Fo$@ -c $(filter-out /O+, $(CFLAGS)) $<
-endif
-
export:: $(TARGETS)
|
[-]
[+]
|
Changed |
nspr-4.7.2.tar.bz2/mozilla/nsprpub/pr/src/io/prlog.c
^
|
@@ -21,6 +21,7 @@
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
+ * IBM Corporation
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
@@ -36,19 +37,6 @@
*
* ***** END LICENSE BLOCK ***** */
-/*
- * Contributors:
- *
- * This Original Code has been modified by IBM Corporation.
- * Modifications made by IBM described herein are
- * Copyright (c) International Business Machines Corporation, 2000.
- * Modifications to Mozilla code or documentation identified per
- * MPL Section 3.3
- *
- * Date Modified by Description of modification
- * 04/10/2000 IBM Corp. Added DebugBreak() definitions for OS/2
- */
-
#include "primpl.h"
#include "prenv.h"
#include "prprf.h"
@@ -90,7 +78,6 @@
#if defined(XP_PC)
#define strcasecmp stricmp
-#define strncasecmp strnicmp
#endif
/*
@@ -544,23 +531,6 @@
abort();
}
-#if defined(XP_OS2)
-/*
- * Added definitions for DebugBreak() for 2 different OS/2 compilers.
- * Doing the int3 on purpose for Visual Age so that a developer can
- * step over the instruction if so desired. Not always possible if
- * trapping due to exception handling IBM-AKR
- */
-#if defined(XP_OS2_VACPP)
-#include <builtin.h>
-static void DebugBreak(void) { _interrupt(3); }
-#elif defined(XP_OS2_EMX)
-static void DebugBreak(void) { asm("int $3"); }
-#else
-static void DebugBreak(void) { }
-#endif
-#endif /* XP_OS2 */
-
PR_IMPLEMENT(void) PR_Assert(const char *s, const char *file, PRIntn ln)
{
PR_LogPrint("Assertion failure: %s, at %s:%d\n", s, file, ln);
@@ -570,9 +540,12 @@
#ifdef XP_MAC
dprintf("Assertion failure: %s, at %s:%d\n", s, file, ln);
#endif
-#if defined(WIN32) || defined(XP_OS2)
+#ifdef WIN32
DebugBreak();
#endif
+#ifdef XP_OS2
+ asm("int $3");
+#endif
#ifndef XP_MAC
abort();
#endif
|
[-]
[+]
|
Changed |
nspr-4.7.2.tar.bz2/mozilla/nsprpub/pr/src/io/prmapopt.c
^
|
@@ -70,7 +70,7 @@
#include <netinet/in_systm.h> /* n_short, n_long, n_time */
#endif
-#if defined(XP_UNIX) || defined(OS2) || (defined(XP_BEOS) && defined(BONE_VERSION))
+#ifdef HAVE_NETINET_TCP_H
#include <netinet/tcp.h> /* TCP_NODELAY, TCP_MAXSEG */
#endif
|
[-]
[+]
|
Changed |
nspr-4.7.2.tar.bz2/mozilla/nsprpub/pr/src/io/prprf.c
^
|
@@ -1160,11 +1160,6 @@
va_list ap;
PRUint32 rv;
- PR_ASSERT((PRInt32)outlen > 0);
- if ((PRInt32)outlen <= 0) {
- return 0;
- }
-
va_start(ap, fmt);
rv = PR_vsnprintf(out, outlen, fmt, ap);
va_end(ap);
|
[-]
[+]
|
Changed |
nspr-4.7.2.tar.bz2/mozilla/nsprpub/pr/src/io/prsocket.c
^
|
@@ -47,7 +47,7 @@
PRBool IsValidNetAddr(const PRNetAddr *addr)
{
if ((addr != NULL)
-#if defined(XP_UNIX) || defined(XP_OS2_EMX)
+#if defined(XP_UNIX) || defined(XP_OS2)
&& (addr->raw.family != PR_AF_LOCAL)
#endif
&& (addr->raw.family != PR_AF_INET6)
@@ -64,7 +64,7 @@
* is not uniform, so we don't check it.
*/
if ((addr != NULL)
-#if defined(XP_UNIX) || defined(XP_OS2_EMX)
+#if defined(XP_UNIX) || defined(XP_OS2)
&& (addr->raw.family != AF_UNIX)
#endif
&& (PR_NETADDR_SIZE(addr) != addr_len)) {
@@ -1293,7 +1293,7 @@
if (!_pr_initialized) _PR_ImplicitInitialization();
if (PR_AF_INET != domain
&& PR_AF_INET6 != domain
-#if defined(XP_UNIX) || defined(XP_OS2_EMX)
+#if defined(XP_UNIX) || defined(XP_OS2)
&& PR_AF_LOCAL != domain
#endif
) {
|
[-]
[+]
|
Changed |
nspr-4.7.2.tar.bz2/mozilla/nsprpub/pr/src/md/beos/bnet.c
^
|
@@ -439,6 +439,20 @@
PRThread *me = _PR_MD_CURRENT_THREAD();
PRInt32 index, amount = 0;
PRInt32 osfd = fd->secret->md.osfd;
+ struct iovec osiov[PR_MAX_IOVECTOR_SIZE];
+
+ /* Ensured by PR_Writev */
+ PR_ASSERT(iov_size <= PR_MAX_IOVECTOR_SIZE);
+
+ /*
+ * We can't pass iov to writev because PRIOVec and struct iovec
+ * may not be binary compatible. Make osiov a copy of iov and
+ * pass osiov to writev.
+ */
+ for (index = 0; index < iov_size; index++) {
+ osiov[index].iov_base = iov[index].iov_base;
+ osiov[index].iov_len = iov[index].iov_len;
+ }
/*
* Calculate the total number of bytes to be sent; needed for
@@ -453,7 +467,7 @@
}
}
- while ((rv = writev(osfd, (const struct iovec*)iov, iov_size)) == -1) {
+ while ((rv = writev(osfd, osiov, iov_size)) == -1) {
err = _MD_ERRNO();
if ((err == EAGAIN) || (err == EWOULDBLOCK)) {
if (fd->secret->nonblocking) {
|
[-]
[+]
|
Changed |
nspr-4.7.2.tar.bz2/mozilla/nsprpub/pr/src/md/os2/Makefile.in
^
|
@@ -62,13 +62,7 @@
$(NULL)
endif
-ifeq ($(MOZ_OS2_TOOLS),VACPP)
-ASFILES = os2vacpp.asm
-endif
-
-ifeq ($(MOZ_OS2_TOOLS),EMX)
ASFILES = os2emx.s os2vaclegacy.s
-endif
TARGETS = $(OBJS)
|
[-]
[+]
|
Changed |
nspr-4.7.2.tar.bz2/mozilla/nsprpub/pr/src/md/os2/objs.mk
^
|
@@ -52,13 +52,7 @@
os2rng.c \
$(NULL)
-ifeq ($(MOZ_OS2_TOOLS),VACPP)
-ASFILES = os2vacpp.asm
-endif
-
-ifeq ($(MOZ_OS2_TOOLS),EMX)
ASFILES = os2emx.s os2vaclegacy.s
-endif
OBJS += $(addprefix md/os2/$(OBJDIR)/,$(CSRCS:.c=.$(OBJ_SUFFIX))) \
$(addprefix md/os2/$(OBJDIR)/,$(ASFILES:.$(ASM_SUFFIX)=.$(OBJ_SUFFIX)))
|
[-]
[+]
|
Changed |
nspr-4.7.2.tar.bz2/mozilla/nsprpub/pr/src/md/os2/os2_errors.c
^
|
@@ -878,7 +878,6 @@
}
}
-#ifndef XP_OS2_VACPP
void _MD_os2_map_socketpair_error(PRInt32 err)
{
switch (err) {
@@ -902,7 +901,6 @@
return;
}
}
-#endif
void _MD_os2_map_getsockname_error(PRInt32 err)
{
|
[-]
[+]
|
Changed |
nspr-4.7.2.tar.bz2/mozilla/nsprpub/pr/src/md/os2/os2cv.c
^
|
@@ -51,42 +51,6 @@
#include "primpl.h"
-#ifdef USE_RAMSEM
-ULONG _Far16 _Pascal Dos16GetInfoSeg(PSEL pselGlobal, PSEL pselLocal);
-
-#ifdef XP_OS2_EMX
-typedef unsigned short BOOL16;
-#endif
-
-typedef struct _LINFOSEG
-{
- USHORT pidCurrent;
- USHORT pidParent;
- USHORT prtyCurrent;
- USHORT tidCurrent;
- USHORT sgCurrent;
- UCHAR rfProcStatus;
- UCHAR dummy1;
- BOOL16 fForeground;
- UCHAR typProcess;
- UCHAR dummy2;
- SEL selEnvironment;
- USHORT offCmdLine;
- USHORT cbDataSegment;
- USHORT cbStack;
- USHORT cbHeap;
- USHORT hmod;
- SEL selDS;
- SEL selPack;
- SEL selPackShr;
- SEL selPackPck;
- ULONG ulReserved;
-} LINFOSEG;
-typedef LINFOSEG FAR *PLINFOSEG;
-
-PLINFOSEG plisCurrent = NULL;
-#endif
-
/*
* AddThreadToCVWaitQueueInternal --
*
@@ -202,11 +166,7 @@
}
/* Release the lock before notifying */
-#ifdef USE_RAMSEM
- SemReleasex86(&lock->mutex, 0);
-#else
- DosReleaseMutexSem(lock->mutex);
-#endif
+ DosReleaseMutexSem(lock->mutex);
notified = &post; /* this is where we start */
do {
@@ -313,11 +273,7 @@
md_UnlockAndPostNotifies(lock, thred, cv);
} else {
AddThreadToCVWaitQueueInternal(thred, cv);
-#ifdef USE_RAMSEM
- SemReleasex86( &lock->mutex, 0 );
-#else
DosReleaseMutexSem(lock->mutex);
-#endif
}
/* Wait for notification or timeout; don't really care which */
@@ -326,11 +282,7 @@
DosResetEventSem(thred->md.blocked_sema, &count);
}
-#ifdef USE_RAMSEM
- SemRequest486(&(lock->mutex), -1);
-#else
DosRequestMutexSem((lock->mutex), SEM_INDEFINITE_WAIT);
-#endif
PR_ASSERT(rv == NO_ERROR || rv == ERROR_TIMEOUT);
@@ -387,41 +339,10 @@
PRStatus
_PR_MD_NEW_LOCK(_MDLock *lock)
{
-#ifdef USE_RAMSEM
- // It's better if this API traps when pCriticalSect is not a valid
- // pointer, because we can't return an error code and if we just return
- // the API caller will have nasty bugs that are hard to find.
-
- PRAMSEM pramsem = (PRAMSEM)(&(lock->mutex));
- /* First time, set up addresses of processor specific functions
- */
- if (plisCurrent == NULL)
- {
- SEL selGlobal = 0, selLocal = 0;
-
- /* Convert 16 bit global information segment to 32 bit address
- * by performing CRMA on the 16 bit address: "shift" operation
- * to convert sel to flat, "and" operation to mask the address
- * to 32-bit
- */
- Dos16GetInfoSeg(&selGlobal, &selLocal);
- plisCurrent = (PLINFOSEG)(((ULONG)selLocal << 13) &
- (ULONG)0x1fff0000);
-
- }
-
- memset(pramsem, 0, sizeof(pramsem));
- DosCreateEventSem(0, &pramsem->hevSem, DC_SEM_SHARED, 0);
-
- lock->notified.length=0;
- lock->notified.link=NULL;
- return PR_SUCCESS;
-#else
DosCreateMutexSem(0, &(lock->mutex), 0, 0);
(lock)->notified.length=0;
(lock)->notified.link=NULL;
return PR_SUCCESS;
-#endif
}
void
|
[-]
[+]
|
Changed |
nspr-4.7.2.tar.bz2/mozilla/nsprpub/pr/src/md/os2/os2io.c
^
|
@@ -35,26 +35,6 @@
*
* ***** END LICENSE BLOCK ***** */
-
-/*
- * This Original Code has been modified by IBM Corporation.
- * Modifications made by IBM described herein are
- * Copyright (c) International Business Machines
- * Corporation, 2000
- *
- * Modifications to Mozilla code or documentation
- * identified per MPL Section 3.3
- *
- * Date Modified by Description of modification
- * 03/23/2000 IBM Corp. Changed write() to DosWrite(). EMX i/o
- * calls cannot be intermixed with DosXXX
- * calls since EMX remaps file/socket
- * handles.
- * 04/27/2000 IBM Corp. Changed open file to be more like NT and
- * better handle PR_TRUNCATE | PR_CREATE_FILE
- * and also fixed _PR_MD_SET_FD_INHERITABLE
- */
-
/* OS2 IO module
*
* Assumes synchronous I/O.
@@ -65,14 +45,10 @@
#include "prio.h"
#include <ctype.h>
#include <string.h>
-#ifdef XP_OS2_VACPP
-#include <direct.h>
-#else
#include <limits.h>
#include <dirent.h>
#include <fcntl.h>
#include <io.h>
-#endif
struct _MDLock _pr_ioq_lock;
|
[-]
[+]
|
Changed |
nspr-4.7.2.tar.bz2/mozilla/nsprpub/pr/src/md/os2/os2poll.c
^
|
@@ -39,9 +39,7 @@
* This file implements _PR_MD_PR_POLL for OS/2.
*/
-#ifdef XP_OS2_EMX
- #include <sys/time.h> /* For timeval. */
-#endif
+#include <sys/time.h> /* For timeval. */
#include "primpl.h"
|
[-]
[+]
|
Changed |
nspr-4.7.2.tar.bz2/mozilla/nsprpub/pr/src/md/os2/os2sock.c
^
|
@@ -48,22 +48,12 @@
#include "primpl.h"
-#ifdef XP_OS2_EMX
- #include <sys/time.h> /* For timeval. */
-#endif
+#include <sys/time.h> /* For timeval. */
#define _PR_INTERRUPT_CHECK_INTERVAL_SECS 5
#define READ_FD 1
#define WRITE_FD 2
-#ifdef XP_OS2_VACPP
-#define _OS2_WRITEV writev
-#define _OS2_IOCTL ioctl
-#else
-#define _OS2_WRITEV so_writev
-#define _OS2_IOCTL so_ioctl
-#endif
-
/* --- SOCKET IO --------------------------------------------------------- */
@@ -105,7 +95,7 @@
{
PRInt32 result;
- if (_OS2_IOCTL(fd->secret->md.osfd, FIONREAD, (char *) &result, sizeof(result)) < 0) {
+ if (so_ioctl(fd->secret->md.osfd, FIONREAD, (char *) &result, sizeof(result)) < 0) {
PR_SetError(PR_BAD_DESCRIPTOR_ERROR, sock_errno());
return -1;
}
@@ -533,6 +523,20 @@
PRThread *me = _PR_MD_CURRENT_THREAD();
PRInt32 index, amount = 0;
PRInt32 osfd = fd->secret->md.osfd;
+ struct iovec osiov[PR_MAX_IOVECTOR_SIZE];
+
+ /* Ensured by PR_Writev */
+ PR_ASSERT(iov_size <= PR_MAX_IOVECTOR_SIZE);
+
+ /*
+ * We can't pass iov to so_writev because PRIOVec and struct iovec
+ * may not be binary compatible. Make osiov a copy of iov and
+ * pass osiov to so_writev .
+ */
+ for (index = 0; index < iov_size; index++) {
+ osiov[index].iov_base = iov[index].iov_base;
+ osiov[index].iov_len = iov[index].iov_len;
+ }
/*
* Calculate the total number of bytes to be sent; needed for
@@ -547,7 +551,7 @@
}
}
- while ((rv = _OS2_WRITEV(osfd, (const struct iovec*)iov, iov_size)) == -1) {
+ while ((rv = so_writev(osfd, osiov, iov_size)) == -1) {
err = sock_errno();
if ((err == EWOULDBLOCK)) {
if (fd->secret->nonblocking) {
@@ -592,7 +596,6 @@
return rv;
}
-#ifndef XP_OS2_VACPP
PRInt32
_PR_MD_SOCKETPAIR(int af, int type, int flags, PRInt32 *osfd)
{
@@ -605,7 +608,6 @@
}
return rv;
}
-#endif
PRStatus
_PR_MD_GETSOCKNAME(PRFileDesc *fd, PRNetAddr *addr, PRUint32 *addrlen)
@@ -675,7 +677,7 @@
return;
}
- err = _OS2_IOCTL( osfd, FIONBIO, (char *) &one, sizeof(one));
+ err = so_ioctl( osfd, FIONBIO, (char *) &one, sizeof(one));
if ( err != 0 )
{
err = sock_errno();
|
[-]
[+]
|
Changed |
nspr-4.7.2.tar.bz2/mozilla/nsprpub/pr/src/md/os2/os2thred.c
^
|
@@ -37,15 +37,7 @@
#include "primpl.h"
#include <process.h> /* for _beginthread() */
-
-#ifdef XP_OS2_VACPP
-#include <time.h> /* for _tzset() */
-#endif
-
-#ifdef XP_OS2_EMX
#include <signal.h>
-#endif
-
#include <float.h>
/* --- globals ------------------------------------------------ */
@@ -75,10 +67,6 @@
if (DosLoadModule(NULL, 0, "DOSCALL1", &hmod) == 0)
DosQueryProcAddr(hmod, 877, "DOSQUERYTHREADCONTEXT",
(PFN *)&QueryThreadContext);
-
-#ifdef XP_OS2_VACPP
- _tzset();
-#endif
}
static void
@@ -223,18 +211,10 @@
PARAMSTORE* params = PR_Malloc(sizeof(PARAMSTORE));
params->start = start;
params->thread = thread;
-#ifdef XP_OS2_VACPP /* No exception handler for VACPP */
- thread->md.handle = thread->id = (TID) _beginthread(
- (void(* _Optlink)(void*))start,
- NULL,
- thread->stack->stackSize,
- thread);
-#else
thread->md.handle = thread->id = (TID) _beginthread(ExcpStartFunc,
NULL,
thread->stack->stackSize,
params);
-#endif
if(thread->md.handle == -1) {
return PR_FAILURE;
}
|
[-]
[+]
|
Changed |
nspr-4.7.2.tar.bz2/mozilla/nsprpub/pr/src/md/prosdep.c
^
|
@@ -66,7 +66,7 @@
#if defined SUNOS4 || defined BSDI || defined AIX \
|| defined LINUX || defined __GNU__ || defined __GLIBC__ \
|| defined FREEBSD || defined NETBSD || defined OPENBSD \
- || defined DARWIN || defined NEXTSTEP
+ || defined DARWIN || defined NEXTSTEP || defined SYMBIAN
_pr_pageSize = getpagesize();
#elif defined(HPUX)
/* I have no idea. Don't get me started. --Rob */
|
[-]
[+]
|
Changed |
nspr-4.7.2.tar.bz2/mozilla/nsprpub/pr/src/md/unix/Makefile.in
^
|
@@ -69,7 +69,7 @@
ifeq ($(OS_ARCH),SunOS)
ifneq ($(OS_RELEASE),4.1.3_U1)
- ifeq ($(OS_TEST),sun4u)
+ ifeq ($(CPU_ARCH),sparc)
ifdef USE_64
ULTRASPARC_ASFILES = os_SunOS_sparcv9.s
ULTRASPARC_ASOBJS = $(addprefix $(OBJDIR)/,$(ULTRASPARC_ASFILES:.s=.$(OBJ_SUFFIX)))
@@ -97,7 +97,7 @@
ifeq ($(OS_ARCH),SunOS)
ifneq ($(OS_RELEASE),4.1.3_U1)
-ifeq ($(OS_TEST),sun4u)
+ifeq ($(CPU_ARCH),sparc)
ifdef USE_64
$(ULTRASPARC_ASOBJS): $(ULTRASPARC_ASFILES)
|
[-]
[+]
|
Added |
nspr-4.7.2.tar.bz2/mozilla/nsprpub/pr/src/md/unix/os_Darwin.s
^
|
@@ -0,0 +1,45 @@
+# -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
+#
+# ***** BEGIN LICENSE BLOCK *****
+# Version: MPL 1.1/GPL 2.0/LGPL 2.1
+#
+# The contents of this file are subject to the Mozilla Public License Version
+# 1.1 (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+# http://www.mozilla.org/MPL/
+#
+# Software distributed under the License is distributed on an "AS IS" basis,
+# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+# for the specific language governing rights and limitations under the
+# License.
+#
+# The Original Code is the Netscape Portable Runtime (NSPR).
+#
+# The Initial Developer of the Original Code is
+# Netscape Communications Corporation.
+# Portions created by the Initial Developer are Copyright (C) 2008
+# the Initial Developer. All Rights Reserved.
+#
+# Contributor(s):
+#
+# Alternatively, the contents of this file may be used under the terms of
+# either the GNU General Public License Version 2 or later (the "GPL"), or
+# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+# in which case the provisions of the GPL or the LGPL are applicable instead
+# of those above. If you wish to allow use of your version of this file only
+# under the terms of either the GPL or the LGPL, and not to allow others to
+# use your version of this file under the terms of the MPL, indicate your
+# decision by deleting the provisions above and replace them with the notice
+# and other provisions required by the GPL or the LGPL. If you do not delete
+# the provisions above, a recipient may use your version of this file under
+# the terms of any one of the MPL, the GPL or the LGPL.
+#
+# ***** END LICENSE BLOCK *****
+
+#ifdef __i386__
+#include "os_Darwin_x86.s"
+#elif defined(__x86_64__)
+#include "os_Darwin_x86_64.s"
+#elif defined(__ppc__)
+#include "os_Darwin_ppc.s"
+#endif
|
[-]
[+]
|
Added |
nspr-4.7.2.tar.bz2/mozilla/nsprpub/pr/src/md/unix/os_Darwin_x86_64.s
^
|
@@ -0,0 +1,95 @@
+# -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
+#
+# ***** BEGIN LICENSE BLOCK *****
+# Version: MPL 1.1#GPL 2.0#LGPL 2.1
+#
+# The contents of this file are subject to the Mozilla Public License Version
+# 1.1 (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+# http:##www.mozilla.org#MPL#
+#
+# Software distributed under the License is distributed on an "AS IS" basis,
+# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+# for the specific language governing rights and limitations under the
+# License.
+#
+# The Original Code is the Netscape Portable Runtime (NSPR).
+#
+# The Initial Developer of the Original Code is
+# Netscape Communications Corporation.
+# Portions created by the Initial Developer are Copyright (C) 2004
+# the Initial Developer. All Rights Reserved.
+#
+# Contributor(s):
+#
+# Alternatively, the contents of this file may be used under the terms of
+# either the GNU General Public License Version 2 or later (the "GPL"), or
+# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+# in which case the provisions of the GPL or the LGPL are applicable instead
+# of those above. If you wish to allow use of your version of this file only
+# under the terms of either the GPL or the LGPL, and not to allow others to
+# use your version of this file under the terms of the MPL, indicate your
+# decision by deleting the provisions above and replace them with the notice
+# and other provisions required by the GPL or the LGPL. If you do not delete
+# the provisions above, a recipient may use your version of this file under
+# the terms of any one of the MPL, the GPL or the LGPL.
+#
+# ***** END LICENSE BLOCK *****
+
+# PRInt32 __PR_Darwin_x86_64_AtomicIncrement(PRInt32 *val)
+#
+# Atomically increment the integer pointed to by 'val' and return
+# the result of the increment.
+#
+ .text
+ .globl __PR_Darwin_x86_64_AtomicIncrement
+ .align 4
+__PR_Darwin_x86_64_AtomicIncrement:
+ movl $1, %eax
+ lock
+ xaddl %eax, (%rdi)
+ incl %eax
+ ret
+
+# PRInt32 __PR_Darwin_x86_64_AtomicDecrement(PRInt32 *val)
+#
+# Atomically decrement the integer pointed to by 'val' and return
+# the result of the decrement.
+#
+ .text
+ .globl __PR_Darwin_x86_64_AtomicDecrement
+ .align 4
+__PR_Darwin_x86_64_AtomicDecrement:
+ movl $-1, %eax
+ lock
+ xaddl %eax, (%rdi)
+ decl %eax
+ ret
+
+# PRInt32 __PR_Darwin_x86_64_AtomicSet(PRInt32 *val, PRInt32 newval)
+#
+# Atomically set the integer pointed to by 'val' to the new
+# value 'newval' and return the old value.
+#
+ .text
+ .globl __PR_Darwin_x86_64_AtomicSet
+ .align 4
+__PR_Darwin_x86_64_AtomicSet:
+ movl %esi, %eax
+ xchgl %eax, (%rdi)
+ ret
+
+# PRInt32 __PR_Darwin_x86_64_AtomicAdd(PRInt32 *ptr, PRInt32 val)
+#
+# Atomically add 'val' to the integer pointed to by 'ptr'
+# and return the result of the addition.
+#
+ .text
+ .globl __PR_Darwin_x86_64_AtomicAdd
+ .align 4
+__PR_Darwin_x86_64_AtomicAdd:
+ movl %esi, %eax
+ lock
+ xaddl %eax, (%rdi)
+ addl %esi, %eax
+ ret
|
[-]
[+]
|
Changed |
nspr-4.7.2.tar.bz2/mozilla/nsprpub/pr/src/md/unix/solaris.c
^
|
@@ -86,700 +86,6 @@
}
#endif /* _PR_PTHREADS */
-#if !defined(i386) && !defined(IS_64)
-#if defined(_PR_HAVE_ATOMIC_OPS)
-/* NOTE:
- * SPARC v9 (Ultras) do have an atomic test-and-set operation. But
- * SPARC v8 doesn't. We should detect in the init if we are running on
- * v8 or v9, and then use assembly where we can.
- *
- * This code uses the Solaris threads API. It can be used in both the
- * pthreads and Solaris threads versions of nspr20 because "POSIX threads
- * and Solaris threads are fully compatible even within the same process",
- * to quote from pthread_create(3T).
- */
-
-#include <thread.h>
-#include <synch.h>
-
-static mutex_t _solaris_atomic = DEFAULTMUTEX;
-
-PRInt32
-_MD_AtomicIncrement(PRInt32 *val)
-{
- PRInt32 rv;
- if (mutex_lock(&_solaris_atomic) != 0)
- PR_ASSERT(0);
-
- rv = ++(*val);
-
- if (mutex_unlock(&_solaris_atomic) != 0)\
- PR_ASSERT(0);
-
- return rv;
-}
-
-PRInt32
-_MD_AtomicAdd(PRInt32 *ptr, PRInt32 val)
-{
- PRInt32 rv;
- if (mutex_lock(&_solaris_atomic) != 0)
- PR_ASSERT(0);
-
- rv = ((*ptr) += val);
-
- if (mutex_unlock(&_solaris_atomic) != 0)\
- PR_ASSERT(0);
-
- return rv;
-}
-
-PRInt32
-_MD_AtomicDecrement(PRInt32 *val)
-{
- PRInt32 rv;
- if (mutex_lock(&_solaris_atomic) != 0)
- PR_ASSERT(0);
-
- rv = --(*val);
-
- if (mutex_unlock(&_solaris_atomic) != 0)\
- PR_ASSERT(0);
-
- return rv;
-}
-
-PRInt32
-_MD_AtomicSet(PRInt32 *val, PRInt32 newval)
-{
- PRInt32 rv;
- if (mutex_lock(&_solaris_atomic) != 0)
- PR_ASSERT(0);
-
- rv = *val;
- *val = newval;
-
- if (mutex_unlock(&_solaris_atomic) != 0)\
- PR_ASSERT(0);
-
- return rv;
-}
-#endif /* _PR_HAVE_ATOMIC_OPS */
-#endif /* !defined(i386) */
-
-#if defined(_PR_GLOBAL_THREADS_ONLY)
-#include <signal.h>
-#include <errno.h>
-#include <fcntl.h>
-#include <thread.h>
-
-#include <sys/lwp.h>
-#include <sys/procfs.h>
-#include <sys/syscall.h>
-extern int syscall(); /* not declared in sys/syscall.h */
-
-static sigset_t old_mask; /* store away original gc thread sigmask */
-static PRIntn gcprio; /* store away original gc thread priority */
-
-THREAD_KEY_T threadid_key;
-THREAD_KEY_T cpuid_key;
-THREAD_KEY_T last_thread_key;
-static sigset_t set, oldset;
-
-static void
-threadid_key_destructor(void *value)
-{
- PRThread *me = (PRThread *)value;
- PR_ASSERT(me != NULL);
- /* the thread could be PRIMORDIAL (thus not ATTACHED) */
- if (me->flags & _PR_ATTACHED) {
- /*
- * The Solaris thread library sets the thread specific
- * data (the current thread) to NULL before invoking
- * the destructor. We need to restore it to prevent the
- * _PR_MD_CURRENT_THREAD() call in _PRI_DetachThread()
- * from attaching the thread again.
- */
- _PR_MD_SET_CURRENT_THREAD(me);
- _PRI_DetachThread();
- }
-}
-
-void _MD_EarlyInit(void)
-{
- THR_KEYCREATE(&threadid_key, threadid_key_destructor);
- THR_KEYCREATE(&cpuid_key, NULL);
- THR_KEYCREATE(&last_thread_key, NULL);
- sigemptyset(&set);
- sigaddset(&set, SIGALRM);
-}
-
-PRStatus _MD_CreateThread(PRThread *thread,
- void (*start)(void *),
- PRThreadPriority priority,
- PRThreadScope scope,
- PRThreadState state,
- PRUint32 stackSize)
-{
- PRInt32 flags;
-
- /* mask out SIGALRM for native thread creation */
- thr_sigsetmask(SIG_BLOCK, &set, &oldset);
-
- /*
- * Note that we create joinable threads with the THR_DETACHED
- * flag. The reasons why we don't use thr_join to implement
- * PR_JoinThread are:
- * - We use a termination condition variable in the PRThread
- * structure to implement PR_JoinThread across all classic
- * nspr implementation strategies.
- * - The native threads may be recycled by NSPR to run other
- * new NSPR threads, so the native threads may not terminate
- * when the corresponding NSPR threads terminate.
- */
- flags = THR_SUSPENDED|THR_DETACHED;
- if (_PR_IS_GCABLE_THREAD(thread) || (thread->flags & _PR_BOUND_THREAD) ||
- (scope == PR_GLOBAL_BOUND_THREAD))
- flags |= THR_BOUND;
-
- if (thr_create(NULL, thread->stack->stackSize,
- (void *(*)(void *)) start, (void *) thread,
- flags,
- &thread->md.handle)) {
- thr_sigsetmask(SIG_SETMASK, &oldset, NULL);
- return PR_FAILURE;
- }
-
- /* When the thread starts running, then the lwpid is set to the right
- * value. Until then we want to mark this as 'uninit' so that
- * its register state is initialized properly for GC */
-
- thread->md.lwpid = -1;
- thr_sigsetmask(SIG_SETMASK, &oldset, NULL);
- _MD_NEW_SEM(&thread->md.waiter_sem, 0);
-
- if ((scope == PR_GLOBAL_THREAD) || (scope == PR_GLOBAL_BOUND_THREAD)) {
- thread->flags |= _PR_GLOBAL_SCOPE;
- }
-
- _MD_SET_PRIORITY(&(thread->md), priority);
-
- /* Activate the thread */
- if (thr_continue( thread->md.handle ) ) {
- return PR_FAILURE;
- }
- return PR_SUCCESS;
-}
-
-void _MD_cleanup_thread(PRThread *thread)
-{
- thread_t hdl;
-
- hdl = thread->md.handle;
-
- /*
- ** First, suspend the thread (unless it's the active one)
- ** Because we suspend it first, we don't have to use LOCK_SCHEDULER to
- ** prevent both of us modifying the thread structure at the same time.
- */
- if ( thread != _PR_MD_CURRENT_THREAD() ) {
- thr_suspend(hdl);
- }
- PR_LOG(_pr_thread_lm, PR_LOG_MIN,
- ("(0X%x)[DestroyThread]\n", thread));
-
- _MD_DESTROY_SEM(&thread->md.waiter_sem);
-}
-
-void _MD_exit_thread(PRThread *thread)
-{
- _MD_CLEAN_THREAD(thread);
- _MD_SET_CURRENT_THREAD(NULL);
-}
-
-void _MD_SET_PRIORITY(_MDThread *md_thread,
- PRThreadPriority newPri)
-{
- PRIntn nativePri;
-
- if (newPri < PR_PRIORITY_FIRST) {
- newPri = PR_PRIORITY_FIRST;
- } else if (newPri > PR_PRIORITY_LAST) {
- newPri = PR_PRIORITY_LAST;
- }
- /* Solaris priorities are from 0 to 127 */
- nativePri = newPri * 127 / PR_PRIORITY_LAST;
- if(thr_setprio((thread_t)md_thread->handle, nativePri)) {
- PR_LOG(_pr_thread_lm, PR_LOG_MIN,
- ("_PR_SetThreadPriority: can't set thread priority\n"));
- }
-}
-
-void _MD_WAIT_CV(
- struct _MDCVar *md_cv, struct _MDLock *md_lock, PRIntervalTime timeout)
-{
- struct timespec tt;
- PRUint32 msec;
- PRThread *me = _PR_MD_CURRENT_THREAD();
-
- PR_ASSERT((!suspendAllOn) || (suspendAllThread != me));
-
- if (PR_INTERVAL_NO_TIMEOUT == timeout) {
- COND_WAIT(&md_cv->cv, &md_lock->lock);
- } else {
- msec = PR_IntervalToMilliseconds(timeout);
-
- GETTIME(&tt);
- tt.tv_sec += msec / PR_MSEC_PER_SEC;
- tt.tv_nsec += (msec % PR_MSEC_PER_SEC) * PR_NSEC_PER_MSEC;
- /* Check for nsec overflow - otherwise we'll get an EINVAL */
- if (tt.tv_nsec >= PR_NSEC_PER_SEC) {
- tt.tv_sec++;
- tt.tv_nsec -= PR_NSEC_PER_SEC;
- }
- COND_TIMEDWAIT(&md_cv->cv, &md_lock->lock, &tt);
- }
-}
-
-void _MD_lock(struct _MDLock *md_lock)
-{
-#ifdef DEBUG
- /* This code was used for GC testing to make sure that we didn't attempt
- * to grab any locks while threads are suspended.
- */
- PRLock *lock;
-
- if ((suspendAllOn) && (suspendAllThread == _PR_MD_CURRENT_THREAD())) {
- lock = ((PRLock *) ((char*) (md_lock) - offsetof(PRLock,ilock)));
- PR_ASSERT(lock->owner == NULL);
- return;
- }
-#endif /* DEBUG */
-
- mutex_lock(&md_lock->lock);
-}
-
-PRThread *_pr_attached_thread_tls()
-{
- PRThread *ret;
-
- thr_getspecific(threadid_key, (void **)&ret);
- return ret;
-}
-
-PRThread *_pr_current_thread_tls()
-{
- PRThread *thread;
-
- thread = _MD_GET_ATTACHED_THREAD();
-
- if (NULL == thread) {
- thread = _PRI_AttachThread(
- PR_USER_THREAD, PR_PRIORITY_NORMAL, NULL, 0);
- }
- PR_ASSERT(thread != NULL);
-
- return thread;
-}
-
-PRStatus
-_MD_wait(PRThread *thread, PRIntervalTime ticks)
-{
- _MD_WAIT_SEM(&thread->md.waiter_sem);
- return PR_SUCCESS;
-}
-
-PRStatus
-_MD_WakeupWaiter(PRThread *thread)
-{
- if (thread == NULL) {
- return PR_SUCCESS;
- }
- _MD_POST_SEM(&thread->md.waiter_sem);
- return PR_SUCCESS;
-}
-
-_PRCPU *_pr_current_cpu_tls()
-{
- _PRCPU *ret;
-
- thr_getspecific(cpuid_key, (void **)&ret);
- return ret;
-}
-
-PRThread *_pr_last_thread_tls()
-{
- PRThread *ret;
-
- thr_getspecific(last_thread_key, (void **)&ret);
- return ret;
-}
-
-_MDLock _pr_ioq_lock;
-
-void
-_MD_InitIO(void)
-{
- _MD_NEW_LOCK(&_pr_ioq_lock);
-}
-
-PRStatus _MD_InitializeThread(PRThread *thread)
-{
- if (!_PR_IS_NATIVE_THREAD(thread))
- return PR_SUCCESS;
- /* sol_curthread is an asm routine which grabs GR7; GR7 stores an internal
- * thread structure ptr used by solaris. We'll use this ptr later
- * with suspend/resume to find which threads are running on LWPs.
- */
- thread->md.threadID = sol_curthread();
- /* prime the sp; substract 4 so we don't hit the assert that
- * curr sp > base_stack
- */
- thread->md.sp = (uint_t) thread->stack->allocBase - sizeof(long);
- thread->md.lwpid = _lwp_self();
- thread->md.handle = THR_SELF();
-
- /* all threads on Solaris are global threads from NSPR's perspective
- * since all of them are mapped to Solaris threads.
- */
- thread->flags |= _PR_GLOBAL_SCOPE;
-
- /* For primordial/attached thread, we don't create an underlying native thread.
- * So, _MD_CREATE_THREAD() does not get called. We need to do initialization
- * like allocating thread's synchronization variables and set the underlying
- * native thread's priority.
- */
- if (thread->flags & (_PR_PRIMORDIAL | _PR_ATTACHED)) {
- _MD_NEW_SEM(&thread->md.waiter_sem, 0);
- _MD_SET_PRIORITY(&(thread->md), thread->priority);
- }
- return PR_SUCCESS;
-}
-
-/* Sleep for n milliseconds, n < 1000 */
-void solaris_msec_sleep(int n)
-{
- struct timespec ts;
-
- ts.tv_sec = 0;
- ts.tv_nsec = 1000000*n;
- if (syscall(SYS_nanosleep, &ts, 0, 0) < 0) {
- PR_ASSERT(0);
- }
-}
-
-#define VALID_SP(sp, bottom, top) \
- (((uint_t)(sp)) > ((uint_t)(bottom)) && ((uint_t)(sp)) < ((uint_t)(top)))
-
-void solaris_record_regs(PRThread *t, prstatus_t *lwpstatus)
-{
-#ifdef sparc
- long *regs = (long *)&t->md.context.uc_mcontext.gregs[0];
-
- PR_ASSERT(_PR_IS_GCABLE_THREAD(t));
- PR_ASSERT(t->md.threadID == lwpstatus->pr_reg[REG_G7]);
-
- t->md.sp = lwpstatus->pr_reg[REG_SP];
- PR_ASSERT(VALID_SP(t->md.sp, t->stack->stackBottom, t->stack->stackTop));
-
- regs[0] = lwpstatus->pr_reg[R_G1];
- regs[1] = lwpstatus->pr_reg[R_G2];
- regs[2] = lwpstatus->pr_reg[R_G3];
- regs[3] = lwpstatus->pr_reg[R_G4];
- regs[4] = lwpstatus->pr_reg[R_O0];
- regs[5] = lwpstatus->pr_reg[R_O1];
- regs[6] = lwpstatus->pr_reg[R_O2];
- regs[7] = lwpstatus->pr_reg[R_O3];
- regs[8] = lwpstatus->pr_reg[R_O4];
- regs[9] = lwpstatus->pr_reg[R_O5];
- regs[10] = lwpstatus->pr_reg[R_O6];
- regs[11] = lwpstatus->pr_reg[R_O7];
-#elif defined(i386)
- /*
- * To be implemented and tested
- */
- PR_ASSERT(0);
- PR_ASSERT(t->md.threadID == lwpstatus->pr_reg[GS]);
- t->md.sp = lwpstatus->pr_reg[UESP];
-#endif
-}
-
-void solaris_preempt_off()
-{
- sigset_t set;
-
- (void)sigfillset(&set);
- syscall(SYS_sigprocmask, SIG_SETMASK, &set, &old_mask);
-}
-
-void solaris_preempt_on()
-{
- syscall(SYS_sigprocmask, SIG_SETMASK, &old_mask, NULL);
-}
-
-int solaris_open_main_proc_fd()
-{
- char buf[30];
- int fd;
-
- /* Not locked, so must be created while threads coming up */
- PR_snprintf(buf, sizeof(buf), "/proc/%ld", getpid());
- if ( (fd = syscall(SYS_open, buf, O_RDONLY)) < 0) {
- return -1;
- }
- return fd;
-}
-
-/* Return a file descriptor for the /proc entry corresponding to the
- * given lwp.
- */
-int solaris_open_lwp(lwpid_t id, int lwp_main_proc_fd)
-{
- int result;
-
- if ( (result = syscall(SYS_ioctl, lwp_main_proc_fd, PIOCOPENLWP, &id)) <0)
- return -1; /* exited??? */
-
- return result;
-}
-void _MD_Begin_SuspendAll()
-{
- solaris_preempt_off();
-
- PR_LOG(_pr_gc_lm, PR_LOG_ALWAYS, ("Begin_SuspendAll\n"));
- /* run at highest prio so I cannot be preempted */
- thr_getprio(thr_self(), &gcprio);
- thr_setprio(thr_self(), 0x7fffffff);
- suspendAllOn = PR_TRUE;
- suspendAllThread = _PR_MD_CURRENT_THREAD();
-}
-
-void _MD_End_SuspendAll()
-{
-}
-
-void _MD_End_ResumeAll()
-{
- PR_LOG(_pr_gc_lm, PR_LOG_ALWAYS, ("End_ResumeAll\n"));
- thr_setprio(thr_self(), gcprio);
- solaris_preempt_on();
- suspendAllThread = NULL;
- suspendAllOn = PR_FALSE;
-}
-
-void _MD_Suspend(PRThread *thr)
-{
- int lwp_fd, result;
- prstatus_t lwpstatus;
- int lwp_main_proc_fd = 0;
-
- if (!_PR_IS_GCABLE_THREAD(thr) || !suspendAllOn){
- /*XXX When the suspendAllOn is set, we will be trying to do lwp_suspend
- * during that time we can't call any thread lib or libc calls. Hence
- * make sure that no suspension is requested for Non gcable thread
- * during suspendAllOn */
- PR_ASSERT(!suspendAllOn);
- thr_suspend(thr->md.handle);
- return;
- }
-
- /* XXX Primordial thread can't be bound to an lwp, hence there is no
- * way we can assume that we can get the lwp status for primordial
- * thread reliably. Hence we skip this for primordial thread, hoping
- * that the SP is saved during lock and cond. wait.
- * XXX - Again this is concern only for java interpreter, not for the
- * server, 'cause primordial thread in the server does not do java work
- */
- if (thr->flags & _PR_PRIMORDIAL)
- return;
-
- /* XXX Important Note: If the start function of a thread is not called,
- * lwpid is -1. Then, skip this thread. This thread will get caught
- * in PR_NativeRunThread before calling the start function, because
- * we hold the pr_activeLock during suspend/resume */
-
- /* if the thread is not started yet then don't do anything */
- if (!suspendAllOn || thr->md.lwpid == -1)
- return;
-
- if (_lwp_suspend(thr->md.lwpid) < 0) {
- PR_ASSERT(0);
- return;
- }
-
- if ( (lwp_main_proc_fd = solaris_open_main_proc_fd()) < 0) {
- PR_ASSERT(0);
- return; /* XXXMB ARGH, we're hosed! */
- }
-
- if ( (lwp_fd = solaris_open_lwp(thr->md.lwpid, lwp_main_proc_fd)) < 0) {
- PR_ASSERT(0);
- close(lwp_main_proc_fd);
- return;
- }
- if ( (result = syscall(SYS_ioctl, lwp_fd, PIOCSTATUS, &lwpstatus)) < 0) {
- /* Hopefully the thread just died... */
- close(lwp_fd);
- close(lwp_main_proc_fd);
- return;
- }
- while ( !(lwpstatus.pr_flags & PR_STOPPED) ) {
- if ( (result = syscall(SYS_ioctl, lwp_fd, PIOCSTATUS, &lwpstatus)) < 0) {
- PR_ASSERT(0); /* ARGH SOMETHING WRONG! */
- break;
- }
- solaris_msec_sleep(1);
- }
- solaris_record_regs(thr, &lwpstatus);
- close(lwp_fd);
- close(lwp_main_proc_fd);
-}
-
-#ifdef OLD_CODE
-
-void _MD_SuspendAll()
-{
- /* On solaris there are threads, and there are LWPs.
- * Calling _PR_DoSingleThread would freeze all of the threads bound to LWPs
- * but not necessarily stop all LWPs (for example if someone did
- * an attachthread of a thread which was not bound to an LWP).
- * So now go through all the LWPs for this process and freeze them.
- *
- * Note that if any thread which is capable of having the GC run on it must
- * had better be a LWP with a single bound thread on it. Otherwise, this
- * might not stop that thread from being run.
- */
- PRThread *current = _PR_MD_CURRENT_THREAD();
- prstatus_t status, lwpstatus;
- int result, index, lwp_fd;
- lwpid_t me = _lwp_self();
- int err;
- int lwp_main_proc_fd;
-
- solaris_preempt_off();
-
- /* run at highest prio so I cannot be preempted */
- thr_getprio(thr_self(), &gcprio);
- thr_setprio(thr_self(), 0x7fffffff);
-
- current->md.sp = (uint_t)&me; /* set my own stack pointer */
-
- if ( (lwp_main_proc_fd = solaris_open_main_proc_fd()) < 0) {
- PR_ASSERT(0);
- solaris_preempt_on();
- return; /* XXXMB ARGH, we're hosed! */
- }
-
- if ( (result = syscall(SYS_ioctl, lwp_main_proc_fd, PIOCSTATUS, &status)) < 0) {
- err = errno;
- PR_ASSERT(0);
- goto failure; /* XXXMB ARGH, we're hosed! */
- }
-
- num_lwps = status.pr_nlwp;
-
- if ( (all_lwps = (lwpid_t *)PR_MALLOC((num_lwps+1) * sizeof(lwpid_t)))==NULL) {
- PR_ASSERT(0);
- goto failure; /* XXXMB ARGH, we're hosed! */
- }
-
- if ( (result = syscall(SYS_ioctl, lwp_main_proc_fd, PIOCLWPIDS, all_lwps)) < 0) {
- PR_ASSERT(0);
- PR_DELETE(all_lwps);
- goto failure; /* XXXMB ARGH, we're hosed! */
- }
-
- for (index=0; index< num_lwps; index++) {
- if (all_lwps[index] != me) {
- if (_lwp_suspend(all_lwps[index]) < 0) {
- /* could happen if lwp exited */
- all_lwps[index] = me; /* dummy it up */
- }
- }
- }
-
- /* Turns out that lwp_suspend is not a blocking call.
- * Go through the list and make sure they are all stopped.
- */
- for (index=0; index< num_lwps; index++) {
- if (all_lwps[index] != me) {
- if ( (lwp_fd = solaris_open_lwp(all_lwps[index], lwp_main_proc_fd)) < 0) {
- PR_ASSERT(0);
- PR_DELETE(all_lwps);
- all_lwps = NULL;
- goto failure; /* XXXMB ARGH, we're hosed! */
- }
-
- if ( (result = syscall(SYS_ioctl, lwp_fd, PIOCSTATUS, &lwpstatus)) < 0) {
- /* Hopefully the thread just died... */
- close(lwp_fd);
- continue;
- }
- while ( !(lwpstatus.pr_flags & PR_STOPPED) ) {
- if ( (result = syscall(SYS_ioctl, lwp_fd, PIOCSTATUS, &lwpstatus)) < 0) {
- PR_ASSERT(0); /* ARGH SOMETHING WRONG! */
- break;
- }
- solaris_msec_sleep(1);
- }
- solaris_record_regs(&lwpstatus);
- close(lwp_fd);
- }
- }
-
- close(lwp_main_proc_fd);
-
- return;
-failure:
- solaris_preempt_on();
- thr_setprio(thr_self(), gcprio);
- close(lwp_main_proc_fd);
- return;
-}
-
-void _MD_ResumeAll()
-{
- int i;
- lwpid_t me = _lwp_self();
-
- for (i=0; i < num_lwps; i++) {
- if (all_lwps[i] == me)
- continue;
- if ( _lwp_continue(all_lwps[i]) < 0) {
- PR_ASSERT(0); /* ARGH, we are hosed! */
- }
- }
-
- /* restore priority and sigmask */
- thr_setprio(thr_self(), gcprio);
- solaris_preempt_on();
- PR_DELETE(all_lwps);
- all_lwps = NULL;
-}
-#endif /* OLD_CODE */
-
-#ifdef USE_SETJMP
-PRWord *_MD_HomeGCRegisters(PRThread *t, int isCurrent, int *np)
-{
- if (isCurrent) {
- (void) setjmp(CONTEXT(t));
- }
- *np = sizeof(CONTEXT(t)) / sizeof(PRWord);
- return (PRWord *) CONTEXT(t);
-}
-#else
-PRWord *_MD_HomeGCRegisters(PRThread *t, PRIntn isCurrent, PRIntn *np)
-{
- if (isCurrent) {
- (void) getcontext(CONTEXT(t));
- }
- *np = NGREG;
- return (PRWord*) &t->md.context.uc_mcontext.gregs[0];
-}
-#endif /* USE_SETJMP */
-
-#else /* _PR_GLOBAL_THREADS_ONLY */
-
#if defined(_PR_LOCAL_THREADS_ONLY)
void _MD_EarlyInit(void)
@@ -860,8 +166,6 @@
#endif /* _PR_LOCAL_THREADS_ONLY */
-#endif /* _PR_GLOBAL_THREADS_ONLY */
-
#ifndef _PR_PTHREADS
#if defined(i386) && defined(SOLARIS2_4)
/*
|
[-]
[+]
|
Added |
nspr-4.7.2.tar.bz2/mozilla/nsprpub/pr/src/md/unix/symbian.c
^
|
@@ -0,0 +1,48 @@
+/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is the Netscape Portable Runtime (NSPR).
+ *
+ * The Initial Developer of the Original Code is
+ * Netscape Communications Corporation.
+ * Portions created by the Initial Developer are Copyright (C) 1998-2000
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s):
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+#include "primpl.h"
+
+void _MD_EarlyInit(void)
+{
+}
+
+PRWord *_MD_HomeGCRegisters(PRThread *t, int isCurrent, int *np)
+{
+ *np = 0;
+ return NULL;
+}
|
[-]
[+]
|
Changed |
nspr-4.7.2.tar.bz2/mozilla/nsprpub/pr/src/md/unix/unix_errors.c
^
|
@@ -194,6 +194,9 @@
prError = PR_INSUFFICIENT_RESOURCES_ERROR;
break;
#endif
+ case ENOSYS:
+ prError = PR_NOT_IMPLEMENTED_ERROR;
+ break;
case ENOTCONN:
prError = PR_NOT_CONNECTED_ERROR;
break;
|
[-]
[+]
|
Changed |
nspr-4.7.2.tar.bz2/mozilla/nsprpub/pr/src/md/unix/uxrng.c
^
|
@@ -139,44 +139,45 @@
}

#elif (defined(LINUX) || defined(FREEBSD) || defined(__FreeBSD_kernel__) \
- || defined(NETBSD) || defined(__NetBSD_kernel__) || defined(OPENBSD))
+ || defined(NETBSD) || defined(__NetBSD_kernel__) || defined(OPENBSD) \
+ || defined(SYMBIAN))
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
-static int fdDevRandom;
-static PRCallOnceType coOpenDevRandom;
+static int fdDevURandom;
+static PRCallOnceType coOpenDevURandom;
-static PRStatus OpenDevRandom( void )
+static PRStatus OpenDevURandom( void )
{
- fdDevRandom = open( "/dev/random", O_RDONLY );
- return((-1 == fdDevRandom)? PR_FAILURE : PR_SUCCESS );
-} /* end OpenDevRandom() */
+ fdDevURandom = open( "/dev/urandom", O_RDONLY );
+ return((-1 == fdDevURandom)? PR_FAILURE : PR_SUCCESS );
+} /* end OpenDevURandom() */
-static size_t GetDevRandom( void *buf, size_t size )
+static size_t GetDevURandom( void *buf, size_t size )
{
int bytesIn;
int rc;
- rc = PR_CallOnce( &coOpenDevRandom, OpenDevRandom );
+ rc = PR_CallOnce( &coOpenDevURandom, OpenDevURandom );
if ( PR_FAILURE == rc ) {
_PR_MD_MAP_OPEN_ERROR( errno );
return(0);
}
- bytesIn = read( fdDevRandom, buf, size );
+ bytesIn = read( fdDevURandom, buf, size );
if ( -1 == bytesIn ) {
_PR_MD_MAP_READ_ERROR( errno );
return(0);
}
return( bytesIn );
-} /* end GetDevRandom() */
+} /* end GetDevURandom() */
static size_t
GetHighResClock(void *buf, size_t maxbytes)
{
- return(GetDevRandom( buf, maxbytes ));
+ return(GetDevURandom( buf, maxbytes ));
}

#elif defined(NCR)
|
[-]
[+]
|
Changed |
nspr-4.7.2.tar.bz2/mozilla/nsprpub/pr/src/md/windows/ntio.c
^
|
@@ -3653,7 +3653,10 @@
_MD_LOCK(&cachedVolumeLock);
while(dwIndex <= dwLastCachedDrive)
if (dwCachedVolumeSerialNumbers[dwIndex++] == Info.dwVolumeSerialNumber)
+ {
+ _MD_UNLOCK(&cachedVolumeLock);
return _PR_LOCAL_FILE;
+ }
_MD_UNLOCK(&cachedVolumeLock);
// volume serial number not found in the cache. Check removable files.
|
[-]
[+]
|
Changed |
nspr-4.7.2.tar.bz2/mozilla/nsprpub/pr/src/md/windows/w95io.c
^
|
@@ -336,7 +336,6 @@
PROsfd f = fd->secret->md.osfd;
PRInt32 bytes;
int rv;
- PRThread *me = _PR_MD_CURRENT_THREAD();
rv = WriteFile((HANDLE)f,
buf,
|
[-]
[+]
|
Changed |
nspr-4.7.2.tar.bz2/mozilla/nsprpub/pr/src/misc/prnetdb.c
^
|
@@ -700,11 +700,7 @@
LOCK_DNS();
-#ifdef XP_OS2_VACPP
- h = GETHOSTBYNAME((char *)name);
-#else
h = GETHOSTBYNAME(name);
-#endif
if (NULL == h)
{
@@ -933,11 +929,7 @@
}
#else /* _PR_INET6 */
LOCK_DNS();
-#ifdef XP_OS2_VACPP
- h = GETHOSTBYNAME((char *)name);
-#else
h = GETHOSTBYNAME(name);
-#endif
#endif /* _PR_INET6 */
if (NULL == h)
@@ -1101,11 +1093,7 @@
}
#else /* _PR_HAVE_GETIPNODEBYADDR */
LOCK_DNS();
-#ifdef XP_OS2_VACPP
- h = GETHOSTBYADDR((char *)addr, addrlen, af);
-#else
h = GETHOSTBYADDR(addr, addrlen, af);
-#endif
#endif /* _PR_HAVE_GETIPNODEBYADDR */
if (NULL == h)
{
@@ -1185,11 +1173,7 @@
static struct protoent *getprotobyname_r(const char* name)
{
-#ifdef XP_OS2_VACPP
- return getprotobyname((char *)name);
-#else
return getprotobyname(name);
-#endif
} /* getprotobyname_r */
static struct protoent *getprotobynumber_r(PRInt32 number)
@@ -1380,7 +1364,7 @@
#else
addrsize = sizeof(addr->ipv6);
#endif
-#if defined(XP_UNIX) || defined(XP_OS2_EMX)
+#if defined(XP_UNIX) || defined(XP_OS2)
else if (AF_UNIX == addr->raw.family)
addrsize = sizeof(addr->local);
#endif
@@ -2223,11 +2207,7 @@
memset(&addr->ipv6.ip, 0, sizeof(addr->ipv6.ip));
addr->inet.family = AF_INET;
-#ifdef XP_OS2_VACPP
- addr->inet.ip = inet_addr((char *)string);
-#else
addr->inet.ip = inet_addr(string);
-#endif
if ((PRUint32) -1 == addr->inet.ip)
{
/*
|
[-]
[+]
|
Changed |
nspr-4.7.2.tar.bz2/mozilla/nsprpub/pr/src/misc/prsystem.c
^
|
@@ -259,7 +259,7 @@
}
#elif defined(IRIX)
numCpus = sysconf( _SC_NPROC_ONLN );
-#elif defined(RISCOS)
+#elif defined(RISCOS) || defined(SYMBIAN)
numCpus = 1;
#elif defined(XP_UNIX)
numCpus = sysconf( _SC_NPROCESSORS_ONLN );
@@ -300,14 +300,14 @@
#elif defined(DARWIN)
struct host_basic_info hInfo;
- mach_msg_type_number_t count;
+ mach_msg_type_number_t count = HOST_BASIC_INFO_COUNT;
int result = host_info(mach_host_self(),
HOST_BASIC_INFO,
(host_info_t) &hInfo,
&count);
if (result == KERN_SUCCESS)
- bytes = hInfo.memory_size;
+ bytes = hInfo.max_mem;
#elif defined(WIN32)
|
[-]
[+]
|
Changed |
nspr-4.7.2.tar.bz2/mozilla/nsprpub/pr/src/misc/prtime.c
^
|
@@ -571,7 +571,7 @@
* We have to manually check (WIN16 only) for negative value of
* clock and return NULL.
*
- * With negative values of clock, emx returns the struct tm for
+ * With negative values of clock, OS/2 returns the struct tm for
* clock plus ULONG_MAX. So we also have to check for the invalid
* structs returned for timezones west of Greenwich when clock == 0.
*/
@@ -582,7 +582,7 @@
tmPtr = localtime(clock);
#endif
-#if defined(WIN16) || defined(XP_OS2_EMX)
+#if defined(WIN16) || defined(XP_OS2)
if ( (PRInt32) *clock < 0 ||
( (PRInt32) *clock == 0 && tmPtr->tm_year != 70))
result = NULL;
@@ -1696,30 +1696,48 @@
PR_IMPLEMENT(PRUint32)
PR_FormatTime(char *buf, int buflen, const char *fmt, const PRExplodedTime *tm)
{
+ size_t rv;
struct tm a;
- a.tm_sec = tm->tm_sec;
- a.tm_min = tm->tm_min;
- a.tm_hour = tm->tm_hour;
- a.tm_mday = tm->tm_mday;
- a.tm_mon = tm->tm_month;
- a.tm_wday = tm->tm_wday;
- a.tm_year = tm->tm_year - 1900;
- a.tm_yday = tm->tm_yday;
- a.tm_isdst = tm->tm_params.tp_dst_offset ? 1 : 0;
+ struct tm *ap;
-/*
- * On some platforms, for example SunOS 4, struct tm has two additional
- * fields: tm_zone and tm_gmtoff.
- */
+ if (tm) {
+ ap = &a;
+ a.tm_sec = tm->tm_sec;
+ a.tm_min = tm->tm_min;
+ a.tm_hour = tm->tm_hour;
+ a.tm_mday = tm->tm_mday;
+ a.tm_mon = tm->tm_month;
+ a.tm_wday = tm->tm_wday;
+ a.tm_year = tm->tm_year - 1900;
+ a.tm_yday = tm->tm_yday;
+ a.tm_isdst = tm->tm_params.tp_dst_offset ? 1 : 0;
+
+ /*
+ * On some platforms, for example SunOS 4, struct tm has two
+ * additional fields: tm_zone and tm_gmtoff.
+ */
#if defined(SUNOS4) || (__GLIBC__ >= 2) || defined(XP_BEOS) \
|| defined(NETBSD) || defined(OPENBSD) || defined(FREEBSD) \
- || defined(DARWIN)
- a.tm_zone = NULL;
- a.tm_gmtoff = tm->tm_params.tp_gmt_offset + tm->tm_params.tp_dst_offset;
+ || defined(DARWIN) || defined(SYMBIAN)
+ a.tm_zone = NULL;
+ a.tm_gmtoff = tm->tm_params.tp_gmt_offset +
+ tm->tm_params.tp_dst_offset;
#endif
+ } else {
+ ap = NULL;
+ }
- return strftime(buf, buflen, fmt, &a);
+ rv = strftime(buf, buflen, fmt, ap);
+ if (!rv && buf && buflen > 0) {
+ /*
+ * When strftime fails, the contents of buf are indeterminate.
+ * Some callers don't check the return value from this function,
+ * so store an empty string in buf in case they try to print it.
+ */
+ buf[0] = '\0';
+ }
+ return rv;
}
|
[-]
[+]
|
Changed |
nspr-4.7.2.tar.bz2/mozilla/nsprpub/pr/src/pthreads/ptio.c
^
|
@@ -1,4 +1,4 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
@@ -187,7 +187,10 @@
#include "primpl.h"
+#ifdef HAVE_NETINET_TCP_H
#include <netinet/tcp.h> /* TCP_NODELAY, TCP_MAXSEG */
+#endif
+
#ifdef LINUX
/* TCP_CORK is not defined in <netinet/tcp.h> on Red Hat Linux 6.0 */
#ifndef TCP_CORK
@@ -209,7 +212,7 @@
|| defined(LINUX) || defined(__GNU__) || defined(__GLIBC__) \
|| defined(FREEBSD) || defined(NETBSD) || defined(OPENBSD) \
|| defined(BSDI) || defined(VMS) || defined(NTO) || defined(DARWIN) \
- || defined(UNIXWARE) || defined(RISCOS)
+ || defined(UNIXWARE) || defined(RISCOS) || defined(SYMBIAN)
#define _PRSelectFdSetArg_t fd_set *
#else
#error "Cannot determine architecture"
@@ -456,7 +459,7 @@
rv = select(op->arg1.osfd + 1, rdp, wrp, NULL, &tv);
- if (self->state & PT_THREAD_ABORTED)
+ if (_PT_THREAD_INTERRUPTED(self))
{
self->state &= ~PT_THREAD_ABORTED;
op->result.code = -1;
@@ -517,7 +520,7 @@
tv.tv_usec = (msecs % PR_MSEC_PER_SEC) * PR_USEC_PER_MSEC;
rv = select(op->arg1.osfd + 1, rdp, wrp, NULL, &tv);
- if (self->state & PT_THREAD_ABORTED)
+ if (_PT_THREAD_INTERRUPTED(self))
{
self->state &= ~PT_THREAD_ABORTED;
op->result.code = -1;
@@ -598,7 +601,7 @@
rv = poll(&tmp_pfd, 1, msecs);
- if (self->state & PT_THREAD_ABORTED)
+ if (_PT_THREAD_INTERRUPTED(self))
{
self->state &= ~PT_THREAD_ABORTED;
op->result.code = -1;
@@ -656,7 +659,7 @@
}
rv = poll(&tmp_pfd, 1, msecs);
- if (self->state & PT_THREAD_ABORTED)
+ if (_PT_THREAD_INTERRUPTED(self))
{
self->state &= ~PT_THREAD_ABORTED;
op->result.code = -1;
@@ -1656,9 +1659,18 @@
PRFileDesc *newfd = NULL;
PRIntn syserrno, osfd = -1;
pt_SockLen addr_len = sizeof(PRNetAddr);
+#ifdef SYMBIAN
+ PRNetAddr dummy_addr;
+#endif
if (pt_TestAbort()) return newfd;
+#ifdef SYMBIAN
+ /* On Symbian OS, accept crashes if addr is NULL. */
+ if (!addr)
+ addr = &dummy_addr;
+#endif
+
#ifdef _PR_STRICT_ADDR_LEN
if (addr)
{
@@ -1826,7 +1838,15 @@
if (0 == flags)
osflags = 0;
else if (PR_MSG_PEEK == flags)
+ {
+#ifdef SYMBIAN
+ /* MSG_PEEK doesn't work as expected. */
+ PR_SetError(PR_NOT_IMPLEMENTED_ERROR, 0);
+ return bytes;
+#else
osflags = MSG_PEEK;
+#endif
+ }
else
{
PR_SetError(PR_INVALID_ARGUMENT_ERROR, 0);
@@ -3251,7 +3271,8 @@
|| defined(LINUX) || defined(__GNU__) || defined(__GLIBC__) \
|| defined(AIX) || defined(FREEBSD) || defined(NETBSD) \
|| defined(OPENBSD) || defined(BSDI) || defined(VMS) || defined(NTO) \
- || defined(DARWIN) || defined(UNIXWARE) || defined(RISCOS)
+ || defined(DARWIN) || defined(UNIXWARE) || defined(RISCOS) \
+ || defined(SYMBIAN)
#define _PR_FCNTL_FLAGS O_NONBLOCK
#else
#error "Can't determine architecture"
@@ -4354,6 +4375,84 @@
PR_IMPLEMENT(PRStatus) PR_NewTCPSocketPair(PRFileDesc *fds[2])
{
+#ifdef SYMBIAN
+ /*
+ * For the platforms that don't have socketpair.
+ *
+ * Copied from prsocket.c, with the parameter f[] renamed fds[] and the
+ * _PR_CONNECT_DOES_NOT_BIND code removed.
+ */
+ PRFileDesc *listenSock;
+ PRNetAddr selfAddr, peerAddr;
+ PRUint16 port;
+
+ fds[0] = fds[1] = NULL;
+ listenSock = PR_NewTCPSocket();
+ if (listenSock == NULL) {
+ goto failed;
+ }
+ PR_InitializeNetAddr(PR_IpAddrLoopback, 0, &selfAddr); /* BugZilla: 35408 */
+ if (PR_Bind(listenSock, &selfAddr) == PR_FAILURE) {
+ goto failed;
+ }
+ if (PR_GetSockName(listenSock, &selfAddr) == PR_FAILURE) {
+ goto failed;
+ }
+ port = ntohs(selfAddr.inet.port);
+ if (PR_Listen(listenSock, 5) == PR_FAILURE) {
+ goto failed;
+ }
+ fds[0] = PR_NewTCPSocket();
+ if (fds[0] == NULL) {
+ goto failed;
+ }
+ PR_InitializeNetAddr(PR_IpAddrLoopback, port, &selfAddr);
+
+ /*
+ * Only a thread is used to do the connect and accept.
+ * I am relying on the fact that PR_Connect returns
+ * successfully as soon as the connect request is put
+ * into the listen queue (but before PR_Accept is called).
+ * This is the behavior of the BSD socket code. If
+ * connect does not return until accept is called, we
+ * will need to create another thread to call connect.
+ */
+ if (PR_Connect(fds[0], &selfAddr, PR_INTERVAL_NO_TIMEOUT)
+ == PR_FAILURE) {
+ goto failed;
+ }
+ /*
+ * A malicious local process may connect to the listening
+ * socket, so we need to verify that the accepted connection
+ * is made from our own socket fds[0].
+ */
+ if (PR_GetSockName(fds[0], &selfAddr) == PR_FAILURE) {
+ goto failed;
+ }
+ fds[1] = PR_Accept(listenSock, &peerAddr, PR_INTERVAL_NO_TIMEOUT);
+ if (fds[1] == NULL) {
+ goto failed;
+ }
+ if (peerAddr.inet.port != selfAddr.inet.port) {
+ /* the connection we accepted is not from fds[0] */
+ PR_SetError(PR_INSUFFICIENT_RESOURCES_ERROR, 0);
+ goto failed;
+ }
+ PR_Close(listenSock);
+ return PR_SUCCESS;
+
+failed:
+ if (listenSock) {
+ PR_Close(listenSock);
+ }
+ if (fds[0]) {
+ PR_Close(fds[0]);
+ }
+ if (fds[1]) {
+ PR_Close(fds[1]);
+ }
+ return PR_FAILURE;
+#else
PRInt32 osfd[2];
if (pt_TestAbort()) return PR_FAILURE;
@@ -4376,6 +4475,7 @@
return PR_FAILURE;
}
return PR_SUCCESS;
+#endif
} /* PR_NewTCPSocketPair */
PR_IMPLEMENT(PRStatus) PR_CreatePipe(
@@ -4431,6 +4531,7 @@
if (fcntl(fd->secret->md.osfd, F_SETFD,
inheritable ? 0 : FD_CLOEXEC) == -1)
{
+ _PR_MD_MAP_DEFAULT_ERROR(errno);
return PR_FAILURE;
}
fd->secret->inheritable = (_PRTriStateBool) inheritable;
@@ -4603,21 +4704,23 @@
PR_IMPLEMENT(PRInt32) PR_GetSysfdTableMax(void)
{
-#if defined(XP_UNIX) && !defined(AIX) && !defined(VMS)
+#if defined(AIX) || defined(VMS) || defined(SYMBIAN)
+ return sysconf(_SC_OPEN_MAX);
+#else
struct rlimit rlim;
if ( getrlimit(RLIMIT_NOFILE, &rlim) < 0)
return -1;
return rlim.rlim_max;
-#elif defined(AIX) || defined(VMS)
- return sysconf(_SC_OPEN_MAX);
#endif
}
PR_IMPLEMENT(PRInt32) PR_SetSysfdTableSize(PRIntn table_size)
{
-#if defined(XP_UNIX) && !defined(AIX) && !defined(VMS)
+#if defined(AIX) || defined(VMS) || defined(SYMBIAN)
+ return -1;
+#else
struct rlimit rlim;
PRInt32 tableMax = PR_GetSysfdTableMax();
@@ -4634,8 +4737,6 @@
return -1;
return rlim.rlim_cur;
-#elif defined(AIX) || defined(VMS)
- return -1;
#endif
}
|
[-]
[+]
|
Changed |
nspr-4.7.2.tar.bz2/mozilla/nsprpub/pr/src/pthreads/ptsynch.c
^
|
@@ -811,7 +811,8 @@
* From the semctl(2) man page in glibc 2.0
*/
#if (defined(__GNU_LIBRARY__) && !defined(_SEM_SEMUN_UNDEFINED)) \
- || defined(FREEBSD) || defined(OPENBSD) || defined(BSDI)
+ || defined(FREEBSD) || defined(OPENBSD) || defined(BSDI) \
+ || defined(SYMBIAN)
/* union semun is defined by including <sys/sem.h> */
#else
/* according to X/OPEN we have to define it ourselves */
|
[-]
[+]
|
Changed |
nspr-4.7.2.tar.bz2/mozilla/nsprpub/pr/tests/Makefile.in
^
|
@@ -236,12 +236,8 @@
endif
ifeq ($(OS_ARCH),OS2)
-ifeq ($(MOZ_OS2_TOOLS),VACPP)
- LDOPTS = -NOE -DEBUG -nologo -PMTYPE:VIO
-else
- EXTRA_LIBS = $(OS_LIBS)
- LDOPTS = -Zomf -Zlinker /PM:VIO -Zlinker /ST:0x64000
-endif
+EXTRA_LIBS = $(OS_LIBS)
+LDOPTS = -Zomf -Zlinker /PM:VIO -Zlinker /ST:0x64000
endif
ifneq ($(OS_ARCH), WINNT)
@@ -332,13 +328,9 @@
endif
endif
- ifneq ($(LOCAL_THREADS_ONLY),1)
- ifdef USE_PTHREADS
- EXTRA_LIBS = -lpthread
- else
- EXTRA_LIBS = -lthread
- endif
- endif # LOCAL_THREADS_ONLY
+ ifdef USE_PTHREADS
+ EXTRA_LIBS = -lpthread
+ endif
endif # SunOS
ifeq ($(OS_ARCH), NEC)
@@ -494,11 +486,7 @@
fi
endif
else
-ifeq ($(MOZ_OS2_TOOLS),VACPP)
- $(LD) $(EXEFLAGS) $(LDOPTS) $< $(LIBPLC) $(LIBNSPR) $(OS_LIBS) $(EXTRA_LIBS)
-else
$(PURE) $(CC) $(XCFLAGS) $< $(LDOPTS) $(LIBPLC) $(LIBNSPR) $(EXTRA_LIBS) -o $@
-endif # OS/2
endif # WINNT
endif # AIX_PRE_4_2
|
[-]
[+]
|
Changed |
nspr-4.7.2.tar.bz2/mozilla/nsprpub/pr/tests/README.TXT
^
|
@@ -67,7 +67,7 @@
Obsoltet. Tests early spec for library dependency.
dlltest.c
- Tests dynamic library fucntions. Used with dll/my.c
+ Tests dynamic library functions. Used with dll/my.c
dtoa.c
Tests conversions of double to string.
|
[-]
[+]
|
Changed |
nspr-4.7.2.tar.bz2/mozilla/nsprpub/pr/tests/attach.c
^
|
@@ -332,13 +332,8 @@
#elif defined(OS2)
-# ifdef __EMX__
threadID = (TID) _beginthread((void *)threadStartFunc, NULL,
32768, NULL);
-# else
- threadID = (TID) _beginthread((void(* _Optlink)(void*))threadStartFunc, NULL,
- 32768, NULL);
-# endif
if (threadID == -1) {
fprintf(stderr, "thread creation failed: error code %d\n", errno);
failed_already=1;
|
[-]
[+]
|
Changed |
nspr-4.7.2.tar.bz2/mozilla/nsprpub/pr/tests/foreign.c
^
|
@@ -66,7 +66,7 @@
#include <stdlib.h>
static enum {
- thread_nspr, thread_pthread, thread_uithread, thread_sproc, thread_win32
+ thread_nspr, thread_pthread, thread_sproc, thread_win32
} thread_provider;
typedef void (*StartFn)(void*);
@@ -97,18 +97,6 @@
} /* pthread_start */
#endif /* defined(_PR_PTHREADS) && !defined(_PR_DCETHREADS) */
-#if defined(SOLARIS) && defined(_PR_GLOBAL_THREADS_ONLY)
-#include <thread.h>
-static void *uithread_start(void *arg)
-{
- StartFn start = ((StartObject*)arg)->start;
- void *data = ((StartObject*)arg)->arg;
- PR_Free(arg);
- start(data);
- return NULL;
-} /* uithread_start */
-#endif /* defined(SOLARIS) && defined(_PR_GLOBAL_THREADS_ONLY) */
-
#if defined(IRIX) && !defined(_PR_PTHREADS)
#include <sys/types.h>
#include <sys/prctl.h>
@@ -182,29 +170,6 @@
break;
#endif /* defined(_PR_PTHREADS) && !defined(_PR_DCETHREADS) */
- case thread_uithread:
-#if defined(SOLARIS) && defined(_PR_GLOBAL_THREADS_ONLY)
- {
- int rv;
- thread_t id;
- long flags;
- StartObject *start_object;
- start_object = PR_NEW(StartObject);
- PR_ASSERT(NULL != start_object);
- start_object->start = start;
- start_object->arg = arg;
-
- flags = THR_DETACHED;
-
- rv = thr_create(NULL, NULL, uithread_start, start_object, flags, &id);
- return (0 == rv) ? PR_SUCCESS : PR_FAILURE;
- }
-#else
- PR_SetError(PR_NOT_IMPLEMENTED_ERROR, 0);
- rv = PR_FAILURE;
- break;
-#endif /* defined(SOLARIS) && defined(_PR_GLOBAL_THREADS_ONLY) */
-
case thread_sproc:
#if defined(IRIX) && !defined(_PR_PTHREADS)
{
@@ -371,8 +336,6 @@
thread_provider = thread_win32;
#elif defined(_PR_PTHREADS)
thread_provider = thread_pthread;
-#elif defined(SOLARIS) && defined(_PR_GLOBAL_THREADS_ONLY)
- thread_provider = thread_uithread;
#elif defined(IRIX)
thread_provider = thread_sproc;
#else
|
[-]
[+]
|
Changed |
nspr-4.7.2.tar.bz2/mozilla/nsprpub/pr/tests/formattm.c
^
|
@@ -44,16 +44,39 @@
int main()
{
char buffer[256];
+ char small_buffer[8];
PRTime now;
PRExplodedTime tod;
now = PR_Now();
PR_ExplodeTime(now, PR_LocalTimeParameters, &tod);
- (void)PR_FormatTime(buffer, sizeof(buffer),
- "%a %b %d %H:%M:%S %Z %Y", &tod);
- printf("%s\n", buffer);
+
+ if (PR_FormatTime(buffer, sizeof(buffer),
+ "%a %b %d %H:%M:%S %Z %Y", &tod) != 0) {
+ printf("%s\n", buffer);
+ } else {
+ fprintf(stderr, "PR_FormatTime(buffer) failed\n");
+ return 1;
+ }
+
+ small_buffer[0] = '?';
+ if (PR_FormatTime(small_buffer, sizeof(small_buffer),
+ "%a %b %d %H:%M:%S %Z %Y", &tod) == 0) {
+ if (small_buffer[0] != '\0') {
+ fprintf(stderr, "PR_FormatTime(small_buffer) did not output "
+ "an empty string on failure\n");
+ return 1;
+ }
+ printf("%s\n", small_buffer);
+ } else {
+ fprintf(stderr, "PR_FormatTime(small_buffer) succeeded "
+ "unexpectedly\n");
+ return 1;
+ }
+
(void)PR_FormatTimeUSEnglish(buffer, sizeof(buffer),
"%a %b %d %H:%M:%S %Z %Y", &tod);
printf("%s\n", buffer);
+
return 0;
}
|
[-]
[+]
|
Changed |
nspr-4.7.2.tar.bz2/mozilla/nsprpub/pr/tests/provider.c
^
|
@@ -130,7 +130,7 @@
} Verbosity;
static enum {
- thread_nspr, thread_pthread, thread_uithread, thread_sproc, thread_win32
+ thread_nspr, thread_pthread, thread_sproc, thread_win32
} thread_provider;
static PRInt32 domain = AF_INET;
@@ -659,20 +659,6 @@
} /* pthread_start */
#endif /* defined(_PR_PTHREADS) && !defined(_PR_DCETHREADS) */
-#if defined(SOLARIS) && defined(_PR_GLOBAL_THREADS_ONLY)
-#include <thread.h>
-
-static void *uithread_start(void *arg)
-{
- StartObject *so = (StartObject*)arg;
- StartFn start = so->start;
- void *data = so->arg;
- PR_Free(so);
- start(data);
- return NULL;
-} /* uithread_start */
-#endif /* defined(SOLARIS) && defined(_PR_GLOBAL_THREADS_ONLY) */
-
#if defined(IRIX) && !defined(_PR_PTHREADS)
#include <sys/types.h>
#include <sys/prctl.h>
@@ -713,11 +699,6 @@
rv = PR_SUCCESS;
break;
#endif /* defined(_PR_PTHREADS) && !defined(_PR_DCETHREADS) */
- case thread_uithread:
-#if defined(SOLARIS) && defined(_PR_GLOBAL_THREADS_ONLY)
- rv = PR_SUCCESS;
- break;
-#endif /* defined(SOLARIS) && defined(_PR_GLOBAL_THREADS_ONLY) */
case thread_win32:
#if defined(WIN32)
rv = PR_SUCCESS;
@@ -777,29 +758,6 @@
#endif /* defined(_PR_PTHREADS) && !defined(_PR_DCETHREADS) */
break;
- case thread_uithread:
-#if defined(SOLARIS) && defined(_PR_GLOBAL_THREADS_ONLY)
- {
- int rv;
- thread_t id;
- long flags;
- StartObject *start_object;
- start_object = PR_NEW(StartObject);
- PR_ASSERT(NULL != start_object);
- start_object->start = start;
- start_object->arg = arg;
-
- flags = THR_DETACHED;
-
- rv = thr_create(NULL, NULL, uithread_start, start_object, flags, &id);
- return (0 == rv) ? PR_SUCCESS : PR_FAILURE;
- }
-#else
- PR_SetError(PR_NOT_IMPLEMENTED_ERROR, 0);
- rv = PR_FAILURE;
-#endif /* defined(SOLARIS) && defined(_PR_GLOBAL_THREADS_ONLY) */
- break;
-
case thread_sproc:
#if defined(IRIX) && !defined(_PR_PTHREADS)
{
@@ -1110,7 +1068,7 @@
PR_fprintf(debug_out, "\t-e <seconds> duration of the test in seconds (10)\n");
PR_fprintf(debug_out, "\t-s <string> dsn name of server (localhost)\n");
PR_fprintf(debug_out, "\t-G use GLOBAL threads (LOCAL)\n");
- PR_fprintf(debug_out, "\t-T <string> thread provider ('n' | 'p' | 'u' | 'w')(n)\n");
+ PR_fprintf(debug_out, "\t-T <string> thread provider ('n' | 'p' | 'w')(n)\n");
PR_fprintf(debug_out, "\t-X use XTP as transport (TCP)\n");
PR_fprintf(debug_out, "\t-6 Use IPv6 (IPv4)\n");
PR_fprintf(debug_out, "\t-v verbosity (accumulative) (0)\n");
@@ -1162,8 +1120,6 @@
thread_provider = thread_win32;
#elif defined(_PR_PTHREADS)
thread_provider = thread_pthread;
-#elif defined(SOLARIS) && defined(_PR_GLOBAL_THREADS_ONLY)
- thread_provider = thread_uithread;
#elif defined(IRIX)
thread_provider = thread_sproc;
#else
@@ -1195,7 +1151,6 @@
case 'T': /* the thread provider */
if ('n' == *opt->value) thread_provider = thread_nspr;
else if ('p' == *opt->value) thread_provider = thread_pthread;
- else if ('u' == *opt->value) thread_provider = thread_uithread;
else if ('w' == *opt->value) thread_provider = thread_win32;
else {Help(); return 2; }
break;
@@ -1424,8 +1379,6 @@
thread_type = "\nWin32 Thread Statistics\n";
else if (thread_provider == thread_pthread)
thread_type = "\npthread Statistics\n";
- else if (thread_provider == thread_uithread)
- thread_type = "\nUnix International (UI) Thread Statistics\n";
else if (thread_provider == thread_sproc)
thread_type = "\nsproc Statistics\n";
else {
|
[-]
[+]
|
Changed |
nspr-4.7.2.tar.bz2/mozilla/nsprpub/pr/tests/prpoll.c
^
|
@@ -39,10 +39,6 @@
#include <windows.h>
#endif
-#ifdef XP_OS2_VACPP
-#include <io.h> /* for close() */
-#endif
-
#ifdef XP_UNIX
#include <unistd.h> /* for close() */
#endif
|
[-]
[+]
|
Added |
nspr-4.7.2.tar.bz2/mozilla/nsprpub/pr/tests/runtests.pl
^
|
@@ -0,0 +1,384 @@
+#!/usr/bin/perl
+#
+# ***** BEGIN LICENSE BLOCK *****
+# Version: MPL 1.1/GPL 2.0/LGPL 2.1
+#
+# The contents of this file are subject to the Mozilla Public License Version
+# 1.1 (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+# http://www.mozilla.org/MPL/
+#
+# Software distributed under the License is distributed on an "AS IS" basis,
+# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+# for the specific language governing rights and limitations under the
+# License.
+#
+# The Original Code is the Netscape Portable Runtime (NSPR).
+#
+# The Initial Developer of the Original Code is
+# Sun Microsystems, Inc.
+# Portions created by the Initial Developer are Copyright (C) 2008
+# the Initial Developer. All Rights Reserved.
+#
+# Contributor(s):
+# Christophe Ravel <christophe.ravel@sun.com>, Sun Microsystems
+# Slavomir Katuscak <slavomir.katuscak@sun.com>, Sun Microsystems
+#
+# Alternatively, the contents of this file may be used under the terms of
+# either the GNU General Public License Version 2 or later (the "GPL"), or
+# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+# in which case the provisions of the GPL or the LGPL are applicable instead
+# of those above. If you wish to allow use of your version of this file only
+# under the terms of either the GPL or the LGPL, and not to allow others to
+# use your version of this file under the terms of the MPL, indicate your
+# decision by deleting the provisions above and replace them with the notice
+# and other provisions required by the GPL or the LGPL. If you do not delete
+# the provisions above, a recipient may use your version of this file under
+# the terms of any one of the MPL, the GPL or the LGPL.
+#
+# ***** END LICENSE BLOCK *****
+
+use POSIX qw(:sys_wait_h);
+use POSIX qw(setsid);
+use FileHandle;
+
+# Constants
+$WINOS = "MSWin32";
+
+$osname = $^O;
+
+use Cwd;
+if ($osname =~ $WINOS) {
+ # Windows
+ require Win32::Process;
+ require Win32;
+}
+
+# Get environment variables.
+$output_file = $ENV{NSPR_TEST_LOGFILE};
+$timeout = $ENV{TEST_TIMEOUT};
+
+$timeout = 0 if (!defined($timeout));
+
+sub getTime {
+ ($second, $minute, $hour, $dayOfMonth, $month, $yearOffset, $dayOfWeek, $dayOfYear, $daylightSavings) = localtime();
+
+ $year = 1900 + $yearOffset;
+
+ $theTime = sprintf("%04d-%02d-%02d %02d:%02d:%02d",$year,$month,$dayOfMonth,$hour,$minute,$second);
+ return $theTime;
+}
+
+sub open_log {
+
+ if (!defined($output_file)) {
+ print "No output file.\n";
+ # null device
+ if ($osname =~ $WINOS) {
+ $output_file = "nul";
+ } else {
+ $output_file = "/dev/null";
+ }
+ }
+
+ # use STDOUT for OF (to print summary of test results)
+ open(OF, ">&STDOUT") or die "Can't reuse STDOUT for OF\n";
+ OF->autoflush;
+ # reassign STDOUT to $output_file (to print details of test results)
+ open(STDOUT, ">$output_file") or die "Can't open file $output_file for STDOUT\n";
+ STDOUT->autoflush;
+ # redirect STDERR to STDOUT
+ open(STDERR, ">&STDOUT") or die "Can't redirect STDERR to STDOUT\n";
+ STDERR->autoflush;
+
+ # Print header test in summary
+ $now = getTime;
+ print OF "\nNSPR Test Results - tests\n";
+ print OF "\nBEGIN\t\t\t$now\n";
+ print OF "NSPR_TEST_LOGFILE\t$output_file\n";
+ print OF "TEST_TIMEOUT\t$timeout\n\n";
+ print OF "\nTest\t\t\tResult\n\n";
+}
+
+sub close_log {
+ # end of test marker in summary
+ $now = getTime;
+ print OF "END\t\t\t$now\n";
+
+ close(OF) or die "Can't close file OF\n";
+ close(STDERR) or die "Can't close STDERR\n";
+ close(STDOUT) or die "Can't close STDOUT\n";
+}
+
+sub print_begin {
+$lprog = shift;
+
+ # Summary output
+ print OF "$prog";
+ # Full output
+ $now = getTime;
+ print "BEGIN TEST: $lprog ($now)\n\n";
+}
+
+sub print_end {
+$lprog = shift;
+$lstatus = shift;
+
+ if ($lstatus == 0) {
+ $str_status = "Passed";
+ } else {
+ $str_status = "FAILED";
+ }
+ $now = getTime;
+ # Full output
+ print "\nEND TEST: $lprog ($now)\n";
+ print "TEST STATUS: $lprog = $str_status (errno $lstatus)\n";
+ print "--------------------------------------------------\n\n";
+ # Summary output
+ print OF "\t\t\t$str_status\n";
+}
+
+sub ux_start_prog {
+# parameters:
+$lprog = shift; # command to run
+
+ # Create a process group for the child
+ # so we can kill all of it if needed
+ setsid or die "setsid failed: $!";
+ # Start test program
+ exec("./$lprog");
+}
+
+sub ux_wait_timeout {
+# parameters:
+$lpid = shift; # child process id
+$ltimeout = shift; # timeout
+
+ if ($ltimeout == 0) {
+ # No timeout: use blocking wait
+ $ret = waitpid($lpid,0);
+ # Exit and don't kill
+ $lstatus = $? % 256;
+ $ltimeout = -1;
+ } else {
+ while ($ltimeout > 0) {
+ # Check status of child using non blocking wait
+ $ret = waitpid($lpid, WNOHANG);
+ if ($ret == 0) {
+ # Child still running
+ # print "Time left=$ltimeout\n";
+ sleep 1;
+ $ltimeout--;
+ } else {
+ # Child has ended
+ $lstatus = $? % 256;
+ # Exit the wait loop and don't kill
+ $ltimeout = -1;
+ }
+ }
+ }
+
+ if ($ltimeout == 0) {
+ # we ran all the timeout: it's time to kill the child
+ print "Timeout ! Kill child process $lpid\n";
+ # Kill the child process and group
+ kill(-9,$lpid);
+ $lstatus = 1;
+ }
+
+ return $lstatus;
+}
+
+sub ux_test_prog {
+# parameters:
+$prog = shift; # Program to test
+
+ $child_pid = fork;
+ if ($child_pid == 0) {
+ # we are in the child process
+ print_begin($prog);
+ ux_start_prog($prog);
+ } else {
+ # we are in the parent process
+ $status = ux_wait_timeout($child_pid,$timeout);
+ print_end($prog, $status);
+ }
+
+ return $status;
+}
+
+sub win_path {
+$lpath = shift;
+
+ # MSYS drive letter = /c/ -> c:/
+ $lpath =~ s/^\/(\w)\//$1:\//;
+ # Cygwin drive letter = /cygdrive/c/ -> c:/
+ $lpath =~ s/^\/cygdrive\/(\w)\//$1:\//;
+ # replace / with \\
+ $lpath =~ s/\//\\\\/g;
+
+ return $lpath;
+}
+
+sub win_ErrorReport{
+ print Win32::FormatMessage( Win32::GetLastError() );
+}
+
+sub win_test_prog {
+# parameters:
+$prog = shift; # Program to test
+
+ $status = 1;
+ $curdir = getcwd;
+ $curdir = win_path($curdir);
+ $prog_path = "$curdir\\$prog.exe";
+
+ print_begin($prog);
+
+ Win32::Process::Create($ProcessObj,
+ "$prog_path",
+ "$prog",
+ 0,
+ NORMAL_PRIORITY_CLASS,
+ ".")|| die win_ErrorReport();
+ $retwait = $ProcessObj->Wait($timeout * 1000);
+
+ if ( $retwait == 0) {
+ # the prog didn't finish after the timeout: kill
+ $ProcessObj->Kill($status);
+ print "Timeout ! Process killed with error code $status\n";
+ } else {
+ # the prog finished before the timeout: get exit code
+ $ProcessObj->GetExitCode($status);
+ }
+ print_end($prog,$status);
+
+ return $status
+}
+
+# MAIN ---------------
+@progs = (
+"accept",
+"acceptread",
+"acceptreademu",
+"affinity",
+"alarm",
+"anonfm",
+"atomic",
+"attach",
+"bigfile",
+"cleanup",
+"cltsrv",
+"concur",
+"cvar",
+"cvar2",
+"dlltest",
+"dtoa",
+"errcodes",
+"exit",
+"fdcach",
+"fileio",
+"foreign",
+"formattm",
+"fsync",
+"gethost",
+"getproto",
+"i2l",
+"initclk",
+"inrval",
+"instrumt",
+"intrio",
+"intrupt",
+"io_timeout",
+"ioconthr",
+"join",
+"joinkk",
+"joinku",
+"joinuk",
+"joinuu",
+"layer",
+"lazyinit",
+"libfilename",
+"lltest",
+"lock",
+"lockfile",
+"logger",
+"many_cv",
+"multiwait",
+"nameshm1",
+"nblayer",
+"nonblock",
+"ntioto",
+"ntoh",
+"op_2long",
+"op_excl",
+"op_filnf",
+"op_filok",
+"op_nofil",
+"parent",
+"peek",
+"perf",
+"pipeping",
+"pipeping2",
+"pipeself",
+"poll_nm",
+"poll_to",
+"pollable",
+"prftest",
+"primblok",
+"provider",
+"prpollml",
+"ranfile",
+"randseed",
+"rwlocktest",
+"sel_spd",
+"selct_er",
+"selct_nm",
+"selct_to",
+"selintr",
+"sema",
+"semaerr",
+"semaping",
+"sendzlf",
+"server_test",
+"servr_kk",
+"servr_uk",
+"servr_ku",
+"servr_uu",
+"short_thread",
+"sigpipe",
+"socket",
+"sockopt",
+"sockping",
+"sprintf",
+"stack",
+"stdio",
+"str2addr",
+"strod",
+"switch",
+"system",
+"testbit",
+"testfile",
+"threads",
+"timemac",
+"timetest",
+"tpd",
+"udpsrv",
+"vercheck",
+"version",
+"writev",
+"xnotify",
+"zerolen");
+
+open_log;
+
+foreach $current_prog (@progs) {
+# print "Current_prog=$current_prog\n";
+ if ($osname =~ $WINOS) {
+ win_test_prog($current_prog);
+ } else {
+ ux_test_prog($current_prog);
+ }
+}
+
+close_log;
|
[-]
[+]
|
Changed |
nspr-4.7.2.tar.bz2/mozilla/nsprpub/pr/tests/sel_spd.c
^
|
@@ -453,12 +453,12 @@
int main(int argc, char **argv)
{
-#if defined(XP_UNIX) || defined(XP_OS2_EMX)
+#if defined(XP_UNIX) || defined(XP_OS2)
int opt;
PR_IMPORT_DATA(char *) optarg;
#endif
-#if defined(XP_UNIX) || defined(XP_OS2_EMX)
+#if defined(XP_UNIX) || defined(XP_OS2)
while ( (opt = getopt(argc, argv, "c:s:i:t:v")) != EOF) {
switch(opt) {
case 'i':
|
[-]
[+]
|
Changed |
nspr-4.7.2.tar.bz2/mozilla/nsprpub/pr/tests/sigpipe.c
^
|
@@ -49,7 +49,7 @@
int main(void)
{
- /* This test applies to Unix and OS/2 (emx build). */
+ /* This test applies to Unix and OS/2. */
return 0;
}
@@ -64,12 +64,7 @@
#endif
#include <stdio.h>
-#ifdef XP_OS2_VACPP
-#define EPIPE EBADF /* IBM's write() doesn't return EPIPE */
-#include <io.h>
-#else
#include <unistd.h>
-#endif
#include <errno.h>
static void Test(void *arg)
|
[-]
[+]
|
Changed |
nspr-4.7.2.tar.bz2/mozilla/nsprpub/pr/tests/sleep.c
^
|
@@ -52,11 +52,6 @@
#define GTOD(_a) gettimeofday((_a), NULL)
#endif
-#if defined (XP_OS2_VACPP)
-#define INCL_DOSPROCESS
-#include <os2.h>
-#endif
-
static PRIntn rv = 0;
static void Other(void *unused)
|
[-]
[+]
|
Changed |
nspr-4.7.2.tar.bz2/mozilla/nsprpub/pr/tests/testfile.c
^
|
@@ -52,10 +52,8 @@
#if defined(XP_OS2)
#define INCL_DOSFILEMGR
#include <os2.h>
-#ifdef XP_OS2_EMX
#include <getopt.h>
#include <errno.h>
-#endif /* XP_OS2_EMX */
#endif /* XP_OS2 */
static int _debug_on = 0;
@@ -953,12 +951,12 @@
#ifdef WIN32
PRUint32 len;
#endif
-#if defined(XP_UNIX) || defined(XP_OS2_EMX)
+#if defined(XP_UNIX) || defined(XP_OS2)
int opt;
extern char *optarg;
extern int optind;
#endif
-#if defined(XP_UNIX) || defined(XP_OS2_EMX)
+#if defined(XP_UNIX) || defined(XP_OS2)
while ((opt = getopt(argc, argv, "d")) != EOF) {
switch(opt) {
case 'd':
|
[-]
[+]
|
Changed |
nspr-4.7.2.tar.bz2/mozilla/nsprpub/pr/tests/thrpool_server.c
^
|
@@ -58,7 +58,7 @@
#endif
/* for getcwd */
-#if defined(XP_UNIX) || defined (XP_OS2_EMX) || defined(XP_BEOS)
+#if defined(XP_UNIX) || defined (XP_OS2) || defined(XP_BEOS)
#include <unistd.h>
#elif defined(XP_PC)
#include <direct.h>
|
[-]
[+]
|
Changed |
nspr-4.7.2.tar.bz2/mozilla/nsprpub/pr/tests/tmocon.c
^
|
@@ -66,7 +66,7 @@
#include <string.h>
/* for getcwd */
-#if defined(XP_UNIX) || defined (XP_OS2_EMX) || defined(XP_BEOS)
+#if defined(XP_UNIX) || defined (XP_OS2) || defined(XP_BEOS)
#include <unistd.h>
#elif defined(XP_PC)
#include <direct.h>
|
[-]
[+]
|
Changed |
nspr-4.7.2.tar.bz2/mozilla/nsprpub/pr/tests/vercheck.c
^
|
@@ -52,16 +52,17 @@
#include <stdlib.h>
/*
- * This release (4.7) is backward compatible with the
- * 4.0.x, 4.1.x, 4.2.x, 4.3.x, 4.4.x, 4.5.x, and 4.6.x releases.
- * It, of course, is compatible with itself.
+ * This release (4.7.2) is backward compatible with the
+ * 4.0.x, 4.1.x, 4.2.x, 4.3.x, 4.4.x, 4.5.x, 4.6.x, 4.7, and
+ * 4.7.1 releases. It, of course, is compatible with itself.
*/
static char *compatible_version[] = {
"4.0", "4.0.1", "4.1", "4.1.1", "4.1.2", "4.1.3",
"4.2", "4.2.1", "4.2.2", "4.3", "4.4", "4.4.1",
"4.5", "4.5.1",
- "4.6", "4.6.1", "4.6.2", "4.6.3", "4.6.4", "4.6.5", "4.6.6", "4.6.7", "4.6.8",
- "4.7", PR_VERSION
+ "4.6", "4.6.1", "4.6.2", "4.6.3", "4.6.4", "4.6.5",
+ "4.6.6", "4.6.7", "4.6.8",
+ "4.7", "4.7.1", PR_VERSION
};
/*
@@ -76,7 +77,7 @@
"3.0", "3.0.1",
"3.1", "3.1.1", "3.1.2", "3.1.3",
"3.5", "3.5.1",
- "4.7.3",
+ "4.7.9",
"4.8", "4.8.1",
"10.0", "11.1", "12.14.20"
};
|
[-]
[+]
|
Changed |
nspr-4.7.2.tar.bz2/mozilla/nsprpub/tools/Makefile.in
^
|
@@ -90,13 +90,7 @@
endif
ifeq ($(OS_ARCH),OS2)
- ifeq ($(MOZ_OS2_TOOLS),VACPP)
- LDOPTS = -NOE -DEBUG -nologo -PMTYPE:VIO
- LIBPR = $(dist_libdir)/nspr$(NSPR_VERSION).lib
- LIBPLC= $(dist_libdir)/plc$(NSPR_VERSION).lib
- else
- LDOPTS += -Zomf -Zlinker /PM:VIO
- endif
+LDOPTS += -Zomf -Zlinker /PM:VIO
endif
ifneq ($(OS_ARCH), WINNT)
@@ -132,18 +126,11 @@
endif
endif
-# SunOS 5.4 and 5.5 need to link with -lthread or -lpthread,
-# even though we already linked with these system libraries
-# when we built libnspr.so.
-ifeq ($(OS_RELEASE), 5.4)
-EXTRA_LIBS = -lthread
-endif
-
+# SunOS 5.5 needs to link with -lpthread, even though we already
+# linked with this system library when we built libnspr.so.
ifeq ($(OS_RELEASE), 5.5)
ifdef USE_PTHREADS
EXTRA_LIBS = -lpthread
-else
-EXTRA_LIBS = -lthread
endif
endif
endif # SunOS
|