os/ossrv/genericopenlibs/openenvcore/libm/src/signgam.cpp
author sl
Tue, 10 Jun 2014 14:32:02 +0200
changeset 1 260cb5ec6c19
permissions -rw-r--r--
Update contrib.
     1 // Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
     2 // All rights reserved.
     3 // This component and the accompanying materials are made available
     4 // under the terms of "Eclipse Public License v1.0"
     5 // which accompanies this distribution, and is available
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
     7 //
     8 // Initial Contributors:
     9 // Nokia Corporation - initial contribution.
    10 //
    11 // Contributors:
    12 //
    13 // Description:
    14 //
    15 
    16 
    17 
    18 #include <e32std.h>
    19 
    20 #ifdef __WINSCW__
    21 #include <pls.h> // For emulator WSD API
    22 const TUid KLibmUid3 = {0x102750d2}; 
    23 #endif //__WINSCW__
    24 
    25 #ifdef __cplusplus
    26 extern "C" 
    27 	{
    28 #endif
    29 
    30 #ifdef __WINSCW__
    31 
    32 typedef struct
    33 	{
    34 	int _signgam;	
    35 	}_libm_wsd;
    36 
    37 TInt InitWSDVar(_libm_wsd* p)
    38 	{
    39 	p->_signgam = 0;
    40 	return KErrNone;
    41 	}
    42 	
    43 _libm_wsd* GetGlobals()
    44 	{
    45 	// Access the PLS of this process
    46 	_libm_wsd* p = Pls<_libm_wsd>(KLibmUid3, &InitWSDVar);
    47 	return p;
    48 	}
    49 	
    50 #endif //__WINSCW__
    51 
    52 EXPORT_C int* __signgam()
    53 	{
    54 #ifdef __WINSCW__
    55 	return &(GetGlobals()->_signgam);
    56 #else
    57 	extern int _signgam;
    58 	return &_signgam;
    59 #endif //__WINSCW__
    60 	}
    61 	
    62 #ifdef __cplusplus
    63 }
    64 #endif