From b0c4256e908fbebf82b38683197d401ad4bd3251 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Thu, 5 Dec 2002 12:43:08 +0000 Subject: [PATCH] Norman Vine's changes for gcc 3.2 under Cygwin, moving of SG_EXPORT to after the extern declaration. --- include/osg/GLExtensions | 4 ++-- include/osg/Image | 4 ++-- include/osg/MemoryManager | 48 ++++++++++++++++++------------------- include/osg/Notify | 14 +++++------ include/osgDB/FileNameUtils | 14 +++++------ include/osgDB/FileUtils | 12 +++++----- include/osgDB/ReadFile | 8 +++---- include/osgDB/WriteFile | 6 ++--- 8 files changed, 55 insertions(+), 55 deletions(-) diff --git a/include/osg/GLExtensions b/include/osg/GLExtensions index 6a4165c0d..e929fbba4 100644 --- a/include/osg/GLExtensions +++ b/include/osg/GLExtensions @@ -23,7 +23,7 @@ namespace osg { * note: Must only called within a valid OpenGL context, * undefined behavior may occur otherwise. */ -SG_EXPORT extern bool isGLExtensionSupported(const char *extension); +extern SG_EXPORT bool isGLExtensionSupported(const char *extension); /** return the address of the specified OpenGL function. * return NULL if function not supported by OpenGL library. @@ -66,7 +66,7 @@ inline void* getGLExtensionFuncPtr(const char *funcName,const char *fallbackFunc * note: Must only called within a valid OpenGL context, * undefined behavior may occur otherwise. */ -SG_EXPORT extern bool isGLUExtensionSupported(const char *extension); +extern SG_EXPORT bool isGLUExtensionSupported(const char *extension); } diff --git a/include/osg/Image b/include/osg/Image index 4bed87e05..b1f762a2a 100644 --- a/include/osg/Image +++ b/include/osg/Image @@ -229,12 +229,12 @@ class Geode; * to return for readNode(). * Use the images s and t values scale the dimensions of the image. */ -SG_EXPORT extern Geode* createGeodeForImage(Image* image); +extern SG_EXPORT Geode* createGeodeForImage(Image* image); /** Convenience function to be used by images loaders to generate a valid geode * to return for readNode(). * Use the specified s and t values scale the dimensions of the image. */ -SG_EXPORT extern Geode* createGeodeForImage(Image* image,float s,float t); +extern SG_EXPORT Geode* createGeodeForImage(Image* image,float s,float t); } diff --git a/include/osg/MemoryManager b/include/osg/MemoryManager index d5f20bd50..7c7c85f87 100644 --- a/include/osg/MemoryManager +++ b/include/osg/MemoryManager @@ -60,63 +60,63 @@ typedef struct // External constants // --------------------------------------------------------------------------------------------------------------------------------- -SG_EXPORT extern const unsigned int m_alloc_unknown; -SG_EXPORT extern const unsigned int m_alloc_new; -SG_EXPORT extern const unsigned int m_alloc_new_array; -SG_EXPORT extern const unsigned int m_alloc_malloc; -SG_EXPORT extern const unsigned int m_alloc_calloc; -SG_EXPORT extern const unsigned int m_alloc_realloc; -SG_EXPORT extern const unsigned int m_alloc_delete; -SG_EXPORT extern const unsigned int m_alloc_delete_array; -SG_EXPORT extern const unsigned int m_alloc_free; +extern SG_EXPORT const unsigned int m_alloc_unknown; +extern SG_EXPORT const unsigned int m_alloc_new; +extern SG_EXPORT const unsigned int m_alloc_new_array; +extern SG_EXPORT const unsigned int m_alloc_malloc; +extern SG_EXPORT const unsigned int m_alloc_calloc; +extern SG_EXPORT const unsigned int m_alloc_realloc; +extern SG_EXPORT const unsigned int m_alloc_delete; +extern SG_EXPORT const unsigned int m_alloc_delete_array; +extern SG_EXPORT const unsigned int m_alloc_free; // --------------------------------------------------------------------------------------------------------------------------------- // Used by the macros // --------------------------------------------------------------------------------------------------------------------------------- -SG_EXPORT extern void m_setOwner(const char *file, unsigned int line); +extern SG_EXPORT void m_setOwner(const char *file, unsigned int line); // --------------------------------------------------------------------------------------------------------------------------------- // Allocation breakpoints // --------------------------------------------------------------------------------------------------------------------------------- -SG_EXPORT extern bool &m_breakOnRealloc(void *reportedAddress); -SG_EXPORT extern bool &m_breakOnDealloc(void *reportedAddress); -SG_EXPORT extern void m_breakOnAllocation(unsigned int count); +extern SG_EXPORT bool &m_breakOnRealloc(void *reportedAddress); +extern SG_EXPORT bool &m_breakOnDealloc(void *reportedAddress); +extern SG_EXPORT void m_breakOnAllocation(unsigned int count); // --------------------------------------------------------------------------------------------------------------------------------- // The meat of the memory tracking software // --------------------------------------------------------------------------------------------------------------------------------- -SG_EXPORT extern void *m_allocator(const char *sourceFile, unsigned int sourceLine, +extern SG_EXPORT void *m_allocator(const char *sourceFile, unsigned int sourceLine, unsigned int allocationType, const size_t reportedSize); -SG_EXPORT extern void *m_reallocator(const char *sourceFile, unsigned int sourceLine, +extern SG_EXPORT void *m_reallocator(const char *sourceFile, unsigned int sourceLine, unsigned int reallocationType, const size_t reportedSize, void *reportedAddress); -SG_EXPORT extern void m_deallocator(const char *sourceFile, unsigned int sourceLine, +extern SG_EXPORT void m_deallocator(const char *sourceFile, unsigned int sourceLine, unsigned int deallocationType, const void *reportedAddress); // --------------------------------------------------------------------------------------------------------------------------------- // Utilitarian functions // --------------------------------------------------------------------------------------------------------------------------------- -SG_EXPORT extern bool m_validateAddress(const void *reportedAddress); -SG_EXPORT extern bool m_validateAllocUnit(const sAllocUnit *allocUnit); -SG_EXPORT extern bool m_validateAllAllocUnits(); +extern SG_EXPORT bool m_validateAddress(const void *reportedAddress); +extern SG_EXPORT bool m_validateAllocUnit(const sAllocUnit *allocUnit); +extern SG_EXPORT bool m_validateAllAllocUnits(); // --------------------------------------------------------------------------------------------------------------------------------- // Unused RAM calculations // --------------------------------------------------------------------------------------------------------------------------------- -SG_EXPORT extern unsigned int m_calcUnused(const sAllocUnit *allocUnit); -SG_EXPORT extern unsigned int m_calcAllUnused(); +extern SG_EXPORT unsigned int m_calcUnused(const sAllocUnit *allocUnit); +extern SG_EXPORT unsigned int m_calcAllUnused(); // --------------------------------------------------------------------------------------------------------------------------------- // Logging and reporting // --------------------------------------------------------------------------------------------------------------------------------- -SG_EXPORT extern void m_dumpAllocUnit(const sAllocUnit *allocUnit, const char *prefix = ""); -SG_EXPORT extern void m_dumpMemoryReport(const char *filename = "memreport.log", bool overwrite = true); -SG_EXPORT extern sMStats m_getMemoryStatistics(); +extern SG_EXPORT void m_dumpAllocUnit(const sAllocUnit *allocUnit, const char *prefix = ""); +extern SG_EXPORT void m_dumpMemoryReport(const char *filename = "memreport.log", bool overwrite = true); +extern SG_EXPORT sMStats m_getMemoryStatistics(); // --------------------------------------------------------------------------------------------------------------------------------- // Variations of global operators new & delete diff --git a/include/osg/Notify b/include/osg/Notify index 26096e25d..fe12f6e5e 100644 --- a/include/osg/Notify +++ b/include/osg/Notify @@ -30,24 +30,24 @@ enum NotifySeverity { }; /** global notify level. */ -//SG_EXPORT extern NotifySeverity g_NotifyLevel; +//extern SG_EXPORT NotifySeverity g_NotifyLevel; /** global notify nul stream. added for Mac OSX */ -//SG_EXPORT extern std::auto_ptr g_NotifyNulStream; +//extern SG_EXPORT std::auto_ptr g_NotifyNulStream; /** global notify nul stream. added for Mac OSX */ -//SG_EXPORT extern bool g_NotifyInit; +//extern SG_EXPORT bool g_NotifyInit; /** set the notify level, overriding the default or value set by * the environmental variable OSGNOTIFYLEVEL. */ -SG_EXPORT extern void setNotifyLevel(NotifySeverity severity); +extern SG_EXPORT void setNotifyLevel(NotifySeverity severity); /** get the notify level. */ -SG_EXPORT extern NotifySeverity getNotifyLevel(); +extern SG_EXPORT NotifySeverity getNotifyLevel(); /** initialize notify level. */ -SG_EXPORT extern bool initNotifyLevel(); +extern SG_EXPORT bool initNotifyLevel(); /** notify messaging function for providing fatal through to verbose * debugging messages. Level of messages sent to the console can @@ -69,7 +69,7 @@ SG_EXPORT extern bool initNotifyLevel(); // previous implementation was causing Mac OSX to misbehave. This version // places less stress on compiler and runs on Mac -SG_EXPORT extern std::ostream& notify(const NotifySeverity severity); +extern SG_EXPORT std::ostream& notify(const NotifySeverity severity); // { // static bool initilized = false; // if (!initilized) initilized = initNotifyLevel(); diff --git a/include/osgDB/FileNameUtils b/include/osgDB/FileNameUtils index c72d07843..78230a469 100644 --- a/include/osgDB/FileNameUtils +++ b/include/osgDB/FileNameUtils @@ -11,14 +11,14 @@ namespace osgDB { -OSGDB_EXPORT extern std::string getFilePath(const std::string& filename); -OSGDB_EXPORT extern std::string getFileExtension(const std::string& filename); -OSGDB_EXPORT extern std::string getLowerCaseFileExtension(const std::string& filename); -OSGDB_EXPORT extern std::string getSimpleFileName(const std::string& fileName); -OSGDB_EXPORT extern std::string getStrippedName(const std::string& fileName); +extern OSGDB_EXPORT std::string getFilePath(const std::string& filename); +extern OSGDB_EXPORT std::string getFileExtension(const std::string& filename); +extern OSGDB_EXPORT std::string getLowerCaseFileExtension(const std::string& filename); +extern OSGDB_EXPORT std::string getSimpleFileName(const std::string& fileName); +extern OSGDB_EXPORT std::string getStrippedName(const std::string& fileName); -OSGDB_EXPORT extern bool equalCaseInsensitive(const std::string& lhs,const std::string& rhs); -OSGDB_EXPORT extern bool equalCaseInsensitive(const std::string& lhs,const char* rhs); +extern OSGDB_EXPORT bool equalCaseInsensitive(const std::string& lhs,const std::string& rhs); +extern OSGDB_EXPORT bool equalCaseInsensitive(const std::string& lhs,const char* rhs); } diff --git a/include/osgDB/FileUtils b/include/osgDB/FileUtils index 36fded291..811de84cb 100644 --- a/include/osgDB/FileUtils +++ b/include/osgDB/FileUtils @@ -16,25 +16,25 @@ namespace osgDB { /** return true if a file exisits. */ -OSGDB_EXPORT extern bool fileExists(const std::string& filename); +extern OSGDB_EXPORT bool fileExists(const std::string& filename); /** find specified file in specified file path.*/ -OSGDB_EXPORT extern std::string findFileInPath(const std::string& filename, const FilePathList& filePath); +extern OSGDB_EXPORT std::string findFileInPath(const std::string& filename, const FilePathList& filePath); /** return the directory/filename of a file if its is contained within specified directory. * return "" if directory does not contain file. If caseInsensitive is set to true then * a case insensitive comparison is used to compare fileName to directory contents. * This is useful when unix programs attempt read case insentive windows filenames. */ -OSGDB_EXPORT extern std::string findFileInDirectory(const std::string& fileName,const std::string& dirName,bool caseInsensitive=false); +extern OSGDB_EXPORT std::string findFileInDirectory(const std::string& fileName,const std::string& dirName,bool caseInsensitive=false); /** simple list of names to represent a directory's contents. */ typedef std::vector DirectoryContents; /** return the contents of a directory. * returns an empty array on any error.*/ -OSGDB_EXPORT extern DirectoryContents getDirectoryContents(const std::string& dirName); +extern OSGDB_EXPORT DirectoryContents getDirectoryContents(const std::string& dirName); @@ -44,7 +44,7 @@ inline void setDataFilePathList(const std::string& paths) { osgDB::Registry::ins inline FilePathList& getDataFilePathList() { return osgDB::Registry::instance()->getDataFilePathList(); } -OSGDB_EXPORT extern std::string findDataFile(const std::string& filename); +extern OSGDB_EXPORT std::string findDataFile(const std::string& filename); /** Convinience class for pushing a path on construction, and popping the path * and destruction. This helps keep the addition of a path local to a block @@ -70,7 +70,7 @@ inline void setLibraryFilePathList(const std::string& paths) { osgDB::Registry:: inline FilePathList& getLibraryFilePathList() { return osgDB::Registry::instance()->getLibraryFilePathList(); } -OSGDB_EXPORT extern std::string findLibraryFile(const std::string& filename); +extern OSGDB_EXPORT std::string findLibraryFile(const std::string& filename); } diff --git a/include/osgDB/ReadFile b/include/osgDB/ReadFile index 172d21ada..763c5a9ab 100644 --- a/include/osgDB/ReadFile +++ b/include/osgDB/ReadFile @@ -20,7 +20,7 @@ namespace osgDB { * The osgDB::Registry is used to load the appropriate ReaderWriter plugin * for the filename extension, and this plugin then handles the request * to read the specified file.*/ -OSGDB_EXPORT extern osg::Object* readObjectFile(const std::string& filename); +extern OSGDB_EXPORT osg::Object* readObjectFile(const std::string& filename); /** Read an osg::Image from file. * Return valid osg::Image on success, @@ -28,7 +28,7 @@ OSGDB_EXPORT extern osg::Object* readObjectFile(const std::string& filename); * The osgDB::Registry is used to load the appropriate ReaderWriter plugin * for the filename extension, and this plugin then handles the request * to read the specified file.*/ -OSGDB_EXPORT extern osg::Image* readImageFile(const std::string& filename); +extern OSGDB_EXPORT osg::Image* readImageFile(const std::string& filename); /** Read an osg::Node from file. * Return valid osg::Node on success, @@ -36,11 +36,11 @@ OSGDB_EXPORT extern osg::Image* readImageFile(const std::string& filename); * The osgDB::Registry is used to load the appropriate ReaderWriter plugin * for the filename extension, and this plugin then handles the request * to read the specified file.*/ -OSGDB_EXPORT extern osg::Node* readNodeFile(const std::string& filename); +extern OSGDB_EXPORT osg::Node* readNodeFile(const std::string& filename); /** Read an osg::Node subgraph from files, creating a osg::Group to contain the nodes if more * than one subgraph has been loaded.*/ -OSGDB_EXPORT extern osg::Node* readNodeFiles(std::vector& commandLine); +extern OSGDB_EXPORT osg::Node* readNodeFiles(std::vector& commandLine); } diff --git a/include/osgDB/WriteFile b/include/osgDB/WriteFile index bc5b75292..bc8236ee1 100644 --- a/include/osgDB/WriteFile +++ b/include/osgDB/WriteFile @@ -21,7 +21,7 @@ namespace osgDB { * for the filename extension, and this plugin then handles the request * to write the specified file.*/ -OSGDB_EXPORT extern bool writeObjectFile(const osg::Object& object, const std::string& filename); +extern OSGDB_EXPORT bool writeObjectFile(const osg::Object& object, const std::string& filename); /** Write an osg::Image to file. * Return true on success, @@ -29,7 +29,7 @@ OSGDB_EXPORT extern bool writeObjectFile(const osg::Object& object, const std::s * The osgDB::Registry is used to load the appropriate ReaderWriter plugin * for the filename extension, and this plugin then handles the request * to write the specified file.*/ -OSGDB_EXPORT extern bool writeImageFile(const osg::Image& image, const std::string& filename); +extern OSGDB_EXPORT bool writeImageFile(const osg::Image& image, const std::string& filename); /** Write an osg::Node to file. * Return true on success, @@ -37,7 +37,7 @@ OSGDB_EXPORT extern bool writeImageFile(const osg::Image& image, const std::stri * The osgDB::Registry is used to load the appropriate ReaderWriter plugin * for the filename extension, and this plugin then handles the request * to write the specified file.*/ -OSGDB_EXPORT extern bool writeNodeFile(const osg::Node& node, const std::string& filename); +extern OSGDB_EXPORT bool writeNodeFile(const osg::Node& node, const std::string& filename); }