]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Merge branch 'bug8746_v2_squashed'
authorNick Mathewson <nickm@torproject.org>
Sat, 14 Jun 2014 15:46:38 +0000 (11:46 -0400)
committerNick Mathewson <nickm@torproject.org>
Sat, 14 Jun 2014 15:46:38 +0000 (11:46 -0400)
Conflicts:
src/common/include.am

1  2 
configure.ac
src/common/compat.c
src/common/compat.h
src/common/include.am
src/common/util.c
src/or/main.c
src/or/or.h
src/test/test_util.c

diff --cc configure.ac
Simple merge
index 111070cc10740da325942ce9663223fae916f830,1c460b6ae256506d6682465cca7f7eb771de4c4b..e25ecc462d713975efcc1fc1f9d5888520a4d1fe
@@@ -3553,6 -3453,26 +3559,26 @@@ get_total_system_memory(size_t *mem_out
  
    *mem_out = mem_cached = (size_t) m;
  
 -  return -1;
 +  return 0;
  }
  
+ #ifdef TOR_UNIT_TESTS
+ /** Delay for <b>msec</b> milliseconds.  Only used in tests. */
+ void
+ tor_sleep_msec(int msec)
+ {
+ #ifdef _WIN32
+   Sleep(msec);
+ #elif defined(HAVE_USLEEP)
+   sleep(msec / 1000);
+   /* Some usleep()s hate sleeping more than 1 sec */
+   usleep((msec % 1000) * 1000);
+ #elif defined(HAVE_SYS_SELECT_H)
+   struct timeval tv = { msec / 1000, (msec % 1000) * 1000};
+   select(0, NULL, NULL, NULL, &tv);
+ #else
+   sleep(CEIL_DIV(msec, 1000));
+ #endif
+ }
+ #endif
Simple merge
index 61a90cd35526f96c4c275f08384d5d77b7f44ecd,c9dcedd52dea76bc7321033f0f1dc7ed3535844f..68e0110c2624d2a9a13f937d9b4051659bcef950
@@@ -64,13 -56,13 +64,13 @@@ LIBOR_A_SOURCES = 
    src/common/di_ops.c                                 \
    src/common/log.c                                    \
    src/common/memarea.c                                        \
-   src/common/procmon.c                                        \
 -  src/common/mempool.c                                        \
    src/common/util.c                                   \
    src/common/util_codedigest.c                                \
+   src/common/util_process.c                           \
    src/common/sandbox.c                                        \
    src/ext/csiphash.c                                  \
 -  $(libor_extra_source)
 +  $(libor_extra_source)                                       \
 +  $(libor_mempool_source)
  
  LIBOR_CRYPTO_A_SOURCES = \
    src/common/aes.c            \
@@@ -119,7 -114,7 +121,8 @@@ COMMONHEADERS = 
    src/common/torlog.h                         \
    src/common/tortls.h                         \
    src/common/util.h                           \
 -  src/common/util_process.h
++  src/common/util_process.h                   \
 +  $(libor_mempool_header)
  
  noinst_HEADERS+= $(COMMONHEADERS)
  
Simple merge
diff --cc src/or/main.c
Simple merge
diff --cc src/or/or.h
Simple merge
index c7fa14118885f99359f035b5511b8082cabf8e52,656b77b1a982c43f607be539057e7534d3951db0..151ec691270f105709eaaa29740a4a27e16f4418
  #include "config.h"
  #include "control.h"
  #include "test.h"
 +#ifdef ENABLE_MEMPOOLS
  #include "mempool.h"
 +#endif /* ENABLE_MEMPOOLS */
  #include "memarea.h"
+ #include "util_process.h"
  
  #ifdef _WIN32
  #include <tchar.h>