]> arthur.barton.de Git - bup.git/commitdiff
_helpers.c: don'g unpythonize_argv() on win32.
authorAvery Pennarun <apenwarr@gmail.com>
Wed, 16 Feb 2011 03:09:29 +0000 (19:09 -0800)
committerAvery Pennarun <apenwarr@gmail.com>
Wed, 16 Feb 2011 03:09:29 +0000 (19:09 -0800)
Py_GetArgcArgv() doesn't exist on win32 platforms.  Which isn't so bad,
since neither does the 'ps' command, really.

Reported by Aneurin Price.

Signed-off-by: Avery Pennarun <apenwarr@gmail.com>
lib/bup/_helpers.c

index 594ff0f9420d8a5790e43d8a3c30a6f8a2eec933..b8390a63f095a64ea05c6b7341a5b82f75794977 100644 (file)
 
 static int istty = 0;
 
+#ifdef __WIN32__
+
+// There's no 'ps' on win32 anyway, and Py_GetArgcArgv() isn't available.
+static void unpythonize_argv(void) { }
+
+#else // not __WIN32__
+
 // For some reason this isn't declared in Python.h
 extern void Py_GetArgcArgv(int *argc, char ***argv);
 
@@ -50,6 +57,8 @@ static void unpythonize_argv(void)
     }
 }
 
+#endif // not __WIN32__
+
 
 static PyObject *selftest(PyObject *self, PyObject *args)
 {