Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'newlib/libc/include')
-rw-r--r--newlib/libc/include/_ansi.h6
-rw-r--r--newlib/libc/include/stdlib.h2
2 files changed, 7 insertions, 1 deletions
diff --git a/newlib/libc/include/_ansi.h b/newlib/libc/include/_ansi.h
index b4dc01105..8bebd1457 100644
--- a/newlib/libc/include/_ansi.h
+++ b/newlib/libc/include/_ansi.h
@@ -31,7 +31,13 @@
#define _SIGNED signed
#define _DOTS , ...
#define _VOID void
+#ifdef __CYGWIN__
+#define _EXFUN(name, proto) __cdecl name proto
+#define _EXPARM(name, proto) (* __cdecl name) proto
+#else
#define _EXFUN(name, proto) name proto
+#define _EXPARM(name, proto) (* name) proto
+#endif
#define _DEFUN(name, arglist, args) name(args)
#define _DEFUN_VOID(name) name(_NOARGS)
#define _CAST_VOID (void)
diff --git a/newlib/libc/include/stdlib.h b/newlib/libc/include/stdlib.h
index 2d2b8b176..f2feebe30 100644
--- a/newlib/libc/include/stdlib.h
+++ b/newlib/libc/include/stdlib.h
@@ -56,7 +56,7 @@ _PTR _EXFUN(bsearch,(const _PTR __key,
const _PTR __base,
size_t __nmemb,
size_t __size,
- int _EXFUN((*_compar),(const _PTR, const _PTR))));
+ int _EXPARM(_compar,(const _PTR, const _PTR))));
_PTR _EXFUN(calloc,(size_t __nmemb, size_t __size));
div_t _EXFUN(div,(int __numer, int __denom));
_VOID _EXFUN(exit,(int __status) _ATTRIBUTE ((noreturn)));