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

Contents of /portage-utils/main.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.16 - (show annotations) (download) (as text)
Sun Sep 29 22:42:36 2013 UTC (11 months, 3 weeks ago) by vapier
Branch: MAIN
Changes since 1.15: +1 -21 lines
File MIME type: text/x-chdr
move all headers includes and such to a single porting.h to avoid duplicating in tests/ #406393

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.15 2011/12/19 20:27: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
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 #ifdef EBUG
57 # define DBG(fmt, args...) warnf(fmt , ## args)
58 # define IF_DEBUG(x) x
59 #else
60 # define DBG(fmt, args...)
61 # define IF_DEBUG(x)
62 #endif
63
64 #define GETOPT_LONG(A, a, ex) \
65 getopt_long(argc, argv, ex A ## _FLAGS, a ## _long_opts, NULL)
66
67 #define a_argument required_argument

  ViewVC Help
Powered by ViewVC 1.1.20