]>
git.ipfire.org Git - thirdparty/cups.git/blob - vcnet/config.h
4 * Configuration file for CUPS on Windows.
6 * Copyright 2007-2013 by Apple Inc.
7 * Copyright 1997-2007 by Easy Software Products.
9 * These coded instructions, statements, and computer programs are the
10 * property of Apple Inc. and are protected by Federal copyright
11 * law. Distribution and use rights are outlined in the file "LICENSE.txt"
12 * which should have been included with this file. If this file is
13 * file is missing or damaged, see the license at "http://www.cups.org/".
16 #ifndef _CUPS_CONFIG_H_
17 #define _CUPS_CONFIG_H_
20 * Include necessary headers...
32 * Microsoft renames the POSIX functions to _name, and introduces
33 * a broken compatibility layer using the original names. As a result,
34 * random crashes can occur when, for example, strdup() allocates memory
35 * from a different heap than used by malloc() and free().
37 * To avoid moronic problems like this, we #define the POSIX function
38 * names to the corresponding non-standard Microsoft names.
41 #define access _access
43 #define fileno _fileno
45 #define mkdir(d,p) _mkdir(d)
49 #define snprintf _snprintf
50 #define strdup _strdup
51 #define unlink _unlink
52 #define vsnprintf _vsnprintf
57 * Map the POSIX sleep() and usleep() functions to the Win32 Sleep() function...
60 #define sleep(X) Sleep(1000 * (X))
61 #define usleep(X) Sleep((X)/1000)
65 * Map various parameters to Posix style system calls
71 # define O_RDONLY _O_RDONLY
72 # define O_WRONLY _O_WRONLY
73 # define O_CREATE _O_CREAT
74 # define O_TRUNC _O_TRUNC
82 #undef __CHAR_UNSIGNED__
86 * Version of software...
89 #define CUPS_SVERSION "CUPS v2.0.0"
90 #define CUPS_MINIMAL "CUPS/2.0.0"
94 * Default user and groups...
97 #define CUPS_DEFAULT_USER ""
98 #define CUPS_DEFAULT_GROUP ""
99 #define CUPS_DEFAULT_SYSTEM_GROUPS ""
100 #define CUPS_DEFAULT_PRINTOPERATOR_AUTH ""
104 * Default file permissions...
107 #define CUPS_DEFAULT_CONFIG_FILE_PERM 0640
108 #define CUPS_DEFAULT_LOG_FILE_PERM 0644
112 * Default logging settings...
115 #define CUPS_DEFAULT_LOG_LEVEL "warn"
116 #define CUPS_DEFAULT_ACCESS_LOG_LEVEL "actions"
120 * Default fatal error settings...
123 #define CUPS_DEFAULT_FATAL_ERRORS "config"
127 * Default browsing settings...
130 #define CUPS_DEFAULT_BROWSING 1
131 #define CUPS_DEFAULT_BROWSE_LOCAL_PROTOCOLS ""
132 #define CUPS_DEFAULT_DEFAULT_SHARED 1
136 * Default IPP port...
139 #define CUPS_DEFAULT_IPP_PORT 631
143 * Default printcap file...
146 #define CUPS_DEFAULT_PRINTCAP ""
150 * Default Samba and LPD config files...
153 #define CUPS_DEFAULT_SMB_CONFIG_FILE ""
154 #define CUPS_DEFAULT_LPD_CONFIG_FILE ""
158 * Default MaxCopies value...
161 #define CUPS_DEFAULT_MAX_COPIES 9999
165 * Do we have domain socket support?
168 #undef CUPS_DEFAULT_DOMAINSOCKET
172 * Default WebInterface value...
175 #undef CUPS_DEFAULT_WEBIF
179 * Where are files stored?
181 * Note: These are defaults, which can be overridden by environment
182 * variables at run-time...
185 #define CUPS_BINDIR "C:/CUPS/bin"
186 #define CUPS_CACHEDIR "C:/CUPS/cache"
187 #define CUPS_DATADIR "C:/CUPS/share"
188 #define CUPS_DOCROOT "C:/CUPS/share/doc"
189 #define CUPS_FONTPATH "C:/CUPS/share/fonts"
190 #define CUPS_LOCALEDIR "C:/CUPS/locale"
191 #define CUPS_LOGDIR "C:/CUPS/logs"
192 #define CUPS_REQUESTS "C:/CUPS/spool"
193 #define CUPS_SBINDIR "C:/CUPS/sbin"
194 #define CUPS_SERVERBIN "C:/CUPS/lib"
195 #define CUPS_SERVERROOT "C:/CUPS/etc"
196 #define CUPS_STATEDIR "C:/CUPS/run"
204 #define HAVE_INFLATECOPY 1
208 * Do we have PAM stuff?
212 #define HAVE_LIBPAM 0
213 #endif /* !HAVE_LIBPAM */
215 /* #undef HAVE_PAM_PAM_APPL_H */
216 /* #undef HAVE_PAM_SET_ITEM */
217 /* #undef HAVE_PAM_SETCRED */
221 * Do we have <shadow.h>?
224 /* #undef HAVE_SHADOW_H */
228 * Do we have <crypt.h>?
231 /* #undef HAVE_CRYPT_H */
238 /* #undef HAVE_STDINT_H */
242 * Use <string.h>, <strings.h>, and/or <bstring.h>?
245 #define HAVE_STRING_H 1
246 /* #undef HAVE_STRINGS_H */
247 /* #undef HAVE_BSTRING_H */
251 * Do we have the long long type?
254 /* #undef HAVE_LONG_LONG */
256 #ifdef HAVE_LONG_LONG
257 # define CUPS_LLFMT "%lld"
258 # define CUPS_LLCAST (long long)
260 # define CUPS_LLFMT "%ld"
261 # define CUPS_LLCAST (long)
262 #endif /* HAVE_LONG_LONG */
266 * Do we have the strtoll() function?
269 /* #undef HAVE_STRTOLL */
272 # define strtoll(nptr,endptr,base) strtol((nptr), (endptr), (base))
273 #endif /* !HAVE_STRTOLL */
277 * Do we have the strXXX() functions?
280 #define HAVE_STRDUP 1
281 /* #undef HAVE_STRLCAT */
282 /* #undef HAVE_STRLCPY */
286 * Do we have the geteuid() function?
289 /* #undef HAVE_GETEUID */
293 * Do we have the setpgid() function?
296 /* #undef HAVE_SETPGID */
300 * Do we have the vsyslog() function?
303 /* #undef HAVE_VSYSLOG */
307 * Do we have the (v)snprintf() functions?
310 #define HAVE_SNPRINTF 1
311 #define HAVE_VSNPRINTF 1
315 * What signal functions to use?
318 /* #undef HAVE_SIGSET */
319 /* #undef HAVE_SIGACTION */
323 * What wait functions to use?
326 /* #undef HAVE_WAITPID */
327 /* #undef HAVE_WAIT3 */
331 * Do we have the mallinfo function and malloc.h?
334 /* #undef HAVE_MALLINFO */
335 /* #undef HAVE_MALLOC_H */
339 * Do we have the POSIX ACL functions?
342 /* #undef HAVE_ACL_INIT */
346 * Do we have the langinfo.h header file?
349 /* #undef HAVE_LANGINFO_H */
353 * Which encryption libraries do we have?
356 /* #undef HAVE_CDSASSL */
357 /* #undef HAVE_GNUTLS */
363 * What Security framework headers do we have?
366 /* #undef HAVE_AUTHORIZATION_H */
367 /* #undef HAVE_SECBASEPRIV_H */
368 /* #undef HAVE_SECCERTIFICATE_H */
369 /* #undef HAVE_SECIDENTITYSEARCHPRIV_H */
370 /* #undef HAVE_SECITEM_H */
371 /* #undef HAVE_SECITEMPRIV_H */
372 /* #undef HAVE_SECPOLICY_H */
373 /* #undef HAVE_SECPOLICYPRIV_H */
374 /* #undef HAVE_SECURETRANSPORTPRIV_H */
378 * Do we have the cssmErrorString function?
381 /* #undef HAVE_CSSMERRORSTRING */
385 * Do we have libpaper?
388 /* #undef HAVE_LIBPAPER */
392 * Do we have mDNSResponder for DNS Service Discovery (aka Bonjour)?
399 * Do we have Avahi for DNS Service Discovery (aka Bonjour)?
406 * Do we have <sys/ioctl.h>?
409 #undef HAVE_SYS_IOCTL_H
413 * Does the "stat" structure contain the "st_gen" member?
416 /* #undef HAVE_ST_GEN */
420 * Does the "tm" structure contain the "tm_gmtoff" member?
423 /* #undef HAVE_TM_GMTOFF */
427 * Do we have rresvport_af()?
430 /* #undef HAVE_RRESVPORT_AF */
434 * Do we have getaddrinfo()?
437 #define HAVE_GETADDRINFO 1
441 * Do we have getnameinfo()?
444 #define HAVE_GETNAMEINFO 1
448 * Do we have getifaddrs()?
451 /* #undef HAVE_GETIFADDRS */
455 * Do we have hstrerror()?
458 /* #undef HAVE_HSTRERROR */
462 * Do we have res_init()?
465 /* #undef HAVE_RES_INIT */
469 * Do we have <resolv.h>
472 /* #undef HAVE_RESOLV_H */
476 * Do we have the <sys/sockio.h> header file?
479 /* #undef HAVE_SYS_SOCKIO_H */
483 * Does the sockaddr structure contain an sa_len parameter?
486 /* #undef HAVE_STRUCT_SOCKADDR_SA_LEN */
490 * Do we have pthread support?
493 /* #undef HAVE_PTHREAD_H */
497 * Do we have launchd support?
500 /* #undef HAVE_LAUNCH_H */
501 /* #undef HAVE_LAUNCHD */
505 * Various scripting languages...
508 /* #undef HAVE_JAVA */
510 /* #undef HAVE_PERL */
512 /* #undef HAVE_PHP */
514 /* #undef HAVE_PYTHON */
515 #define CUPS_PYTHON ""
519 * Location of the poppler/Xpdf pdftops program...
522 /* #undef HAVE_PDFTOPS */
523 /* #undef HAVE_PDFTOPS_WITH_ORIGPAGESIZES */
524 #define CUPS_PDFTOPS ""
528 * Location of the Ghostscript gs program...
531 /* #undef HAVE_GHOSTSCRIPT */
532 #define CUPS_GHOSTSCRIPT ""
536 * Do we have CoreFoundation public and private headers?
539 /* #undef HAVE_COREFOUNDATION_H */
540 /* #undef HAVE_CFPRIV_H */
541 /* #undef HAVE_CFBUNDLEPRIV_H */
545 * Do we have ApplicationServices public headers?
548 /* #undef HAVE_APPLICATIONSERVICES_H */
552 * Do we have the SCDynamicStoreCopyComputerName function?
555 /* #undef HAVE_SCDYNAMICSTORECOPYCOMPUTERNAME */
559 * Do we have OS X 10.4's mbr_XXX functions?
562 /* #undef HAVE_MEMBERSHIP_H */
563 /* #undef HAVE_MEMBERSHIPPRIV_H */
564 /* #undef HAVE_MBR_UID_TO_UUID */
568 * Do we have Darwin's notify_post header and function?
571 /* #undef HAVE_NOTIFY_H */
572 /* #undef HAVE_NOTIFY_POST */
579 /* #undef HAVE_DBUS */
580 /* #undef HAVE_DBUS_MESSAGE_ITER_INIT_APPEND */
584 * Do we have the GSSAPI support library (for Kerberos support)?
587 /* #undef HAVE_GSS_ACQUIRE_CRED_EX_F */
588 /* #undef HAVE_GSS_C_NT_HOSTBASED_SERVICE */
589 /* #undef HAVE_GSS_GSSAPI_H */
590 /* #undef HAVE_GSS_GSSAPI_SPI_H */
591 /* #undef HAVE_GSSAPI */
592 /* #undef HAVE_GSSAPI_GSSAPI_H */
593 /* #undef HAVE_GSSAPI_H */
597 * Default GSS service name...
600 #define CUPS_DEFAULT_GSSSERVICENAME "host"
604 * Select/poll interfaces...
607 /* #undef HAVE_POLL */
608 /* #undef HAVE_EPOLL */
609 /* #undef HAVE_KQUEUE */
613 * Do we have the <dlfcn.h> header?
616 /* #undef HAVE_DLFCN_H */
620 * Do we have <sys/param.h>?
623 /* #undef HAVE_SYS_PARAM_H */
627 * Do we have <sys/ucred.h>?
630 /* #undef HAVE_SYS_UCRED_H */
634 * Do we have removefile()?
637 /* #undef HAVE_REMOVEFILE */
641 * Do we have <sandbox.h>?
644 /* #undef HAVE_SANDBOX_H */
648 * Which random number generator function to use...
651 /* #undef HAVE_ARC4RANDOM */
652 /* #undef HAVE_RANDOM */
653 /* #undef HAVE_LRAND48 */
655 #ifdef HAVE_ARC4RANDOM
656 # define CUPS_RAND() arc4random()
657 # define CUPS_SRAND(v) arc4random_stir()
658 #elif defined(HAVE_RANDOM)
659 # define CUPS_RAND() random()
660 # define CUPS_SRAND(v) srandom(v)
661 #elif defined(HAVE_LRAND48)
662 # define CUPS_RAND() lrand48()
663 # define CUPS_SRAND(v) srand48(v)
665 # define CUPS_RAND() rand()
666 # define CUPS_SRAND(v) srand(v)
667 #endif /* HAVE_ARC4RANDOM */
671 * Do we have vproc_transaction_begin/end?
674 /* #undef HAVE_VPROC_TRANSACTION_BEGIN */
681 /* #undef HAVE_LIBUSB */
685 * Do we have libwrap and tcpd.h?
688 /* #undef HAVE_TCPD_H */
692 * Do we have <iconv.h>?
695 /* #undef HAVE_ICONV_H */
699 * Do we have statfs or statvfs and one of the corresponding headers?
702 /* #undef HAVE_STATFS */
703 /* #undef HAVE_STATVFS */
704 /* #undef HAVE_SYS_MOUNT_H */
705 /* #undef HAVE_SYS_STATFS_H */
706 /* #undef HAVE_SYS_STATVFS_H */
707 /* #undef HAVE_SYS_VFS_H */
711 * Location of OS X localization bundle, if any.
714 /* #undef CUPS_BUNDLEDIR */
721 /* #undef HAVE_XPC */
722 /* #undef HAVE_XPC_PRIVATE_H */
726 * Do we have Mini-XML?
729 /* #undef HAVE_MXML_H */
733 * Do we have the C99 abs() function?
736 /* #undef HAVE_ABS */
737 #if !defined(HAVE_ABS) && !defined(abs)
738 # if defined(__GNUC__) || __STDC_VERSION__ >= 199901L
739 # define abs(x) _cups_abs(x)
740 static inline int _cups_abs(int i
) { return (i
< 0 ? -i
: i
); }
741 # elif defined(_MSC_VER)
742 # define abs(x) _cups_abs(x)
743 static __inline
int _cups_abs(int i
) { return (i
< 0 ? -i
: i
); }
745 # define abs(x) ((x) < 0 ? -(x) : (x))
746 # endif /* __GNUC__ || __STDC_VERSION__ */
747 #endif /* !HAVE_ABS && !abs */
749 #endif /* !_CUPS_CONFIG_H_ */