00001
00008 #ifndef _TXC_LIBC_H
00009 #define _TXC_LIBC_H
00010
00011 #ifndef TM_WRAP
00012 #define TM_WRAP(foo) __attribute__((tm_wrapping(foo)))
00013 #endif
00014
00015
00016 char *strcpy (char *dest, const char *src);
00017 char *strncpy (char *s1, const char *s2, size_t n);
00018 char *strcat (char *dest, const char *src);
00019 char *strncat (char *s1, const char *s2, size_t n);
00020 int strcmp (const char * a, const char * b);
00021 int strncmp (const char *s1, const char *s2, size_t n);
00022 int strcasecmp(const char *s1, const char *s2);
00023 size_t strlen(char *str);
00024 char *strchr (const char *s, int c_in);
00025 char *strrchr (const char *s, int c);
00026 int strncasecmp (const char *s1, const char *s2, size_t n);
00027
00028 TM_WRAP(strcpy) char *txc_libc_strcpy (char *dest, const char *src);
00029 TM_WRAP(strncpy) char *txc_libc_strncpy (char *s1, const char *s2, size_t n);
00030 TM_WRAP(strcat) char *txc_libc_strcat (char *dest, const char *src);
00031 TM_WRAP(strncat) char *txc_libc_strncat (char *s1, const char *s2, size_t n);
00032 TM_WRAP(strcmp) int txc_libc_strcmp (const char * a, const char * b);
00033 TM_WRAP(strncmp) int txc_libc_strncmp (const char *s1, const char *s2, size_t n);
00034 TM_WRAP(strcasecmp) int txc_libc_strcasecmp(const char *s1, const char *s2);
00035 TM_WRAP(strlen) size_t txc_libc_strlen(char *str);
00036 TM_WRAP(strchr) char *txc_libc_strchr (const char *s, int c_in);
00037 TM_WRAP(strrchr) char *txc_libc_strrchr (const char *s, int c);
00038 TM_WRAP(strncasecmp) int txc_libc_strncasecmp (const char *s1, const char *s2, size_t n);
00039
00040
00041
00042 double atof(char *p);
00043 int atoi(char *p);
00044
00045 TM_WRAP(atoi) int txc_libc_atoi(char *p);
00046 TM_WRAP(atof) double txc_libc_atof(char *p);
00047
00048
00049
00050 uint16_t htons (uint16_t x);
00051 int inet_aton(const char *cp, struct in_addr *addr);
00052 const char *inet_ntop(int af, const void *src, char *dst, socklen_t size);
00053
00054 TM_WRAP(htons) uint16_t txc_libc_htons (uint16_t x);
00055 TM_WRAP(inet_aton) int txc_libc_inet_aton(const char *cp, struct in_addr *addr);
00056 TM_WRAP(inet_ntop) const char *txc_libc_inet_ntop(int af, const void *src, char *dst, socklen_t size);
00057 #endif