summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin/include/sys
diff options
context:
space:
mode:
authorEric Blake <eblake@redhat.com>2014-08-01 15:48:37 +0000
committerEric Blake <eblake@redhat.com>2014-08-01 15:48:37 +0000
commit9067d19b9aaf673283ee6530b1c4c2909f88c5e8 (patch)
tree3c49f856984976813892031ab33a941a22c30e5c /winsup/cygwin/include/sys
parentada456dcfed23e2f3f1d92574993aef15e134418 (diff)
downloadcygnal-9067d19b9aaf673283ee6530b1c4c2909f88c5e8.tar.gz
cygnal-9067d19b9aaf673283ee6530b1c4c2909f88c5e8.tar.bz2
cygnal-9067d19b9aaf673283ee6530b1c4c2909f88c5e8.zip
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.
Diffstat (limited to 'winsup/cygwin/include/sys')
-rw-r--r--winsup/cygwin/include/sys/cygwin.h16
-rw-r--r--winsup/cygwin/include/sys/strace.h14
2 files changed, 15 insertions, 15 deletions
diff --git a/winsup/cygwin/include/sys/cygwin.h b/winsup/cygwin/include/sys/cygwin.h
index 7e344ecab..39639b877 100644
--- a/winsup/cygwin/include/sys/cygwin.h
+++ b/winsup/cygwin/include/sys/cygwin.h
@@ -26,21 +26,21 @@ extern "C" {
/* DEPRECATED INTERFACES. These are restricted to MAX_PATH length.
Don't use in modern applications. They don't exist on x86_64. */
extern int cygwin_win32_to_posix_path_list (const char *, char *)
- __attribute__ ((deprecated));
+ __attribute__ ((__deprecated__));
extern int cygwin_win32_to_posix_path_list_buf_size (const char *)
- __attribute__ ((deprecated));
+ __attribute__ ((__deprecated__));
extern int cygwin_posix_to_win32_path_list (const char *, char *)
- __attribute__ ((deprecated));
+ __attribute__ ((__deprecated__));
extern int cygwin_posix_to_win32_path_list_buf_size (const char *)
- __attribute__ ((deprecated));
+ __attribute__ ((__deprecated__));
extern int cygwin_conv_to_win32_path (const char *, char *)
- __attribute__ ((deprecated));
+ __attribute__ ((__deprecated__));
extern int cygwin_conv_to_full_win32_path (const char *, char *)
- __attribute__ ((deprecated));
+ __attribute__ ((__deprecated__));
extern int cygwin_conv_to_posix_path (const char *, char *)
- __attribute__ ((deprecated));
+ __attribute__ ((__deprecated__));
extern int cygwin_conv_to_full_posix_path (const char *, char *)
- __attribute__ ((deprecated));
+ __attribute__ ((__deprecated__));
#endif /* !__x86_64__ */
/* Use these interfaces in favor of the above. */
diff --git a/winsup/cygwin/include/sys/strace.h b/winsup/cygwin/include/sys/strace.h
index 164af1e50..eacd3f113 100644
--- a/winsup/cygwin/include/sys/strace.h
+++ b/winsup/cygwin/include/sys/strace.h
@@ -1,7 +1,7 @@
/* sys/strace.h
Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008,
- 2010, 2011, 2012 Red Hat, Inc.
+ 2010, 2011, 2012, 2014 Red Hat, Inc.
This file is part of Cygwin.
@@ -40,17 +40,17 @@ class strace
void write (unsigned category, const char *buf, int count);
unsigned char _active;
public:
- void activate (bool) __attribute__ ((regparm (2)));;
+ void activate (bool) __attribute__ ((__regparm__ (2)));;
strace () {}
int microseconds ();
int version;
int lmicrosec;
bool execing;
- void dll_info () __attribute__ ((regparm (1)));
- void prntf (unsigned, const char *func, const char *, ...) /*__attribute__ ((regparm(3)))*/;
- void vprntf (unsigned, const char *func, const char *, va_list ap) /*__attribute__ ((regparm(3)))*/;
- void wm (int message, int word, int lon) __attribute__ ((regparm(3)));
- void write_childpid (pid_t) __attribute__ ((regparm (3)));
+ void dll_info () __attribute__ ((__regparm__ (1)));
+ void prntf (unsigned, const char *func, const char *, ...) /*__attribute__ ((__regparm__(3)))*/;
+ void vprntf (unsigned, const char *func, const char *, va_list ap) /*__attribute__ ((__regparm__(3)))*/;
+ void wm (int message, int word, int lon) __attribute__ ((__regparm__(3)));
+ void write_childpid (pid_t) __attribute__ ((__regparm__ (3)));
bool attached () const {return _active == 3;}
bool active () const {return _active & 1;}
unsigned char& active_val () {return _active;}