2007-04-14 03:58:42 +08:00
|
|
|
/* ----------------------------------------------------------------------- *
|
|
|
|
*
|
|
|
|
* Copyright 2007 The NASM Authors - All Rights Reserved
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of the license given in the file "License"
|
|
|
|
* distributed in the NASM archive.
|
|
|
|
*
|
|
|
|
* ----------------------------------------------------------------------- */
|
|
|
|
|
|
|
|
/*
|
|
|
|
* compiler.h
|
|
|
|
*
|
|
|
|
* Compiler-specific macros for NASM. Feel free to add support for
|
|
|
|
* other compilers in here.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef COMPILER_H
|
2007-04-14 04:06:41 +08:00
|
|
|
#define COMPILER_H 1
|
|
|
|
|
|
|
|
#ifdef HAVE_CONFIG_H
|
|
|
|
# include "config.h"
|
|
|
|
#endif
|
2007-04-14 03:58:42 +08:00
|
|
|
|
|
|
|
#ifdef __GNUC__
|
|
|
|
# if __GNUC__ >= 4
|
|
|
|
# define HAVE_GNUC_4
|
|
|
|
# endif
|
|
|
|
# if __GNUC__ >= 3
|
|
|
|
# define HAVE_GNUC_3
|
|
|
|
# endif
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef __GNUC__
|
|
|
|
# define _unused __attribute__((unused))
|
|
|
|
#else
|
|
|
|
# define _unused
|
|
|
|
#endif
|
|
|
|
|
2007-09-18 04:53:14 +08:00
|
|
|
/* Some versions of MSVC have these only with underscores in front */
|
|
|
|
|
|
|
|
#if !defined(HAVE_SNPRINTF) && defined(HAVE__SNPRINTF)
|
|
|
|
# define snprintf _snprintf
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if !defined(HAVE_VSNPRINTF) && defined(HAVE__VSNPRINTF)
|
|
|
|
# define vsnprintf _vsnprintf
|
|
|
|
#endif
|
|
|
|
|
2007-04-14 04:06:41 +08:00
|
|
|
#endif /* COMPILER_H */
|