00001
00002
00003
00004
00005
00006
00007
00008
00014 #ifndef __GEARMAN_COMMON_H__
00015 #define __GEARMAN_COMMON_H__
00016
00017 #include "config.h"
00018
00019 #include "gearman.h"
00020
00021 #ifdef HAVE_ASSERT_H
00022 #include <assert.h>
00023 #endif
00024 #ifdef HAVE_ERRNO_H
00025 #include <errno.h>
00026 #endif
00027 #ifdef HAVE_FCNTL_H
00028 #include <fcntl.h>
00029 #endif
00030 #ifdef HAVE_GETOPT_H
00031 #include <getopt.h>
00032 #endif
00033 #ifdef HAVE_PTHREAD
00034 #include <pthread.h>
00035 #endif
00036 #ifdef HAVE_STDARG_H
00037 #include <stdarg.h>
00038 #endif
00039 #ifdef HAVE_STDDEF_H
00040 #include <stddef.h>
00041 #endif
00042 #ifdef HAVE_STDIO_H
00043 #include <stdio.h>
00044 #endif
00045 #ifdef HAVE_STDLIB_H
00046 #include <stdlib.h>
00047 #endif
00048 #ifdef HAVE_STRING_H
00049 #include <string.h>
00050 #endif
00051 #ifdef HAVE_STRINGS_H
00052 #include <strings.h>
00053 #endif
00054 #ifdef HAVE_SYS_UTSNAME_H
00055 #include <sys/utsname.h>
00056 #endif
00057 #ifdef HAVE_NETINET_TCP_H
00058 #include <netinet/tcp.h>
00059 #endif
00060 #ifdef HAVE_UNISTD_H
00061 #include <unistd.h>
00062 #endif
00063 #ifdef HAVE_UUID_UUID_H
00064 #include <uuid/uuid.h>
00065 #endif
00066
00067 #ifdef TIME_WITH_SYS_TIME
00068 # include <sys/time.h>
00069 # include <time.h>
00070 #else
00071 # ifdef HAVE_SYS_TIME_H
00072 # include <sys/time.h>
00073 # else
00074 # include <time.h>
00075 # endif
00076 #endif
00077
00078 #ifdef __cplusplus
00079 extern "C" {
00080 #endif
00081
00091 GEARMAN_LOCAL
00092 void gearman_error_set(gearman_st *gearman, const char *function,
00093 const char *format, ...);
00094
00099 GEARMAN_LOCAL
00100 gearman_return_t gearman_parse_servers(const char *servers,
00101 gearman_parse_server_fn *callback,
00102 const void *context);
00103
00104 #ifdef __cplusplus
00105 }
00106 #endif
00107
00108 #endif