xref: /aoo42x/main/solenv/src/version.c (revision 0495d53e)
1*c72004d7SAndrew Rist /**************************************************************
2cdf0e10cSrcweir  *
3*c72004d7SAndrew Rist  * Licensed to the Apache Software Foundation (ASF) under one
4*c72004d7SAndrew Rist  * or more contributor license agreements.  See the NOTICE file
5*c72004d7SAndrew Rist  * distributed with this work for additional information
6*c72004d7SAndrew Rist  * regarding copyright ownership.  The ASF licenses this file
7*c72004d7SAndrew Rist  * to you under the Apache License, Version 2.0 (the
8*c72004d7SAndrew Rist  * "License"); you may not use this file except in compliance
9*c72004d7SAndrew Rist  * with the License.  You may obtain a copy of the License at
10*c72004d7SAndrew Rist  *
11*c72004d7SAndrew Rist  *   http://www.apache.org/licenses/LICENSE-2.0
12*c72004d7SAndrew Rist  *
13*c72004d7SAndrew Rist  * Unless required by applicable law or agreed to in writing,
14*c72004d7SAndrew Rist  * software distributed under the License is distributed on an
15*c72004d7SAndrew Rist  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*c72004d7SAndrew Rist  * KIND, either express or implied.  See the License for the
17*c72004d7SAndrew Rist  * specific language governing permissions and limitations
18*c72004d7SAndrew Rist  * under the License.
19*c72004d7SAndrew Rist  *
20*c72004d7SAndrew Rist  *************************************************************/
21*c72004d7SAndrew Rist 
22*c72004d7SAndrew Rist 
23cdf0e10cSrcweir 
24cdf0e10cSrcweir 
25cdf0e10cSrcweir 
26cdf0e10cSrcweir #include <_version.h>
27cdf0e10cSrcweir 
28cdf0e10cSrcweir 
29cdf0e10cSrcweir struct VersionInfo
30cdf0e10cSrcweir {
31cdf0e10cSrcweir 	const char*	pUpd;
32cdf0e10cSrcweir 	const char*	pMinor;
33cdf0e10cSrcweir 	const char*	pBuild;
34cdf0e10cSrcweir };
35cdf0e10cSrcweir 
36cdf0e10cSrcweir static const struct VersionInfo g_aVersionInfo =
37cdf0e10cSrcweir {
38cdf0e10cSrcweir 	_UPD,
39cdf0e10cSrcweir 	_LAST_MINOR,
40cdf0e10cSrcweir 	_BUILD,
41cdf0e10cSrcweir };
42cdf0e10cSrcweir 
43cdf0e10cSrcweir #if defined(WNT) || defined(OS2)
44cdf0e10cSrcweir __declspec(dllexport) const struct VersionInfo* GetVersionInfo(void);
45cdf0e10cSrcweir #endif
46cdf0e10cSrcweir 
47cdf0e10cSrcweir #if defined(WNT) || defined(OS2)
GetVersionInfo(void)48cdf0e10cSrcweir __declspec(dllexport) const struct VersionInfo* GetVersionInfo(void)
49cdf0e10cSrcweir #else
50cdf0e10cSrcweir const struct VersionInfo *GetVersionInfo(void)
51cdf0e10cSrcweir #endif
52cdf0e10cSrcweir {
53cdf0e10cSrcweir 	return &g_aVersionInfo;
54cdf0e10cSrcweir }
55cdf0e10cSrcweir 
56cdf0e10cSrcweir #if 0
57cdf0e10cSrcweir #include <stdio.h>
58cdf0e10cSrcweir 
59cdf0e10cSrcweir int main( int argc, char **argv )
60cdf0e10cSrcweir {
61cdf0e10cSrcweir 	const VersionInfo *pInfo = GetVersionInfo();
62cdf0e10cSrcweir 	fprintf( stderr, "UPD : %s\n", pInfo->pUpd);
63cdf0e10cSrcweir 	delete pInfo;
64cdf0e10cSrcweir 	return 0;
65cdf0e10cSrcweir }
66cdf0e10cSrcweir #endif
67cdf0e10cSrcweir 
68