octave.2.0.5.NeXT Mar 1997 Here are some things you need to do to get octave to compile for Nextstep. 1. If using g77 (ie, g77-0.5.20 and gcc-2.7.2.2.f.2), need to configure with: configure --with-g77 (so... whenever I say run configure, you need to include --with-g77. 2. fix configure - modify config.cache so termios.h,unistd.h,utsname.h are no (they are posix only headers, and shouldn't be used). - re-run configure: configure --with-g77 3. fix Makeconf - modify CXXLIBS to be: -lm - modify FLIBS to be: -lf2c 4. strdup You need an implementation of the C functio strdup for info and makedoc. Either: #define strdup(x) NXCopyStringBuffer(x) In the files that refer to strdup, or create a file named: strdup.c #include #if defined(NeXT) /** * strdup() - Duplicate a string. * * Returns a pointer to a new string which is a duplicate of the * string to which s1 points. The space for the new string is * obtained using the calloc() function (see calloc(3C)). * * Parameters: [1] inStr - String to duplicate. * Returns: Pointer to duplicated string; or NULL if an error occurred. **/ char *strdup(const char *inStr) { char *outStr; if (NULL == inStr) { outStr = NULL; } else { outStr = calloc((strlen(inStr) + 1), sizeof(char)); if (NULL != outStr) { strcpy(outStr, inStr); } } return outStr; } #endif /* NeXT */ Do a 'gcc -O -c strdup.c' and then include the strdup.o object file in the makefile objects for info and makedoc. 5. hypot redefinition: kpathsea/c-std.h:97: conflicting types for `hypot' Remove reference (comment it out or remove it) 6. liboctave/Array.h (and liboctave/Array2.h) and anywhere else that complains about index, stick these #if's right before the reference to index. #ifdef index #undef index #endif Array index (idx_vector& i) const; 7. fix signal.h i386 /usr/local/lib/gcc-lib/m68k-next-nextstep3/2.7.2.2.f.2/include/bsd/sys/ so that it reads: NOTE: the old defs of the signals are not liked by g++: -------- #ifdef __STRICT_BSD__ #define BADSIG (int (*)(int))-1 #define SIG_DFL (int (*)(int))0 #define SIG_IGN (int (*)(int))1 #ifdef KERNEL #define SIG_CATCH (int (*)(int))2 #define SIG_HOLD (int (*)(int))3 #endif #else /* __STRICT_BSD__ */ #ifdef _NEXT_SOURCE #define BADSIG (void (*)(int))-1 #endif /* _NEXT_SOURCE */ #if defined(_NEXT_SOURCE) || defined(_POSIX_SOURCE) #define SIG_DFL (void (*)(int))0 #define SIG_IGN (void (*)(int))1 ... CREDITS Rex Dieter Computer System Manager Department of Mathematics and Statistics University of Nebraska Lincoln http://www.math.unl.edu/~rdieter/