]>
git.ipfire.org Git - thirdparty/cups.git/blob - vcnet/config.h
a1c9bac0eccd1d9aec3f38ed511e437c4d0148ff
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 * What Security framework headers do we have?
387 /* #undef HAVE_AUTHORIZATION_H */
388 /* #undef HAVE_SECBASEPRIV_H */
389 /* #undef HAVE_SECCERTIFICATE_H */
390 /* #undef HAVE_SECIDENTITYSEARCHPRIV_H */
391 /* #undef HAVE_SECITEM_H */
392 /* #undef HAVE_SECITEMPRIV_H */
393 /* #undef HAVE_SECPOLICY_H */
394 /* #undef HAVE_SECPOLICYPRIV_H */
395 /* #undef HAVE_SECURETRANSPORTPRIV_H */
399 * Do we have the cssmErrorString function?
402 /* #undef HAVE_CSSMERRORSTRING */
406 * Do we have the SecGenerateSelfSignedCertificate function?
409 /* #undef HAVE_SECGENERATESELFSIGNEDCERTIFICATE */
413 * Do we have the SecKeychainOpen function?
416 /* #undef HAVE_SECKEYCHAINOPEN */
420 * Do we have libpaper?
423 /* #undef HAVE_LIBPAPER */
427 * Do we have mDNSResponder for DNS Service Discovery (aka Bonjour)?
434 * Do we have Avahi for DNS Service Discovery (aka Bonjour)?
441 * Do we have <sys/ioctl.h>?
444 #undef HAVE_SYS_IOCTL_H
448 * Does the "stat" structure contain the "st_gen" member?
451 /* #undef HAVE_ST_GEN */
455 * Does the "tm" structure contain the "tm_gmtoff" member?
458 /* #undef HAVE_TM_GMTOFF */
462 * Do we have rresvport_af()?
465 /* #undef HAVE_RRESVPORT_AF */
469 * Do we have getaddrinfo()?
472 #define HAVE_GETADDRINFO 1
476 * Do we have getnameinfo()?
479 #define HAVE_GETNAMEINFO 1
483 * Do we have getifaddrs()?
486 /* #undef HAVE_GETIFADDRS */
490 * Do we have hstrerror()?
493 /* #undef HAVE_HSTRERROR */
497 * Do we have res_init()?
500 /* #undef HAVE_RES_INIT */
504 * Do we have <resolv.h>
507 /* #undef HAVE_RESOLV_H */
511 * Do we have the <sys/sockio.h> header file?
514 /* #undef HAVE_SYS_SOCKIO_H */
518 * Does the sockaddr structure contain an sa_len parameter?
521 /* #undef HAVE_STRUCT_SOCKADDR_SA_LEN */
525 * Do we have pthread support?
528 /* #undef HAVE_PTHREAD_H */
532 * Do we have launchd support?
535 /* #undef HAVE_LAUNCH_H */
536 /* #undef HAVE_LAUNCHD */
540 * Do we have systemd support?
543 /* #undef HAVE_SYSTEMD */
547 * Various scripting languages...
550 /* #undef HAVE_JAVA */
552 /* #undef HAVE_PERL */
554 /* #undef HAVE_PHP */
556 /* #undef HAVE_PYTHON */
557 #define CUPS_PYTHON ""
561 * Location of the poppler/Xpdf pdftops program...
564 /* #undef HAVE_PDFTOPS */
565 /* #undef HAVE_PDFTOPS_WITH_ORIGPAGESIZES */
566 #define CUPS_PDFTOPS ""
570 * Location of the Ghostscript gs program...
573 /* #undef HAVE_GHOSTSCRIPT */
574 #define CUPS_GHOSTSCRIPT ""
578 * Do we have CoreFoundation public and private headers?
581 /* #undef HAVE_COREFOUNDATION_H */
582 /* #undef HAVE_CFPRIV_H */
583 /* #undef HAVE_CFBUNDLEPRIV_H */
587 * Do we have ApplicationServices public headers?
590 /* #undef HAVE_APPLICATIONSERVICES_H */
594 * Do we have the SCDynamicStoreCopyComputerName function?
597 /* #undef HAVE_SCDYNAMICSTORECOPYCOMPUTERNAME */
601 * Do we have OS X 10.4's mbr_XXX functions?
604 /* #undef HAVE_MEMBERSHIP_H */
605 /* #undef HAVE_MEMBERSHIPPRIV_H */
606 /* #undef HAVE_MBR_UID_TO_UUID */
610 * Do we have Darwin's notify_post header and function?
613 /* #undef HAVE_NOTIFY_H */
614 /* #undef HAVE_NOTIFY_POST */
621 /* #undef HAVE_DBUS */
622 /* #undef HAVE_DBUS_MESSAGE_ITER_INIT_APPEND */
623 /* #undef HAVE_DBUS_THREADS_INIT */
627 * Do we have the GSSAPI support library (for Kerberos support)?
630 /* #undef HAVE_GSS_ACQUIRE_CRED_EX_F */
631 /* #undef HAVE_GSS_C_NT_HOSTBASED_SERVICE */
632 /* #undef HAVE_GSS_GSSAPI_H */
633 /* #undef HAVE_GSS_GSSAPI_SPI_H */
634 /* #undef HAVE_GSSAPI */
635 /* #undef HAVE_GSSAPI_GSSAPI_H */
636 /* #undef HAVE_GSSAPI_H */
640 * Default GSS service name...
643 #define CUPS_DEFAULT_GSSSERVICENAME "host"
647 * Select/poll interfaces...
650 /* #undef HAVE_POLL */
651 /* #undef HAVE_EPOLL */
652 /* #undef HAVE_KQUEUE */
656 * Do we have the <dlfcn.h> header?
659 /* #undef HAVE_DLFCN_H */
663 * Do we have <sys/param.h>?
666 /* #undef HAVE_SYS_PARAM_H */
670 * Do we have <sys/ucred.h>?
673 /* #undef HAVE_SYS_UCRED_H */
677 * Do we have removefile()?
680 /* #undef HAVE_REMOVEFILE */
684 * Do we have <sandbox.h>?
687 /* #undef HAVE_SANDBOX_H */
691 * Which random number generator function to use...
694 /* #undef HAVE_ARC4RANDOM */
695 /* #undef HAVE_RANDOM */
696 /* #undef HAVE_LRAND48 */
698 #ifdef HAVE_ARC4RANDOM
699 # define CUPS_RAND() arc4random()
700 # define CUPS_SRAND(v) arc4random_stir()
701 #elif defined(HAVE_RANDOM)
702 # define CUPS_RAND() random()
703 # define CUPS_SRAND(v) srandom(v)
704 #elif defined(HAVE_LRAND48)
705 # define CUPS_RAND() lrand48()
706 # define CUPS_SRAND(v) srand48(v)
708 # define CUPS_RAND() rand()
709 # define CUPS_SRAND(v) srand(v)
710 #endif /* HAVE_ARC4RANDOM */
714 * Do we have vproc_transaction_begin/end?
717 /* #undef HAVE_VPROC_TRANSACTION_BEGIN */
724 /* #undef HAVE_LIBUSB */
728 * Do we have libwrap and tcpd.h?
731 /* #undef HAVE_TCPD_H */
735 * Do we have <iconv.h>?
738 /* #undef HAVE_ICONV_H */
742 * Do we have statfs or statvfs and one of the corresponding headers?
745 /* #undef HAVE_STATFS */
746 /* #undef HAVE_STATVFS */
747 /* #undef HAVE_SYS_MOUNT_H */
748 /* #undef HAVE_SYS_STATFS_H */
749 /* #undef HAVE_SYS_STATVFS_H */
750 /* #undef HAVE_SYS_VFS_H */
754 * Location of OS X localization bundle, if any.
757 /* #undef CUPS_BUNDLEDIR */
764 /* #undef HAVE_XPC */
765 /* #undef HAVE_XPC_PRIVATE_H */
769 * Do we have Mini-XML?
772 /* #undef HAVE_MXML_H */
776 * Do we have the C99 abs() function?
779 /* #undef HAVE_ABS */
780 #if !defined(HAVE_ABS) && !defined(abs)
781 # if defined(__GNUC__) || __STDC_VERSION__ >= 199901L
782 # define abs(x) _cups_abs(x)
783 static inline int _cups_abs(int i
) { return (i
< 0 ? -i
: i
); }
784 # elif defined(_MSC_VER)
785 # define abs(x) _cups_abs(x)
786 static __inline
int _cups_abs(int i
) { return (i
< 0 ? -i
: i
); }
788 # define abs(x) ((x) < 0 ? -(x) : (x))
789 # endif /* __GNUC__ || __STDC_VERSION__ */
790 #endif /* !HAVE_ABS && !abs */
792 #endif /* !_CUPS_CONFIG_H_ */