kopia lustrzana https://gitlab.com/sane-project/backends
Add support for winpthreads needed by mingw64
Keep existing pthread-win32 support. Based on work from Michael Cronenworth for Fedora's mingw64 sane-backends package.merge-requests/1/head
rodzic
bc2dc68fa5
commit
8b0e4257a9
|
@ -1,3 +1,9 @@
|
||||||
|
2013-08-15 Chris Bagwell <chris@cnpbagwell.com>
|
||||||
|
* sanei/sanei_thread.c: Add support for winpthreads used by
|
||||||
|
mingw64 in addition to preexisting support for pthread-win32 used
|
||||||
|
by mingw32. Based on work from Michael Cronenworth for
|
||||||
|
Fedora's mingw64 sane-backends package.
|
||||||
|
|
||||||
2013-08-15 Chris Bagwell <chris@cnpbagwell.com>
|
2013-08-15 Chris Bagwell <chris@cnpbagwell.com>
|
||||||
* configure.in: Make snmp detection work better when cross conmpiling;
|
* configure.in: Make snmp detection work better when cross conmpiling;
|
||||||
such as mingw builds on Fedora host. Most likely, net-snmp-config
|
such as mingw builds on Fedora host. Most likely, net-snmp-config
|
||||||
|
|
|
@ -123,7 +123,11 @@ sanei_thread_set_invalid( SANE_Pid *pid )
|
||||||
{
|
{
|
||||||
|
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
|
#ifdef WINPTHREAD_API
|
||||||
|
*pid = 0;
|
||||||
|
#else
|
||||||
pid->p = 0;
|
pid->p = 0;
|
||||||
|
#endif
|
||||||
#else
|
#else
|
||||||
*pid = -1;
|
*pid = -1;
|
||||||
#endif
|
#endif
|
||||||
|
@ -136,7 +140,11 @@ sanei_thread_is_invalid( SANE_Pid pid )
|
||||||
SANE_Bool rc = SANE_FALSE;
|
SANE_Bool rc = SANE_FALSE;
|
||||||
|
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
|
#ifdef WINPTHREAD_API
|
||||||
|
if (pid == 0)
|
||||||
|
#else
|
||||||
if (pid.p == 0)
|
if (pid.p == 0)
|
||||||
|
#endif
|
||||||
rc = SANE_TRUE;
|
rc = SANE_TRUE;
|
||||||
#else
|
#else
|
||||||
if (pid == -1)
|
if (pid == -1)
|
||||||
|
@ -156,7 +164,11 @@ sanei_thread_pid_to_long( SANE_Pid pid )
|
||||||
int rc;
|
int rc;
|
||||||
|
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
|
#ifdef WINPTHREAD_API
|
||||||
|
rc = pid;
|
||||||
|
#else
|
||||||
rc = pid.p;
|
rc = pid.p;
|
||||||
|
#endif
|
||||||
#else
|
#else
|
||||||
rc = pid;
|
rc = pid;
|
||||||
#endif
|
#endif
|
||||||
|
|
Ładowanie…
Reference in New Issue