michael@0: /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: #include "prinit.h" michael@0: #include "prvrsion.h" michael@0: michael@0: /************************************************************************/ michael@0: /**************************IDENTITY AND VERSIONING***********************/ michael@0: /************************************************************************/ michael@0: #include "_pr_bld.h" michael@0: #if !defined(_BUILD_TIME) michael@0: #ifdef HAVE_LONG_LONG michael@0: #define _BUILD_TIME 0 michael@0: #else michael@0: #define _BUILD_TIME {0, 0} michael@0: #endif michael@0: #endif michael@0: #if !defined(_BUILD_STRING) michael@0: #define _BUILD_STRING "" michael@0: #endif michael@0: #if !defined(_PRODUCTION) michael@0: #define _PRODUCTION "" michael@0: #endif michael@0: #if defined(DEBUG) michael@0: #define _DEBUG_STRING " (debug)" michael@0: #else michael@0: #define _DEBUG_STRING "" michael@0: #endif michael@0: michael@0: /* michael@0: * A trick to expand the PR_VMAJOR macro before concatenation. michael@0: */ michael@0: #define CONCAT(x, y) x ## y michael@0: #define CONCAT2(x, y) CONCAT(x, y) michael@0: #define VERSION_DESC_NAME CONCAT2(prVersionDescription_libnspr, PR_VMAJOR) michael@0: michael@0: PRVersionDescription VERSION_DESC_NAME = michael@0: { michael@0: /* version */ 2, /* this is the only one supported */ michael@0: /* buildTime */ _BUILD_TIME, /* usecs since midnight 1/1/1970 GMT */ michael@0: /* buildTimeString */ _BUILD_STRING, /* ditto, but human readable */ michael@0: /* vMajor */ PR_VMAJOR, /* NSPR's version number */ michael@0: /* vMinor */ PR_VMINOR, /* and minor version */ michael@0: /* vPatch */ PR_VPATCH, /* and patch */ michael@0: /* beta */ PR_BETA, /* beta build boolean */ michael@0: #if defined(DEBUG) michael@0: /* debug */ PR_TRUE, /* a debug build */ michael@0: #else michael@0: /* debug */ PR_FALSE, /* an optomized build */ michael@0: #endif michael@0: /* special */ PR_FALSE, /* they're all special, but ... */ michael@0: /* filename */ _PRODUCTION, /* the produced library name */ michael@0: /* description */ "Portable runtime", /* what we are */ michael@0: /* security */ "N/A", /* not applicable here */ michael@0: /* copywrite */ "Copyright (c) 1998 Netscape Communications Corporation. All Rights Reserved", michael@0: /* comment */ "License information: http://www.mozilla.org/MPL/", michael@0: /* specialString */ "" michael@0: }; michael@0: michael@0: #ifdef XP_UNIX michael@0: michael@0: /* michael@0: * Version information for the 'ident' and 'what commands michael@0: * michael@0: * NOTE: the first component of the concatenated rcsid string michael@0: * must not end in a '$' to prevent rcs keyword substitution. michael@0: */ michael@0: static char rcsid[] = "$Header: NSPR " PR_VERSION _DEBUG_STRING michael@0: " " _BUILD_STRING " $"; michael@0: static char sccsid[] = "@(#)NSPR " PR_VERSION _DEBUG_STRING michael@0: " " _BUILD_STRING; michael@0: michael@0: #endif /* XP_UNIX */ michael@0: michael@0: PR_IMPLEMENT(const PRVersionDescription*) libVersionPoint(void) michael@0: { michael@0: #ifdef XP_UNIX michael@0: /* michael@0: * Add dummy references to rcsid and sccsid to prevent them michael@0: * from being optimized away as unused variables. michael@0: */ michael@0: const char *dummy; michael@0: michael@0: dummy = rcsid; michael@0: dummy = sccsid; michael@0: #endif michael@0: return &VERSION_DESC_NAME; michael@0: } /* versionEntryPointType */ michael@0: michael@0: /* prvrsion.c */ michael@0: