On Dec 20, 2005, at 6:38 AM, Nathan Ingersoll wrote:

Have you verified this works on MacOS 10.3? Last I checked it insists that input is on stdin.


You're right. It seems that 10.3's behavior was incorrect; it ignored the second non-option argument.

So far the only way that seems to work on both 10.3 and 10.4 is to pipe input on stdin and redirect output to the file. Something like:

cat %s | cpp -I%s %s > %s

I have not tested this on non MacOS systems yet.



I tested it with the 10.4 and 10.3 cpp wrappers, Sun's cpp, and GNU's cpp, and they all worked fine.

Revised patch:

Index: edje_cc_parse.c
===================================================================
RCS file: /root/e17/libs/edje/src/bin/edje_cc_parse.c,v
retrieving revision 1.1.1.1
diff -r1.1.1.1 edje_cc_parse.c
656,666c656,662
<    snprintf(buf, sizeof(buf), "cat %s | cpp -I%s %s -E -o %s",
<             file_in, inc, def, tmpn);
<    ret = system(buf);
<    if (ret < 0)
<      {
<         snprintf(buf, sizeof(buf), "gcc -I%s %s -E -o %s %s",
<                  inc, def, tmpn, file_in);
<         ret = system(buf);
<      }
<    if (ret >= 0) file_in = tmpn;
<    free(def);
---
>
>     snprintf(buf, sizeof(buf), "cat %s | cpp -I%s %s > %s",
>          file_in, inc, def, tmpn);
>     ret = system(buf);
>     if (ret == EXIT_SUCCESS)
>         file_in = tmpn;
>     free(def);
667a664
>



-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to