Back to index

lightning-sunbird  0.9+nobinonly
plvrsion.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 #include "_pl_bld.h"
00045 #if !defined(_BUILD_TIME)
00046 #ifdef HAVE_LONG_LONG
00047 #define _BUILD_TIME 0
00048 #else
00049 #define _BUILD_TIME {0, 0}
00050 #endif
00051 #endif
00052 #if !defined(_BUILD_STRING)
00053 #define _BUILD_STRING ""
00054 #endif
00055 #if !defined(_PRODUCTION)
00056 #define _PRODUCTION ""
00057 #endif
00058 #if defined(DEBUG)
00059 #define _DEBUG_STRING " (debug)"
00060 #else
00061 #define _DEBUG_STRING ""
00062 #endif
00063 
00064 /*
00065  * A trick to expand the PR_VMAJOR macro before concatenation.
00066  */
00067 #define CONCAT(x, y) x ## y
00068 #define CONCAT2(x, y) CONCAT(x, y)
00069 #define VERSION_DESC_NAME CONCAT2(prVersionDescription_libplds, PR_VMAJOR)
00070 
00071 PRVersionDescription VERSION_DESC_NAME =
00072 {
00073     /* version          */  2,                  /* this is the only one supported */
00074     /* buildTime        */  _BUILD_TIME,        /* usecs since midnight 1/1/1970 GMT */
00075     /* buildTimeString  */  _BUILD_STRING,       /*    ditto, but human readable */
00076     /* vMajor           */  PR_VMAJOR,          /* NSPR's version number */
00077     /* vMinor           */  PR_VMINOR,          /*  and minor version */
00078     /* vPatch           */  PR_VPATCH,          /*  and patch */
00079     /* beta             */  PR_BETA,            /* beta build boolean */
00080 #if defined(DEBUG)
00081     /* debug            */  PR_TRUE,            /* a debug build */
00082 #else
00083     /* debug            */  PR_FALSE,           /* an optomized build */
00084 #endif
00085     /* special          */  PR_FALSE,           /* they're all special, but ... */
00086     /* filename         */  _PRODUCTION,        /* the produced library name */
00087     /* description      */ "Portable runtime",  /* what we are */
00088     /* security         */ "N/A",               /* not applicable here */
00089     /* copywrite        */  "Copyright (c) 1998 Netscape Communications Corporation. All Rights Reserved",
00090     /* comment          */  "http://www.mozilla.org/MPL/",
00091     /* specialString    */ ""
00092 };
00093 
00094 #ifdef XP_UNIX
00095 
00096 /*
00097  * Version information for the 'ident' and 'what commands
00098  *
00099  * NOTE: the first component of the concatenated rcsid string
00100  * must not end in a '$' to prevent rcs keyword substitution.
00101  */
00102 static char rcsid[] = "$Header: NSPR " PR_VERSION _DEBUG_STRING
00103         "  " _BUILD_STRING " $";
00104 static char sccsid[] = "@(#)NSPR " PR_VERSION _DEBUG_STRING
00105         "  " _BUILD_STRING;
00106 
00107 #endif /* XP_UNIX */
00108 
00109 PR_IMPLEMENT(const PRVersionDescription*) libVersionPoint()
00110 {
00111 #ifdef XP_UNIX
00112     /*
00113      * Add dummy references to rcsid and sccsid to prevent them
00114      * from being optimized away as unused variables.
00115      */
00116     const char *dummy;
00117     
00118     dummy = rcsid;
00119     dummy = sccsid;
00120 #endif
00121     return &VERSION_DESC_NAME;
00122 }  /* versionEntryPointType */
00123 
00124 /* plvrsion.c */
00125