Ignore:
Timestamp:
Apr 26, 2005, 2:50:14 AM (20 years ago)
Author:
bird
Message:

Hacking public symbols which shouldn't been seen in LIBC.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/emx/include/sys/sysctl.h

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r1917 r1918  
    3636/** @file
    3737 * FreeBSD 5.3
     38 * @changed bird: Hacked on the kernel stuff.
    3839 */
    3940
     
    166167#define SYSCTL_OUT(r, p, l) (r->oldfunc)(r, p, l)
    167168
     169#ifdef __INNOTEK_LIBC__
     170#define sysctl_handle_int       __sysctl_handle_int
     171#define sysctl_handle_long      __sysctl_handle_long
     172#define sysctl_handle_intptr    __sysctl_handle_intptr
     173#define sysctl_handle_string    __sysctl_handle_string
     174#define sysctl_handle_opaque    __sysctl_handle_opaque
     175#endif
     176
    168177int sysctl_handle_int(SYSCTL_HANDLER_ARGS);
    169178int sysctl_handle_long(SYSCTL_HANDLER_ARGS);
     
    172181int sysctl_handle_opaque(SYSCTL_HANDLER_ARGS);
    173182
     183#if 0 /* bird */
    174184/*
    175185 * These functions are used to add/remove an oid from the mib.
     
    177187void sysctl_register_oid(struct sysctl_oid *oidp);
    178188void sysctl_unregister_oid(struct sysctl_oid *oidp);
     189#endif /* bird */
    179190
    180191/* Declare a static oid to allow child oids to be added to it. */
    181192#define SYSCTL_DECL(name)                                       \
    182         extern struct sysctl_oid_list sysctl_##name##_children
     193        extern struct sysctl_oid_list __sysctl_##name##_children
    183194
    184195/* Hide these in macros */
     
    188199        (oid_ptr)->oid_arg1 = (val);
    189200#define SYSCTL_STATIC_CHILDREN(oid_name) \
    190         (&sysctl_##oid_name##_children)
     201        (&__sysctl_##oid_name##_children)
    191202
    192203/* === Structs and macros related to context handling === */
     
    201212
    202213#define SYSCTL_NODE_CHILDREN(parent, name) \
    203         sysctl_##parent##_##name##_children
     214        __sysctl_##parent##_##name##_children
     215
     216#undef DATA_SET
     217#define DATA_SET(set, data) __asm__ (".stabs \"___" #set "__\", 25, 0, 0, _" #data)
    204218
    205219/* This constructs a "raw" MIB oid. */
    206220#define SYSCTL_OID(parent, nbr, name, kind, a1, a2, handler, fmt, descr) \
    207         static struct sysctl_oid sysctl__##parent##_##name = {           \
    208                 &sysctl_##parent##_children, { 0 },                      \
     221        static struct sysctl_oid __sysctl__##parent##_##name = {                 \
     222                &__sysctl_##parent##_children, { &__sysctl__##parent##_##name },                         \
    209223                nbr, kind, a1, a2, #name, handler, fmt, 0, descr };      \
    210         DATA_SET(sysctl_set, sysctl__##parent##_##name)
     224        DATA_SET(sysctl_set, __sysctl__##parent##_##name)
     225
    211226
    212227#define SYSCTL_ADD_OID(ctx, parent, nbr, name, kind, a1, a2, handler, fmt, descr) \
     
    584599 * Declare some common oids.
    585600 */
     601#define sysctl__children __sysctl__children
    586602extern struct sysctl_oid_list sysctl__children;
    587603SYSCTL_DECL(_kern);
     
    597613SYSCTL_DECL(_compat);
    598614
     615#if 0 /* bird  - not used */
    599616extern char     machine[];
    600617extern char     osrelease[];
     
    632649                        int *nindx, struct sysctl_req *req);
    633650int     sysctl_wire_old_buffer(struct sysctl_req *req, size_t len);
     651#endif /* bird  - not used */
    634652
    635653#else   /* !_KERNEL */
Note: See TracChangeset for help on using the changeset viewer.