pull up r19123 from trunk
authorTom Yu <tlyu@mit.edu>
Fri, 30 Mar 2007 00:35:56 +0000 (00:35 +0000)
committerTom Yu <tlyu@mit.edu>
Fri, 30 Mar 2007 00:35:56 +0000 (00:35 +0000)
 r19123@cathode-dark-space:  jaltman | 2007-01-30 06:17:35 -0500
 ticket: new
 subject: Microsoft Windows Visual Studio does not define ssize_t
 tags: pullup

  Microsoft defines size_t but not ssize_t.
  Provide a definition in win-mac.h that follows the style
  used by Microsoft providing a preprocessor macro
  SSIZE_T_DEFINED which can be used for conditional
  definition and testing in case Microsoft decides to add
  it later.

ticket: 5419

git-svn-id: svn://anonsvn.mit.edu/krb5/branches/krb5-1-6@19326 dc483132-0cff-0310-8789-dd5450dbe970

src/include/win-mac.h

index 4249f0db55d1a07091d3335f424c4687a68f85ff..5c08fab3914034cd09a804f9f0443979bb899903 100644 (file)
@@ -82,6 +82,14 @@ typedef int              int32_t;
 typedef unsigned __int64 uint64_t;
 typedef __int64          int64_t;
 #endif
+#ifndef SSIZE_T_DEFINED
+#ifdef _WIN64
+typedef __int64                 ssize_t;
+#else
+typedef _W64 int        ssize_t;
+#endif
+#define SSIZE_T_DEFINED
+#endif
 #endif /* KRB5_SYSTYPES__ */
 
 #define MAXHOSTNAMELEN  512