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

Contents of /portage-utils/main.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.17 - (show annotations) (download) (as text)
Tue Feb 18 04:32:04 2014 UTC (7 months, 1 week ago) by vapier
Branch: MAIN
Changes since 1.16: +56 -17 lines
File MIME type: text/x-chdr
update default URL list to match current tinderbox server

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.16 2013/09/29 22:42:36 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_BASE
26 # define URL_BASE "http://tinderbox.dev.gentoo.org"
27
28 # undef URL_PROFILE
29 # ifdef __UCLIBC__
30 # define URL_PROFILE "uclibc"
31 # else
32 # ifdef __SSP__
33 # define URL_PROFILE "hardened"
34 # else
35 # define URL_PROFILE "default/linux"
36 # endif
37 # endif
38
39 # undef URL_ARCH
40 # if 0
41 # elif defined(__alpha__)
42 # define URL_ARCH "alpha"
43 # elif defined(__x86_64__)
44 # define URL_ARCH "amd64"
45 # elif defined(__arm__)
46 # define URL_ARCH "arm"
47 # elif defined(__aarch64__)
48 # define URL_ARCH "arm64"
49 # elif defined(__bfin__)
50 # define URL_ARCH "bfin"
51 # elif defined(__cris__)
52 # define URL_ARCH "cris"
53 # elif defined(__hppa__)
54 # define URL_ARCH "hppa"
55 # elif defined(__ia64__)
56 # define URL_ARCH "ia64"
57 # elif defined(__m68k__)
58 # define URL_ARCH "m68k"
59 # elif defined(__mips__)
60 # define URL_ARCH "mips"
61 # elif defined(__powerpc__)
62 # if defined(__powerpc64__)
63 # define URL_ARCH "ppc64"
64 # else
65 # define URL_ARCH "ppc"
66 # endif
67 # elif defined(__s390__)
68 # if defined(__s390x__)
69 # define URL_ARCH "s390x"
70 # else
71 # define URL_ARCH "s390"
72 # endif
73 # elif defined(__sh4__)
74 # define URL_ARCH "sh"
75 # elif defined(__sparc__)
76 # define URL_ARCH "sparc"
77 # elif defined(__i386__)
78 # define URL_ARCH "x86"
79 # endif
80
81 # if defined(URL_PROFILE) && defined(URL_ARCH)
82 # define DEFAULT_PORTAGE_BINHOST URL_BASE "/" URL_PROFILE "/" URL_ARCH
83 # endif
84 #endif
85
86 #ifndef DEFAULT_PORTAGE_BINHOST
87 # define DEFAULT_PORTAGE_BINHOST ""
88 #endif
89
90 #define qfprintf(stream, fmt, args...) do { if (!quiet) fprintf(stream, _( fmt ), ## args); } while (0)
91 #define qprintf(fmt, args...) qfprintf(stdout, _( fmt ), ## args)
92
93 #define _q_unused_ __attribute__((__unused__))
94
95 #ifdef EBUG
96 # define DBG(fmt, args...) warnf(fmt , ## args)
97 # define IF_DEBUG(x) x
98 #else
99 # define DBG(fmt, args...)
100 # define IF_DEBUG(x)
101 #endif
102
103 #define GETOPT_LONG(A, a, ex) \
104 getopt_long(argc, argv, ex A ## _FLAGS, a ## _long_opts, NULL)
105
106 #define a_argument required_argument

  ViewVC Help
Powered by ViewVC 1.1.20