[Mesa-dev] [PATCH] build: Build on Cygwin with gnu99 instead of c99.
Brian Paul
brianp at vmware.com
Mon Oct 15 07:13:21 PDT 2012
On 10/13/2012 12:45 AM, Vinson Lee wrote:
> The GCC c99 standard on Cygwin sets __STRICT_ANSI__ and symbols such as
> strdup are not available.
>
> Signed-off-by: Vinson Lee<vlee at freedesktop.org>
> ---
> configure.ac | 9 ++++++++-
> 1 files changed, 8 insertions(+), 1 deletions(-)
>
> diff --git a/configure.ac b/configure.ac
> index 6c7a192..ae186ac 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -172,7 +172,14 @@ esac
>
> dnl Add flags for gcc and g++
> if test "x$GCC" = xyes; then
> - CFLAGS="$CFLAGS -Wall -std=c99"
> + case "$host_os" in
> + cygwin*)
> + CFLAGS="$CFLAGS -Wall -std=gnu99"
> + ;;
> + *)
> + CFLAGS="$CFLAGS -Wall -std=c99"
> + ;;
> + esac
>
> # Enable -Werror=implicit-function-declaration and
> # -Werror=missing-prototypes, if available, or otherwise, just
Reviewed-by: Brian Paul <brianp at vmware.com>
BTW, I know we have a _mesa_strdup() helper but it looks like we're
just using strdup() in some places. We should probably clean that up
someday.
-Brian
More information about the mesa-dev
mailing list