aboutsummaryrefslogtreecommitdiff
path: root/hurd
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>2000-12-01 23:50:27 +0000
committerRoland McGrath <roland@gnu.org>2000-12-01 23:50:27 +0000
commit72f841d53515e5b6d67eba0ac722e70906bfad2d (patch)
tree9824c419c427527adcebfa00f76fddd0bb86af6d /hurd
parentdeb7f0b41f9c892ba7413abcc4cd5f19787a1122 (diff)
downloadglibc-72f841d53515e5b6d67eba0ac722e70906bfad2d.tar
glibc-72f841d53515e5b6d67eba0ac722e70906bfad2d.tar.gz
glibc-72f841d53515e5b6d67eba0ac722e70906bfad2d.tar.bz2
glibc-72f841d53515e5b6d67eba0ac722e70906bfad2d.zip
2000-11-30 Roland McGrath <roland@frob.com>
* hurd/hurd/ioctl.h (_HURD_HANDLE_IOCTLS_1): New macro. (_HURD_HANDLE_IOCTLS, _HURD_HANDLE_IOCTL): Redefine using it, so as to allow multiple instances using the same function name in one file.
Diffstat (limited to 'hurd')
-rw-r--r--hurd/hurd/ioctl.h13
1 files changed, 8 insertions, 5 deletions
diff --git a/hurd/hurd/ioctl.h b/hurd/hurd/ioctl.h
index b18f8a1586..1d42dcdae8 100644
--- a/hurd/hurd/ioctl.h
+++ b/hurd/hurd/ioctl.h
@@ -1,5 +1,5 @@
/* User-registered handlers for specific `ioctl' requests.
- Copyright (C) 1993, 1994, 1995, 1996, 1997 Free Software Foundation, Inc.
+ Copyright (C) 1993,94,95,96,97,2000 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -53,17 +53,20 @@ extern int hurd_register_ioctl_handler (int first_request, int last_request,
LAST inclusive. The last element gratuitously references HANDLER to
avoid `defined but not used' warnings. */
-#define _HURD_HANDLE_IOCTLS(handler, first, last) \
- static const struct ioctl_handler handler##_ioctl_handler \
+#define _HURD_HANDLE_IOCTLS_1(handler, first, last, moniker) \
+ static const struct ioctl_handler handler##_ioctl_handler##moniker \
__attribute__ ((__unused__)) = \
{ _IOC_NOTYPE (first), _IOC_NOTYPE (last), \
(int (*) (int, int, void *)) (handler), NULL }; \
- text_set_element (_hurd_ioctl_handler_lists, ##handler##_ioctl_handler)
+ text_set_element (_hurd_ioctl_handler_lists, \
+ ##handler##_ioctl_handler##moniker)
+#define _HURD_HANDLE_IOCTLS(handler, first, last) \
+ _HURD_HANDLE_IOCTLS_1 (handler, first, last, first##_to_##last)
/* Define a library-internal handler for a single ioctl command. */
#define _HURD_HANDLE_IOCTL(handler, ioctl) \
- _HURD_HANDLE_IOCTLS (handler, (ioctl), (ioctl))
+ _HURD_HANDLE_IOCTLS_1 (handler, ioctl, ioctl, ioctl##_only)
/* Lookup the handler for the given ioctl request. */