1
1

* background.h: Correct condition when WITH_BACKGROUND is

defined.
* fsusage.c: Rearrange the includes. Define HAVE_QNX_MOUNT
for old QNX and use it instead of __QNX__.
* mountlist.c: Likewise.
* keyxdef.c: Define HAVE_QNX_KEYS for old QNX and use it instead
of __QNX__.
Этот коммит содержится в:
Pavel Roskin 2001-06-19 19:57:58 +00:00
родитель d8ec86292f
Коммит 8040aeec39
5 изменённых файлов: 57 добавлений и 35 удалений

Просмотреть файл

@ -1,3 +1,13 @@
2001-06-19 Pavel Roskin <proski@gnu.org>
* background.h: Correct condition when WITH_BACKGROUND is
defined.
* fsusage.c: Rearrange the includes. Define HAVE_QNX_MOUNT
for old QNX and use it instead of __QNX__.
* mountlist.c: Likewise.
* keyxdef.c: Define HAVE_QNX_KEYS for old QNX and use it instead
of __QNX__.
2001-06-18 Pavel Roskin <proski@gnu.org>
* main.c [HAVE_X]: Disable change_panel(),

Просмотреть файл

@ -3,8 +3,8 @@
/* Background code requires socketpair to be available */
/* Do not add the background code if it is not supported */
#ifdef USE_NETCODE
# define WITH_BACKGROUND
#ifdef HAVE_SOCKETPAIR
# define WITH_BACKGROUND
#endif
/* Used for parent/child communication. These are numbers that

Просмотреть файл

@ -18,16 +18,13 @@
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#if !defined(NO_INFOMOUNT) || defined(__QNX__)
#if defined(__QNX__)
#define STAT_STATFS4
#if defined (__QNX__) && !defined (__QNXNTO__)
#define HAVE_QNX_MOUNT
#endif
#include <sys/types.h>
#include "fsusage.h"
#ifdef HAVE_SYS_PARAM_H
#include <sys/param.h>
#endif
@ -62,6 +59,11 @@
#include <sys/statvfs.h>
#endif
#include "fsusage.h"
#if !defined(NO_INFOMOUNT) || defined(HAVE_QNX_MOUNT)
/* Return the number of TOSIZE-byte blocks used by
BLOCKS FROMSIZE-byte blocks, rounding away from zero.
TOSIZE must be positive. Return -1 if FROMSIZE is not positive. */
@ -191,4 +193,4 @@ int get_fs_usage (char *path, struct fs_usage *fsp)
return 0;
}
#endif /* NO_INFOMOUNT */
#endif /* !NO_INFOMOUNT || HAVE_QNX_MOUNT */

Просмотреть файл

@ -42,7 +42,11 @@
#include "key.h"
#include "tty.h"
#ifdef __QNX__
#if defined (__QNX__) && !defined (__QNXNTO__)
#define HAVE_QNX_KEYS
#endif
#ifdef HAVE_QNX_KEYS
/* select implementation: use QNX/term interface */
#define __USE_QNX_TI
@ -67,7 +71,7 @@
#endif /* __USE_QNX_TI */
#endif /* __QNX__ */
#endif /* HAVE_QNX_KEYS */
/* {{{ */
@ -234,7 +238,7 @@
/* }}} */
#ifdef __QNX__
#ifdef HAVE_QNX_KEYS
/* don't force pre-defining of base keys under QNX */
#define FORCE_BASE_KEY_DEFS 0
@ -286,7 +290,7 @@ typedef struct qnx_key_define_s {
#endif /* __USE_QNX_TI */
#endif /* __QNX__ */
#endif /* HAVE_QNX_KEYS */
#ifdef xtra_key_define_t
@ -364,7 +368,7 @@ xtra_key_define_t xtra_key_defines[] = {
#endif /* xtra_key_define_t */
#ifdef __QNX__
#ifdef HAVE_QNX_KEYS
#ifdef __USE_QNX_TI
@ -403,13 +407,13 @@ void load_qnx_key_defines (void)
#endif /* __USE_QNX_TI */
#endif /* __QNX__ */
#endif /* HAVE_QNX_KEYS */
/* called from key.c/init_key() */
void load_xtra_key_defines (void)
{
#ifdef __QNX__
#ifdef HAVE_QNX_KEYS
load_qnx_key_defines();
#endif
}

Просмотреть файл

@ -18,10 +18,11 @@
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#ifndef NO_INFOMOUNT
#include <stdio.h>
#include <sys/types.h>
#include <stdio.h>
#include <fcntl.h>
#ifdef STDC_HEADERS
#include <stdlib.h>
#else
@ -37,6 +38,10 @@ void free (void *ptr);
#include <sys/param.h>
#endif
#ifdef HAVE_UNISTD_H
# include <unistd.h>
#endif
#if defined (MOUNTED_GETFSSTAT) /* __alpha running OSF_1 */
#include <sys/mount.h>
#include <sys/fs_types.h>
@ -82,6 +87,19 @@ void free (void *ptr);
#include <sys/vfs.h>
#endif
#ifdef HAVE_SYS_STATFS_H
#include <sys/statfs.h>
#endif
#if defined (__QNX__) && !defined (__QNXNTO__)
#define HAVE_QNX_MOUNT
#endif
#ifdef HAVE_QNX_MOUNT
#include <sys/disk.h>
#include <sys/fsys.h>
#endif
#include "mountlist.h"
#include "fsusage.h"
#include "util.h"
@ -99,6 +117,8 @@ void free (void *ptr);
No prefix (like '0x') or suffix (like 'h') is expected to be
part of CP. */
#ifndef NO_INFOMOUNT
static struct mount_entry *mount_list = NULL;
static int xatoi (char *cp)
@ -457,7 +477,7 @@ struct mount_entry *read_filesystem_list (int need_fs_type, int all_fs)
}
#endif /* NO_INFOMOUNT */
#if defined(NO_INFOMOUNT) && defined(__QNX__)
#if defined(NO_INFOMOUNT) && defined(HAVE_QNX_MOUNT)
/*
** QNX has no [gs]etmnt*(), [gs]etfs*(), or /etc/mnttab, but can do
** this via the following code.
@ -466,19 +486,6 @@ struct mount_entry *read_filesystem_list (int need_fs_type, int all_fs)
** this hack.
*/
#include <fcntl.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#ifdef HAVE_UNISTD_H
# include <unistd.h>
#endif
#include <sys/disk.h>
#include <sys/fsys.h>
#include <sys/statfs.h>
#include "mountlist.h"
struct mount_entry *read_filesystem_list(int need_fs_type, int all_fs)
{
struct _disk_entry de;
@ -537,7 +544,7 @@ struct mount_entry *read_filesystem_list(int need_fs_type, int all_fs)
return (me);
}
#endif /* __QNX__ */
#endif /* HAVE_QNX_MOUNT */
void init_my_statfs (void)
{
@ -548,9 +555,8 @@ void init_my_statfs (void)
void my_statfs (struct my_statfs *myfs_stats, char *path)
{
int i, len = 0;
#ifndef NO_INFOMOUNT
int i, len = 0;
struct mount_entry *entry = NULL;
struct mount_entry *temp = mount_list;
struct fs_usage fs_use;
@ -578,7 +584,7 @@ void my_statfs (struct my_statfs *myfs_stats, char *path)
myfs_stats->nodes = fs_use.fsu_files;
} else
#endif
#if defined(NO_INFOMOUNT) && defined(__QNX__)
#if defined(NO_INFOMOUNT) && defined(HAVE_QNX_MOUNT)
/*
** This is the "other side" of the hack to read_filesystem_list() in
** mountlist.c.