aboutsummaryrefslogtreecommitdiff
path: root/win32
Commit message (Collapse)AuthorAgeFilesLines
...
* win32: Add missing header files for nginx compilationseyko2016-04-136-0/+1122
| | | | | | | | | From: Vlad Vissoultchev Date: Tue, 12 Apr 2016 21:02:43 +0300 Subject: win32: Add missing header files for nginx compilation The new ones are hoisted from mingw-w64 as most other headers under `win32/include/winapi`
* VS2015 solution and project filesseyko2016-04-134-2/+376
| | | | | | | | | | | | | From: Vlad Vissoultchev Date: Mon, 11 Apr 2016 01:32:28 +0300 Subject: Add VS2015 solution and project files to `win32/vs2015` directory This allows release/debug builds for both x86 and x64 targets. Some warnings had to be suppressed. Output libtcc.dll and tcc.exe are copied to parent `win32` directory w/ a post-build action.
* Use proper ifdef for x64 check in winnt.hVlad Vissoultchev2016-03-141-3/+3
|
* Revert spawnvp param cast and use `no-incompatible-pointer-types` in ↵Vlad Vissoultchev2016-03-141-2/+2
| | | | build-tcc.bat
* Add x64 SEH decls. Add exports to kernel32.defVlad Vissoultchev2016-03-132-0/+68
|
* Move WIN32_LEAN_AND_MEAN to windows.h (silence redeclarations)Vlad Vissoultchev2016-03-132-3/+4
|
* Win32 build script handles `x64` and `debug` paramsVlad Vissoultchev2016-03-131-6/+11
|
* win: libm: add implementation for round/fmin/fmax and variantsAvi Halachmi (:avih)2015-11-071-0/+113
| | | | | | | | | | | | | | | | | | | | round and fmin/fmax are relatively commonly used functions but were not implemented anywhere in the tcc Windows distribution package. Newer mingw(64) math.h stil doesn't include these implementations. Add C implementations for these functions and place it as inline functions at win32/include/tcc/tcc_libm.h - which is already included from math.h . The code is mostly taken from musl-libc rs-1.0 (MIT) [*], musl-libc: http://git.musl-libc.org/cgit/musl/tree/src/math?h=rs-1.0 license: http://git.musl-libc.org/cgit/musl/tree/COPYRIGHT?h=rs-1.0 Potential enhancements: - Check how many useful libm implementations are still missing and consider adding them (some of them already work via the MS runtime). - Consider putting libm implementations in an actual libm.a file, or add a dummy one such that build processes which try to link with libm will not fail.
* win: math.h: fix fpclassify/signbit/etc - use C instead of broken asmAvi Halachmi (:avih)2015-11-072-22/+97
| | | | | | | | | | | | | | | | The asm code cannot currently be used with tcc since tcc doesn't support 't' constraint. Use inline C implementation instead, place it win32/include/tcc/tcc_libm.h, and include it from win32/include/math.h. Since fpclassify now works, it also fixes few other macros which depend on it. Implicitly fixed: isfinite, isinf, isnan, isnormal. The implementations were taken from musl-libc rs-1.0 (MIT license). musl-libc: http://git.musl-libc.org/cgit/musl/tree/src/math?h=rs-1.0 license: http://git.musl-libc.org/cgit/musl/tree/COPYRIGHT?h=rs-1.0
* win: math.h: isnan: use macro, similar to others (still broken)Avi Halachmi (:avih)2015-11-071-32/+1
| | | | | | It was broken due to tcc not able to compile asm with 't' constraint, and it's still broken because fpclassify on which it now depends has the same issue. Next commit will fix this.
* Revert "win32/include/math.h: remoing a "t" modifier usage"Avi Halachmi (:avih)2015-11-071-31/+10
| | | | | | This reverts commit 45bc50596874ec7cb26aac3dca3339ba25086436. The new asm code did not work as expected. Coordinated with seiko.
* win32/include/math.h: remoing a "t" modifier usageseyko2015-11-051-10/+31
| | | | | replaced by loading a float argument from memory and using the "m" modifier
* win32: UUID typedef addedseyko2015-09-251-0/+5
|
* Revert all of my changes to directories & codingstyle.gus knight2015-07-291-1/+1
|
* Reorganize the source tree.gus knight2015-07-271-1/+1
| | | | | | | | | | * Documentation is now in "docs". * Source code is now in "src". * Misc. fixes here and there so that everything still works. I think I got everything in this commit, but I only tested this on Linux (Make) and Windows (CMake), so I might've messed something up on other platforms...
* win32/include/winapi changes from https://github.com/run4flat/tinycc.gitseyko2015-05-1419-34/+2895
| | | | | | | | just for testing. Is it needed? I'm not a MSYS citizen. run4flat is a tcc fork by David Mertens that knows how to work with multiple symbol tables. Excelent work. A good descriptions of the tcc internals inside a code comments.
* Add a demo.bat file to the examples directory on Windowsseyko2015-04-102-0/+970
| | | | And a new console demo program: taxi and passengers simulator
* correct a DllMain() declaration in dllcrt1.c and dllmain.cseyko2015-03-032-3/+3
| | | | | There is a DllMain() declaration in the mingw-runtime-4.0.3.1 and it differs from a tcc one.
* win32/include/winsock2.h (look previous commit)seyko2015-03-031-0/+1290
|
* add declaration of the "double trunc (double _x)" and winsock2.hseyko2015-03-031-0/+21
| | | | This allow to build a windows version of the nimrod compiler.
* A lrint functions in win32/include/math.h are rewrittem because tcc can't ↵seyko2015-03-031-15/+30
| | | | handle "t" constraint
* wincrt1.c: add definition of the __TRY__ if not definedseyko2015-03-032-0/+16
| | | | Some i686-pc-mingw32-gcc don't know about __TRY__
* Turn on a implicit-function-declaration warning by default.seyko2015-03-031-0/+1
| | | | | | | | A non declared function leads to a seriuos problems. And while gcc don't turn this warning on lets tcc do it. This warning can be turned off by -Wno-implicit-function-declaration option. And autor must explicitly do this if program must be compiled with this warning off.
* crt1.c revisionCarlos Montiers2014-12-301-23/+53
|
* little optimization to crt1Carlos Montiers2014-11-231-5/+6
|
* __getmainargs compatibility checking successCarlos Montiers2014-11-221-10/+14
|
* win32: fix implicit function warningJames Buren2014-11-031-0/+2
| | | | | This includes windows.h to fix a warning about an implicit function usage of ExitProcess().
* win64: fix resource file supportgrischka2014-08-011-3/+9
|
* Removed the error message and minor changes.Carlos Montiers2014-07-171-9/+11
|
* __getmainargs return int, not void, and on error, it return -1 and let argv ↵Carlos Montiers2014-07-161-2/+7
| | | | untouched, also argc. Added a if checking the result of it.
* win32/include/process.h: update prototypes to match mingw.minux2014-04-121-12/+12
| | | | | This eliminates an argument type mismatch warning during tcc self-compilation on windows.
* tiny_impdef: remove artificial length restriction.minux2014-04-111-1/+1
|
* workaround a wine cmd bug in build-tcc.batAustin English2014-01-201-1/+1
|
* misc. fixesgrischka2014-01-061-2/+2
| | | | | | | | | | | | | | | | | | | | | | - tccgen: error out for cast to void, as in void foo(void) { return 1; } This avoids an assertion failure in x86_64-gen.c, also. also fix tests2/03_struct.c accordingly - Error: "memory full" - be more specific - Makefiles: remove circular dependencies, lookup tcctest.c from VPATH - tcc.h: cleanup lib, include, crt and libgcc search paths" avoid duplication or trailing slashes with no CONFIG_MULTIARCHDIR (as from 9382d6f1a0e2d0104a82ed805207d9e742c6b068) - tcc.h: remove ";{B}" from PE search path in ce5e12c2f950052d8109b6b7a56d900547705c08 James Lyon wrote: "... I'm not sure this is the right way to fix this problem." And the answer is: No, please. (copying libtcc1.a for tests instead) - win32/build_tcc.bat: do not move away a versioned file
* tccpe: cleanup "imports per ordinal"grischka2014-01-062-109/+0
| | | | | | | - tccpe.c: avoid conflict with imp_sym->st_value, cleanup - _parseLibs.bat, _tcc.bat: no instructions for usage, removed. from commit 642b6d0f50c6b6a842c9239a102fe34d5619e931
* Fix "Add support for struct > 4B returned via registers"grischka2013-12-161-0/+2
| | | | | | | | | | | - avoid assumption "ret_align == register_size" which is false for non-arm targets - rename symbol "sret" to more descriptive "ret_nregs" This fixes commit dcec8673f21da86ae3dcf1ca3e9498127715b795 Also: - remove multiple definitions in win32/include/math.h
* Add the possibility to use noname functions by ordinalYX Hao2013-09-193-1/+117
| | | | | | | | | | | | | | | | | | | | | tcc.c: process.h:177:20: note: expected 'char * const*' but argument is of type 'char const*const*' tccpe.c: Add the possibility to use noname functions by ordinal. use def file: "AliasName @n" build-tcc.bat: 1. Enable 32 bits mode on 64 bits OS. 2. build doc. _parseLibs.bat: Convenient to use "*.def + *.c" instead of *.a, just use -l* _tcc.bat: a practice of _parseLibs.bat Signed-off-by: YX Hao <lifenjoiner@163.com>
* win32: fix libtcc supportgrischka2013-09-101-6/+0
| | | | | | | | | | | | | | For "tcc -run file.c", I was trying to initialize the FP control in a function in libtcc1.a (_runmain) before calling main. Unfortunately that turned out to cause problems with for example libtcc_test since such usage doesn't necessarily define a 'main' function. So for tcc -run we're back to relying on the FP control word that is set in the startup code of tcc.exe rsp. libtcc.dll. This fixes part of commit 73faaea227a53e365dd75f1dba7a5071c7b5e541
* i386-gen: preserve fp control word in gen_cvt_ftoigrischka2013-08-284-7/+19
| | | | | | | | | | | | | | | | | | | | | | | - Use runtime function for conversion - Also initialize fp with tcc -run on windows This fixes a bug where double x = 1.0; double y = 1.0000000000000001; double z = x < y ? 0 : sqrt (x*x - y*y); caused a bad sqrt because rounding precision for the x < y comparison was different to the one used within the sqrt function. This also fixes a bug where printf("%d, %d", (int)pow(10, 2), (int)pow(10, 2)); would print 100, 99 Unrelated: win32: document relative include & lib lookup win32: normalize_slashes: do not mirror silly gcc behavior This reverts part of commit 8a81f9e1036637e21a47e14fb56bf64133546890 winapi: add missing WINAPI decl. for some functions
* add version number to manpageUrs Janssen2013-02-178-18/+18
| | | | | | | avoid c++/c99 style comments in preprocessor directives avoid leadings whitespaces in preprocessor directives mention implemented variable length arrays in documentation fixed ambiguous option in texi2html call (Austin English)
* libtcc: new LIBTCCAPI tcc_set_options(TCCState*, const char*str)grischka2013-02-123-39/+42
| | | | | | | | | | | | | | | | | | | This replaces -> use instead: ----------------------------------- - tcc_set_linker -> tcc_set_options(s, "-Wl,..."); - tcc_set_warning -> tcc_set_options(s, "-W..."); - tcc_enable_debug -> tcc_set_options(s, "-g"); parse_args is moved to libtcc.c (now tcc_parse_args). Also some cleanups: - reorder TCCState members - add some comments here and there - do not use argv's directly, make string copies - use const char* in tcc_set_linker - tccpe: use fd instead of fp tested with -D MEM_DEBUG: 0 bytes left
* tcc -vv/--print-search-dirs: print more infogrischka2013-02-102-35/+30
| | | | | | | | | | | | | | tests/Makefile: - print-search-dirs when 'hello' fails - split off hello-run win32/include/_mingw.h: - fix for compatibility with mingw headers (While our headers in win32 are from mingw-64 and don't have the problem) tiny_libmaker: - don't use "dangerous" mktemp
* tcc.h: declare CValue.tab[LDOUBLE_SIZE/4]grischka2013-02-081-29/+26
| | | | | | | | Should fix some warnings wrt. access out of array bounds. tccelf.c: fix "static function unused" warning x86_64-gen.c: fix "ctype.ref uninitialzed" warning and cleanup tcc-win32.txt: remove obsolete limitation notes.
* win32: wincrt1.c: include stdlib.h for exit()grischka2013-02-041-0/+1
|
* win32: _mingw.h: do not undef NULLgrischka2013-01-241-1/+0
| | | | | | | | | Not wise if stddef.h was already included. This is related to commit 3aa26a794e24a298493a2bc9d70fbd9aebf6437a Instead hack stddef.h to have identical definition and thus avoid the issue mentionned there.
* Revert mistake in "win32: malloc.h: fix win32 ... _STATIC_ASSERT"grischka2013-01-142-69/+0
| | | | | | | from commit fc574f14984d11f1ead50560d1bdc5ae0eaf6d8d. The files from include are copied to win32/include with make install or build-tcc.bat.
* win32: malloc.h: fix win32 tcc-tcc complication by correcting ↵Roy2012-12-313-1/+70
| | | | | | _STATIC_ASSERT, ideas from mingw-w64 changeset 4293 stdarg.h, stddef.h: _mingw.h needs them
* win32: build-tcc.bat: get rid of hardcoded VERSION stringgrischka2012-12-202-11/+7
| | | | | | | Also: - put libtcc.def into libtcc dir - remove ar references - remove libtcc_test from build
* win32: tcc.exe uses libtcc.dllgrischka2012-04-182-5/+2
|
* tcc.c: fix previous commit "Use CString to concat linker options"grischka2012-04-181-1/+1
| | | | | | | | | - remove redunant else branch - zero-terminate linker_arg - declare cstr_xxx as PUB_FUNC (which are functions used in tcc.c but not in the libtcc API. Useful for a tcc(.exe) that uses the libtcc.(so/dll)) - while at it, export PUB_FUNCs from dll