diff -crP -x bin -x docs -x tests icon.orig/src/h/sys.h icon/src/h/sys.h *** icon.orig/src/h/sys.h Fri Jul 29 21:24:57 1994 --- icon/src/h/sys.h Wed Mar 1 15:43:55 1995 *************** *** 181,192 **** --- 181,203 ---- #include #include #include + #ifdef __FreeBSD__ + #include + #endif #endif /* HaveTioc */ #endif /* KeyboardFncs */ #ifdef LoadFunc + #ifndef __FreeBSD__ #include + #else + #include + #include + #ifndef RTLD_LAZY + #define RTLD_LAZY 1 + #endif /* RTLD_LAZY */ + #endif /* __FreeBSD__ */ #endif /* LoadFunc */ #endif /* UNIX */ *** work/src/runtime/fload.r.orig Fri Jul 29 21:22:51 1994 --- work/src/runtime/fload.r Sun Apr 16 14:02:26 1995 *************** *** 18,23 **** --- 18,44 ---- #ifdef LoadFunc + #ifdef FreeBSD + + /* Look at the DL_GETERRNO constant, if it exists this is FreeBSD 1.1.5 + or 2.0. If it doesn't exist this must be post 2.0 with an dlerror */ + + #ifdef DL_GETERRNO + /* Sorry, no dlerror() on FreeBSD 2.0 . Fake it. */ + char *dlerror(void) + { + int no; + + if (0 == dlctl(NULL, DL_GETERRNO, &no)) + return(strerror(no)); + else + return(NULL); + } + #endif + + #endif /* __FreeBSD__ */ + + int glue(); int makefunc Params((dptr d, char *name, int (*func)())); diff -crP -x bin -x docs -x tests icon.orig/src/runtime/rmisc.r icon/src/runtime/rmisc.r *** icon.orig/src/runtime/rmisc.r Fri Jul 29 21:22:54 1994 --- icon/src/runtime/rmisc.r Wed Mar 1 18:03:13 1995 *************** *** 83,88 **** --- 83,97 ---- buf[i-1] = '\0'; return buf; #endif /* OS2EMX */ + + #if FreeBSD + #define ecvt(w,x,y,z) 0 + + sprintf(buf, "%f", number); + for(i=strlen(buf); i>1 && buf[i-1]=='0' && buf[i-2]!='.'; i--) + buf[i-1] = '\0'; + return buf; + #endif /* FreeBSD */ p1 = ecvt(number, ndigit, &decpt, &sign); p2 = buf;