Merge devel (v1.0.3) into head branch.

DEVEL_2_0_BRANCH-1
Petter Reinholdtsen 2000-08-12 15:10:59 +00:00
rodzic 0093fc7e20
commit 163ac8344f
1 zmienionych plików z 33 dodań i 46 usunięć

Wyświetl plik

@ -2,37 +2,24 @@
#ifdef HAVE_SYS_HW_H #ifdef HAVE_SYS_HW_H
/* OS/2 i/o-port access compatibility macros: */ /* OS/2 i/o-port access compatibility macros: */
# define inb(p) _inp8 (p) # define inb(p) _inp8 (p)
# define outb(v,p) _outp8 ((p),(v)) # define outb(v,p) _outp8 ((p),(v))
# define ioperm(b,l,o) _portaccess ((b),(b)+(l)-1) # define ioperm(b,l,o) _portaccess ((b),(b)+(l)-1)
# define HAVE_IOPERM 1 # define HAVE_IOPERM 1
#endif #endif
#ifndef HAVE_OS2_H
#ifndef O_NONBLOCK #ifndef O_NONBLOCK
# ifdef O_NDELAY # ifdef O_NDELAY
# define O_NONBLOCK O_NDELAY # define O_NONBLOCK O_NDELAY
# else # else
# define O_NONBLOCK FNDELAY /* last resort */ # define O_NONBLOCK FNDELAY /* last resort */
# endif
#endif
#ifndef __GLIBC__
# ifndef u_int8_t
# define u_int8_t u_int8_t
typedef unsigned char u_int8_t;
# endif
# ifndef u_int16_t
# define u_int16_t u_int16_t
typedef unsigned short u_int16_t;
# endif
# ifndef u_int32_t
# define u_int32_t u_int32_t
typedef unsigned int u_int32_t;
# endif # endif
#endif #endif
#endif /* HAVE_OS2_H */
#ifdef HAVE_SIGPROCMASK #ifdef HAVE_SIGPROCMASK
# define SIGACTION sigaction # define SIGACTION sigaction
#else #else
/* Just enough backwards compatibility that we get by in the backends /* Just enough backwards compatibility that we get by in the backends
@ -65,20 +52,20 @@ typedef unsigned int u_int32_t;
# undef SIG_SETMASK # undef SIG_SETMASK
# endif # endif
# define sigset_t int # define sigset_t int
# define sigemptyset(set) do { *(set) = 0; } while (0) # define sigemptyset(set) do { *(set) = 0; } while (0)
# define sigfillset(set) do { *(set) = ~0; } while (0) # define sigfillset(set) do { *(set) = ~0; } while (0)
# define sigaddset(set,signal) do { *(set) |= sigmask (signal); } while (0) # define sigaddset(set,signal) do { *(set) |= sigmask (signal); } while (0)
# define sigdelset(set,signal) do { *(set) &= ~sigmask (signal); } while (0) # define sigdelset(set,signal) do { *(set) &= ~sigmask (signal); } while (0)
# define sigaction(sig,new,old) sigvec (sig,new,old) # define sigaction(sig,new,old) sigvec (sig,new,old)
/* Note: it's not safe to just declare our own "struct sigaction" since /* Note: it's not safe to just declare our own "struct sigaction" since
some systems (e.g., some versions of OpenStep) declare that structure, some systems (e.g., some versions of OpenStep) declare that structure,
but do not implement sigprocmask(). Hard to believe, aint it? */ but do not implement sigprocmask(). Hard to believe, aint it? */
# define SIGACTION sigvec # define SIGACTION sigvec
# define SIG_BLOCK 1 # define SIG_BLOCK 1
# define SIG_UNBLOCK 2 # define SIG_UNBLOCK 2
# define SIG_SETMASK 3 # define SIG_SETMASK 3
#endif /* !HAVE_SIGPROCMASK */ #endif /* !HAVE_SIGPROCMASK */
/* Declare the entry points: */ /* Declare the entry points: */
@ -89,11 +76,11 @@ extern SANE_Status ENTRY(open) (SANE_String_Const, SANE_Handle *);
extern const SANE_Option_Descriptor * extern const SANE_Option_Descriptor *
ENTRY(get_option_descriptor) (SANE_Handle, SANE_Int); ENTRY(get_option_descriptor) (SANE_Handle, SANE_Int);
extern SANE_Status ENTRY(control_option) (SANE_Handle, SANE_Int, SANE_Action, extern SANE_Status ENTRY(control_option) (SANE_Handle, SANE_Int, SANE_Action,
void *, SANE_Word *); void *, SANE_Word *);
extern SANE_Status ENTRY(get_parameters) (SANE_Handle, SANE_Parameters *); extern SANE_Status ENTRY(get_parameters) (SANE_Handle, SANE_Parameters *);
extern SANE_Status ENTRY(start) (SANE_Handle); extern SANE_Status ENTRY(start) (SANE_Handle);
extern SANE_Status ENTRY(read) (SANE_Handle, SANE_Byte *, SANE_Int, extern SANE_Status ENTRY(read) (SANE_Handle, SANE_Byte *, SANE_Int,
SANE_Int *); SANE_Int *);
extern SANE_Status ENTRY(set_io_mode) (SANE_Handle, SANE_Bool); extern SANE_Status ENTRY(set_io_mode) (SANE_Handle, SANE_Bool);
extern SANE_Status ENTRY(get_select_fd) (SANE_Handle, SANE_Int *); extern SANE_Status ENTRY(get_select_fd) (SANE_Handle, SANE_Int *);
extern void ENTRY(cancel) (SANE_Handle); extern void ENTRY(cancel) (SANE_Handle);
@ -103,17 +90,17 @@ extern void ENTRY(exit) (void);
#ifndef STUBS #ifndef STUBS
/* Now redirect sane_* calls to backend's functions: */ /* Now redirect sane_* calls to backend's functions: */
#define sane_init(a,b) ENTRY(init) (a,b) #define sane_init(a,b) ENTRY(init) (a,b)
#define sane_get_devices(a,b) ENTRY(get_devices) (a,b) #define sane_get_devices(a,b) ENTRY(get_devices) (a,b)
#define sane_open(a,b) ENTRY(open) (a,b) #define sane_open(a,b) ENTRY(open) (a,b)
#define sane_get_option_descriptor(a,b) ENTRY(get_option_descriptor) (a,b) #define sane_get_option_descriptor(a,b) ENTRY(get_option_descriptor) (a,b)
#define sane_control_option(a,b,c,d,e) ENTRY(control_option) (a,b,c,d,e) #define sane_control_option(a,b,c,d,e) ENTRY(control_option) (a,b,c,d,e)
#define sane_get_parameters(a,b) ENTRY(get_parameters) (a,b) #define sane_get_parameters(a,b) ENTRY(get_parameters) (a,b)
#define sane_start(a) ENTRY(start) (a) #define sane_start(a) ENTRY(start) (a)
#define sane_read(a,b,c,d) ENTRY(read) (a,b,c,d) #define sane_read(a,b,c,d) ENTRY(read) (a,b,c,d)
#define sane_set_io_mode(a,b) ENTRY(set_io_mode) (a,b) #define sane_set_io_mode(a,b) ENTRY(set_io_mode) (a,b)
#define sane_get_select_fd(a,b) ENTRY(get_select_fd) (a,b) #define sane_get_select_fd(a,b) ENTRY(get_select_fd) (a,b)
#define sane_cancel(a) ENTRY(cancel) (a) #define sane_cancel(a) ENTRY(cancel) (a)
#define sane_close(a) ENTRY(close) (a) #define sane_close(a) ENTRY(close) (a)
#define sane_exit(a) ENTRY(exit) (a) #define sane_exit(a) ENTRY(exit) (a)
#endif /* STUBS */ #endif /* STUBS */