Commit graph

5 commits

Author SHA1 Message Date
Alex Shinn
62c390d68e initial module system 2009-10-13 18:29:18 +09:00
Alex Shinn
5d94079e4a more cleanup and portability fixes
Using <u.h> and <libc.h> for plan9, no need for separate .i file
construction.  Also mkfile now simplified and using /sys/src/cmd/mkone
(thanks to Charles Forsyth).
2009-07-14 00:34:23 +09:00
Alex Shinn
6d709264bd Cleanup for more pedantic C.
Notably no longer converting from function pointers <-> void*.

Remaining --pedantic warnings:

  * ISO C90 does not support 'long long'
  * ISO C90 does not support the 'z' printf length modifier
  * ISO C90 does not support flexible array members
  * ISO C90 forbids mixed declarations and code
  * ISO C90 forbids specifying subobject to initialize
  * anonymous variadic macros were introduced in C99
  * invalid use of structure with flexible array member

The first one is only used when optional bignums are enabled,
and I have no intention of supporting bignums on systems w/o
long long (although it's not guaranteed two words fit in a
long long - I need to fix this).

The 'z' modifier is necessary for long types (you'd get
warnings the other way without it).

The next 4 are intentional - they make the code cleaner,
and all of these extensions are supported by Plan 9.

The last one is tricky.  I think it refers to the fact
that not only am I using flexible array members, but I'm
using them as non-final alternates in a union.  I'll have
to double check the semantics of this.
2009-07-12 23:46:27 +09:00
Alex Shinn
41f54a7f41 initial windows mingw support patch from felix winkelmann 2009-07-07 19:58:28 +09:00
Alex Shinn
b1c0ea895b committing initial bignum support, still needs more thorough testing.
can disable with USE_BIGNUMS=0 - the interactions between this and
USE_FLONUMS are messy, so they will likely be merged into a single
option in the near future (i.e. you either have only fixnums, or a
full range of numeric types).
adding rationals based on this would be easy and is a likely future
feature.  adding native support for complex numbers is unlikely.
2009-07-07 19:16:23 +09:00