]>
git.ipfire.org Git - thirdparty/cups.git/blob - vcnet/config.h
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"
98 #define CUPS_MINIMAL "CUPS/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 ""
112 * Default file permissions...
115 #define CUPS_DEFAULT_CONFIG_FILE_PERM 0640
116 #define CUPS_DEFAULT_LOG_FILE_PERM 0644
120 * Default logging settings...
123 #define CUPS_DEFAULT_LOG_LEVEL "warn"
124 #define CUPS_DEFAULT_ACCESS_LOG_LEVEL "actions"
128 * Default fatal error settings...
131 #define CUPS_DEFAULT_FATAL_ERRORS "config"
135 * Default browsing settings...
138 #define CUPS_DEFAULT_BROWSING 1
139 #define CUPS_DEFAULT_BROWSE_LOCAL_PROTOCOLS ""
140 #define CUPS_DEFAULT_DEFAULT_SHARED 1
144 * Default IPP port...
147 #define CUPS_DEFAULT_IPP_PORT 631
151 * Default printcap file...
154 #define CUPS_DEFAULT_PRINTCAP ""
158 * Default Samba and LPD config files...
161 #define CUPS_DEFAULT_SMB_CONFIG_FILE ""
162 #define CUPS_DEFAULT_LPD_CONFIG_FILE ""
166 * Default MaxCopies value...
169 #define CUPS_DEFAULT_MAX_COPIES 9999
173 * Do we have domain socket support, and if so what is the default one?
176 #undef CUPS_DEFAULT_DOMAINSOCKET
180 * Default WebInterface value...
183 #undef CUPS_DEFAULT_WEBIF
187 * Where are files stored?
189 * Note: These are defaults, which can be overridden by environment
190 * variables at run-time...
193 #define CUPS_BINDIR "C:/CUPS/bin"
194 #define CUPS_CACHEDIR "C:/CUPS/cache"
195 #define CUPS_DATADIR "C:/CUPS/share"
196 #define CUPS_DOCROOT "C:/CUPS/share/doc"
197 #define CUPS_FONTPATH "C:/CUPS/share/fonts"
198 #define CUPS_LOCALEDIR "C:/CUPS/locale"
199 #define CUPS_LOGDIR "C:/CUPS/logs"
200 #define CUPS_REQUESTS "C:/CUPS/spool"
201 #define CUPS_SBINDIR "C:/CUPS/sbin"
202 #define CUPS_SERVERBIN "C:/CUPS/lib"
203 #define CUPS_SERVERROOT "C:/CUPS/etc"
204 #define CUPS_STATEDIR "C:/CUPS/run"
208 * Do we have posix_spawn?
211 /* #undef HAVE_POSIX_SPAWN */
219 #define HAVE_INFLATECOPY 1
223 * Do we have PAM stuff?
226 #define HAVE_LIBPAM 0
227 /* #undef HAVE_PAM_PAM_APPL_H */
228 /* #undef HAVE_PAM_SET_ITEM */
229 /* #undef HAVE_PAM_SETCRED */
233 * Do we have <shadow.h>?
236 /* #undef HAVE_SHADOW_H */
240 * Do we have <crypt.h>?
243 /* #undef HAVE_CRYPT_H */
250 /* #undef HAVE_STDINT_H */
254 * Use <string.h>, <strings.h>, and/or <bstring.h>?
257 #define HAVE_STRING_H 1
258 /* #undef HAVE_STRINGS_H */
259 /* #undef HAVE_BSTRING_H */
263 * Do we have the long long type?
266 /* #undef HAVE_LONG_LONG */
268 #ifdef HAVE_LONG_LONG
269 # define CUPS_LLFMT "%lld"
270 # define CUPS_LLCAST (long long)
272 # define CUPS_LLFMT "%ld"
273 # define CUPS_LLCAST (long)
274 #endif /* HAVE_LONG_LONG */
278 * Do we have the strtoll() function?
281 /* #undef HAVE_STRTOLL */
284 # define strtoll(nptr,endptr,base) strtol((nptr), (endptr), (base))
285 #endif /* !HAVE_STRTOLL */
289 * Do we have the strXXX() functions?
292 #define HAVE_STRDUP 1
293 /* #undef HAVE_STRLCAT */
294 /* #undef HAVE_STRLCPY */
298 * Do we have the geteuid() function?
301 /* #undef HAVE_GETEUID */
305 * Do we have the setpgid() function?
308 /* #undef HAVE_SETPGID */
312 * Do we have the vsyslog() function?
315 /* #undef HAVE_VSYSLOG */
319 * Do we have the (v)snprintf() functions?
322 #define HAVE_SNPRINTF 1
323 #define HAVE_VSNPRINTF 1
327 * What signal functions to use?
330 /* #undef HAVE_SIGSET */
331 /* #undef HAVE_SIGACTION */
335 * What wait functions to use?
338 /* #undef HAVE_WAITPID */
339 /* #undef HAVE_WAIT3 */
343 * Do we have the mallinfo function and malloc.h?
346 /* #undef HAVE_MALLINFO */
347 /* #undef HAVE_MALLOC_H */
351 * Do we have the POSIX ACL functions?
354 /* #undef HAVE_ACL_INIT */
358 * Do we have the langinfo.h header file?
361 /* #undef HAVE_LANGINFO_H */
365 * Which encryption libraries do we have?
368 /* #undef HAVE_CDSASSL */
369 /* #undef HAVE_GNUTLS */
375 * Do we have the gnutls_transport_set_pull_timeout_function function?
378 /* #undef HAVE_GNUTLS_TRANSPORT_SET_PULL_TIMEOUT_FUNCTION */
382 * Do we have the gnutls_priority_set_direct function?
385 /* #undef HAVE_GNUTLS_PRIORITY_SET_DIRECT */
389 * What Security framework headers do we have?
392 /* #undef HAVE_AUTHORIZATION_H */
393 /* #undef HAVE_SECBASEPRIV_H */
394 /* #undef HAVE_SECCERTIFICATE_H */
395 /* #undef HAVE_SECIDENTITYSEARCHPRIV_H */
396 /* #undef HAVE_SECITEM_H */
397 /* #undef HAVE_SECITEMPRIV_H */
398 /* #undef HAVE_SECPOLICY_H */
399 /* #undef HAVE_SECPOLICYPRIV_H */
400 /* #undef HAVE_SECURETRANSPORTPRIV_H */
404 * Do we have the cssmErrorString function?
407 /* #undef HAVE_CSSMERRORSTRING */
411 * Do we have the SecGenerateSelfSignedCertificate function?
414 /* #undef HAVE_SECGENERATESELFSIGNEDCERTIFICATE */
418 * Do we have the SecKeychainOpen function?
421 /* #undef HAVE_SECKEYCHAINOPEN */
425 * Do we have libpaper?
428 /* #undef HAVE_LIBPAPER */
432 * Do we have mDNSResponder for DNS Service Discovery (aka Bonjour)?
439 * Do we have Avahi for DNS Service Discovery (aka Bonjour)?
446 * Do we have <sys/ioctl.h>?
449 #undef HAVE_SYS_IOCTL_H
453 * Does the "stat" structure contain the "st_gen" member?
456 /* #undef HAVE_ST_GEN */
460 * Does the "tm" structure contain the "tm_gmtoff" member?
463 /* #undef HAVE_TM_GMTOFF */
467 * Do we have rresvport_af()?
470 /* #undef HAVE_RRESVPORT_AF */
474 * Do we have getaddrinfo()?
477 #define HAVE_GETADDRINFO 1
481 * Do we have getnameinfo()?
484 #define HAVE_GETNAMEINFO 1
488 * Do we have getifaddrs()?
491 /* #undef HAVE_GETIFADDRS */
495 * Do we have hstrerror()?
498 /* #undef HAVE_HSTRERROR */
502 * Do we have res_init()?
505 /* #undef HAVE_RES_INIT */
509 * Do we have <resolv.h>
512 /* #undef HAVE_RESOLV_H */
516 * Do we have the <sys/sockio.h> header file?
519 /* #undef HAVE_SYS_SOCKIO_H */
523 * Does the sockaddr structure contain an sa_len parameter?
526 /* #undef HAVE_STRUCT_SOCKADDR_SA_LEN */
530 * Do we have pthread support?
533 /* #undef HAVE_PTHREAD_H */
537 * Do we have launchd support?
540 /* #undef HAVE_LAUNCH_H */
541 /* #undef HAVE_LAUNCHD */
545 * Do we have systemd support?
548 /* #undef HAVE_SYSTEMD */
552 * Various scripting languages...
555 /* #undef HAVE_JAVA */
557 /* #undef HAVE_PERL */
559 /* #undef HAVE_PHP */
561 /* #undef HAVE_PYTHON */
562 #define CUPS_PYTHON ""
566 * Do we have CoreFoundation public and private headers?
569 /* #undef HAVE_COREFOUNDATION_H */
570 /* #undef HAVE_CFPRIV_H */
571 /* #undef HAVE_CFBUNDLEPRIV_H */
575 * Do we have ApplicationServices public headers?
578 /* #undef HAVE_APPLICATIONSERVICES_H */
582 * Do we have the SCDynamicStoreCopyComputerName function?
585 /* #undef HAVE_SCDYNAMICSTORECOPYCOMPUTERNAME */
589 * Do we have OS X 10.4's mbr_XXX functions?
592 /* #undef HAVE_MEMBERSHIP_H */
593 /* #undef HAVE_MEMBERSHIPPRIV_H */
594 /* #undef HAVE_MBR_UID_TO_UUID */
598 * Do we have Darwin's notify_post header and function?
601 /* #undef HAVE_NOTIFY_H */
602 /* #undef HAVE_NOTIFY_POST */
609 /* #undef HAVE_DBUS */
610 /* #undef HAVE_DBUS_MESSAGE_ITER_INIT_APPEND */
611 /* #undef HAVE_DBUS_THREADS_INIT */
615 * Do we have the GSSAPI support library (for Kerberos support)?
618 /* #undef HAVE_GSS_ACQUIRE_CRED_EX_F */
619 /* #undef HAVE_GSS_C_NT_HOSTBASED_SERVICE */
620 /* #undef HAVE_GSS_GSSAPI_H */
621 /* #undef HAVE_GSS_GSSAPI_SPI_H */
622 /* #undef HAVE_GSSAPI */
623 /* #undef HAVE_GSSAPI_GSSAPI_H */
624 /* #undef HAVE_GSSAPI_H */
628 * Default GSS service name...
631 #define CUPS_DEFAULT_GSSSERVICENAME "host"
635 * Select/poll interfaces...
638 /* #undef HAVE_POLL */
639 /* #undef HAVE_EPOLL */
640 /* #undef HAVE_KQUEUE */
644 * Do we have the <dlfcn.h> header?
647 /* #undef HAVE_DLFCN_H */
651 * Do we have <sys/param.h>?
654 /* #undef HAVE_SYS_PARAM_H */
658 * Do we have <sys/ucred.h>?
661 /* #undef HAVE_SYS_UCRED_H */
665 * Do we have removefile()?
668 /* #undef HAVE_REMOVEFILE */
672 * Do we have <sandbox.h>?
675 /* #undef HAVE_SANDBOX_H */
679 * Which random number generator function to use...
682 /* #undef HAVE_ARC4RANDOM */
683 /* #undef HAVE_RANDOM */
684 /* #undef HAVE_LRAND48 */
686 #ifdef HAVE_ARC4RANDOM
687 # define CUPS_RAND() arc4random()
688 # define CUPS_SRAND(v) arc4random_stir()
689 #elif defined(HAVE_RANDOM)
690 # define CUPS_RAND() random()
691 # define CUPS_SRAND(v) srandom(v)
692 #elif defined(HAVE_LRAND48)
693 # define CUPS_RAND() lrand48()
694 # define CUPS_SRAND(v) srand48(v)
696 # define CUPS_RAND() rand()
697 # define CUPS_SRAND(v) srand(v)
698 #endif /* HAVE_ARC4RANDOM */
702 * Do we have vproc_transaction_begin/end?
705 /* #undef HAVE_VPROC_TRANSACTION_BEGIN */
712 /* #undef HAVE_LIBUSB */
716 * Do we have libwrap and tcpd.h?
719 /* #undef HAVE_TCPD_H */
723 * Do we have <iconv.h>?
726 /* #undef HAVE_ICONV_H */
730 * Do we have statfs or statvfs and one of the corresponding headers?
733 /* #undef HAVE_STATFS */
734 /* #undef HAVE_STATVFS */
735 /* #undef HAVE_SYS_MOUNT_H */
736 /* #undef HAVE_SYS_STATFS_H */
737 /* #undef HAVE_SYS_STATVFS_H */
738 /* #undef HAVE_SYS_VFS_H */
742 * Location of OS X localization bundle, if any.
745 /* #undef CUPS_BUNDLEDIR */
752 /* #undef HAVE_XPC */
753 /* #undef HAVE_XPC_PRIVATE_H */
757 * Do we have Mini-XML?
760 /* #undef HAVE_MXML_H */
764 * Do we have the C99 abs() function?
767 /* #undef HAVE_ABS */
768 #if !defined(HAVE_ABS) && !defined(abs)
769 # if defined(__GNUC__) || __STDC_VERSION__ >= 199901L
770 # define abs(x) _cups_abs(x)
771 static inline int _cups_abs(int i
) { return (i
< 0 ? -i
: i
); }
772 # elif defined(_MSC_VER)
773 # define abs(x) _cups_abs(x)
774 static __inline
int _cups_abs(int i
) { return (i
< 0 ? -i
: i
); }
776 # define abs(x) ((x) < 0 ? -(x) : (x))
777 # endif /* __GNUC__ || __STDC_VERSION__ */
778 #endif /* !HAVE_ABS && !abs */
780 #endif /* !_CUPS_CONFIG_H_ */