From 6a36028028904e2e180aad4c6cf51bb109d2ff16 Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Wed, 30 Sep 2009 21:50:13 -0700 Subject: [PATCH] Fix numerous warnings about an unknown attribute rpl_malloc on mingw32. On mingw32, Gnulib replaces malloc by defining it as a macro that expands to rpl_malloc. Since MALLOC_LIKE used malloc as an identifier, even though it didn't refer to the malloc function per se, this instance of malloc also expanded to rpl_malloc, confusing GCC. GCC also accepts __malloc__ here, so this commit uses that spelling instead, which avoids the warning. --- src/libpspp/compiler.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libpspp/compiler.h b/src/libpspp/compiler.h index 563cc59b..d2281944 100644 --- a/src/libpspp/compiler.h +++ b/src/libpspp/compiler.h @@ -1,5 +1,5 @@ /* PSPP - a program for statistical analysis. - Copyright (C) 2006 Free Software Foundation, Inc. + Copyright (C) 2006, 2009 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -45,7 +45,7 @@ non-`NULL' pointer it returns cannot alias any other pointer valid when the function returns. */ #if __GNUC__ > 2 -#define MALLOC_LIKE ATTRIBUTE ((malloc)) +#define MALLOC_LIKE ATTRIBUTE ((__malloc__)) #else #define MALLOC_LIKE #endif -- 2.30.2