]>
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 typedef unsigned long useconds_t
;
61 #define sleep(X) Sleep(1000 * (X))
62 #define usleep(X) Sleep((X)/1000)
66 * Map various parameters to Posix style system calls
72 # define O_RDONLY _O_RDONLY
73 # define O_WRONLY _O_WRONLY
74 # define O_CREATE _O_CREAT
75 # define O_TRUNC _O_TRUNC
83 #undef __CHAR_UNSIGNED__
87 * Version of software...
90 #define CUPS_SVERSION "CUPS v2.0.0"
91 #define CUPS_MINIMAL "CUPS/2.0.0"
95 * Default user and groups...
98 #define CUPS_DEFAULT_USER ""
99 #define CUPS_DEFAULT_GROUP ""
100 #define CUPS_DEFAULT_SYSTEM_GROUPS ""
101 #define CUPS_DEFAULT_PRINTOPERATOR_AUTH ""
105 * Default file permissions...
108 #define CUPS_DEFAULT_CONFIG_FILE_PERM 0640
109 #define CUPS_DEFAULT_LOG_FILE_PERM 0644
113 * Default logging settings...
116 #define CUPS_DEFAULT_LOG_LEVEL "warn"
117 #define CUPS_DEFAULT_ACCESS_LOG_LEVEL "actions"
121 * Default fatal error settings...
124 #define CUPS_DEFAULT_FATAL_ERRORS "config"
128 * Default browsing settings...
131 #define CUPS_DEFAULT_BROWSING 1
132 #define CUPS_DEFAULT_BROWSE_LOCAL_PROTOCOLS ""
133 #define CUPS_DEFAULT_DEFAULT_SHARED 1
137 * Default IPP port...
140 #define CUPS_DEFAULT_IPP_PORT 631
144 * Default printcap file...
147 #define CUPS_DEFAULT_PRINTCAP ""
151 * Default Samba and LPD config files...
154 #define CUPS_DEFAULT_SMB_CONFIG_FILE ""
155 #define CUPS_DEFAULT_LPD_CONFIG_FILE ""
159 * Default MaxCopies value...
162 #define CUPS_DEFAULT_MAX_COPIES 9999
166 * Do we have domain socket support?
169 #undef CUPS_DEFAULT_DOMAINSOCKET
173 * Default WebInterface value...
176 #undef CUPS_DEFAULT_WEBIF
180 * Where are files stored?
182 * Note: These are defaults, which can be overridden by environment
183 * variables at run-time...
186 #define CUPS_BINDIR "C:/CUPS/bin"
187 #define CUPS_CACHEDIR "C:/CUPS/cache"
188 #define CUPS_DATADIR "C:/CUPS/share"
189 #define CUPS_DOCROOT "C:/CUPS/share/doc"
190 #define CUPS_FONTPATH "C:/CUPS/share/fonts"
191 #define CUPS_LOCALEDIR "C:/CUPS/locale"
192 #define CUPS_LOGDIR "C:/CUPS/logs"
193 #define CUPS_REQUESTS "C:/CUPS/spool"
194 #define CUPS_SBINDIR "C:/CUPS/sbin"
195 #define CUPS_SERVERBIN "C:/CUPS/lib"
196 #define CUPS_SERVERROOT "C:/CUPS/etc"
197 #define CUPS_STATEDIR "C:/CUPS/run"
205 #define HAVE_INFLATECOPY 1
209 * Do we have PAM stuff?
213 #define HAVE_LIBPAM 0
214 #endif /* !HAVE_LIBPAM */
216 /* #undef HAVE_PAM_PAM_APPL_H */
217 /* #undef HAVE_PAM_SET_ITEM */
218 /* #undef HAVE_PAM_SETCRED */
222 * Do we have <shadow.h>?
225 /* #undef HAVE_SHADOW_H */
229 * Do we have <crypt.h>?
232 /* #undef HAVE_CRYPT_H */
239 /* #undef HAVE_STDINT_H */
243 * Use <string.h>, <strings.h>, and/or <bstring.h>?
246 #define HAVE_STRING_H 1
247 /* #undef HAVE_STRINGS_H */
248 /* #undef HAVE_BSTRING_H */
252 * Do we have the long long type?
255 /* #undef HAVE_LONG_LONG */
257 #ifdef HAVE_LONG_LONG
258 # define CUPS_LLFMT "%lld"
259 # define CUPS_LLCAST (long long)
261 # define CUPS_LLFMT "%ld"
262 # define CUPS_LLCAST (long)
263 #endif /* HAVE_LONG_LONG */
267 * Do we have the strtoll() function?
270 /* #undef HAVE_STRTOLL */
273 # define strtoll(nptr,endptr,base) strtol((nptr), (endptr), (base))
274 #endif /* !HAVE_STRTOLL */
278 * Do we have the strXXX() functions?
281 #define HAVE_STRDUP 1
282 /* #undef HAVE_STRLCAT */
283 /* #undef HAVE_STRLCPY */
287 * Do we have the geteuid() function?
290 /* #undef HAVE_GETEUID */
294 * Do we have the setpgid() function?
297 /* #undef HAVE_SETPGID */
301 * Do we have the vsyslog() function?
304 /* #undef HAVE_VSYSLOG */
308 * Do we have the (v)snprintf() functions?
311 #define HAVE_SNPRINTF 1
312 #define HAVE_VSNPRINTF 1
316 * What signal functions to use?
319 /* #undef HAVE_SIGSET */
320 /* #undef HAVE_SIGACTION */
324 * What wait functions to use?
327 /* #undef HAVE_WAITPID */
328 /* #undef HAVE_WAIT3 */
332 * Do we have the mallinfo function and malloc.h?
335 /* #undef HAVE_MALLINFO */
336 /* #undef HAVE_MALLOC_H */
340 * Do we have the POSIX ACL functions?
343 /* #undef HAVE_ACL_INIT */
347 * Do we have the langinfo.h header file?
350 /* #undef HAVE_LANGINFO_H */
354 * Which encryption libraries do we have?
357 /* #undef HAVE_CDSASSL */
358 /* #undef HAVE_GNUTLS */
364 * What Security framework headers do we have?
367 /* #undef HAVE_AUTHORIZATION_H */
368 /* #undef HAVE_SECBASEPRIV_H */
369 /* #undef HAVE_SECCERTIFICATE_H */
370 /* #undef HAVE_SECIDENTITYSEARCHPRIV_H */
371 /* #undef HAVE_SECITEM_H */
372 /* #undef HAVE_SECITEMPRIV_H */
373 /* #undef HAVE_SECPOLICY_H */
374 /* #undef HAVE_SECPOLICYPRIV_H */
375 /* #undef HAVE_SECURETRANSPORTPRIV_H */
379 * Do we have the cssmErrorString function?
382 /* #undef HAVE_CSSMERRORSTRING */
386 * Do we have libpaper?
389 /* #undef HAVE_LIBPAPER */
393 * Do we have mDNSResponder for DNS Service Discovery (aka Bonjour)?
400 * Do we have Avahi for DNS Service Discovery (aka Bonjour)?
407 * Do we have <sys/ioctl.h>?
410 #undef HAVE_SYS_IOCTL_H
414 * Does the "stat" structure contain the "st_gen" member?
417 /* #undef HAVE_ST_GEN */
421 * Does the "tm" structure contain the "tm_gmtoff" member?
424 /* #undef HAVE_TM_GMTOFF */
428 * Do we have rresvport_af()?
431 /* #undef HAVE_RRESVPORT_AF */
435 * Do we have getaddrinfo()?
438 #define HAVE_GETADDRINFO 1
442 * Do we have getnameinfo()?
445 #define HAVE_GETNAMEINFO 1
449 * Do we have getifaddrs()?
452 /* #undef HAVE_GETIFADDRS */
456 * Do we have hstrerror()?
459 /* #undef HAVE_HSTRERROR */
463 * Do we have res_init()?
466 /* #undef HAVE_RES_INIT */
470 * Do we have <resolv.h>
473 /* #undef HAVE_RESOLV_H */
477 * Do we have the <sys/sockio.h> header file?
480 /* #undef HAVE_SYS_SOCKIO_H */
484 * Does the sockaddr structure contain an sa_len parameter?
487 /* #undef HAVE_STRUCT_SOCKADDR_SA_LEN */
491 * Do we have pthread support?
494 /* #undef HAVE_PTHREAD_H */
498 * Do we have launchd support?
501 /* #undef HAVE_LAUNCH_H */
502 /* #undef HAVE_LAUNCHD */
506 * Various scripting languages...
509 /* #undef HAVE_JAVA */
511 /* #undef HAVE_PERL */
513 /* #undef HAVE_PHP */
515 /* #undef HAVE_PYTHON */
516 #define CUPS_PYTHON ""
520 * Location of the poppler/Xpdf pdftops program...
523 /* #undef HAVE_PDFTOPS */
524 /* #undef HAVE_PDFTOPS_WITH_ORIGPAGESIZES */
525 #define CUPS_PDFTOPS ""
529 * Location of the Ghostscript gs program...
532 /* #undef HAVE_GHOSTSCRIPT */
533 #define CUPS_GHOSTSCRIPT ""
537 * Do we have CoreFoundation public and private headers?
540 /* #undef HAVE_COREFOUNDATION_H */
541 /* #undef HAVE_CFPRIV_H */
542 /* #undef HAVE_CFBUNDLEPRIV_H */
546 * Do we have ApplicationServices public headers?
549 /* #undef HAVE_APPLICATIONSERVICES_H */
553 * Do we have the SCDynamicStoreCopyComputerName function?
556 /* #undef HAVE_SCDYNAMICSTORECOPYCOMPUTERNAME */
560 * Do we have OS X 10.4's mbr_XXX functions?
563 /* #undef HAVE_MEMBERSHIP_H */
564 /* #undef HAVE_MEMBERSHIPPRIV_H */
565 /* #undef HAVE_MBR_UID_TO_UUID */
569 * Do we have Darwin's notify_post header and function?
572 /* #undef HAVE_NOTIFY_H */
573 /* #undef HAVE_NOTIFY_POST */
580 /* #undef HAVE_DBUS */
581 /* #undef HAVE_DBUS_MESSAGE_ITER_INIT_APPEND */
585 * Do we have the GSSAPI support library (for Kerberos support)?
588 /* #undef HAVE_GSS_ACQUIRE_CRED_EX_F */
589 /* #undef HAVE_GSS_C_NT_HOSTBASED_SERVICE */
590 /* #undef HAVE_GSS_GSSAPI_H */
591 /* #undef HAVE_GSS_GSSAPI_SPI_H */
592 /* #undef HAVE_GSSAPI */
593 /* #undef HAVE_GSSAPI_GSSAPI_H */
594 /* #undef HAVE_GSSAPI_H */
598 * Default GSS service name...
601 #define CUPS_DEFAULT_GSSSERVICENAME "host"
605 * Select/poll interfaces...
608 /* #undef HAVE_POLL */
609 /* #undef HAVE_EPOLL */
610 /* #undef HAVE_KQUEUE */
614 * Do we have the <dlfcn.h> header?
617 /* #undef HAVE_DLFCN_H */
621 * Do we have <sys/param.h>?
624 /* #undef HAVE_SYS_PARAM_H */
628 * Do we have <sys/ucred.h>?
631 /* #undef HAVE_SYS_UCRED_H */
635 * Do we have removefile()?
638 /* #undef HAVE_REMOVEFILE */
642 * Do we have <sandbox.h>?
645 /* #undef HAVE_SANDBOX_H */
649 * Which random number generator function to use...
652 /* #undef HAVE_ARC4RANDOM */
653 /* #undef HAVE_RANDOM */
654 /* #undef HAVE_LRAND48 */
656 #ifdef HAVE_ARC4RANDOM
657 # define CUPS_RAND() arc4random()
658 # define CUPS_SRAND(v) arc4random_stir()
659 #elif defined(HAVE_RANDOM)
660 # define CUPS_RAND() random()
661 # define CUPS_SRAND(v) srandom(v)
662 #elif defined(HAVE_LRAND48)
663 # define CUPS_RAND() lrand48()
664 # define CUPS_SRAND(v) srand48(v)
666 # define CUPS_RAND() rand()
667 # define CUPS_SRAND(v) srand(v)
668 #endif /* HAVE_ARC4RANDOM */
672 * Do we have vproc_transaction_begin/end?
675 /* #undef HAVE_VPROC_TRANSACTION_BEGIN */
682 /* #undef HAVE_LIBUSB */
686 * Do we have libwrap and tcpd.h?
689 /* #undef HAVE_TCPD_H */
693 * Do we have <iconv.h>?
696 /* #undef HAVE_ICONV_H */
700 * Do we have statfs or statvfs and one of the corresponding headers?
703 /* #undef HAVE_STATFS */
704 /* #undef HAVE_STATVFS */
705 /* #undef HAVE_SYS_MOUNT_H */
706 /* #undef HAVE_SYS_STATFS_H */
707 /* #undef HAVE_SYS_STATVFS_H */
708 /* #undef HAVE_SYS_VFS_H */
712 * Location of OS X localization bundle, if any.
715 /* #undef CUPS_BUNDLEDIR */
722 /* #undef HAVE_XPC */
723 /* #undef HAVE_XPC_PRIVATE_H */
727 * Do we have Mini-XML?
730 /* #undef HAVE_MXML_H */
734 * Do we have the C99 abs() function?
737 /* #undef HAVE_ABS */
738 #if !defined(HAVE_ABS) && !defined(abs)
739 # if defined(__GNUC__) || __STDC_VERSION__ >= 199901L
740 # define abs(x) _cups_abs(x)
741 static inline int _cups_abs(int i
) { return (i
< 0 ? -i
: i
); }
742 # elif defined(_MSC_VER)
743 # define abs(x) _cups_abs(x)
744 static __inline
int _cups_abs(int i
) { return (i
< 0 ? -i
: i
); }
746 # define abs(x) ((x) < 0 ? -(x) : (x))
747 # endif /* __GNUC__ || __STDC_VERSION__ */
748 #endif /* !HAVE_ABS && !abs */
750 #endif /* !_CUPS_CONFIG_H_ */