[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [55882] trunk/lib/darwin-9.x.universal/ openimageio: OSX: update OIIO to 1.1.9 (prerequisite for osl 1.3)

jens verwiebe info at jensverwiebe.de
Sun Apr 7 16:28:28 CEST 2013


Revision: 55882
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=55882
Author:   jensverwiebe
Date:     2013-04-07 14:28:28 +0000 (Sun, 07 Apr 2013)
Log Message:
-----------
OSX: update OIIO to 1.1.9 (prerequisite for osl 1.3)

Modified Paths:
--------------
    trunk/lib/darwin-9.x.universal/openimageio/include/OpenImageIO/argparse.h
    trunk/lib/darwin-9.x.universal/openimageio/include/OpenImageIO/color.h
    trunk/lib/darwin-9.x.universal/openimageio/include/OpenImageIO/errorhandler.h
    trunk/lib/darwin-9.x.universal/openimageio/include/OpenImageIO/export.h
    trunk/lib/darwin-9.x.universal/openimageio/include/OpenImageIO/filesystem.h
    trunk/lib/darwin-9.x.universal/openimageio/include/OpenImageIO/filter.h
    trunk/lib/darwin-9.x.universal/openimageio/include/OpenImageIO/fmath.h
    trunk/lib/darwin-9.x.universal/openimageio/include/OpenImageIO/hash.h
    trunk/lib/darwin-9.x.universal/openimageio/include/OpenImageIO/imagebuf.h
    trunk/lib/darwin-9.x.universal/openimageio/include/OpenImageIO/imagebufalgo.h
    trunk/lib/darwin-9.x.universal/openimageio/include/OpenImageIO/imagecache.h
    trunk/lib/darwin-9.x.universal/openimageio/include/OpenImageIO/imageio.h
    trunk/lib/darwin-9.x.universal/openimageio/include/OpenImageIO/paramlist.h
    trunk/lib/darwin-9.x.universal/openimageio/include/OpenImageIO/plugin.h
    trunk/lib/darwin-9.x.universal/openimageio/include/OpenImageIO/pugiconfig.hpp
    trunk/lib/darwin-9.x.universal/openimageio/include/OpenImageIO/strutil.h
    trunk/lib/darwin-9.x.universal/openimageio/include/OpenImageIO/sysutil.h
    trunk/lib/darwin-9.x.universal/openimageio/include/OpenImageIO/texture.h
    trunk/lib/darwin-9.x.universal/openimageio/include/OpenImageIO/thread.h
    trunk/lib/darwin-9.x.universal/openimageio/include/OpenImageIO/timer.h
    trunk/lib/darwin-9.x.universal/openimageio/include/OpenImageIO/typedesc.h
    trunk/lib/darwin-9.x.universal/openimageio/include/OpenImageIO/ustring.h
    trunk/lib/darwin-9.x.universal/openimageio/include/OpenImageIO/version.h
    trunk/lib/darwin-9.x.universal/openimageio/lib/libOpenImageIO.a

Modified: trunk/lib/darwin-9.x.universal/openimageio/include/OpenImageIO/argparse.h
===================================================================
--- trunk/lib/darwin-9.x.universal/openimageio/include/OpenImageIO/argparse.h	2013-04-07 14:25:10 UTC (rev 55881)
+++ trunk/lib/darwin-9.x.universal/openimageio/include/OpenImageIO/argparse.h	2013-04-07 14:28:28 UTC (rev 55882)
@@ -142,7 +142,7 @@
 /////////////////////////////////////////////////////////////////////////////
 
 
-class DLLPUBLIC ArgParse {
+class OIIO_API ArgParse {
 public:
     ArgParse (int argc=0, const char **argv=NULL);
     ~ArgParse ();

Modified: trunk/lib/darwin-9.x.universal/openimageio/include/OpenImageIO/color.h
===================================================================
--- trunk/lib/darwin-9.x.universal/openimageio/include/OpenImageIO/color.h	2013-04-07 14:25:10 UTC (rev 55881)
+++ trunk/lib/darwin-9.x.universal/openimageio/include/OpenImageIO/color.h	2013-04-07 14:28:28 UTC (rev 55882)
@@ -42,7 +42,7 @@
 /// ColorConfig::createColorProcessor, and referenced in ImageBufAlgo
 /// (amongst other places)
 
-class DLLPUBLIC ColorProcessor;
+class OIIO_API ColorProcessor;
 
 
 
@@ -56,7 +56,7 @@
 /// NOTE: ColorConfig(s) and ColorProcessor(s) are potentially heavy-weight.
 /// Their construction / destruction should be kept to a minimum.
 
-class DLLPUBLIC ColorConfig
+class OIIO_API ColorConfig
 {
 public:
     /// If OpenColorIO is enabled at build time, initialize with the current

Modified: trunk/lib/darwin-9.x.universal/openimageio/include/OpenImageIO/errorhandler.h
===================================================================
--- trunk/lib/darwin-9.x.universal/openimageio/include/OpenImageIO/errorhandler.h	2013-04-07 14:25:10 UTC (rev 55881)
+++ trunk/lib/darwin-9.x.universal/openimageio/include/OpenImageIO/errorhandler.h	2013-04-07 14:28:28 UTC (rev 55882)
@@ -57,7 +57,7 @@
 /// different behavior from the default console output) and make all
 /// error-like output via the ErrorHandler*.
 ///
-class DLLPUBLIC ErrorHandler {
+class OIIO_API ErrorHandler {
 public:
     /// Error categories.  We use broad categories in the high order bits.
     /// A library may just use these categories, or may create individual

Modified: trunk/lib/darwin-9.x.universal/openimageio/include/OpenImageIO/export.h
===================================================================
--- trunk/lib/darwin-9.x.universal/openimageio/include/OpenImageIO/export.h	2013-04-07 14:25:10 UTC (rev 55881)
+++ trunk/lib/darwin-9.x.universal/openimageio/include/OpenImageIO/export.h	2013-04-07 14:28:28 UTC (rev 55882)
@@ -33,8 +33,7 @@
 #define OPENIMAGEIO_EXPORT_H
 
 /// \file
-/// DLLPUBLIC and DLLEXPORT macros that are necessary for proper symbol
-/// export when doing multi-platform development.
+/// Macros necessary for proper symbol export from dynamic libraries.
 
 
 ///
@@ -51,47 +50,51 @@
 /// dilemma since the same header file is used by both the library and
 /// its clients.  Sheesh!
 ///
+/// But on Linux/OSX as well, we want to only have the DSO export the
+/// symbols we designate as the public interface.  So we link with
+/// -fvisibility=hidden to default to hiding the symbols.  See
+/// http://gcc.gnu.org/wiki/Visibility
+///
 /// We solve this awful mess by defining these macros:
 ///
-/// DLLPUBLIC - normally, assumes that it's being seen by a client
-///             of the library, and therefore declare as 'imported'.
-///             But if DLL_EXPORT_PUBLIC is defined, change the declaration
-///             to 'exported' -- you want to define this macro when
-///             compiling the module that actually defines the class.
+/// OIIO_API - used for the OpenImageIO public API.  Normally, assumes
+///               that it's being seen by a client of the library, and
+///               therefore declare as 'imported'.  But if
+///               OpenImageIO_EXPORT is defined (as is done by CMake
+///               when compiling the library itself), change the
+///               declaration to 'exported'.
+/// OIIO_EXPORT - explicitly exports a symbol that isn't part of the 
+///               public API but still needs to be visible.
+/// OIIO_LOCAL -  explicitly hides a symbol that might otherwise be
+///               exported
 ///
-/// DLLEXPORT - tag a symbol as exported from its DLL and therefore
-///             visible from any app that links against the DLL.  Do this
-///             only if you don't need to call the routine from within
-///             a different compilation module within the same DLL.  Or,
-///             if you just don't want to worry about the whole
-///             DLL_EXPORT_PUBLIC mess, and use this everywhere without
-///             fretting about the minor perf hit of not using 'import'.
-///
-/// Note that on Linux, all symbols are exported so this just isn't a
-/// problem, so we define these macros to be nothing.
-///
-/// It's a shame that we have to clutter all our header files with these
-/// stupid macros just because the Windows world is such a mess.
-///
+/// 
 
-#ifndef DLLEXPORT
-#  if defined(_MSC_VER) && defined(_WIN32)
-#    define DLLEXPORT __declspec(dllexport)
-#  else
-#    define DLLEXPORT
-#  endif
+#if defined(_MSC_VER) || defined(__CYGWIN__)
+  #define OIIO_IMPORT __declspec(dllimport)
+  #define OIIO_EXPORT __declspec(dllexport)
+  #define OIIO_LOCAL
+#else
+  #if __GNUC__ >= 4
+    #define OIIO_IMPORT __attribute__ ((visibility ("default")))
+    #define OIIO_EXPORT __attribute__ ((visibility ("default")))
+    #define OIIO_LOCAL  __attribute__ ((visibility ("hidden")))
+  #else
+    #define OIIO_IMPORT
+    #define OIIO_EXPORT
+    #define OIIO_LOCAL
+  #endif
 #endif
 
-#ifndef DLLPUBLIC
-#  if defined(_MSC_VER) && defined(_WIN32) && !defined (OIIO_STATIC_BUILD)
-#    ifdef OpenImageIO_EXPORTS
-#      define DLLPUBLIC __declspec(dllexport)
-#    else
-#      define DLLPUBLIC __declspec(dllimport)
-#    endif
-#  else
-#    define DLLPUBLIC
-#  endif
+#if defined(OpenImageIO_EXPORTS)
+#  define OIIO_API OIIO_EXPORT
+#else
+#  define OIIO_API OIIO_IMPORT
 #endif
 
+
+// Back compatibility macros (DEPRECATED)
+#define DLLPUBLIC OIIO_API
+#define DLLEXPORT OIIO_EXPORT
+
 #endif // OPENIMAGEIO_EXPORT_H

Modified: trunk/lib/darwin-9.x.universal/openimageio/include/OpenImageIO/filesystem.h
===================================================================
--- trunk/lib/darwin-9.x.universal/openimageio/include/OpenImageIO/filesystem.h	2013-04-07 14:25:10 UTC (rev 55881)
+++ trunk/lib/darwin-9.x.universal/openimageio/include/OpenImageIO/filesystem.h	2013-04-07 14:28:28 UTC (rev 55882)
@@ -66,11 +66,11 @@
 
 /// Return the filename (excluding any directories, but including the
 /// file extension, if any) of a filepath.
-DLLPUBLIC std::string filename (const std::string &filepath);
+OIIO_API std::string filename (const std::string &filepath);
 
 /// Return the file extension (including the last '.' if
 /// include_dot=true) of a filename or filepath.
-DLLPUBLIC std::string extension (const std::string &filepath,
+OIIO_API std::string extension (const std::string &filepath,
                                  bool include_dot=true);
 
 /// DEPRECATED.
@@ -78,10 +78,15 @@
     return extension (filepath, false);
 }
 
+/// Return all but the last part of the path, for example,
+/// parent_path("foo/bar") returns "foo", and parent_path("foo")
+/// returns "".
+OIIO_API std::string parent_path (const std::string &filepath);
+
 /// Replace the file extension of a filename or filepath. Does not alter
 /// filepath, just returns a new string.  Note that the new_extension
 /// should contain a leading '.' dot.
-DLLPUBLIC std::string replace_extension (const std::string &filepath, 
+OIIO_API std::string replace_extension (const std::string &filepath, 
                                          const std::string &new_extension);
 
 /// Turn a searchpath (multiple directory paths separated by ':' or ';')
@@ -89,7 +94,7 @@
 /// validonly is true, only existing and readable directories will end
 /// up in the list.  N.B., the directory names will not have trailing
 /// slashes.
-DLLPUBLIC void searchpath_split (const std::string &searchpath,
+OIIO_API void searchpath_split (const std::string &searchpath,
                                  std::vector<std::string> &dirs,
                                  bool validonly = false);
 
@@ -102,67 +107,78 @@
 /// recursive is true, the directories will be searched recursively,
 /// finding a matching file in any subdirectory of the directories
 /// listed in dirs; otherwise.
-DLLPUBLIC std::string searchpath_find (const std::string &filename,
+OIIO_API std::string searchpath_find (const std::string &filename,
                                        const std::vector<std::string> &dirs,
                                        bool testcwd = true,
                                        bool recursive = false);
 
+/// Fill a vector-of-strings with the names of all files contained by
+/// directory dirname.  If recursive is true, it will return all files
+/// below the directory (even in subdirectories), but if recursive is
+/// false (the default)If filter_regex is supplied and non-empty, only
+/// filenames matching the regular expression will be returned.  Return
+/// true if ok, false if there was an error (such as dirname not being
+/// found or not actually being a directory).
+OIIO_API bool get_directory_entries (const std::string &dirname,
+                               std::vector<std::string> &filenames,
+                               bool recursive = false,
+                               const std::string &filter_regex=std::string());
+
 /// Return true if the path is an "absolute" (not relative) path.
 /// If 'dot_is_absolute' is true, consider "./foo" absolute.
-DLLPUBLIC bool path_is_absolute (const std::string &path,
+OIIO_API bool path_is_absolute (const std::string &path,
                                  bool dot_is_absolute=false);
 
-
 /// Return true if the file exists.
 ///
-DLLPUBLIC bool exists (const std::string &path);
+OIIO_API bool exists (const std::string &path);
 
 
 /// Return true if the file exists and is a directory.
 ///
-DLLPUBLIC bool is_directory (const std::string &path);
+OIIO_API bool is_directory (const std::string &path);
 
 /// Return true if the file exists and is a regular file.
 ///
-DLLPUBLIC bool is_regular (const std::string &path);

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list