Author: bonefish Date: 2011-06-14 13:29:08 +0200 (Tue, 14 Jun 2011) New Revision: 42178 Changeset: https://dev.haiku-os.org/changeset/42178 Modified: haiku/trunk/src/kits/storage/Resources.cpp Log: BResources::SetToImage(): Compile conditionally based on HAIKU_TARGET_PLATFORM_HAIKU, so the file can also be compiled for the host platform. Modified: haiku/trunk/src/kits/storage/Resources.cpp =================================================================== --- haiku/trunk/src/kits/storage/Resources.cpp 2011-06-14 11:27:24 UTC (rev 42177) +++ haiku/trunk/src/kits/storage/Resources.cpp 2011-06-14 11:29:08 UTC (rev 42178) @@ -60,7 +60,7 @@ \param clobber if \c true, the file's resources are truncated to size 0 */ BResources::BResources(const BFile* file, bool clobber) - : + : fFile(), fContainer(NULL), fResourceFile(NULL), @@ -247,7 +247,7 @@ // delegate the actual work return SetTo(&file, clobber); } - + // SetToImage /*! \brief Re-initialized the BResources object to represent the resources of the file from which the specified image has been loaded. @@ -262,6 +262,7 @@ status_t BResources::SetToImage(image_id image, bool clobber) { +#ifdef HAIKU_TARGET_PLATFORM_HAIKU // get an image info image_info info; status_t error = get_image_info(image, &info); @@ -272,8 +273,11 @@ // delegate the actual work return SetTo(info.name, clobber); +#else // HAIKU_TARGET_PLATFORM_HAIKU + return B_NOT_SUPPORTED; +#endif } - + /*! \brief Re-initialized the BResources object to represent the resources of the file from which the specified image has been loaded. The image belongs to the current team and is identified by a pointer into @@ -291,6 +295,7 @@ status_t BResources::SetToImage(const void* codeOrDataPointer, bool clobber) { +#ifdef HAIKU_TARGET_PLATFORM_HAIKU if (!codeOrDataPointer) return B_BAD_VALUE; @@ -309,6 +314,9 @@ } return B_ENTRY_NOT_FOUND; +#else // HAIKU_TARGET_PLATFORM_HAIKU + return B_NOT_SUPPORTED; +#endif } // Unset