"Fossies" - the Fresh Open Source Software archive

Member "fs/jfs/jfs_compat.h" of archive jfs-2.4-1.1.7.tar.gz:


/*
 *   Copyright (c) International Business Machines Corp., 2000-2002
 *   Portions Copyright (c) Christoph Hellwig, 2001-2002
 *
 *   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 2 of the License, 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, write to the Free Software
 *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 */
#ifndef _H_JFS_COMPAT
#define	_H_JFS_COMPAT

/*
 *	jfs_compat.h:
 *
 * Definitions to allow JFS to build on older kernels.
 *
 * This file should be removed when JFS is merged with linux kernel
 *
 */

#include <linux/version.h>
#include <linux/sched.h>
#include <linux/compiler.h>

#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,4,20))
#include "endian24.h"
#define dump_stack() do { } while (0)
#endif

#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,20))
#define JFS_XATTR
#endif
/*
 * Newer Redhat kernels have some changes to sched.h.  This test
 * for INIT_SIGHAND is not fool-proof, but it should be good enough to
 * keep JFS compiling correctly for now
 */
#ifdef INIT_SIGHAND
	#define Sigmask_lock sighand->siglock
	#define Recalc_sigpending(current) recalc_sigpending()
#else
	#define Sigmask_lock sigmask_lock
	#define Recalc_sigpending recalc_sigpending
#endif

#endif				/* !_H_JFS_COMPAT */