This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH roland/test-snan] Clean up math/test-snan.


On 02/06/2015 04:00 PM, Roland McGrath wrote:
> This is a general cleanup of test-snan.c, intended not to change at all
> what it actually does.  My real motivation for touching this test was to
> make it stop gratuitously using SA_SIGINFO (which it doesn't actually need).
> But when I saw the cruft and duplication rampant in this file, I had to act.
> 
> Tested x86_64-linux-gnu.
> 
> OK?
> 
> 
> Thanks,
> Roland
> 
> 
> 2015-02-06  Roland McGrath  <roland@hack.frob.com>
> 
> 	* math/test-snan.c: Drop unnecessary #include's of <stdlib.h>,
> 	<sys/time.h>, <string.h>, and <errno.h>.
> 	(dest_offset, dest_address, value, zero): Remove unused variables.
> 	(ldouble): Remove typedef.
> 	(myFPsighandler): Use simple handler signature, not SA_SIGINFO
> 	signature.  Pass 1 to siglongjmp rather than 0 (which is converted to
> 	1).  Fix code style.
> 	(set_sigaction_FP, remove_sigaction_FP): Functions removed.
> 	(check): Function removed.
> 	(CHECK): New macro.
> 	(TEST_FUNC): Fix code style.  Use CHECK macro rather than repeating
> 	boilerplate feclearexcept + feenableexcept + sigsetjmp code.
> 	Don't call set_sigaction_FP and remove_sigaction_FP here.
> 	(ldouble_test): Just use 'long double' as macro argument, no need for
> 	the 'ldouble' typedef.
> 	(do_test): Set up SIGFPE handler at start, using plain signal rather
> 	than sigaction.  Fix code style.

OK.

c.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]