]>
git.ipfire.org Git - thirdparty/cups.git/blob - vcnet/config.h
4 * Configuration file for CUPS on Windows.
6 * Copyright 2007-2014 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 strcasecmp() and strncasecmp() functions to the Win32 stricmp()
58 * and strnicmp() functions...
61 #define strcasecmp stricmp
62 #define strncasecmp strnicmp
66 * Map the POSIX sleep() and usleep() functions to the Win32 Sleep() function...
69 typedef unsigned long useconds_t
;
70 #define sleep(X) Sleep(1000 * (X))
71 #define usleep(X) Sleep((X)/1000)
75 * Map various parameters to Posix style system calls
81 # define O_RDONLY _O_RDONLY
82 # define O_WRONLY _O_WRONLY
83 # define O_CREAT _O_CREAT
84 # define O_TRUNC _O_TRUNC
92 #undef __CHAR_UNSIGNED__
96 * Version of software...
99 #define CUPS_SVERSION "CUPS v2.1svn"
100 #define CUPS_MINIMAL "CUPS/2.1svn"
104 * Default user and groups...
107 #define CUPS_DEFAULT_USER ""
108 #define CUPS_DEFAULT_GROUP ""
109 #define CUPS_DEFAULT_SYSTEM_GROUPS ""
110 #define CUPS_DEFAULT_PRINTOPERATOR_AUTH ""
114 * Default file permissions...
117 #define CUPS_DEFAULT_CONFIG_FILE_PERM 0640
118 #define CUPS_DEFAULT_LOG_FILE_PERM 0644
122 * Default logging settings...
125 #define CUPS_DEFAULT_LOG_LEVEL "warn"
126 #define CUPS_DEFAULT_ACCESS_LOG_LEVEL "actions"
130 * Default fatal error settings...
133 #define CUPS_DEFAULT_FATAL_ERRORS "config"
137 * Default browsing settings...
140 #define CUPS_DEFAULT_BROWSING 1
141 #define CUPS_DEFAULT_BROWSE_LOCAL_PROTOCOLS ""
142 #define CUPS_DEFAULT_DEFAULT_SHARED 1
146 * Default IPP port...
149 #define CUPS_DEFAULT_IPP_PORT 631
153 * Default printcap file...
156 #define CUPS_DEFAULT_PRINTCAP ""
160 * Default Samba and LPD config files...
163 #define CUPS_DEFAULT_SMB_CONFIG_FILE ""
164 #define CUPS_DEFAULT_LPD_CONFIG_FILE ""
168 * Default MaxCopies value...
171 #define CUPS_DEFAULT_MAX_COPIES 9999
175 * Do we have domain socket support, and if so what is the default one?
178 #undef CUPS_DEFAULT_DOMAINSOCKET
182 * Default WebInterface value...
185 #undef CUPS_DEFAULT_WEBIF
189 * Where are files stored?
191 * Note: These are defaults, which can be overridden by environment
192 * variables at run-time...
195 #define CUPS_BINDIR "C:/CUPS/bin"
196 #define CUPS_CACHEDIR "C:/CUPS/cache"
197 #define CUPS_DATADIR "C:/CUPS/share"
198 #define CUPS_DOCROOT "C:/CUPS/share/doc"
199 #define CUPS_FONTPATH "C:/CUPS/share/fonts"
200 #define CUPS_LOCALEDIR "C:/CUPS/locale"
201 #define CUPS_LOGDIR "C:/CUPS/logs"
202 #define CUPS_REQUESTS "C:/CUPS/spool"
203 #define CUPS_SBINDIR "C:/CUPS/sbin"
204 #define CUPS_SERVERBIN "C:/CUPS/lib"
205 #define CUPS_SERVERROOT "C:/CUPS/etc"
206 #define CUPS_STATEDIR "C:/CUPS/run"
210 * Do we have posix_spawn?
213 /* #undef HAVE_POSIX_SPAWN */
221 #define HAVE_INFLATECOPY 1
225 * Do we have PAM stuff?
228 #define HAVE_LIBPAM 0
229 /* #undef HAVE_PAM_PAM_APPL_H */
230 /* #undef HAVE_PAM_SET_ITEM */
231 /* #undef HAVE_PAM_SETCRED */
235 * Do we have <shadow.h>?
238 /* #undef HAVE_SHADOW_H */
242 * Do we have <crypt.h>?
245 /* #undef HAVE_CRYPT_H */
252 /* #undef HAVE_STDINT_H */
256 * Use <string.h>, <strings.h>, and/or <bstring.h>?
259 #define HAVE_STRING_H 1
260 /* #undef HAVE_STRINGS_H */
261 /* #undef HAVE_BSTRING_H */
265 * Do we have the long long type?
268 /* #undef HAVE_LONG_LONG */
270 #ifdef HAVE_LONG_LONG
271 # define CUPS_LLFMT "%lld"
272 # define CUPS_LLCAST (long long)
274 # define CUPS_LLFMT "%ld"
275 # define CUPS_LLCAST (long)
276 #endif /* HAVE_LONG_LONG */
280 * Do we have the strtoll() function?
283 /* #undef HAVE_STRTOLL */
286 # define strtoll(nptr,endptr,base) strtol((nptr), (endptr), (base))
287 #endif /* !HAVE_STRTOLL */
291 * Do we have the strXXX() functions?
294 #define HAVE_STRDUP 1
295 /* #undef HAVE_STRLCAT */
296 /* #undef HAVE_STRLCPY */
300 * Do we have the geteuid() function?
303 /* #undef HAVE_GETEUID */
307 * Do we have the setpgid() function?
310 /* #undef HAVE_SETPGID */
314 * Do we have the vsyslog() function?
317 /* #undef HAVE_VSYSLOG */
321 * Do we have the (v)snprintf() functions?
324 #define HAVE_SNPRINTF 1
325 #define HAVE_VSNPRINTF 1
329 * What signal functions to use?
332 /* #undef HAVE_SIGSET */
333 /* #undef HAVE_SIGACTION */
337 * What wait functions to use?
340 /* #undef HAVE_WAITPID */
341 /* #undef HAVE_WAIT3 */
345 * Do we have the mallinfo function and malloc.h?
348 /* #undef HAVE_MALLINFO */
349 /* #undef HAVE_MALLOC_H */
353 * Do we have the POSIX ACL functions?
356 /* #undef HAVE_ACL_INIT */
360 * Do we have the langinfo.h header file?
363 /* #undef HAVE_LANGINFO_H */
367 * Which encryption libraries do we have?
370 /* #undef HAVE_CDSASSL */
371 /* #undef HAVE_GNUTLS */
377 * Do we have the gnutls_transport_set_pull_timeout_function function?
380 /* #undef HAVE_GNUTLS_TRANSPORT_SET_PULL_TIMEOUT_FUNCTION */
384 * Do we have the gnutls_priority_set_direct function?
387 /* #undef HAVE_GNUTLS_PRIORITY_SET_DIRECT */
391 * What Security framework headers do we have?
394 /* #undef HAVE_AUTHORIZATION_H */
395 /* #undef HAVE_SECBASEPRIV_H */
396 /* #undef HAVE_SECCERTIFICATE_H */
397 /* #undef HAVE_SECIDENTITYSEARCHPRIV_H */
398 /* #undef HAVE_SECITEM_H */
399 /* #undef HAVE_SECITEMPRIV_H */
400 /* #undef HAVE_SECPOLICY_H */
401 /* #undef HAVE_SECPOLICYPRIV_H */
402 /* #undef HAVE_SECURETRANSPORTPRIV_H */
406 * Do we have the cssmErrorString function?
409 /* #undef HAVE_CSSMERRORSTRING */
413 * Do we have the SecGenerateSelfSignedCertificate function?
416 /* #undef HAVE_SECGENERATESELFSIGNEDCERTIFICATE */
420 * Do we have the SecKeychainOpen function?
423 /* #undef HAVE_SECKEYCHAINOPEN */
427 * Do we have libpaper?
430 /* #undef HAVE_LIBPAPER */
434 * Do we have mDNSResponder for DNS Service Discovery (aka Bonjour)?
441 * Do we have Avahi for DNS Service Discovery (aka Bonjour)?
448 * Do we have <sys/ioctl.h>?
451 #undef HAVE_SYS_IOCTL_H
455 * Does the "stat" structure contain the "st_gen" member?
458 /* #undef HAVE_ST_GEN */
462 * Does the "tm" structure contain the "tm_gmtoff" member?
465 /* #undef HAVE_TM_GMTOFF */
469 * Do we have rresvport_af()?
472 /* #undef HAVE_RRESVPORT_AF */
476 * Do we have getaddrinfo()?
479 #define HAVE_GETADDRINFO 1
483 * Do we have getnameinfo()?
486 #define HAVE_GETNAMEINFO 1
490 * Do we have getifaddrs()?
493 /* #undef HAVE_GETIFADDRS */
497 * Do we have hstrerror()?
500 /* #undef HAVE_HSTRERROR */
504 * Do we have res_init()?
507 /* #undef HAVE_RES_INIT */
511 * Do we have <resolv.h>
514 /* #undef HAVE_RESOLV_H */
518 * Do we have the <sys/sockio.h> header file?
521 /* #undef HAVE_SYS_SOCKIO_H */
525 * Does the sockaddr structure contain an sa_len parameter?
528 /* #undef HAVE_STRUCT_SOCKADDR_SA_LEN */
532 * Do we have pthread support?
535 /* #undef HAVE_PTHREAD_H */
539 * Do we have launchd support?
542 /* #undef HAVE_LAUNCH_H */
543 /* #undef HAVE_LAUNCHD */
547 * Do we have systemd support?
550 /* #undef HAVE_SYSTEMD */
554 * Various scripting languages...
557 /* #undef HAVE_JAVA */
559 /* #undef HAVE_PERL */
561 /* #undef HAVE_PHP */
563 /* #undef HAVE_PYTHON */
564 #define CUPS_PYTHON ""
568 * Location of the poppler/Xpdf pdftops program...
571 /* #undef HAVE_PDFTOPS */
572 /* #undef HAVE_PDFTOPS_WITH_ORIGPAGESIZES */
573 #define CUPS_PDFTOPS ""
577 * Location of the Ghostscript gs program...
580 /* #undef HAVE_GHOSTSCRIPT */
581 #define CUPS_GHOSTSCRIPT ""
585 * Do we have CoreFoundation public and private headers?
588 /* #undef HAVE_COREFOUNDATION_H */
589 /* #undef HAVE_CFPRIV_H */
590 /* #undef HAVE_CFBUNDLEPRIV_H */
594 * Do we have ApplicationServices public headers?
597 /* #undef HAVE_APPLICATIONSERVICES_H */
601 * Do we have the SCDynamicStoreCopyComputerName function?
604 /* #undef HAVE_SCDYNAMICSTORECOPYCOMPUTERNAME */
608 * Do we have OS X 10.4's mbr_XXX functions?
611 /* #undef HAVE_MEMBERSHIP_H */
612 /* #undef HAVE_MEMBERSHIPPRIV_H */
613 /* #undef HAVE_MBR_UID_TO_UUID */
617 * Do we have Darwin's notify_post header and function?
620 /* #undef HAVE_NOTIFY_H */
621 /* #undef HAVE_NOTIFY_POST */
628 /* #undef HAVE_DBUS */
629 /* #undef HAVE_DBUS_MESSAGE_ITER_INIT_APPEND */
630 /* #undef HAVE_DBUS_THREADS_INIT */
634 * Do we have the GSSAPI support library (for Kerberos support)?
637 /* #undef HAVE_GSS_ACQUIRE_CRED_EX_F */
638 /* #undef HAVE_GSS_C_NT_HOSTBASED_SERVICE */
639 /* #undef HAVE_GSS_GSSAPI_H */
640 /* #undef HAVE_GSS_GSSAPI_SPI_H */
641 /* #undef HAVE_GSSAPI */
642 /* #undef HAVE_GSSAPI_GSSAPI_H */
643 /* #undef HAVE_GSSAPI_H */
647 * Default GSS service name...
650 #define CUPS_DEFAULT_GSSSERVICENAME "host"
654 * Select/poll interfaces...
657 /* #undef HAVE_POLL */
658 /* #undef HAVE_EPOLL */
659 /* #undef HAVE_KQUEUE */
663 * Do we have the <dlfcn.h> header?
666 /* #undef HAVE_DLFCN_H */
670 * Do we have <sys/param.h>?
673 /* #undef HAVE_SYS_PARAM_H */
677 * Do we have <sys/ucred.h>?
680 /* #undef HAVE_SYS_UCRED_H */
684 * Do we have removefile()?
687 /* #undef HAVE_REMOVEFILE */
691 * Do we have <sandbox.h>?
694 /* #undef HAVE_SANDBOX_H */
698 * Which random number generator function to use...
701 /* #undef HAVE_ARC4RANDOM */
702 /* #undef HAVE_RANDOM */
703 /* #undef HAVE_LRAND48 */
705 #ifdef HAVE_ARC4RANDOM
706 # define CUPS_RAND() arc4random()
707 # define CUPS_SRAND(v) arc4random_stir()
708 #elif defined(HAVE_RANDOM)
709 # define CUPS_RAND() random()
710 # define CUPS_SRAND(v) srandom(v)
711 #elif defined(HAVE_LRAND48)
712 # define CUPS_RAND() lrand48()
713 # define CUPS_SRAND(v) srand48(v)
715 # define CUPS_RAND() rand()
716 # define CUPS_SRAND(v) srand(v)
717 #endif /* HAVE_ARC4RANDOM */
721 * Do we have vproc_transaction_begin/end?
724 /* #undef HAVE_VPROC_TRANSACTION_BEGIN */
731 /* #undef HAVE_LIBUSB */
735 * Do we have libwrap and tcpd.h?
738 /* #undef HAVE_TCPD_H */
742 * Do we have <iconv.h>?
745 /* #undef HAVE_ICONV_H */
749 * Do we have statfs or statvfs and one of the corresponding headers?
752 /* #undef HAVE_STATFS */
753 /* #undef HAVE_STATVFS */
754 /* #undef HAVE_SYS_MOUNT_H */
755 /* #undef HAVE_SYS_STATFS_H */
756 /* #undef HAVE_SYS_STATVFS_H */
757 /* #undef HAVE_SYS_VFS_H */
761 * Location of OS X localization bundle, if any.
764 /* #undef CUPS_BUNDLEDIR */
771 /* #undef HAVE_XPC */
772 /* #undef HAVE_XPC_PRIVATE_H */
776 * Do we have Mini-XML?
779 /* #undef HAVE_MXML_H */
783 * Do we have the C99 abs() function?
786 /* #undef HAVE_ABS */
787 #if !defined(HAVE_ABS) && !defined(abs)
788 # if defined(__GNUC__) || __STDC_VERSION__ >= 199901L
789 # define abs(x) _cups_abs(x)
790 static inline int _cups_abs(int i
) { return (i
< 0 ? -i
: i
); }
791 # elif defined(_MSC_VER)
792 # define abs(x) _cups_abs(x)
793 static __inline
int _cups_abs(int i
) { return (i
< 0 ? -i
: i
); }
795 # define abs(x) ((x) < 0 ? -(x) : (x))
796 # endif /* __GNUC__ || __STDC_VERSION__ */
797 #endif /* !HAVE_ABS && !abs */
799 #endif /* !_CUPS_CONFIG_H_ */