treed@fsg.UUCP (Timothy Reed) (01/10/90)
I'm trying to build the Reactive Keyboard on the next, and need a copy of getcwd() or a workalike to complete the compile. Does anyone out there have such a beast? Also, what's the general success rate with atom(1)? Has anyone had luck translating even remotely complex binaries? Is there a greater success rate with 68020 binaries built on particular hardware platform? I haven't gotten to otool(1) yet. thanks!! Tim Reed Fusion Systems Group, Ltd. ..!uunet!fsg!treed
eps@toaster.SFSU.EDU (Eric P. Scott) (01/12/90)
[I have expanded Distribution: from usa to world] In article <8492@fsg.UUCP> treed@mapes.UUCP (Timothy Reed) writes: >I'm trying to build the Reactive Keyboard on the next, and need a >copy of getcwd() or a workalike to complete the compile. Does anyone >out there have such a beast? The first thing I did was check in the compat-sys5 directory in the BSD sources. No dice. Well, it's not hard to simulate. The "real" one popens pwd (ick!). Here's a replacement expressed in terms of getwd(). As is, no warranty. The following is hereby placed in the public domain: #include <stdio.h> #include <sys/param.h> char *getcwd(buf, size) char *buf; int size; { char *getwd(), *malloc(), *strcpy(); register char *v; char pathname[MAXPATHLEN]; return (((v=getwd(pathname))&&strlen(v)<size&& (buf||(buf=malloc(size)))) ? strcpy(buf, v) : (char *)NULL); }; -=EPS=-