MINGW-packages/mingw-w64-glsl-optimizer-git/0003-Win64-long-is-32-bit-use-intptr_t-instead.patch
Christoph Reiter 4d8828efed Make pkgbase of all packages match the name of the PKGBUILD directory (#2878)
This either changes the pkgbase to match the directory name
or the other way around.

The motivation for this is to make it possible to automatically generate
an URL to the PKGBUILD file from the package information alone.
2017-09-12 14:25:41 +03:00

58 lines
2.2 KiB
Diff

From f921c25741eb5e97c9c327e3873394f536361e50 Mon Sep 17 00:00:00 2001
From: Ray Donnelly <mingw.android@gmail.com>
Date: Tue, 14 Jul 2015 16:28:25 +0100
Subject: [PATCH 3/6] Win64: long is 32-bit, use intptr_t instead
---
src/glsl/ir_print_glsl_visitor.cpp | 4 ++--
src/glsl/ir_print_metal_visitor.cpp | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/glsl/ir_print_glsl_visitor.cpp b/src/glsl/ir_print_glsl_visitor.cpp
index 81a2c60..73afa8d 100644
--- a/src/glsl/ir_print_glsl_visitor.cpp
+++ b/src/glsl/ir_print_glsl_visitor.cpp
@@ -337,7 +337,7 @@ void ir_print_glsl_visitor::newline_deindent()
void ir_print_glsl_visitor::print_var_name (ir_variable* v)
{
- long id = (long)hash_table_find (globals->var_hash, v);
+ intptr_t id = (intptr_t)hash_table_find (globals->var_hash, v);
if (!id && v->data.mode == ir_var_temporary)
{
id = ++globals->var_counter;
@@ -462,7 +462,7 @@ void ir_print_glsl_visitor::visit(ir_variable *ir)
// give an id to any variable defined in a function that is not an uniform
if ((this->mode == kPrintGlslNone && ir->data.mode != ir_var_uniform))
{
- long id = (long)hash_table_find (globals->var_hash, ir);
+ intptr_t id = (intptr_t)hash_table_find (globals->var_hash, ir);
if (id == 0)
{
id = ++globals->var_counter;
diff --git a/src/glsl/ir_print_metal_visitor.cpp b/src/glsl/ir_print_metal_visitor.cpp
index 0442208..c523d89 100644
--- a/src/glsl/ir_print_metal_visitor.cpp
+++ b/src/glsl/ir_print_metal_visitor.cpp
@@ -377,7 +377,7 @@ void ir_print_metal_visitor::newline_deindent()
void ir_print_metal_visitor::print_var_name (ir_variable* v)
{
- long id = (long)hash_table_find (globals->var_hash, v);
+ intptr_t id = (intptr_t)hash_table_find (globals->var_hash, v);
if (!id && v->data.mode == ir_var_temporary)
{
id = ++globals->var_counter;
@@ -546,7 +546,7 @@ void ir_print_metal_visitor::visit(ir_variable *ir)
// give an id to any variable defined in a function that is not an uniform
if ((this->mode == kPrintGlslNone && ir->data.mode != ir_var_uniform))
{
- long id = (long)hash_table_find (globals->var_hash, ir);
+ intptr_t id = (intptr_t)hash_table_find (globals->var_hash, ir);
if (id == 0)
{
id = ++globals->var_counter;
--
2.4.5