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:
authorChristopher Faylor <me@cgf.cx>2013-01-21 08:34:52 +0400
committerChristopher Faylor <me@cgf.cx>2013-01-21 08:34:52 +0400
commit6e75c72b89496ef702133a9b093f5bdadb5ca0e7 (patch)
tree7b7ed1227affa28e3e0a3e4c83387eeab9819c66 /winsup/cygwin/winsup.h
parentd89e61f354d50020fd4cb1fbfb37bf0864ad5ec1 (diff)
Throughout, change __attribute__ ((regparm (N))) to just __regN. Throughout,
(mainly in fhandler*) start fixing gcc 4.7.2 mismatch between regparm definitions and declarations. * gendef: Define some functions to take @ declaration to accommodate _regN defines which use __stdcall. * gentls_offsets: Define __regN macros as empty. * autoload.cc (wsock_init): Remove unneeded regparm attribute. * winsup.h (__reg1): Define. (__reg2): Define. (__reg3): Define. * advapi32.cc (DuplicateTokenEx): Coerce some initializers to avoid warnings from gcc 4.7.2. * exceptions.cc (status_info): Declare struct to use NTSTATUS. (cygwin_exception::dump_exception): Coerce e->ExceptionCode to NTSTATUS. * fhandler_clipboard.cc (cygnativeformat): Redefine as UINT to avoid gcc 4.7.2 warnings. (fhandler_dev_clipboard::read): Ditto.
Diffstat (limited to 'winsup/cygwin/winsup.h')
-rw-r--r--winsup/cygwin/winsup.h39
1 files changed, 22 insertions, 17 deletions
diff --git a/winsup/cygwin/winsup.h b/winsup/cygwin/winsup.h
index 21082c6e3..f955dd38e 100644
--- a/winsup/cygwin/winsup.h
+++ b/winsup/cygwin/winsup.h
@@ -1,7 +1,7 @@
/* winsup.h: main Cygwin header file.
- Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
- 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Red Hat, Inc.
+ Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013 Red Hat, Inc.
This file is part of Cygwin.
@@ -79,6 +79,10 @@ int fcntl64 (int fd, int cmd, ...);
#include "wincap.h"
+#define __reg1 __stdcall __attribute__ ((regparm (1)))
+#define __reg2 __stdcall __attribute__ ((regparm (2)))
+#define __reg3 __stdcall __attribute__ ((regparm (3)))
+
extern const char case_folded_lower[];
#define cyg_tolower(c) (case_folded_lower[(unsigned char)(c)])
extern const char case_folded_upper[];
@@ -163,7 +167,7 @@ extern "C" void _pei386_runtime_relocator (per_process *);
/* dynamically loaded dll initialization for non-cygwin apps */
extern "C" int dll_noncygwin_dllcrt0 (HMODULE, per_process *);
-void __stdcall do_exit (int) __attribute__ ((regparm (1), noreturn));
+void __reg1 do_exit (int) __attribute__ ((noreturn));
/* libstdc++ malloc operator wrapper support. */
extern struct per_process_cxx_malloc default_cygwin_cxx_malloc;
@@ -202,12 +206,12 @@ extern bool cygwin_finished_initializing;
void __stdcall set_std_handle (int);
int __stdcall stat_dev (DWORD, int, unsigned long, struct __stat64 *);
-__ino64_t __stdcall hash_path_name (__ino64_t hash, PUNICODE_STRING name) __attribute__ ((regparm(2)));
-__ino64_t __stdcall hash_path_name (__ino64_t hash, PCWSTR name) __attribute__ ((regparm(2)));
-__ino64_t __stdcall hash_path_name (__ino64_t hash, const char *name) __attribute__ ((regparm(2)));
-void __stdcall nofinalslash (const char *src, char *dst) __attribute__ ((regparm(2)));
+__ino64_t __reg2 hash_path_name (__ino64_t hash, PUNICODE_STRING name);
+__ino64_t __reg2 hash_path_name (__ino64_t hash, PCWSTR name);
+__ino64_t __reg2 hash_path_name (__ino64_t hash, const char *name);
+void __reg2 nofinalslash (const char *src, char *dst);
-void *hook_or_detect_cygwin (const char *, const void *, WORD&, HANDLE h = NULL) __attribute__ ((regparm (3)));
+void __reg3 *hook_or_detect_cygwin (const char *, const void *, WORD&, HANDLE h = NULL);
/* Time related */
void __stdcall totimeval (struct timeval *, FILETIME *, int, int);
@@ -223,7 +227,7 @@ void init_console_handler (bool);
void init_global_security ();
-void __set_winsock_errno (const char *fn, int ln) __attribute__ ((regparm(2)));
+void __reg2 __set_winsock_errno (const char *fn, int ln);
#define set_winsock_errno() __set_winsock_errno (__FUNCTION__, __LINE__)
extern bool wsock_started;
@@ -231,24 +235,23 @@ extern bool wsock_started;
/* Printf type functions */
extern "C" void vapi_fatal (const char *, va_list ap) __attribute__ ((noreturn));
extern "C" void api_fatal (const char *, ...) __attribute__ ((noreturn));
-int __small_sprintf (char *dst, const char *fmt, ...) /*__attribute__ ((regparm (2)))*/;
-int __small_vsprintf (char *dst, const char *fmt, va_list ap) /*__attribute__ ((regparm (3)))*/;
-int __small_swprintf (PWCHAR dst, const WCHAR *fmt, ...) /*__attribute__ ((regparm (2)))*/;
-int __small_vswprintf (PWCHAR dst, const WCHAR *fmt, va_list ap) /*__attribute__ ((regparm (3)))*/;
+int __small_sprintf (char *dst, const char *fmt, ...);
+int __small_vsprintf (char *dst, const char *fmt, va_list ap);
+int __small_swprintf (PWCHAR dst, const WCHAR *fmt, ...);
+int __small_vswprintf (PWCHAR dst, const WCHAR *fmt, va_list ap);
void multiple_cygwin_problem (const char *, unsigned, unsigned);
extern "C" void vklog (int priority, const char *message, va_list ap);
extern "C" void klog (int priority, const char *message, ...);
bool child_copy (HANDLE, bool, ...);
-int symlink_worker (const char *, const char *, bool, bool)
- __attribute__ ((regparm (3)));
+int __reg3 symlink_worker (const char *, const char *, bool, bool);
class path_conv;
-int __stdcall stat_worker (path_conv &pc, struct __stat64 *buf) __attribute__ ((regparm (2)));
+int __reg2 stat_worker (path_conv &pc, struct __stat64 *buf);
-__ino64_t __stdcall readdir_get_ino (const char *path, bool dot_dot) __attribute__ ((regparm (2)));
+__ino64_t __reg2 readdir_get_ino (const char *path, bool dot_dot);
/* mmap functions. */
enum mmap_region_status
@@ -294,6 +297,8 @@ extern "C" char _data_start__, _data_end__, _bss_start__, _bss_end__;
extern "C" void (*__CTOR_LIST__) (void);
extern "C" void (*__DTOR_LIST__) (void);
+
+
#ifndef NO_GLOBALS_H
#include "globals.h"