Changeset 1484


Ignore:
Timestamp:
Sep 9, 2004, 4:51:29 AM (21 years ago)
Author:
bird
Message:

fixed problem after stuff was made const.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/emx/include/InnoTekLIBC/fork.h

    • Property cvs2svn:cvs-rev changed from 1.2 to 1.3
    r1483 r1484  
    5858    __LIBC_FORK_CTX_PARENT = 1,
    5959    /** The callback is called in both parent and child contexts. */
    60     __LIBC_FORK_CTX_BOTH = 2,
     60    __LIBC_FORK_CTX_BOTH = 2
    6161} __LIBC_FORKCTX;
    6262
     
    9191     * This normally just calling callback.
    9292     */
    93     __LIBC_FORK_OP_FORK_CHILD       = 0x40,
     93    __LIBC_FORK_OP_FORK_CHILD       = 0x40
    9494    /** Called on fork failure in the child to give a chance to cleanup
    9595     * resources which are not automatically freed upon process termination.
     
    494494    /* Priority of this callback */
    495495    unsigned                uPriority;
     496#if 0
    496497    /** Pointer to self.
    497498     * This is a hack to allow the callbacks to be static without gcc
     
    499500     */
    500501    const struct __libc_ForkCallback *pSelf;
     502#endif
    501503} __LIBC_FORKCALLBACK, *__LIBC_PFORKCALLBACK;
    502504
     
    512514 */
    513515#define _FORK_PARENT1(uPriority, pfnCallback) \
    514     static const __LIBC_FORKCALLBACK __fork_parent1_##pfnCallback = { pfnCallback, uPriority, &__fork_parent1_##pfnCallback }; \
    515     __asm__ (".stabs \"___fork_parent1__\", 25, 0, 0, ___fork_parent1_" #pfnCallback);
     516    static const __LIBC_FORKCALLBACK __fork_parent1_##pfnCallback = { pfnCallback, uPriority + (unsigned)(&__fork_parent1_##pfnCallback - &__fork_parent1_##pfnCallback) }; \
     517    __asm__ (".stabs \"___fork_parent1__\", 23, 0, 0, ___fork_parent1_" #pfnCallback);
    516518
    517519/** @def _FORK_CHILD1
     
    525527 */
    526528#define _FORK_CHILD1(uPriority, pfnCallback) \
    527     static const __LIBC_FORKCALLBACK __fork_child1_##pfnCallback  = { pfnCallback, uPriority, &__fork_child1_##pfnCallback }; \
    528     __asm__ (".stabs \"___fork_child1__\",  25, 0, 0, ___fork_child1_" #pfnCallback );
     529    static const __LIBC_FORKCALLBACK __fork_child1_##pfnCallback  = { pfnCallback, uPriority + (unsigned)(&__fork_child1_##pfnCallback - &__fork_child1_##pfnCallback) }; \
     530    __asm__ (".stabs \"___fork_child1__\",  23, 0, 0, ___fork_child1_" #pfnCallback );
    529531
    530532
Note: See TracChangeset for help on using the changeset viewer.