[PATCH] don't use inline functions for simple forwarders.
Marcus Meissner
marcus at jet.franken.de
Tue Nov 28 03:28:03 CST 2006
Hi,
GCC trunk + FORTIFY_SOURCE does not like those strcpy calls
in static functions.
Since actually those functions could just forward to their libc
call, I replaced them by #defines now.
Ciao, Marcus
---
include/winbase.h | 15 +++------------
1 files changed, 3 insertions(+), 12 deletions(-)
6de844d70b4d7ee940dafb4e121170464102ce05
diff --git a/include/winbase.h b/include/winbase.h
index 7e29103..aa33cda 100644
--- a/include/winbase.h
+++ b/include/winbase.h
@@ -2134,10 +2134,7 @@ extern inline INT WINAPI lstrlenW( LPCWS
return s - str;
}
-extern inline INT WINAPI lstrlenA( LPCSTR str )
-{
- return strlen( str );
-}
+#define lstrlenA strlen
extern inline LPWSTR WINAPI lstrcpyW( LPWSTR dst, LPCWSTR src )
{
@@ -2146,10 +2143,7 @@ extern inline LPWSTR WINAPI lstrcpyW( LP
return dst;
}
-extern inline LPSTR WINAPI lstrcpyA( LPSTR dst, LPCSTR src )
-{
- return strcpy( dst, src );
-}
+#define lstrcpyA strcpy
extern inline LPWSTR WINAPI lstrcatW( LPWSTR dst, LPCWSTR src )
{
@@ -2159,10 +2153,7 @@ extern inline LPWSTR WINAPI lstrcatW( LP
return dst;
}
-extern inline LPSTR WINAPI lstrcatA( LPSTR dst, LPCSTR src )
-{
- return strcat( dst, src );
-}
+#define lstrcatA strcat
/* strncpy doesn't do what you think, don't use it */
#undef strncpy
--
1.2.4
More information about the wine-patches
mailing list