]>
git.ipfire.org Git - thirdparty/cups.git/blob - vcnet/config.h
88da27f92a64b786fa1c285177dc70ebf5f9d750
2 * Configuration file for CUPS on Windows.
4 * Copyright 2007-2016 by Apple Inc.
5 * Copyright 1997-2007 by Easy Software Products.
7 * These coded instructions, statements, and computer programs are the
8 * property of Apple Inc. and are protected by Federal copyright
9 * law. Distribution and use rights are outlined in the file "LICENSE.txt"
10 * which should have been included with this file. If this file is
11 * file is missing or damaged, see the license at "http://www.cups.org/".
14 #ifndef _CUPS_CONFIG_H_
15 #define _CUPS_CONFIG_H_
18 * Include necessary headers...
30 * Microsoft renames the POSIX functions to _name, and introduces
31 * a broken compatibility layer using the original names. As a result,
32 * random crashes can occur when, for example, strdup() allocates memory
33 * from a different heap than used by malloc() and free().
35 * To avoid moronic problems like this, we #define the POSIX function
36 * names to the corresponding non-standard Microsoft names.
39 #define access _access
41 #define fileno _fileno
43 #define mkdir(d,p) _mkdir(d)
47 #define snprintf _snprintf
48 #define strdup _strdup
49 #define unlink _unlink
50 #define vsnprintf _vsnprintf
55 * Map the POSIX strcasecmp() and strncasecmp() functions to the Win32 stricmp()
56 * and strnicmp() functions...
59 #define strcasecmp stricmp
60 #define strncasecmp strnicmp
64 * Map the POSIX sleep() and usleep() functions to the Win32 Sleep() function...
67 typedef unsigned long useconds_t
;
68 #define sleep(X) Sleep(1000 * (X))
69 #define usleep(X) Sleep((X)/1000)
73 * Map various parameters to Posix style system calls
79 # define O_RDONLY _O_RDONLY
80 # define O_WRONLY _O_WRONLY
81 # define O_CREAT _O_CREAT
82 # define O_TRUNC _O_TRUNC
90 #undef __CHAR_UNSIGNED__
94 * Version of software...
97 #define CUPS_SVERSION "CUPS v2.2.2"
98 #define CUPS_MINIMAL "CUPS/2.2.2"
102 * Default user and groups...
105 #define CUPS_DEFAULT_USER ""
106 #define CUPS_DEFAULT_GROUP ""
107 #define CUPS_DEFAULT_SYSTEM_GROUPS ""
108 #define CUPS_DEFAULT_PRINTOPERATOR_AUTH ""
109 #define CUPS_DEFAULT_SYSTEM_AUTHKEY ""
113 * Default file permissions...
116 #define CUPS_DEFAULT_CONFIG_FILE_PERM 0644
117 #define CUPS_DEFAULT_LOG_FILE_PERM 0644
121 * Default logging settings...
124 #define CUPS_DEFAULT_LOG_LEVEL "warn"
125 #define CUPS_DEFAULT_ACCESS_LOG_LEVEL "none"
129 * Default fatal error settings...
132 #define CUPS_DEFAULT_FATAL_ERRORS "config"
136 * Default browsing settings...
139 #define CUPS_DEFAULT_BROWSING 1
140 #define CUPS_DEFAULT_BROWSE_LOCAL_PROTOCOLS "dnssd"
141 #define CUPS_DEFAULT_DEFAULT_SHARED 1
145 * Default IPP port...
148 #define CUPS_DEFAULT_IPP_PORT 631
152 * Default printcap file...
155 #define CUPS_DEFAULT_PRINTCAP ""
159 * Default Samba and LPD config files...
162 #define CUPS_DEFAULT_SMB_CONFIG_FILE ""
163 #define CUPS_DEFAULT_LPD_CONFIG_FILE ""
167 * Default MaxCopies value...
170 #define CUPS_DEFAULT_MAX_COPIES 9999
174 * Do we have domain socket support, and if so what is the default one?
177 #undef CUPS_DEFAULT_DOMAINSOCKET
181 * Default WebInterface value...
184 #define CUPS_DEFAULT_WEBIF 0
188 * Where are files stored?
190 * Note: These are defaults, which can be overridden by environment
191 * variables at run-time...
194 #define CUPS_BINDIR "C:/CUPS/bin"
195 #define CUPS_CACHEDIR "C:/CUPS/cache"
196 #define CUPS_DATADIR "C:/CUPS/share"
197 #define CUPS_DOCROOT "C:/CUPS/share/doc"
198 #define CUPS_FONTPATH "C:/CUPS/share/fonts"
199 #define CUPS_LOCALEDIR "C:/CUPS/locale"
200 #define CUPS_LOGDIR "C:/CUPS/logs"
201 #define CUPS_REQUESTS "C:/CUPS/spool"
202 #define CUPS_SBINDIR "C:/CUPS/sbin"
203 #define CUPS_SERVERBIN "C:/CUPS/lib"
204 #define CUPS_SERVERROOT "C:/CUPS/etc"
205 #define CUPS_STATEDIR "C:/CUPS/run"
209 * Do we have posix_spawn?
212 /* #undef HAVE_POSIX_SPAWN */
220 #define HAVE_INFLATECOPY 1
224 * Do we have PAM stuff?
227 #define HAVE_LIBPAM 0
228 /* #undef HAVE_PAM_PAM_APPL_H */
229 /* #undef HAVE_PAM_SET_ITEM */
230 /* #undef HAVE_PAM_SETCRED */
234 * Do we have <shadow.h>?
237 /* #undef HAVE_SHADOW_H */
241 * Do we have <crypt.h>?
244 /* #undef HAVE_CRYPT_H */
251 /* #undef HAVE_STDINT_H */
255 * Use <string.h>, <strings.h>, and/or <bstring.h>?
258 #define HAVE_STRING_H 1
259 /* #undef HAVE_STRINGS_H */
260 /* #undef HAVE_BSTRING_H */
264 * Do we have the long long type?
267 /* #undef HAVE_LONG_LONG */
269 #ifdef HAVE_LONG_LONG
270 # define CUPS_LLFMT "%lld"
271 # define CUPS_LLCAST (long long)
273 # define CUPS_LLFMT "%ld"
274 # define CUPS_LLCAST (long)
275 #endif /* HAVE_LONG_LONG */
279 * Do we have the strtoll() function?
282 /* #undef HAVE_STRTOLL */
285 # define strtoll(nptr,endptr,base) strtol((nptr), (endptr), (base))
286 #endif /* !HAVE_STRTOLL */
290 * Do we have the strXXX() functions?
293 #define HAVE_STRDUP 1
294 /* #undef HAVE_STRLCAT */
295 /* #undef HAVE_STRLCPY */
299 * Do we have the geteuid() function?
302 /* #undef HAVE_GETEUID */
306 * Do we have the setpgid() function?
309 /* #undef HAVE_SETPGID */
313 * Do we have the vsyslog() function?
316 /* #undef HAVE_VSYSLOG */
320 * Do we have the systemd journal functions?
323 /* #undef HAVE_SYSTEMD_SD_JOURNAL_H */
327 * Do we have the (v)snprintf() functions?
330 #define HAVE_SNPRINTF 1
331 #define HAVE_VSNPRINTF 1
335 * What signal functions to use?
338 /* #undef HAVE_SIGSET */
339 /* #undef HAVE_SIGACTION */
343 * What wait functions to use?
346 /* #undef HAVE_WAITPID */
347 /* #undef HAVE_WAIT3 */
351 * Do we have the mallinfo function and malloc.h?
354 /* #undef HAVE_MALLINFO */
355 /* #undef HAVE_MALLOC_H */
359 * Do we have the POSIX ACL functions?
362 /* #undef HAVE_ACL_INIT */
366 * Do we have the langinfo.h header file?
369 /* #undef HAVE_LANGINFO_H */
373 * Which encryption libraries do we have?
376 /* #undef HAVE_CDSASSL */
377 /* #undef HAVE_GNUTLS */
378 #define HAVE_SSPISSL 1
383 * Do we have the gnutls_transport_set_pull_timeout_function function?
386 /* #undef HAVE_GNUTLS_TRANSPORT_SET_PULL_TIMEOUT_FUNCTION */
390 * Do we have the gnutls_priority_set_direct function?
393 /* #undef HAVE_GNUTLS_PRIORITY_SET_DIRECT */
397 * What Security framework headers do we have?
400 /* #undef HAVE_AUTHORIZATION_H */
401 /* #undef HAVE_SECBASEPRIV_H */
402 /* #undef HAVE_SECCERTIFICATE_H */
403 /* #undef HAVE_SECIDENTITYSEARCHPRIV_H */
404 /* #undef HAVE_SECITEM_H */
405 /* #undef HAVE_SECITEMPRIV_H */
406 /* #undef HAVE_SECPOLICY_H */
407 /* #undef HAVE_SECPOLICYPRIV_H */
408 /* #undef HAVE_SECURETRANSPORTPRIV_H */
412 * Do we have the cssmErrorString function?
415 /* #undef HAVE_CSSMERRORSTRING */
419 * Do we have the SecGenerateSelfSignedCertificate function?
422 /* #undef HAVE_SECGENERATESELFSIGNEDCERTIFICATE */
426 * Do we have the SecKeychainOpen function?
429 /* #undef HAVE_SECKEYCHAINOPEN */
433 * Do we have (a working) SSLSetEnabledCiphers function?
436 #define HAVE_SSLSETENABLEDCIPHERS 1
440 * Do we have libpaper?
443 /* #undef HAVE_LIBPAPER */
447 * Do we have mDNSResponder for DNS Service Discovery (aka Bonjour)?
454 * Do we have Avahi for DNS Service Discovery (aka Bonjour)?
461 * Do we have <sys/ioctl.h>?
464 #undef HAVE_SYS_IOCTL_H
468 * Does the "stat" structure contain the "st_gen" member?
471 /* #undef HAVE_ST_GEN */
475 * Does the "tm" structure contain the "tm_gmtoff" member?
478 /* #undef HAVE_TM_GMTOFF */
482 * Do we have rresvport_af()?
485 /* #undef HAVE_RRESVPORT_AF */
489 * Do we have getaddrinfo()?
492 #define HAVE_GETADDRINFO 1
496 * Do we have getnameinfo()?
499 #define HAVE_GETNAMEINFO 1
503 * Do we have getifaddrs()?
506 /* #undef HAVE_GETIFADDRS */
510 * Do we have hstrerror()?
513 /* #undef HAVE_HSTRERROR */
517 * Do we have res_init()?
520 /* #undef HAVE_RES_INIT */
524 * Do we have <resolv.h>
527 /* #undef HAVE_RESOLV_H */
531 * Do we have the <sys/sockio.h> header file?
534 /* #undef HAVE_SYS_SOCKIO_H */
538 * Does the sockaddr structure contain an sa_len parameter?
541 /* #undef HAVE_STRUCT_SOCKADDR_SA_LEN */
545 * Do we have pthread support?
548 /* #undef HAVE_PTHREAD_H */
552 * Do we have on-demand support (launchd/systemd/upstart)?
555 /* #undef HAVE_ONDEMAND */
559 * Do we have launchd support?
562 /* #undef HAVE_LAUNCH_H */
563 /* #undef HAVE_LAUNCHD */
567 * Do we have systemd support?
570 /* #undef HAVE_SYSTEMD */
574 * Do we have upstart support?
577 /* #undef HAVE_UPSTART */
581 * Various scripting languages...
584 /* #undef HAVE_JAVA */
586 /* #undef HAVE_PERL */
588 /* #undef HAVE_PHP */
590 /* #undef HAVE_PYTHON */
591 #define CUPS_PYTHON ""
595 * Do we have CoreFoundation public and private headers?
598 /* #undef HAVE_COREFOUNDATION_H */
599 /* #undef HAVE_CFPRIV_H */
600 /* #undef HAVE_CFBUNDLEPRIV_H */
604 * Do we have ApplicationServices public headers?
607 /* #undef HAVE_APPLICATIONSERVICES_H */
611 * Do we have the SCDynamicStoreCopyComputerName function?
614 /* #undef HAVE_SCDYNAMICSTORECOPYCOMPUTERNAME */
618 * Do we have the getgrouplist() function?
621 #undef HAVE_GETGROUPLIST
625 * Do we have macOS 10.4's mbr_XXX functions?
628 /* #undef HAVE_MEMBERSHIP_H */
629 /* #undef HAVE_MEMBERSHIPPRIV_H */
630 /* #undef HAVE_MBR_UID_TO_UUID */
634 * Do we have Darwin's notify_post header and function?
637 /* #undef HAVE_NOTIFY_H */
638 /* #undef HAVE_NOTIFY_POST */
645 /* #undef HAVE_DBUS */
646 /* #undef HAVE_DBUS_MESSAGE_ITER_INIT_APPEND */
647 /* #undef HAVE_DBUS_THREADS_INIT */
651 * Do we have the GSSAPI support library (for Kerberos support)?
654 /* #undef HAVE_GSS_ACQUIRE_CRED_EX_F */
655 /* #undef HAVE_GSS_C_NT_HOSTBASED_SERVICE */
656 /* #undef HAVE_GSS_GSSAPI_H */
657 /* #undef HAVE_GSS_GSSAPI_SPI_H */
658 /* #undef HAVE_GSSAPI */
659 /* #undef HAVE_GSSAPI_GSSAPI_H */
660 /* #undef HAVE_GSSAPI_H */
664 * Default GSS service name...
667 #define CUPS_DEFAULT_GSSSERVICENAME "host"
671 * Select/poll interfaces...
674 /* #undef HAVE_POLL */
675 /* #undef HAVE_EPOLL */
676 /* #undef HAVE_KQUEUE */
680 * Do we have the <dlfcn.h> header?
683 /* #undef HAVE_DLFCN_H */
687 * Do we have <sys/param.h>?
690 /* #undef HAVE_SYS_PARAM_H */
694 * Do we have <sys/ucred.h>?
697 /* #undef HAVE_SYS_UCRED_H */
701 * Do we have removefile()?
704 /* #undef HAVE_REMOVEFILE */
708 * Do we have <sandbox.h>?
711 /* #undef HAVE_SANDBOX_H */
715 * Which random number generator function to use...
718 /* #undef HAVE_ARC4RANDOM */
719 /* #undef HAVE_RANDOM */
720 /* #undef HAVE_LRAND48 */
722 #ifdef HAVE_ARC4RANDOM
723 # define CUPS_RAND() arc4random()
724 # define CUPS_SRAND(v)
725 #elif defined(HAVE_RANDOM)
726 # define CUPS_RAND() random()
727 # define CUPS_SRAND(v) srandom(v)
728 #elif defined(HAVE_LRAND48)
729 # define CUPS_RAND() lrand48()
730 # define CUPS_SRAND(v) srand48(v)
732 # define CUPS_RAND() rand()
733 # define CUPS_SRAND(v) srand(v)
734 #endif /* HAVE_ARC4RANDOM */
741 /* #undef HAVE_LIBUSB */
745 * Do we have libwrap and tcpd.h?
748 /* #undef HAVE_TCPD_H */
752 * Do we have <iconv.h>?
755 /* #undef HAVE_ICONV_H */
759 * Do we have statfs or statvfs and one of the corresponding headers?
762 /* #undef HAVE_STATFS */
763 /* #undef HAVE_STATVFS */
764 /* #undef HAVE_SYS_MOUNT_H */
765 /* #undef HAVE_SYS_STATFS_H */
766 /* #undef HAVE_SYS_STATVFS_H */
767 /* #undef HAVE_SYS_VFS_H */
771 * Location of macOS localization bundle, if any.
774 /* #undef CUPS_BUNDLEDIR */
781 /* #undef HAVE_XPC */
782 /* #undef HAVE_XPC_PRIVATE_H */
786 * Do we have Mini-XML?
789 /* #undef HAVE_MXML_H */
793 * Do we have the C99 abs() function?
796 /* #undef HAVE_ABS */
797 #if !defined(HAVE_ABS) && !defined(abs)
798 # if defined(__GNUC__) || __STDC_VERSION__ >= 199901L
799 # define abs(x) _cups_abs(x)
800 static inline int _cups_abs(int i
) { return (i
< 0 ? -i
: i
); }
801 # elif defined(_MSC_VER)
802 # define abs(x) _cups_abs(x)
803 static __inline
int _cups_abs(int i
) { return (i
< 0 ? -i
: i
); }
805 # define abs(x) ((x) < 0 ? -(x) : (x))
806 # endif /* __GNUC__ || __STDC_VERSION__ */
807 #endif /* !HAVE_ABS && !abs */
809 #endif /* !_CUPS_CONFIG_H_ */