Skip to content
This repository has been archived by the owner on Jun 30, 2021. It is now read-only.

Commit

Permalink
Install into <installdir>/include/evhtp/*.h
Browse files Browse the repository at this point in the history
  • Loading branch information
Mark Ellzey committed Mar 20, 2015
1 parent 718de1e commit 7065156
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 58 deletions.
10 changes: 5 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -310,19 +310,19 @@ if(NOT INCLUDE_INSTALL_DIR)
endif()

install (TARGETS evhtp DESTINATION ${LIB_INSTALL_DIR})
install (FILES evhtp.h DESTINATION ${INCLUDE_INSTALL_DIR})
install (FILES htparse.h DESTINATION ${INCLUDE_INSTALL_DIR})
install (FILES ${CMAKE_CURRENT_BINARY_DIR}/evhtp-config.h DESTINATION ${INCLUDE_INSTALL_DIR})
install (FILES evhtp.h DESTINATION ${INCLUDE_INSTALL_DIR}/evhtp)
install (FILES htparse.h DESTINATION ${INCLUDE_INSTALL_DIR}/evhtp)
install (FILES ${CMAKE_CURRENT_BINARY_DIR}/evhtp-config.h DESTINATION ${INCLUDE_INSTALL_DIR}/evhtp)

if (NOT EVHTP_DISABLE_EVTHR)
install (FILES evthr.h DESTINATION ${INCLUDE_INSTALL_DIR})
install (FILES evthr.h DESTINATION ${INCLUDE_INSTALL_DIR}/evhtp)
endif()

# oniguruma/onigposix.h

if (NOT EVHTP_DISABLE_REGEX)
if (NOT HAS_SYS_ONIG)
install (FILES oniguruma/onigposix.h DESTINATION ${INCLUDE_INSTALL_DIR})
install (FILES oniguruma/onigposix.h DESTINATION ${INCLUDE_INSTALL_DIR}/evhtp)
endif()
endif()

Expand Down
53 changes: 1 addition & 52 deletions evhtp.c
Original file line number Diff line number Diff line change
Expand Up @@ -343,6 +343,7 @@ _evhtp_quick_hash(const char * str) {
*
* @return 1 if HTTP/1.1, else 0
*/

#define _evhtp_is_http_10(_major, _minor) \
(_major >= 1 && _minor <= 0)

Expand Down Expand Up @@ -622,58 +623,7 @@ _evhtp_glob_match(const char * pattern, size_t pat_len, const char * string, siz
str_len = strlen(string);
}

/* XXX still in testing */
return _evhtp_glob_match2(pattern, pat_len, string, str_len);

#if 0
while (pat_len) {
if (pattern[0] == '*') {
while (pattern[1] == '*') {
pattern++;
pat_len--;
}

if (pat_len == 1) {
return 1;
}

while (str_len) {
if (_evhtp_glob_match(pattern + 1, pat_len, string, str_len)) {
return 1;
}

string++;
str_len--;
}

return 0;
} else {
if (pattern[0] != string[0]) {
return 0;
}

string++;
str_len--;
}

pattern++;
pat_len--;

if (str_len == 0) {
while (*pattern == '*') {
pattern++;
pat_len--;
}
break;
}
}

if (pat_len == 0 && str_len == 0) {
return 1;
}

return 0;
#endif
} /* _evhtp_glob_match */

static evhtp_callback_t *
Expand Down Expand Up @@ -2072,7 +2022,6 @@ _evhtp_connection_new(evhtp_t * htp, evutil_socket_t sock, evhtp_type type) {
ptype = htp_type_request;
break;
default:

return NULL;
}

Expand Down
2 changes: 1 addition & 1 deletion evhtp.pc.in
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
prefix=@CMAKE_INSTALL_PREFIX@
libdir=@LIB_INSTALL_DIR@
includedir=@INCLUDE_INSTALL_DIR@
includedir=@INCLUDE_INSTALL_DIR@/evhtp

Name: libevhtp
Description: A more flexible replacement for libevent's httpd API
Expand Down

0 comments on commit 7065156

Please sign in to comment.