Issue #9425: Create private _Py_stat() function

Use stat() or _wstat() depending on the OS.
diff --git a/Include/Python.h b/Include/Python.h
index d5ac13e..eb5ea28 100644
--- a/Include/Python.h
+++ b/Include/Python.h
@@ -135,6 +135,11 @@
 PyAPI_FUNC(char*) _Py_wchar2char(const wchar_t *text);
 PyAPI_FUNC(FILE *) _Py_wfopen(const wchar_t *path, const wchar_t *mode);
 
+/* _Py_stat lives in import.c */
+#ifdef HAVE_STAT
+int _Py_stat(PyObject *unicode, struct stat *statbuf);
+#endif
+
 #ifdef __cplusplus
 }
 #endif