Changeset 1922


Ignore:
Timestamp:
Apr 26, 2005, 4:59:01 AM (20 years ago)
Author:
bird
Message:

Hide and initialize everything.

File:
1 edited

Legend:

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

    • Property cvs2svn:cvs-rev changed from 1.2 to 1.3
    r1921 r1922  
    168168
    169169#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
     170#define sysctl_handle_int       __libc_sysctl_handle_int
     171#define sysctl_handle_long      __libc_sysctl_handle_long
     172#define sysctl_handle_intptr    __libc_sysctl_handle_intptr
     173#define sysctl_handle_string    __libc_sysctl_handle_string
     174#define sysctl_handle_opaque    __libc_sysctl_handle_opaque
    175175#endif
    176176
     
    191191/* Declare a static oid to allow child oids to be added to it. */
    192192#define SYSCTL_DECL(name)                                       \
    193         extern struct sysctl_oid_list __sysctl_##name##_children
     193        extern struct sysctl_oid_list __libc_sysctl_##name##_children
    194194
    195195/* Hide these in macros */
     
    199199        (oid_ptr)->oid_arg1 = (val);
    200200#define SYSCTL_STATIC_CHILDREN(oid_name) \
    201         (&__sysctl_##oid_name##_children)
     201        (&__libc_sysctl_##oid_name##_children)
    202202
    203203/* === Structs and macros related to context handling === */
     
    212212
    213213#define SYSCTL_NODE_CHILDREN(parent, name) \
    214         __sysctl_##parent##_##name##_children
     214        __libc_sysctl_##parent##_##name##_children
    215215
    216216#undef DATA_SET
    217 #define DATA_SET(set, data) __asm__ (".stabs \"___" #set "__\", 25, 0, 0, _" #data)
     217#define DATA_SET(set, data) __asm__ (".stabs \"___libc_" #set "__\", 25, 0, 0, _" #data)
    218218
    219219/* This constructs a "raw" MIB oid. */
    220220#define SYSCTL_OID(parent, nbr, name, kind, a1, a2, handler, fmt, descr) \
    221         static struct sysctl_oid __sysctl__##parent##_##name = {                 \
    222                 &__sysctl_##parent##_children, { &__sysctl__##parent##_##name },                         \
     221        static struct sysctl_oid __libc_sysctl__##parent##_##name = {            \
     222                &__libc_sysctl_##parent##_children, { &__libc_sysctl__##parent##_##name },                       \
    223223                nbr, kind, a1, a2, #name, handler, fmt, 0, descr };      \
    224         DATA_SET(sysctl_set, __sysctl__##parent##_##name)
     224        DATA_SET(sysctl_set, __libc_sysctl__##parent##_##name)
    225225
    226226
     
    230230/* This constructs a node from which other oids can hang. */
    231231#define SYSCTL_NODE(parent, nbr, name, access, handler, descr)              \
    232         struct sysctl_oid_list SYSCTL_NODE_CHILDREN(parent, name);          \
     232        struct sysctl_oid_list SYSCTL_NODE_CHILDREN(parent, name) = {0};    \
    233233        SYSCTL_OID(parent, nbr, name, CTLTYPE_NODE|(access),                \
    234234                   (void*)&SYSCTL_NODE_CHILDREN(parent, name), 0, handler, \
     
    599599 * Declare some common oids.
    600600 */
    601 #define sysctl__children __sysctl__children
     601#define sysctl__children __libc_sysctl__children
    602602extern struct sysctl_oid_list sysctl__children;
    603603SYSCTL_DECL(_kern);
Note: See TracChangeset for help on using the changeset viewer.