Here it is defined in a config-win32.h header file (within curl):
#if (defined(__WATCOMC__) && (__WATCOMC__ >= 1240)) || defined(__POCC__)
#elif defined(_WIN64)
#define ssize_t __int64
#else
#define ssize_t int
#endif
I think this define causes the problem - it is included earlier, and sets it to be an int. Then, in the types.h, it defines it again.