[ bogofilter-Patches-706375 ] Building under OS/2
Yuri Dario
warp at os2power.com
Tue Apr 1 20:04:53 CEST 2003
Hello,
since I subscribed the dev list, I think it is better to move here the discussion about OS/2
patches.
>1. the file must not be unlocked before the BerkeleyDB cache
>has been flushed. If you do that, you're heading for
>corruption (which is the likely reason for t.lock2 failure).
here I need to do more work, but t.lock2 was failing also before unlocking.
>2. We don't use C++/C99-style // comments, but only
>C89-style /* */ comments. // choke some C compilers unless
np.
>3. We should not introduce OS-specific comments into regular
>files, but encapsulate the portability code (such as the EMX
>locking code) in separate files, such as a generic_lock.c or
let me know your preferred layout, and I will rewrite the code.
>4a. GNU libc (Linux's most common libc) documents on the
>topic of "optind": "The initial value of this variable is
>`1'." FreeBSD documents "The variable opterr and optind are
that's ok also for EMX; the only difference is that emx getopt() requires 0 to make the second
scan!
This could be put inside a #ifdef
>4b. setting opterr to 0 defeats printing error messages and
>changes behaviour. This is inacceptable.
my fault.
>5. what is fopen("rt") supposed to do? ANSI-C doesn't seem
>to document the t. If it means "text mode", then ANSI-C
>already specifies "r" means "text mode" and "rb" means
>"binary mode".
I will check how emx handles it, because I'm using also some special link flags.
>6. ignoring CR should not happen in fgetsl() -- fgets()
>doesn't do that either. If we need a function that ignores
>CR, then it needs to wrap around fgetsl() instead.
that's ok for me; I put it into fgetsl() because I didn't know the whole logic around reading.
>7. I suggest that the _fsetmode EMX stuff moves into a
>separate function emx_init() or something, and a
>os_spec_init() function that calls it.
should I place os_spec_init() inside main or somewhere else?
Bye,
Yuri Dario
/*
* member of TeamOS/2 - Italy
* http://www.quasarbbs.net/yuri
* http://www.teamos2.it
* http://www.opera.com/os2/
*/
More information about the bogofilter-dev
mailing list