[commit] r2237 - The getFile macro needs to cast its result to FILE * at least for FreeBSD.

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[commit] r2237 - The getFile macro needs to cast its result to FILE * at least for FreeBSD.

commits-3
 
Author: eliot
Date: 2010-07-16 09:57:08 -0700 (Fri, 16 Jul 2010)
New Revision: 2237

Modified:
   branches/Cog/platforms/Cross/plugins/FilePlugin/sqFilePluginBasicPrims.c
Log:
The getFile macro needs to cast its result to FILE * at least for FreeBSD.


Modified: branches/Cog/platforms/Cross/plugins/FilePlugin/sqFilePluginBasicPrims.c
===================================================================
--- branches/Cog/platforms/Cross/plugins/FilePlugin/sqFilePluginBasicPrims.c 2010-07-16 15:22:23 UTC (rev 2236)
+++ branches/Cog/platforms/Cross/plugins/FilePlugin/sqFilePluginBasicPrims.c 2010-07-16 16:57:08 UTC (rev 2237)
@@ -111,7 +111,7 @@
   return file;
 }
 #else
-# define getFile(f) ((f)->file)
+# define getFile(f) ((FILE *)((f)->file))
 #endif
 
 #if DOUBLE_WORD_ALIGNMENT

Reply | Threaded
Open this post in threaded view
|

Re: [commit] r2237 - The getFile macro needs to cast its result to FILE * at least for FreeBSD.

Frank Shearar
 
On 2010/07/16 18:57, [hidden email] wrote:

>
> Author: eliot
> Date: 2010-07-16 09:57:08 -0700 (Fri, 16 Jul 2010)
> New Revision: 2237
>
> Modified:
>     branches/Cog/platforms/Cross/plugins/FilePlugin/sqFilePluginBasicPrims.c
> Log:
> The getFile macro needs to cast its result to FILE * at least for FreeBSD.
>
>
> Modified: branches/Cog/platforms/Cross/plugins/FilePlugin/sqFilePluginBasicPrims.c
> ===================================================================

We're making good progress here, I reckon!

gcc -g -O2 -msse2 -D_GNU_SOURCE -DNDEBUG -DITIMER_HEARTBEAT=1
-DNO_VM_PROFILE=1 -DCOGMTVM=0 -msse -DLSB_FIRST=1  -DHAVE_CONFIG_H
-DSQUEAK_BUILTIN_PLUGIN  -I/usr/home/frank/temp/unixbuild/bld
-I/usr/home/frank/temp/unixbuild/bld
-I/usr/home/frank/temp/platforms/unix/vm
-I/usr/home/frank/temp/platforms/Cross/vm -I/usr/home/frank/temp/src/vm
-I/usr/home/frank/temp/platforms/Cross/plugins/IA32ABI   -c -o
ia32abicc.o /usr/home/frank/temp/platforms/Cross/plugins/IA32ABI/ia32abicc.c
In file included from
/usr/home/frank/temp/platforms/Cross/plugins/IA32ABI/ia32abicc.c:34:
/usr/include/malloc.h:3:2: error: #error "<malloc.h> has been replaced
by <stdlib.h>"

So I thought I'd grep around a bit. The following plugins use malloc.h:

Cross/plugins/IA32ABI/ia32abicc.c:# include <malloc.h> /* for valloc */
Cross/plugins/ExampleSurfacePlugin/sqMemorySurface.c:#include <malloc.h>

I haven't run into problems with alsa, which makes extensive use of
#include <malloc.h>, because configure disables it:

checking for Advanced Linux Sound Architecture... no
******** disabling vm-sound-ALSA

frank