From: Jakub Bogusz Date: Sun, 5 Dec 2004 13:10:14 +0000 (+0000) Subject: - fix __nothrow__ in C code (needed by gcc 3.3+) X-Git-Tag: auto/ac/avifile-0_7_41-1~2 X-Git-Url: https://git.pld-linux.org/?a=commitdiff_plain;ds=sidebyside;h=63e0c8db370d85df1ad3d0141776e6ff937806fd;p=packages%2Favifile.git - fix __nothrow__ in C code (needed by gcc 3.3+) Changed files: avifile-nth.patch -> 1.1 --- diff --git a/avifile-nth.patch b/avifile-nth.patch new file mode 100644 index 0000000..e2b0b4f --- /dev/null +++ b/avifile-nth.patch @@ -0,0 +1,197 @@ +--- avifile-0.7-0.7.41/include/utils.h.orig 2002-09-24 09:19:22.000000000 +0200 ++++ avifile-0.7-0.7.41/include/utils.h 2004-12-05 03:48:50.781020072 +0100 +@@ -38,7 +38,7 @@ + * function to retrieve/store data in machine independent format + * - right now dump implementation - as we could check functionality + */ +-static inline uint16_t avm_get_le16(const void* p) __THROW { ++static inline uint16_t __NTH(avm_get_le16(const void* p)) { + #ifdef WORDS_BIGENDIAN + const uint8_t* c = (const uint8_t*) p; + return c[0] | c[1] << 8; +@@ -47,7 +47,7 @@ + #endif + } + +-static inline uint8_t* avm_set_le16(void* p, uint16_t v) __THROW { ++static inline uint8_t* __NTH(avm_set_le16(void* p, uint16_t v)) { + uint8_t* b = (uint8_t*) p; + #ifdef WORDS_BIGENDIAN + b[0] = v & 0xff; +@@ -58,7 +58,7 @@ + return b; + } + +-static inline uint32_t avm_get_le32(const void* p) __THROW { ++static inline uint32_t __NTH(avm_get_le32(const void* p)) { + #ifdef WORDS_BIGENDIAN + const uint8_t* c = (const uint8_t*) p; + return c[0] | c[1] << 8 | c[2] << 16 | c[3] << 24; +@@ -67,7 +67,7 @@ + #endif + } + +-static inline uint8_t* avm_set_le32(void* p, uint32_t v) __THROW { ++static inline uint8_t* __NTH(avm_set_le32(void* p, uint32_t v)) { + uint8_t* b = (uint8_t*) p; + #ifdef WORDS_BIGENDIAN + b[0] = v & 0xff; +@@ -80,7 +80,7 @@ + return b; + } + +-static inline uint64_t avm_get_le64(const void* p) __THROW { ++static inline uint64_t __NTH(avm_get_le64(const void* p)) { + #ifdef WORDS_BIGENDIAN + const uint8_t* c = (const uint8_t*) p; + return avm_get_le32(c) | (((uint64_t)avm_get_le32(c + 4)) << 32); +@@ -89,7 +89,7 @@ + #endif + } + +-static inline uint16_t avm_get_be16(const void* p) __THROW { ++static inline uint16_t __NTH(avm_get_be16(const void* p)) { + #ifdef WORDS_BIGENDIAN + return *(const uint16_t*)p; + #else +@@ -98,14 +98,14 @@ + #endif + } + +-static inline uint8_t* avm_set_be16(void* p, uint16_t v) __THROW { ++static inline uint8_t* __NTH(avm_set_be16(void* p, uint16_t v)) { + uint8_t* b = (uint8_t*) p; + b[0] = (v >> 8) & 0xff; + b[1] = v & 0xff; + return b; + } + +-static inline uint32_t avm_get_be32(const void* p) __THROW { ++static inline uint32_t __NTH(avm_get_be32(const void* p)) { + #ifdef WORDS_BIGENDIAN + return *(const uint32_t*)p; + #else +@@ -114,7 +114,7 @@ + #endif + } + +-static inline uint8_t* avm_set_be32(void* p, uint32_t v) __THROW { ++static inline uint8_t* __NTH(avm_set_be32(void* p, uint32_t v)) { + uint8_t* b = (uint8_t*) p; + b[0] = (v >> 24) & 0xff; + b[1] = (v >> 16) & 0xff; +@@ -123,7 +123,7 @@ + return b; + } + +-static inline uint64_t avm_get_be64(const void* p) __THROW { ++static inline uint64_t __NTH(avm_get_be64(const void* p)) { + #ifdef WORDS_BIGENDIAN + return *(const uint64_t*)p; + #else +@@ -132,15 +132,15 @@ + #endif + } + +-static inline int avm_img_is_rgb(fourcc_t fmt) __THROW ++static inline int __NTH(avm_img_is_rgb(fourcc_t fmt)) + { + return ((fmt & 0xffffff00) == IMG_FMT_RGB); + } +-static inline int avm_img_is_bgr(fourcc_t fmt) __THROW ++static inline int __NTH(avm_img_is_bgr(fourcc_t fmt)) + { + return ((fmt & 0xffffff00) == IMG_FMT_BGR); + } +-static inline int avm_img_get_depth(fourcc_t fmt) __THROW ++static inline int __NTH(avm_img_get_depth(fourcc_t fmt)) + { + return fmt & 0xff; + } +--- avifile-0.7-0.7.41/lib/common/fcc_type.c.orig 2002-11-01 12:46:58.000000000 +0100 ++++ avifile-0.7-0.7.41/lib/common/fcc_type.c 2004-12-05 03:48:14.692506360 +0100 +@@ -4,7 +4,7 @@ + + //#include + +-const char* avm_fcc_name(fourcc_t fcc) __THROW ++const char* __NTH(avm_fcc_name(fourcc_t fcc)) + { + switch (fcc) + { +@@ -106,7 +106,7 @@ + { 0, "Unknown" } + }; + +-const char *avm_img_format_name(fourcc_t fmt) __THROW ++const char * __NTH(avm_img_format_name(fourcc_t fmt)) + { + const struct dts* t = data; + +--- avifile-0.7-0.7.41/lib/common/utils.c.orig 2002-07-04 20:59:31.000000000 +0200 ++++ avifile-0.7-0.7.41/lib/common/utils.c 2004-12-05 03:51:28.009117768 +0100 +@@ -10,7 +10,7 @@ + uint_t (*localcount)(void); + int64_t (*longcount)(void); + +-WAVEFORMATEX* avm_get_leWAVEFORMATEX(WAVEFORMATEX* wf) __THROW ++WAVEFORMATEX* __NTH(avm_get_leWAVEFORMATEX(WAVEFORMATEX* wf)) + { + wf->wFormatTag = avm_get_le16(&wf->wFormatTag); + wf->nChannels = avm_get_le16(&wf->nChannels); +@@ -22,7 +22,7 @@ + return wf; + } + +-BITMAPINFOHEADER* avm_get_leBITMAPINFOHEADER(BITMAPINFOHEADER* bi) __THROW ++BITMAPINFOHEADER* __NTH(avm_get_leBITMAPINFOHEADER(BITMAPINFOHEADER* bi)) + { + bi->biSize = avm_get_le32(&bi->biSize); + bi->biWidth = avm_get_le32(&bi->biWidth); +@@ -44,7 +44,7 @@ + * (Note: on solaris, usleep is not thread-safe) + */ + #ifndef WIN32 +-int avm_usleep(unsigned long delay) __THROW ++int __NTH(avm_usleep(unsigned long delay)) + { + #if HAVE_NANOSLEEP + struct timespec tsp; +@@ -62,7 +62,7 @@ + * Solaris (maybe other operating systems, too) does not have avm_setenv(), + * and avm_unsetenv() in libc, provide our own implementation. + */ +-int avm_setenv(const char *name, const char *value, int overwrite) __THROW ++int __NTH(avm_setenv(const char *name, const char *value, int overwrite)) + { + #if HAVE_SETENV + return setenv(name, value, overwrite); +@@ -80,7 +80,7 @@ + #endif + } + +-void avm_unsetenv(const char *name) __THROW ++void __NTH(avm_unsetenv(const char *name)) + { + #if HAVE_UNSETENV + unsetenv(name); +--- avifile-0.7-0.7.41/lib/common/wave_type.c.orig 2002-11-29 14:09:46.000000000 +0100 ++++ avifile-0.7-0.7.41/lib/common/wave_type.c 2004-12-05 03:52:52.639252032 +0100 +@@ -3,7 +3,7 @@ + #include + #include + +-const char* avm_wave_format_name(short fmt) __THROW ++const char* __NTH(avm_wave_format_name(short fmt)) + { + switch ((unsigned short)fmt) + { +@@ -46,7 +46,7 @@ + } + } + +-char* avm_wave_format(char* buf, uint_t s, const WAVEFORMATEX* wf) __THROW ++char* __NTH(avm_wave_format(char* buf, uint_t s, const WAVEFORMATEX* wf)) + { + if (buf) + {