]> sourceware.org Git - glibc.git/commitdiff
2000-11-30 Roland McGrath <roland@frob.com>
authorRoland McGrath <roland@gnu.org>
Fri, 1 Dec 2000 23:50:27 +0000 (23:50 +0000)
committerRoland McGrath <roland@gnu.org>
Fri, 1 Dec 2000 23:50:27 +0000 (23:50 +0000)
* 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

index b18f8a1586ee300d27c8c6ca9eb457a9c95f615d..1d42dcdae8805e853e4eb09500dce58c5fb8f401 100644 (file)
@@ -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.  */
This page took 0.044532 seconds and 5 git commands to generate.