diff options
author | Christopher Faylor <me@cgf.cx> | 2013-01-21 04:34:52 +0000 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2013-01-21 04:34:52 +0000 |
commit | 6e75c72b89496ef702133a9b093f5bdadb5ca0e7 (patch) | |
tree | 7b7ed1227affa28e3e0a3e4c83387eeab9819c66 /winsup/cygwin/cygheap.cc | |
parent | d89e61f354d50020fd4cb1fbfb37bf0864ad5ec1 (diff) | |
download | cygnal-6e75c72b89496ef702133a9b093f5bdadb5ca0e7.tar.gz cygnal-6e75c72b89496ef702133a9b093f5bdadb5ca0e7.tar.bz2 cygnal-6e75c72b89496ef702133a9b093f5bdadb5ca0e7.zip |
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/cygheap.cc')
-rw-r--r-- | winsup/cygwin/cygheap.cc | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/winsup/cygwin/cygheap.cc b/winsup/cygwin/cygheap.cc index 6c37cb510..f0a4e3e96 100644 --- a/winsup/cygwin/cygheap.cc +++ b/winsup/cygwin/cygheap.cc @@ -1,7 +1,7 @@ /* cygheap.cc: Cygwin heap manager. - Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, - 2010, 2011, 2012 Red Hat, Inc. + Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, + 2011, 2012, 2013 Red Hat, Inc. This file is part of Cygwin. @@ -72,7 +72,7 @@ static NO_COPY size_t nthreads; #define MVMAP_OPTIONS (FILE_MAP_WRITE) extern "C" { -static void __stdcall _cfree (void *) __attribute__((regparm(1))); +static void __reg1 _cfree (void *); static void *__stdcall _csbrk (int); } @@ -278,10 +278,10 @@ cygheap_init () /* Copyright (C) 1997, 2000 DJ Delorie */ -static void *__stdcall _cmalloc (unsigned size) __attribute__ ((regparm(1))); -static void *__stdcall _crealloc (void *ptr, unsigned size) __attribute__ ((regparm(2))); +static void *__reg1 _cmalloc (unsigned size); +static void *__reg2 _crealloc (void *ptr, unsigned size); -static void *__stdcall __attribute__ ((regparm(1))) +static void *__reg1 _cmalloc (unsigned size) { _cmalloc_entry *rvc; @@ -315,7 +315,7 @@ _cmalloc (unsigned size) return rvc->data; } -static void __stdcall __attribute__ ((regparm(1))) +static void __reg1 _cfree (void *ptr) { cygheap_protect.acquire (); @@ -326,7 +326,7 @@ _cfree (void *ptr) cygheap_protect.release (); } -static void *__stdcall __attribute__ ((regparm(2))) +static void *__reg2 _crealloc (void *ptr, unsigned size) { void *newptr; @@ -409,19 +409,19 @@ crealloc (void *s, DWORD n, const char *fn) return creturn (t, c, n, fn); } -extern "C" void *__stdcall __attribute__ ((regparm(2))) +extern "C" void *__reg2 crealloc (void *s, DWORD n) { return crealloc (s, n, NULL); } -extern "C" void *__stdcall __attribute__ ((regparm(2))) +extern "C" void *__reg2 crealloc_abort (void *s, DWORD n) { return crealloc (s, n, "crealloc"); } -extern "C" void __stdcall __attribute__ ((regparm(1))) +extern "C" void __reg1 cfree (void *s) { assert (!inheap (s)); @@ -429,7 +429,7 @@ cfree (void *s) MALLOC_CHECK; } -extern "C" void __stdcall __attribute__ ((regparm(2))) +extern "C" void __reg2 cfree_and_set (char *&s, char *what) { if (s && s != almost_null) @@ -449,19 +449,19 @@ ccalloc (cygheap_types x, DWORD n, DWORD size, const char *fn) return creturn (x, c, n, fn); } -extern "C" void *__stdcall __attribute__ ((regparm(3))) +extern "C" void *__reg3 ccalloc (cygheap_types x, DWORD n, DWORD size) { return ccalloc (x, n, size, NULL); } -extern "C" void *__stdcall __attribute__ ((regparm(3))) +extern "C" void *__reg3 ccalloc_abort (cygheap_types x, DWORD n, DWORD size) { return ccalloc (x, n, size, "ccalloc"); } -extern "C" PWCHAR __stdcall __attribute__ ((regparm(1))) +extern "C" PWCHAR __reg1 cwcsdup (const PWCHAR s) { MALLOC_CHECK; @@ -473,7 +473,7 @@ cwcsdup (const PWCHAR s) return p; } -extern "C" PWCHAR __stdcall __attribute__ ((regparm(1))) +extern "C" PWCHAR __reg1 cwcsdup1 (const PWCHAR s) { MALLOC_CHECK; @@ -485,7 +485,7 @@ cwcsdup1 (const PWCHAR s) return p; } -extern "C" char *__stdcall __attribute__ ((regparm(1))) +extern "C" char *__reg1 cstrdup (const char *s) { MALLOC_CHECK; @@ -497,7 +497,7 @@ cstrdup (const char *s) return p; } -extern "C" char *__stdcall __attribute__ ((regparm(1))) +extern "C" char *__reg1 cstrdup1 (const char *s) { MALLOC_CHECK; |