summaryrefslogtreecommitdiff
path: root/lib-src/ntlib.c
diff options
context:
space:
mode:
authorEli Zaretskii <eliz@gnu.org>2013-03-30 20:00:51 +0300
committerEli Zaretskii <eliz@gnu.org>2013-03-30 20:00:51 +0300
commit7c4026b6ad03974a55a175af17c8e76c61931b69 (patch)
treeeac656e59e5aa55044323a4f7fbea7377fb83d0a /lib-src/ntlib.c
parentfff1aa4e84d0568c0295711f58fa18028d100744 (diff)
downloademacs-7c4026b6ad03974a55a175af17c8e76c61931b69.tar.gz
Finished with lib-src compilation, except emacsclientw and emacsclient.res.
Next -- compilation in nt/, and then problems in src/.
Diffstat (limited to 'lib-src/ntlib.c')
-rw-r--r--lib-src/ntlib.c26
1 files changed, 23 insertions, 3 deletions
diff --git a/lib-src/ntlib.c b/lib-src/ntlib.c
index 849abc2ede5..9dbfda90e00 100644
--- a/lib-src/ntlib.c
+++ b/lib-src/ntlib.c
@@ -20,6 +20,20 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
+#ifdef __MINGW32__
+/* A kludge to avoid including header files in lib/. They cannot be
+ configured-out, and their stuff interferes with what we have
+ defined in this header and in other headers in nt/inc. Yuck! */
+#define __need_system_fcntl_h
+#define _GL_FCNTL_H
+#define _GL_JUST_INCLUDE_SYSTEM_INTTYPES_H
+#define _GL_ALREADY_INCLUDING_SIGNAL_H
+#define _GL_ALREADY_INCLUDING_STDIO_H
+#define __need_system_stdlib_h
+#define _GL_TIME_H
+#define __need_system_sys_stat_h
+#endif
+
#include <windows.h>
#include <stdlib.h>
#include <stdio.h>
@@ -49,10 +63,11 @@ struct timezone
/* Emulate sleep...we could have done this with a define, but that
would necessitate including windows.h in the files that used it.
This is much easier. */
-void
-sleep (unsigned long seconds)
+unsigned
+sleep (unsigned seconds)
{
Sleep (seconds * 1000);
+ return 0;
}
/* Get the current working directory. */
@@ -138,6 +153,12 @@ getuid (void)
}
unsigned
+geteuid (void)
+{
+ return getuid ();
+}
+
+unsigned
getgid (void)
{
return 0;
@@ -415,4 +436,3 @@ lstat (const char * path, struct stat * buf)
{
return stat (path, buf);
}
-