From 72f841d53515e5b6d67eba0ac722e70906bfad2d Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Fri, 1 Dec 2000 23:50:27 +0000 Subject: 2000-11-30 Roland McGrath * 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. --- hurd/hurd/ioctl.h | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'hurd') 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. */ -- cgit v1.2.3