[patch] actsync rejects hannover._wichtig

Julien ÉLIE julien at trigofacile.com
Thu Mar 18 21:36:11 UTC 2010


Hi Russ,

>> #if STDC_HEADERS
>> # define CTYPE(isXXXXX, c) (isXXXXX((unsigned char)(c)))
>> #else
>> # define CTYPE(isXXXXX, c) \
>>    (isascii((unsigned char)(c)) && isXXXXX((unsigned char)(c)))
>> #endif
>
>> Is that behaviour still true today?
>
> You can safely assume that STDC_HEADERS is always true and rip out any
> code in INN that only applies if it's false.  SunOS is dead.

OK, I will have a look at it.

I read in <http://www.gnu.org/software/hello/manual/autoconf/Particular-Headers.html>
that we can safely remove the following macros (used in INN) and what they define:
* AC_HEADER_DIRENT
* AC_HEADER_STDC
* AC_HEADER_SYS_WAIT
* AC_HEADER_TIME



>> Another question:  is our isXXXXX() really working?!?
>> Shouldn't we put several lines for isdigit(), isalnum(), etc.?
>
> The above code does work, through the magic of scary C preprocessor fun,
> in the places that use it, but there's no reason at this point not to go
> through and replace any instance of CTYPE(isfoo, c) with
> isfoo((unsigned char) c).  Be sure to add the cast, though; it remains the
> case that passing signed characters into is*() functions can cause
> problems on some platforms.  Some implementations do straight table
> lookups and, if given what they think is a negative number, will happily
> dereference memory off the beginning of the table.

All right.  Thanks for the information.

-- 
Julien ÉLIE

« Un père à son fils : « Finalement, ta mère et moi, on a été heureux
  pendant 25 ans. Après, on s'est rencontré... » 




More information about the inn-workers mailing list