| 1 |
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ |
| 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/. */ |
| 5 |
|
| 6 |
#include "prinit.h" |
| 7 |
#include "prvrsion.h" |
| 8 |
|
| 9 |
/************************************************************************/ |
| 10 |
/**************************IDENTITY AND VERSIONING***********************/ |
| 11 |
/************************************************************************/ |
| 12 |
#include "_pl_bld.h" |
| 13 |
#if !defined(_BUILD_TIME) |
| 14 |
# ifdef HAVE_LONG_LONG |
| 15 |
# define _BUILD_TIME 0 |
| 16 |
# else |
| 17 |
# define _BUILD_TIME {0, 0} |
| 18 |
# endif |
| 19 |
#endif |
| 20 |
#if !defined(_BUILD_STRING) |
| 21 |
# define _BUILD_STRING "" |
| 22 |
#endif |
| 23 |
#if !defined(_PRODUCTION) |
| 24 |
# define _PRODUCTION "" |
| 25 |
#endif |
| 26 |
#if defined(DEBUG) |
| 27 |
# define _DEBUG_STRING " (debug)" |
| 28 |
#else |
| 29 |
# define _DEBUG_STRING "" |
| 30 |
#endif |
| 31 |
|
| 32 |
/* |
| 33 |
* A trick to expand the PR_VMAJOR macro before concatenation. |
| 34 |
*/ |
| 35 |
#define CONCAT(x, y) x##y |
| 36 |
#define CONCAT2(x, y) CONCAT(x, y) |
| 37 |
#define VERSION_DESC_NAME CONCAT2(prVersionDescription_libplc, PR_VMAJOR) |
| 38 |
|
| 39 |
PRVersionDescription VERSION_DESC_NAME = { |
| 40 |
/* version */ 2, /* this is the only one supported */ |
| 41 |
/* buildTime */ _BUILD_TIME, /* usecs since midnight 1/1/1970 GMT */ |
| 42 |
/* buildTimeString */ _BUILD_STRING, /* ditto, but human readable */ |
| 43 |
/* vMajor */ PR_VMAJOR, /* NSPR's version number */ |
| 44 |
/* vMinor */ PR_VMINOR, /* and minor version */ |
| 45 |
/* vPatch */ PR_VPATCH, /* and patch */ |
| 46 |
/* beta */ PR_BETA, /* beta build boolean */ |
| 47 |
#if defined(DEBUG) |
| 48 |
/* debug */ PR_TRUE, /* a debug build */ |
| 49 |
#else |
| 50 |
/* debug */ PR_FALSE, /* an optomized build */ |
| 51 |
#endif |
| 52 |
/* special */ PR_FALSE, /* they're all special, but ... */ |
| 53 |
/* filename */ _PRODUCTION, /* the produced library name */ |
| 54 |
/* description */ "Portable runtime", /* what we are */ |
| 55 |
/* security */ "N/A", /* not applicable here */ |
| 56 |
/* copywrite */ |
| 57 |
"This Source Code Form is subject to the terms of the Mozilla Public " |
| 58 |
"License, v. 2.0. If a copy of the MPL was not distributed with this file, " |
| 59 |
"You can obtain one at http://mozilla.org/MPL/2.0/.", |
| 60 |
/* comment */ "http://www.mozilla.org/MPL/", |
| 61 |
/* specialString */ ""}; |
| 62 |
|
| 63 |
#ifdef XP_UNIX |
| 64 |
|
| 65 |
/* |
| 66 |
* Version information for the 'ident' and 'what commands |
| 67 |
* |
| 68 |
* NOTE: the first component of the concatenated rcsid string |
| 69 |
* must not end in a '$' to prevent rcs keyword substitution. |
| 70 |
*/ |
| 71 |
static char rcsid[] = |
| 72 |
"$Header: NSPR " PR_VERSION _DEBUG_STRING " " _BUILD_STRING " $"; |
| 73 |
static char sccsid[] = "@(#)NSPR " PR_VERSION _DEBUG_STRING " " _BUILD_STRING; |
| 74 |
|
| 75 |
#endif /* XP_UNIX */ |
| 76 |
|
| 77 |
#ifdef _PR_HAS_PRAGMA_DIAGNOSTIC |
| 78 |
# pragma GCC diagnostic push |
| 79 |
# pragma GCC diagnostic ignored "-Wunused-but-set-variable" |
| 80 |
#endif |
| 81 |
PR_IMPLEMENT(const PRVersionDescription*) libVersionPoint() { |
| 82 |
#ifdef XP_UNIX |
| 83 |
/* |
| 84 |
* Add dummy references to rcsid and sccsid to prevent them |
| 85 |
* from being optimized away as unused variables. |
| 86 |
*/ |
| 87 |
const char* dummy; |
| 88 |
|
| 89 |
dummy = rcsid; |
| 90 |
dummy = sccsid; |
| 91 |
#endif |
| 92 |
return &VERSION_DESC_NAME; |
| 93 |
} /* versionEntryPointType */ |
| 94 |
#ifdef _PR_HAS_PRAGMA_DIAGNOSTIC |
| 95 |
# pragma GCC diagnostic pop |
| 96 |
#endif |
| 97 |
|
| 98 |
/* plvrsion.c */ |