]> icculus.org git repositories - icculus/xz.git/blob - src/xz/private.h
Cleanups to the code that detects the amount of RAM and
[icculus/xz.git] / src / xz / private.h
1 ///////////////////////////////////////////////////////////////////////////////
2 //
3 /// \file       private.h
4 /// \brief      Common includes, definions, and prototypes
5 //
6 //  Copyright (C) 2007 Lasse Collin
7 //
8 //  This program is free software; you can redistribute it and/or
9 //  modify it under the terms of the GNU Lesser General Public
10 //  License as published by the Free Software Foundation; either
11 //  version 2.1 of the License, or (at your option) any later version.
12 //
13 //  This program is distributed in the hope that it will be useful,
14 //  but WITHOUT ANY WARRANTY; without even the implied warranty of
15 //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
16 //  Lesser General Public License for more details.
17 //
18 ///////////////////////////////////////////////////////////////////////////////
19
20 #include "sysdefs.h"
21 #include "mythread.h"
22 #include "lzma.h"
23
24 #include <sys/types.h>
25 #include <sys/stat.h>
26 #include <errno.h>
27 #include <signal.h>
28 #include <locale.h>
29 #include <stdio.h>
30 #include <unistd.h>
31
32 #ifdef ENABLE_NLS
33 #       include <libintl.h>
34 #       define _(msgid) gettext(msgid)
35 #       define N_(msgid1, msgid2, n) ngettext(msgid1, msgid2, n)
36 #else
37 #       define _(msgid) (msgid)
38 #       define N_(msgid1, msgid2, n) ((n) == 1 ? (msgid1) : (msgid2))
39 #endif
40
41 #ifndef STDIN_FILENO
42 #       define STDIN_FILENO (fileno(stdin))
43 #endif
44
45 #ifndef STDOUT_FILENO
46 #       define STDOUT_FILENO (fileno(stdout))
47 #endif
48
49 #ifndef STDERR_FILENO
50 #       define STDERR_FILENO (fileno(stderr))
51 #endif
52
53 #include "main.h"
54 #include "process.h"
55 #include "message.h"
56 #include "args.h"
57 #include "hardware.h"
58 #include "io.h"
59 #include "options.h"
60 #include "signals.h"
61 #include "suffix.h"
62 #include "util.h"