2 * Helper functions for ntdll
4 * Copyright 2000 Juergen Schmied
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
26 #include "wine/library.h"
27 #include "wine/debug.h"
28 #include "ntdll_misc.h"
30 WINE_DEFAULT_DEBUG_CHANNEL(ntdll
);
32 #if defined(__GNUC__) && defined(__i386__)
33 #define DO_FPU(x,y) __asm__ __volatile__( x " %0;fwait" : "=m" (y) : )
34 #define POP_FPU(x) DO_FPU("fstpl",x)
37 void dump_ObjectAttributes (const OBJECT_ATTRIBUTES
*oa
)
40 TRACE("%p:(name=%s, attr=0x%08x, hRoot=%p, sd=%p)\n",
41 oa
, debugstr_us(oa
->ObjectName
),
42 oa
->Attributes
, oa
->RootDirectory
, oa
->SecurityDescriptor
);
45 LPCSTR
debugstr_us( const UNICODE_STRING
*us
)
47 if (!us
) return "<null>";
48 return debugstr_wn(us
->Buffer
, us
->Length
/ sizeof(WCHAR
));
51 /*********************************************************************
57 #if defined(__GNUC__) && defined(__i386__)
58 LONGLONG CDECL
NTDLL__ftol(void)
60 /* don't just do DO_FPU("fistp",retval), because the rounding
61 * mode must also be set to "round towards zero"... */
66 #endif /* defined(__GNUC__) && defined(__i386__) */
68 /*********************************************************************
72 * Should be register function
76 #if !defined(__GNUC__) && defined(__i386__)
77 LONGLONG CDECL
NTDLL__ftol(double fl
)
79 FIXME("should be register function\n");
82 #endif /* !defined(__GNUC__) && defined(__i386__) */
84 /*********************************************************************
90 LONG CDECL
NTDLL__ftol(double fl
)
94 #endif /* !defined(__i386__) */
96 /*********************************************************************
101 #if defined(__GNUC__) && defined(__i386__)
102 double CDECL
NTDLL__CIpow(void)
109 #endif /* defined(__GNUC__) && defined(__i386__) */
112 /*********************************************************************
116 * Should be register function
121 #if !defined(__GNUC__) && defined(__i386__)
122 double CDECL
NTDLL__CIpow(double x
,double y
)
124 FIXME("should be register function\n");
127 #endif /* !defined(__GNUC__) && defined(__i386__) */
129 /*********************************************************************
135 double CDECL
NTDLL__CIpow(double x
,double y
)
139 #endif /* !defined(__i386__) */
142 /*********************************************************************
143 * wine_get_version (NTDLL.@)
145 const char * CDECL
NTDLL_wine_get_version(void)
147 return wine_get_version();
150 /*********************************************************************
151 * wine_get_build_id (NTDLL.@)
153 const char * CDECL
NTDLL_wine_get_build_id(void)
155 return wine_get_build_id();
158 /*********************************************************************
161 int CDECL
NTDLL_abs( int i
)
166 /*********************************************************************
169 LONG CDECL
NTDLL_labs( LONG i
)
174 /*********************************************************************
177 double CDECL
NTDLL_atan( double d
)
182 /*********************************************************************
185 double CDECL
NTDLL_ceil( double d
)
190 /*********************************************************************
193 double CDECL
NTDLL_cos( double d
)
198 /*********************************************************************
201 double CDECL
NTDLL_fabs( double d
)
206 /*********************************************************************
209 double CDECL
NTDLL_floor( double d
)
214 /*********************************************************************
217 double CDECL
NTDLL_log( double d
)
222 /*********************************************************************
225 double CDECL
NTDLL_pow( double x
, double y
)
230 /*********************************************************************
233 double CDECL
NTDLL_sin( double d
)
238 /*********************************************************************
241 double CDECL
NTDLL_sqrt( double d
)
246 /*********************************************************************
249 double CDECL
NTDLL_tan( double d
)