Ignore:
Timestamp:
Sep 18, 2006, 8:59:48 AM (13 years ago)
Author:
Sam Hocevar
Message:
  • Added errno support to the kernel.
Location:
libcaca/trunk/kernel
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • libcaca/trunk/kernel/kernel.c

    r1049 r1052  
    33 *  libcaca       Colour ASCII-Art library
    44 *  Copyright (c) 2006 Sam Hocevar <sam@zoy.org>
     5 *                2006 Jean-Yves Lamoureux <jylam@lnxscene.org>
    56 *                All Rights Reserved
    67 *
     
    333334}
    334335
     336/* errno.h stuff */
     337int errno = 0;
     338
     339/* arpa/inet.h functions */
    335340
    336341/* XXX FIXME Converts only from little endian to big endian (x86) */
     
    346351}
    347352
    348 
    349 
    350353#endif /* __KERNEL__ */
  • libcaca/trunk/kernel/kernel.h

    r1048 r1052  
    1818 */
    1919
    20 #ifndef __KERNEL_H_
    21 #define __KERNEL_H_
    2220/* Various defines */
    2321#define NULL ((void *)0)
     
    109107int getpid(void);
    110108
    111 
    112109/* time.h functions */
    113110int gettimeofday(struct timeval *tv, struct timezone *tz);
     
    119116double sqrt(double x);
    120117
     118/* errno.h functions */
     119#define ENOENT   2 /* No such file or directory */
     120#define ENOMEM  12 /* Out of memory */
     121#define EBUSY   16 /* Device or resource busy */
     122#define ENODEV  19 /* No such device */
     123#define EINVAL  22 /* Invalid argument */
     124#define ENOTTY  25 /* Not a typewriter */
     125#define ENOSYS  38 /* Function not implemented */
     126extern int errno;
     127
    121128/* arpa/inet.h functions */
    122129unsigned int htonl(unsigned int hostlong);
    123130unsigned short htons(unsigned short hostlong);
    124131
    125 #endif /* __KERNEL_H_ */
Note: See TracChangeset for help on using the changeset viewer.