Commit 06b00c5f authored by Diego Biurrun's avatar Diego Biurrun

Simplify preprocessor directives.

Originally committed as revision 10249 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent d56fb404
...@@ -1426,9 +1426,7 @@ int has_altivec(void) ...@@ -1426,9 +1426,7 @@ int has_altivec(void)
IExec->GetCPUInfoTags(GCIT_VectorUnit, &result, TAG_DONE); IExec->GetCPUInfoTags(GCIT_VectorUnit, &result, TAG_DONE);
if (result == VECTORTYPE_ALTIVEC) return 1; if (result == VECTORTYPE_ALTIVEC) return 1;
return 0; return 0;
#else /* __AMIGAOS4__ */ #elif __APPLE__
#ifdef __APPLE__
int sels[2] = {CTL_HW, HW_VECTORUNIT}; int sels[2] = {CTL_HW, HW_VECTORUNIT};
int has_vu = 0; int has_vu = 0;
size_t len = sizeof(has_vu); size_t len = sizeof(has_vu);
...@@ -1437,9 +1435,9 @@ int has_altivec(void) ...@@ -1437,9 +1435,9 @@ int has_altivec(void)
err = sysctl(sels, 2, &has_vu, &len, NULL, 0); err = sysctl(sels, 2, &has_vu, &len, NULL, 0);
if (err == 0) return (has_vu != 0); if (err == 0) return (has_vu != 0);
#else /* __APPLE__ */ return 0;
/* no Mac OS X, do it the brute-force way */ #else
/* this is borrowed from the libmpeg2 library */ /* Do it the brute-force way, borrowed from the libmpeg2 library. */
{ {
signal (SIGILL, sigill_handler); signal (SIGILL, sigill_handler);
if (sigsetjmp (jmpbuf, 1)) { if (sigsetjmp (jmpbuf, 1)) {
...@@ -1456,7 +1454,6 @@ int has_altivec(void) ...@@ -1456,7 +1454,6 @@ int has_altivec(void)
return 1; return 1;
} }
} }
#endif /* __APPLE__ */
return 0; return 0;
#endif /* __AMIGAOS4__ */ #endif /* __AMIGAOS4__ */
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment