]> git.ipfire.org Git - thirdparty/cups.git/blame - vcnet/config.h
Fix lpoptions defaults (Issue #5681)
[thirdparty/cups.git] / vcnet / config.h
CommitLineData
ef416fc2 1/*
5a1d7a17 2 * Configuration file for CUPS on Windows.
ef416fc2 3 *
4ffdbc48
MS
4 * Copyright © 2007-2018 by Apple Inc.
5 * Copyright © 1997-2007 by Easy Software Products.
ef416fc2 6 *
5a1d7a17
MS
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
57b7b66b 11 * missing or damaged, see the license at "http://www.cups.org/".
ef416fc2 12 */
13
14#ifndef _CUPS_CONFIG_H_
15#define _CUPS_CONFIG_H_
16
536bc2c6
MS
17/*
18 * Include necessary headers...
19 */
20
21#include <stdio.h>
22#include <stdlib.h>
23#include <string.h>
24#include <stdarg.h>
536bc2c6 25#include <io.h>
7cf5915e 26#include <direct.h>
536bc2c6
MS
27
28
29/*
7a0cbd5e 30 * Microsoft renames the POSIX functions to _name, and introduces
536bc2c6
MS
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().
34 *
35 * To avoid moronic problems like this, we #define the POSIX function
36 * names to the corresponding non-standard Microsoft names.
37 */
38
39#define access _access
40#define close _close
41#define fileno _fileno
42#define lseek _lseek
7cf5915e 43#define mkdir(d,p) _mkdir(d)
536bc2c6
MS
44#define open _open
45#define read _read
7cf5915e 46#define rmdir _rmdir
536bc2c6
MS
47#define snprintf _snprintf
48#define strdup _strdup
49#define unlink _unlink
50#define vsnprintf _vsnprintf
51#define write _write
52
53
015214aa 54/*
0313a59e
MS
55 * Map the POSIX strcasecmp() and strncasecmp() functions to the Win32
56 * _stricmp() and _strnicmp() functions...
015214aa
MS
57 */
58
84c97c05
MS
59#define strcasecmp _stricmp
60#define strncasecmp _strnicmp
015214aa
MS
61
62
5180a04c
MS
63/*
64 * Map the POSIX sleep() and usleep() functions to the Win32 Sleep() function...
65 */
66
33c9220c 67typedef unsigned long useconds_t;
5180a04c
MS
68#define sleep(X) Sleep(1000 * (X))
69#define usleep(X) Sleep((X)/1000)
70
71
6d2f911b
MS
72/*
73 * Map various parameters to Posix style system calls
74 */
75
76# define F_OK 00
77# define W_OK 02
78# define R_OK 04
79# define O_RDONLY _O_RDONLY
80# define O_WRONLY _O_WRONLY
015214aa 81# define O_CREAT _O_CREAT
6d2f911b
MS
82# define O_TRUNC _O_TRUNC
83
84
ef416fc2 85/*
86 * Compiler stuff...
87 */
88
89#undef const
90#undef __CHAR_UNSIGNED__
91
92
93/*
94 * Version of software...
95 */
96
ee5419f6
MS
97#define CUPS_SVERSION "CUPS v2.2.12"
98#define CUPS_MINIMAL "CUPS/2.2.12"
ef416fc2 99
100
101/*
536bc2c6 102 * Default user and groups...
ef416fc2 103 */
104
6d2f911b
MS
105#define CUPS_DEFAULT_USER ""
106#define CUPS_DEFAULT_GROUP ""
107#define CUPS_DEFAULT_SYSTEM_GROUPS ""
108#define CUPS_DEFAULT_PRINTOPERATOR_AUTH ""
61b7ebde 109#define CUPS_DEFAULT_SYSTEM_AUTHKEY ""
536bc2c6
MS
110
111
112/*
113 * Default file permissions...
114 */
115
61b7ebde 116#define CUPS_DEFAULT_CONFIG_FILE_PERM 0644
536bc2c6
MS
117#define CUPS_DEFAULT_LOG_FILE_PERM 0644
118
119
120/*
121 * Default logging settings...
122 */
123
124#define CUPS_DEFAULT_LOG_LEVEL "warn"
61b7ebde 125#define CUPS_DEFAULT_ACCESS_LOG_LEVEL "none"
536bc2c6
MS
126
127
128/*
129 * Default fatal error settings...
130 */
131
132#define CUPS_DEFAULT_FATAL_ERRORS "config"
133
134
135/*
136 * Default browsing settings...
137 */
138
139#define CUPS_DEFAULT_BROWSING 1
61b7ebde 140#define CUPS_DEFAULT_BROWSE_LOCAL_PROTOCOLS "dnssd"
536bc2c6 141#define CUPS_DEFAULT_DEFAULT_SHARED 1
ef416fc2 142
143
144/*
145 * Default IPP port...
146 */
147
536bc2c6
MS
148#define CUPS_DEFAULT_IPP_PORT 631
149
150
151/*
152 * Default printcap file...
153 */
154
155#define CUPS_DEFAULT_PRINTCAP ""
ef416fc2 156
157
158/*
536bc2c6 159 * Default Samba and LPD config files...
ef416fc2 160 */
161
536bc2c6
MS
162#define CUPS_DEFAULT_SMB_CONFIG_FILE ""
163#define CUPS_DEFAULT_LPD_CONFIG_FILE ""
164
165
166/*
167 * Default MaxCopies value...
168 */
169
170#define CUPS_DEFAULT_MAX_COPIES 9999
ef416fc2 171
172
173/*
1e564ac8 174 * Do we have domain socket support, and if so what is the default one?
ef416fc2 175 */
176
177#undef CUPS_DEFAULT_DOMAINSOCKET
178
179
db8b865d
MS
180/*
181 * Default WebInterface value...
182 */
183
61b7ebde 184#define CUPS_DEFAULT_WEBIF 0
db8b865d
MS
185
186
ef416fc2 187/*
188 * Where are files stored?
189 *
190 * Note: These are defaults, which can be overridden by environment
191 * variables at run-time...
192 */
193
536bc2c6
MS
194#define CUPS_BINDIR "C:/CUPS/bin"
195#define CUPS_CACHEDIR "C:/CUPS/cache"
196#define CUPS_DATADIR "C:/CUPS/share"
197#define CUPS_DOCROOT "C:/CUPS/share/doc"
198#define CUPS_FONTPATH "C:/CUPS/share/fonts"
199#define CUPS_LOCALEDIR "C:/CUPS/locale"
200#define CUPS_LOGDIR "C:/CUPS/logs"
201#define CUPS_REQUESTS "C:/CUPS/spool"
202#define CUPS_SBINDIR "C:/CUPS/sbin"
203#define CUPS_SERVERBIN "C:/CUPS/lib"
204#define CUPS_SERVERROOT "C:/CUPS/etc"
205#define CUPS_STATEDIR "C:/CUPS/run"
ef416fc2 206
207
1e564ac8
MS
208/*
209 * Do we have posix_spawn?
210 */
211
212/* #undef HAVE_POSIX_SPAWN */
213
214
ef416fc2 215/*
db8b865d 216 * Do we have ZLIB?
ef416fc2 217 */
218
db8b865d
MS
219#define HAVE_LIBZ 1
220#define HAVE_INFLATECOPY 1
ef416fc2 221
222
223/*
224 * Do we have PAM stuff?
225 */
226
ef416fc2 227#define HAVE_LIBPAM 0
536bc2c6
MS
228/* #undef HAVE_PAM_PAM_APPL_H */
229/* #undef HAVE_PAM_SET_ITEM */
230/* #undef HAVE_PAM_SETCRED */
ef416fc2 231
232
233/*
234 * Do we have <shadow.h>?
235 */
236
536bc2c6 237/* #undef HAVE_SHADOW_H */
ef416fc2 238
239
240/*
241 * Do we have <crypt.h>?
242 */
243
536bc2c6 244/* #undef HAVE_CRYPT_H */
ef416fc2 245
246
f8b3a85b 247/*
db8b865d 248 * Use <stdint.h>?
f8b3a85b
MS
249 */
250
db8b865d 251/* #undef HAVE_STDINT_H */
f8b3a85b
MS
252
253
ef416fc2 254/*
255 * Use <string.h>, <strings.h>, and/or <bstring.h>?
256 */
257
536bc2c6
MS
258#define HAVE_STRING_H 1
259/* #undef HAVE_STRINGS_H */
260/* #undef HAVE_BSTRING_H */
ef416fc2 261
262
263/*
264 * Do we have the long long type?
265 */
266
536bc2c6 267/* #undef HAVE_LONG_LONG */
ef416fc2 268
269#ifdef HAVE_LONG_LONG
270# define CUPS_LLFMT "%lld"
271# define CUPS_LLCAST (long long)
272#else
273# define CUPS_LLFMT "%ld"
274# define CUPS_LLCAST (long)
275#endif /* HAVE_LONG_LONG */
276
277
278/*
279 * Do we have the strtoll() function?
280 */
281
536bc2c6 282/* #undef HAVE_STRTOLL */
ef416fc2 283
284#ifndef HAVE_STRTOLL
285# define strtoll(nptr,endptr,base) strtol((nptr), (endptr), (base))
286#endif /* !HAVE_STRTOLL */
287
288
289/*
290 * Do we have the strXXX() functions?
291 */
292
6d2f911b 293#define HAVE_STRDUP 1
536bc2c6
MS
294/* #undef HAVE_STRLCAT */
295/* #undef HAVE_STRLCPY */
ef416fc2 296
297
298/*
299 * Do we have the geteuid() function?
300 */
301
536bc2c6 302/* #undef HAVE_GETEUID */
ef416fc2 303
304
88f9aafc
MS
305/*
306 * Do we have the setpgid() function?
307 */
308
309/* #undef HAVE_SETPGID */
310
311
ef416fc2 312/*
313 * Do we have the vsyslog() function?
314 */
315
536bc2c6 316/* #undef HAVE_VSYSLOG */
ef416fc2 317
318
61b7ebde
MS
319/*
320 * Do we have the systemd journal functions?
321 */
322
323/* #undef HAVE_SYSTEMD_SD_JOURNAL_H */
324
325
ef416fc2 326/*
327 * Do we have the (v)snprintf() functions?
328 */
329
536bc2c6
MS
330#define HAVE_SNPRINTF 1
331#define HAVE_VSNPRINTF 1
ef416fc2 332
333
334/*
335 * What signal functions to use?
336 */
337
536bc2c6
MS
338/* #undef HAVE_SIGSET */
339/* #undef HAVE_SIGACTION */
ef416fc2 340
341
342/*
343 * What wait functions to use?
344 */
345
536bc2c6
MS
346/* #undef HAVE_WAITPID */
347/* #undef HAVE_WAIT3 */
ef416fc2 348
349
350/*
351 * Do we have the mallinfo function and malloc.h?
352 */
353
536bc2c6
MS
354/* #undef HAVE_MALLINFO */
355/* #undef HAVE_MALLOC_H */
356
357
358/*
359 * Do we have the POSIX ACL functions?
360 */
361
362/* #undef HAVE_ACL_INIT */
ef416fc2 363
364
365/*
366 * Do we have the langinfo.h header file?
367 */
368
536bc2c6 369/* #undef HAVE_LANGINFO_H */
ef416fc2 370
371
372/*
373 * Which encryption libraries do we have?
374 */
375
536bc2c6
MS
376/* #undef HAVE_CDSASSL */
377/* #undef HAVE_GNUTLS */
61b7ebde
MS
378#define HAVE_SSPISSL 1
379#define HAVE_SSL 1
536bc2c6
MS
380
381
2f26c6b7
MS
382/*
383 * Do we have the gnutls_fips140_set_mode function?
384 */
385
386/* #undef HAVE_GNUTLS_FIPS140_SET_MODE */
387
388
1e564ac8
MS
389/*
390 * Do we have the gnutls_transport_set_pull_timeout_function function?
391 */
392
393/* #undef HAVE_GNUTLS_TRANSPORT_SET_PULL_TIMEOUT_FUNCTION */
394
395
19ba6878
MS
396/*
397 * Do we have the gnutls_priority_set_direct function?
398 */
399
400/* #undef HAVE_GNUTLS_PRIORITY_SET_DIRECT */
401
402
536bc2c6 403/*
db8b865d 404 * What Security framework headers do we have?
eac3a0a0
MS
405 */
406
db8b865d
MS
407/* #undef HAVE_AUTHORIZATION_H */
408/* #undef HAVE_SECBASEPRIV_H */
409/* #undef HAVE_SECCERTIFICATE_H */
410/* #undef HAVE_SECIDENTITYSEARCHPRIV_H */
411/* #undef HAVE_SECITEM_H */
412/* #undef HAVE_SECITEMPRIV_H */
413/* #undef HAVE_SECPOLICY_H */
414/* #undef HAVE_SECPOLICYPRIV_H */
415/* #undef HAVE_SECURETRANSPORTPRIV_H */
eac3a0a0
MS
416
417
418/*
419 * Do we have the cssmErrorString function?
420 */
421
422/* #undef HAVE_CSSMERRORSTRING */
423
424
1e564ac8
MS
425/*
426 * Do we have the SecGenerateSelfSignedCertificate function?
427 */
428
429/* #undef HAVE_SECGENERATESELFSIGNEDCERTIFICATE */
430
431
432/*
433 * Do we have the SecKeychainOpen function?
434 */
435
436/* #undef HAVE_SECKEYCHAINOPEN */
437
438
61b7ebde
MS
439/*
440 * Do we have (a working) SSLSetEnabledCiphers function?
441 */
442
443#define HAVE_SSLSETENABLEDCIPHERS 1
444
445
536bc2c6 446/*
db8b865d 447 * Do we have libpaper?
536bc2c6
MS
448 */
449
db8b865d 450/* #undef HAVE_LIBPAPER */
ef416fc2 451
452
453/*
db8b865d 454 * Do we have mDNSResponder for DNS Service Discovery (aka Bonjour)?
ef416fc2 455 */
456
db8b865d 457#define HAVE_DNSSD 1
ef416fc2 458
459
460/*
db8b865d 461 * Do we have Avahi for DNS Service Discovery (aka Bonjour)?
ef416fc2 462 */
463
db8b865d 464#undef HAVE_AVAHI
536bc2c6
MS
465
466
467/*
db8b865d 468 * Do we have <sys/ioctl.h>?
536bc2c6
MS
469 */
470
db8b865d 471#undef HAVE_SYS_IOCTL_H
536bc2c6
MS
472
473
eac3a0a0
MS
474/*
475 * Does the "stat" structure contain the "st_gen" member?
476 */
477
478/* #undef HAVE_ST_GEN */
479
480
ef416fc2 481/*
482 * Does the "tm" structure contain the "tm_gmtoff" member?
483 */
484
536bc2c6 485/* #undef HAVE_TM_GMTOFF */
ef416fc2 486
487
488/*
489 * Do we have rresvport_af()?
490 */
491
536bc2c6 492/* #undef HAVE_RRESVPORT_AF */
ef416fc2 493
494
495/*
496 * Do we have getaddrinfo()?
497 */
498
536bc2c6 499#define HAVE_GETADDRINFO 1
ef416fc2 500
501
502/*
503 * Do we have getnameinfo()?
504 */
505
536bc2c6 506#define HAVE_GETNAMEINFO 1
ef416fc2 507
508
509/*
510 * Do we have getifaddrs()?
511 */
512
536bc2c6 513/* #undef HAVE_GETIFADDRS */
ef416fc2 514
515
516/*
517 * Do we have hstrerror()?
518 */
519
536bc2c6
MS
520/* #undef HAVE_HSTRERROR */
521
522
523/*
524 * Do we have res_init()?
525 */
526
527/* #undef HAVE_RES_INIT */
528
529
530/*
531 * Do we have <resolv.h>
532 */
533
534/* #undef HAVE_RESOLV_H */
ef416fc2 535
536
537/*
538 * Do we have the <sys/sockio.h> header file?
539 */
540
536bc2c6 541/* #undef HAVE_SYS_SOCKIO_H */
ef416fc2 542
543
544/*
545 * Does the sockaddr structure contain an sa_len parameter?
546 */
547
536bc2c6 548/* #undef HAVE_STRUCT_SOCKADDR_SA_LEN */
ef416fc2 549
550
ef416fc2 551/*
552 * Do we have pthread support?
553 */
554
536bc2c6
MS
555/* #undef HAVE_PTHREAD_H */
556
557
1166bf58
MS
558/*
559 * Do we have on-demand support (launchd/systemd/upstart)?
560 */
561
562/* #undef HAVE_ONDEMAND */
563
564
536bc2c6
MS
565/*
566 * Do we have launchd support?
567 */
568
569/* #undef HAVE_LAUNCH_H */
570/* #undef HAVE_LAUNCHD */
ef416fc2 571
572
1e564ac8
MS
573/*
574 * Do we have systemd support?
575 */
576
577/* #undef HAVE_SYSTEMD */
578
579
1166bf58
MS
580/*
581 * Do we have upstart support?
582 */
583
584/* #undef HAVE_UPSTART */
585
586
ef416fc2 587/*
588 * Various scripting languages...
589 */
590
536bc2c6
MS
591/* #undef HAVE_JAVA */
592#define CUPS_JAVA ""
593/* #undef HAVE_PERL */
594#define CUPS_PERL ""
595/* #undef HAVE_PHP */
596#define CUPS_PHP ""
597/* #undef HAVE_PYTHON */
598#define CUPS_PYTHON ""
599
600
536bc2c6
MS
601/*
602 * Do we have CoreFoundation public and private headers?
603 */
604
605/* #undef HAVE_COREFOUNDATION_H */
606/* #undef HAVE_CFPRIV_H */
607/* #undef HAVE_CFBUNDLEPRIV_H */
608
609
6d2f911b
MS
610/*
611 * Do we have ApplicationServices public headers?
612 */
613
614/* #undef HAVE_APPLICATIONSERVICES_H */
615
616
617/*
618 * Do we have the SCDynamicStoreCopyComputerName function?
619 */
620
621/* #undef HAVE_SCDYNAMICSTORECOPYCOMPUTERNAME */
622
623
6eb98aee
MS
624/*
625 * Do we have the getgrouplist() function?
626 */
627
628#undef HAVE_GETGROUPLIST
629
630
536bc2c6 631/*
8072030b 632 * Do we have macOS 10.4's mbr_XXX functions?
536bc2c6
MS
633 */
634
635/* #undef HAVE_MEMBERSHIP_H */
636/* #undef HAVE_MEMBERSHIPPRIV_H */
637/* #undef HAVE_MBR_UID_TO_UUID */
638
639
640/*
eac3a0a0 641 * Do we have Darwin's notify_post header and function?
536bc2c6
MS
642 */
643
644/* #undef HAVE_NOTIFY_H */
645/* #undef HAVE_NOTIFY_POST */
646
647
536bc2c6 648/*
eac3a0a0 649 * Do we have DBUS?
536bc2c6
MS
650 */
651
eac3a0a0
MS
652/* #undef HAVE_DBUS */
653/* #undef HAVE_DBUS_MESSAGE_ITER_INIT_APPEND */
1e564ac8 654/* #undef HAVE_DBUS_THREADS_INIT */
536bc2c6
MS
655
656
657/*
658 * Do we have the GSSAPI support library (for Kerberos support)?
659 */
660
eac3a0a0
MS
661/* #undef HAVE_GSS_ACQUIRE_CRED_EX_F */
662/* #undef HAVE_GSS_C_NT_HOSTBASED_SERVICE */
663/* #undef HAVE_GSS_GSSAPI_H */
664/* #undef HAVE_GSS_GSSAPI_SPI_H */
536bc2c6 665/* #undef HAVE_GSSAPI */
536bc2c6 666/* #undef HAVE_GSSAPI_GSSAPI_H */
eac3a0a0 667/* #undef HAVE_GSSAPI_H */
536bc2c6
MS
668
669
670/*
671 * Default GSS service name...
672 */
673
f8b3a85b 674#define CUPS_DEFAULT_GSSSERVICENAME "host"
536bc2c6
MS
675
676
677/*
678 * Select/poll interfaces...
679 */
680
681/* #undef HAVE_POLL */
682/* #undef HAVE_EPOLL */
683/* #undef HAVE_KQUEUE */
684
685
686/*
687 * Do we have the <dlfcn.h> header?
688 */
689
690/* #undef HAVE_DLFCN_H */
691
692
693/*
694 * Do we have <sys/param.h>?
695 */
696
697/* #undef HAVE_SYS_PARAM_H */
698
699
700/*
701 * Do we have <sys/ucred.h>?
702 */
703
704/* #undef HAVE_SYS_UCRED_H */
705
706
707/*
708 * Do we have removefile()?
709 */
710
711/* #undef HAVE_REMOVEFILE */
712
713
714/*
715 * Do we have <sandbox.h>?
716 */
717
718/* #undef HAVE_SANDBOX_H */
719
720
721/*
722 * Which random number generator function to use...
723 */
724
f8b3a85b 725/* #undef HAVE_ARC4RANDOM */
536bc2c6 726/* #undef HAVE_RANDOM */
536bc2c6
MS
727/* #undef HAVE_LRAND48 */
728
f8b3a85b
MS
729#ifdef HAVE_ARC4RANDOM
730# define CUPS_RAND() arc4random()
61b7ebde 731# define CUPS_SRAND(v)
f8b3a85b
MS
732#elif defined(HAVE_RANDOM)
733# define CUPS_RAND() random()
734# define CUPS_SRAND(v) srandom(v)
735#elif defined(HAVE_LRAND48)
736# define CUPS_RAND() lrand48()
737# define CUPS_SRAND(v) srand48(v)
738#else
739# define CUPS_RAND() rand()
740# define CUPS_SRAND(v) srand(v)
741#endif /* HAVE_ARC4RANDOM */
742
536bc2c6 743
536bc2c6
MS
744/*
745 * Do we have libusb?
746 */
747
db8b865d 748/* #undef HAVE_LIBUSB */
536bc2c6
MS
749
750
751/*
752 * Do we have libwrap and tcpd.h?
753 */
754
755/* #undef HAVE_TCPD_H */
ef416fc2 756
757
eac3a0a0
MS
758/*
759 * Do we have <iconv.h>?
760 */
761
762/* #undef HAVE_ICONV_H */
763
764
765/*
766 * Do we have statfs or statvfs and one of the corresponding headers?
767 */
768
769/* #undef HAVE_STATFS */
770/* #undef HAVE_STATVFS */
771/* #undef HAVE_SYS_MOUNT_H */
772/* #undef HAVE_SYS_STATFS_H */
773/* #undef HAVE_SYS_STATVFS_H */
774/* #undef HAVE_SYS_VFS_H */
775
776
777/*
8072030b 778 * Location of macOS localization bundle, if any.
eac3a0a0
MS
779 */
780
781/* #undef CUPS_BUNDLEDIR */
782
783
784/*
db8b865d 785 * Do we have XPC?
eac3a0a0
MS
786 */
787
db8b865d
MS
788/* #undef HAVE_XPC */
789/* #undef HAVE_XPC_PRIVATE_H */
eac3a0a0
MS
790
791
792/*
db8b865d 793 * Do we have Mini-XML?
eac3a0a0
MS
794 */
795
db8b865d
MS
796/* #undef HAVE_MXML_H */
797
798
799/*
800 * Do we have the C99 abs() function?
801 */
eac3a0a0 802
db8b865d
MS
803/* #undef HAVE_ABS */
804#if !defined(HAVE_ABS) && !defined(abs)
805# if defined(__GNUC__) || __STDC_VERSION__ >= 199901L
806# define abs(x) _cups_abs(x)
807static inline int _cups_abs(int i) { return (i < 0 ? -i : i); }
808# elif defined(_MSC_VER)
809# define abs(x) _cups_abs(x)
810static __inline int _cups_abs(int i) { return (i < 0 ? -i : i); }
811# else
812# define abs(x) ((x) < 0 ? -(x) : (x))
813# endif /* __GNUC__ || __STDC_VERSION__ */
814#endif /* !HAVE_ABS && !abs */
eac3a0a0 815
ef416fc2 816#endif /* !_CUPS_CONFIG_H_ */