Not all platforms use an integer for pthread_t and so
couldn't compile on those; namely mingw.
This is least riskest version I could come up with. Backends
that do things like "SANE_Pid pid = -1" or "if (pid == -1)" will
need to switch to sanei_thread_set_invalid()
sanei_thread_is_invalid() to be able to compile on mingw.
patches have been applied yet, but it's a start. The backends
are not installed as shared libs but as add-ons, which are shared libs
but in a specific folder in [/system|~]/config/add-ons/ named SANE/.
The install target has been changed to account for this,
Some files don't exist in BeOS/ZETA (ipc.h, ...).
Bbackend function names get a prefix, I suppose to avoid namespace clashes.
Though we do have a libdl to implement dl_open, the native way is prefered.
Added a --with-docdir= configure arg.
BeOS has a broken get[name|addr]info() from bind. This is fixed in ZETA R1.
libtool needs -no-undefined. Various VPATH fixes.
Check for <be/drivers/USB_scanner.h>, but not used yet.
No S_IFSOCK (sockets are fds to /dev/net/api). Stub pio code, untested.
Patch from Francois Revol <revol@free.fr>.
added functions sanei_thread_sendsig() and sanei_thread_get_status()
changed behaviour of sanei_thread_waitpid(), changed parameters
of sanei_thread_begin()
pthread support after all the tests. If libpthread isn't available, try if libc
supports pthreead_*. Use macro USE_PTHREAD to check if threads are used in the
code.
pthread support, added switch --enable-fork-process which toggles
between the usage of fork and pthread, set the default behaviour to
pthread usage on Darwin
* include/sane/config.h: added the HAVE_LIBPTHRAD stuff
* sanei/sanei_thread.c include/sane/sanei_thread.h: fixed compilation issue
on OS/2, added support for fork too, so that we can use sanei_thread
functions in any case.
* backend/plustek.[ch]: changes due to the sanei_thread-lib work
added linker option -lpthread if pthread.h is found
* include/sane/config.in.h: added HAVE_PTHREAD_H
* sanei/sanei_thread.c include/sane/sanei_thread.h: added pthread_
functions to library, so every backend is able to use either fork or
pthread for its reader-process - see plustek backend for example
* backend/plustek.h backend/plustek.c: added sanei_thread stuff to support
threading on MacOS X
* backend/plustek_pp*: some cleanup