#define read _read
#define close _close
#define O_RDONLY _O_RDONLY
-
-typedef short ino_t;
#endif /* __MINGW32__ */
#ifdef __MINGW32__
extern int inet_pton (int, const char *, void *);
extern int inet_aton (const char *cp, struct in_addr *addr);
+/*
+ * With MSVC, for C, __inline is used to make a function an inline.
+ */
+#ifdef _MSC_VER
+#define inline __inline
+#endif
+
#ifndef INET6_ADDRSTRLEN
#define INET6_ADDRSTRLEN 46
#endif
* Note: this also requires that padding be put into the structure,
* at least for compilers where it's implemented as __attribute__((packed)).
*/
+#if defined(_MSC_VER) && defined(UNALIGNED)
+/* MSVC may have its own macro defined with the same name and purpose. */
+#else
#define UNALIGNED __attribute__((packed))
+#endif
#if defined(WIN32) || defined(MSDOS)
#define FOPEN_READ_TXT "rt"