Hi,

On Sep 30, 2004, at 5:32 PM, Tomasz Kojm wrote:

On Mon, 27 Sep 2004 22:10:24 -0700
Remi Mommsen <[EMAIL PROTECTED]> wrote:

+
+#ifdef __APPLE_CC__
+    /* On Mac OS X use ditto and copy resource fork, too. */
+    char *ditto = (char *) mcalloc(strlen(src) + strlen(dest) + 30,
sizeof(char));
+    sprintf(ditto,"/usr/bin/ditto --rsrc %s %s",src,dest);
+    if( system(ditto) ) {
+      mprintf("");   // dummy statement to work around gcc optimizer
bug
+      return -1;
+    }

Don't forget to free(ditto)! BTW: Is the dummy statement really needed?

Right, stupid mistake. Can you (or whoever will eventually commit the patch) add it, please?


The dummy statement is unfortunately needed. Maybe it will be solved by one of the next gcc versions, but Xtools 1.3 and 1.5 both optimize it such that 'if( system(ditto) )' always evaluates to true, i.e. the copy fails. I guess I should submit a bug report, but haven't had time yet )-;

Cheers,
                Remi


--------------------------------------------------------------------- Failure is not an option. It comes bundled with your Microsoft product. (Ferenc Mantfeld)

*********************************************************************
Remigius K. Mommsen                 e-mail: [EMAIL PROTECTED]
University of California, Irvine       URL:    http://cern.ch/mommsen
c/o SLAC                             voice:        ++1 (650) 926-3595
2575 Sand Hill Road #35                fax:        ++1 (650) 926-3882
Menlo Park, CA 94025, US              home:        ++1 (650) 233-9041
*********************************************************************

_______________________________________________
http://lists.clamav.net/cgi-bin/mailman/listinfo/clamav-devel

Reply via email to