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