[MPlayer-cvslog] r30525 - trunk/loader/ldt_keeper.c

diego subversion at mplayerhq.hu
Mon Feb 8 11:05:49 CET 2010


Author: diego
Date: Mon Feb  8 11:05:49 2010
New Revision: 30525

Log:
Merge some preprocessor conditionals where appropriate.
This saves a few lines and simplifies the code slightly.

Modified:
   trunk/loader/ldt_keeper.c

Modified: trunk/loader/ldt_keeper.c
==============================================================================
--- trunk/loader/ldt_keeper.c	Sat Feb  6 20:57:45 2010	(r30524)
+++ trunk/loader/ldt_keeper.c	Mon Feb  8 11:05:49 2010	(r30525)
@@ -60,14 +60,10 @@ int modify_ldt(int func, void *ptr, unsi
 #if defined(__NetBSD__) || defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__DragonFly__)
 #include <machine/segments.h>
 #include <machine/sysarch.h>
-#endif
-
-#if defined(__APPLE__)
+#elif defined(__APPLE__)
 #include <architecture/i386/table.h>
 #include <i386/user_ldt.h>
-#endif
-
-#ifdef __svr4__
+#elif defined(__svr4__)
 #include <sys/segment.h>
 #include <sys/sysi86.h>
 
@@ -238,9 +234,7 @@ ldt_fs_t* Setup_LDT_Keeper(void)
 	perror("install_fs");
 	printf("Couldn't install fs segment, expect segfault\n");
     }
-#endif /*linux*/
-
-#if defined(__NetBSD__) || defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__DragonFly__) || defined(__APPLE__)
+#elif defined(__NetBSD__) || defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__DragonFly__) || defined(__APPLE__)
     {
         unsigned long d[2];
 
@@ -262,9 +256,7 @@ ldt_fs_t* Setup_LDT_Keeper(void)
 #endif
         }
     }
-#endif  /* __NetBSD__ || __FreeBSD__ || __OpenBSD__ || __DragonFly__ || __APPLE__ */
-
-#if defined(__svr4__)
+#elif defined(__svr4__)
     {
 	struct ssd ssd;
 	ssd.sel = LDT_SEL(TEB_SEL_IDX);


More information about the MPlayer-cvslog mailing list