Use C99 __func__ instead of __FUNCTION__.
authorSascha Wildner <saw@online.de>
Sat, 4 May 2013 19:58:43 +0000 (21:58 +0200)
committerSascha Wildner <saw@online.de>
Sat, 4 May 2013 19:59:42 +0000 (21:59 +0200)
24 files changed:
lib/libstand/hammerread.c
sys/bus/u4b/controller/ehci.c
sys/bus/u4b/controller/ohci.c
sys/bus/u4b/controller/uhci.c
sys/bus/u4b/controller/xhci.c
sys/bus/u4b/net/if_mos.c
sys/bus/u4b/storage/umass.c
sys/bus/u4b/usb_debug.h
sys/bus/u4b/usb_transfer.c
sys/dev/acpica/acpi_smbat.c
sys/dev/drm/drmP.h
sys/dev/drm/mach64/mach64_state.c
sys/dev/drm/r128/r128_irq.c
sys/dev/misc/cmx/cmx.c
sys/dev/raid/amr/amr.c
sys/dev/raid/ciss/cissvar.h
sys/dev/raid/hpt27xx/osm.h
sys/dev/raid/hptrr/osm.h
sys/dev/raid/mfi/mfivar.h
sys/netproto/802_11/ieee80211_dragonfly.h
sys/sys/thread2.h
usr.sbin/802_11/hostapd/driver_dragonfly.c
usr.sbin/802_11/wpa_supplicant/driver_dragonfly.c
usr.sbin/pfctl/pfctl_optimize.c

index 61ba572..785c13c 100644 (file)
@@ -31,8 +31,6 @@
  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
  * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
- *
- * $DragonFly: src/lib/libstand/hammerread.c,v 1.2 2008/10/29 22:14:25 swildner Exp $
  */
 
 /*
@@ -575,7 +573,7 @@ hreaddir(struct hfs *hfs, ino_t ino, int64_t *off, struct dirent *de)
        struct hammer_base_elm key, end;
 
 #if DEBUG > 2
-       printf("%s(%llx, %lld)\n", __FUNCTION__, (long long)ino, *off);
+       printf("%s(%llx, %lld)\n", __func__, (long long)ino, *off);
 #endif
 
        bzero(&key, sizeof(key));
@@ -617,7 +615,7 @@ hresolve(struct hfs *hfs, ino_t dirino, const char *name)
        size_t namel = strlen(name);
 
 #if DEBUG > 2
-       printf("%s(%llx, %s)\n", __FUNCTION__, (long long)dirino, name);
+       printf("%s(%llx, %s)\n", __func__, (long long)dirino, name);
 #endif
 
        bzero(&key, sizeof(key));
@@ -661,7 +659,7 @@ static ino_t
 hlookup(struct hfs *hfs, const char *path)
 {
 #if DEBUG > 2
-       printf("%s(%s)\n", __FUNCTION__, path);
+       printf("%s(%s)\n", __func__, path);
 #endif
 
 #ifdef BOOT2
@@ -699,7 +697,7 @@ hstat(struct hfs *hfs, ino_t ino, struct stat* st)
        struct hammer_base_elm key;
 
 #if DEBUG > 2
-       printf("%s(%llx)\n", __FUNCTION__, (long long)ino);
+       printf("%s(%llx)\n", __func__, (long long)ino);
 #endif
 
        bzero(&key, sizeof(key));
index cdee012..3770371 100644 (file)
@@ -890,7 +890,7 @@ ehci_dump_isoc(ehci_softc_t *sc)
            (EHCI_VIRTUAL_FRAMELIST_COUNT - 1);
 
        kprintf("%s: isochronous dump from frame 0x%03x:\n",
-           __FUNCTION__, pos);
+           __func__, pos);
 
        itd = sc->sc_isoc_hs_p_last[pos];
        sitd = sc->sc_isoc_fs_p_last[pos];
@@ -1487,7 +1487,7 @@ ehci_interrupt(ehci_softc_t *sc)
 
        if (status & EHCI_STS_HSE) {
                kprintf("%s: unrecoverable error, "
-                   "controller halted\n", __FUNCTION__);
+                   "controller halted\n", __func__);
 #ifdef USB_DEBUG
                ehci_dump_regs(sc);
                ehci_dump_isoc(sc);
@@ -1513,7 +1513,7 @@ ehci_interrupt(ehci_softc_t *sc)
                /* block unprocessed interrupts */
                sc->sc_eintrs &= ~status;
                EOWRITE4(sc, EHCI_USBINTR, sc->sc_eintrs);
-               kprintf("%s: blocking interrupts 0x%x\n", __FUNCTION__, status);
+               kprintf("%s: blocking interrupts 0x%x\n", __func__, status);
        }
        /* poll all the USB transfers */
        ehci_interrupt_poll(sc);
@@ -1606,7 +1606,7 @@ restart:
                }
 
                if (td_next == NULL) {
-                       panic("%s: out of EHCI transfer descriptors!", __FUNCTION__);
+                       panic("%s: out of EHCI transfer descriptors!", __func__);
                }
                /* get next TD */
 
@@ -2038,7 +2038,7 @@ ehci_isoc_fs_done(ehci_softc_t *sc, struct usb_xfer *xfer)
        while (nframes--) {
                if (td == NULL) {
                        panic("%s:%d: out of TD's\n",
-                           __FUNCTION__, __LINE__);
+                           __func__, __LINE__);
                }
                if (pp_last >= &sc->sc_isoc_fs_p_last[EHCI_VIRTUAL_FRAMELIST_COUNT]) {
                        pp_last = &sc->sc_isoc_fs_p_last[0];
@@ -2092,7 +2092,7 @@ ehci_isoc_hs_done(ehci_softc_t *sc, struct usb_xfer *xfer)
        while (nframes) {
                if (td == NULL) {
                        panic("%s:%d: out of TD's\n",
-                           __FUNCTION__, __LINE__);
+                           __func__, __LINE__);
                }
                if (pp_last >= &sc->sc_isoc_hs_p_last[EHCI_VIRTUAL_FRAMELIST_COUNT]) {
                        pp_last = &sc->sc_isoc_hs_p_last[0];
@@ -2519,7 +2519,7 @@ ehci_device_isoc_fs_enter(struct usb_xfer *xfer)
        while (nframes--) {
                if (td == NULL) {
                        panic("%s:%d: out of TD's\n",
-                           __FUNCTION__, __LINE__);
+                           __func__, __LINE__);
                }
                if (pp_last >= &sc->sc_isoc_fs_p_last[EHCI_VIRTUAL_FRAMELIST_COUNT]) {
                        pp_last = &sc->sc_isoc_fs_p_last[0];
@@ -2535,7 +2535,7 @@ ehci_device_isoc_fs_enter(struct usb_xfer *xfer)
                                once = 0;
                                kprintf("%s: frame length(%d) exceeds %d "
                                    "bytes (frame truncated)\n",
-                                   __FUNCTION__, *plen,
+                                   __func__, *plen,
                                    xfer->max_frame_size);
                        }
 #endif
@@ -2809,7 +2809,7 @@ ehci_device_isoc_hs_enter(struct usb_xfer *xfer)
        while (nframes) {
                if (td == NULL) {
                        panic("%s:%d: out of TD's\n",
-                           __FUNCTION__, __LINE__);
+                           __func__, __LINE__);
                }
                if (pp_last >= &sc->sc_isoc_hs_p_last[EHCI_VIRTUAL_FRAMELIST_COUNT]) {
                        pp_last = &sc->sc_isoc_hs_p_last[0];
@@ -2821,7 +2821,7 @@ ehci_device_isoc_hs_enter(struct usb_xfer *xfer)
                                once = 0;
                                kprintf("%s: frame length(%d) exceeds %d bytes "
                                    "(frame truncated)\n",
-                                   __FUNCTION__, *plen, xfer->max_frame_size);
+                                   __func__, *plen, xfer->max_frame_size);
                        }
 #endif
                        *plen = xfer->max_frame_size;
@@ -2886,7 +2886,7 @@ ehci_device_isoc_hs_enter(struct usb_xfer *xfer)
                                                /* new page needed */
                                                page_addr = buf_res.physaddr & ~0xFFF;
                                                if (page_no == 6) {
-                                                       panic("%s: too many pages\n", __FUNCTION__);
+                                                       panic("%s: too many pages\n", __func__);
                                                }
                                                page_no++;
                                                /* update page address */
index 95e653a..2c0cf12 100644 (file)
@@ -720,7 +720,7 @@ ohci_isoc_done(struct usb_xfer *xfer)
        while (1) {
                if (td == NULL) {
                        panic("%s:%d: out of TD's\n",
-                           __FUNCTION__, __LINE__);
+                           __func__, __LINE__);
                }
 #ifdef USB_DEBUG
                if (ohcidebug > 5) {
@@ -1173,12 +1173,12 @@ ohci_interrupt(ohci_softc_t *sc)
                }
 #endif
                if (status & OHCI_RD) {
-                       kprintf("%s: resume detect\n", __FUNCTION__);
+                       kprintf("%s: resume detect\n", __func__);
                        /* XXX process resume detect */
                }
                if (status & OHCI_UE) {
                        kprintf("%s: unrecoverable error, "
-                           "controller halted\n", __FUNCTION__);
+                           "controller halted\n", __func__);
                        OWRITE4(sc, OHCI_CONTROL, OHCI_HCFS_RESET);
                        /* XXX what else */
                }
@@ -1203,7 +1203,7 @@ ohci_interrupt(ohci_softc_t *sc)
                OWRITE4(sc, OHCI_INTERRUPT_DISABLE, status);
                sc->sc_eintrs &= ~status;
                kprintf("%s: blocking intrs 0x%x\n",
-                   __FUNCTION__, status);
+                   __func__, status);
        }
        /* poll all the USB transfers */
        ohci_interrupt_poll(sc);
@@ -1295,7 +1295,7 @@ restart:
                }
 
                if (td_next == NULL) {
-                       panic("%s: out of OHCI transfer descriptors!", __FUNCTION__);
+                       panic("%s: out of OHCI transfer descriptors!", __func__);
                }
                /* get next TD */
 
@@ -1900,7 +1900,7 @@ ohci_device_isoc_enter(struct usb_xfer *xfer)
        while (nframes--) {
                if (td == NULL) {
                        panic("%s:%d: out of TD's\n",
-                           __FUNCTION__, __LINE__);
+                           __func__, __LINE__);
                }
                itd_offset[ncur] = length;
                buf_offset += *plen;
index 5c9f12c..7002172 100644 (file)
@@ -1017,7 +1017,7 @@ uhci_isoc_done(uhci_softc_t *sc, struct usb_xfer *xfer)
        while (nframes--) {
                if (td == NULL) {
                        panic("%s:%d: out of TD's\n",
-                           __FUNCTION__, __LINE__);
+                           __func__, __LINE__);
                }
                if (pp_last >= &sc->sc_isoc_p_last[UHCI_VFRAMELIST_COUNT]) {
                        pp_last = &sc->sc_isoc_p_last[0];
@@ -1438,21 +1438,21 @@ uhci_interrupt(uhci_softc_t *sc)
                if (status & UHCI_STS_RD) {
 #ifdef USB_DEBUG
                        kprintf("%s: resume detect\n",
-                           __FUNCTION__);
+                           __func__);
 #endif
                }
                if (status & UHCI_STS_HSE) {
                        kprintf("%s: host system error\n",
-                           __FUNCTION__);
+                           __func__);
                }
                if (status & UHCI_STS_HCPE) {
                        kprintf("%s: host controller process error\n",
-                           __FUNCTION__);
+                           __func__);
                }
                if (status & UHCI_STS_HCH) {
                        /* no acknowledge needed */
                        DPRINTF("%s: host controller halted\n",
-                           __FUNCTION__);
+                           __func__);
 #ifdef USB_DEBUG
                        if (uhcidebug > 0) {
                                uhci_dump_all(sc);
@@ -1567,7 +1567,7 @@ restart:
                }
 
                if (td_next == NULL) {
-                       panic("%s: out of UHCI transfer descriptors!", __FUNCTION__);
+                       panic("%s: out of UHCI transfer descriptors!", __func__);
                }
                /* get next TD */
 
@@ -2197,7 +2197,7 @@ uhci_device_isoc_enter(struct usb_xfer *xfer)
        while (nframes--) {
                if (td == NULL) {
                        panic("%s:%d: out of TD's\n",
-                           __FUNCTION__, __LINE__);
+                           __func__, __LINE__);
                }
                if (pp_last >= &sc->sc_isoc_p_last[UHCI_VFRAMELIST_COUNT]) {
                        pp_last = &sc->sc_isoc_p_last[0];
@@ -2208,7 +2208,7 @@ uhci_device_isoc_enter(struct usb_xfer *xfer)
                                once = 0;
                                kprintf("%s: frame length(%d) exceeds %d "
                                    "bytes (frame truncated)\n",
-                                   __FUNCTION__, *plen,
+                                   __func__, *plen,
                                    xfer->max_frame_size);
                        }
 #endif
index 9e207ac..bf9afb9 100644 (file)
@@ -1447,17 +1447,17 @@ xhci_interrupt(struct xhci_softc *sc)
 
                if (status & XHCI_STS_HCH) {
                        kprintf("%s: host controller halted\n",
-                           __FUNCTION__);
+                           __func__);
                }
 
                if (status & XHCI_STS_HSE) {
                        kprintf("%s: host system error\n",
-                           __FUNCTION__);
+                           __func__);
                }
 
                if (status & XHCI_STS_HCE) {
                        kprintf("%s: host controller error\n",
-                          __FUNCTION__);
+                          __func__);
                }
        }
 
@@ -1543,7 +1543,7 @@ restart:
                }
 
                if (td_next == NULL)
-                       panic("%s: out of XHCI transfer descriptors!", __FUNCTION__);
+                       panic("%s: out of XHCI transfer descriptors!", __func__);
 
                /* get next TD */
 
index 7dd889e..7e1c826 100644 (file)
@@ -138,7 +138,7 @@ SYSCTL_INT(_hw_usb_mos, OID_AUTO, debug, CTLFLAG_RW, &mos_debug, 0,
 #endif
 
 #define MOS_DPRINTFN(fmt,...) \
-  DPRINTF("mos: %s: " fmt "\n",__FUNCTION__,## __VA_ARGS__)
+  DPRINTF("mos: %s: " fmt "\n",__func__,## __VA_ARGS__)
 
 #define        USB_PRODUCT_MOSCHIP_MCS7730     0x7730
 #define        USB_PRODUCT_SITECOMEU_LN030     0x0021
index 5b05c70..818a4ab 100644 (file)
         kprintf("%s:%s: " fmt,                         \
               (sc) ? (const char *)(sc)->sc_name :     \
               (const char *)"umassX",                  \
-               __FUNCTION__ ,## __VA_ARGS__);          \
+               __func__ ,## __VA_ARGS__);              \
     }                                                  \
   } while (0)
 
index 8697c13..58daa31 100644 (file)
@@ -38,7 +38,7 @@ extern int usb_debug;
 #define        DPRINTFN(n,fmt,...) do {                \
   if ((USB_DEBUG_VAR) >= (n)) {                        \
     kprintf("%s: " fmt,                                \
-          __FUNCTION__,## __VA_ARGS__);        \
+          __func__,## __VA_ARGS__);    \
   }                                            \
 } while (0)
 #define        DPRINTF(...)    DPRINTFN(1, __VA_ARGS__)
index 72cbab8..de9bcb1 100644 (file)
@@ -2711,7 +2711,7 @@ usbd_callback_wrapper_sub(struct usb_xfer *xfer)
                if (xfer->error == 0) {
                        panic("%s: actual number of frames, %d, is "
                            "greater than initial number of frames, %d\n",
-                           __FUNCTION__, xfer->aframes, xfer->nframes);
+                           __func__, xfer->aframes, xfer->nframes);
                } else {
                        /* just set some valid value */
                        xfer->aframes = xfer->nframes;
@@ -2738,7 +2738,7 @@ usbd_callback_wrapper_sub(struct usb_xfer *xfer)
                if (xfer->error == 0) {
                        panic("%s: actual length, %d, is greater than "
                            "initial length, %d\n",
-                           __FUNCTION__, xfer->actlen, xfer->sumlen);
+                           __func__, xfer->actlen, xfer->sumlen);
                } else {
                        /* just set some valid value */
                        xfer->actlen = xfer->sumlen;
index 3bb32d9..97dfbba 100644 (file)
@@ -237,7 +237,7 @@ acpi_smbus_read_2(struct acpi_smbat_softc *sc, uint8_t addr, uint8_t cmd,
                goto out;
        if (val & SMBUS_STS_MASK) {
                kprintf("%s: AE_ERROR 0x%x\n",
-                      __FUNCTION__, (int)(val & SMBUS_STS_MASK));
+                      __func__, (int)(val & SMBUS_STS_MASK));
                error = EIO;
                goto out;
        }
@@ -306,7 +306,7 @@ acpi_smbus_read_multi_1(struct acpi_smbat_softc *sc, uint8_t addr, uint8_t cmd,
                goto out;
        if (val & SMBUS_STS_MASK) {
                kprintf("%s: AE_ERROR 0x%x\n",
-                      __FUNCTION__, (int)(val & SMBUS_STS_MASK));
+                      __func__, (int)(val & SMBUS_STS_MASK));
                error = EIO;
                goto out;
        }
index 1301076..f03cf0e 100644 (file)
@@ -287,7 +287,7 @@ do {                                                                        \
        if (!_DRM_LOCK_IS_HELD(dev->lock.hw_lock->lock) ||              \
             dev->lock.file_priv != file_priv) {                        \
                DRM_ERROR("%s called without lock held\n",              \
-                          __FUNCTION__);                               \
+                          __func__);                           \
                return EINVAL;                                          \
        }                                                               \
 } while (0)
index 84d5d54..3b6c243 100644 (file)
@@ -144,7 +144,7 @@ static __inline__ int mach64_emit_state(struct drm_file *file_priv,
        DMALOCALS;
 
        if (MACH64_VERBOSE) {
-               mach64_print_dirty(__FUNCTION__, dirty);
+               mach64_print_dirty(__func__, dirty);
        } else {
                DRM_DEBUG("dirty=0x%08x\n", dirty);
        }
index 05682de..714aac5 100644 (file)
@@ -68,7 +68,7 @@ int r128_enable_vblank(struct drm_device *dev, int crtc)
        drm_r128_private_t *dev_priv = dev->dev_private;
 
        if (crtc != 0) {
-               DRM_ERROR("%s:  bad crtc %d\n", __FUNCTION__, crtc);
+               DRM_ERROR("%s:  bad crtc %d\n", __func__, crtc);
                return -EINVAL;
        }
 
@@ -79,7 +79,7 @@ int r128_enable_vblank(struct drm_device *dev, int crtc)
 void r128_disable_vblank(struct drm_device *dev, int crtc)
 {
        if (crtc != 0)
-               DRM_ERROR("%s:  bad crtc %d\n", __FUNCTION__, crtc);
+               DRM_ERROR("%s:  bad crtc %d\n", __func__, crtc);
 
        /*
         * FIXME: implement proper interrupt disable by using the vblank
index 815590c..f3d1dcd 100644 (file)
@@ -62,7 +62,7 @@
 
 #ifdef CMX_DEBUG
 #define        DEBUG_printf(dev, fmt, args...) \
-       device_printf(dev, "%s: " fmt, __FUNCTION__, ##args)
+       device_printf(dev, "%s: " fmt, __func__, ##args)
 #else
 #define        DEBUG_printf(dev, fmt, args...)
 #endif
index 08b2cab..7483fe5 100644 (file)
@@ -1383,7 +1383,7 @@ amr_setup_polled_dmamap(void *arg, bus_dma_segment_t *segs, int nsegs, int err)
     int mb_channel;
 
     if (err) {
-       device_printf(sc->amr_dev, "error %d in %s", err, __FUNCTION__);
+       device_printf(sc->amr_dev, "error %d in %s", err, __func__);
        ac->ac_status = AMR_STATUS_ABORTED;
        return;
     }
@@ -1585,7 +1585,7 @@ amr_setup_data(void *arg, bus_dma_segment_t *segs, int nsegs, int err)
     int mb_channel;
 
     if (err) {
-       device_printf(sc->amr_dev, "error %d in %s", err, __FUNCTION__);
+       device_printf(sc->amr_dev, "error %d in %s", err, __func__);
        amr_abort_load(ac);
        return;
     }
@@ -1621,7 +1621,7 @@ amr_setup_ccb(void *arg, bus_dma_segment_t *segs, int nsegs, int err)
     struct amr_ext_passthrough *aep = &ac->ac_ccb->ccb_epthru;
 
     if (err) {
-       device_printf(sc->amr_dev, "error %d in %s", err, __FUNCTION__);
+       device_printf(sc->amr_dev, "error %d in %s", err, __func__);
        amr_abort_load(ac);
        return;
     }
index ae307eb..6a873ab 100644 (file)
@@ -387,4 +387,4 @@ padstr(char *targ, const char *src, int len)
 }
 
 #define ciss_report_request(a, b, c)   \
-       _ciss_report_request(a, b, c, __FUNCTION__)
+       _ciss_report_request(a, b, c, __func__)
index e7c1552..659428b 100644 (file)
@@ -228,7 +228,7 @@ void __os_dbgbreak(const char *file, int line);
 #define os_dbgbreak() __os_dbgbreak(__FILE__, __LINE__)
 #define HPT_ASSERT(x) do { if (!(x)) os_dbgbreak(); } while (0)
 void os_check_stack(const char *location, int size);
-#define HPT_CHECK_STACK(size) os_check_stack(__FUNCTION__, (size))
+#define HPT_CHECK_STACK(size) os_check_stack(__func__, (size))
 #else
 #define KdPrint(x)
 #define HPT_ASSERT(x)
index c0fd656..07ffcde 100644 (file)
@@ -194,7 +194,7 @@ void __os_dbgbreak(const char *file, int line);
 #define os_dbgbreak() __os_dbgbreak(__FILE__, __LINE__)
 #define HPT_ASSERT(x) do { if (!(x)) os_dbgbreak(); } while (0)
 void os_check_stack(const char *location, int size);
-#define HPT_CHECK_STACK(size) os_check_stack(__FUNCTION__, (size))
+#define HPT_CHECK_STACK(size) os_check_stack(__func__, (size))
 #else
 #define KdPrint(x)
 #define HPT_ASSERT(x)
index a07f70c..18eb7d7 100644 (file)
@@ -598,7 +598,7 @@ extern void mfi_dump_cmds(struct mfi_softc *sc);
 extern void mfi_validate_sg(struct mfi_softc *, struct mfi_command *, const char *, int );
 #define MFI_PRINT_CMD(cm)      mfi_print_cmd(cm)
 #define MFI_DUMP_CMDS(sc)      mfi_dump_cmds(sc)
-#define MFI_VALIDATE_CMD(sc, cm) mfi_validate_sg(sc, cm, __FUNCTION__, __LINE__)
+#define MFI_VALIDATE_CMD(sc, cm) mfi_validate_sg(sc, cm, __func__, __LINE__)
 #else
 #define MFI_PRINT_CMD(cm)
 #define MFI_DUMP_CMDS(sc)
index 8750d0e..9e7f08b 100644 (file)
@@ -62,8 +62,8 @@
 extern struct lwkt_serialize wlan_global_serializer;
 extern int ieee80211_force_swcrypto;
 
-#define wlan_serialize_enter() _wlan_serialize_enter(__FUNCTION__)
-#define wlan_serialize_exit()  _wlan_serialize_exit(__FUNCTION__)
+#define wlan_serialize_enter() _wlan_serialize_enter(__func__)
+#define wlan_serialize_exit()  _wlan_serialize_exit(__func__)
 void _wlan_serialize_enter(const char *funcname);
 void _wlan_serialize_exit(const char *funcname);
 int wlan_serialize_sleep(void *ident, int flags, const char *wmesg, int timo);
index 510bcd4..9c99d0a 100644 (file)
@@ -69,19 +69,19 @@ _lwkt_token_held_excl(lwkt_token_t tok, thread_t td)
 #define __DEBUG_CRIT_PASS_ARG__                , id
 #define __DEBUG_CRIT_ENTER(td)         _debug_crit_enter((td), id)
 #define __DEBUG_CRIT_EXIT(td)          _debug_crit_exit((td), id)
-#define crit_enter()                   _crit_enter(mycpu, __FUNCTION__)
+#define crit_enter()                   _crit_enter(mycpu, __func__)
 #define crit_enter_id(id)              _crit_enter(mycpu, id)
-#define crit_enter_gd(curgd)           _crit_enter((curgd), __FUNCTION__)
-#define crit_enter_quick(curtd)                _crit_enter_quick((curtd), __FUNCTION__)
-#define crit_enter_hard()              _crit_enter_hard(mycpu, __FUNCTION__)
-#define crit_enter_hard_gd(curgd)      _crit_enter_hard((curgd), __FUNCTION__)
-#define crit_exit()                    _crit_exit(mycpu, __FUNCTION__)
+#define crit_enter_gd(curgd)           _crit_enter((curgd), __func__)
+#define crit_enter_quick(curtd)                _crit_enter_quick((curtd), __func__)
+#define crit_enter_hard()              _crit_enter_hard(mycpu, __func__)
+#define crit_enter_hard_gd(curgd)      _crit_enter_hard((curgd), __func__)
+#define crit_exit()                    _crit_exit(mycpu, __func__)
 #define crit_exit_id(id)               _crit_exit(mycpu, id)
-#define crit_exit_gd(curgd)            _crit_exit((curgd), __FUNCTION__)
-#define crit_exit_quick(curtd)         _crit_exit_quick((curtd), __FUNCTION__)
-#define crit_exit_hard()               _crit_exit_hard(mycpu, __FUNCTION__)
-#define crit_exit_hard_gd(curgd)       _crit_exit_hard((curgd), __FUNCTION__)
-#define crit_exit_noyield(curtd)       _crit_exit_noyield((curtd),__FUNCTION__)
+#define crit_exit_gd(curgd)            _crit_exit((curgd), __func__)
+#define crit_exit_quick(curtd)         _crit_exit_quick((curtd), __func__)
+#define crit_exit_hard()               _crit_exit_hard(mycpu, __func__)
+#define crit_exit_hard_gd(curgd)       _crit_exit_hard((curgd), __func__)
+#define crit_exit_noyield(curtd)       _crit_exit_noyield((curtd),__func__)
 #else
 #define __DEBUG_CRIT_ARG__             void
 #define __DEBUG_CRIT_ADD_ARG__
index 8dd031b..b20aea8 100644 (file)
@@ -748,7 +748,7 @@ bsd_set_countermeasures(void *priv, int enabled)
 {
        struct bsd_driver_data *drv = priv;
 
-       wpa_printf(MSG_DEBUG, "%s: enabled=%d", __FUNCTION__, enabled);
+       wpa_printf(MSG_DEBUG, "%s: enabled=%d", __func__, enabled);
        return set80211param(drv, IEEE80211_IOC_COUNTERMEASURES, enabled);
 }
 
index a0d2b2f..c027f5a 100644 (file)
@@ -219,7 +219,7 @@ wpa_driver_bsd_set_wpa_internal(void *priv, int wpa, int privacy)
        int ret = 0;
 
        wpa_printf(MSG_DEBUG, "%s: wpa=%d privacy=%d",
-               __FUNCTION__, wpa, privacy);
+               __func__, wpa, privacy);
 
        if (!wpa && wpa_driver_bsd_set_wpa_ie(drv, NULL, 0) < 0)
                ret = -1;
@@ -234,7 +234,7 @@ wpa_driver_bsd_set_wpa_internal(void *priv, int wpa, int privacy)
 static int
 wpa_driver_bsd_set_wpa(void *priv, int enabled)
 {
-       wpa_printf(MSG_DEBUG, "%s: enabled=%d", __FUNCTION__, enabled);
+       wpa_printf(MSG_DEBUG, "%s: enabled=%d", __func__, enabled);
 
        return wpa_driver_bsd_set_wpa_internal(priv, enabled ? 3 : 0, enabled);
 }
index 0d1e581..b5e4887 100644 (file)
@@ -45,7 +45,7 @@
 /* #define OPT_DEBUG   1 */
 #ifdef OPT_DEBUG
 # define DEBUG(str, v...) \
-       printf("%s: " str "\n", __FUNCTION__ , ## v)
+       printf("%s: " str "\n", __func__ , ## v)
 #else
 # define DEBUG(str, v...) ((void)0)
 #endif