aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFabrice Bellard <fabrice@bellard.org>2003-09-08 21:05:43 +0000
committerFabrice Bellard <fabrice@bellard.org>2003-09-08 21:05:43 +0000
commit742d87d633d20f2b1dcd7f0d2427f15cb6ac40c6 (patch)
treedcb22c2a9289e3be517adc119c43507a15af92ef
parentca4a77c5b3b07de08069c6c9f9f320267f08d90e (diff)
downloadffmpeg-742d87d633d20f2b1dcd7f0d2427f15cb6ac40c6.tar.gz
removed os_support.h
Originally committed as revision 2227 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r--libavcodec/dsputil.h6
-rw-r--r--libavcodec/opts.c22
-rw-r--r--libavcodec/resample.c1
3 files changed, 25 insertions, 4 deletions
diff --git a/libavcodec/dsputil.h b/libavcodec/dsputil.h
index 0a2935bbff..402b99091a 100644
--- a/libavcodec/dsputil.h
+++ b/libavcodec/dsputil.h
@@ -492,4 +492,10 @@ static inline long int lrintf(float x)
}
#endif
+#if defined(CONFIG_OS2) || defined(CONFIG_SUNOS)
+static inline float floorf(float f) {
+ return floor(f);
+}
+#endif
+
#endif
diff --git a/libavcodec/opts.c b/libavcodec/opts.c
index 44a213397f..2ce459d758 100644
--- a/libavcodec/opts.c
+++ b/libavcodec/opts.c
@@ -11,7 +11,6 @@
*/
#include "avcodec.h"
-#include "os_support.h"
const AVOption avoptions_common[] = {
AVOPTION_CODEC_FLAG("bit_exact", "use only bit-exact stuff", flags, CODEC_FLAG_BITEXACT, 0),
@@ -40,15 +39,32 @@ const AVOption avoptions_workaround_bug[] = {
AVOPTION_END()
};
+/* avoid compatibility problems by redefining it */
+static int av_strcasecmp(const char *s1, const char *s2)
+{
+ signed char val;
+
+ for(;;) {
+ val = toupper(*s1) - toupper(*s2);
+ if (val != 0)
+ break;
+ if (*s1 != '\0')
+ break;
+ s1++;
+ s2++;
+ }
+ return val;
+}
+
static int parse_bool(const AVOption *c, char *s, int *var)
{
int b = 1; /* by default -on- when present */
if (s) {
- if (!strcasecmp(s, "off") || !strcasecmp(s, "false")
+ if (!av_strcasecmp(s, "off") || !av_strcasecmp(s, "false")
|| !strcmp(s, "0"))
b = 0;
- else if (!strcasecmp(s, "on") || !strcasecmp(s, "true")
+ else if (!av_strcasecmp(s, "on") || !av_strcasecmp(s, "true")
|| !strcmp(s, "1"))
b = 1;
else
diff --git a/libavcodec/resample.c b/libavcodec/resample.c
index c4ae085f93..2a8d6a0234 100644
--- a/libavcodec/resample.c
+++ b/libavcodec/resample.c
@@ -23,7 +23,6 @@
*/
#include "avcodec.h"
-#include "os_support.h"
typedef struct {
/* fractional resampling */