dns_unbound.patch
changeset 24 02787e1dfd96
parent 20 5ca51e147e7f
--- a/dns_unbound.patch	Thu Jun 21 17:26:37 2012 +0900
+++ b/dns_unbound.patch	Wed Jul 04 17:06:26 2012 +0900
@@ -1,6 +1,6 @@
-diff -r 6a5297994128 example/dce-unbound.cc
+diff -r 70496fb51ab2 example/dce-unbound.cc
 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
-+++ b/example/dce-unbound.cc	Thu Apr 26 11:21:55 2012 +0900
++++ b/example/dce-unbound.cc	Wed Jul 04 16:59:42 2012 +0900
 @@ -0,0 +1,98 @@
 +#include "ns3/core-module.h"
 +#include "ns3/network-module.h"
@@ -100,9 +100,9 @@
 +
 +  return 0;
 +}
-diff -r 6a5297994128 model/dce-credentials.cc
---- a/model/dce-credentials.cc	Thu Apr 26 09:56:01 2012 +0900
-+++ b/model/dce-credentials.cc	Thu Apr 26 11:21:55 2012 +0900
+diff -r 70496fb51ab2 model/dce-credentials.cc
+--- a/model/dce-credentials.cc	Wed Jul 04 16:58:26 2012 +0900
++++ b/model/dce-credentials.cc	Wed Jul 04 16:59:42 2012 +0900
 @@ -53,3 +53,15 @@
    int ret = eaccess (rPath.c_str (), mode);
    return ret;
@@ -119,9 +119,9 @@
 +  // XXX
 +  return 0;
 +}
-diff -r 6a5297994128 model/dce-stdio.cc
---- a/model/dce-stdio.cc	Thu Apr 26 09:56:01 2012 +0900
-+++ b/model/dce-stdio.cc	Thu Apr 26 11:21:55 2012 +0900
+diff -r 70496fb51ab2 model/dce-stdio.cc
+--- a/model/dce-stdio.cc	Wed Jul 04 16:58:26 2012 +0900
++++ b/model/dce-stdio.cc	Wed Jul 04 16:59:42 2012 +0900
 @@ -722,6 +722,16 @@
    va_end (ap);
    return retval;
@@ -139,9 +139,9 @@
  void dce___fpurge (FILE *stream)
  {
    NS_LOG_FUNCTION (Current () << UtilsGetNodeId () << stream);
-diff -r 6a5297994128 model/dce-stdio.h
---- a/model/dce-stdio.h	Thu Apr 26 09:56:01 2012 +0900
-+++ b/model/dce-stdio.h	Thu Apr 26 11:21:55 2012 +0900
+diff -r 70496fb51ab2 model/dce-stdio.h
+--- a/model/dce-stdio.h	Wed Jul 04 16:58:26 2012 +0900
++++ b/model/dce-stdio.h	Wed Jul 04 16:59:42 2012 +0900
 @@ -62,6 +62,9 @@
  					   __const char *__restrict __format, ...);
  int dce___snprintf_chk (char *__restrict __s, size_t __n, int __flag,
@@ -152,9 +152,9 @@
  
  void dce___fpurge (FILE *stream);
  size_t dce___fpending(FILE *stream);
-diff -r 6a5297994128 model/dce-syslog.cc
---- a/model/dce-syslog.cc	Thu Apr 26 09:56:01 2012 +0900
-+++ b/model/dce-syslog.cc	Thu Apr 26 11:21:55 2012 +0900
+diff -r 70496fb51ab2 model/dce-syslog.cc
+--- a/model/dce-syslog.cc	Wed Jul 04 16:58:26 2012 +0900
++++ b/model/dce-syslog.cc	Wed Jul 04 16:59:42 2012 +0900
 @@ -67,3 +67,14 @@
  
    vfprintf (process->syslog, message, args);
@@ -170,9 +170,9 @@
 +  dce_vsyslog (__pri, __fmt, ap);
 +  va_end (ap);
 +}
-diff -r 6a5297994128 model/dce-syslog.h
---- a/model/dce-syslog.h	Thu Apr 26 09:56:01 2012 +0900
-+++ b/model/dce-syslog.h	Thu Apr 26 11:21:55 2012 +0900
+diff -r 70496fb51ab2 model/dce-syslog.h
+--- a/model/dce-syslog.h	Wed Jul 04 16:58:26 2012 +0900
++++ b/model/dce-syslog.h	Wed Jul 04 16:59:42 2012 +0900
 @@ -19,4 +19,7 @@
  void
  dce_vsyslog (int priority, const char *message, va_list args);
@@ -181,9 +181,9 @@
 +dce___syslog_chk (int __pri, int __flag, __const char *__fmt, ...);
 +
  #endif // DCE_SYSLOG_H
-diff -r 6a5297994128 model/dce-unistd.h
---- a/model/dce-unistd.h	Thu Apr 26 09:56:01 2012 +0900
-+++ b/model/dce-unistd.h	Thu Apr 26 11:21:55 2012 +0900
+diff -r 70496fb51ab2 model/dce-unistd.h
+--- a/model/dce-unistd.h	Wed Jul 04 16:58:26 2012 +0900
++++ b/model/dce-unistd.h	Wed Jul 04 16:59:42 2012 +0900
 @@ -74,6 +74,8 @@
  
  ssize_t dce_pread(int fd, void *buf, size_t count, off_t offset);
@@ -193,9 +193,9 @@
  
  #ifdef __cplusplus
  }
-diff -r 6a5297994128 model/dce.cc
---- a/model/dce.cc	Thu Apr 26 09:56:01 2012 +0900
-+++ b/model/dce.cc	Thu Apr 26 11:21:55 2012 +0900
+diff -r 70496fb51ab2 model/dce.cc
+--- a/model/dce.cc	Wed Jul 04 16:58:26 2012 +0900
++++ b/model/dce.cc	Wed Jul 04 16:59:42 2012 +0900
 @@ -141,7 +141,7 @@
        current->err = EPERM;
        return -1;
@@ -205,9 +205,9 @@
        !is_set_ucapable (sgid))
      {
        current->err = EPERM;
-diff -r 6a5297994128 model/dlm-loader-factory.cc
---- a/model/dlm-loader-factory.cc	Thu Apr 26 09:56:01 2012 +0900
-+++ b/model/dlm-loader-factory.cc	Thu Apr 26 11:21:55 2012 +0900
+diff -r 70496fb51ab2 model/dlm-loader-factory.cc
+--- a/model/dlm-loader-factory.cc	Wed Jul 04 16:58:26 2012 +0900
++++ b/model/dlm-loader-factory.cc	Wed Jul 04 16:59:42 2012 +0900
 @@ -3,6 +3,7 @@
  #include "ns3/fatal-error.h"
  #include <list>
@@ -327,10 +327,10 @@
    m_loaded.push_back (module);
    return module;
  }
-diff -r 6a5297994128 model/libc-dce.cc
---- a/model/libc-dce.cc	Thu Apr 26 09:56:01 2012 +0900
-+++ b/model/libc-dce.cc	Thu Apr 26 11:21:55 2012 +0900
-@@ -129,11 +129,13 @@
+diff -r 70496fb51ab2 model/libc-dce.cc
+--- a/model/libc-dce.cc	Wed Jul 04 16:58:26 2012 +0900
++++ b/model/libc-dce.cc	Wed Jul 04 16:59:42 2012 +0900
+@@ -132,11 +132,13 @@
       __THROW;
  extern int __obstack_vprintf_chk (struct obstack *, int, const char *,
                    _G_va_list) __THROW;
@@ -344,34 +344,27 @@
  void libc_dce (struct Libc **libc)
  {
    *libc = new Libc;
-diff -r 6a5297994128 model/libc-ns3.h
---- a/model/libc-ns3.h	Thu Apr 26 09:56:01 2012 +0900
-+++ b/model/libc-ns3.h	Thu Apr 26 11:21:55 2012 +0900
-@@ -83,6 +83,7 @@
- DCE    (writev)
- NATIVE (memset)
- NATIVE (memcpy)
-+NATIVE (__memcpy_chk)
- NATIVE (bcopy)
- NATIVE (memcmp)
- NATIVE (memmove)
-@@ -102,6 +103,7 @@
+diff -r 70496fb51ab2 model/libc-ns3.h
+--- a/model/libc-ns3.h	Wed Jul 04 16:58:26 2012 +0900
++++ b/model/libc-ns3.h	Wed Jul 04 16:59:42 2012 +0900
+@@ -127,6 +127,7 @@
  NATIVE_EXPLICIT (strchr, char* (*) (char *, int))
  NATIVE_EXPLICIT (strrchr, const char * (*) (const char *, int))
  //DCE (strrchr)
 +NATIVE_EXPLICIT (strstr, const char * (*) (const char *, const char *))
  NATIVE (strcasecmp)
  NATIVE (strncasecmp)
+ DCE_WITH_ALIAS (strdup) // because C++ defines both const and non-const functions
+@@ -241,6 +242,8 @@
+ NATIVE (getdtablesize)
+ DCE (pread)
+ DCE (pwrite)
++DCE (chown)
++DCE (initgroups)
  
-@@ -129,6 +131,7 @@
- DCE    (__vfprintf_chk)
- DCE    (__fprintf_chk)
- DCE    (__snprintf_chk)
-+DCE    (__vsnprintf_chk)
- 
- DCE_WITH_ALIAS2 (fgetc,fgetc_unlocked)
- NATIVE (getc)
-@@ -357,6 +360,10 @@
+ // SYS/UIO.H
+ DCE (writev)
+@@ -393,6 +396,10 @@
  NATIVE (pthread_rwlock_destroy)
  NATIVE (pthread_setcancelstate)
  NATIVE (pthread_sigmask)
@@ -380,29 +373,22 @@
 +NATIVE (pthread_spin_unlock)
 +NATIVE (pthread_spin_destroy)
  
- // netdb.h
- DCE    (gethostbyname)
-@@ -440,6 +447,7 @@
- DCE    (setlogmask)
- DCE    (syslog)
- DCE    (vsyslog)
+ // SEMAPHORE.H
+ DCE (sem_init)
+@@ -475,6 +482,9 @@
+ DCE (setlogmask)
+ DCE (syslog)
+ DCE (vsyslog)
 +DCE    (__syslog_chk)
++ 
++
  
- // unistd.h
- NATIVE (sysconf)
-@@ -455,6 +463,8 @@
- DCE (eaccess)
- DCE (pipe)
- NATIVE (pathconf)
-+DCE (chown)
-+DCE (initgroups)
- 
- // this is wrong. clock should be changed to DCE implementation
- DCE_WITH_ALIAS2 (clock_gettime, __vdso_clock_gettime)
-diff -r 6a5297994128 wscript
---- a/wscript	Thu Apr 26 09:56:01 2012 +0900
-+++ b/wscript	Thu Apr 26 11:21:55 2012 +0900
-@@ -37,6 +37,8 @@
+ // SETJMP.H
+ NATIVE (__sigsetjmp)
+diff -r 70496fb51ab2 wscript
+--- a/wscript	Wed Jul 04 16:58:26 2012 +0900
++++ b/wscript	Wed Jul 04 16:59:42 2012 +0900
+@@ -40,6 +40,8 @@
  
      conf.env.prepend_value('LINKFLAGS', '-Wl,--no-as-needed')
      conf.env.append_value('LINKFLAGS', '-pthread')
@@ -411,7 +397,7 @@
      conf.check (lib='dl', mandatory = True)
      conf.check_cc(fragment='int main() {__get_cpu_features();}\n', msg='Checking for glibc get_cpu_features', define_name='HAVE_GETCPUFEATURES', mandatory=False)
       
-@@ -277,6 +279,10 @@
+@@ -288,6 +290,10 @@
                         target='bin/dce-linux',
                         source=['example/dce-linux.cc'])