]> andersk Git - udis86.git/commitdiff
Wait to include system headers until we know they are wanted.
authorAnders Kaseorg <andersk@mit.edu>
Mon, 4 May 2009 22:45:13 +0000 (18:45 -0400)
committerAnders Kaseorg <andersk@mit.edu>
Mon, 4 May 2009 23:15:08 +0000 (19:15 -0400)
When building in the Linux kernel, __UD_STANDALONE__ is not defined
until types.h is included.  So we should wait to include system
headers like <stdlib.h> and <string.h> until we know __UD_STANDALONE__
will not be defined.

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
libudis86/decode.c
libudis86/udis86.c

index 90f6c052571f9a082a8eb09a3036011038f8e3fb..3af2f7d74458a8ef1ced5575553ed3036e55e101 100644 (file)
  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
-#ifndef __UD_STANDALONE__
-# include <string.h>
-#endif /* __UD_STANDALONE__ */
 
 #include "types.h"
 #include "itab.h"
 #include "input.h"
 #include "decode.h"
 
+#ifndef __UD_STANDALONE__
+# include <string.h>
+#endif /* __UD_STANDALONE__ */
+
 /* The max number of prefixes to an instruction */
 #define MAX_PREFIXES    15
 
index 135ef5995ad4af090d9146b9a3105425addda0e8..942186344c34df99e6c16ed0721c6b67d0f965e4 100644 (file)
  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
-#ifndef __UD_STANDALONE__
-#include <stdlib.h>
-#include <string.h>
-#endif /* __UD_STANDALONE__ */
 
 #include "input.h"
 #include "extern.h"
 
+#ifndef __UD_STANDALONE__
+# include <stdlib.h>
+# include <string.h>
+#endif /* __UD_STANDALONE__ */
+
 /* =============================================================================
  * ud_init() - Initializes ud_t object.
  * =============================================================================
This page took 0.368551 seconds and 5 git commands to generate.