From: <ve...@us...> - 2003-03-21 20:30:25
|
Update of /cvsroot/nsclspectcl/SpecTcl/EventSource In directory sc8-pr-cvs1:/tmp/cvs-serv11740 Modified Files: Tag: SpecTcl-2-0-001-fix File.cpp PipeFile.cpp Log Message: Added support for GNU AutoTools Index: File.cpp =================================================================== RCS file: /cvsroot/nsclspectcl/SpecTcl/EventSource/File.cpp,v retrieving revision 4.2 retrieving revision 4.2.2.1 diff -C2 -d -r4.2 -r4.2.2.1 *** File.cpp 2 Jan 2003 17:11:31 -0000 4.2 --- File.cpp 21 Mar 2003 20:30:19 -0000 4.2.2.1 *************** *** 39,43 **** We protect your rights with two steps: (1) copyright the software, and ! (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. --- 39,43 ---- We protect your rights with two steps: (1) copyright the software, and ! (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. *************** *** 303,306 **** --- 303,309 ---- // + #ifdef HAVE_CONFIG_H + #include <config.h> + #endif #include "File.h" *************** *** 313,317 **** #include <iostream.h> #include <stdio.h> ! #ifdef CYGWIN #include <windows.h> #endif --- 316,320 ---- #include <iostream.h> #include <stdio.h> ! #ifdef HAVE_WINDOWS_H #include <windows.h> #endif *************** *** 514,518 **** int oflags = 0; ! #ifdef CYGWIN oflags |= O_BINARY; #endif --- 517,521 ---- int oflags = 0; ! #ifdef HAVE_WINDOWS_H oflags |= O_BINARY; #endif Index: PipeFile.cpp =================================================================== RCS file: /cvsroot/nsclspectcl/SpecTcl/EventSource/PipeFile.cpp,v retrieving revision 4.5 retrieving revision 4.5.2.1 diff -C2 -d -r4.5 -r4.5.2.1 *** PipeFile.cpp 2 Jan 2003 17:11:31 -0000 4.5 --- PipeFile.cpp 21 Mar 2003 20:30:20 -0000 4.5.2.1 *************** *** 318,325 **** // - #ifdef HPUX #ifndef _REENTRANT #define _REENTRANT // This is needed to get strtok_r defined. #endif #endif --- 318,327 ---- // #ifndef _REENTRANT #define _REENTRANT // This is needed to get strtok_r defined. #endif + + #ifdef HAVE_CONFIG_H + #include <config.h> #endif *************** *** 338,342 **** #include <string.h> ! #ifdef OSF1 // Coulnd't find pipe for some reason!! extern "C" { int pipe(int*); --- 340,344 ---- #include <string.h> ! #ifndef HAVE_PIPE // Coulnd't find pipe for some reason!! extern "C" { int pipe(int*); *************** *** 344,381 **** #endif ! ! // Static functions ! ! #ifdef __NEED_STRTOKR // Need to implement strtok_r ! // This is posix.1C so it seems the best of the bunch of strtok-ish ones ! // to standardize on. ! // ! static inline char* strtok_r(char *s1, const char* s2, char** savept) ! { ! if(s1) { ! *savept = s1; ! } ! return strsep(savept, s2); ! ! } #endif - #ifdef Darwin // Need to implement strtok_r - // This is posix.1C so it seems the best of the bunch of strtok-ish ones - // to standardize on. - // - static inline char* strtok_r(char *s1, const char* s2, char** savept) - { - if(s1) { - *savept = s1; - } - return strsep(savept, s2); - } - #endif - #ifdef OSF1 - extern "C" { // Missing from string.h - char* strtok_r(char* s1, const char* s2, char** savept); - } - #endif // Functions for class CPipeFile --- 346,355 ---- #endif ! #ifdef OSF ! extern "C" { ! int pipe(int*); ! }; #endif // Functions for class CPipeFile |