headers: properly decorate attributes
As pointed out here: https://cygwin.com/ml/cygwin/2014-07/msg00371.html any use of __attribute__ in a header that can be included by a user should be namespace-safe, by decorating the attribute arguments with __ (while gcc does a lousy job at documenting it, ALL attributes have a __ counterpart, precisely so that public headers can use attributes without risk of collision with macros belonging to user namespace). * include/pthread.h: Decorate attribute names with __, for namespace safety. * include/cygwin/core_dump.h: Likewise. * include/cygwin/cygwin_dll.h: Likewise. * include/sys/cygwin.h: Likewise. * include/sys/strace.h: Likewise.
This commit is contained in:
@ -1,6 +1,6 @@
|
||||
/* core_dump.h
|
||||
|
||||
Copyright 1999, 2000, 2001 Red Hat, Inc.
|
||||
Copyright 1999, 2000, 2001, 2014 Red Hat, Inc.
|
||||
|
||||
Written by Egor Duda <deo@logos-m.ru>
|
||||
|
||||
@ -27,7 +27,7 @@ struct win32_core_process_info
|
||||
char command_line[1];
|
||||
}
|
||||
#ifdef __GNUC__
|
||||
__attribute__ ((packed))
|
||||
__attribute__ ((__packed__))
|
||||
#endif
|
||||
;
|
||||
|
||||
@ -38,7 +38,7 @@ struct win32_core_thread_info
|
||||
CONTEXT thread_context;
|
||||
}
|
||||
#ifdef __GNUC__
|
||||
__attribute__ ((packed))
|
||||
__attribute__ ((__packed__))
|
||||
#endif
|
||||
;
|
||||
|
||||
@ -49,7 +49,7 @@ struct win32_core_module_info
|
||||
char module_name[1];
|
||||
}
|
||||
#ifdef __GNUC__
|
||||
__attribute__ ((packed))
|
||||
__attribute__ ((__packed__))
|
||||
#endif
|
||||
;
|
||||
|
||||
@ -64,7 +64,7 @@ struct win32_pstatus
|
||||
} data ;
|
||||
}
|
||||
#ifdef __GNUC__
|
||||
__attribute__ ((packed))
|
||||
__attribute__ ((__packed__))
|
||||
#endif
|
||||
;
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
/* cygwin_dll.h
|
||||
|
||||
Copyright 1998, 1999, 2000, 2001, 2009, 2011, 2012, 2013 Red Hat, Inc.
|
||||
Copyright 1998, 1999, 2000, 2001, 2009, 2011, 2012, 2013, 2014 Red Hat, Inc.
|
||||
|
||||
This file is part of Cygwin.
|
||||
|
||||
@ -35,9 +35,9 @@ static DWORD storedReason; \
|
||||
static void* storedPtr; \
|
||||
int __dynamically_loaded; \
|
||||
\
|
||||
static int __dllMain (int a __attribute__ ((unused)), \
|
||||
char **b __attribute__ ((unused)), \
|
||||
char **c __attribute__ ((unused))) \
|
||||
static int __dllMain (int a __attribute__ ((__unused__)), \
|
||||
char **b __attribute__ ((__unused__)), \
|
||||
char **c __attribute__ ((__unused__))) \
|
||||
{ \
|
||||
return Entry (storedHandle, storedReason, storedPtr); \
|
||||
} \
|
||||
|
Reference in New Issue
Block a user