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