aboutsummaryrefslogtreecommitdiff
path: root/uname.c
diff options
context:
space:
mode:
authorHans-Christoph Steiner <eighthave@users.sourceforge.net>2010-09-09 02:01:09 +0000
committerHans-Christoph Steiner <eighthave@users.sourceforge.net>2010-09-09 02:01:09 +0000
commitca39b0ed9bd12cc87a2634b208a522fdcef44408 (patch)
treee3435e06c3f101b873904c17b469e7990ababddc /uname.c
parent8b286dbb638f4830f4a224f1c9bd2f2dfea3971a (diff)
added TODO about how to do this on Windows
svn path=/trunk/externals/hcs/; revision=14010
Diffstat (limited to 'uname.c')
-rw-r--r--uname.c17
1 files changed, 14 insertions, 3 deletions
diff --git a/uname.c b/uname.c
index b6d998f..8fd2bfa 100644
--- a/uname.c
+++ b/uname.c
@@ -27,11 +27,17 @@
#ifndef _WIN32
#include <m_pd.h>
-
-#include <sys/utsname.h>
#include <stdlib.h>
-static char *version = "1.3";
+/* sadly, there is no uname in Windows, Cygwin has it tho */
+#ifdef _WIN32
+# include <windows.h>
+# include <winsock2.h>
+#else
+# include <sys/utsname.h>
+#endif
+
+static char *version = "1.4";
#define DEBUG(x)
//#define DEBUG(x) x
@@ -53,6 +59,10 @@ static void uname_output(t_uname* x)
{
DEBUG(post("uname_output"););
+#ifdef _WIN32
+// TODO fake uname for Windows
+// http://msdn.microsoft.com/en-us/library/ms724429(VS.85).aspx
+#else
struct utsname utsname_struct;
t_atom uname_data[5];
@@ -69,6 +79,7 @@ static void uname_output(t_uname* x)
4,
uname_data + 1);
}
+#endif /* _WIN32 */
}