Skip to content
This repository has been archived by the owner on Sep 26, 2020. It is now read-only.

Commit

Permalink
Define ssize_t compile time
Browse files Browse the repository at this point in the history
  • Loading branch information
ruslo committed Aug 17, 2017
1 parent 732cc04 commit 6d6be7e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
10 changes: 10 additions & 0 deletions include/curl/curlbuild.h.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,16 @@ typedef CURL_TYPEOF_CURL_SOCKLEN_T curl_socklen_t;
# define CURL_SUFFIX_CURL_OFF_TU LU
#endif

#if !HAVE_SIZEOF_SSIZE_T
# if INTSIZEOF_LONG == INTSIZEOF_SIZE
typedef long ssize_t;
# elif INTSIZEOF_SIZE == 8
typedef int64_t ssize_t;
# else
# error "Can't set ssize_t type"
# endif
#endif

/* Data type definition of curl_off_t. */
typedef CURL_TYPEOF_CURL_OFF_T curl_off_t;

Expand Down
6 changes: 0 additions & 6 deletions lib/curl_config.h.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -967,9 +967,3 @@
#ifndef __cplusplus
#undef inline
#endif

/* Define to `unsigned int' if <sys/types.h> does not define. */
#cmakedefine size_t ${size_t}

/* the signed version of size_t */
#cmakedefine ssize_t ${ssize_t}

0 comments on commit 6d6be7e

Please sign in to comment.