Permalink
Browse files

Move to pandora build

Change-Id: I2abaad1ecc38ade465f0a65a772bbb9629c8ae0d
Reviewed-on: http://review.northscale.com/1551
Reviewed-by: Steve Yen <steve.yen@gmail.com>
Tested-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
  • Loading branch information...
1 parent 641c208 commit 6fcace5dc1d657c5fd425a3fe3a3019ef15bb3f7 @trondn trondn committed with steveyen Aug 3, 2010
Showing with 328 additions and 70,663 deletions.
  1. +5 −0 .gitignore
  2. +34 −55 Makefile.am
  3. +1 −1 agent.h
  4. +1 −2 agent_config.c
  5. +1 −2 agent_ping.c
  6. +2 −3 agent_stats.c
  7. +0 −5 assoc.c
  8. +1 −0 cache.h
  9. +93 −0 config_static.h
  10. +60 −338 configure.ac
  11. +1 −2 cproxy.c
  12. +1 −2 cproxy_config.c
  13. +1 −2 cproxy_front.c
  14. +1 −2 cproxy_multiget.c
  15. +1 −2 cproxy_protocol_a.c
  16. +1 −2 cproxy_protocol_a2a.c
  17. +1 −2 cproxy_protocol_a2b.c
  18. +1 −2 cproxy_protocol_b.c
  19. +1 −2 cproxy_protocol_b2b.c
  20. +1 −2 cproxy_stats.c
  21. +1 −0 daemon.c
  22. +0 −15 doc/Makefile.am
  23. +0 −226 doc/protocol-binary-range.xml
  24. +0 −1,467 doc/protocol-binary.xml
  25. +1 −7 items.c
  26. +0 −1 libconflate
  27. +0 −7 libmemcached-0.30/AUTHORS
  28. +0 −32 libmemcached-0.30/COPYING
  29. +0 −287 libmemcached-0.30/ChangeLog
  30. +0 −237 libmemcached-0.30/INSTALL
  31. +0 −36 libmemcached-0.30/Makefile.am
  32. +0 −680 libmemcached-0.30/Makefile.in
  33. +0 −1 libmemcached-0.30/NEWS
  34. +0 −33 libmemcached-0.30/README
  35. +0 −14 libmemcached-0.30/THANKS
  36. +0 −11 libmemcached-0.30/TODO
  37. +0 −7,520 libmemcached-0.30/aclocal.m4
  38. +0 −63 libmemcached-0.30/clients/Makefile.am
  39. +0 −625 libmemcached-0.30/clients/Makefile.in
  40. +0 −30 libmemcached-0.30/clients/client_options.h
  41. +0 −64 libmemcached-0.30/clients/execute.c
  42. +0 −5 libmemcached-0.30/clients/execute.h
  43. +0 −71 libmemcached-0.30/clients/generator.c
  44. +0 −20 libmemcached-0.30/clients/generator.h
  45. +0 −159 libmemcached-0.30/clients/memcat.c
  46. +0 −234 libmemcached-0.30/clients/memcp.c
  47. +0 −152 libmemcached-0.30/clients/memdump.c
  48. +0 −80 libmemcached-0.30/clients/memerror.c
  49. +0 −124 libmemcached-0.30/clients/memflush.c
  50. +0 −141 libmemcached-0.30/clients/memrm.c
  51. +0 −419 libmemcached-0.30/clients/memslap.c
  52. +0 −327 libmemcached-0.30/clients/memstat.c
  53. +0 −112 libmemcached-0.30/clients/utilities.c
  54. +0 −30 libmemcached-0.30/clients/utilities.h
  55. +0 −1,526 libmemcached-0.30/config/config.guess
  56. +0 −1,658 libmemcached-0.30/config/config.sub
  57. +0 −589 libmemcached-0.30/config/depcomp
  58. +0 −519 libmemcached-0.30/config/install-sh
  59. +0 −6,956 libmemcached-0.30/config/ltmain.sh
  60. +0 −367 libmemcached-0.30/config/missing
  61. +0 −24,639 libmemcached-0.30/configure
  62. +0 −167 libmemcached-0.30/configure.ac
  63. +0 −376 libmemcached-0.30/docs/Makefile.am
  64. +0 −790 libmemcached-0.30/docs/Makefile.in
  65. +0 −127 libmemcached-0.30/docs/libmemcached.pod
  66. +0 −115 libmemcached-0.30/docs/libmemcached_examples.pod
  67. +0 −40 libmemcached-0.30/docs/libmemcachedutil.pod
  68. +0 −52 libmemcached-0.30/docs/memcached_analyze.pod
  69. +0 −97 libmemcached-0.30/docs/memcached_auto.pod
  70. +0 −224 libmemcached-0.30/docs/memcached_behavior.pod
  71. +0 −133 libmemcached-0.30/docs/memcached_callback.pod
  72. +0 −61 libmemcached-0.30/docs/memcached_create.pod
  73. +0 −54 libmemcached-0.30/docs/memcached_delete.pod
  74. +0 −53 libmemcached-0.30/docs/memcached_dump.pod
  75. +0 −46 libmemcached-0.30/docs/memcached_flush.pod
  76. +0 −42 libmemcached-0.30/docs/memcached_flush_buffers.pod
  77. +0 −57 libmemcached-0.30/docs/memcached_generate_hash_value.pod
  78. +0 −133 libmemcached-0.30/docs/memcached_get.pod
  79. +0 −77 libmemcached-0.30/docs/memcached_pool.pod
  80. +0 −47 libmemcached-0.30/docs/memcached_quit.pod
  81. +0 −65 libmemcached-0.30/docs/memcached_server_st.pod
  82. +0 −102 libmemcached-0.30/docs/memcached_servers.pod
  83. +0 −187 libmemcached-0.30/docs/memcached_set.pod
  84. +0 −82 libmemcached-0.30/docs/memcached_stats.pod
  85. +0 −46 libmemcached-0.30/docs/memcached_strerror.pod
  86. +0 −41 libmemcached-0.30/docs/memcached_verbosity.pod
  87. +0 −56 libmemcached-0.30/docs/memcached_version.pod
  88. +0 −37 libmemcached-0.30/docs/memcat.pod
  89. +0 −40 libmemcached-0.30/docs/memcp.pod
  90. +0 −31 libmemcached-0.30/docs/memdump.pod
  91. +0 −30 libmemcached-0.30/docs/memerror.pod
  92. +0 −35 libmemcached-0.30/docs/memflush.pod
  93. +0 −34 libmemcached-0.30/docs/memrm.pod
  94. +0 −33 libmemcached-0.30/docs/memslap.pod
  95. +0 −35 libmemcached-0.30/docs/memstat.pod
  96. +0 −96 libmemcached-0.30/libmemcached/Makefile.am
  97. +0 −31 libmemcached-0.30/libmemcached/byteorder.c
  98. +0 −149 libmemcached-0.30/libmemcached/common.h
  99. +0 −87 libmemcached-0.30/libmemcached/crc.c
  100. +0 −68 libmemcached-0.30/libmemcached/hsieh_hash.c
  101. +0 −210 libmemcached-0.30/libmemcached/jenkins_hash.c
  102. +0 −1 libmemcached-0.30/libmemcached/libmemcached.ver
  103. +0 −123 libmemcached-0.30/libmemcached/libmemcached_config.h.in
  104. +0 −24 libmemcached-0.30/libmemcached/libmemcached_probes.d
  105. +0 −78 libmemcached-0.30/libmemcached/libmemcached_probes.h
  106. +0 −354 libmemcached-0.30/libmemcached/md5.c
  107. +0 −144 libmemcached-0.30/libmemcached/memcached.c
  108. +0 −239 libmemcached-0.30/libmemcached/memcached.h
  109. +0 −175 libmemcached-0.30/libmemcached/memcached.hh
  110. +0 −7 libmemcached-0.30/libmemcached/memcached/README.txt
  111. +0 −361 libmemcached-0.30/libmemcached/memcached/protocol_binary.h
  112. +0 −97 libmemcached-0.30/libmemcached/memcached_analyze.c
  113. +0 −199 libmemcached-0.30/libmemcached/memcached_auto.c
  114. +0 −284 libmemcached-0.30/libmemcached/memcached_behavior.c
  115. +0 −171 libmemcached-0.30/libmemcached/memcached_callback.c
  116. +0 −353 libmemcached-0.30/libmemcached/memcached_connect.c
  117. +0 −147 libmemcached-0.30/libmemcached/memcached_constants.h
  118. +0 −130 libmemcached-0.30/libmemcached/memcached_delete.c
  119. +0 −34 libmemcached-0.30/libmemcached/memcached_do.c
  120. +0 −79 libmemcached-0.30/libmemcached/memcached_dump.c
  121. +0 −102 libmemcached-0.30/libmemcached/memcached_fetch.c
  122. +0 −89 libmemcached-0.30/libmemcached/memcached_flush.c
  123. +0 −22 libmemcached-0.30/libmemcached/memcached_flush_buffers.c
  124. +0 −359 libmemcached-0.30/libmemcached/memcached_get.c
  125. +0 −56 libmemcached-0.30/libmemcached/memcached_get.h
  126. +0 −222 libmemcached-0.30/libmemcached/memcached_hash.c
  127. +0 −472 libmemcached-0.30/libmemcached/memcached_hosts.c
  128. +0 −547 libmemcached-0.30/libmemcached/memcached_io.c
  129. +0 −49 libmemcached-0.30/libmemcached/memcached_io.h
  130. +0 −28 libmemcached-0.30/libmemcached/memcached_key.c
  131. +0 −75 libmemcached-0.30/libmemcached/memcached_parse.c
  132. +0 −33 libmemcached-0.30/libmemcached/memcached_pool.h
  133. +0 −76 libmemcached-0.30/libmemcached/memcached_purge.c
  134. +0 −68 libmemcached-0.30/libmemcached/memcached_quit.c
  135. +0 −482 libmemcached-0.30/libmemcached/memcached_response.c
  136. +0 −60 libmemcached-0.30/libmemcached/memcached_result.c
  137. +0 −53 libmemcached-0.30/libmemcached/memcached_result.h
  138. +0 −138 libmemcached-0.30/libmemcached/memcached_server.c
  139. +0 −75 libmemcached-0.30/libmemcached/memcached_server.h
  140. +0 −461 libmemcached-0.30/libmemcached/memcached_stats.c
  141. +0 −473 libmemcached-0.30/libmemcached/memcached_storage.c
  142. +0 −93 libmemcached-0.30/libmemcached/memcached_storage.h
  143. +0 −84 libmemcached-0.30/libmemcached/memcached_strerror.c
  144. +0 −161 libmemcached-0.30/libmemcached/memcached_string.c
  145. +0 −46 libmemcached-0.30/libmemcached/memcached_string.h
  146. +0 −43 libmemcached-0.30/libmemcached/memcached_types.h
  147. +0 −23 libmemcached-0.30/libmemcached/memcached_util.h
  148. +0 −36 libmemcached-0.30/libmemcached/memcached_verbosity.c
  149. +0 −112 libmemcached-0.30/libmemcached/memcached_version.c
  150. +0 −45 libmemcached-0.30/libmemcached/memcached_watchpoint.h
  151. +0 −75 libmemcached-0.30/libmemcached/murmur_hash.c
  152. +0 −11 libmemcached-0.30/libmemcachedutil/Makefile.am
  153. +0 −502 libmemcached-0.30/libmemcachedutil/Makefile.in
  154. +0 −1 libmemcached-0.30/libmemcachedutil/libmemcachedutil.ver
  155. +0 −168 libmemcached-0.30/libmemcachedutil/memcached_pool.c
  156. +0 −31 libmemcached-0.30/m4/64bit.m4
  157. +0 −41 libmemcached-0.30/m4/byteorder.m4
  158. +0 −20 libmemcached-0.30/m4/debug.m4
  159. +0 −37 libmemcached-0.30/m4/dtrace.m4
  160. +0 −94 libmemcached-0.30/m4/extensions.m4
  161. +0 −22 libmemcached-0.30/m4/hsieh.m4
  162. +0 −32 libmemcached-0.30/m4/memcached.m4
  163. +0 −5 libmemcached-0.30/m4/pod2man.m4
  164. +0 −20 libmemcached-0.30/m4/protocol_binary.m4
  165. +0 −55 libmemcached-0.30/m4/setsockopt.m4
  166. +0 −20 libmemcached-0.30/m4/util.m4
  167. +0 −4 libmemcached-0.30/support/Makefile.am
  168. +0 −395 libmemcached-0.30/support/Makefile.in
  169. +0 −105 libmemcached-0.30/support/libmemcached-fc.spec.in
  170. +0 −10 libmemcached-0.30/support/libmemcached.pc.in
  171. +0 −105 libmemcached-0.30/support/libmemcached.spec.in
  172. +0 −5 libmemcached-0.30/support/set_benchmark.sh
  173. +0 −97 libmemcached-0.30/tests/Makefile.am
  174. +0 −643 libmemcached-0.30/tests/Makefile.in
  175. +0 −245 libmemcached-0.30/tests/atomsmasher.c
  176. +0 −4,346 libmemcached-0.30/tests/function.c
  177. +0 −108 libmemcached-0.30/tests/ketama_test_cases.h
  178. +0 −673 libmemcached-0.30/tests/output.res
  179. +0 −46 libmemcached-0.30/tests/output2.res
  180. +0 −139 libmemcached-0.30/tests/plus.cpp
  181. +0 −19 libmemcached-0.30/tests/r/memcat.res
  182. +0 −27 libmemcached-0.30/tests/r/memcp.res
  183. +0 −19 libmemcached-0.30/tests/r/memrm.res
  184. +0 −33 libmemcached-0.30/tests/r/memslap.res
  185. +0 −33 libmemcached-0.30/tests/r/memstat.res
  186. +0 −118 libmemcached-0.30/tests/server.c
  187. +0 −25 libmemcached-0.30/tests/server.h
  188. +0 −16 libmemcached-0.30/tests/start.c
  189. +0 −4 libmemcached-0.30/tests/t/memcat.test
  190. +0 −3 libmemcached-0.30/tests/t/memcp.test
  191. +0 −3 libmemcached-0.30/tests/t/memrm.test
  192. +0 −5 libmemcached-0.30/tests/t/memslap.test
  193. +0 −3 libmemcached-0.30/tests/t/memstat.test
  194. +0 −138 libmemcached-0.30/tests/test.c
  195. +0 −46 libmemcached-0.30/tests/test.h
  196. +0 −76 libmemcached-0.30/tests/udp.c
  197. +28 −10 log.c
  198. +40 −0 m4/pandora_have_libconflate.m4
  199. +42 −0 m4/pandora_have_libhashkit.m4
  200. +1 −2 matcher.c
  201. +0 −6 mcs.c
  202. +0 −9 memcached.c
  203. +1 −4 memcached.h
  204. +0 −295 memcached_dtrace.d
  205. +1 −0 sizes.c
  206. +0 −6 slabs.c
  207. +1 −0 solaris_priv.c
  208. +1 −0 stdin_check.c
  209. +1 −26 testapp.c
  210. +1 −0 util.c
  211. +1 −2 work.c
  212. +0 −1 work.h
View
@@ -67,3 +67,8 @@ moxi_*.tar.gz
stamp-h1
stamp-h2
tags
+m4/libtool.m4
+m4/ltoptions.m4
+m4/ltsugar.m4
+m4/ltversion.m4
+m4/lt~obsolete.m4
View
@@ -1,12 +1,11 @@
AUTOMAKE_OPTIONS = foreign
+ACLOCAL_AMFLAGS = -I m4 --force
bin_PROGRAMS = moxi
-noinst_PROGRAMS = moxi-debug sizes testapp timedrun
-
-## INCLUDES is apparently not previously set, if you set it
-## change this
-INCLUDES = $(CONFLATE_CFLAGS)
-LIBS += $(CONFLATE_LIBS)
+noinst_PROGRAMS =
+if BUILD_TESTAPPS
+noinst_PROGRAMS += sizes testapp timedrun
+endif
BUILT_SOURCES =
@@ -18,7 +17,7 @@ moxi_SOURCES = memcached.c memcached.h \
slabs.c slabs.h \
items.c items.h \
assoc.c assoc.h \
- thread.c daemon.c \
+ thread.c \
stats.c stats.h \
util.c util.h \
trace.h cache.h \
@@ -41,18 +40,22 @@ moxi_SOURCES = memcached.c memcached.h \
log.c log.h \
cJSON.c cJSON.h
+if BUILD_DAEMON
+moxi_SOURCES += daemon.c
+endif
+
timedrun_SOURCES = timedrun.c
TESTS = check_util check_moxi check_work
-if BUILD_WITH_CONFLATE
+if HAVE_LIBCONFLATE
TESTS += check_moxi_agent
endif
check_PROGRAMS = check_util \
check_moxi \
check_work
-if BUILD_WITH_CONFLATE
+if HAVE_LIBCONFLATE
check_PROGRAMS += check_moxi_agent
endif
@@ -68,60 +71,36 @@ moxi_SOURCES += cache.c
testapp_SOURCES += cache.c
endif
-if BUILD_WITH_CONFLATE
+if HAVE_LIBCONFLATE
moxi_SOURCES += agent.h agent_config.c agent_ping.c agent_stats.c
endif
if BUILD_SOLARIS_PRIVS
moxi_SOURCES += solaris_priv.c
endif
-moxi_debug_SOURCES = $(moxi_SOURCES)
-moxi_debug_CPPFLAGS = -DCONFLATE_DB_PATH=\"$(CONFLATE_DB_PATH)\"
-moxi_CPPFLAGS = -DNDEBUG $(moxi_debug_CPPFLAGS)
-moxi_debug_LDADD = @PROFILER_LDFLAGS@
-moxi_debug_CFLAGS = @PROFILER_FLAGS@
-
+moxi_CPPFLAGS = -DNDEBUG -DCONFLATE_DB_PATH=\"$(CONFLATE_DB_PATH)\"
moxi_LDADD =
+moxi_LDFLAGS = $(LTLIBEVENT) $(LTLIBCONFLATE) $(LTLIBHASHKIT)
moxi_DEPENDENCIES =
-moxi_debug_DEPENDENCIES =
-
-CLEANFILES=
-
-if BUILD_DTRACE
-BUILT_SOURCES += memcached_dtrace.h
-CLEANFILES += memcached_dtrace.h
-endif
-if DTRACE_INSTRUMENT_OBJ
-moxi_LDADD += memcached_dtrace.o
-moxi_DEPENDENCIES += memcached_dtrace.o
-moxi_debug_LDADD += memcached_debug_dtrace.o
-moxi_debug_DEPENDENCIES += memcached_debug_dtrace.o
-CLEANFILES += memcached_dtrace.o memcached_debug_dtrace.o
+if MOXI_USE_VBUCKET
+moxi_LDFLAGS += $(LTLIBVBUCKET)
+else
+moxi_LDFLAGS += $(LTLIBMEMCACHED)
endif
-memcached_dtrace.h: memcached_dtrace.d
- ${DTRACE} -h -s memcached_dtrace.d
- sed -e 's,void \*,const void \*,g' memcached_dtrace.h | \
- sed -e 's,char \*,const char \*,g' | tr '\t' ' ' > mmc_dtrace.tmp
- mv mmc_dtrace.tmp memcached_dtrace.h
-
-memcached_dtrace.o: $(moxi_OBJECTS)
- $(DTRACE) $(DTRACEFLAGS) -G -o memcached_dtrace.o -s ${srcdir}/memcached_dtrace.d $(moxi_OBJECTS)
-
-memcached_debug_dtrace.o: $(moxi_debug_OBJECTS)
- $(DTRACE) $(DTRACEFLAGS) -G -o memcached_debug_dtrace.o -s ${srcdir}/memcached_dtrace.d $(moxi_debug_OBJECTS)
+CLEANFILES=
SUBDIRS = doc $(MAYBE_LIBCONFLATE)
DIST_SUBDIRS = doc $(MAYBE_LIBCONFLATE)
DIST_DIRS = scripts
-EXTRA_DIST = doc scripts TODO t memcached_dtrace.d m4/version.m4 protocol_binary.h patches debian
+EXTRA_DIST = doc scripts TODO t m4/version.m4 protocol_binary.h patches debian
MOSTLYCLEANFILES = *.gcov *.gcno *.gcda *.tcov
-memcached-debug: moxi-debug
- cp moxi-debug memcached-debug
+memcached-debug: moxi
+ cp moxi memcached-debug
test: memcached-debug sizes testapp
$(srcdir)/sizes
@@ -164,22 +143,22 @@ dist-hook:
install-data-hook:
$(mkdir_p) $(DESTDIR)$(CONFLATE_DB_PATH)
-check_work_SOURCES = check_work.c $(moxi_debug_SOURCES)
-check_work_CFLAGS = @CHECK_CFLAGS@ $(moxi_debug_CPPFLAGS) -DMAIN_CHECK
-check_work_LDADD = @CHECK_LIBS@ $(moxi_debug_LDADD)
+check_work_SOURCES = check_work.c $(moxi_SOURCES)
+check_work_CFLAGS = @CHECK_CFLAGS@ $(moxi_CPPFLAGS) -DMAIN_CHECK
+check_work_LDADD = @CHECK_LIBS@ $(moxi_LDADD)
-check_moxi_SOURCES = check_moxi.c $(moxi_debug_SOURCES)
-check_moxi_CFLAGS = @CHECK_CFLAGS@ $(moxi_debug_CPPFLAGS) -DMAIN_CHECK
-check_moxi_LDADD = @CHECK_LIBS@ $(moxi_debug_LDADD)
+check_moxi_SOURCES = check_moxi.c $(moxi_SOURCES)
+check_moxi_CFLAGS = @CHECK_CFLAGS@ $(moxi_CPPFLAGS) -DMAIN_CHECK
+check_moxi_LDADD = @CHECK_LIBS@ $(moxi_LDADD)
-if BUILD_WITH_CONFLATE
-check_moxi_agent_SOURCES = check_moxi_agent.c redirects.c $(moxi_debug_SOURCES)
-check_moxi_agent_CFLAGS = @CHECK_CFLAGS@ $(moxi_debug_CPPFLAGS) -DMAIN_CHECK -DREDIRECTS_FOR_MOCKS
-check_moxi_agent_LDADD = @CHECK_LIBS@ $(moxi_debug_LDADD)
+if HAVE_LIBCONFLATE
+check_moxi_agent_SOURCES = check_moxi_agent.c redirects.c $(moxi_SOURCES)
+check_moxi_agent_CFLAGS = @CHECK_CFLAGS@ $(moxi_CPPFLAGS) -DMAIN_CHECK -DREDIRECTS_FOR_MOCKS
+check_moxi_agent_LDADD = @CHECK_LIBS@ $(moxi_LDADD)
endif
check-syntax:
- $(COMPILE) $(moxi_debug_CPPFLAGS) -o /dev/null -S ${CHK_SOURCES}
+ $(COMPILE) $(moxi_CPPFLAGS) -o /dev/null -S ${CHK_SOURCES}
fc_rpm_inner:
-rm $(rpmtop)/SRPMS/moxi-$(VERSION)*.rpm
View
@@ -3,7 +3,7 @@
#ifndef AGENT_H
#define AGENT_H
-#include <conflate.h>
+#include <libconflate/conflate.h>
#ifdef REDIRECTS_FOR_MOCKS
#include "redirects.h"
#endif
View
@@ -1,10 +1,9 @@
/* -*- Mode: C; tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*- */
-
+#include "config.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <errno.h>
-#include <sysexits.h>
#include <pthread.h>
#include <assert.h>
#include "memcached.h"
View
@@ -1,10 +1,9 @@
/* -*- Mode: C; tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*- */
-
+#include "config.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <errno.h>
-#include <sysexits.h>
#include <pthread.h>
#include <assert.h>
#include "memcached.h"
View
@@ -1,16 +1,15 @@
/* -*- Mode: C; tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*- */
-
+#include "config.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <errno.h>
-#include <sysexits.h>
#include <pthread.h>
#include <assert.h>
#include <math.h>
+#include <libconflate/conflate.h>
#include "memcached.h"
-#include "conflate.h"
#include "cproxy.h"
#include "work.h"
#include "agent.h"
View
@@ -13,11 +13,6 @@
#include "memcached.h"
#include <sys/stat.h>
-#include <sys/socket.h>
-#include <sys/signal.h>
-#include <sys/resource.h>
-#include <fcntl.h>
-#include <netinet/in.h>
#include <errno.h>
#include <stdlib.h>
#include <stdio.h>
View
@@ -1,6 +1,7 @@
/* -*- Mode: C; tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*- */
#ifndef CACHE_H
#define CACHE_H
+#include "config.h"
#include <pthread.h>
#ifdef HAVE_UMEM_H
View
@@ -0,0 +1,93 @@
+/* -*- Mode: C++; tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*- */
+/*
+ * Copyright 2010 NorthScale, Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#ifndef CONFIG_STATIC_H
+#define CONFIG_STATIC_H 1
+
+// The intention of this file is to avoid cluttering the code with #ifdefs
+
+#ifdef WIN32
+// HAVE_CONFIG_H is causing problems with pthreads.h on in32
+#undef HAVE_CONFIG_H
+
+#define _WIN32_WINNT 0x0501
+#include <winsock2.h>
+#include <ws2tcpip.h>
+
+struct iovec {
+ size_t iov_len;
+ void* iov_base;
+};
+
+#include "win32/win32.h"
+
+#define EX_USAGE EXIT_FAILURE
+#define EX_OSERR EXIT_FAILURE
+
+#else
+#define initialize_sockets()
+#endif
+
+#ifdef HAVE_SYS_SOCKET_H
+#include <sys/socket.h>
+#endif
+
+#ifdef HAVE_NETDB_H
+#include <netdb.h>
+#endif
+
+#ifdef HAVE_ARPA_INET_H
+#include <arpa/inet.h>
+#endif
+
+#ifdef HAVE_PWD_H
+#include <pwd.h>
+#endif
+
+#ifdef HAVE_SYS_MMAN_H
+#include <sys/mman.h>
+#endif
+
+#ifdef HAVE_NETINET_TCP_H
+#include <netinet/tcp.h>
+#endif
+
+#ifdef HAVE_SYSEXITS_H
+#include <sysexits.h>
+#endif
+
+#ifdef HAVE_SYS_UIO_H
+#include <sys/uio.h>
+#endif
+
+#ifdef HAVE_SYS_UN_H
+#include <sys/un.h>
+#endif
+
+#ifdef HAVE_SYS_RESOURCE_H
+#include <sys/resource.h>
+#endif
+
+#ifdef HAVE_NETINET_IN_H
+#include <netinet/in.h>
+#endif
+
+#ifdef HAVE_SYSLOG_H
+#include <syslog.h>
+#endif
+
+
+#endif
Oops, something went wrong.

0 comments on commit 6fcace5

Please sign in to comment.