cinvoke-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[cinvoke-svn] r22 - in trunk/cinvoke: . lib lib/arch test tools


From: will
Subject: [cinvoke-svn] r22 - in trunk/cinvoke: . lib lib/arch test tools
Date: 15 Jun 2006 09:17:09 -0400

Author: will
Date: 2006-06-15 09:17:09 -0400 (Thu, 15 Jun 2006)
New Revision: 22

Added:
   trunk/cinvoke/tools/
   trunk/cinvoke/tools/libdl.sh
Removed:
   trunk/cinvoke/wintools/
Modified:
   trunk/cinvoke/lib/arch/gcc_x86_unix.c
   trunk/cinvoke/lib/cinvoke.vcproj
   trunk/cinvoke/test/Makefile
Log:
more portability fixes


Modified: trunk/cinvoke/lib/arch/gcc_x86_unix.c
===================================================================
--- trunk/cinvoke/lib/arch/gcc_x86_unix.c       2006-06-15 04:24:09 UTC (rev 21)
+++ trunk/cinvoke/lib/arch/gcc_x86_unix.c       2006-06-15 13:17:09 UTC (rev 22)
@@ -78,13 +78,8 @@
 
 char *arch_callback_stub(void *functionp, void *param,
        short stacksize, cinv_callconv_t cc) {
-#if defined (__linux__)
        char *ret = mmap(0, LEN, PROT_EXEC|PROT_READ|PROT_WRITE,
-               MAP_ANONYMOUS|MAP_PRIVATE, -1, 0);
-#else
-       char *ret = mmap(0, LEN, PROT_EXEC|PROT_READ|PROT_WRITE,
                MAP_ANON|MAP_PRIVATE, -1, 0);
-#endif
        if (ret == MAP_FAILED)
                return NULL;
        

Modified: trunk/cinvoke/lib/cinvoke.vcproj
===================================================================
--- trunk/cinvoke/lib/cinvoke.vcproj    2006-06-15 04:24:09 UTC (rev 21)
+++ trunk/cinvoke/lib/cinvoke.vcproj    2006-06-15 13:17:09 UTC (rev 22)
@@ -40,8 +40,8 @@
                                Name="VCPostBuildEventTool"/>
                        <Tool
                                Name="VCPreBuildEventTool"
-                               CommandLine="..\wintools\copyifnewer 
arch\cl_x86_win.c cinvoke-archspec.c
-..\wintools\copyifnewer arch\cl_x86_win.h cinvoke-archspec.h
+                               CommandLine="..\tools\copyifnewer 
arch\cl_x86_win.c cinvoke-archspec.c
+..\tools\copyifnewer arch\cl_x86_win.h cinvoke-archspec.h
 "/>
                        <Tool
                                Name="VCPreLinkEventTool"/>
@@ -83,8 +83,8 @@
                                Name="VCPostBuildEventTool"/>
                        <Tool
                                Name="VCPreBuildEventTool"
-                               CommandLine="..\wintools\copyifnewer 
arch\cl_x86_win.c cinvoke-archspec.c
-..\wintools\copyifnewer arch\cl_x86_win.h cinvoke-archspec.h
+                               CommandLine="..\tools\copyifnewer 
arch\cl_x86_win.c cinvoke-archspec.c
+..\tools\copyifnewer arch\cl_x86_win.h cinvoke-archspec.h
 "/>
                        <Tool
                                Name="VCPreLinkEventTool"/>

Modified: trunk/cinvoke/test/Makefile
===================================================================
--- trunk/cinvoke/test/Makefile 2006-06-15 04:24:09 UTC (rev 21)
+++ trunk/cinvoke/test/Makefile 2006-06-15 13:17:09 UTC (rev 22)
@@ -6,9 +6,5 @@
 lib.so: lib.c
        gcc -g -shared -fPIC lib.c -o lib.so -Wall -Werror
 
-LIBDL = -ldl
-#uncomment for *BSD
-#LIBDL = 
-
 runtests: runtests.c lib.so
-       gcc -g -o runtests runtests.c -Wall -Werror ../lib/cinvoke.a -I../lib 
$(LIBDL) -lm
+       gcc -g -o runtests runtests.c -Wall -Werror ../lib/cinvoke.a -I../lib 
`sh ../tools/libdl.sh` -lm

Copied: trunk/cinvoke/tools (from rev 19, trunk/cinvoke/wintools)

Added: trunk/cinvoke/tools/libdl.sh
===================================================================
--- trunk/cinvoke/tools/libdl.sh                                (rev 0)
+++ trunk/cinvoke/tools/libdl.sh        2006-06-15 13:17:09 UTC (rev 22)
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+if [ -f /lib/libdl.so ]
+then
+       echo '-ldl'
+fi
+





reply via email to

[Prev in Thread] Current Thread [Next in Thread]