src/dce/model/libc.c
changeset 6795 a3420f767e78
parent 6787 21674f6dcb28
     1.1 --- a/src/dce/model/libc.c	Fri Nov 12 10:30:08 2010 +0900
     1.2 +++ b/src/dce/model/libc.c	Fri Nov 12 12:53:35 2010 +0900
     1.3 @@ -271,6 +271,10 @@
     1.4  {
     1.5    return g_libc.strncpy_fn (dest, src, n);
     1.6  }
     1.7 +char *__strcpy_chk (char *dest, const char *src, size_t n)
     1.8 +{
     1.9 +  return g_libc.strcpy_fn (dest, src);
    1.10 +}
    1.11  int strcmp(const char *s1, const char *s2)
    1.12  {
    1.13    return g_libc.strcmp_fn (s1, s2);
    1.14 @@ -1071,6 +1075,10 @@
    1.15  {
    1.16    return g_libc.strcat_fn (dest, src);
    1.17  }
    1.18 +char *strncat(char *dest, const char *src, size_t n)
    1.19 +{
    1.20 +  return g_libc.strncat_fn (dest, src, n);
    1.21 +}
    1.22  mode_t umask(mode_t mask)
    1.23  {
    1.24    return g_libc.umask_fn (mask);
    1.25 @@ -1132,6 +1140,103 @@
    1.26  {
    1.27    return g_libc.inet_pton_fn (af, src, dst);
    1.28  }
    1.29 +char *if_indextoname(unsigned ifindex, char *ifname)
    1.30 +{
    1.31 +  return g_libc.if_indextoname_fn(ifindex, ifname);
    1.32 +}
    1.33 +
    1.34 +int pthread_rwlock_init(pthread_rwlock_t * rwlock,
    1.35 +                        const pthread_rwlockattr_t * attr)
    1.36 +{
    1.37 +  return g_libc.pthread_rwlock_init_fn(rwlock, attr);
    1.38 +}
    1.39 +int sigwait(const sigset_t *set, int *sig)
    1.40 +{
    1.41 +  return g_libc.sigwait_fn (set, sig);
    1.42 +}
    1.43 +char *ctime_r(const time_t *timep, char *buf)
    1.44 +{
    1.45 +  return g_libc.ctime_r_fn (timep, buf);
    1.46 +}
    1.47 +int clock_gettime(clockid_t which_clock, struct timespec *tp)
    1.48 +{
    1.49 +  return g_libc.clock_gettime_fn (which_clock, tp);
    1.50 +}
    1.51 +
    1.52 +int pthread_rwlock_wrlock (pthread_rwlock_t *rwlock)
    1.53 +{
    1.54 +  return g_libc.pthread_rwlock_wrlock_fn (rwlock);
    1.55 +}
    1.56 +int pthread_rwlock_unlock(pthread_rwlock_t *rwlock)
    1.57 +{
    1.58 +  return g_libc.pthread_rwlock_unlock_fn (rwlock);
    1.59 +}
    1.60 +int pthread_rwlock_rdlock(pthread_rwlock_t *rwlock)
    1.61 +{
    1.62 +  return g_libc.pthread_rwlock_rdlock_fn (rwlock);
    1.63 +}
    1.64 +int pthread_sigmask(int how, const sigset_t *set, sigset_t *oldset)
    1.65 +{
    1.66 +  return g_libc.pthread_sigmask_fn (how, set, oldset);
    1.67 +}
    1.68 +int pthread_setcancelstate(int state, int *oldstate)
    1.69 +{
    1.70 +  return g_libc.pthread_setcancelstate_fn (state, oldstate);
    1.71 +}
    1.72 +char *__xpg_basename (char *filename)
    1.73 +{
    1.74 +  return g_libc.__xpg_basename_fn (filename);
    1.75 +}
    1.76 +int __printf_chk (int __flag, __const char *__restrict __format, ...)
    1.77 +{
    1.78 +  va_list ap;
    1.79 +  va_start (ap, __format);
    1.80 +  int retval = g_libc.vfprintf_fn (stdout, __format, ap);
    1.81 +  va_end (ap);
    1.82 +  return retval;
    1.83 +}
    1.84 +int __vfprintf_chk (FILE *__restrict __stream, int __flag,
    1.85 +                    __const char *__restrict __format, _G_va_list __ap)
    1.86 +{
    1.87 +  return g_libc.vfprintf_fn (__stream, __format, __ap);
    1.88 +}
    1.89 +int __fprintf_chk (FILE *__restrict __stream, int __flag,
    1.90 +                    __const char *__restrict __format, ...)
    1.91 +{
    1.92 +  va_list ap;
    1.93 +  va_start (ap, __format);
    1.94 +  int retval = g_libc.vfprintf_fn (__stream, __format, ap);
    1.95 +  va_end (ap);
    1.96 +  return retval;
    1.97 +}
    1.98 +int __snprintf_chk(char *__restrict __s, size_t __n, int __flag,
    1.99 +                   size_t __slen, __const char *__restrict __format, ...)
   1.100 +{
   1.101 +  va_list ap;
   1.102 +  va_start (ap, __format);
   1.103 +  int retval = g_libc.vsnprintf_fn (__s, __n, __format, ap);
   1.104 +  va_end (ap);
   1.105 +  return retval;
   1.106 +}
   1.107 +struct protoent *getprotobynumber(int proto)
   1.108 +{
   1.109 +  return g_libc.getprotobynumber_fn (proto);
   1.110 +}
   1.111 +int inet6_opt_find (void *__extbuf, socklen_t __extlen, int __offset,
   1.112 +                    uint8_t __type, socklen_t *__lenp,
   1.113 +                    void **__databufp)
   1.114 +{
   1.115 +  return g_libc.inet6_opt_find_fn (__extbuf, __extlen, __offset, __type, __lenp, __databufp);
   1.116 +}
   1.117 +char *basename (char *filename)
   1.118 +{
   1.119 +  return g_libc.basename_fn (filename);
   1.120 +}
   1.121 +void syslog(int priority, const char *format, ...)
   1.122 +{
   1.123 +  // XXX
   1.124 +  return;
   1.125 +}
   1.126  
   1.127  void LIBSETUP (const struct Libc *fn)
   1.128  {