From 0bfa79c37976d144f1746bba03f72bc92db22df4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E6=98=8A=E8=8B=8F?= Date: Mon, 27 May 2024 11:21:50 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E6=96=B0=E5=A2=9EREADME=5Fzh.md=E3=80=81RE?= =?UTF-8?q?ADME.md=E5=92=8CREADME.OpenSource=E6=96=87=E4=BB=B6=20Signed-of?= =?UTF-8?q?f-by:liuhaosu@huawei.com?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 刘昊苏 --- README.OpenSource | 11 +++++ README.md | 120 ++++++++++++++++++++++++++++++++++++++++++++++ README_zh.md | 118 +++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 249 insertions(+) create mode 100644 README.OpenSource create mode 100644 README.md create mode 100644 README_zh.md diff --git a/README.OpenSource b/README.OpenSource new file mode 100644 index 000000000..9e7cc95b9 --- /dev/null +++ b/README.OpenSource @@ -0,0 +1,11 @@ +[ + { + "Name" : "backends", + "License" : "GPL v2", + "License File" : "LICENSE", + "Version Number" : "1.1.1", + "Owner" : "guoshengbang@huawei.com", + "Upstream URL" : "https://gitlab.com/sane-project/backends/-/releases/1.1.1", + "Description" : "SANE stands is an application programming interface (API) that provides standardized access to any raster image scanner hardware. " + } +] diff --git a/README.md b/README.md new file mode 100644 index 000000000..305ca07e9 --- /dev/null +++ b/README.md @@ -0,0 +1,120 @@ +# SANE +## Introduction +SANE is an application programming interface (API) that provides standardized access to any raster image scanner hardware (flatbed scanner, hand-held scanner, video- and still-cameras, frame-grabbers, etc.). + +You can also learn more about the SANE project through [the official website](http://sane-project.org/) + +## Background Brief +In the process of OpenHarmony's southward ecological development, it is necessary to be compatible with printers in the stock market. The use of CUPS printing system can directly connect with most printers in the market, which also reduces the difficulty for printer manufacturers to adapt to OpenHarmony. + +## Directory structure +``` +- LICENSE Copyright File +- OAT.xml OAT.XML filtering configuration file +- README.OpenSource Project README OpenSource files +- README.md English Description +- README_zh.md Chinese Description +- backend scanning device backend source code +- include SANE API interface +- lib SANE library source code +- sanei SANE internal utility functions and tools +- doc documents and instruction files +``` + +## How to use +### 1、Header file import +```c +#include +``` +### 2、Add Compilation Dependency +Add in the bundle. json file +```json +"deps": { + "third_party": [ + "backends" + ] +} +``` +Add dependencies where needed in BUILD.gn + +```json +deps += [ "//third_party/backends:third_sane" ] +``` +### 3、Example of interface usage +```c +SANE_Status status; +SANE_Handle handle; + +// Initialize SANE +status = sane_init(NULL, NULL); +if (status != SANE_STATUS_GOOD) { + fprintf(stderr, "Failed to initialize SANE: %s\n", sane_strstatus(status)); + return 1; +} + +// Open the first scanner device +status = sane_open("your_scanner_device_name", &handle); +if (status != SANE_STATUS_GOOD) { + fprintf(stderr, "Failed to open scanner: %s\n", sane_strstatus(status)); + return 1; +} + +// Get scanner device information +const SANE_Device *device_info; +status = sane_get_devices(&device_info, SANE_FALSE); +if (status != SANE_STATUS_GOOD) { + fprintf(stderr, "Failed to get scanner device information: %s\n", sane_strstatus(status)); + return 1; +} + +// Set scan parameters +SANE_Parameters parameters; +status = sane_get_parameters(handle, ¶meters); +if (status != SANE_STATUS_GOOD) { + fprintf(stderr, "Failed to get scan parameters: %s\n", sane_strstatus(status)); + return 1; +} + +// Start scanning +SANE_Image image; +status = sane_start(handle); +if (status != SANE_STATUS_GOOD) { + fprintf(stderr, "Failed to start scanning: %s\n", sane_strstatus(status)); + return 1; +} + +// Read scan data +do { + status = sane_read(handle, &image); + if (status != SANE_STATUS_GOOD) { + fprintf(stderr, "Failed to read scan data: %s\n", sane_strstatus(status)); + break; + } + +} while (status == SANE_STATUS_GOOD); + +// Finish scanning +status = sane_cancel(handle); +if (status != SANE_STATUS_GOOD) { + fprintf(stderr, "Failed to cancel scanning: %s\n", sane_strstatus(status)); + return 1; +} + +// Close the scanner device +status = sane_close(handle); +if (status != SANE_STATUS_GOOD) { + fprintf(stderr, "Failed to close scanner: %s\n", sane_strstatus(status)); + return 1; +} + +// Exit SANE +sane_exit(); +``` + +### 相关仓 +[print_print_fwk](https://gitee.com/openharmony/print_print_fwk) + +### 参与贡献 +[How to involve](https://gitee.com/openharmony/docs/blob/HEAD/zh-cn/contribute/参与贡献.md) + +[Commit message spec](https://gitee.com/openharmony/device_qemu/wikis/Commit%20message%E8%A7%84%E8%8C%83) \ No newline at end of file diff --git a/README_zh.md b/README_zh.md new file mode 100644 index 000000000..d5d7a11e6 --- /dev/null +++ b/README_zh.md @@ -0,0 +1,118 @@ +# 三方开源软件sane-backends +## SANE简介 +SANE是一个应用程序编程接口(API),它提供对任何光栅图像扫描仪硬件(平板扫描仪、手持式扫描仪、视频和静态摄像机、帧处理器等)的标准化访问。 + +您也可以通过[CUPS官网主页](https://github.com/OpenPrinting/cups)了解更多关于SANE项目的信息。 + +## 引入背景简述 +OpenHarmony南向生态发展过程中,需要对存量市场的扫描仪进行兼容。使用SANE扫描系统能直接对接市场上大部分的扫描仪,也减少了扫描仪驱动适配OpenHarmony系统的难度。 + +## 目录结构 +``` +- LICENSE 版权文件 +- OAT.xml OAT.xml过滤配置文件 +- README.OpenSource 项目README.OpenSource文件 +- README.md 英文说明 +- README_zh.md 中文说明 +- backend 扫描设备后端源码 +- include SANE API接口 +- lib SANE 库源码 +- sanei SANE 内部实用函数和工具 +- doc 文档和说明文件 +``` + +## 如何使用 +### 1、头文件引入 +```c +#include +``` +### 2、添加编译依赖 +在您的 bundle.json 文件 添加 +```json +"deps": { + "third_party": [ + "backends" + ] +} +``` +在您的BUILD.gn需要的地方添加依赖 +```json +deps += [ "//third_party/backends:third_sane" ] +```c +SANE_Status status; +SANE_Handle handle; + +// Initialize SANE +status = sane_init(NULL, NULL); +if (status != SANE_STATUS_GOOD) { + fprintf(stderr, "Failed to initialize SANE: %s\n", sane_strstatus(status)); + return 1; +} + +// Open the first scanner device +status = sane_open("your_scanner_device_name", &handle); +if (status != SANE_STATUS_GOOD) { + fprintf(stderr, "Failed to open scanner: %s\n", sane_strstatus(status)); + return 1; +} + +// Get scanner device information +const SANE_Device *device_info; +status = sane_get_devices(&device_info, SANE_FALSE); +if (status != SANE_STATUS_GOOD) { + fprintf(stderr, "Failed to get scanner device information: %s\n", sane_strstatus(status)); + return 1; +} + +// Set scan parameters +SANE_Parameters parameters; +status = sane_get_parameters(handle, ¶meters); +if (status != SANE_STATUS_GOOD) { + fprintf(stderr, "Failed to get scan parameters: %s\n", sane_strstatus(status)); + return 1; +} + +// Start scanning +SANE_Image image; +status = sane_start(handle); +if (status != SANE_STATUS_GOOD) { + fprintf(stderr, "Failed to start scanning: %s\n", sane_strstatus(status)); + return 1; +} + +// Read scan data +do { + status = sane_read(handle, &image); + if (status != SANE_STATUS_GOOD) { + fprintf(stderr, "Failed to read scan data: %s\n", sane_strstatus(status)); + break; + } + +} while (status == SANE_STATUS_GOOD); + +// Finish scanning +status = sane_cancel(handle); +if (status != SANE_STATUS_GOOD) { + fprintf(stderr, "Failed to cancel scanning: %s\n", sane_strstatus(status)); + return 1; +} + +// Close the scanner device +status = sane_close(handle); +if (status != SANE_STATUS_GOOD) { + fprintf(stderr, "Failed to close scanner: %s\n", sane_strstatus(status)); + return 1; +} + +// Exit SANE +sane_exit(); +``` + +### 相关仓 +[print_print_fwk](https://gitee.com/openharmony/print_print_fwk) + +### 参与贡献 +[如何贡献](https://gitee.com/openharmony/docs/blob/HEAD/zh-cn/contribute/参与贡献.md) + +[Commit message规范](https://gitee.com/openharmony/device_qemu/wikis/Commit%20message%E8%A7%84%E8%8C%83) + -- Gitee From fc886c5ac6360582b81eca0d27d871f5e4e9cdf2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E6=98=8A=E8=8B=8F?= Date: Thu, 11 Jul 2024 19:27:26 +0800 Subject: [PATCH 2/3] =?UTF-8?q?sane-backends=E6=96=B0=E5=A2=9Ehilog?= =?UTF-8?q?=E6=97=A5=E5=BF=97=E6=89=93=E5=8D=B0=20Signed-off-by:liuhaosu@h?= =?UTF-8?q?uawei.com?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 刘昊苏 --- bundle.json | 13 ++++++++++++- include/sane/sanei_debug.h | 5 +++++ sanei/sanei_init_debug.c | 2 ++ 3 files changed, 19 insertions(+), 1 deletion(-) diff --git a/bundle.json b/bundle.json index a13a0ff14..bc514030d 100644 --- a/bundle.json +++ b/bundle.json @@ -32,7 +32,18 @@ "sub_component": [ "//third_party/backends:third_sane" ], - "inner_kits": [], + "inner_kits": [ + { + "name": "//third_party/backends:third_sane", + "header": { + "header_files": [ + "sane/sane.h", + "sane/saneopts.h" + ], + "header_base": "//third_party/backends/include" + } + } + ], "test": [] } } diff --git a/include/sane/sanei_debug.h b/include/sane/sanei_debug.h index 465d3e25e..f948f7dec 100644 --- a/include/sane/sanei_debug.h +++ b/include/sane/sanei_debug.h @@ -9,6 +9,7 @@ #include +#include "hilog/log.h" #ifdef __cplusplus extern "C" { #endif @@ -79,7 +80,11 @@ extern void sanei_debug_ndebug (int level, const char *msg, ...); # define DBG_LEVEL (0) # define DBG_INIT() +#ifndef ENABLE_HILOG # define DBG sanei_debug_ndebug +#else +# define DBG(level, ...) ((void)HiLogPrint(LOG_APP, LOG_INFO, 0, "sanekit", __VA_ARGS__)) +#endif # define IF_DBG(x) #else /* !NDEBUG */ diff --git a/sanei/sanei_init_debug.c b/sanei/sanei_init_debug.c index 690cc2eca..fe21f7756 100644 --- a/sanei/sanei_init_debug.c +++ b/sanei/sanei_init_debug.c @@ -107,6 +107,7 @@ sanei_init_debug (const char * backend, int * var) DBG (0, "Setting debug level of %s to %d.\n", backend, *var); } +#if defined(LOG_DEBUG) static int is_socket (int fd) { @@ -122,6 +123,7 @@ is_socket (int fd) return 0; #endif } +#endif void sanei_debug_msg -- Gitee From 8a405043fbe03c82632533fa21311303da670c3d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E6=98=8A=E8=8B=8F?= Date: Thu, 11 Jul 2024 20:43:36 +0800 Subject: [PATCH 3/3] =?UTF-8?q?sane-backends=E6=96=B0=E5=A2=9Econfig.h=20S?= =?UTF-8?q?igned-off-by:liuhaosu@huawei.com?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 刘昊苏 --- include/sane/.gitignore | 2 +- include/sane/config.h | 784 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 785 insertions(+), 1 deletion(-) create mode 100644 include/sane/config.h diff --git a/include/sane/.gitignore b/include/sane/.gitignore index f282c157d..7240c56aa 100644 --- a/include/sane/.gitignore +++ b/include/sane/.gitignore @@ -1,3 +1,3 @@ config.h.in -config.h +# config.h stamp-h1 diff --git a/include/sane/config.h b/include/sane/config.h new file mode 100644 index 000000000..22234857f --- /dev/null +++ b/include/sane/config.h @@ -0,0 +1,784 @@ +/* include/sane/config.h. Generated from config.h.in by configure. */ +/* include/sane/config.h.in. Generated from configure.ac by autoheader. */ + +/* Define if building universal (internal helper macro) */ +/* #undef AC_APPLE_UNIVERSAL_BUILD */ + +/* Define to 1 if using 'alloca.c'. */ +/* #undef C_ALLOCA */ + +/* Define to 1 if use sanei_debug_ndebug*/ +#define NDEBUG 1 + +/* Define to 1 if the system supports IPv6 */ +#define ENABLE_IPV6 1 + +/* Define to 1 if device locking should be enabled. */ +#define ENABLE_LOCKING 1 + +/* Define to 1 if translation of program messages to the user's native + language is requested. */ +#define ENABLE_NLS 1 + +/* Define if GPLogFunc does not take a va_list. */ +/* #undef GPLOGFUNC_NO_VARGS */ + +/* Define to 1 if struct sockaddr_storage has an ss_family member */ +#define HAS_SS_FAMILY 1 + +/* Define to 1 if struct sockaddr_storage has __ss_family instead of ss_family + */ +/* #undef HAS___SS_FAMILY */ + +/* Define to 1 if you have 'alloca', as a function or macro. */ +#define HAVE_ALLOCA 1 + +/* Define to 1 if works. */ +#define HAVE_ALLOCA_H 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_APOLLO_SCSI_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_ASM_IO_H */ + +/* Define to 1 if you have the header file. */ +#define HAVE_ASM_TYPES_H 1 + +/* Define to 1 if you have the `atexit' function. */ +#define HAVE_ATEXIT 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_BE_KERNEL_OS_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_BSD_DEV_SCSIREG_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_CAMLIB_H */ + +/* Define to 1 if you have the Mac OS X function CFLocaleCopyCurrent in the + CoreFoundation framework. */ +/* #undef HAVE_CFLOCALECOPYCURRENT */ + +/* Define to 1 if you have the `cfmakeraw' function. */ +#define HAVE_CFMAKERAW 1 + +/* Define to 1 if you have the Mac OS X function CFPreferencesCopyAppValue in + the CoreFoundation framework. */ +/* #undef HAVE_CFPREFERENCESCOPYAPPVALUE */ + +/* define if the compiler supports basic C++11 syntax */ +#define HAVE_CXX11 1 + +/* Define if the GNU dcgettext() function is already present or preinstalled. + */ +#define HAVE_DCGETTEXT 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_DDK_NTDDSCSI_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_DEV_PPBUS_PPI_H */ + +/* Is /dev/urandom available? */ +#define HAVE_DEV_URANDOM 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_DLFCN_H 1 + +/* Define to 1 if you have the `dlopen' function. */ +#define HAVE_DLOPEN 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_DL_H */ + +/* Define to 1 if you have the header file. */ +#define HAVE_FCNTL_H 1 + +/* Define to 1 if you have the `getaddrinfo' function. */ +#define HAVE_GETADDRINFO 1 + +/* Define to 1 if you have the `getenv' function. */ +#define HAVE_GETENV 1 + +/* Define to 1 if you have the `getnameinfo' function. */ +#define HAVE_GETNAMEINFO 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_GETOPT_H 1 + +/* Define to 1 if you have the `getopt_long' function. */ +#define HAVE_GETOPT_LONG 1 + +/* Define to 1 if you have the `getpagesize' function. */ +#define HAVE_GETPAGESIZE 1 + +/* Define to 1 if you have the `getpass' function. */ +#define HAVE_GETPASS 1 + +/* Define if the GNU gettext() function is already present or preinstalled. */ +#define HAVE_GETTEXT 1 + +/* Define to 1 if you have the `getuid' function. */ +#define HAVE_GETUID 1 + +/* Define to 1 if you have the `gp_camera_init' function. */ +/* #undef HAVE_GP_CAMERA_INIT */ + +/* Define to 1 if you have the `gp_port_info_get_path' function. */ +/* #undef HAVE_GP_PORT_INFO_GET_PATH */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_GSCDDS_H */ + +/* Define to 1 if you have the `i386_set_ioperm' function. */ +/* #undef HAVE_I386_SET_IOPERM */ + +/* Define if you have the iconv() function and it works. */ +/* #undef HAVE_ICONV */ + +/* Define to 1 if you have the header file. */ +#define HAVE_IFADDRS_H 1 + +/* Define to 1 if you have the `inet_addr' function. */ +#define HAVE_INET_ADDR 1 + +/* Define to 1 if you have the `inet_aton' function. */ +#define HAVE_INET_ATON 1 + +/* Define to 1 if you have the `inet_ntoa' function. */ +#define HAVE_INET_NTOA 1 + +/* Define to 1 if you have the `inet_ntop' function. */ +#define HAVE_INET_NTOP 1 + +/* Define to 1 if you have the `inet_pton' function. */ +#define HAVE_INET_PTON 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_INTTYPES_H 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_IOKIT_CDB_IOSCSILIB_H */ + +/* Define to 1 if you have the + header file. */ +/* #undef HAVE_IOKIT_SCSI_COMMANDS_SCSICOMMANDOPERATIONCODES_H */ + +/* Define to 1 if you have the header + file. */ +/* #undef HAVE_IOKIT_SCSI_SCSICOMMANDOPERATIONCODES_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_IOKIT_SCSI_SCSITASKLIB_H */ + +/* Define to 1 if you have the `ioperm' function. */ +#define HAVE_IOPERM 1 + +/* Define to 1 if you have the `iopl' function. */ +#define HAVE_IOPL 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_IO_CAM_CAM_H */ + +/* Define to 1 if you have the `jpeg_crop_scanline' function. */ +#define HAVE_JPEG_CROP_SCANLINE 1 + +/* Define to 1 if you have the `jpeg_skip_scanlines' function. */ +#define HAVE_JPEG_SKIP_SCANLINES 1 + +/* Define to 1 if libcurl is available */ +#define HAVE_LIBCURL 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_LIBC_H */ + +/* Define to 1 if you have the `ieee1284' library (-lcam). */ +/* #undef HAVE_LIBIEEE1284 */ + +/* Define to 1 if you have the libjpeg library. */ +#define HAVE_LIBJPEG 1 + +/* Define to 1 if you have the libpng library. */ +#define HAVE_LIBPNG 1 + +/* Define to 1 if libsnmp is available */ +#define HAVE_LIBSNMP 0 + +/* Define to 1 if you have libusb-1.0 */ +#define HAVE_LIBUSB 1 + +/* Define to 1 if you have libusb-0.1 */ +/* #undef HAVE_LIBUSB_LEGACY */ + +/* Define to 1 if libxml2 is available */ +#define HAVE_LIBXML2 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_LIMITS_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_LINUX_PPDEV_H 1 + +/* Define if the long long type is available. */ +#define HAVE_LONG_LONG 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_LUSB0_USB_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_MACHINE_CPUFUNC_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_MACH_O_DYLD_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_MINIX_CONFIG_H */ + +/* Define to 1 if you have the `mkdir' function. */ +#define HAVE_MKDIR 1 + +/* Define to 1 if you have a working `mmap' system call. */ +#define HAVE_MMAP 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_NETINET_IN_H 1 + +/* Define to 1 if you have the `NSLinkModule' function. */ +/* #undef HAVE_NSLINKMODULE */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_NTDDSCSI_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_OS2_H */ + +/* Define to 1 if you have the `poll' function. */ +#define HAVE_POLL 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_POLL_H 1 + +/* Define to 1 if libpoppler-glib is available */ +//#define HAVE_POPPLER_GLIB 0 + +/* Define to 1 if you have the `pthread_cancel' function. */ +#define HAVE_PTHREAD_CANCEL 1 + +/* Define to 1 if you have the `pthread_create' function. */ +#define HAVE_PTHREAD_CREATE 1 + +/* Define to 1 if you have the `pthread_detach' function. */ +#define HAVE_PTHREAD_DETACH 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_PTHREAD_H 1 + +/* Define to 1 if you have the `pthread_join' function. */ +#define HAVE_PTHREAD_JOIN 1 + +/* Define to 1 if you have the `pthread_kill' function. */ +#define HAVE_PTHREAD_KILL 1 + +/* Define to 1 if you have the `pthread_testcancel' function. */ +#define HAVE_PTHREAD_TESTCANCEL 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_PWD_H 1 + +/* define if you have the resmgr library */ +/* #undef HAVE_RESMGR */ + +/* Define to 1 if you have the `scsireq_enter' function. */ +/* #undef HAVE_SCSIREQ_ENTER */ + +/* Define if SCSITaskSGElement is available. */ +/* #undef HAVE_SCSITASKSGELEMENT */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_SCSI_H */ + +/* Define to 1 if you have the header file. */ +#define HAVE_SCSI_SG_H 1 + +/* Define to 1 if you have the `setitimer' function. */ +#define HAVE_SETITIMER 1 + +/* Define if sg_header.target_status is available. */ +#define HAVE_SG_TARGET_STATUS 1 + +/* Define to 1 if you have the `shl_load' function. */ +/* #undef HAVE_SHL_LOAD */ + +/* Define to 1 if you have the `sigprocmask' function. */ +#define HAVE_SIGPROCMASK 1 + +/* Define to 1 if you have the `sleep' function. */ +#define HAVE_SLEEP 1 + +/* Define to 1 if you have the `snprintf' function. */ +#define HAVE_SNPRINTF 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDINT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDIO_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDLIB_H 1 + +/* Define to 1 if you have the `strcasecmp' function. */ +#define HAVE_STRCASECMP 1 + +/* Define to 1 if you have the `strcasestr' function. */ +#define HAVE_STRCASESTR 1 + +/* Define to 1 if you have the `strdup' function. */ +#define HAVE_STRDUP 1 + +/* Define to 1 if you have the `strftime' function. */ +#define HAVE_STRFTIME 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRINGS_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRING_H 1 + +/* Define to 1 if you have the `strncasecmp' function. */ +#define HAVE_STRNCASECMP 1 + +/* Define to 1 if you have the `strndup' function. */ +#define HAVE_STRNDUP 1 + +/* Define to 1 if you have the `strsep' function. */ +#define HAVE_STRSEP 1 + +/* Define to 1 if you have the `strstr' function. */ +#define HAVE_STRSTR 1 + +/* Define to 1 if you have the `strtod' function. */ +#define HAVE_STRTOD 1 + +/* Define if struct flock is available. */ +#define HAVE_STRUCT_FLOCK 1 + +/* Define to 1 if you have the `syslog' function. */ +#define HAVE_SYSLOG 1 + +/* Is /usr/include/systemd/sd-daemon.h available? */ +#define HAVE_SYSTEMD 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_SYS_DSREQ_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_SYS_HW_H */ + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_IOCTL_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_IO_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_IPC_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_PARAM_H 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_SYS_PASSTHRUDEF_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_SYS_SCANIO_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_SYS_SCSICMD_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_SYS_SCSIIO_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_SYS_SCSI_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_SYS_SCSI_SCSI_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_SYS_SCSI_SGDEFS_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_SYS_SCSI_TARGETS_SCGIO_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_SYS_SDI_COMM_H */ + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_SELECT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_SEM_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_SHM_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_SOCKET_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_STAT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_TIME_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_TYPES_H 1 + +/* Define to 1 if you have the `tcsendbreak' function. */ +#define HAVE_TCSENDBREAK 1 + +/* Define to 1 if you have the header file. */ +//#define HAVE_TIFFIO_H 0 + +/* Define if union semun is available. */ +/* #undef HAVE_UNION_SEMUN */ + +/* Define to 1 if you have the header file. */ +#define HAVE_UNISTD_H 1 + +/* Define to 1 if you have usbcall.dll. */ +/* #undef HAVE_USBCALLS */ + +/* Define to 1 if you have the `usleep' function. */ +#define HAVE_USLEEP 1 + +/* Define to 1 if the system has the type `u_char'. */ +#define HAVE_U_CHAR 1 + +/* Define to 1 if the system has the type `u_int'. */ +#define HAVE_U_INT 1 + +/* Define to 1 if the system has the type `u_long'. */ +#define HAVE_U_LONG 1 + +/* Define to 1 if the system has the type `u_short'. */ +#define HAVE_U_SHORT 1 + +/* Define to 1 if you have the `vsyslog' function. */ +// #define HAVE_VSYSLOG 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_WCHAR_H 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_WINDOWS_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_WINSOCK2_H */ + +/* Define to 1 if you have the `_portaccess' function. */ +/* #undef HAVE__PORTACCESS */ + +/* Define to the sub-directory where libtool stores uninstalled libraries. */ +#define LT_OBJDIR ".libs/" + +/* Name of package */ +#define PACKAGE "sane-backends" + +/* Define to the address where bug reports for this package should be sent. */ +#define PACKAGE_BUGREPORT "sane-devel@alioth-lists.debian.net" + +/* Define to the full name of this package. */ +#define PACKAGE_NAME "sane-backends" + +/* Define to the full name and version of this package. */ +#define PACKAGE_STRING "sane-backends 1.1.1.404-596f7" + +/* Define to the one symbol short name of this package. */ +#define PACKAGE_TARNAME "sane-backends" + +/* Define to the home page for this package. */ +#define PACKAGE_URL "" + +/* Define to the version of this package. */ +#define PACKAGE_VERSION "1.1.1.404-596f7" + +/* Define if pthread_t is integer. */ +#define PTHREAD_T_IS_INTEGER 1 + +/* SANE DLL revision number */ +#define SANE_DLL_V_BUILD 1 + +/* SANE DLL major number */ +#define SANE_DLL_V_MAJOR 1 + +/* SANE DLL minor number */ +#define SANE_DLL_V_MINOR 1 + +/* Define to 1 if you have the providing inb,outb. */ +#define SANE_HAVE_SYS_IO_H_WITH_INB_OUTB 1 + +/* SCSI command buffer size */ +#define SCSIBUFFERSIZE 131072 + +/* The size of `char', as computed by sizeof. */ +/* #undef SIZEOF_CHAR */ + +/* The size of `int', as computed by sizeof. */ +/* #undef SIZEOF_INT */ + +/* The size of `long', as computed by sizeof. */ +/* #undef SIZEOF_LONG */ + +/* The size of `short', as computed by sizeof. */ +/* #undef SIZEOF_SHORT */ + +/* The size of `void*', as computed by sizeof. */ +/* #undef SIZEOF_VOIDP */ + +/* If using the C implementation of alloca, define if you know the + direction of stack growth for your system; otherwise it will be + automatically deduced at runtime. + STACK_DIRECTION > 0 => grows toward higher addresses + STACK_DIRECTION < 0 => grows toward lower addresses + STACK_DIRECTION = 0 => direction of growth unknown */ +/* #undef STACK_DIRECTION */ + +/* Define to 1 if all of the C90 standard headers exist (not just the ones + required in a freestanding environment). This macro is provided for + backward compatibility; new code need not use it. */ +#define STDC_HEADERS 1 + +/* Define if pthreads should be used instead of forked processes. */ +#define USE_PTHREAD "yes" + +/* Enable extensions on AIX 3, Interix. */ +#ifndef _ALL_SOURCE +# define _ALL_SOURCE 1 +#endif +/* Enable general extensions on macOS. */ +#ifndef _DARWIN_C_SOURCE +# define _DARWIN_C_SOURCE 1 +#endif +/* Enable general extensions on Solaris. */ +#ifndef __EXTENSIONS__ +# define __EXTENSIONS__ 1 +#endif +/* Enable GNU extensions on systems that have them. */ +#ifndef _GNU_SOURCE +# define _GNU_SOURCE 1 +#endif +/* Enable X/Open compliant socket functions that do not require linking + with -lxnet on HP-UX 11.11. */ +#ifndef _HPUX_ALT_XOPEN_SOCKET_API +# define _HPUX_ALT_XOPEN_SOCKET_API 1 +#endif +/* Identify the host operating system as Minix. + This macro does not affect the system headers' behavior. + A future release of Autoconf may stop defining this macro. */ +#ifndef _MINIX +/* # undef _MINIX */ +#endif +/* Enable general extensions on NetBSD. + Enable NetBSD compatibility extensions on Minix. */ +#ifndef _NETBSD_SOURCE +# define _NETBSD_SOURCE 1 +#endif +/* Enable OpenBSD compatibility extensions on NetBSD. + Oddly enough, this does nothing on OpenBSD. */ +#ifndef _OPENBSD_SOURCE +# define _OPENBSD_SOURCE 1 +#endif +/* Define to 1 if needed for POSIX-compatible behavior. */ +#ifndef _POSIX_SOURCE +/* # undef _POSIX_SOURCE */ +#endif +/* Define to 2 if needed for POSIX-compatible behavior. */ +#ifndef _POSIX_1_SOURCE +/* # undef _POSIX_1_SOURCE */ +#endif +/* Enable POSIX-compatible threading on Solaris. */ +#ifndef _POSIX_PTHREAD_SEMANTICS +# define _POSIX_PTHREAD_SEMANTICS 1 +#endif +/* Enable extensions specified by ISO/IEC TS 18661-5:2014. */ +#ifndef __STDC_WANT_IEC_60559_ATTRIBS_EXT__ +# define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1 +#endif +/* Enable extensions specified by ISO/IEC TS 18661-1:2014. */ +#ifndef __STDC_WANT_IEC_60559_BFP_EXT__ +# define __STDC_WANT_IEC_60559_BFP_EXT__ 1 +#endif +/* Enable extensions specified by ISO/IEC TS 18661-2:2015. */ +#ifndef __STDC_WANT_IEC_60559_DFP_EXT__ +# define __STDC_WANT_IEC_60559_DFP_EXT__ 1 +#endif +/* Enable extensions specified by ISO/IEC TS 18661-4:2015. */ +#ifndef __STDC_WANT_IEC_60559_FUNCS_EXT__ +# define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1 +#endif +/* Enable extensions specified by ISO/IEC TS 18661-3:2015. */ +#ifndef __STDC_WANT_IEC_60559_TYPES_EXT__ +# define __STDC_WANT_IEC_60559_TYPES_EXT__ 1 +#endif +/* Enable extensions specified by ISO/IEC TR 24731-2:2010. */ +#ifndef __STDC_WANT_LIB_EXT2__ +# define __STDC_WANT_LIB_EXT2__ 1 +#endif +/* Enable extensions specified by ISO/IEC 24747:2009. */ +#ifndef __STDC_WANT_MATH_SPEC_FUNCS__ +# define __STDC_WANT_MATH_SPEC_FUNCS__ 1 +#endif +/* Enable extensions on HP NonStop. */ +#ifndef _TANDEM_SOURCE +# define _TANDEM_SOURCE 1 +#endif +/* Enable X/Open extensions. Define to 500 only if necessary + to make mbstate_t available. */ +#ifndef _XOPEN_SOURCE +/* # undef _XOPEN_SOURCE */ +#endif + + +/* Version number of package */ +#define VERSION "1.1.1.404-596f7" + +/* Define to 1 if Avahi support is available */ +#define WITH_AVAHI 1 + +/* define if USB record replay is enabled */ +#define WITH_USB_RECORD_REPLAY 1 + +/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most + significant byte first (like Motorola and SPARC, unlike Intel). */ +#if defined AC_APPLE_UNIVERSAL_BUILD +# if defined __BIG_ENDIAN__ +# define WORDS_BIGENDIAN 1 +# endif +#else +# ifndef WORDS_BIGENDIAN +/* # undef WORDS_BIGENDIAN */ +# endif +#endif + +/* Define to empty if `const' does not conform to ANSI C. */ +/* #undef const */ + +/* Define to `__inline__' or `__inline' if that's what the C compiler + calls it, or to nothing if 'inline' is not supported under any name. */ +#ifndef __cplusplus +/* #undef inline */ +#endif + +/* Define as a signed integer type capable of holding a process identifier. */ +/* #undef pid_t */ + +/* Define scsireq_t as \'struct scsireq\' if necessary. */ +/* #undef scsireq_t */ + +/* Define to `unsigned int' if does not define. */ +/* #undef size_t */ + +/* Define socklen_t as \'int\' if necessary. */ +/* #undef socklen_t */ + +/* Define to `int' if does not define. */ +/* #undef ssize_t */ + +/* Define for OS/2 only */ +/* #undef strcasecmp */ + +/* Define for OS/2 only */ +/* #undef strncasecmp */ + + + +#if defined(__MINGW32__) +#define _BSDTYPES_DEFINED +#endif + +#ifndef HAVE_U_CHAR +#define u_char unsigned char +#endif +#ifndef HAVE_U_SHORT +#define u_short unsigned short +#endif +#ifndef HAVE_U_INT +#define u_int unsigned int +#endif +#ifndef HAVE_U_LONG +#define u_long unsigned long +#endif + +/* Prototype for getenv */ +#ifndef HAVE_GETENV +#define getenv sanei_getenv +char * getenv(const char *name); +#endif + +/* Prototype for inet_ntop */ +#ifndef HAVE_INET_NTOP +#define inet_ntop sanei_inet_ntop +#include +const char * inet_ntop (int af, const void *src, char *dst, size_t cnt); +#endif + +/* Prototype for inet_pton */ +#ifndef HAVE_INET_PTON +#define inet_pton sanei_inet_pton +int inet_pton (int af, const char *src, void *dst); +#endif + +/* Prototype for sigprocmask */ +#ifndef HAVE_SIGPROCMASK +#define sigprocmask sanei_sigprocmask +int sigprocmask (int how, int *new, int *old); +#endif + +/* Prototype for snprintf */ +#ifndef HAVE_SNPRINTF +#define snprintf sanei_snprintf +#include +int snprintf (char *str,size_t count,const char *fmt,...); +#endif + +/* Prototype for strcasestr */ +#ifndef HAVE_STRCASESTR +#define strcasestr sanei_strcasestr +char * strcasestr (const char *phaystack, const char *pneedle); +#endif + +/* Prototype for strdup */ +#ifndef HAVE_STRDUP +#define strdup sanei_strdup +char *strdup (const char * s); +#endif + +/* Prototype for strndup */ +#ifndef HAVE_STRNDUP +#define strndup sanei_strndup +#include +char *strndup(const char * s, size_t n); +#endif + +/* Prototype for strsep */ +#ifndef HAVE_STRSEP +#define strsep sanei_strsep +char *strsep(char **stringp, const char *delim); +#endif + +/* Prototype for usleep */ +#ifndef HAVE_USLEEP +#define usleep sanei_usleep +unsigned int usleep (unsigned int useconds); +#endif + +/* Prototype for vsyslog */ +#ifndef HAVE_VSYSLOG +#include +void vsyslog(int priority, const char *format, va_list args); +#endif + -- Gitee