/ [cpio] / cpio / mingw.m4
To checkout: cvs -d:pserver:anonymous@cvs.gnu.org.ua:/cvsmirror/cpio co cpio/mingw.m4
Puszcza

Contents of /cpio/mingw.m4

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (show annotations)
Fri Feb 8 09:28:51 2008 UTC (13 years, 8 months ago) by gray
Branch: MAIN
CVS Tags: HEAD
Fix mingw build. Thanks to Robert Millan.

* NEWS, THANKS: Update.
* bootstrap: Create lib/system.c, m4/sysdep.m4, update lib/system.h.
* mingw.m4, sysdep.m4: New files.
* configure.ac: Raise version number to 2.9.90.
Call CPIO_SYSDEP. Remove the call to gl_USE_SYSTEM_EXTENSIONS.
(AC_CHECK_HEADERS): Add process.h sys/ioctl.h
* lib/Makefile.am (libcpio_a_SOURCES): Add system.c
* src/idcache.c: Include system.h
* src/userspec.c: Remove alloca stuff (already handled by
gnulib). Include alloca.h.
Remove useless declarations of get.* functions.
* src/util.c: Include sys/ioctl.h conditionally.

1 /* System dependent functions for GNU cpio.
2
3 Copyright (C) 2007 Free Software Foundation, Inc.
4
5 GNU cpio is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 3, or (at your option)
8 any later version.
9
10 GNU cpio is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
14
15 You should have received a copy of the GNU General Public License
16 along with GNU cpiio. If not, see <http://www.gnu.org/licenses/>. */
17
18 ifelse(MODE,`C',`
19 #if HAVE_CONFIG_H
20 # include <config.h>
21 #endif
22
23 #include <unistd.h>
24 #include <errno.h>
25 ',MODE,`H',`
26 #ifdef HAVE_PROCESS_H
27 # include <process.h>
28 #endif
29
30 #ifndef HAVE_PWD_H
31 /* Borrowed from GNU libc */
32 /* The passwd structure. */
33 struct passwd
34 {
35 char *pw_name; /* Username. */
36 char *pw_passwd; /* Password. */
37 int pw_uid; /* User ID. */
38 int pw_gid; /* Group ID. */
39 char *pw_gecos; /* Real name. */
40 char *pw_dir; /* Home directory. */
41 char *pw_shell; /* Shell program. */
42 };
43 #endif
44 #ifndef HAVE_GRP_H
45 /* Borrowed from GNU libc */
46 /* The group structure. */
47 struct group
48 {
49 char *gr_name; /* Group name. */
50 char *gr_passwd; /* Password. */
51 int gr_gid; /* Group ID. */
52 char **gr_mem; /* Member list. */
53 };
54 #endif
55
56 #include <signal.h>
57 #ifndef SIGPIPE
58 # define SIGPIPE -1
59 #endif
60
61 ')
62
63 BEGIN
64 MAKESTUB(struct passwd *, getpwuid, uid_t uid)
65 MAKESTUB(struct passwd *, getpwnam, const char *name)
66 MAKESTUB(struct group *, getgrgid, gid_t gid)
67 MAKESTUB(struct group *, getgrnam, const char *name)
68 MAKESTUB(int, pipe, int filedes[2])
69 MAKESTUB(int, fork)
70
71 define([INTRETVAL],0)
72 MAKESTUB(int, getuid)
73
74 define([INTRETVAL],0)
75 MAKESTUB(int, geteuid)
76
77 define([INTRETVAL],0)
78 MAKESTUB(int, getgid)
79
80 MAKESTUB(int, setuid, int newuid)
81 MAKESTUB(int, setgid, int newgid)
82 MAKESTUB(int, mknod, const char *filename, int mode, int dev)
83 MAKESTUB(int, symlink, const char *oldname, const char *newname)
84 MAKESTUB(int, link, const char *oldname, const char *newname)
85 MAKESTUB(int, chown, const char *filename, int owner, int group)
86 END

Send suggestions and bug reports to Sergey Poznyakoff
ViewVC Help
Powered by ViewVC 1.1.20