File: system.h

package info (click to toggle)
sharutils 1:4.15.2-4
  • links: PTS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 10,936 kB
  • sloc: ansic: 53,545; sh: 6,933; makefile: 726; yacc: 291; sed: 16
file content (104 lines) | stat: -rw-r--r-- 2,262 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
/* Shared definitions for GNU shar utilities.

   Copyright (C) 1994-2015 Free Software Foundation, Inc.

   This program is free software; you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
   the Free Software Foundation; either version 3, or (at your option)
   any later version.

   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   GNU General Public License for more details.

   You should have received a copy of the GNU General Public License
   along with this program; if not, see <http://gnu.org/licenses/gpl.html>
*/

#ifndef SHARUTILS_SYSTEM_H_GUARD
#define SHARUTILS_SYSTEM_H_GUARD 1

#ifndef HAVE_CONFIG_H
choke me -- I need config.h
#endif
#include "config.h"

#ifndef USE_UNLOCKED_IO
#  define USE_UNLOCKED_IO 1
#endif

#include <sys/types.h>
#include <sys/stat.h>

#include <errno.h>
#include <error.h>
#include <stdio.h>
#include <stdlib.h>

#if HAVE_INTTYPES_H
# include <inttypes.h>
#endif

#ifndef HAVE_INTMAX_T
#define HAVE_INTMAX_T
typedef long intmax_t;
#endif

#ifdef HAVE_STDBOOL_H
#include <stdbool.h>
#else
typedef enum {false = 0, true = 1} bool;
#endif

#if !HAVE_DECL_STRTOIMAX && !defined strtoimax
intmax_t strtoimax ();
#endif

#if HAVE_STRING_H
# include <string.h>
# if !STDC_HEADERS && HAVE_MEMORY_H
#  include <memory.h>
# endif
#else
# include <strings.h>
#endif

#ifdef HAVE_SYS_WAIT_H
# include <sys/wait.h>
#endif

/* System functions.  Even if we usually avoid declaring them, we cannot
   avoid them all.  */

#ifdef HAVE_UNISTD_H
# include <unistd.h>
#endif

FILE *fdopen ();
FILE *popen ();

/* Global functions of the shar package.  */

void copy_file_encoded (FILE *, FILE *);
char *get_submitter (char *);

/* Debugging the memory allocator.  */

#if WITH_DMALLOC
# define MALLOC_FUNC_CHECK
# include <dmalloc.h>
#endif

/* Some gcc specials.  */
#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 6)
# define ATTRIBUTE(list) __attribute__ (list)
#else
# define ATTRIBUTE(list)
#endif

#if __CYGWIN__
# include <fcntl.h>
# include <io.h> /* for setmode */
#endif
#endif // SHARUTILS_SYSTEM_H_GUARD