1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/os/ossrv/genericopenlibs/openenvcore/libm/src/signgam.cpp Fri Jun 15 03:10:57 2012 +0200
1.3 @@ -0,0 +1,64 @@
1.4 +// Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
1.5 +// All rights reserved.
1.6 +// This component and the accompanying materials are made available
1.7 +// under the terms of "Eclipse Public License v1.0"
1.8 +// which accompanies this distribution, and is available
1.9 +// at the URL "http://www.eclipse.org/legal/epl-v10.html".
1.10 +//
1.11 +// Initial Contributors:
1.12 +// Nokia Corporation - initial contribution.
1.13 +//
1.14 +// Contributors:
1.15 +//
1.16 +// Description:
1.17 +//
1.18 +
1.19 +
1.20 +
1.21 +#include <e32std.h>
1.22 +
1.23 +#ifdef __WINSCW__
1.24 +#include <pls.h> // For emulator WSD API
1.25 +const TUid KLibmUid3 = {0x102750d2};
1.26 +#endif //__WINSCW__
1.27 +
1.28 +#ifdef __cplusplus
1.29 +extern "C"
1.30 + {
1.31 +#endif
1.32 +
1.33 +#ifdef __WINSCW__
1.34 +
1.35 +typedef struct
1.36 + {
1.37 + int _signgam;
1.38 + }_libm_wsd;
1.39 +
1.40 +TInt InitWSDVar(_libm_wsd* p)
1.41 + {
1.42 + p->_signgam = 0;
1.43 + return KErrNone;
1.44 + }
1.45 +
1.46 +_libm_wsd* GetGlobals()
1.47 + {
1.48 + // Access the PLS of this process
1.49 + _libm_wsd* p = Pls<_libm_wsd>(KLibmUid3, &InitWSDVar);
1.50 + return p;
1.51 + }
1.52 +
1.53 +#endif //__WINSCW__
1.54 +
1.55 +EXPORT_C int* __signgam()
1.56 + {
1.57 +#ifdef __WINSCW__
1.58 + return &(GetGlobals()->_signgam);
1.59 +#else
1.60 + extern int _signgam;
1.61 + return &_signgam;
1.62 +#endif //__WINSCW__
1.63 + }
1.64 +
1.65 +#ifdef __cplusplus
1.66 +}
1.67 +#endif