]> git.ipfire.org Git - thirdparty/cups.git/blame - vcnet/config.h
Merge changes from CUPS 1.5svn-r9717.
[thirdparty/cups.git] / vcnet / config.h
CommitLineData
ef416fc2 1/*
bc44d920 2 * "$Id: config.h 6649 2007-07-11 21:46:42Z mike $"
ef416fc2 3 *
5180a04c 4 * Configuration file for CUPS.
ef416fc2 5 *
5180a04c 6 * Copyright 2007-2010 by Apple Inc.
536bc2c6 7 * Copyright 1997-2007 by Easy Software Products.
ef416fc2 8 *
9 * These coded instructions, statements, and computer programs are the
bc44d920 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
f8b3a85b
MS
89#define CUPS_SVERSION "CUPS v1.5svn"
90#define CUPS_MINIMAL "CUPS/1.5svn"
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
107#define CUPS_DEFAULT_CONFIG_FILE_PERM 0644
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
131#define CUPS_DEFAULT_BROWSE_LOCAL_PROTOCOLS "CUPS dnssd"
132#define CUPS_DEFAULT_BROWSE_REMOTE_PROTOCOLS ""
133#define CUPS_DEFAULT_BROWSE_SHORT_NAMES 1
134#define CUPS_DEFAULT_DEFAULT_SHARED 1
135#define CUPS_DEFAULT_IMPLICIT_CLASSES 1
136#define CUPS_DEFAULT_USE_NETWORK_DEFAULT 0
ef416fc2 137
138
139/*
140 * Default IPP port...
141 */
142
536bc2c6
MS
143#define CUPS_DEFAULT_IPP_PORT 631
144
145
146/*
147 * Default printcap file...
148 */
149
150#define CUPS_DEFAULT_PRINTCAP ""
ef416fc2 151
152
153/*
536bc2c6 154 * Default Samba and LPD config files...
ef416fc2 155 */
156
536bc2c6
MS
157#define CUPS_DEFAULT_SMB_CONFIG_FILE ""
158#define CUPS_DEFAULT_LPD_CONFIG_FILE ""
159
160
161/*
162 * Default MaxCopies value...
163 */
164
165#define CUPS_DEFAULT_MAX_COPIES 9999
ef416fc2 166
167
168/*
169 * Do we have domain socket support?
170 */
171
172#undef CUPS_DEFAULT_DOMAINSOCKET
173
174
175/*
176 * Where are files stored?
177 *
178 * Note: These are defaults, which can be overridden by environment
179 * variables at run-time...
180 */
181
536bc2c6
MS
182#define CUPS_BINDIR "C:/CUPS/bin"
183#define CUPS_CACHEDIR "C:/CUPS/cache"
184#define CUPS_DATADIR "C:/CUPS/share"
185#define CUPS_DOCROOT "C:/CUPS/share/doc"
186#define CUPS_FONTPATH "C:/CUPS/share/fonts"
187#define CUPS_LOCALEDIR "C:/CUPS/locale"
188#define CUPS_LOGDIR "C:/CUPS/logs"
189#define CUPS_REQUESTS "C:/CUPS/spool"
190#define CUPS_SBINDIR "C:/CUPS/sbin"
191#define CUPS_SERVERBIN "C:/CUPS/lib"
192#define CUPS_SERVERROOT "C:/CUPS/etc"
193#define CUPS_STATEDIR "C:/CUPS/run"
ef416fc2 194
195
196/*
197 * Do we have various image libraries?
198 */
199
536bc2c6
MS
200/* #undef HAVE_LIBPNG */
201/* #undef HAVE_LIBZ */
202/* #undef HAVE_LIBJPEG */
203/* #undef HAVE_LIBTIFF */
ef416fc2 204
205
206/*
207 * Do we have PAM stuff?
208 */
209
210#ifndef HAVE_LIBPAM
211#define HAVE_LIBPAM 0
212#endif /* !HAVE_LIBPAM */
213
536bc2c6
MS
214/* #undef HAVE_PAM_PAM_APPL_H */
215/* #undef HAVE_PAM_SET_ITEM */
216/* #undef HAVE_PAM_SETCRED */
ef416fc2 217
218
219/*
220 * Do we have <shadow.h>?
221 */
222
536bc2c6 223/* #undef HAVE_SHADOW_H */
ef416fc2 224
225
226/*
227 * Do we have <crypt.h>?
228 */
229
536bc2c6 230/* #undef HAVE_CRYPT_H */
ef416fc2 231
232
f8b3a85b
MS
233/*
234 * Do we have <scsi/sg.h>?
235 */
236
237/* #undef HAVE_SCSI_SG_H */
238
239
ef416fc2 240/*
241 * Use <string.h>, <strings.h>, and/or <bstring.h>?
242 */
243
536bc2c6
MS
244#define HAVE_STRING_H 1
245/* #undef HAVE_STRINGS_H */
246/* #undef HAVE_BSTRING_H */
ef416fc2 247
248
249/*
250 * Do we have the long long type?
251 */
252
536bc2c6 253/* #undef HAVE_LONG_LONG */
ef416fc2 254
255#ifdef HAVE_LONG_LONG
256# define CUPS_LLFMT "%lld"
257# define CUPS_LLCAST (long long)
258#else
259# define CUPS_LLFMT "%ld"
260# define CUPS_LLCAST (long)
261#endif /* HAVE_LONG_LONG */
262
263
264/*
265 * Do we have the strtoll() function?
266 */
267
536bc2c6 268/* #undef HAVE_STRTOLL */
ef416fc2 269
270#ifndef HAVE_STRTOLL
271# define strtoll(nptr,endptr,base) strtol((nptr), (endptr), (base))
272#endif /* !HAVE_STRTOLL */
273
274
275/*
276 * Do we have the strXXX() functions?
277 */
278
6d2f911b
MS
279#define HAVE_STRDUP 1
280#define HAVE_STRCASECMP 1
281#define HAVE_STRNCASECMP 1
536bc2c6
MS
282/* #undef HAVE_STRLCAT */
283/* #undef HAVE_STRLCPY */
ef416fc2 284
285
286/*
287 * Do we have the geteuid() function?
288 */
289
536bc2c6 290/* #undef HAVE_GETEUID */
ef416fc2 291
292
293/*
294 * Do we have the vsyslog() function?
295 */
296
536bc2c6 297/* #undef HAVE_VSYSLOG */
ef416fc2 298
299
300/*
301 * Do we have the (v)snprintf() functions?
302 */
303
536bc2c6
MS
304#define HAVE_SNPRINTF 1
305#define HAVE_VSNPRINTF 1
ef416fc2 306
307
308/*
309 * What signal functions to use?
310 */
311
536bc2c6
MS
312/* #undef HAVE_SIGSET */
313/* #undef HAVE_SIGACTION */
ef416fc2 314
315
316/*
317 * What wait functions to use?
318 */
319
536bc2c6
MS
320/* #undef HAVE_WAITPID */
321/* #undef HAVE_WAIT3 */
ef416fc2 322
323
324/*
325 * Do we have the mallinfo function and malloc.h?
326 */
327
536bc2c6
MS
328/* #undef HAVE_MALLINFO */
329/* #undef HAVE_MALLOC_H */
330
331
332/*
333 * Do we have the POSIX ACL functions?
334 */
335
336/* #undef HAVE_ACL_INIT */
ef416fc2 337
338
339/*
340 * Do we have the langinfo.h header file?
341 */
342
536bc2c6 343/* #undef HAVE_LANGINFO_H */
ef416fc2 344
345
346/*
347 * Which encryption libraries do we have?
348 */
349
536bc2c6
MS
350/* #undef HAVE_CDSASSL */
351/* #undef HAVE_GNUTLS */
352/* #undef HAVE_LIBSSL */
cc754834
MS
353#define HAVE_SSPISSL
354#define HAVE_SSL
536bc2c6
MS
355
356
357/*
358 * What Security framework headers do we have?
359 */
360
361/* #undef HAVE_AUTHORIZATION_H */
362/* #undef HAVE_SECPOLICY_H */
363/* #undef HAVE_SECPOLICYPRIV_H */
364/* #undef HAVE_SECBASEPRIV_H */
365/* #undef HAVE_SECIDENTITYSEARCHPRIV_H */
366
367
368/*
369 * Do we have the SecIdentitySearchCreateWithPolicy function?
370 */
371
372/* #undef HAVE_SECIDENTITYSEARCHCREATEWITHPOLICY */
373
374
375/*
376 * Do we have the SLP library?
377 */
378
379/* #undef HAVE_LIBSLP */
ef416fc2 380
381
382/*
536bc2c6 383 * Do we have an LDAP library?
ef416fc2 384 */
385
536bc2c6
MS
386/* #undef HAVE_LDAP */
387/* #undef HAVE_OPENLDAP */
388/* #undef HAVE_MOZILLA_LDAP */
389/* #undef HAVE_LDAP_SSL_H */
390/* #undef HAVE_LDAP_SSL */
391/* #undef HAVE_LDAP_REBIND_PROC */
ef416fc2 392
393
394/*
395 * Do we have libpaper?
396 */
397
536bc2c6
MS
398/* #undef HAVE_LIBPAPER */
399
400
401/*
402 * Do we have DNS Service Discovery (aka Bonjour)?
403 */
404
6d2f911b 405#define HAVE_DNSSD 1
536bc2c6
MS
406
407
ef416fc2 408/*
409 * Do we have <sys/ioctl.h>?
410 */
411
536bc2c6 412/* #undef HAVE_SYS_IOCTL_H */
ef416fc2 413
414
ef416fc2 415/*
416 * Does the "tm" structure contain the "tm_gmtoff" member?
417 */
418
536bc2c6 419/* #undef HAVE_TM_GMTOFF */
ef416fc2 420
421
422/*
423 * Do we have rresvport_af()?
424 */
425
536bc2c6 426/* #undef HAVE_RRESVPORT_AF */
ef416fc2 427
428
429/*
430 * Do we have getaddrinfo()?
431 */
432
536bc2c6 433#define HAVE_GETADDRINFO 1
ef416fc2 434
435
436/*
437 * Do we have getnameinfo()?
438 */
439
536bc2c6 440#define HAVE_GETNAMEINFO 1
ef416fc2 441
442
443/*
444 * Do we have getifaddrs()?
445 */
446
536bc2c6 447/* #undef HAVE_GETIFADDRS */
ef416fc2 448
449
450/*
451 * Do we have hstrerror()?
452 */
453
536bc2c6
MS
454/* #undef HAVE_HSTRERROR */
455
456
457/*
458 * Do we have res_init()?
459 */
460
461/* #undef HAVE_RES_INIT */
462
463
464/*
465 * Do we have <resolv.h>
466 */
467
468/* #undef HAVE_RESOLV_H */
ef416fc2 469
470
471/*
472 * Do we have the <sys/sockio.h> header file?
473 */
474
536bc2c6 475/* #undef HAVE_SYS_SOCKIO_H */
ef416fc2 476
477
478/*
479 * Does the sockaddr structure contain an sa_len parameter?
480 */
481
536bc2c6 482/* #undef HAVE_STRUCT_SOCKADDR_SA_LEN */
ef416fc2 483
484
485/*
486 * Do we have the AIX usersec.h header file?
487 */
488
536bc2c6
MS
489/* #undef HAVE_USERSEC_H */
490
ef416fc2 491
492/*
493 * Do we have pthread support?
494 */
495
536bc2c6
MS
496/* #undef HAVE_PTHREAD_H */
497
498
499/*
500 * Do we have launchd support?
501 */
502
503/* #undef HAVE_LAUNCH_H */
504/* #undef HAVE_LAUNCHD */
ef416fc2 505
506
507/*
508 * Various scripting languages...
509 */
510
536bc2c6
MS
511/* #undef HAVE_JAVA */
512#define CUPS_JAVA ""
513/* #undef HAVE_PERL */
514#define CUPS_PERL ""
515/* #undef HAVE_PHP */
516#define CUPS_PHP ""
517/* #undef HAVE_PYTHON */
518#define CUPS_PYTHON ""
519
520
521/*
522 * Location of the poppler/Xpdf pdftops program...
523 */
524
525/* #undef HAVE_PDFTOPS */
526#define CUPS_PDFTOPS ""
527
528
529/*
530 * Location of the Ghostscript gs program...
531 */
532
533/* #undef HAVE_GHOSTSCRIPT */
534#define CUPS_GHOSTSCRIPT ""
535
536
537/*
538 * Do we have Darwin's CoreFoundation and SystemConfiguration frameworks?
539 */
540
541/* #undef HAVE_COREFOUNDATION */
542/* #undef HAVE_SYSTEMCONFIGURATION */
543
544
545/*
546 * Do we have CoreFoundation public and private headers?
547 */
548
549/* #undef HAVE_COREFOUNDATION_H */
550/* #undef HAVE_CFPRIV_H */
551/* #undef HAVE_CFBUNDLEPRIV_H */
552
553
6d2f911b
MS
554/*
555 * Do we have ApplicationServices public headers?
556 */
557
558/* #undef HAVE_APPLICATIONSERVICES_H */
559
560
561/*
562 * Do we have the SCDynamicStoreCopyComputerName function?
563 */
564
565/* #undef HAVE_SCDYNAMICSTORECOPYCOMPUTERNAME */
566
567
536bc2c6
MS
568/*
569 * Do we have MacOSX 10.4's mbr_XXX functions()?
570 */
571
572/* #undef HAVE_MEMBERSHIP_H */
573/* #undef HAVE_MEMBERSHIPPRIV_H */
574/* #undef HAVE_MBR_UID_TO_UUID */
575
576
577/*
578 * Do we have Darwin's notify_post() header and function?
579 */
580
581/* #undef HAVE_NOTIFY_H */
582/* #undef HAVE_NOTIFY_POST */
583
584
585/*
586 * Do we have DBUS?
587 */
588
589/* #undef HAVE_DBUS */
590/* #undef HAVE_DBUS_MESSAGE_ITER_INIT_APPEND */
591
592
593/*
594 * Do we have the AppleTalk/at_proto.h header?
595 */
596
597/* #undef HAVE_APPLETALK_AT_PROTO_H */
598
599
600/*
601 * Do we have the GSSAPI support library (for Kerberos support)?
602 */
603
604/* #undef HAVE_GSSAPI */
605/* #undef HAVE_GSSAPI_H */
606/* #undef HAVE_GSSAPI_GSSAPI_H */
607/* #undef HAVE_GSSAPI_GSSAPI_GENERIC_H */
608/* #undef HAVE_GSSAPI_GSSAPI_KRB5_H */
609/* #undef HAVE_GSSKRB5_REGISTER_ACCEPTOR_IDENTITY */
610/* #undef HAVE_GSS_C_NT_HOSTBASED_SERVICE */
611/* #undef HAVE_KRB5_CC_NEW_UNIQUE */
612/* #undef HAVE_KRB5_IPC_CLIENT_SET_TARGET_UID */
613/* #undef HAVE_KRB5_H */
614/* #undef HAVE_HEIMDAL */
615
616
617/*
618 * Default GSS service name...
619 */
620
f8b3a85b 621#define CUPS_DEFAULT_GSSSERVICENAME "host"
536bc2c6
MS
622
623
624/*
625 * Select/poll interfaces...
626 */
627
628/* #undef HAVE_POLL */
629/* #undef HAVE_EPOLL */
630/* #undef HAVE_KQUEUE */
631
632
633/*
634 * Do we have the <dlfcn.h> header?
635 */
636
637/* #undef HAVE_DLFCN_H */
638
639
640/*
641 * Do we have <sys/param.h>?
642 */
643
644/* #undef HAVE_SYS_PARAM_H */
645
646
647/*
648 * Do we have <sys/ucred.h>?
649 */
650
651/* #undef HAVE_SYS_UCRED_H */
652
653
654/*
655 * Do we have removefile()?
656 */
657
658/* #undef HAVE_REMOVEFILE */
659
660
661/*
662 * Do we have <sandbox.h>?
663 */
664
665/* #undef HAVE_SANDBOX_H */
666
667
668/*
669 * Which random number generator function to use...
670 */
671
f8b3a85b 672/* #undef HAVE_ARC4RANDOM */
536bc2c6 673/* #undef HAVE_RANDOM */
536bc2c6
MS
674/* #undef HAVE_LRAND48 */
675
f8b3a85b
MS
676#ifdef HAVE_ARC4RANDOM
677# define CUPS_RAND() arc4random()
678# define CUPS_SRAND(v) arc4random_stir()
679#elif defined(HAVE_RANDOM)
680# define CUPS_RAND() random()
681# define CUPS_SRAND(v) srandom(v)
682#elif defined(HAVE_LRAND48)
683# define CUPS_RAND() lrand48()
684# define CUPS_SRAND(v) srand48(v)
685#else
686# define CUPS_RAND() rand()
687# define CUPS_SRAND(v) srand(v)
688#endif /* HAVE_ARC4RANDOM */
689
536bc2c6
MS
690
691/*
692 * Do we have vproc_transaction_begin/end?
693 */
694
695/* #undef HAVE_VPROC_TRANSACTION_BEGIN */
696
697
698/*
699 * Do we have libusb?
700 */
701
702/* #undef HAVE_USB_H */
703
704
705/*
706 * Do we have libwrap and tcpd.h?
707 */
708
709/* #undef HAVE_TCPD_H */
ef416fc2 710
711
712#endif /* !_CUPS_CONFIG_H_ */
713
714/*
bc44d920 715 * End of "$Id: config.h 6649 2007-07-11 21:46:42Z mike $".
ef416fc2 716 */