server_common.h 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. /* Gearman server and library
  2. * Copyright (C) 2008 Brian Aker, Eric Day
  3. * All rights reserved.
  4. *
  5. * Use and distribution licensed under the BSD license. See
  6. * the COPYING file in the parent directory for full text.
  7. */
  8. #ifndef __GEARMAN_SERVER_COMMON_H__
  9. #define __GEARMAN_SERVER_COMMON_H__
  10. #define GEARMAN_INTERNAL 1
  11. #include <libgearman/gearman.h>
  12. #ifdef HAVE_ASSERT_H
  13. #include <assert.h>
  14. #endif
  15. #ifdef HAVE_SYS_TYPES_H
  16. #include <sys/types.h>
  17. #endif
  18. #ifdef HAVE_SYS_SOCKET_H
  19. #include <sys/socket.h>
  20. #endif
  21. #ifdef HAVE_NETDB_H
  22. #include <netdb.h>
  23. #endif
  24. #ifdef HAVE_STRING_H
  25. #include <string.h>
  26. #endif
  27. #ifdef HAVE_STDIO_H
  28. #include <stdio.h>
  29. #endif
  30. #ifdef HAVE_ERRNO_H
  31. #include <errno.h>
  32. #endif
  33. #ifdef HAVE_UNISTD_H
  34. #include <unistd.h>
  35. #endif
  36. #ifdef HAVE_SIGNAL_H
  37. #include <signal.h>
  38. #endif
  39. #ifdef TIME_WITH_SYS_TIME
  40. # include <sys/time.h>
  41. # include <time.h>
  42. #else
  43. # ifdef HAVE_SYS_TIME_H
  44. # include <sys/time.h>
  45. # else
  46. # include <time.h>
  47. # endif
  48. #endif
  49. #ifdef HAVE_EVENT_H
  50. #include <event.h>
  51. #endif
  52. #include "connection.h"
  53. #define SERVER_PORT "7003"
  54. #define MAX_MSG 100
  55. #define SUCCESS 0
  56. #define ERROR 1
  57. #endif /* __GEARMAN_SERVER_COMMON_H__ */