/[gentoo-projects]/portage-utils/main.h
Gentoo

Contents of /portage-utils/main.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.15 - (show annotations) (download) (as text)
Mon Dec 19 20:27:36 2011 UTC (2 years, 10 months ago) by vapier
Branch: MAIN
Changes since 1.14: +3 -3 lines
File MIME type: text/x-chdr
rename EPREFIX define to CONFIG_EPREFIX so we can have a local $EPREFIX var

1 /*
2 * Copyright 2005-2010 Gentoo Foundation
3 * Distributed under the terms of the GNU General Public License v2
4 * $Header: /var/cvsroot/gentoo-projects/portage-utils/main.h,v 1.14 2011/12/12 21:29:22 vapier Exp $
5 *
6 * Copyright 2005-2010 Ned Ludd - <solar@gentoo.org>
7 * Copyright 2005-2010 Mike Frysinger - <vapier@gentoo.org>
8 */
9
10 #ifndef _q_static
11 # define _q_static static
12 #endif
13
14 /* make sure our buffers are as big as they can be */
15 #if PATH_MAX > _POSIX_PATH_MAX /* _Q_PATH_MAX */
16 # define _Q_PATH_MAX PATH_MAX
17 #else
18 # define _Q_PATH_MAX _POSIX_PATH_MAX
19 #endif
20
21 /* http://tinderbox.dev.gentoo.org/default-linux/arm */
22 /* http://tinderbox.dev.gentoo.org/default-linux/hppa */
23
24 #ifdef __linux__
25 #undef URL
26 #define URL "http://tinderbox.dev.gentoo.org"
27 # ifdef __i386__
28 # ifdef __UCLIBC__
29 # define DEFAULT_PORTAGE_BINHOST URL "/uclibc/i386"
30 # else
31 # ifdef __SSP__
32 # define DEFAULT_PORTAGE_BINHOST URL "/hardened/x86"
33 # else
34 # define DEFAULT_PORTAGE_BINHOST URL "/default-linux/x86/All"
35 # endif
36 # endif
37 # if defined(__powerpc__) && defined(__SSP__)
38 # if !defined(__UCLIBC__)
39 # define DEFAULT_PORTAGE_BINHOST URL "/hardened/ppc"
40 # else
41 # define DEFAULT_PORTAGE_BINHOST URL "/uclibc/ppc"
42 # endif
43 # endif
44 # endif
45 #endif
46
47 #ifndef DEFAULT_PORTAGE_BINHOST
48 # define DEFAULT_PORTAGE_BINHOST ""
49 #endif
50
51 #define qfprintf(stream, fmt, args...) do { if (!quiet) fprintf(stream, _( fmt ), ## args); } while (0)
52 #define qprintf(fmt, args...) qfprintf(stdout, _( fmt ), ## args)
53
54 #define _q_unused_ __attribute__((__unused__))
55
56 #ifndef BUFSIZE
57 # define BUFSIZE 8192
58 #endif
59
60 #ifdef EBUG
61 # define DBG(fmt, args...) warnf(fmt , ## args)
62 # define IF_DEBUG(x) x
63 #else
64 # define DBG(fmt, args...)
65 # define IF_DEBUG(x)
66 #endif
67
68 #define GETOPT_LONG(A, a, ex) \
69 getopt_long(argc, argv, ex A ## _FLAGS, a ## _long_opts, NULL)
70
71 #ifndef MIN
72 #define MIN(x, y) ((x) < (y) ? (x) : (y))
73 #endif
74 #ifndef MAX
75 #define MAX(x, y) ((x) < (y) ? (y) : (x))
76 #endif
77
78 #define a_argument required_argument
79
80 /* Easy enough to glue to older versions */
81 #ifndef O_CLOEXEC
82 # define O_CLOEXEC 0
83 #endif
84
85 #ifndef CONFIG_EPREFIX
86 #define CONFIG_EPREFIX "/"
87 #endif

  ViewVC Help
Powered by ViewVC 1.1.20