diff options
author | Vincent_Michael <Vincent_Michael@gmx.de> | 2013-03-10 01:08:55 +0100 |
---|---|---|
committer | Vincent_Michael <Vincent_Michael@gmx.de> | 2013-03-10 01:08:55 +0100 |
commit | a9b740ab747332dde2967426027c43f98efbebac (patch) | |
tree | 04f3999dd51a9eb2d7811f751dad124242390fb8 /cmake/stack_direction.c | |
parent | 83a5043741c0ef3d96ff59571305eae30d360ed5 (diff) | |
parent | f3617abdba8c247d4e9f423e5e97e3b42dab7b41 (diff) |
Merge branch 'master' of github.com:TrinityCore/TrinityCore into 4.3.4
Conflicts:
src/server/game/AI/EventAI/CreatureEventAI.cpp
src/server/game/AI/EventAI/CreatureEventAIMgr.h
src/server/game/Entities/Creature/Creature.cpp
src/server/game/Entities/Object/Object.cpp
src/server/game/Entities/Player/Player.cpp
src/server/game/Entities/Unit/Unit.cpp
src/server/game/Entities/Unit/Unit.h
src/server/game/Guilds/Guild.cpp
src/server/game/Handlers/MailHandler.cpp
src/server/game/Spells/Auras/SpellAuraEffects.cpp
src/server/game/Spells/Auras/SpellAuras.cpp
src/server/game/Spells/SpellEffects.cpp
src/server/scripts/Commands/cs_misc.cpp
src/server/scripts/Commands/cs_modify.cpp
src/server/scripts/EasternKingdoms/ZulGurub/boss_venoxis.cpp
src/server/scripts/Kalimdor/zone_azshara.cpp
src/server/scripts/Kalimdor/zone_darkshore.cpp
src/server/scripts/Kalimdor/zone_durotar.cpp
src/server/scripts/Kalimdor/zone_orgrimmar.cpp
src/server/scripts/Spells/spell_mage.cpp
src/server/shared/Packets/ByteBuffer.h
Diffstat (limited to 'cmake/stack_direction.c')
-rw-r--r-- | cmake/stack_direction.c | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/cmake/stack_direction.c b/cmake/stack_direction.c new file mode 100644 index 00000000000..11bcf803bfa --- /dev/null +++ b/cmake/stack_direction.c @@ -0,0 +1,31 @@ +/* Copyright (C) 2009 Sun Microsystems, Inc + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ + +/* Check stack direction (0-down, 1-up) */ +int f(int *a) +{ + int b; + return(&b > a)?1:0; +} +/* + Prevent compiler optimizations by calling function + through pointer. +*/ +volatile int (*ptr_f)(int *) = f; +int main() +{ + int a; + return ptr_f(&a); +}
\ No newline at end of file |