1/*
2 *
3 *   Copyright (c) Red Hat Inc., 2008
4 *
5 *   This program 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 2 of the License, or
8 *   (at your option) any later version.
9 *
10 *   This program 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
13 *   the GNU General Public License for more details.
14 *
15 *   You should have received a copy of the GNU General Public License
16 *   along with this program;  if not, write to the Free Software
17 *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18 */
19
20/* Author: Masatake YAMATO <yamato@redhat.com> */
21
22#ifndef __COMPAT_GID_16_H__
23#define __COMPAT_GID_16_H__
24
25#include <asm/posix_types.h>
26#include "tst_common.h"
27
28#ifdef TST_USE_COMPAT16_SYSCALL
29typedef __kernel_old_gid_t GID_T;
30int GID_SIZE_CHECK(gid_t gid)
31{
32	/* See high2lowgid in linux/highuid.h
33	   Return 0 if gid is too large to store
34	   it to __kernel_old_gid_t. */
35	return ((gid) & ~0xFFFF)? 0: 1;
36}
37
38#else
39
40typedef gid_t GID_T;
41int GID_SIZE_CHECK(gid_t gid LTP_ATTRIBUTE_UNUSED)
42{
43	return 1;
44}
45
46#endif
47
48#endif /* __SETGID_COMPAT_16_H__ */
49