summaryrefslogtreecommitdiffabout
path: root/sysdep.m4
blob: c545db005a8689fec5eed1674fa5a5aca7f464f6 (plain)
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
divert(-1)
# System dependent functions for GNU cpio.
#
# Copyright (C) 2007, 2010, 2014 Free Software Foundation, Inc.
# GNU cpio 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.
#
# GNU cpio 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 GNU cpiio.  If not, see <http://www.gnu.org/licenses/>.

undef(`include')

ifelse(MODE,`AC',`

define(`FUNCLIST')

define(`BEGIN')
define(`END',`divert(0)dnl
# -*- buffer-read-only: t -*- vi: set ro:
# THIS FILE IS GENERATED AUTOMATICALLY.  PLEASE DO NOT EDIT.
AC_DEFUN([CPIO_SYSDEP],[AC_CHECK_FUNCS([FUNCLIST])])')

dnl MAKESTUB(type, name, args...)
define(`MAKESTUB',`define(`FUNCLIST',FUNCLIST` $2')')

',MODE,`H',`
changecom(/*,*/)
define(`ROHEADER',`/* -*- buffer-read-only: t -*- vi: set ro:
   THIS FILE IS GENERATED AUTOMATICALLY.  PLEASE DO NOT EDIT.
*/')

define(`BEGIN')
define(`END')

dnl MAKESTUB(type, name, args...)
define(`MAKESTUB',`
`#ifndef HAVE_'translit($2, `a-z-', `A-Z_')
$1 $2 (ifelse($#,2,`void',`shift(shift($@))'));
#endif
')

divert(0)dnl
ROHEADER
',MODE,`C',`
changecom(/*,*/)
define(`ROHEADER',`/* -*- buffer-read-only: t -*- vi: set ro:
   THIS FILE IS GENERATED AUTOMATICALLY.  PLEASE DO NOT EDIT.
*/')

define(`BEGIN')
define(`END')

define(`__make_unused_args',`dnl
 $1 __attribute__ ((unused))dnl
 ifelse($#,1,,`, __make_unused_args(shift($@))')')

define(`__makeargs',`ifelse($1,`',`void',`__make_unused_args($@)')')

define(`INTRETVAL',-1)

dnl MAKESTUB(type, name, args...)
define(`MAKESTUB',`
`#ifndef HAVE_'translit($2, `a-z-', `A-Z_')
# warning "Providing stub placeholder for $2 function"
$1
$2 (__makeargs(shift(shift($@))))
{
  errno = ENOSYS;
  return ifelse($1,`int',INTRETVAL,NULL);
}
#endif`'dnl
define(`INTRETVAL',-1)dnl
')

divert(0)dnl
ROHEADER
')

Return to:

Send suggestions and report system problems to the System administrator.