mirror of
				https://github.com/asterisk/asterisk.git
				synced 2025-10-31 18:55:19 +00:00 
			
		
		
		
	Another minor fix to compiler attribute checking.
Defaulting to 'static' for the function scope was bad... so remove it. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@201090 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
		| @@ -7,17 +7,10 @@ AC_MSG_CHECKING(for compiler 'attribute $1' support) | ||||
| saved_CFLAGS="$CFLAGS" | ||||
| CFLAGS="$CFLAGS -Wall -Wno-unused -Werror" | ||||
|  | ||||
| if test "x$3" = "x" | ||||
| then | ||||
| attribute_scope="static" | ||||
| else | ||||
| attribute_scope="$3" | ||||
| fi | ||||
|  | ||||
| if test "x$2" = "x" | ||||
| then | ||||
| AC_COMPILE_IFELSE( | ||||
| 	AC_LANG_PROGRAM([$attribute_scope void __attribute__(($1)) *test(void *muffin, ...) {return (void *) 0;}], | ||||
| 	AC_LANG_PROGRAM([$3 void __attribute__(($1)) *test(void *muffin, ...) {return (void *) 0;}], | ||||
| 			[]), | ||||
| 	AC_MSG_RESULT(yes) | ||||
| 	AC_DEFINE_UNQUOTED([HAVE_ATTRIBUTE_$1], 1, [Define to 1 if your GCC C compiler supports the '$1' attribute.]), | ||||
| @@ -25,7 +18,7 @@ AC_COMPILE_IFELSE( | ||||
| ) | ||||
| else | ||||
| AC_COMPILE_IFELSE( | ||||
| 	AC_LANG_PROGRAM([$attribute_scope void __attribute__(($2)) *test(void *muffin, ...) {return (void *) 0;}], | ||||
| 	AC_LANG_PROGRAM([$3 void __attribute__(($2)) *test(void *muffin, ...) {return (void *) 0;}], | ||||
| 			[]), | ||||
| 	AC_MSG_RESULT(yes) | ||||
| 	AC_DEFINE_UNQUOTED([HAVE_ATTRIBUTE_$1], 1, [Define to 1 if your GCC C compiler supports the '$1' attribute.]), | ||||
|   | ||||
		Reference in New Issue
	
	Block a user