Enlightenment CVS committal
Author : tsauerbeck
Project : e17
Module : libs/edje
Dir : e17/libs/edje/src/bin
Modified Files:
edje_cc.c edje_cc.h edje_cc_parse.c edje_main.c
Log Message:
mingw portability, step 1
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/edje/src/bin/edje_cc.c,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -3 -r1.20 -r1.21
--- edje_cc.c 19 Oct 2004 16:50:09 -0000 1.20
+++ edje_cc.c 20 Oct 2004 16:48:58 -0000 1.21
@@ -136,7 +136,11 @@
}
/* check whether file_in exists */
+#ifdef HAVE_REALPATH
if (!realpath(file_in, rpath) || stat(rpath, &st) || !S_ISREG(st.st_mode))
+#else
+ if (stat(file_in, &st) || !S_ISREG(st.st_mode))
+#endif
{
fprintf(stderr, "%s: Error: file not found: %s.\n", progname, file_in);
main_help();
@@ -164,7 +168,11 @@
exit(-1);
}
+#ifdef HAVE_REALPATH
if (realpath(file_out, rpath2) && !strcmp (rpath, rpath2))
+#else
+ if (!strcmp (file_in, file_out))
+#endif
{
fprintf(stderr, "%s: Error: input file equals output file.\n", progname);
main_help();
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/edje/src/bin/edje_cc.h,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -3 -r1.20 -r1.21
--- edje_cc.h 19 Oct 2004 16:37:20 -0000 1.20
+++ edje_cc.h 20 Oct 2004 16:48:58 -0000 1.21
@@ -12,7 +12,6 @@
#include <unistd.h>
#include <fcntl.h>
#include <errno.h>
-#include <sys/mman.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <stdarg.h>
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/edje/src/bin/edje_cc_parse.c,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -3 -r1.25 -r1.26
--- edje_cc_parse.c 19 Oct 2004 17:39:35 -0000 1.25
+++ edje_cc_parse.c 20 Oct 2004 16:48:58 -0000 1.26
@@ -571,18 +571,16 @@
size = lseek(fd, 0, SEEK_END);
lseek(fd, 0, SEEK_SET);
- data = mmap(NULL, size, PROT_READ, MAP_PRIVATE, fd, 0);
- if (data)
- {
+ data = malloc(size);
+ if (data && read(fd, data, size) == size)
parse(data, size);
- munmap(data, size);
- }
else
{
- fprintf(stderr, "%s: Error. cannot mmap file \"%s\" for input. %s\n",
+ fprintf(stderr, "%s: Error. cannot read file \"%s\". %s\n",
progname, file_in, strerror(errno));
exit(-1);
}
+ free(data);
close(fd);
}
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/edje/src/bin/edje_main.c,v
retrieving revision 1.51
retrieving revision 1.52
diff -u -3 -r1.51 -r1.52
--- edje_main.c 19 Oct 2004 16:28:29 -0000 1.51
+++ edje_main.c 20 Oct 2004 16:48:58 -0000 1.52
@@ -1,5 +1,6 @@
#include "edje_main.h"
+#ifndef WIN32
typedef struct _Demo_Edje Demo_Edje;
struct _Demo_Edje
@@ -863,4 +864,11 @@
return 0;
}
+#else
+int main ()
+{
+ fprintf(stderr, "no workie on win32 yet\n");
+ return 0;
+}
+#endif
-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
_______________________________________________
enlightenment-cvs mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs