DragonFly kernel List (threaded) for 2006-12
DragonFly BSD
DragonFly kernel List (threaded) for 2006-12
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

Function conflicts between kernel and libc


From: Matthew Dillon <dillon@xxxxxxxxxxxxxxxxxxxx>
Date: Tue, 5 Dec 2006 10:48:26 -0800 (PST)

    There are a number of function and type conflicts between the kernel
    and libc that I need to deal with.  My current plan is as follows:

    * printf-like functions.  Rename.  The kernel printf includes some
      kernel-specific extensions that the libc printf does not have.

    * str*() functions.  Leave intact, make declarations match libc,
      except rename fnmatch to kfnmatch.

    * dev_t.  Rename kdev_t (big nasty job but I think it has to be done).

    log			-> klog
    printf		-> kprintf
    snprintf		-> ksnprintf
    sprintf		-> REMOVE	(recode for snprintf)
    vprintf		-> kvprintf
    vsnprintf		-> kvsnprintf
    vsprintf		-> REMOVE	(recode for vsnprintf)
    sscanf		-> ksscanf
    vsscanf		-> kvsscanf
    qsort		-> kqsort

    strtol		LEAVE INTACT
    strtoul		LEAVE INTACT
    strtoq		LEAVE INTACT
    strtouq		LEAVE INTACT

    index		LEAVE INTACT
    rindex		LEAVE INTACT
    strcat		LEAVE INTACT
    strcmp		LEAVE INTACT
    strcpy		LEAVE INTACT
    strlcat		LEAVE INTACT
    strlcpy		LEAVE INTACT
    strlen		LEAVE INTACT
    strncmp		LEAVE INTACT
    strncpy		LEAVE INTACT

    fnmatch		-> kfnmatch

    dev_t		-> kdev_t

    For the moment I am going to use _XXXX_DECLARED defines in stdlib.h
    and string.h to prevent compiler warnings.  This definitely isn't the
    best solution but I can't linger on it.  It can be cleaned up after
    the new year.

					-Matt
					Matthew Dillon 
					<dillon@backplane.com>



[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]