From: Brian Paul Date: Thu, 21 Sep 2006 15:51:06 +0000 (+0000) Subject: added _mesa_little_endian() X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=32e0efbdbeb06170befc63af685d67711acc6c81;p=mesa.git added _mesa_little_endian() --- diff --git a/src/mesa/main/imports.h b/src/mesa/main/imports.h index a17a0fd18ca..9fb02a7e9cd 100644 --- a/src/mesa/main/imports.h +++ b/src/mesa/main/imports.h @@ -1,6 +1,6 @@ /* * Mesa 3-D graphics library - * Version: 6.5.1 + * Version: 6.5.2 * * Copyright (C) 1999-2006 Brian Paul All Rights Reserved. * @@ -604,6 +604,17 @@ do { \ #endif +/** + * Return 1 if this is a little endian machine, 0 if big endian. + */ +static INLINE GLboolean +_mesa_little_endian(void) +{ + const GLuint ui = 1; /* intentionally not static */ + return *((const GLubyte *) &ui); +} + + /********************************************************************** * Functions