Date: Mon, 17 Aug 2015 11:10:02 -0500 From: JimF <jfoug@....net> To: john-dev@...ts.openwall.com Subject: Re: FMT_OMP_BAD On Mon, 17 Aug 2015 11:01:46 -0500, Solar Designer <solar@...nwall.com> wrote: > Kai, magnum - > .... > No, that's redundant. Some formats do it, but they should actually be > changed to use the simpler approach ... > > ... Unless this becomes wrong when we introduce FAST_FORMATS_OMP checks. > For example, rawMD5_fmt_plug.c has: > > #include "formats.h" > > #if !FAST_FORMATS_OMP > #undef _OPENMP > #endif > > [...] > > #ifdef _OPENMP > FMT_OMP | FMT_OMP_BAD | > #endif > If that is the logic wanted for 'fast formats omp', then simply make that code a header, that is included last (or right before memdbg.h). Within that header you would have things like: #if !FAST_FORMATS_OMP #undef _OPENMP #undef FMT_OMP #define FMT_OMP 0 #undef FMT_BAD_OMP #define FMT_OMP_BAD 0 #endif Then simply include that header file in formats where you want that logic. Also, it may be that this header should be included FIRST, since the _OPENMP logic being set can make changes in certain headers. It if ends up being the first thing, then the header may only need to contain: #if !FAST_FORMATS_OMP #undef _OPENMP #endif
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.