Commit graph

72 commits

Author SHA1 Message Date
Peter Johnson
94ab1135a3 Remove $Id$ and RCSID() usage.
These are useless now that we're using git.
2011-08-19 10:43:16 -07:00
Peter Johnson
e7185d2e24 gas-preproc.c: Use sprintf instead of snprintf.
It's impossible for a decimal long string to be longer than 64 chars.

Also remove workaround for MSVC added in r2267.

svn path=/trunk/yasm/; revision=2273
2010-01-13 04:44:28 +00:00
Brian Gladman
ed1ff0ef26 1. Add gas preprocessor build on Windows
2. Add snprintf -> _snprintf define for VC++ build

svn path=/trunk/yasm/; revision=2267
2010-01-05 16:01:53 +00:00
Peter Johnson
eb7b1adb30 Enable DLL/plugin builds with cmake on Windows.
Add proper declspec dllimport/dllexport to all libyasm functions.
Use macros to make these do nothing on non-cmake and Unix builds.

svn path=/trunk/yasm/; revision=2101
2008-05-23 06:46:51 +00:00
Peter Johnson
811d7ad566 Make util.h more robust against use without config.h by moving the
toascii redefinition to the only file that uses it, errwarn.c.

svn path=/trunk/yasm/; revision=2097
2008-05-22 08:37:32 +00:00
Peter Johnson
69fc913eec Clean up a number of obsolete autoconf-detected standard C things.
svn path=/trunk/yasm/; revision=1892
2007-07-13 20:56:28 +00:00
Peter Johnson
469e54fa4a Update all copyright dates.
svn path=/trunk/yasm/; revision=1827
2007-04-22 05:09:49 +00:00
Peter Johnson
00473ca981 Bite the bullet and convert tabs to spaces. Previously yasm's source has
been using a mix of tabs and 4 spaces to indent; this looks horrible if
tab size is ever not 8.  While I debated converting to tab-only indentation
that would have been a far higher impact to the source.

svn path=/trunk/yasm/; revision=1825
2007-04-22 03:32:46 +00:00
Peter Johnson
a770e511c1 Move libyasm-stdint.h include out of util.h, as util.h is included from
build platform files.

While here, fix a few warnings by pushing uintptr_t to a few more register
usages.

Noticed by: rugxulo@gmail.com

svn path=/trunk/yasm/; revision=1786
2007-02-24 04:16:05 +00:00
Peter Johnson
8aa68a2ee2 Fix build (hopefully) on Win64 by using uintptr_t more widely; Win64 is a
LLP64 platform so it's unsafe to cast pointers to unsigned long.

Reported by: Chris Tophe <cohika@gmail.com>

svn path=/trunk/yasm/; revision=1774
2007-02-18 20:42:55 +00:00
Peter Johnson
2e09de21dd Try to cut down on DJGPP build warnings.
svn path=/trunk/yasm/; revision=1769
2007-02-15 03:01:08 +00:00
Peter Johnson
5ab6b53062 Make life a little easier by adding an is_exp2() macro.
svn path=/trunk/yasm/; revision=1682
2006-11-11 05:47:09 +00:00
Peter Johnson
337dcd9b64 util.h: Use same workarounds for mingw32 as for the GNU C library.
svn path=/trunk/yasm/; revision=1645
2006-10-08 00:53:10 +00:00
Peter Johnson
aa81c64488 Build cleanups (mostly for warnings) for VC8.
* Mkfiles/vc8/config.h: Define _CRT_SECURE_NO_DEPRECATE to avoid most warnings about *_s functions.
Also use _stricmp directly instead of stricmp to avoid warnings.
* libyasm/strcasecmp.c: Support _stricmp usage.
* util.h: Likewise.

* tools/re2c/actions.c: Include ctype.h to define toupper/tolower.

* Mkfiles/vc8/modules/modules.vcproj: Don't include nasm-macros.c directly; this file is included
into another file and has no public variables.

* Mkfiles/vc8/yasm.sln: Allow x64 cross-builds from Win32 by building genmacro, genmodule, and
re2c for Win32 target.

svn path=/trunk/yasm/; revision=1328
2006-01-11 05:51:32 +00:00
Peter Johnson
eafa108191 * util.h (BitCount): Change bit-counting algorithm; the old one miscounted
4096 (0x1000) as having 257 bits; almost certainly other values were broken
as well.

svn path=/trunk/yasm/; revision=1148
2004-09-25 06:38:57 +00:00
Peter Johnson
1a86c34026 * On most files: re-enable $IdPath$ as $Id$, and enable Id keyword expansion.
svn path=/trunk/yasm/; revision=1137
2004-09-04 01:24:57 +00:00
Peter Johnson
2748972397 Avoid warnings in strsep due to glibc's bits/string2.h string inlining by
defining __NO_STRING_INLINES in strsep.c.  Due to string.h inclusion in
util.h, extra level of indirection is needed
(NO_STRING_INLINES->__NO_STRING_INLINES).

svn path=/trunk/yasm/; revision=1004
2003-07-12 19:44:30 +00:00
Peter Johnson
cc3f9486f3 Simplify RCSID() definition.
svn path=/trunk/yasm/; revision=971
2003-06-07 20:48:40 +00:00
Peter Johnson
f7be0f0fd7 Be a bit friendlier to those compiling without HAVE_CONFIG_H by always
including the "standard C" headers.

svn path=/trunk/yasm/; revision=965
2003-06-04 05:25:10 +00:00
Peter Johnson
dd4ae0b63a Only include config.h if HAVE_CONFIG_H is defined.
svn path=/trunk/yasm/; revision=964
2003-06-04 05:03:40 +00:00
Peter Johnson
b6a212e199 Pre-include libyasm/coretype.h to avoid #defining functions such as
yasm__strsep() (here) before their prototypes are declared (in coretype.h).
Header protections keep coretype.h from being included again (from libyasm.h).

svn path=/trunk/yasm/; revision=948
2003-05-10 05:40:44 +00:00
Peter Johnson
cfc6bf0ded Clean up and simplify libyasm.h options and symbol visibility:
- Move config.h and util.h from libyasm (and installed libyasm) to top level.
- Move yasm_* functions from util.h to coretype.h.
- Remove a number of autoconf-related YASM_*_INTERNAL options from libyasm.h.
- Rename YASM_INTERNAL to YASM_LIB_INTERNAL; it now actually means what the
  comment describes: enables definitions that violate the yasm_* namespace.

While we're at it, no longer define YASM_LIB_INTERNAL from yasm frontend, so
it's closer to what a real typical libyasm-using application would look like.

svn path=/trunk/yasm/; revision=944
2003-05-05 03:42:12 +00:00
Peter Johnson
d710166b48 Comment for Doxygen documentation generation. Comment-only changes.
svn path=/trunk/yasm/; revision=939
2003-05-04 20:28:28 +00:00
Peter Johnson
f381195dc1 Undefine __STRICT__ANSI__ when compiling with gcc -ansi and glibc to avoid many
spurious compiler warnings.

svn path=/trunk/yasm/; revision=924
2003-05-03 08:02:15 +00:00
Peter Johnson
ddc08a6994 Use system includes instead of local includes. This allows replacement of
key headers in certain situations (config.h when compiling with Visual C++ for
one), and is also more correct in general.

svn path=/trunk/yasm/; revision=887
2003-03-26 05:07:57 +00:00
Peter Johnson
af39a1017c Don't redefine NDEBUG if it's already defined.
svn path=/trunk/yasm/; revision=862
2003-03-16 00:17:08 +00:00
Peter Johnson
0786a76895 Make libyasm a "real" library, including installing header files.
Start separating modules and frontends from libyasm internals.

svn path=/trunk/yasm/; revision=849
2003-03-15 05:07:49 +00:00
Peter Johnson
84ee559be7 The Great Renaming (prefixing with yasm_), Part 2: allocation functions.
svn path=/trunk/yasm/; revision=843
2003-03-12 06:08:43 +00:00
Peter Johnson
d9f68d6d4b Unmodularize errwarn, while making key errwarn functions replaceable.
Also removes dependency of libyasm on libintl (gettext), so it can be linked
-no-undefined now!

svn path=/trunk/yasm/; revision=842
2003-03-10 08:55:41 +00:00
Peter Johnson
9d0fa1135c The Great Renaming, Part 2: prefix strcasecmp and strncasecmp with yasm__.
svn path=/trunk/yasm/; revision=841
2003-03-08 20:35:36 +00:00
Peter Johnson
b1faf6329c Relicense under 2-clause BSD license.
svn path=/trunk/yasm/; revision=835
2003-02-21 03:50:29 +00:00
Peter Johnson
86751029a3 Add va_list versions of error and warning errwarn functions.
Required adding stdarg to util.h.

svn path=/trunk/yasm/; revision=798
2002-11-04 08:17:44 +00:00
Peter Johnson
9f6cb6783f Modularize errwarn. gettext()-ize in errwarn, not in every module, eliminating
libintl dependency in modules.
Also standardize initialize() and cleanup() functions.
Move replace_extension() from file.c to main.c.
Clean up some extern variable declarations in various places (particularly
nasm-compatible parser).

svn path=/trunk/yasm/; revision=792
2002-11-01 10:05:03 +00:00
Peter Johnson
b59f5507da Relicense under 3-clause BSD license.
svn path=/trunk/yasm/; revision=781
2002-10-22 19:46:27 +00:00
Peter Johnson
e54446905d Use automake's standard macro for dmalloc instead of rolling our own.
svn path=/trunk/yasm/; revision=777
2002-10-22 07:45:45 +00:00
Peter Johnson
326b77c80c Assume all sys/queue.h implementations are broken, and always use our local
one (more implementations are broken than not broken).

svn path=/trunk/yasm/; revision=776
2002-10-22 06:38:44 +00:00
Peter Johnson
d0fa038137 Remove obsolete references to HAVE_GNU_C_LIBRARY which were causing build
breakage on some Linux platforms.

svn path=/trunk/yasm/; revision=762
2002-10-13 17:01:31 +00:00
Peter Johnson
da070d5964 Move strndup() declaration outside !DMALLOC #ifdef, as it's not defined by
the dmalloc library.

svn path=/trunk/yasm/; revision=661
2002-08-07 01:04:34 +00:00
Peter Johnson
f78505a6a5 Add xstrndup() to easily create a 0-terminated duplicate of a
non-zero-terminated source string.

svn path=/trunk/yasm/; revision=649
2002-06-20 05:15:59 +00:00
Peter Johnson
1b6ca83117 Splint cleanups on memory allocation routines.
svn path=/trunk/yasm/; revision=593
2002-04-22 01:37:54 +00:00
Peter Johnson
b9541920f1 Create global macro NELEMS to replace countof macro defined just in main.c.
svn path=/trunk/yasm/; revision=592
2002-04-21 18:55:19 +00:00
Peter Johnson
bccc5e7ec7 When using Splint, don't try to use gettext().
svn path=/trunk/yasm/; revision=547
2002-03-23 22:50:49 +00:00
Peter Johnson
ba2c819e71 Move BitCount() macro from hamt.c to util.h.
svn path=/trunk/yasm/; revision=488
2002-03-10 20:21:50 +00:00
Peter Johnson
855891dac2 Fix build problem on Linux with toascii() define.
svn path=/trunk/yasm/; revision=393
2001-12-24 18:01:12 +00:00
Peter Johnson
b3cb8c0292 Move assert.h include to util.h
In util.h, define NDEBUG if not running lint.

svn path=/trunk/yasm/; revision=385
2001-12-03 03:05:51 +00:00
Peter Johnson
a64ee74f8f Fix typo in HAVE_STRCMPI strncasecmp() #define.
svn path=/trunk/yasm/; revision=373
2001-12-02 06:42:39 +00:00
Peter Johnson
3b496cdde7 Do intl more correctly. nointl/libintl.h is unnecessary; it can be detected
in util.h by the ENABLE_NLS define.  Fix Mkfiles to reflect.  Actually enable
if available in main().

svn path=/trunk/yasm/; revision=372
2001-12-02 06:40:17 +00:00
Peter Johnson
5cd0858637 Add valparam data structure.
svn path=/trunk/yasm/; revision=340
2001-11-18 18:44:26 +00:00
Peter Johnson
8178f883a5 Modify so that almost everything passes LCLint with the options in lclint.sh.
This is actually worthwhile; I found and fixed a few bugs/edge cases while
doing this.
For more information on LCLint, see <http://lclint.cs.virginia.edu/>.

svn path=/trunk/yasm/; revision=335
2001-11-17 08:33:23 +00:00
Peter Johnson
4df0191de8 lclint-ize gettext().
svn path=/trunk/yasm/; revision=331
2001-11-16 22:55:26 +00:00