Wykres commitów

10 Commity (be5e93a8fd90110a26a2adefb05e58c0d6b21cb2)

Autor SHA1 Wiadomość Data
Volker Diels-Grabsch baec5e0395 Use consistently __func__ instead of __FUNCTION__
Some parts of SANE used __FUNCTION__ while other parts used __func__.
Now, __func__ is used consistently throughout the SANE sources.  This
fixes all occurrences of the following GCC warning:

warning: ISO C does not support '__FUNCTION__' predefined identifier
2015-12-20 15:27:45 +09:00
Chris Bagwell 1aa332d710 Updates to use sockets on mingw
Add missing WSAStartup() and WSACleanup() code required
on windows to use ws2_32 library.

Also, O_NONBLOCK is tricky even on other platforms so create
a function to set that so portability logic doesn't need to be
done in every backend.  Windows requires using a non standard
function to enable nonblocking mode and also doesn't support
querying current state.
2011-11-07 21:49:54 -06:00
Chris Bagwell 5061c2d5b2 More mingw portability updates.
Add check for winsock2.h for socket.h replancement. Also, use this
check to add ws2_32 library. Also, switch all winsock.h references
to winsock2.h.

Add check for getuid and getpass; which are not on mingw.

Add a syslog() replacement that is basically a print(). This
is also used by vsyslog() replacement.

Comment out parts of replacement sigprocmask.c on mingw.

To support these configure.in changes, I need to rebuild all
related files with autoconf 2.68 and libtool 2.4. Hand ported
our sane-backend specific changes to newer ltmain.sh.
2011-11-06 12:40:00 -06:00
Chris Bagwell 9bdff1dbdf mingw32 compile fixes
The following updates were made to all directories but backends.
That still needs work. There are also still some pthread issues
and syslog is missing.

 Windows doesn't support SIGHUP or SIGPIPE so make that optional.
 Only include socket header files when sys/socket.h is detected.
 Use winsock.h on windows.
 Only include syslog.h when vsyslog() was detect by configure.
 Skip FD_CLOEXEC when not supported by OS (not defined).
 Only include sys/ioctl.h on platforms that define it.
2011-11-05 11:19:34 -05:00
chris@cnpbagwell.com 581b94fb88 Fix sanei_tcp_read(). Revert some getopt logic.
* sanei/sanie_tcp.c, backend/epson2_net.c: Update
sanei_tcp_read() to better simulate old behavior of MSG_WAITALL.
recv() tends to return MTU sized chunks of data without that option.  And at
least cygwin doesn't support MSG_WAITALL.  Re-enable epson2 using that
function for big recieves.
* libgetopt.c, libgetopt1.c:
Revert some logic meant to be used only when we were always compiling
interal getopt() functions.  Fix header filename.
2009-06-09 19:12:43 -05:00
Chris Bagwell b52b0c0c14 * backend/epson2.c backend/pixma_bjnp.c, include/sane/sanei_backend.h,
sanei/sanei_tcp.c, sanie/sanei_udp.c: Improve portablity by
  removing usage of MSG_WAITALL since not all platforms support
  that (cygwin).  Default is to be blocking anyways.  Changed
  usage of MSG_NOTWAIT to use fcntl() function as needed as well.
  * configure.in, lib/Makefile.in, lib/strcasestr.c: Add internal
  strcasestr() for platforms missing it (cygwin).
  * pixma_common.c: My source match header prototype for picky
  compilers (cygwin).
  * backend/umax_pp_mid.c: Allow BACKEND_NAME to be filename
  yet debug to be SANE_DEBUG_UMAX_PP to match man page.
2009-01-29 15:10:19 +00:00
Alessandro Zummo 5af50cf25d fix compilation with cygwin
closes: #307969
2008-01-08 23:04:04 +00:00
Alessandro Zummo 7a34d599e5 * sanei/sanei_tcp.c: added a missing include
* backend/epson2.c: fixed a bug while moving scanner data,
removed support for line mode (block or ext modes will be used).
2007-01-20 20:59:05 +00:00
Alessandro Zummo bf5a1290f7 * epson2: restructured code once more, splitted
in multiple files, added networking
support, added FS G extended handshaking mode,
make proper use of extended commands when possible
* sanei/sanei_tcp.c: read now wait until all
the requested data is available.
2006-12-18 00:13:09 +00:00
Alessandro Zummo b400664851 2006-12-01 Alessandro Zummo <a.zummo@towertech.it>
* Added sanei_tcp interface.
2006-11-30 23:23:19 +00:00