summaryrefslogtreecommitdiff
path: root/misc
diff options
context:
space:
mode:
authorjbj <devnull@localhost>1998-07-25 21:00:26 +0000
committerjbj <devnull@localhost>1998-07-25 21:00:26 +0000
commite4151252f8c4e422e18f83616392e3dc53d6d1ab (patch)
tree2cf6ab880ad881f509ba84c4657dd978592c1698 /misc
parentc617a31606aec7fccaf26e0947f15f4cbacf089b (diff)
downloadlibrpm-tizen-e4151252f8c4e422e18f83616392e3dc53d6d1ab.tar.gz
librpm-tizen-e4151252f8c4e422e18f83616392e3dc53d6d1ab.tar.bz2
librpm-tizen-e4151252f8c4e422e18f83616392e3dc53d6d1ab.zip
Aggregate system includes into system.h.
Rearrange functions to minimize exported routines in librpmbuild API. VS: ---------------------------------------------------------------------- CVS patchset: 2183 CVS date: 1998/07/25 21:00:26
Diffstat (limited to 'misc')
-rw-r--r--misc/fakefork.c2
-rw-r--r--misc/inet_aton.c4
-rw-r--r--misc/miscfn.h111
-rw-r--r--misc/strdup.c8
-rw-r--r--misc/strtol.c14
5 files changed, 4 insertions, 135 deletions
diff --git a/misc/fakefork.c b/misc/fakefork.c
index 74d94bae1..2089f28a6 100644
--- a/misc/fakefork.c
+++ b/misc/fakefork.c
@@ -1,7 +1,7 @@
/* This is really, really dumb. But AmigaOS gives us vfork(), but not
fork() and this should make things work despite their brokenness */
-#include <unistd.h>
+#include "system.h"
int fork() {
return vfork();
diff --git a/misc/inet_aton.c b/misc/inet_aton.c
index a5c3206d2..b26eac8b3 100644
--- a/misc/inet_aton.c
+++ b/misc/inet_aton.c
@@ -1,15 +1,13 @@
-#include "config.h"
+#include "system.h"
#include "miscfn.h"
#ifdef HAVE_NETINET_IN_SYSTM_H
-# include <sys/types.h>
# include <netinet/in_systm.h>
#endif
#include <netinet/in.h>
#include <netinet/ip.h>
#include <arpa/inet.h>
-#include <string.h>
#include "inet_aton.h"
diff --git a/misc/miscfn.h b/misc/miscfn.h
index f7fb1fccf..7048390b0 100644
--- a/misc/miscfn.h
+++ b/misc/miscfn.h
@@ -1,123 +1,12 @@
#ifndef H_MISCFN
#define H_MISCFN
-#include "config.h"
-
-#if HAVE_FNMATCH_H
-#include <fnmatch.h>
-#else
-#include "misc-fnmatch.h"
-#endif
-
-#if HAVE_GLOB_H
-#include <glob.h>
-#else
-#include "misc-glob.h"
-#endif
-
-#if ! HAVE_S_IFSOCK
-#define S_IFSOCK (0xC000)
-#endif
-
-#if ! HAVE_S_ISLNK
-#define S_ISLNK(mode) ((mode & 0xF000) == S_IFLNK)
-#endif
-
-#if ! HAVE_S_ISSOCK
-#define S_ISSOCK(mode) ((mode & 0xF000) == S_IFSOCK)
-#endif
-
-#if NEED_STRINGS_H
-#include <strings.h>
-#endif
-
-#if ! HAVE_REALPATH
-char *realpath(const char *path, char resolved_path []);
-#endif
-
#if HAVE_SYS_STDTYPES_H
# include <sys/stdtypes.h>
#endif
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
#if NEED_TIMEZONE
extern time_t timezone;
#endif
-#if NEED_MYREALLOC
-#define realloc(ptr,size) myrealloc(ptr,size)
-extern void *myrealloc(void *, size_t);
-#endif
-
-#if HAVE_SYS_SOCKET_H
-#include <sys/types.h>
-#include <sys/socket.h>
-#endif
-
-#if HAVE_LIMITS_H
-#include <limits.h>
-#endif
-
-#if HAVE_SYS_SELECT_H
-#include <sys/select.h>
-#endif
-
-#if ! HAVE_LCHOWN
-#define lchown chown
-#endif
-
-#if HAVE_GETMNTINFO_R || HAVE_MNTCTL
-# define GETMNTENT_ONE 0
-# define GETMNTENT_TWO 0
-# if HAVE_SYS_MNTCTL_H
-# include <sys/mntctl.h>
-# endif
-# if HAVE_SYS_VMOUNT_H
-# include <sys/vmount.h>
-# endif
-# if HAVE_SYS_MOUNT_H
-# include <sys/mount.h>
-# endif
-#elif HAVE_MNTENT_H || !(HAVE_GETMNTENT) || HAVE_STRUCT_MNTTAB
-# if HAVE_MNTENT_H
-# include <stdio.h>
-# include <mntent.h>
-# define our_mntent struct mntent
-# define our_mntdir mnt_dir
-# elif HAVE_STRUCT_MNTTAB
-# include <stdio.h>
-# include <mnttab.h>
- struct our_mntent {
- char * our_mntdir;
- };
- struct our_mntent *getmntent(FILE *filep);
-# define our_mntent struct our_mntent
-# else
-# include <stdio.h>
- struct our_mntent {
- char * our_mntdir;
- };
- struct our_mntent *getmntent(FILE *filep);
-# define our_mntent struct our_mntent
-# endif
-# define GETMNTENT_ONE 1
-# define GETMNTENT_TWO 0
-#elif HAVE_SYS_MNTTAB_H
-# include <stdio.h>
-# include <sys/mnttab.h>
-# define GETMNTENT_ONE 0
-# define GETMNTENT_TWO 1
-# define our_mntent struct mnttab
-# define our_mntdir mnt_mountp
-#else /* if !HAVE_MNTCTL */
-# error Neither mntent.h, mnttab.h, or mntctl() exists. I cannot build on this system.
-#endif
-
-#ifndef MOUNTED
-#define MOUNTED "/etc/mnttab"
-#endif
-
#endif
diff --git a/misc/strdup.c b/misc/strdup.c
index 9236fe7db..3e91af1b4 100644
--- a/misc/strdup.c
+++ b/misc/strdup.c
@@ -9,13 +9,7 @@
*
*/
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
+#include "system.h"
#if defined(HAVE_STDLIB_H) || defined(STDC_HEADERS)
# include <stdlib.h>
diff --git a/misc/strtol.c b/misc/strtol.c
index 38a569dc0..ea52e3e41 100644
--- a/misc/strtol.c
+++ b/misc/strtol.c
@@ -17,25 +17,13 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
#ifdef _LIBC
# define USE_NUMBER_GROUPING
# define STDC_HEADERS
# define HAVE_LIMITS_H
#endif
-#include <ctype.h>
-#include <errno.h>
-#ifndef errno
-extern int errno;
-#endif
-
-#ifdef HAVE_LIMITS_H
-# include <limits.h>
-#endif
+#include "system.h"
#ifdef STDC_HEADERS
# include <stddef.h>