Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

UNIXem

Unix-emulation, for Windows

C License GitHub release Last Commit CI

Table of Contents

Introduction

UNIXem is a small and simple library that provides emulation of several popular Unix API functions on the Windows platform. Its primary purpose is to assist Windows programmers who are porting to Unix or are writing multi-platform code.

NOTE: UNIXem is a Windows-only library.

Installation

As of 1.12.7, CMake support is provided, and this is the recommended means of installation. Detailed instructions are provided in INSTALL.md.

Components

Top-level compatibility headers (e.g. dirent.h, unistd.h) wrap the corresponding unixem/ headers.

Unix API emulation

API(s) Header Purpose Restrictions
chdir(), getcwd(), mkdir(), rmdir() unixem/unistd.h Working directory; make/remove dirs
close(), getpagesize(), link(), pathconf(), realpath(), unlink() unixem/unistd.h FD close; page size; links; paths
dlopen(), dlclose(), dlsym(), dlerror() unixem/dlfcn.h Dynamic library load/lookup
gethostname(), getpid(), usleep() unixem/unistd.h Host name; process id; sleep
getrusage() unixem/sys/resource.h Process resource usage Limited field coverage
gettimeofday() unixem/sys/time.h Wall-clock time of day
glob(), globfree() unixem/glob.h Pathname pattern expansion Incomplete flag coverage
mkdtemp(), mkstemp() unixem/unistd.h Temporary directory/file creation
mmap(), munmap(), msync() unixem/sys/mman.h Memory-map files/regions
opendir(), readdir(), rewinddir(), closedir() (+ w* wide forms) unixem/dirent.h Directory iteration
readv(), writev() unixem/sys/uio.h Vectored file read/write
setenv(), unsetenv() unixem/setenv.h Environment variable set/clear
timegm() unixem/time.h UTC struct tm to time_t

Atomic operations

API(s) Header Purpose Restrictions
unixem_atomic_* (inc/dec/add/sub/set/read/write/test) unixem/asm/atomic.h Linux-style atomic integers

Utility APIs

API(s) Header Purpose Restrictions
begins_with, ends_with unixem/util/str.h UNIXem.Util.Str string helpers Helper API (also internal)
char_is_path_sep, directory_exists, get_home_directory unixem/util/fs.h UNIXem.Util.FS path/FS helpers Helper API (also internal)

Compatibility placeholders

API(s) Header Purpose Restrictions
arpa/inet.h Compatibility include stub Empty placeholder
netinet/in.h Compatibility include stub Empty placeholder
sys/socket.h Compatibility include stub Empty placeholder

Examples

Examples are not yet provided in this distribution. See the component and unit tests under test/ for usage illustrations.

Project Information

Where to get help

GitHub Issues

Contribution guidelines

Defect reports, feature requests, and pull requests are welcome on https://github.com/synesissoftware/UNIXem.

Dependencies

There are no dependencies for installation and use of UNIXem.

Test-only dependencies

The component-/unit-tests depend on:

Related projects

UNIXem is used by a number of C/C++ libraries for compilation/linking/testing on Windows, including:

License

UNIXem is released under the 3-clause BSD license. See LICENSE for details.

About

UNIXem is a small and simple library that provides emulation of several popular Unix API functions on the Windows platform (for C and C++). Its primary purpose is to assist Windows programmers who are porting to Unix or are writing multi-platform code.

Topics

Resources

Stars

27 stars

Watchers

4 watching

Forks

Releases

Packages

Used by

Contributors

Languages