]> git.sesse.net Git - vlc/commitdiff
Use STD*_FILENO constants where applicable
authorRémi Denis-Courmont <remi@remlab.net>
Sat, 4 Aug 2012 09:43:56 +0000 (12:43 +0300)
committerRémi Denis-Courmont <remi@remlab.net>
Sat, 4 Aug 2012 09:45:55 +0000 (12:45 +0300)
bin/override.c
bin/winvlc.c
modules/access_output/file.c

index b216dfeda00106d40fea1bf4f5cfc627dad7d23a..fb4608c969c8d9c16f255a17180a6cade4e9587b 100644 (file)
@@ -39,6 +39,7 @@ void vlc_enable_override (void);
 #include <pthread.h>
 #ifdef HAVE_EXECINFO_H
 # include <execinfo.h>
+# include <unistd.h>
 #endif
 #ifdef NDEBUG
 # undef HAVE_BACKTRACE
@@ -75,7 +76,7 @@ static void vlogbug (unsigned *pc, const char *level, const char *func,
         fputs (")\n", stderr);
         fflush (stderr);
 #ifdef HAVE_BACKTRACE
-        backtrace_symbols_fd (framev + 2, framec - 2, fileno (stderr));
+        backtrace_symbols_fd (framev + 2, framec - 2, STDERR_FILENO);
 #endif
     }
     funlockfile (stderr);
index e86fe755a1ad89437933abd2a0eecb443fca670e..9db5df158be386128d8b4e5c140db424bdacb748 100644 (file)
@@ -196,7 +196,7 @@ int WINAPI WinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance,
         SetUnhandledExceptionFilter(vlc_exception_filter);
     }
 
-    _setmode( _fileno( stdin ), _O_BINARY ); /* Needed for pipes */
+    _setmode( STDIN_FILENO, _O_BINARY ); /* Needed for pipes */
 
 #else /* UNDER_CE */
     char **argv, psz_cmdline[wcslen(lpCmdLine) * 4];
index 0ae8ffb715b5d2cddd6ef45dc6ed181ad3315cd3..3ee0e8c342e17b3d7975326cd3798b66952717f3 100644 (file)
@@ -139,9 +139,9 @@ static int Open( vlc_object_t *p_this )
     if( !strcmp( p_access->psz_path, "-" ) )
     {
 #if defined( WIN32 ) || defined( __OS2__ )
-        setmode (fileno (stdout), O_BINARY);
+        setmode (STDOUT_FILENO, O_BINARY);
 #endif
-        fd = vlc_dup (fileno (stdout));
+        fd = vlc_dup (STDOUT_FILENO);
         if (fd == -1)
         {
             msg_Err (p_access, "cannot use standard output: %m");