1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/nsprpub/pr/src/prvrsion.c Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,93 @@ 1.4 +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ 1.5 +/* This Source Code Form is subject to the terms of the Mozilla Public 1.6 + * License, v. 2.0. If a copy of the MPL was not distributed with this 1.7 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 1.8 + 1.9 +#include "prinit.h" 1.10 +#include "prvrsion.h" 1.11 + 1.12 +/************************************************************************/ 1.13 +/**************************IDENTITY AND VERSIONING***********************/ 1.14 +/************************************************************************/ 1.15 +#include "_pr_bld.h" 1.16 +#if !defined(_BUILD_TIME) 1.17 +#ifdef HAVE_LONG_LONG 1.18 +#define _BUILD_TIME 0 1.19 +#else 1.20 +#define _BUILD_TIME {0, 0} 1.21 +#endif 1.22 +#endif 1.23 +#if !defined(_BUILD_STRING) 1.24 +#define _BUILD_STRING "" 1.25 +#endif 1.26 +#if !defined(_PRODUCTION) 1.27 +#define _PRODUCTION "" 1.28 +#endif 1.29 +#if defined(DEBUG) 1.30 +#define _DEBUG_STRING " (debug)" 1.31 +#else 1.32 +#define _DEBUG_STRING "" 1.33 +#endif 1.34 + 1.35 +/* 1.36 + * A trick to expand the PR_VMAJOR macro before concatenation. 1.37 + */ 1.38 +#define CONCAT(x, y) x ## y 1.39 +#define CONCAT2(x, y) CONCAT(x, y) 1.40 +#define VERSION_DESC_NAME CONCAT2(prVersionDescription_libnspr, PR_VMAJOR) 1.41 + 1.42 +PRVersionDescription VERSION_DESC_NAME = 1.43 +{ 1.44 + /* version */ 2, /* this is the only one supported */ 1.45 + /* buildTime */ _BUILD_TIME, /* usecs since midnight 1/1/1970 GMT */ 1.46 + /* buildTimeString */ _BUILD_STRING, /* ditto, but human readable */ 1.47 + /* vMajor */ PR_VMAJOR, /* NSPR's version number */ 1.48 + /* vMinor */ PR_VMINOR, /* and minor version */ 1.49 + /* vPatch */ PR_VPATCH, /* and patch */ 1.50 + /* beta */ PR_BETA, /* beta build boolean */ 1.51 +#if defined(DEBUG) 1.52 + /* debug */ PR_TRUE, /* a debug build */ 1.53 +#else 1.54 + /* debug */ PR_FALSE, /* an optomized build */ 1.55 +#endif 1.56 + /* special */ PR_FALSE, /* they're all special, but ... */ 1.57 + /* filename */ _PRODUCTION, /* the produced library name */ 1.58 + /* description */ "Portable runtime", /* what we are */ 1.59 + /* security */ "N/A", /* not applicable here */ 1.60 + /* copywrite */ "Copyright (c) 1998 Netscape Communications Corporation. All Rights Reserved", 1.61 + /* comment */ "License information: http://www.mozilla.org/MPL/", 1.62 + /* specialString */ "" 1.63 +}; 1.64 + 1.65 +#ifdef XP_UNIX 1.66 + 1.67 +/* 1.68 + * Version information for the 'ident' and 'what commands 1.69 + * 1.70 + * NOTE: the first component of the concatenated rcsid string 1.71 + * must not end in a '$' to prevent rcs keyword substitution. 1.72 + */ 1.73 +static char rcsid[] = "$Header: NSPR " PR_VERSION _DEBUG_STRING 1.74 + " " _BUILD_STRING " $"; 1.75 +static char sccsid[] = "@(#)NSPR " PR_VERSION _DEBUG_STRING 1.76 + " " _BUILD_STRING; 1.77 + 1.78 +#endif /* XP_UNIX */ 1.79 + 1.80 +PR_IMPLEMENT(const PRVersionDescription*) libVersionPoint(void) 1.81 +{ 1.82 +#ifdef XP_UNIX 1.83 + /* 1.84 + * Add dummy references to rcsid and sccsid to prevent them 1.85 + * from being optimized away as unused variables. 1.86 + */ 1.87 + const char *dummy; 1.88 + 1.89 + dummy = rcsid; 1.90 + dummy = sccsid; 1.91 +#endif 1.92 + return &VERSION_DESC_NAME; 1.93 +} /* versionEntryPointType */ 1.94 + 1.95 +/* prvrsion.c */ 1.96 +