From 361185e52e4b2addba1b3df549c809fef4380543 Mon Sep 17 00:00:00 2001 From: David Rose Date: Mon, 20 Jan 2003 21:13:51 +0000 Subject: [PATCH] build on Irix --- dtool/Config.Irix.pp | 2 +- dtool/src/dtoolbase/dtoolbase_cc.h | 8 ++ panda/metalibs/panda/Sources.pp | 3 +- panda/metalibs/pandagl/Sources.pp | 1 - panda/src/display/displayRegion.h | 2 +- panda/src/display/graphicsChannel.h | 2 +- panda/src/display/graphicsEngine.h | 2 +- panda/src/display/graphicsLayer.h | 2 +- panda/src/display/graphicsPipe.h | 2 +- panda/src/display/graphicsPipeSelection.h | 2 +- panda/src/display/graphicsWindow.h | 2 +- panda/src/downloader/bioStream.I | 6 +- panda/src/downloader/bioStream.cxx | 5 + panda/src/downloader/chunkedStream.I | 2 +- panda/src/downloader/extractor.cxx | 1 - panda/src/downloader/httpChannel.cxx | 4 +- panda/src/downloader/identityStream.I | 2 +- panda/src/downloader/socketStream.cxx | 4 + panda/src/express/Sources.pp | 10 +- panda/src/express/conditionVar.h | 2 +- panda/src/express/express_composite1.cxx | 2 +- panda/src/express/mutexHolder.h | 2 +- panda/src/express/{mutex.I => pmutex.I} | 2 +- panda/src/express/{mutex.cxx => pmutex.cxx} | 4 +- panda/src/express/{mutex.h => pmutex.h} | 8 +- panda/src/express/subStream.I | 2 +- panda/src/express/subStreamBuf.cxx | 14 +- panda/src/express/subStreamBuf.h | 9 +- panda/src/express/test_threaddata.cxx | 2 +- panda/src/express/threadDummyImpl.h | 8 +- panda/src/express/threadNsprImpl.h | 2 +- panda/src/express/zStream.I | 4 +- panda/src/pandabase/pandabase.h | 2 +- panda/src/sgidisplay/Sources.pp | 20 --- panda/src/sgidisplay/config_sgidisplay.cxx | 30 ----- panda/src/sgidisplay/config_sgidisplay.h | 24 ---- panda/src/sgidisplay/sgiGraphicsPipe.cxx | 120 ------------------ panda/src/sgidisplay/sgiGraphicsPipe.h | 81 ------------ panda/src/sgidisplay/sgiHardwareChannel.cxx | 63 --------- panda/src/sgidisplay/sgiHardwareChannel.h | 66 ---------- panda/src/sgiglxdisplay/Sources.pp | 19 --- .../sgiglxdisplay/config_sgiglxdisplay.cxx | 31 ----- .../src/sgiglxdisplay/config_sgiglxdisplay.h | 27 ---- .../src/sgiglxdisplay/sgiglxGraphicsPipe.cxx | 87 ------------- panda/src/sgiglxdisplay/sgiglxGraphicsPipe.h | 54 -------- 45 files changed, 65 insertions(+), 682 deletions(-) rename panda/src/express/{mutex.I => pmutex.I} (99%) rename panda/src/express/{mutex.cxx => pmutex.cxx} (93%) rename panda/src/express/{mutex.h => pmutex.h} (94%) delete mode 100644 panda/src/sgidisplay/Sources.pp delete mode 100644 panda/src/sgidisplay/config_sgidisplay.cxx delete mode 100644 panda/src/sgidisplay/config_sgidisplay.h delete mode 100644 panda/src/sgidisplay/sgiGraphicsPipe.cxx delete mode 100644 panda/src/sgidisplay/sgiGraphicsPipe.h delete mode 100644 panda/src/sgidisplay/sgiHardwareChannel.cxx delete mode 100644 panda/src/sgidisplay/sgiHardwareChannel.h delete mode 100644 panda/src/sgiglxdisplay/Sources.pp delete mode 100644 panda/src/sgiglxdisplay/config_sgiglxdisplay.cxx delete mode 100644 panda/src/sgiglxdisplay/config_sgiglxdisplay.h delete mode 100644 panda/src/sgiglxdisplay/sgiglxGraphicsPipe.cxx delete mode 100644 panda/src/sgiglxdisplay/sgiglxGraphicsPipe.h diff --git a/dtool/Config.Irix.pp b/dtool/Config.Irix.pp index cca673256d..fbf9e04ea8 100644 --- a/dtool/Config.Irix.pp +++ b/dtool/Config.Irix.pp @@ -7,7 +7,7 @@ // // What additional flags should we pass to interrogate? -#define -D__mips__ -D__MIPSEB__ +#define SYSTEM_IGATE_FLAGS -D__mips__ -D__MIPSEB__ -D_LANGUAGE_C_PLUS_PLUS -D_MIPS_SZINT=32 -D_MIPS_SZLONG=32 -D_MIPS_SZPTR=32 // Is the platform big-endian (like an SGI workstation) or // little-endian (like a PC)? Define this to the empty string to diff --git a/dtool/src/dtoolbase/dtoolbase_cc.h b/dtool/src/dtoolbase/dtoolbase_cc.h index 23f2a6e1bf..dc307e7955 100644 --- a/dtool/src/dtoolbase/dtoolbase_cc.h +++ b/dtool/src/dtoolbase/dtoolbase_cc.h @@ -40,6 +40,12 @@ using namespace std; // this maps to public. #define PUBLISHED __published +typedef int streamsize; +typedef int ios_openmode; +typedef int ios_fmtflags; +typedef int ios_iostate; +typedef int ios_seekdir; + #else // CPPPARSER #ifdef HAVE_IOSTREAM @@ -82,11 +88,13 @@ typedef int streamsize; #ifndef HAVE_IOS_TYPEDEFS typedef int ios_openmode; typedef int ios_fmtflags; +typedef int ios_iostate; // Old iostream libraries used ios::seek_dir instead of ios::seekdir. typedef ios::seek_dir ios_seekdir; #else typedef ios::openmode ios_openmode; typedef ios::fmtflags ios_fmtflags; +typedef ios::iostate ios_iostate; typedef ios::seekdir ios_seekdir; #endif diff --git a/panda/metalibs/panda/Sources.pp b/panda/metalibs/panda/Sources.pp index 338a068c40..f3c2809225 100644 --- a/panda/metalibs/panda/Sources.pp +++ b/panda/metalibs/panda/Sources.pp @@ -28,8 +28,7 @@ #if $[LINK_IN_GL] #define BUILDING_DLL $[BUILDING_DLL] BUILDING_PANDAGL #define COMPONENT_LIBS $[COMPONENT_LIBS] \ - glgsg glxdisplay wgldisplay glutdisplay \ - sgidisplay sgiglxdisplay sgiglutdisplay + glgsg glxdisplay wgldisplay glutdisplay #endif #if $[LINK_IN_PHYSICS] diff --git a/panda/metalibs/pandagl/Sources.pp b/panda/metalibs/pandagl/Sources.pp index 88d5cd9792..6d1a7459e2 100644 --- a/panda/metalibs/pandagl/Sources.pp +++ b/panda/metalibs/pandagl/Sources.pp @@ -13,7 +13,6 @@ // directly into Panda. #define COMPONENT_LIBS \ glgsg glxdisplay \ - sgidisplay sgiglxdisplay \ wgldisplay #endif diff --git a/panda/src/display/displayRegion.h b/panda/src/display/displayRegion.h index a26f20ad12..bc804bc869 100644 --- a/panda/src/display/displayRegion.h +++ b/panda/src/display/displayRegion.h @@ -25,7 +25,7 @@ #include "nodePath.h" #include "cullResult.h" #include "pointerTo.h" -#include "mutex.h" +#include "pmutex.h" #include "plist.h" diff --git a/panda/src/display/graphicsChannel.h b/panda/src/display/graphicsChannel.h index b024d1936c..0c82a8640c 100644 --- a/panda/src/display/graphicsChannel.h +++ b/panda/src/display/graphicsChannel.h @@ -22,7 +22,7 @@ #include "graphicsLayer.h" #include "typedReferenceCount.h" #include "pointerTo.h" -#include "mutex.h" +#include "pmutex.h" #include "pvector.h" class GraphicsChannel; diff --git a/panda/src/display/graphicsEngine.h b/panda/src/display/graphicsEngine.h index 7673ce8dc5..3f7acb7230 100644 --- a/panda/src/display/graphicsEngine.h +++ b/panda/src/display/graphicsEngine.h @@ -24,7 +24,7 @@ #include "sceneSetup.h" #include "pointerTo.h" #include "thread.h" -#include "mutex.h" +#include "pmutex.h" #include "conditionVar.h" #include "pset.h" #include "pStatCollector.h" diff --git a/panda/src/display/graphicsLayer.h b/panda/src/display/graphicsLayer.h index 023593a357..e4cc6ac5e5 100644 --- a/panda/src/display/graphicsLayer.h +++ b/panda/src/display/graphicsLayer.h @@ -24,7 +24,7 @@ #include "displayRegion.h" #include "typedReferenceCount.h" #include "pointerTo.h" -#include "mutex.h" +#include "pmutex.h" #include "pvector.h" class GraphicsChannel; diff --git a/panda/src/display/graphicsPipe.h b/panda/src/display/graphicsPipe.h index 914fa8f793..365c4fc7bd 100644 --- a/panda/src/display/graphicsPipe.h +++ b/panda/src/display/graphicsPipe.h @@ -23,7 +23,7 @@ #include "typedReferenceCount.h" #include "pointerTo.h" -#include "mutex.h" +#include "pmutex.h" #include "pvector.h" class HardwareChannel; diff --git a/panda/src/display/graphicsPipeSelection.h b/panda/src/display/graphicsPipeSelection.h index e35a19c826..ca5c95bc2c 100644 --- a/panda/src/display/graphicsPipeSelection.h +++ b/panda/src/display/graphicsPipeSelection.h @@ -24,7 +24,7 @@ #include "graphicsPipe.h" #include "pointerTo.h" #include "typeHandle.h" -#include "mutex.h" +#include "pmutex.h" class HardwareChannel; class GraphicsWindow; diff --git a/panda/src/display/graphicsWindow.h b/panda/src/display/graphicsWindow.h index 63ac0116f1..ad6c724cf0 100644 --- a/panda/src/display/graphicsWindow.h +++ b/panda/src/display/graphicsWindow.h @@ -34,7 +34,7 @@ #include "buttonEvent.h" #include "iterator_types.h" #include "notify.h" -#include "mutex.h" +#include "pmutex.h" #include "pvector.h" #include "pdeque.h" diff --git a/panda/src/downloader/bioStream.I b/panda/src/downloader/bioStream.I index 6017ad4083..29485a10c4 100644 --- a/panda/src/downloader/bioStream.I +++ b/panda/src/downloader/bioStream.I @@ -43,7 +43,7 @@ IBioStream(BioPtr *source) : ISocketStream(&_buf) { //////////////////////////////////////////////////////////////////// INLINE IBioStream &IBioStream:: open(BioPtr *source) { - clear((ios::iostate)0); + clear((ios_iostate)0); _buf.open(source); return *this; } @@ -86,7 +86,7 @@ OBioStream(BioPtr *source) : OSocketStream(&_buf) { //////////////////////////////////////////////////////////////////// INLINE OBioStream &OBioStream:: open(BioPtr *source) { - clear((ios::iostate)0); + clear((ios_iostate)0); _buf.open(source); return *this; } @@ -129,7 +129,7 @@ BioStream(BioPtr *source) : SocketStream(&_buf) { //////////////////////////////////////////////////////////////////// INLINE BioStream &BioStream:: open(BioPtr *source) { - clear((ios::iostate)0); + clear((ios_iostate)0); _buf.open(source); return *this; } diff --git a/panda/src/downloader/bioStream.cxx b/panda/src/downloader/bioStream.cxx index c82b080fe7..77fcf39122 100644 --- a/panda/src/downloader/bioStream.cxx +++ b/panda/src/downloader/bioStream.cxx @@ -18,6 +18,9 @@ #include "bioStream.h" + +#ifdef HAVE_SSL + //////////////////////////////////////////////////////////////////// // Function: IBioStream::is_closed // Access: Public, Virtual @@ -67,3 +70,5 @@ is_closed() { clear(); return false; } + +#endif // HAVE_SSL diff --git a/panda/src/downloader/chunkedStream.I b/panda/src/downloader/chunkedStream.I index 24b7fbc1bf..63baa477ca 100644 --- a/panda/src/downloader/chunkedStream.I +++ b/panda/src/downloader/chunkedStream.I @@ -43,7 +43,7 @@ IChunkedStream(BioStreamPtr *source, HTTPChannel *doc) : ISocketStream(&_buf) { //////////////////////////////////////////////////////////////////// INLINE IChunkedStream &IChunkedStream:: open(BioStreamPtr *source, HTTPChannel *doc) { - clear((ios::iostate)0); + clear((ios_iostate)0); _buf.open_read(source, doc); return *this; } diff --git a/panda/src/downloader/extractor.cxx b/panda/src/downloader/extractor.cxx index e03109806b..ac405408c9 100644 --- a/panda/src/downloader/extractor.cxx +++ b/panda/src/downloader/extractor.cxx @@ -262,5 +262,4 @@ run() { return false; } } - return false; } diff --git a/panda/src/downloader/httpChannel.cxx b/panda/src/downloader/httpChannel.cxx index eef38b80b8..8cd7c2d709 100644 --- a/panda/src/downloader/httpChannel.cxx +++ b/panda/src/downloader/httpChannel.cxx @@ -1785,7 +1785,7 @@ bool HTTPChannel:: parse_http_response(const string &line) { // The first line back should include the HTTP version and the // result code. - if (line.length() < 5 || line.substr(0, 5) != "HTTP/") { + if (line.length() < 5 || line.substr(0, 5) != string("HTTP/")) { // Not an HTTP response. _status_code = 0; _status_string = "Not an HTTP response"; @@ -2000,7 +2000,7 @@ verify_server(X509_NAME *subject) const { ++ei) { X509_NAME *expected_name = (*ei); X509_NAME_print_ex_fp(stderr, expected_name, 0, 0); - fprintf(stderr, "\n"); + fputs("\n", stderr); } fflush(stderr); } diff --git a/panda/src/downloader/identityStream.I b/panda/src/downloader/identityStream.I index 96d83735eb..ded76fcd61 100644 --- a/panda/src/downloader/identityStream.I +++ b/panda/src/downloader/identityStream.I @@ -47,7 +47,7 @@ IIdentityStream(BioStreamPtr *source, HTTPChannel *doc, INLINE IIdentityStream &IIdentityStream:: open(BioStreamPtr *source, HTTPChannel *doc, bool has_content_length, size_t content_length) { - clear((ios::iostate)0); + clear((ios_iostate)0); _buf.open_read(source, doc, has_content_length, content_length); return *this; } diff --git a/panda/src/downloader/socketStream.cxx b/panda/src/downloader/socketStream.cxx index c7672b47c3..58d9e58c98 100644 --- a/panda/src/downloader/socketStream.cxx +++ b/panda/src/downloader/socketStream.cxx @@ -20,6 +20,8 @@ #include "datagram.h" #include "datagramIterator.h" +#ifdef HAVE_SSL + //////////////////////////////////////////////////////////////////// // Function: ISocketStream::receive_datagram // Access: Public @@ -163,3 +165,5 @@ send_datagram(const Datagram &dg) { return !is_closed(); } + +#endif // HAVE_SSL diff --git a/panda/src/express/Sources.pp b/panda/src/express/Sources.pp index 7cead13708..13c35bbe45 100644 --- a/panda/src/express/Sources.pp +++ b/panda/src/express/Sources.pp @@ -33,8 +33,8 @@ memoryUsagePointerCounts.I memoryUsagePointerCounts.h \ memoryUsagePointers.I memoryUsagePointers.h \ multifile.I multifile.h \ - mutexDummyImpl.h mutexDummyImpl.I mutex.h mutexHolder.h \ - mutexHolder.I mutex.I mutexImpl.h mutexNsprImpl.h mutexNsprImpl.I \ + mutexDummyImpl.h mutexDummyImpl.I pmutex.h mutexHolder.h \ + mutexHolder.I pmutex.I mutexImpl.h mutexNsprImpl.h mutexNsprImpl.I \ namable.I \ namable.h nativeNumericData.I nativeNumericData.h \ numeric_types.h \ @@ -79,7 +79,7 @@ hashGeneratorBase.cxx hashVal.cxx indent.cxx \ memoryInfo.cxx memoryUsage.cxx memoryUsagePointerCounts.cxx \ memoryUsagePointers.cxx multifile.cxx \ - mutex.cxx mutexHolder.cxx mutexDummyImpl.cxx mutexNsprImpl.cxx \ + pmutex.cxx mutexHolder.cxx mutexDummyImpl.cxx mutexNsprImpl.cxx \ namable.cxx \ nativeNumericData.cxx \ ordered_vector.cxx \ @@ -120,8 +120,8 @@ memoryUsage.h memoryUsagePointerCounts.I \ memoryUsagePointerCounts.h memoryUsagePointers.I \ memoryUsagePointers.h multifile.I multifile.h \ - mutexDummyImpl.h mutexDummyImpl.I mutex.h mutexHolder.h \ - mutexHolder.I mutex.I mutexImpl.h mutexNsprImpl.h mutexNsprImpl.I \ + mutexDummyImpl.h mutexDummyImpl.I pmutex.h mutexHolder.h \ + mutexHolder.I pmutex.I mutexImpl.h mutexNsprImpl.h mutexNsprImpl.I \ namable.I namable.h \ nativeNumericData.I nativeNumericData.h numeric_types.h \ ordered_vector.h ordered_vector.I ordered_vector.T \ diff --git a/panda/src/express/conditionVar.h b/panda/src/express/conditionVar.h index 49c12ef59d..2523043afb 100644 --- a/panda/src/express/conditionVar.h +++ b/panda/src/express/conditionVar.h @@ -20,7 +20,7 @@ #define CONDITIONVAR_H #include "pandabase.h" -#include "mutex.h" +#include "pmutex.h" #include "conditionVarImpl.h" #include "notify.h" diff --git a/panda/src/express/express_composite1.cxx b/panda/src/express/express_composite1.cxx index 298fc58f29..913e68b95d 100644 --- a/panda/src/express/express_composite1.cxx +++ b/panda/src/express/express_composite1.cxx @@ -23,7 +23,7 @@ #include "memoryUsagePointerCounts.cxx" #include "memoryUsagePointers.cxx" #include "multifile.cxx" -#include "mutex.cxx" +#include "pmutex.cxx" #include "mutexHolder.cxx" #include "mutexDummyImpl.cxx" #include "mutexNsprImpl.cxx" diff --git a/panda/src/express/mutexHolder.h b/panda/src/express/mutexHolder.h index 3b0327727e..40740478f7 100644 --- a/panda/src/express/mutexHolder.h +++ b/panda/src/express/mutexHolder.h @@ -20,7 +20,7 @@ #define MUTEXHOLDER_H #include "pandabase.h" -#include "mutex.h" +#include "pmutex.h" //////////////////////////////////////////////////////////////////// // Class : MutexHolder diff --git a/panda/src/express/mutex.I b/panda/src/express/pmutex.I similarity index 99% rename from panda/src/express/mutex.I rename to panda/src/express/pmutex.I index 07143b51af..a81d49a31f 100644 --- a/panda/src/express/mutex.I +++ b/panda/src/express/pmutex.I @@ -1,4 +1,4 @@ -// Filename: mutex.I +// Filename: pmutex.I // Created by: drose (08Aug02) // //////////////////////////////////////////////////////////////////// diff --git a/panda/src/express/mutex.cxx b/panda/src/express/pmutex.cxx similarity index 93% rename from panda/src/express/mutex.cxx rename to panda/src/express/pmutex.cxx index 31fd0a6e6c..1c419a9916 100644 --- a/panda/src/express/mutex.cxx +++ b/panda/src/express/pmutex.cxx @@ -1,4 +1,4 @@ -// Filename: mutex.cxx +// Filename: pmutex.cxx // Created by: drose (08Aug02) // //////////////////////////////////////////////////////////////////// @@ -16,4 +16,4 @@ // //////////////////////////////////////////////////////////////////// -#include "mutex.h" +#include "pmutex.h" diff --git a/panda/src/express/mutex.h b/panda/src/express/pmutex.h similarity index 94% rename from panda/src/express/mutex.h rename to panda/src/express/pmutex.h index 8041274849..b06ec6e160 100644 --- a/panda/src/express/mutex.h +++ b/panda/src/express/pmutex.h @@ -1,4 +1,4 @@ -// Filename: mutex.h +// Filename: pmutex.h // Created by: cary (16Sep98) // //////////////////////////////////////////////////////////////////// @@ -16,8 +16,8 @@ // //////////////////////////////////////////////////////////////////// -#ifndef MUTEX_H -#define MUTEX_H +#ifndef PMUTEX_H +#define PMUTEX_H #include "pandabase.h" #include "mutexImpl.h" @@ -47,6 +47,6 @@ private: friend class ConditionVar; }; -#include "mutex.I" +#include "pmutex.I" #endif diff --git a/panda/src/express/subStream.I b/panda/src/express/subStream.I index 3123f17d03..8391047ca4 100644 --- a/panda/src/express/subStream.I +++ b/panda/src/express/subStream.I @@ -51,7 +51,7 @@ ISubStream(istream *source, streampos start, streampos end) : istream(&_buf) { //////////////////////////////////////////////////////////////////// INLINE ISubStream &ISubStream:: open(istream *source, streampos start, streampos end) { - clear((ios::iostate)0); + clear((ios_iostate)0); _buf.open(source, start, end); return *this; } diff --git a/panda/src/express/subStreamBuf.cxx b/panda/src/express/subStreamBuf.cxx index d066b3c9e9..066e376494 100644 --- a/panda/src/express/subStreamBuf.cxx +++ b/panda/src/express/subStreamBuf.cxx @@ -142,12 +142,7 @@ close() { // Description: Implements seeking within the stream. //////////////////////////////////////////////////////////////////// streampos SubStreamBuf:: -#ifdef HAVE_IOSTREAM -seekoff(streamoff off, ios::seekdir dir, ios::openmode mode) -#else -seekoff(streamoff off, ios::seek_dir dir, int mode) -#endif -{ +seekoff(streamoff off, ios_seekdir dir, ios_openmode mode) { // Invariant: _cur points to the file location of the buffer at // egptr(). @@ -216,12 +211,7 @@ seekoff(streamoff off, ios::seek_dir dir, int mode) // function as well. //////////////////////////////////////////////////////////////////// streampos SubStreamBuf:: -#ifdef HAVE_IOSTREAM -seekpos(streampos pos, ios::openmode mode) -#else -seekpos(streampos pos, int mode) -#endif -{ +seekpos(streampos pos, ios_openmode mode) { return seekoff(pos, ios::beg, mode); } diff --git a/panda/src/express/subStreamBuf.h b/panda/src/express/subStreamBuf.h index 7c15374000..63c86b7ba2 100644 --- a/panda/src/express/subStreamBuf.h +++ b/panda/src/express/subStreamBuf.h @@ -33,13 +33,8 @@ public: void open(istream *source, streampos start, streampos end); void close(); -#ifdef HAVE_IOSTREAM - virtual streampos seekoff(streamoff off, ios::seekdir dir, ios::openmode mode); - virtual streampos seekpos(streampos pos, ios::openmode mode); -#else - virtual streampos seekoff(streamoff off, ios::seek_dir dir, int mode); - virtual streampos seekpos(streampos pos, int mode); -#endif + virtual streampos seekoff(streamoff off, ios_seekdir dir, ios_openmode mode); + virtual streampos seekpos(streampos pos, ios_openmode mode); protected: virtual int overflow(int c); diff --git a/panda/src/express/test_threaddata.cxx b/panda/src/express/test_threaddata.cxx index 6fcd697b69..371ab67ac1 100644 --- a/panda/src/express/test_threaddata.cxx +++ b/panda/src/express/test_threaddata.cxx @@ -18,7 +18,7 @@ #include "pandabase.h" #include "thread.h" -#include "mutex.h" +#include "pmutex.h" #include "mutexHolder.h" #include "pointerTo.h" diff --git a/panda/src/express/threadDummyImpl.h b/panda/src/express/threadDummyImpl.h index eacbad4089..787f574df5 100644 --- a/panda/src/express/threadDummyImpl.h +++ b/panda/src/express/threadDummyImpl.h @@ -26,12 +26,18 @@ #include "notify.h" #include "threadPriority.h" -#include "mutex.h" +#include "pmutex.h" #include class Thread; +// The Irix system headers may define this as a macro. Get it out of +// the way. +#ifdef atomic_set +#undef atomic_set +#endif + //////////////////////////////////////////////////////////////////// // Class : ThreadDummyImpl // Description : A fake thread implementation for single-threaded diff --git a/panda/src/express/threadNsprImpl.h b/panda/src/express/threadNsprImpl.h index 97413e5c6b..f5f1db35eb 100644 --- a/panda/src/express/threadNsprImpl.h +++ b/panda/src/express/threadNsprImpl.h @@ -26,7 +26,7 @@ #include "notify.h" #include "threadPriority.h" -#include "mutex.h" +#include "pmutex.h" #include #include diff --git a/panda/src/express/zStream.I b/panda/src/express/zStream.I index a4a90f6924..cabc746c10 100644 --- a/panda/src/express/zStream.I +++ b/panda/src/express/zStream.I @@ -43,7 +43,7 @@ IDecompressStream(istream *source, bool owns_source) : istream(&_buf) { //////////////////////////////////////////////////////////////////// INLINE IDecompressStream &IDecompressStream:: open(istream *source, bool owns_source) { - clear((ios::iostate)0); + clear((ios_iostate)0); _buf.open_read(source, owns_source); return *this; } @@ -89,7 +89,7 @@ OCompressStream(ostream *dest, bool owns_dest, int compression_level) : //////////////////////////////////////////////////////////////////// INLINE OCompressStream &OCompressStream:: open(ostream *dest, bool owns_dest, int compression_level) { - clear((ios::iostate)0); + clear((ios_iostate)0); _buf.open_write(dest, owns_dest, compression_level); return *this; } diff --git a/panda/src/pandabase/pandabase.h b/panda/src/pandabase/pandabase.h index 4d9af3ec56..14a461313f 100644 --- a/panda/src/pandabase/pandabase.h +++ b/panda/src/pandabase/pandabase.h @@ -23,7 +23,7 @@ #ifndef PANDABASE_H #define PANDABASE_H -#include +#include "dtoolbase.h" #include "pandasymbols.h" #endif diff --git a/panda/src/sgidisplay/Sources.pp b/panda/src/sgidisplay/Sources.pp deleted file mode 100644 index 2a871ae2fd..0000000000 --- a/panda/src/sgidisplay/Sources.pp +++ /dev/null @@ -1,20 +0,0 @@ -#define BUILD_DIRECTORY $[HAVE_SGIGL] - -#define OTHER_LIBS interrogatedb:c dconfig:c dtoolconfig:m \ - dtoolutil:c dtoolbase:c dtool:m - -#begin lib_target - #define TARGET sgidisplay - #define UNIX_SYS_LIBS \ - Xsgivc - #define LOCAL_LIBS display - - #define SOURCES \ - config_sgidisplay.cxx config_sgidisplay.h sgiGraphicsPipe.cxx \ - sgiGraphicsPipe.h sgiHardwareChannel.cxx sgiHardwareChannel.h - - #define INSTALL_HEADERS \ - sgiGraphicsPipe.h sgiHardwareChannel.h - -#end lib_target - diff --git a/panda/src/sgidisplay/config_sgidisplay.cxx b/panda/src/sgidisplay/config_sgidisplay.cxx deleted file mode 100644 index d1afd5d0e8..0000000000 --- a/panda/src/sgidisplay/config_sgidisplay.cxx +++ /dev/null @@ -1,30 +0,0 @@ -// Filename: config_sgidisplay.cxx -// Created by: cary (07Oct99) -// -//////////////////////////////////////////////////////////////////// -// -// PANDA 3D SOFTWARE -// Copyright (c) 2001, Disney Enterprises, Inc. All rights reserved -// -// All use of this software is subject to the terms of the Panda 3d -// Software license. You should have received a copy of this license -// along with this source code; you will also find a current copy of -// the license at http://www.panda3d.org/license.txt . -// -// To contact the maintainers of this program write to -// panda3d@yahoogroups.com . -// -//////////////////////////////////////////////////////////////////// - -#include "config_sgidisplay.h" -#include "sgiGraphicsPipe.h" -#include "sgiHardwareChannel.h" - -#include - -Configure(config_sgidisplay); - -ConfigureFn(config_sgidisplay) { - sgiGraphicsPipe::init_type(); - sgiHardwareChannel::init_type(); -} diff --git a/panda/src/sgidisplay/config_sgidisplay.h b/panda/src/sgidisplay/config_sgidisplay.h deleted file mode 100644 index dbdf228a87..0000000000 --- a/panda/src/sgidisplay/config_sgidisplay.h +++ /dev/null @@ -1,24 +0,0 @@ -// Filename: config_sgidisplay.h -// Created by: cary (07Oct99) -// -//////////////////////////////////////////////////////////////////// -// -// PANDA 3D SOFTWARE -// Copyright (c) 2001, Disney Enterprises, Inc. All rights reserved -// -// All use of this software is subject to the terms of the Panda 3d -// Software license. You should have received a copy of this license -// along with this source code; you will also find a current copy of -// the license at http://www.panda3d.org/license.txt . -// -// To contact the maintainers of this program write to -// panda3d@yahoogroups.com . -// -//////////////////////////////////////////////////////////////////// - -#ifndef __CONFIG_SGIDISPLAY_H__ -#define __CONFIG_SGIDISPLAY_H__ - -// nothing to include here yet - -#endif /* __CONFIG_SGIDISPLAY_H__ */ diff --git a/panda/src/sgidisplay/sgiGraphicsPipe.cxx b/panda/src/sgidisplay/sgiGraphicsPipe.cxx deleted file mode 100644 index c33cebebce..0000000000 --- a/panda/src/sgidisplay/sgiGraphicsPipe.cxx +++ /dev/null @@ -1,120 +0,0 @@ -// Filename: sgiGraphicsPipe.cxx -// Created by: mike (09Jan97) -// -//////////////////////////////////////////////////////////////////// -// -// PANDA 3D SOFTWARE -// Copyright (c) 2001, Disney Enterprises, Inc. All rights reserved -// -// All use of this software is subject to the terms of the Panda 3d -// Software license. You should have received a copy of this license -// along with this source code; you will also find a current copy of -// the license at http://www.panda3d.org/license.txt . -// -// To contact the maintainers of this program write to -// panda3d@yahoogroups.com . -// -//////////////////////////////////////////////////////////////////// -#include "sgiGraphicsPipe.h" -#include -#include -#include -#include "sgiHardwareChannel.h" - -//////////////////////////////////////////////////////////////////// -// Static variables -//////////////////////////////////////////////////////////////////// -TypeHandle sgiGraphicsPipe::_type_handle; - -sgiGraphicsPipe::sgiGraphicsPipe(const PipeSpecifier& spec) - : InteractiveGraphicsPipe(spec) { - _num_channels = -1; -} - -sgiGraphicsPipe::~sgiGraphicsPipe(void) { - return; -} - -//////////////////////////////////////////////////////////////////// -// Function: get_num_hw_channels -// Access: -// Description: -//////////////////////////////////////////////////////////////////// -int sgiGraphicsPipe::get_num_hw_channels( void ) -{ - if ( _num_channels == -1 ) - { - Display* display = (Display *)_display; - // Is there a better way to get the display??? (I hope so) - display = glXGetCurrentDisplayEXT(); - - // For now, screen is the same as display - _screen = DefaultScreen( display ); - - XSGIvcScreenInfo server; - XSGIvcQueryVideoScreenInfo( display, _screen, &server ); - - // Not all of these will be active necessarily - _num_channels = server.numChannels; - } - - return _num_channels; -} - -//////////////////////////////////////////////////////////////////// -// Function: get_hw_channel -// Access: -// Description: -//////////////////////////////////////////////////////////////////// -HardwareChannel *sgiGraphicsPipe:: -get_hw_channel( GraphicsWindow* window, int index ) { - if ( _num_channels == -1 ) - get_num_hw_channels(); - - if ( index >= _num_channels ) - { - cerr << "sgiGraphicsPipe::get_hw_channel() - invalid index: " - << index << endl; - return NULL; - } - - Channels::iterator i; - i = _hw_chans.find( index ); - if (i != _hw_chans.end()) { - return (*i).second.p(); - } - - sgiHardwareChannel* hw_chan; - hw_chan = new sgiHardwareChannel( window, index ); - _hw_chans[index] = hw_chan; - - return hw_chan; -} - -TypeHandle sgiGraphicsPipe::get_class_type(void) { - return _type_handle; -} - -void sgiGraphicsPipe::init_type(void) { - InteractiveGraphicsPipe::init_type(); - register_type(_type_handle, "sgiGraphicsPipe", - InteractiveGraphicsPipe::get_class_type()); -} - -TypeHandle sgiGraphicsPipe::get_type(void) const { - return get_class_type(); -} - -sgiGraphicsPipe::sgiGraphicsPipe(void) { - cerr << "sgiGraphicsPipes should not be created with default constructor" - << endl; -} - -sgiGraphicsPipe::sgiGraphicsPipe(const sgiGraphicsPipe&) { - cerr << "sgiGraphicsPipes should not be copied" << endl; -} - -sgiGraphicsPipe& sgiGraphicsPipe::operator=(const sgiGraphicsPipe&) { - cerr << "sgiGraphicsPipes should not be assigned" << endl; - return *this; -} diff --git a/panda/src/sgidisplay/sgiGraphicsPipe.h b/panda/src/sgidisplay/sgiGraphicsPipe.h deleted file mode 100644 index 2e751eee1c..0000000000 --- a/panda/src/sgidisplay/sgiGraphicsPipe.h +++ /dev/null @@ -1,81 +0,0 @@ -// Filename: sgiGraphicsPipe.h -// Created by: mike (09Jan97) -// -//////////////////////////////////////////////////////////////////// -// -// PANDA 3D SOFTWARE -// Copyright (c) 2001, Disney Enterprises, Inc. All rights reserved -// -// All use of this software is subject to the terms of the Panda 3d -// Software license. You should have received a copy of this license -// along with this source code; you will also find a current copy of -// the license at http://www.panda3d.org/license.txt . -// -// To contact the maintainers of this program write to -// panda3d@yahoogroups.com . -// -//////////////////////////////////////////////////////////////////// -#ifndef SGIGRAPHICSPIPE_H -#define SGIGRAPHICSPIPE_H -// -//////////////////////////////////////////////////////////////////// -// Includes -//////////////////////////////////////////////////////////////////// -#include - -#include "sgiHardwareChannel.h" - -#include -#include - -//////////////////////////////////////////////////////////////////// -// Defines -//////////////////////////////////////////////////////////////////// - -//////////////////////////////////////////////////////////////////// -// Class : sgiGraphicsPipe -// Description : -//////////////////////////////////////////////////////////////////// -class sgiGraphicsPipe : public InteractiveGraphicsPipe { -public: - - sgiGraphicsPipe(const PipeSpecifier&); - virtual ~sgiGraphicsPipe() = 0; - - INLINE void* get_display() const { return _display; } - INLINE int get_screen() const { return _screen; } - -protected: - - typedef pmap Channels; - Channels _hw_chans; - - virtual int get_num_hw_channels(); - virtual HardwareChannel *get_hw_channel(GraphicsWindow* window, - int index); - -public: - - static TypeHandle get_class_type(); - static void init_type(); - virtual TypeHandle get_type() const; - virtual TypeHandle force_init_type() {init_type(); return get_class_type();} - -protected: - - void *_display; - int _screen; - int _num_channels; - -private: - - static TypeHandle _type_handle; - -protected: - - sgiGraphicsPipe(); - sgiGraphicsPipe(const sgiGraphicsPipe&); - sgiGraphicsPipe& operator=(const sgiGraphicsPipe&); -}; - -#endif diff --git a/panda/src/sgidisplay/sgiHardwareChannel.cxx b/panda/src/sgidisplay/sgiHardwareChannel.cxx deleted file mode 100644 index 6618b0beea..0000000000 --- a/panda/src/sgidisplay/sgiHardwareChannel.cxx +++ /dev/null @@ -1,63 +0,0 @@ -// Filename: sgiHardwareChannel.cxx -// Created by: mike (09Jan97) -// -//////////////////////////////////////////////////////////////////// -// -// PANDA 3D SOFTWARE -// Copyright (c) 2001, Disney Enterprises, Inc. All rights reserved -// -// All use of this software is subject to the terms of the Panda 3d -// Software license. You should have received a copy of this license -// along with this source code; you will also find a current copy of -// the license at http://www.panda3d.org/license.txt . -// -// To contact the maintainers of this program write to -// panda3d@yahoogroups.com . -// -//////////////////////////////////////////////////////////////////// -#include "sgiHardwareChannel.h" -#include "sgiGraphicsPipe.h" -#include -#include - -//////////////////////////////////////////////////////////////////// -// Static variables -//////////////////////////////////////////////////////////////////// -TypeHandle sgiHardwareChannel::_type_handle; - -//////////////////////////////////////////////////////////////////// -// Function: Constructor -// Access: -// Description: -//////////////////////////////////////////////////////////////////// -sgiHardwareChannel::sgiHardwareChannel( GraphicsWindow* window, int id ) : - HardwareChannel( window ) -{ - _id = id; - const GraphicsPipe* pipe = window->get_pipe(); - const sgiGraphicsPipe* sgipipe; - if ( pipe->get_class_type() == sgiGraphicsPipe::get_class_type() ) - sgipipe = (sgiGraphicsPipe *)pipe; - else - { - cerr << "sgiHardwareChannel::Constructor() - window does not have " - << "an sgiGraphicsPipe!!!" << endl; - return; - } - - XSGIvcChannelInfo* channel_info = (XSGIvcChannelInfo *)_channel_info; - - XSGIvcQueryChannelInfo( (Display *)sgipipe->get_display(), - sgipipe->get_screen(), _id, &channel_info ); - if ( channel_info->active ) { - int screeny = DisplayHeight( (Display *)sgipipe->get_display(), - sgipipe->get_screen() ); - _xsize = channel_info->source.width; - _ysize = channel_info->source.height; - _xorg = channel_info->source.x; - _yorg = screeny - ( channel_info->source.y + _ysize ); - set_active(true); - } else { - set_active(false); - } -} diff --git a/panda/src/sgidisplay/sgiHardwareChannel.h b/panda/src/sgidisplay/sgiHardwareChannel.h deleted file mode 100644 index d7b3da57b3..0000000000 --- a/panda/src/sgidisplay/sgiHardwareChannel.h +++ /dev/null @@ -1,66 +0,0 @@ -// Filename: sgiHardwareChannel.h -// Created by: mike (09Jan97) -// -//////////////////////////////////////////////////////////////////// -// -// PANDA 3D SOFTWARE -// Copyright (c) 2001, Disney Enterprises, Inc. All rights reserved -// -// All use of this software is subject to the terms of the Panda 3d -// Software license. You should have received a copy of this license -// along with this source code; you will also find a current copy of -// the license at http://www.panda3d.org/license.txt . -// -// To contact the maintainers of this program write to -// panda3d@yahoogroups.com . -// -//////////////////////////////////////////////////////////////////// -#ifndef SGIHARDWARECHANNEL_H -#define SGIHARDWARECHANNEL_H -// -//////////////////////////////////////////////////////////////////// -// Includes -//////////////////////////////////////////////////////////////////// -#include - -#include - -//////////////////////////////////////////////////////////////////// -// Defines -//////////////////////////////////////////////////////////////////// - -//////////////////////////////////////////////////////////////////// -// Class : sgiHardwareChannel -// Description : -//////////////////////////////////////////////////////////////////// -class sgiHardwareChannel : public HardwareChannel -{ - public: - - sgiHardwareChannel( GraphicsWindow* window, int id ); - - protected: - - void *_channel_info; - - public: - - static TypeHandle get_class_type() { - return _type_handle; - } - static void init_type() { - HardwareChannel::init_type(); - register_type(_type_handle, "sgiHardwareChannel", - HardwareChannel::get_class_type()); - } - virtual TypeHandle get_type() const { - return get_class_type(); - } - virtual TypeHandle force_init_type() {init_type(); return get_class_type();} - - private: - - static TypeHandle _type_handle; -}; - -#endif diff --git a/panda/src/sgiglxdisplay/Sources.pp b/panda/src/sgiglxdisplay/Sources.pp deleted file mode 100644 index 0af000ac01..0000000000 --- a/panda/src/sgiglxdisplay/Sources.pp +++ /dev/null @@ -1,19 +0,0 @@ -#define BUILD_DIRECTORY $[and $[HAVE_SGIGL],$[HAVE_GLX]] - -#define OTHER_LIBS interrogatedb:c dconfig:c dtoolconfig:m \ - dtoolutil:c dtoolbase:c dtool:m - -#begin lib_target - #define TARGET sgiglxdisplay - #define LOCAL_LIBS \ - sgidisplay glxdisplay - - #define SOURCES \ - config_sgiglxdisplay.cxx config_sgiglxdisplay.h \ - sgiglxGraphicsPipe.cxx sgiglxGraphicsPipe.h - - #define INSTALL_HEADERS \ - sgiglxGraphicsPipe.h - -#end lib_target - diff --git a/panda/src/sgiglxdisplay/config_sgiglxdisplay.cxx b/panda/src/sgiglxdisplay/config_sgiglxdisplay.cxx deleted file mode 100644 index d16eae60d1..0000000000 --- a/panda/src/sgiglxdisplay/config_sgiglxdisplay.cxx +++ /dev/null @@ -1,31 +0,0 @@ -// Filename: config_sgiglxdisplay.cxx -// Created by: cary (07Oct99) -// -//////////////////////////////////////////////////////////////////// -// -// PANDA 3D SOFTWARE -// Copyright (c) 2001, Disney Enterprises, Inc. All rights reserved -// -// All use of this software is subject to the terms of the Panda 3d -// Software license. You should have received a copy of this license -// along with this source code; you will also find a current copy of -// the license at http://www.panda3d.org/license.txt . -// -// To contact the maintainers of this program write to -// panda3d@yahoogroups.com . -// -//////////////////////////////////////////////////////////////////// - -#include "config_sgiglxdisplay.h" -#include "sgiglxGraphicsPipe.h" - -#include - -Configure(config_sgiglxdisplay); -NotifyCategoryDef(sgiglxdisplay, "display"); - -ConfigureFn(config_sgiglxdisplay) { - SgiGlxGraphicsPipe::init_type(); - GraphicsPipe::get_factory().register_factory(SgiGlxGraphicsPipe::get_class_type(), - SgiGlxGraphicsPipe::make_sgiglxgraphicspipe); -} diff --git a/panda/src/sgiglxdisplay/config_sgiglxdisplay.h b/panda/src/sgiglxdisplay/config_sgiglxdisplay.h deleted file mode 100644 index 5295b17eeb..0000000000 --- a/panda/src/sgiglxdisplay/config_sgiglxdisplay.h +++ /dev/null @@ -1,27 +0,0 @@ -// Filename: config_sgiglxdisplay.h -// Created by: cary (07Oct99) -// -//////////////////////////////////////////////////////////////////// -// -// PANDA 3D SOFTWARE -// Copyright (c) 2001, Disney Enterprises, Inc. All rights reserved -// -// All use of this software is subject to the terms of the Panda 3d -// Software license. You should have received a copy of this license -// along with this source code; you will also find a current copy of -// the license at http://www.panda3d.org/license.txt . -// -// To contact the maintainers of this program write to -// panda3d@yahoogroups.com . -// -//////////////////////////////////////////////////////////////////// - -#ifndef CONFIG_SGIGLXDISPLAY_H -#define CONFIG_SGIGLXDISPLAY_H - -#include -#include - -NotifyCategoryDecl(sgiglxdisplay, EXPCL_PANDAGL, EXPTP_PANDAGL); - -#endif diff --git a/panda/src/sgiglxdisplay/sgiglxGraphicsPipe.cxx b/panda/src/sgiglxdisplay/sgiglxGraphicsPipe.cxx deleted file mode 100644 index b7db6443a4..0000000000 --- a/panda/src/sgiglxdisplay/sgiglxGraphicsPipe.cxx +++ /dev/null @@ -1,87 +0,0 @@ -// Filename: sgiglxGraphicsPipe.cxx -// Created by: cary (01Oct99) -// -//////////////////////////////////////////////////////////////////// -// -// PANDA 3D SOFTWARE -// Copyright (c) 2001, Disney Enterprises, Inc. All rights reserved -// -// All use of this software is subject to the terms of the Panda 3d -// Software license. You should have received a copy of this license -// along with this source code; you will also find a current copy of -// the license at http://www.panda3d.org/license.txt . -// -// To contact the maintainers of this program write to -// panda3d@yahoogroups.com . -// -//////////////////////////////////////////////////////////////////// - -//////////////////////////////////////////////////////////////////// -// Includes -//////////////////////////////////////////////////////////////////// -#include "sgiglxGraphicsPipe.h" -#include "config_sgiglxdisplay.h" - -#include - -TypeHandle SgiGlxGraphicsPipe::_type_handle; - -SgiGlxGraphicsPipe::SgiGlxGraphicsPipe(const PipeSpecifier& spec) - : sgiGraphicsPipe(spec), - glxDisplay(this, spec.get_X_specifier()) -{ -} - - -//////////////////////////////////////////////////////////////////// -// Function: SgiGlxGraphicsPipe::get_window_type -// Access: Public, Virtual -// Description: Returns the TypeHandle of the kind of window -// preferred by this kind of pipe. -//////////////////////////////////////////////////////////////////// -TypeHandle SgiGlxGraphicsPipe:: -get_window_type() const { - return glxGraphicsWindow::get_class_type(); -} - -//////////////////////////////////////////////////////////////////// -// Function: SgiGlxGraphicsPipe::get_glx_display -// Access: Public, Virtual -// Description: Returns the glxDisplay information associated with -// this pipe. -//////////////////////////////////////////////////////////////////// -glxDisplay *SgiGlxGraphicsPipe:: -get_glx_display() { - return this; -} - -GraphicsPipe *SgiGlxGraphicsPipe:: -make_sgiglxgraphicspipe(const FactoryParams ¶ms) { - GraphicsPipe::PipeSpec *pipe_param; - if (!get_param_into(pipe_param, params)) { - return new SgiGlxGraphicsPipe(PipeSpecifier()); - } else { - return new SgiGlxGraphicsPipe(pipe_param->get_specifier()); - } -} - -TypeHandle SgiGlxGraphicsPipe::get_class_type(void) { - return _type_handle; -} - -void SgiGlxGraphicsPipe::init_type(void) { - sgiGraphicsPipe::init_type(); - glxDisplay::init_type(); - register_type(_type_handle, "SgiGlxGraphicsPipe", - sgiGraphicsPipe::get_class_type(), - glxDisplay::get_class_type()); -} - -TypeHandle SgiGlxGraphicsPipe::get_type(void) const { - return get_class_type(); -} - -TypeHandle SgiGlxGraphicsPipe::force_init_type(void) { - init_type(); - return get_class_type(); -} diff --git a/panda/src/sgiglxdisplay/sgiglxGraphicsPipe.h b/panda/src/sgiglxdisplay/sgiglxGraphicsPipe.h deleted file mode 100644 index 544b749c14..0000000000 --- a/panda/src/sgiglxdisplay/sgiglxGraphicsPipe.h +++ /dev/null @@ -1,54 +0,0 @@ -// Filename: sgiglxGraphicsPipe.h -// Created by: cary (01Oct99) -// -//////////////////////////////////////////////////////////////////// -// -// PANDA 3D SOFTWARE -// Copyright (c) 2001, Disney Enterprises, Inc. All rights reserved -// -// All use of this software is subject to the terms of the Panda 3d -// Software license. You should have received a copy of this license -// along with this source code; you will also find a current copy of -// the license at http://www.panda3d.org/license.txt . -// -// To contact the maintainers of this program write to -// panda3d@yahoogroups.com . -// -//////////////////////////////////////////////////////////////////// - -#ifndef __SGIGLXGRAPHICSPIPE_H__ -#define __SGIGLXGRAPHICSPIPE_H__ - -//////////////////////////////////////////////////////////////////// -// Includes -//////////////////////////////////////////////////////////////////// -#include - -#include -#include - -//////////////////////////////////////////////////////////////////// -// Class : SgiGlxGraphicsPipe -// Description : This kind of pipe can create glx windows but -// supports the functionality of an sgi pipe with -// hardware channels -//////////////////////////////////////////////////////////////////// -class SgiGlxGraphicsPipe : public sgiGraphicsPipe, public glxDisplay { -public: - SgiGlxGraphicsPipe( const PipeSpecifier& ); - - virtual TypeHandle get_window_type() const; - virtual glxDisplay *get_glx_display(); - - static GraphicsPipe* make_sgiglxgraphicspipe(const FactoryParams ¶ms); - - static TypeHandle get_class_type( void ); - static void init_type( void ); - virtual TypeHandle get_type( void ) const; - virtual TypeHandle force_init_type( void ); - -private: - static TypeHandle _type_handle; -}; - -#endif /* __SGIGLXGRAPHICSPIPE_H__ */