[Gmsh] installing gmsh to FreeBSD

Osamu NAKAMURA naka at hasaki.sumitomometals.co.jp
Wed Mar 5 23:58:38 CET 2003


Hi,

These small patches may be useful to install gmsh-1.41.0 to FreeBSD.
  (FreeBSD 4.7-STABLE (i386), g++ --version : 2.95.4 )

Thanks.

--- gmsh-1.41.0/Fltk/GmshServer.cpp     Sun Mar  2 07:36:38 2003
+++ gmsh-1.41.0-my/Fltk/GmshServer.cpp  Wed Mar  5 21:20:54 2003
@@ -75,7 +75,7 @@
 int Gmsh_StartClient(char *command, char *sockname)
 { 
   int s, sock;
-#if defined(linux) || defined(_AIX)
+#if defined(linux) || defined(_AIX) || defined(__FreeBSD__)
   socklen_t len;
 #else
   int len;

--- gmsh-1.41.0/Plugin/Plugin.cpp       Sun Mar  2 10:18:33 2003
+++ gmsh-1.41.0-my/Plugin/Plugin.cpp    Wed Mar  5 21:37:05 2003
@@ -197,14 +197,14 @@
   sprintf(dynamic_lib, "%s/%s", dirName, pluginName);
   Msg(INFO, "Opening Plugin '%s'", dynamic_lib);
   void *hlib = dlopen(dynamic_lib, RTLD_NOW);
-  char *err = dlerror();
+  char *err = (char *)dlerror();
   if(hlib == NULL) {
     Msg(WARNING, "Error in opening %s (dlerror = %s)", dynamic_lib, err);
     return;
   }
   RegisterPlugin =
     (class GMSH_Plugin * (*)(void))dlsym(hlib, GMSH_PluginEntry);
-  err = dlerror();
+  err = (char *)dlerror();
   if(err != NULL) {
     Msg(WARNING, "Symbol '%s' missing in plugin '%s' (dlerror = %s)",
         GMSH_PluginEntry, pluginName, err);

--