Updated: 23rd February 2012

UNIXem: UNIX Emulation Library for Win32

Several Linux APIs, such as opendir() (a simple but useful set of functions directory enumeration functons, comprising opendir(), closedir(), rewinddir() and readdir()), are not provided on Windows, or are not provided on Intel C/C++ / Visual C++. This API, along with glob(), gettimeofday() and one or two others are provided in this simple library.

The implementations provided are not industrial strength, by any means, and are only intended to provide aid in cross-platform development. There are NO WARRANTIES WHATSOEVER with this software, and if you use it for any production code, you may be making a serious mistake.

Notwithstanding those caveats, it is my intention to provide a good quality library, and I think it provides a good basis for testing for UNIX APIs from the Win32 platform, so I would appreciate notification if you locate any bugs

As of version 1.4, it is released under the BSD license. Earlier versions use the Synesis Software Standard Source License.

Date Version Download Comments
    Distribution Checksum  
13th August 2010 1.9.1 unixem-1.9.1.zip (742599 bytes) unixem-1.9.1.md5 (34 bytes)
~ reworked the API such that all functions are prefixed with unixem_(), and defined to the UNIX functions via macros

~ 64-bit compatibility fixes

13th August 2010 1.8.5 unixem-1.8.5.zip (540095 bytes) unixem-1.8.5.md5 (34 bytes)
~ gettimeofday() now returns int (instead of void)

+ added VC++ 10 implicit-link support

4th April 2010 1.8.4 unixem-1.8.4.zip (539171 bytes) unixem-1.8.4.md5 (34 bytes)
~ fixed erroneous library name in implicit link file

+ added VC++ 10 support

6th February 2010 1.8.3 unixem-1.8.3.zip (535903 bytes) unixem-1.8.3.md5 (34 bytes)
~ refactored headers to resolve conflict(s) between unistd.h and winsock(2).h withouth using #define to prevent subsequent inclusion of winsock(2).h

+ added empty (placeholder) files: arpa/inet.h, netinet/in.h, sys/socket.h

~ fixed _M_X86 implicit link defect

~ added implicit link support for Borland 5.9+, 6.1+ and Intel C/C++ 9, 10, 11

~ changed library name/implicit link directives for VC++ x64/IA64 targets

+ added Synesis-standard make targets: compile.libs.core, compile.libs, compile, build.libs.core, build.libs, build

~ various other minor changes

13th May 2008 1.8.2 unixem-1.8.2.zip (484919 bytes) unixem-1.8.2.md5 (34 bytes)
+ Win64-compatibility

+ implicit link for x64 and IA64 for VC++ 8 & 9

22nd April 2008 1.8.1 unixem-1.8.1.zip (476882 bytes) unixem-1.8.1.md5 (34 bytes)
+ gethostname()

+ getpid()

~ changed 2nd param of gettimeofday() to void*

~ improved semantics for glob() when a pattern search in an existing directory matches no entries

20th April 2008 1.7.5 unixem-1.7.5.zip (514019 bytes) unixem-1.7.5.md5 (34 bytes)
~ the distribution is now rooted at unixem-1.7.5/

+ makefiles for Visual C++ 8 & 9

+ implicit linking for Borland C/C++ 5.82

+ implicit linking for VC++ 9

~ bundles shwild 0.9.13

~ bundles xTests 0.6.1

24th February 2008 1.7.4 unixem-1.7.4.zip (500852 bytes) unixem-1.7.4.md5 (34 bytes)
~ compatibility with Secure Library string functions (in src/glob.c and src/setenv.c, and adding in new header file include/unixem/internal/safestr.h)

~ improved handling of offsets and errors in src/mmap.c

~ fixed bug in gettimeofday(), which was showing local time rather than the required system time

12th March 2007 1.7.3 unixem-1.7.3.zip (426624 bytes) unixem-1.7.3.md5 (34 bytes)
~ minor modifications to fixup interactions with appropriate compiler runtime library

12th September 2006 1.7.2 unixem-1.7.2.zip (426139 bytes) unixem-1.7.2.md5 (34 bytes)
~ enhancements to makefiles (for CodeWarrior) for increased warning detection

~ minor modifications to source files to suppress warnings, as appropriate

3rd September 2006 1.7.1 unixem-1.7.1.zip (427031 bytes) unixem-1.7.1.md5 (34 bytes)
~ minor modifications to inclusion order, to firm up compiler-independence

+ usleep()
+ getrusage()
+ setenv() and unsetenv()

12th August 2006 1.6.2 unixem-1.6.2.zip (383933 bytes) unixem-1.6.2.md5 (34 bytes)
~ minor changes to unistd.h/.c for better detection of functions already provided with certain compilers

+ Now supports suppression of implicit linking (for compilers that support it) by definition of the pre-processor symbol UNIXEM_NO_IMPLICIT_LINK

21st September 2005 1.6.1 unixem-1.6.1.zip (289137 bytes) unixem-1.6.1.md5 (34 bytes)
+ Addition of better mapping from Win32 error codes to errno
+ Addition of readv() and write() (sys/uio.h, uio.c)
+ Addition of implicit-linking header - unixem/implicit_link.h
+ Addition of link() and unlink() (unistd.h)
+ Addition of mkdir() (unistd.h)
+ Addition of realpath() (unistd.h)
~ fix for readdir() to set errno only in response to inappropriate call (additional to one that returns NULL)
+ glob() (glob.h, glob.h) now supports the following: