Back to index

lightning-sunbird  0.9+nobinonly
prvrsion.c
Go to the documentation of this file.
00001 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
00002 /* ***** BEGIN LICENSE BLOCK *****
00003  * Version: MPL 1.1/GPL 2.0/LGPL 2.1
00004  *
00005  * The contents of this file are subject to the Mozilla Public License Version
00006  * 1.1 (the "License"); you may not use this file except in compliance with
00007  * the License. You may obtain a copy of the License at
00008  * http://www.mozilla.org/MPL/
00009  *
00010  * Software distributed under the License is distributed on an "AS IS" basis,
00011  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
00012  * for the specific language governing rights and limitations under the
00013  * License.
00014  *
00015  * The Original Code is the Netscape Portable Runtime (NSPR).
00016  *
00017  * The Initial Developer of the Original Code is
00018  * Netscape Communications Corporation.
00019  * Portions created by the Initial Developer are Copyright (C) 1998-2000
00020  * the Initial Developer. All Rights Reserved.
00021  *
00022  * Contributor(s):
00023  *
00024  * Alternatively, the contents of this file may be used under the terms of
00025  * either the GNU General Public License Version 2 or later (the "GPL"), or
00026  * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
00027  * in which case the provisions of the GPL or the LGPL are applicable instead
00028  * of those above. If you wish to allow use of your version of this file only
00029  * under the terms of either the GPL or the LGPL, and not to allow others to
00030  * use your version of this file under the terms of the MPL, indicate your
00031  * decision by deleting the provisions above and replace them with the notice
00032  * and other provisions required by the GPL or the LGPL. If you do not delete
00033  * the provisions above, a recipient may use your version of this file under
00034  * the terms of any one of the MPL, the GPL or the LGPL.
00035  *
00036  * ***** END LICENSE BLOCK ***** */
00037 
00038 #include "prinit.h"
00039 #include "prvrsion.h"
00040 
00041 /************************************************************************/
00042 /**************************IDENTITY AND VERSIONING***********************/
00043 /************************************************************************/
00044 #ifndef XP_MAC
00045 #include "_pr_bld.h"
00046 #endif
00047 #if !defined(_BUILD_TIME)
00048 #ifdef HAVE_LONG_LONG
00049 #define _BUILD_TIME 0
00050 #else
00051 #define _BUILD_TIME {0, 0}
00052 #endif
00053 #endif
00054 #if !defined(_BUILD_STRING)
00055 #define _BUILD_STRING ""
00056 #endif
00057 #if !defined(_PRODUCTION)
00058 #define _PRODUCTION ""
00059 #endif
00060 #if defined(DEBUG)
00061 #define _DEBUG_STRING " (debug)"
00062 #else
00063 #define _DEBUG_STRING ""
00064 #endif
00065 
00066 /*
00067  * A trick to expand the PR_VMAJOR macro before concatenation.
00068  */
00069 #define CONCAT(x, y) x ## y
00070 #define CONCAT2(x, y) CONCAT(x, y)
00071 #define VERSION_DESC_NAME CONCAT2(prVersionDescription_libnspr, PR_VMAJOR)
00072 
00073 PRVersionDescription VERSION_DESC_NAME =
00074 {
00075     /* version          */  2,                  /* this is the only one supported */
00076     /* buildTime        */  _BUILD_TIME,        /* usecs since midnight 1/1/1970 GMT */
00077     /* buildTimeString  */  _BUILD_STRING,       /*    ditto, but human readable */
00078     /* vMajor           */  PR_VMAJOR,          /* NSPR's version number */
00079     /* vMinor           */  PR_VMINOR,          /*  and minor version */
00080     /* vPatch           */  PR_VPATCH,          /*  and patch */
00081     /* beta             */  PR_BETA,            /* beta build boolean */
00082 #if defined(DEBUG)
00083     /* debug            */  PR_TRUE,            /* a debug build */
00084 #else
00085     /* debug            */  PR_FALSE,           /* an optomized build */
00086 #endif
00087     /* special          */  PR_FALSE,           /* they're all special, but ... */
00088     /* filename         */  _PRODUCTION,        /* the produced library name */
00089     /* description      */ "Portable runtime",  /* what we are */
00090     /* security         */ "N/A",               /* not applicable here */
00091     /* copywrite        */  "Copyright (c) 1998 Netscape Communications Corporation. All Rights Reserved",
00092     /* comment          */  "License information: http://www.mozilla.org/MPL/",
00093     /* specialString    */ ""
00094 };
00095 
00096 #ifdef XP_UNIX
00097 
00098 /*
00099  * Version information for the 'ident' and 'what commands
00100  *
00101  * NOTE: the first component of the concatenated rcsid string
00102  * must not end in a '$' to prevent rcs keyword substitution.
00103  */
00104 static char rcsid[] = "$Header: NSPR " PR_VERSION _DEBUG_STRING
00105         "  " _BUILD_STRING " $";
00106 static char sccsid[] = "@(#)NSPR " PR_VERSION _DEBUG_STRING
00107         "  " _BUILD_STRING;
00108 
00109 #endif /* XP_UNIX */
00110 
00111 PR_IMPLEMENT(const PRVersionDescription*) libVersionPoint(void)
00112 {
00113 #ifdef XP_UNIX
00114     /*
00115      * Add dummy references to rcsid and sccsid to prevent them
00116      * from being optimized away as unused variables.
00117      */ 
00118     const char *dummy;
00119 
00120     dummy = rcsid;
00121     dummy = sccsid;
00122 #endif
00123     return &VERSION_DESC_NAME;
00124 }  /* versionEntryPointType */
00125 
00126 /* prvrsion.c */
00127