~ubuntu-branches/ubuntu/quantal/nspr/quantal-security

« back to all changes in this revision

Viewing changes to mozilla/nsprpub/pr/include/md/_unixos.h

  • Committer: Package Import Robot
  • Author(s): Jamie Strandboge
  • Date: 2013-01-10 10:56:12 UTC
  • mfrom: (1.3.4)
  • Revision ID: package-import@ubuntu.com-20130110105612-zo087hhaexilklvu
Tags: 4.9.4-0ubuntu0.12.10.1
* New upstream release to support security fixes in nss. Dropped the
  following patches:
  - debian/patches/30_pkgconfig.patch (included upstream)
  - debian/patches/38_hurd.patch (included upstream)
  - debian/patches/99_configure.patch (no longer required)
  - debian/patches/sonames.patch (no longer required)
* debian/libnsp4.symbols: added PR_GetThreadName@Base and
  PR_SetCurrentThreadName@Base

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2
 
/* ***** BEGIN LICENSE BLOCK *****
3
 
 * Version: MPL 1.1/GPL 2.0/LGPL 2.1
4
 
 *
5
 
 * The contents of this file are subject to the Mozilla Public License Version
6
 
 * 1.1 (the "License"); you may not use this file except in compliance with
7
 
 * the License. You may obtain a copy of the License at
8
 
 * http://www.mozilla.org/MPL/
9
 
 *
10
 
 * Software distributed under the License is distributed on an "AS IS" basis,
11
 
 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
12
 
 * for the specific language governing rights and limitations under the
13
 
 * License.
14
 
 *
15
 
 * The Original Code is the Netscape Portable Runtime (NSPR).
16
 
 *
17
 
 * The Initial Developer of the Original Code is
18
 
 * Netscape Communications Corporation.
19
 
 * Portions created by the Initial Developer are Copyright (C) 1998-2000
20
 
 * the Initial Developer. All Rights Reserved.
21
 
 *
22
 
 * Contributor(s):
23
 
 *
24
 
 * Alternatively, the contents of this file may be used under the terms of
25
 
 * either the GNU General Public License Version 2 or later (the "GPL"), or
26
 
 * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
27
 
 * in which case the provisions of the GPL or the LGPL are applicable instead
28
 
 * of those above. If you wish to allow use of your version of this file only
29
 
 * under the terms of either the GPL or the LGPL, and not to allow others to
30
 
 * use your version of this file under the terms of the MPL, indicate your
31
 
 * decision by deleting the provisions above and replace them with the notice
32
 
 * and other provisions required by the GPL or the LGPL. If you do not delete
33
 
 * the provisions above, a recipient may use your version of this file under
34
 
 * the terms of any one of the MPL, the GPL or the LGPL.
35
 
 *
36
 
 * ***** END LICENSE BLOCK ***** */
 
2
/* This Source Code Form is subject to the terms of the Mozilla Public
 
3
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 
4
 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
37
5
 
38
6
#ifndef prunixos_h___
39
7
#define prunixos_h___
47
15
 * not be redefined.
48
16
 */
49
17
#if !defined(LINUX) && !defined(__GNU__) && !defined(__GLIBC__) \
50
 
    && !defined(DARWIN) && !defined(NEXTSTEP)
 
18
    && !defined(DARWIN)
51
19
#ifndef FD_SETSIZE
52
20
#define FD_SETSIZE  4096
53
21
#endif
179
147
#define PROT_NONE 0x0
180
148
#endif
181
149
 
182
 
#if defined(DEBUG) && !defined(DARWIN) && !defined(NEXTSTEP)
 
150
#if defined(DEBUG) && !defined(DARWIN)
183
151
#if !defined(SOLARIS)   
184
152
#include <string.h>  /* for memset() */
185
153
#define _MD_INIT_STACK(ts,REDZONE)                                      \
326
294
 
327
295
/************************************************************************/
328
296
 
329
 
#if !defined(HPUX_LW_TIMER)
330
 
#define _MD_INTERVAL_INIT()
331
 
#endif
 
297
#ifdef _MD_INTERVAL_USE_GTOD
 
298
extern PRIntervalTime   _PR_UNIX_GetInterval(void);
 
299
extern PRIntervalTime   _PR_UNIX_TicksPerSecond(void);
 
300
#define _MD_INTERVAL_INIT()
 
301
#define _MD_GET_INTERVAL                _PR_UNIX_GetInterval
 
302
#define _MD_INTERVAL_PER_SEC            _PR_UNIX_TicksPerSecond
 
303
#endif
 
304
 
 
305
#ifdef HAVE_CLOCK_MONOTONIC
 
306
extern PRIntervalTime   _PR_UNIX_GetInterval2(void);
 
307
extern PRIntervalTime   _PR_UNIX_TicksPerSecond2(void);
 
308
#define _MD_INTERVAL_INIT()
 
309
#define _MD_GET_INTERVAL                _PR_UNIX_GetInterval2
 
310
#define _MD_INTERVAL_PER_SEC            _PR_UNIX_TicksPerSecond2
 
311
#endif
 
312
 
332
313
#define _MD_INTERVAL_PER_MILLISEC()     (_PR_MD_INTERVAL_PER_SEC() / 1000)
333
314
#define _MD_INTERVAL_PER_MICROSEC()     (_PR_MD_INTERVAL_PER_SEC() / 1000000)
334
315