Sprinkle cdecl declarations liberally all around to make a bunch of the base componen...
authorStefan Ginsberg <stefanginsberg@gmail.com>
Tue, 15 Sep 2015 10:35:49 +0000 (10:35 +0000)
committerStefan Ginsberg <stefanginsberg@gmail.com>
Tue, 15 Sep 2015 10:35:49 +0000 (10:35 +0000)
svn path=/trunk/; revision=69238

60 files changed:
reactos/boot/freeldr/freeldr/freeldr.c
reactos/hal/halx86/apic/apic.c
reactos/hal/halx86/apic/apic.h
reactos/hal/halx86/apic/tsc.h
reactos/hal/halx86/generic/bios.c
reactos/hal/halx86/include/halp.h
reactos/hal/halx86/up/pic.c
reactos/include/crt/msc/intrin.h
reactos/include/crt/wchar.h
reactos/include/ndk/kefuncs.h
reactos/lib/3rdparty/libwine/debug_ros.c
reactos/lib/sdk/crt/float/isnan.c
reactos/lib/sdk/crt/math/abs.c
reactos/lib/sdk/crt/math/div.c
reactos/lib/sdk/crt/math/rand_nt.c
reactos/lib/sdk/crt/mbstring/mbstrlen.c
reactos/lib/sdk/crt/mem/memccpy.c
reactos/lib/sdk/crt/mem/memchr.c
reactos/lib/sdk/crt/mem/memcmp.c
reactos/lib/sdk/crt/mem/memcpy.c
reactos/lib/sdk/crt/mem/memicmp.c
reactos/lib/sdk/crt/mem/memmove.c
reactos/lib/sdk/crt/mem/memset.c
reactos/lib/sdk/crt/precomp.h
reactos/lib/sdk/crt/printf/_vscwprintf.c
reactos/lib/sdk/crt/search/bsearch.c
reactos/lib/sdk/crt/search/lfind.c
reactos/lib/sdk/crt/search/lsearch.c
reactos/lib/sdk/crt/stdlib/qsort.c
reactos/lib/sdk/crt/string/atoi.c
reactos/lib/sdk/crt/string/atoi64.c
reactos/lib/sdk/crt/string/atol.c
reactos/lib/sdk/crt/string/ctype.c
reactos/lib/sdk/crt/string/iswctype.c
reactos/lib/sdk/crt/string/itoa.c
reactos/lib/sdk/crt/string/itow.c
reactos/lib/sdk/crt/string/stricmp.c
reactos/lib/sdk/crt/string/strlwr.c
reactos/lib/sdk/crt/string/strnicmp.c
reactos/lib/sdk/crt/string/strpbrk.c
reactos/lib/sdk/crt/string/strrev.c
reactos/lib/sdk/crt/string/strstr.c
reactos/lib/sdk/crt/string/strtol.c
reactos/lib/sdk/crt/string/strtoull.c
reactos/lib/sdk/crt/string/strupr.c
reactos/lib/sdk/crt/string/strxspn.h
reactos/lib/sdk/crt/string/wcstol.c
reactos/lib/sdk/crt/string/wcstoul.c
reactos/lib/sdk/crt/string/wtoi64.c
reactos/lib/sdk/crt/wstring/wcscoll.c
reactos/lib/sdk/crt/wstring/wcscspn.c
reactos/lib/sdk/crt/wstring/wcsicmp.c
reactos/lib/sdk/crt/wstring/wcslwr.c
reactos/lib/sdk/crt/wstring/wcsnicmp.c
reactos/lib/sdk/crt/wstring/wcsspn.c
reactos/lib/sdk/crt/wstring/wcsstr.c
reactos/lib/sdk/crt/wstring/wcsupr.c
reactos/lib/sdk/crt/wstring/wcsxfrm.c
reactos/ntoskrnl/ke/i386/irqobj.c
reactos/ntoskrnl/ke/i386/traphdlr.c

index ea527e8..f1ad520 100644 (file)
@@ -80,7 +80,7 @@ int __cdecl mbtowc(wchar_t *wchar, const char *mbchar, size_t count)
 }
 
 // The wctype table is 144 KB, too much for poor freeldr
-int iswctype(wint_t wc, wctype_t wctypeFlags)
+int __cdecl iswctype(wint_t wc, wctype_t wctypeFlags)
 {
     return _isctype((char)wc, wctypeFlags);
 }
index 1e98060..9868434 100644 (file)
@@ -16,7 +16,7 @@
 #include <debug.h>
 
 #include "apic.h"
-void HackEoi(void);
+void __cdecl HackEoi(void);
 
 #ifndef _M_AMD64
 #define APIC_LAZY_IRQL
index 68c0ca6..3c5f423 100644 (file)
@@ -276,5 +276,5 @@ VOID
 NTAPI
 ApicInitializeTimer(ULONG Cpu);
 
-VOID ApicSpuriousService(VOID);
+VOID __cdecl ApicSpuriousService(VOID);
 
index 19b6283..02bf7b5 100644 (file)
@@ -5,7 +5,7 @@
 
 #ifndef __ASM__
 
-void TscCalibrationISR(void);
+void __cdecl TscCalibrationISR(void);
 extern LARGE_INTEGER HalpCpuClockFrequency;
 VOID NTAPI HalpInitializeTsc();
 
index 013f417..b455fef 100644 (file)
@@ -14,7 +14,7 @@
 #include <debug.h>
 #include <setjmp.h>
 
-void HalpTrap0D();
+void __cdecl HalpTrap0D();
 
 /* GLOBALS ********************************************************************/
 
index 3f41f78..1b0ae98 100644 (file)
@@ -42,7 +42,7 @@ typedef struct _HAL_BIOS_FRAME
 
 typedef
 VOID
-(*PHAL_SW_INTERRUPT_HANDLER)(
+(__cdecl *PHAL_SW_INTERRUPT_HANDLER)(
     VOID
 );
 
@@ -501,6 +501,7 @@ HalpDismissIrq07Level(
 );
 
 VOID
+__cdecl
 HalpHardwareInterruptLevel(
     VOID
 );
@@ -575,9 +576,9 @@ HalpEnableInterruptHandler(IN UCHAR Flags,
 
 /* pic.c */
 VOID NTAPI HalpInitializePICs(IN BOOLEAN EnableInterrupts);
-VOID HalpApcInterrupt(VOID);
-VOID HalpDispatchInterrupt(VOID);
-VOID HalpDispatchInterrupt2(VOID);
+VOID __cdecl HalpApcInterrupt(VOID);
+VOID __cdecl HalpDispatchInterrupt(VOID);
+VOID __cdecl HalpDispatchInterrupt2(VOID);
 DECLSPEC_NORETURN VOID FASTCALL HalpApcInterrupt2ndEntry(IN PKTRAP_FRAME TrapFrame);
 DECLSPEC_NORETURN VOID FASTCALL HalpDispatchInterrupt2ndEntry(IN PKTRAP_FRAME TrapFrame);
 
@@ -586,8 +587,8 @@ extern BOOLEAN HalpProfilingStopped;
 
 /* timer.c */
 VOID NTAPI HalpInitializeClock(VOID);
-VOID HalpClockInterrupt(VOID);
-VOID HalpProfileInterrupt(VOID);
+VOID __cdecl HalpClockInterrupt(VOID);
+VOID __cdecl HalpProfileInterrupt(VOID);
 
 VOID
 NTAPI
@@ -695,7 +696,7 @@ HalpExitToV86(
 );
 
 VOID
-DECLSPEC_NORETURN
+__cdecl
 HalpRealModeStart(
     VOID
 );
index 93a811e..acb3e64 100644 (file)
@@ -330,8 +330,9 @@ KIRQL SWInterruptLookUpTable[8] =
 #if defined(__GNUC__)
 
 #define HalpDelayedHardwareInterrupt(x)                             \
-    VOID HalpHardwareInterrupt##x(VOID);                            \
+    VOID __cdecl HalpHardwareInterrupt##x(VOID);                    \
     VOID                                                            \
+    __cdecl                                                         \
     HalpHardwareInterrupt##x(VOID)                                  \
     {                                                               \
         asm volatile ("int $%c0\n"::"i"(PRIMARY_VECTOR_BASE + x));  \
@@ -340,8 +341,9 @@ KIRQL SWInterruptLookUpTable[8] =
 #elif defined(_MSC_VER)
 
 #define HalpDelayedHardwareInterrupt(x)                             \
-    VOID HalpHardwareInterrupt##x(VOID);                            \
+    VOID __cdecl HalpHardwareInterrupt##x(VOID);                    \
     VOID                                                            \
+    __cdecl                                                         \
     HalpHardwareInterrupt##x(VOID)                                  \
     {                                                               \
         __asm                                                       \
@@ -375,10 +377,10 @@ HalpDelayedHardwareInterrupt(15);
 /* Handlers for pending interrupts */
 PHAL_SW_INTERRUPT_HANDLER SWInterruptHandlerTable[20] =
 {
-    KiUnexpectedInterrupt,
+    (PHAL_SW_INTERRUPT_HANDLER)KiUnexpectedInterrupt,
     HalpApcInterrupt,
     HalpDispatchInterrupt2,
-    KiUnexpectedInterrupt,
+    (PHAL_SW_INTERRUPT_HANDLER)KiUnexpectedInterrupt,
     HalpHardwareInterrupt0,
     HalpHardwareInterrupt1,
     HalpHardwareInterrupt2,
@@ -1067,6 +1069,7 @@ HalpDismissIrq07Level(IN KIRQL Irql,
 }
 
 VOID
+__cdecl
 HalpHardwareInterruptLevel(VOID)
 {
     PKPCR Pcr = KeGetPcr();
@@ -1347,6 +1350,7 @@ HalpDispatchInterrupt2ndEntry(IN PKTRAP_FRAME TrapFrame)
 }
 
 VOID
+__cdecl
 HalpDispatchInterrupt2(VOID)
 {
     ULONG PendingIrqlMask, PendingIrql;
index f8a83d7..9a0eb93 100644 (file)
@@ -299,7 +299,7 @@ void __fastfail(unsigned int Code)
 #pragma intrinsic(__readcr3)
 //#pragma intrinsic(__readcr4)
 // HACK: MSVC is broken
-unsigned long  ___readcr4(void);
+unsigned long __cdecl  ___readcr4(void);
 #define __readcr4 ___readcr4
 #pragma intrinsic(__readcr8)
 #pragma intrinsic(__readdr)
index b00276c..238bd81 100644 (file)
@@ -2450,6 +2450,7 @@ __CRT_INLINE wchar_t *__cdecl _wctime(const time_t *_Time) { return _wctime64(_T
     _In_ size_t _N);
 
   int
+  __cdecl
   wmemcmp(
     _In_reads_(_N) const wchar_t *_S1,
     _In_reads_(_N) const wchar_t *_S2,
index bf8463e..f0b1c27 100644 (file)
@@ -188,7 +188,9 @@ KiCoprocessorError(
     VOID
 );
 
+DECLSPEC_NORETURN
 VOID
+__cdecl
 KiUnexpectedInterrupt(
     VOID
 );
index fd1e677..46097b8 100644 (file)
@@ -9,24 +9,24 @@
 #include "debug.c"
 
 __MINGW_ATTRIB_MALLOC
-void *malloc(size_t size)
+void * __cdecl malloc(size_t size)
 {
     return LocalAlloc(0, size);
 }
 
-void free(void *ptr)
+void __cdecl free(void *ptr)
 {
     LocalFree(ptr);
 }
 
-void *realloc(void *ptr, size_t size)
+void * __cdecl realloc(void *ptr, size_t size)
 {
     if (ptr == NULL) return malloc(size);
     return LocalReAlloc(ptr, size, LMEM_MOVEABLE);
 }
 
 __MINGW_ATTRIB_MALLOC
-char *_strdup(const char *str)
+char * __cdecl _strdup(const char *str)
 {
     char *newstr = malloc(strlen(str) + 1);
     if (newstr) strcpy(newstr, str);
index 476aa3b..9eb904f 100644 (file)
@@ -26,7 +26,7 @@
 /*
  * @implemented
  */
-int _isnan(double __x)
+int CDECL _isnan(double __x)
 {
        union
        {
@@ -40,7 +40,7 @@ int _isnan(double __x)
 /*
  * @implemented
  */
-int _finite(double __x)
+int CDECL _finite(double __x)
 {
        union
        {
index 7563c36..02e0352 100644 (file)
@@ -9,6 +9,7 @@
  * @implemented
  */
 int
+__cdecl
 abs(int j)
 {
   return j<0 ? -j : j;
index 70210d5..041a80e 100644 (file)
@@ -5,6 +5,7 @@
  * @implemented
  */
 div_t
+CDECL
 div(int num, int denom)
 {
   div_t r;
index e20c4e4..5d7fa28 100644 (file)
@@ -9,7 +9,7 @@ static unsigned __int64 next = 0;
 /*
  * @implemented
  */
-int rand(void)
+int __cdecl rand(void)
 {
 #if defined(__GNUC__)
        next = next * 0x5deece66dLL + 11;
@@ -23,7 +23,7 @@ int rand(void)
 /*
  * @implemented
  */
-void srand(unsigned seed)
+void __cdecl srand(unsigned seed)
 {
        next = seed;
 }
index 6a41dcf..ace65ed 100644 (file)
@@ -22,7 +22,7 @@ int isleadbyte(int byte);
 /*
  * @implemented
  */
-size_t _mbstrlen( const char *str )
+size_t __cdecl _mbstrlen( const char *str )
 {
   size_t len = 0;
   while(*str)
index f819b39..ecd5b5c 100644 (file)
@@ -3,6 +3,7 @@
 
 
 void *
+__cdecl
 _memccpy (void *to, const void *from,int c,size_t count)
 {
     char t;
index 58409e2..9d0a138 100644 (file)
@@ -5,7 +5,7 @@
 #pragma function(memchr)
 #endif /* _MSC_VER */
 
-void* memchr(const void *s, int c, size_t n)
+void* __cdecl memchr(const void *s, int c, size_t n)
 {
     if (n)
     {
index 4b3a835..29dcd84 100644 (file)
@@ -6,7 +6,7 @@
 #pragma function(memcmp)
 #endif
 
-int memcmp(const void *s1, const void *s2, size_t n)
+int __cdecl memcmp(const void *s1, const void *s2, size_t n)
 {
     if (n != 0) {
         const unsigned char *p1 = s1, *p2 = s2;
index 06ac2d6..53857f7 100644 (file)
@@ -5,7 +5,7 @@
 #endif /* _MSC_VER */
 
 /* NOTE: This code is a duplicate of memmove implementation! */
-void* memcpy(void* dest, const void* src, size_t count)
+void* __cdecl memcpy(void* dest, const void* src, size_t count)
 {
     char *char_dest = (char *)dest;
     char *char_src = (char *)src;
index 100a162..b98608b 100644 (file)
@@ -5,6 +5,7 @@
  * @implemented
  */
 int
+CDECL
 _memicmp(const void *s1, const void *s2, size_t n)
 {
   if (n != 0)
index 2a5f828..d9536db 100644 (file)
@@ -1,7 +1,7 @@
 #include <string.h>
 
 /* NOTE: This code is duplicated in memcpy function */
-void * memmove(void *dest,const void *src,size_t count)
+void * __cdecl memmove(void *dest,const void *src,size_t count)
 {
     char *char_dest = (char *)dest;
     char *char_src = (char *)src;
index b55af71..0013ef0 100644 (file)
@@ -5,7 +5,7 @@
 #pragma function(memset)
 #endif /* _MSC_VER */
 
-void* memset(void* src, int val, size_t count)
+void* __cdecl memset(void* src, int val, size_t count)
 {
     char *char_src = (char *)src;
 
index e97944f..95e29d6 100644 (file)
 #include <winuser.h>
 #include <ndk/rtlfuncs.h>
 
+// Our headers are pretty messed up
+#undef CDECL
+#if defined(_M_IX86)
+#define CDECL __cdecl
+#else
+#define CDECL
+#endif
+
 #if !defined(_MSC_VER)
   #include <stdint.h>
 #endif
index 06d12dc..a031611 100644 (file)
@@ -15,6 +15,7 @@
 int __cdecl wstreamout(FILE *stream, const wchar_t *format, va_list argptr);
 
 int
+__cdecl
 _vscwprintf(
    const wchar_t *format,
    va_list argptr)
index f160a9e..3c1b980 100644 (file)
@@ -5,6 +5,7 @@
  * @implemented
  */
 void *
+__cdecl
 bsearch(const void *key, const void *base0, size_t nelem,
        size_t size, int (__cdecl *cmp)(const void *ck, const void *ce))
 {
index bd2dcd7..5778a4a 100644 (file)
@@ -4,7 +4,7 @@
 /*
  * @implemented
  */
-void *_lfind(const void *key, const void *base, unsigned int *nelp,
+void * __cdecl _lfind(const void *key, const void *base, unsigned int *nelp,
          unsigned int width, int (__cdecl *compar)(const void *, const void *))
 {
        char* char_base = (char*)base;
index fa46e91..99f1381 100644 (file)
@@ -5,7 +5,7 @@
 /*
  * @implemented
  */
-void *_lsearch(const void *key, void *base, unsigned int *nelp, unsigned int width,
+void * __cdecl _lsearch(const void *key, void *base, unsigned int *nelp, unsigned int width,
          int (__cdecl *compar)(const void *, const void *))
 {
   void *ret_find = _lfind(key,base,nelp,width,compar);
index 94bcd02..80d8640 100644 (file)
@@ -49,7 +49,7 @@
  * (And there are only three places where this is done).
  */
 
-static void
+static void __cdecl
 qst(size_t size, int (__cdecl *compar)(const void*, const void*), char *base, char *max)
 {
   char c, *i, *j, *jj;
@@ -176,6 +176,7 @@ qst(size_t size, int (__cdecl *compar)(const void*, const void*), char *base, ch
  * @implemented
  */
 void
+__cdecl
 qsort(void *base0, size_t n, size_t size, int (__cdecl *compar)(const void*, const void*))
 {
   char *base = (char *)base0;
index 2fc1364..215a006 100644 (file)
@@ -6,6 +6,7 @@
  * @implemented
  */
 int
+CDECL
 _ttoi(const _TCHAR *str)
 {
   return (int)_ttoi64(str);
index c820dba..48e4f94 100644 (file)
@@ -14,6 +14,7 @@
  * @implemented
  */
 __int64
+CDECL
 _atoi64(const char *nptr)
 {
   char *s = (char *)nptr;
index 1c8ff7f..e5e64c3 100644 (file)
@@ -4,7 +4,7 @@
 /*
  * @implemented
  */
-long atol(const char *str)
+long CDECL atol(const char *str)
 {
     return (long)_atoi64(str);
 }
@@ -12,7 +12,7 @@ long atol(const char *str)
 /*
  * @unimplemented
  */
-int _atoldbl(_LDOUBLE *value, char *str)
+int CDECL _atoldbl(_LDOUBLE *value, char *str)
 {
   /* FIXME needs error checking for huge/small values */
 #if 0
index bf5d1cd..580f612 100644 (file)
@@ -628,7 +628,7 @@ int __cdecl _isleadbyte_l(int c, _locale_t locale)
 /*
  * @implemented
  */
-int isalpha(int c)
+int __cdecl isalpha(int c)
 {
    return(_isctype(c, _ALPHA));
 }
@@ -636,7 +636,7 @@ int isalpha(int c)
 /*
  * @implemented
  */
-int isalnum(int c)
+int __cdecl isalnum(int c)
 {
    return(_isctype(c, _ALPHA | _DIGIT));
 }
@@ -644,7 +644,7 @@ int isalnum(int c)
 /*
  * @implemented
  */
-int iswalnum(wint_t c)
+int __cdecl iswalnum(wint_t c)
 {
     return iswctype(c, _ALPHA | _DIGIT);
 }
@@ -652,7 +652,7 @@ int iswalnum(wint_t c)
 /*
  * @implemented
  */
-int __isascii(int c)
+int __cdecl __isascii(int c)
 {
    return ((unsigned char)c <= 0x7f);
 }
@@ -660,7 +660,7 @@ int __isascii(int c)
 /*
  * @implemented
  */
-int iswascii(wint_t c)
+int __cdecl iswascii(wint_t c)
 {
     return __isascii(c);
 }
@@ -668,7 +668,7 @@ int iswascii(wint_t c)
 /*
  * @implemented
  */
-int iscntrl(int c)
+int __cdecl iscntrl(int c)
 {
    return(_isctype(c, _CONTROL));
 }
@@ -676,7 +676,7 @@ int iscntrl(int c)
 /*
  * @implemented
  */
-int __iscsym(int c)
+int __cdecl __iscsym(int c)
 {
    return (c < 127 && (isalnum(c) || (c == '_')));
 }
@@ -684,7 +684,7 @@ int __iscsym(int c)
 /*
  * @implemented
  */
-int __iscsymf(int c)
+int __cdecl __iscsymf(int c)
 {
    return (c < 127 && (isalpha(c) || (c == '_')));
 }
@@ -692,7 +692,7 @@ int __iscsymf(int c)
 /*
  * @implemented
  */
-int isdigit(int c)
+int __cdecl isdigit(int c)
 {
    return(_isctype(c, _DIGIT));
 }
@@ -700,7 +700,7 @@ int isdigit(int c)
 /*
  * @implemented
  */
-int isgraph(int c)
+int __cdecl isgraph(int c)
 {
    return (_isctype (c, _PUNCT | _ALPHA | _DIGIT));
 }
@@ -708,7 +708,7 @@ int isgraph(int c)
 /*
  * @implemented
  */
-int islower(int c)
+int __cdecl islower(int c)
 {
    return (_isctype (c, _LOWER));
 }
@@ -716,7 +716,7 @@ int islower(int c)
 /*
  * @implemented
  */
-int isprint(int c)
+int __cdecl isprint(int c)
 {
    return (_isctype (c, _BLANK | _PUNCT | _ALPHA | _DIGIT));
 }
@@ -724,7 +724,7 @@ int isprint(int c)
 /*
  * @implemented
  */
-int ispunct(int c)
+int __cdecl ispunct(int c)
 {
    return (_isctype (c, _PUNCT));
 }
@@ -732,7 +732,7 @@ int ispunct(int c)
 /*
  * @implemented
  */
-int isspace(int c)
+int __cdecl isspace(int c)
 {
    return (_isctype (c, _SPACE));
 }
@@ -740,7 +740,7 @@ int isspace(int c)
 /*
  * @implemented
  */
-int isupper(int c)
+int __cdecl isupper(int c)
 {
    return (_isctype (c, _UPPER));
 }
@@ -748,7 +748,7 @@ int isupper(int c)
 /*
  * @implemented
  */
-int isxdigit(int c)
+int __cdecl isxdigit(int c)
 {
    return (_isctype (c, _HEX));
 }
@@ -757,7 +757,7 @@ int isxdigit(int c)
 /*
  * @implemented
  */
-int iswalpha(wint_t c)
+int __cdecl iswalpha(wint_t c)
 {
    return (iswctype (c, _ALPHA));
 }
@@ -765,7 +765,7 @@ int iswalpha(wint_t c)
 /*
  * @implemented
  */
-int iswcntrl(wint_t c)
+int __cdecl iswcntrl(wint_t c)
 {
     return iswctype(c, _CONTROL);
 }
@@ -773,7 +773,7 @@ int iswcntrl(wint_t c)
 /*
  * @implemented
  */
-int iswdigit(wint_t c)
+int __cdecl iswdigit(wint_t c)
 {
    return (iswctype (c, _DIGIT));
 }
@@ -781,7 +781,7 @@ int iswdigit(wint_t c)
 /*
  * @implemented
  */
-int iswgraph(wint_t c)
+int __cdecl iswgraph(wint_t c)
 {
   return iswctype(c,_PUNCT | _ALPHA | _DIGIT);
 }
@@ -789,7 +789,7 @@ int iswgraph(wint_t c)
 /*
  * @implemented
  */
-int iswprint(wint_t c)
+int __cdecl iswprint(wint_t c)
 {
   return iswctype((unsigned short)c,_BLANK | _PUNCT | _ALPHA | _DIGIT);
 }
@@ -798,7 +798,7 @@ int iswprint(wint_t c)
 /*
  * @implemented
  */
-int iswpunct(wint_t c)
+int __cdecl iswpunct(wint_t c)
 {
     return iswctype(c, _PUNCT);
 }
@@ -806,7 +806,7 @@ int iswpunct(wint_t c)
 /*
  * @implemented
  */
-int iswlower(wint_t c)
+int __cdecl iswlower(wint_t c)
 {
    return (iswctype (c, _LOWER));
 }
@@ -814,7 +814,7 @@ int iswlower(wint_t c)
 /*
  * @implemented
  */
-int iswupper(wint_t c)
+int __cdecl iswupper(wint_t c)
 {
     return iswctype(c, _UPPER);
 }
@@ -823,7 +823,7 @@ int iswupper(wint_t c)
 /*
  * @implemented
  */
-int iswspace(wint_t c)
+int __cdecl iswspace(wint_t c)
 {
    return (iswctype (c, _SPACE));
 }
@@ -831,7 +831,7 @@ int iswspace(wint_t c)
 /*
  * @implemented
  */
-int iswxdigit(wint_t c)
+int __cdecl iswxdigit(wint_t c)
 {
    return (iswctype (c, _HEX));
 }
@@ -840,7 +840,7 @@ int iswxdigit(wint_t c)
 /*
  * @implemented
  */
-int __toascii(int c)
+int __cdecl __toascii(int c)
 {
    return((unsigned int)(c) & 0x7f);
 }
@@ -848,7 +848,7 @@ int __toascii(int c)
 /*
  * @implemented
  */
-int _tolower(int c)
+int __cdecl _tolower(int c)
 {
    if (_isctype (c, _UPPER))
        return (c - upalpha);
@@ -858,7 +858,7 @@ int _tolower(int c)
 /*
  * @implemented
  */
-int _toupper(int c)
+int __cdecl _toupper(int c)
 {
    if (_isctype (c, _LOWER))
       return (c + upalpha);
@@ -868,7 +868,7 @@ int _toupper(int c)
 /*
  * @implemented
  */
-int tolower(int c)
+int __cdecl tolower(int c)
 {
    if (_isctype (c, _UPPER))
        return (c - upalpha);
@@ -878,7 +878,7 @@ int tolower(int c)
 /*
  * @implemented
  */
-int toupper(int c)
+int __cdecl toupper(int c)
 {
    if (_isctype (c, _LOWER))
       return (c + upalpha);
@@ -888,7 +888,7 @@ int toupper(int c)
 /*
  * @implemented
  */
-wint_t towlower(wint_t c)
+wint_t __cdecl towlower(wint_t c)
 {
    if (iswctype (c, _UPPER))
        return (c - upalpha);
@@ -898,7 +898,7 @@ wint_t towlower(wint_t c)
 /*
  * @implemented
  */
-wint_t towupper(wint_t c)
+wint_t __cdecl towupper(wint_t c)
 {
    if (iswctype (c, _LOWER))
       return (c + upalpha);
index 94b59e6..0ebb1e7 100644 (file)
@@ -5,7 +5,7 @@ extern const unsigned short wine_wctype_table[];
 /*
  * @implemented
  */
-int iswctype(wint_t wc, wctype_t wctypeFlags)
+int __cdecl iswctype(wint_t wc, wctype_t wctypeFlags)
 {
     return (wine_wctype_table[wine_wctype_table[wc >> 8] + (wc & 0xff)] & wctypeFlags);
 }
index 0d6e0e5..1927259 100644 (file)
@@ -6,6 +6,7 @@
  * @implemented
  */
 char *
+CDECL
 _i64toa(__int64 value, char *string, int radix)
 {
     ULONGLONG  val;
@@ -125,6 +126,7 @@ int CDECL _i64toa_s(__int64 value, char *str, size_t size, int radix)
  * @implemented
  */
 char *
+CDECL
 _ui64toa(unsigned __int64 value, char *string, int radix)
 {
     char buffer[65];
@@ -199,6 +201,7 @@ int CDECL _itoa_s(int value, char *str, size_t size, int radix)
  * @implemented
  */
 char *
+CDECL
 _itoa(int value, char *string, int radix)
 {
   return _ltoa(value, string, radix);
@@ -208,6 +211,7 @@ _itoa(int value, char *string, int radix)
  * @implemented
  */
 char *
+CDECL
 _ltoa(long value, char *string, int radix)
 {
     unsigned long val;
@@ -328,6 +332,7 @@ int CDECL _ltoa_s(long value, char *str, size_t size, int radix)
  * @implemented
  */
 char *
+CDECL
 _ultoa(unsigned long value, char *string, int radix)
 {
     char buffer[33];
index 204bcf7..b287b15 100644 (file)
@@ -13,6 +13,7 @@
  * @implemented
  */
 wchar_t *
+CDECL
 _i64tow(__int64 value, wchar_t *string, int radix)
 {
     ULONGLONG val;
@@ -56,6 +57,7 @@ _i64tow(__int64 value, wchar_t *string, int radix)
  * @implemented
  */
 int
+CDECL
 _i64tow_s(__int64 value, wchar_t *str, size_t size, int radix)
 {
     unsigned __int64 val;
@@ -136,6 +138,7 @@ _i64tow_s(__int64 value, wchar_t *str, size_t size, int radix)
  * @implemented
  */
 wchar_t *
+CDECL
 _ui64tow(unsigned __int64 value, wchar_t *string, int radix)
 {
     WCHAR buffer[65];
@@ -165,6 +168,7 @@ _ui64tow(unsigned __int64 value, wchar_t *string, int radix)
  * @implemented
  */
 int
+CDECL
 _ui64tow_s( unsigned __int64 value, wchar_t *str,
                              size_t size, int radix )
 {
@@ -204,6 +208,7 @@ _ui64tow_s( unsigned __int64 value, wchar_t *str,
  * @implemented
  */
 wchar_t *
+CDECL
 _itow(int value, wchar_t *string, int radix)
 {
   return _ltow(value, string, radix);
@@ -213,6 +218,7 @@ _itow(int value, wchar_t *string, int radix)
  * @implemented
  */
 int
+CDECL
 _itow_s(int value, wchar_t *str, size_t size, int radix)
 {
     return _ltow_s(value, str, size, radix);
@@ -222,6 +228,7 @@ _itow_s(int value, wchar_t *str, size_t size, int radix)
  * @implemented
  */
 wchar_t *
+CDECL
 _ltow(long value, wchar_t *string, int radix)
 {
     unsigned long val;
@@ -265,6 +272,7 @@ _ltow(long value, wchar_t *string, int radix)
  * @implemented
  */
 int
+CDECL
 _ltow_s(long value, wchar_t *str, size_t size, int radix)
 {
     unsigned long val;
@@ -345,6 +353,7 @@ _ltow_s(long value, wchar_t *str, size_t size, int radix)
  * @implemented
  */
 wchar_t *
+CDECL
 _ultow(unsigned long value, wchar_t *string, int radix)
 {
     WCHAR buffer[33];
index 339cdc5..fee8359 100644 (file)
@@ -4,6 +4,7 @@
  * @implemented
  */
 int
+CDECL
 _stricmp(const char *s1, const char *s2)
 {
   while (toupper(*s1) == toupper(*s2))
@@ -20,6 +21,7 @@ _stricmp(const char *s1, const char *s2)
  * @implemented
  */
 int
+CDECL
 _strcmpi(const char *s1, const char *s2)
 {
        return _stricmp(s1,s2);
index e783023..5966a5b 100644 (file)
@@ -4,7 +4,7 @@
 /*
  * @implemented
  */
-char * _strlwr(char *x)
+char * CDECL _strlwr(char *x)
 {
        char  *y=x;
 
index 9ebe897..3ccf5f3 100644 (file)
@@ -3,7 +3,7 @@
 /*
  * @implemented
  */
-int _strnicmp(const char *s1, const char *s2, size_t n)
+int CDECL _strnicmp(const char *s1, const char *s2, size_t n)
 {
 
   if (n == 0)
index 083fc61..74a2133 100644 (file)
@@ -4,7 +4,7 @@
 
 #define BIT_SIZE (CHAR_BIT * sizeof(unsigned long) / sizeof(char))
 
-char* strpbrk(const char *s1, const char *s2)
+char* __cdecl strpbrk(const char *s1, const char *s2)
 {
     if (*s2 == 0)
     {
index c855f59..ec05b0b 100644 (file)
@@ -13,7 +13,7 @@
 /*
  * @implemented
  */
-char * _strrev(char *s)
+char * CDECL _strrev(char *s)
 {
        char a, *b, *e;
        b=e=s;
index 4056acd..23f76e4 100644 (file)
@@ -13,6 +13,7 @@
  * @implemented
  */
 char *
+CDECL
 strstr(const char *s, const char *find)
 {
   char c, sc;
index 25bd15a..6cbdc14 100644 (file)
@@ -4,6 +4,7 @@
  * @implemented
  */
 long
+CDECL
 strtol(const char *nptr, char **endptr, int base)
 {
   const char *s = nptr;
index d19ddce..ada0e04 100644 (file)
@@ -1,6 +1,7 @@
 #include <precomp.h>
 
 unsigned long long
+CDECL
 strtoull(const char *nptr, char **endptr, int base)
 {
   const char *s = nptr;
index 5f0cdcc..126f8f2 100644 (file)
@@ -13,7 +13,7 @@
 /*
  * @implemented
  */
-char *_strupr(char *x)
+char * CDECL _strupr(char *x)
 {
        char  *y=x;
 
index 1da43d3..3aafe12 100644 (file)
@@ -2,7 +2,7 @@
 #include <limits.h>
 #include <string.h>
 
-size_t _strxspn(const char *s1, const char *s2)
+size_t __cdecl _strxspn(const char *s1, const char *s2)
 {
  unsigned char char_map[1 << CHAR_BIT * sizeof(char)];
  const unsigned char * us2 = (const unsigned char *)s2;
index 708921d..e2a4520 100644 (file)
@@ -13,6 +13,7 @@
  * @implemented
  */
 long
+CDECL
 wcstol(const wchar_t *nptr, wchar_t **endptr, int base)
 {
   const wchar_t *s = nptr;
index 4775585..9959ccc 100644 (file)
@@ -10,6 +10,7 @@
  * @implemented
  */
 unsigned long
+CDECL
 wcstoul(const wchar_t *nptr, wchar_t **endptr, int base)
 {
   const wchar_t *s = nptr;
index cc49751..9cb4c39 100644 (file)
@@ -14,6 +14,7 @@
  * @implemented
  */
 __int64
+CDECL
 _wtoi64 (const wchar_t *nptr)
 {
    int c;
@@ -50,6 +51,7 @@ _wtoi64 (const wchar_t *nptr)
  * @unimplemented
  */
 __int64
+CDECL
 _wcstoi64 (const wchar_t *nptr, wchar_t **endptr, int base)
 {
    TRACE("_wcstoi64 is UNIMPLEMENTED\n");
@@ -60,6 +62,7 @@ _wcstoi64 (const wchar_t *nptr, wchar_t **endptr, int base)
  * @unimplemented
  */
 unsigned __int64
+CDECL
 _wcstoui64 (const wchar_t *nptr, wchar_t **endptr, int base)
 {
    TRACE("_wcstoui64 is UNIMPLEMENTED\n");
index e399c2f..b50c318 100644 (file)
@@ -13,7 +13,7 @@
 /*
  * @unimplemented
  */
-int _wcsncoll (const wchar_t *s1, const wchar_t *s2, size_t c)
+int CDECL _wcsncoll (const wchar_t *s1, const wchar_t *s2, size_t c)
 {
   /* FIXME: handle collates */
   return wcsncmp(s1,s2,c);
@@ -22,7 +22,7 @@ int _wcsncoll (const wchar_t *s1, const wchar_t *s2, size_t c)
 /*
  * @unimplemented
  */
-int _wcsnicoll (const wchar_t *s1, const wchar_t *s2, size_t c)
+int CDECL _wcsnicoll (const wchar_t *s1, const wchar_t *s2, size_t c)
 {
   /* FIXME: handle collates */
   return _wcsnicmp(s1,s2,c);
index a68dd77..4545ea4 100644 (file)
@@ -13,7 +13,7 @@
 /*
  * @implemented
  */
-size_t wcscspn(const wchar_t *str,const wchar_t *reject)
+size_t CDECL wcscspn(const wchar_t *str,const wchar_t *reject)
 {
        wchar_t *s;
        wchar_t *t;
index 500ce0b..9739aa5 100644 (file)
@@ -5,7 +5,7 @@
 /*
  * @implemented
  */
-int _wcsicmp(const wchar_t* cs,const wchar_t * ct)
+int CDECL _wcsicmp(const wchar_t* cs,const wchar_t * ct)
 {
        while (towlower(*cs) == towlower(*ct))
        {
index c62e3f0..b5ede4b 100644 (file)
@@ -13,7 +13,7 @@
 /*
  * @implemented
  */
-wchar_t * _wcslwr(wchar_t *x)
+wchar_t * CDECL _wcslwr(wchar_t *x)
 {
        wchar_t  *y=x;
 
index 495a211..7b622cf 100644 (file)
@@ -13,7 +13,7 @@
 /*
  * @implemented
  */
-int _wcsnicmp (const wchar_t *cs, const wchar_t *ct, size_t count)
+int CDECL _wcsnicmp (const wchar_t *cs, const wchar_t *ct, size_t count)
 {
        if (count == 0)
                return 0;
index fdc5969..1c64494 100644 (file)
@@ -13,7 +13,7 @@
 /*
  * @implemented
  */
-size_t wcsspn(const wchar_t *str,const wchar_t *accept)
+size_t CDECL wcsspn(const wchar_t *str,const wchar_t *accept)
 {
        wchar_t  *s;
        wchar_t  *t;
index 188da07..39ac81a 100644 (file)
@@ -13,7 +13,7 @@
 /*
  * @implemented
  */
-wchar_t *wcsstr(const wchar_t *s,const wchar_t *b)
+wchar_t * CDECL wcsstr(const wchar_t *s,const wchar_t *b)
 {
        wchar_t *x;
        wchar_t *y;
index e4e96b2..caf5008 100644 (file)
@@ -13,7 +13,7 @@
 /*
  * @implemented
  */
-wchar_t *_wcsupr(wchar_t *x)
+wchar_t * CDECL _wcsupr(wchar_t *x)
 {
        wchar_t  *y = x;
 
index 762238e..bb375a2 100644 (file)
@@ -13,7 +13,7 @@
 /*
  * @implemented
  */
-size_t wcsxfrm(wchar_t *dst,const wchar_t *src, size_t n)
+size_t CDECL wcsxfrm(wchar_t *dst,const wchar_t *src, size_t n)
 {
   size_t r = 0;
   int c;
index ac05c74..49025d6 100644 (file)
@@ -148,7 +148,9 @@ KiExitInterrupt(IN PKTRAP_FRAME TrapFrame,
     KiEoiHelper(TrapFrame);
 }
 
+DECLSPEC_NORETURN
 VOID
+__cdecl
 KiUnexpectedInterrupt(VOID)
 {
     /* Crash the machine */
index 7fb392e..f4aa89f 100644 (file)
@@ -12,8 +12,8 @@
 #define NDEBUG
 #include <debug.h>
 
-VOID KiFastCallEntry(VOID);
-VOID KiFastCallEntryWithSingleStep(VOID);
+VOID __cdecl KiFastCallEntry(VOID);
+VOID __cdecl KiFastCallEntryWithSingleStep(VOID);
 
 extern PVOID FrRestore;
 VOID FASTCALL Ke386LoadFpuState(IN PFX_SAVE_AREA SaveArea);