Git Product home page Git Product logo

coderrc / libmingw32_extended Goto Github PK

View Code? Open in Web Editor NEW
12.0 2.0 1.0 133 KB

A library for mingw32 that includes some POSIX functions but eventually all of the POSIX functions will be completed and right now the POSIX functions that are included in this repository are pipe, wait, mmap, munmap, msync, mlock, munlock, posix_madvise, madvise, shm_open, shm_unlink, readv, writev, process_vm_readv, process_vm_writev, dlopen, etc

License: MIT License

Makefile 6.31% C 93.69%
windows mman mmap mlock msync munmap posix-madvise madvise shm-open shm-unlink

libmingw32_extended's Introduction

libmingw32_extended

A library for mingw32 that includes POSIX functions.

Build

1. Clone Source

git clone https://github.com/CoderRC/libmingw32_extended.git
cd libmingw32_extended

2. Build

mkdir build
cd build
../configure
make

Install

make install

Requirements

Download a bash command line environment to run configure.

Download git to use the git command for cloning the source.

Download gcc to compile the source and configure it.

Download make to compile the library.

If the bash command line environment supports the pacman command do

pacman -S git
pacman -S mingw-w64-x86_64-gcc
pacman -S make

Contributing to the source

To properly add new sources to the repository, the sources must be added to the source directory in the repository and in the configure file add paths to the SOURCES.

To properly add new include directories to the repository, the include directories must be added to the include directory in the repository and in the configure file add include paths to the INCLUDE_DIRECTORIES.

To properly add new headers to the repository, the headers must be added to the include directory in the repository and in the configure file add paths to the INCLUDE_FILES.

Functions Completed and Can Be Used In Your Projects:

pipe, wait, mmap, munmap, msync, mlock, munlock, posix_madvise, madvise, shm_open, shm_unlink, readv, writev, process_vm_readv, process_vm_writev, dlopen, dlclose, dlsym, dlerror, dladdr

libmingw32_extended's People

Contributors

coderrc avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

kassane

libmingw32_extended's Issues

Can someone help figure out [Problems with compiling libmingw32_extended]

[Put what did not work and the error message if there are any error messages]
that is the error when i run make!

make
mkdir -p obj
gcc -DPACKAGE_NAME="" -DPACKAGE_TARNAME="" -DPACKAGE_VERSION="" -DPACKAGE_STRING="" -DPACKAGE_BUGREPORT="" -DPACKAGE_URL="" -DHAVE_FCNTL_H=1 -DHAVE_WINDOWS_H=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_ERRNO_H=1 -DHAVE_UNISTD_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDIO_H=1 -DHAVE_TLHELP32_H=1 -DHAVE_PSAPI_H=1 -I../include -c ../source/pipe.c -o obj/pipe.o
../source/pipe.c: In function ‘pipe’:
../source/pipe.c:6:3: warning: implicit declaration of function ‘_pipe’; did you mean ‘pipe’? [-Wimplicit-function-declaration]
6 | _pipe(__fildes, 65536, _O_BINARY);
| ^~~~~
| pipe
gcc -DPACKAGE_NAME="" -DPACKAGE_TARNAME="" -DPACKAGE_VERSION="" -DPACKAGE_STRING="" -DPACKAGE_BUGREPORT="" -DPACKAGE_URL="" -DHAVE_FCNTL_H=1 -DHAVE_WINDOWS_H=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_ERRNO_H=1 -DHAVE_UNISTD_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDIO_H=1 -DHAVE_TLHELP32_H=1 -DHAVE_PSAPI_H=1 -I../include -c ../source/wait.c -o obj/wait.o
../source/wait.c: In function ‘wait’:
../source/wait.c:38:9: warning: implicit declaration of function ‘_cwait’; did you mean ‘wait’? [-Wimplicit-function-declaration]
38 | _cwait(NULL, (intptr_t)hProcess, _WAIT_CHILD);
| ^~~~~~
| wait
../source/wait.c:46:3: warning: implicit declaration of function ‘_set_errno’; did you mean ‘__errno’? [-Wimplicit-function-declaration]
46 | _set_errno(ECHILD);
| ^~~~~~~~~~
| __errno
gcc -DPACKAGE_NAME="" -DPACKAGE_TARNAME="" -DPACKAGE_VERSION="" -DPACKAGE_STRING="" -DPACKAGE_BUGREPORT="" -DPACKAGE_URL="" -DHAVE_FCNTL_H=1 -DHAVE_WINDOWS_H=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_ERRNO_H=1 -DHAVE_UNISTD_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDIO_H=1 -DHAVE_TLHELP32_H=1 -DHAVE_PSAPI_H=1 -I../include -c ../source/mmap.c -o obj/mmap.o
../source/mmap.c: In function ‘mmap’:
../source/mmap.c:64:28: warning: implicit declaration of function ‘_get_osfhandle’ [-Wimplicit-function-declaration]
64 | hFile = (HANDLE) _get_osfhandle (__fd);
| ^~~~~~~~~~~~~~
../source/mmap.c:64:19: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
64 | hFile = (HANDLE) _get_osfhandle (__fd);
| ^
../source/mmap.c:70:15: warning: implicit declaration of function ‘_set_errno’; did you mean ‘__errno’? [-Wimplicit-function-declaration]
70 | _set_errno (EBADF);
| ^~~~~~~~~~
| __errno
gcc -DPACKAGE_NAME="" -DPACKAGE_TARNAME="" -DPACKAGE_VERSION="" -DPACKAGE_STRING="" -DPACKAGE_BUGREPORT="" -DPACKAGE_URL="" -DHAVE_FCNTL_H=1 -DHAVE_WINDOWS_H=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_ERRNO_H=1 -DHAVE_UNISTD_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDIO_H=1 -DHAVE_TLHELP32_H=1 -DHAVE_PSAPI_H=1 -I../include -c ../source/munmap.c -o obj/munmap.o
gcc -DPACKAGE_NAME="" -DPACKAGE_TARNAME="" -DPACKAGE_VERSION="" -DPACKAGE_STRING="" -DPACKAGE_BUGREPORT="" -DPACKAGE_URL="" -DHAVE_FCNTL_H=1 -DHAVE_WINDOWS_H=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_ERRNO_H=1 -DHAVE_UNISTD_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDIO_H=1 -DHAVE_TLHELP32_H=1 -DHAVE_PSAPI_H=1 -I../include -c ../source/msync.c -o obj/msync.o
gcc -DPACKAGE_NAME="" -DPACKAGE_TARNAME="" -DPACKAGE_VERSION="" -DPACKAGE_STRING="" -DPACKAGE_BUGREPORT="" -DPACKAGE_URL="" -DHAVE_FCNTL_H=1 -DHAVE_WINDOWS_H=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_ERRNO_H=1 -DHAVE_UNISTD_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDIO_H=1 -DHAVE_TLHELP32_H=1 -DHAVE_PSAPI_H=1 -I../include -c ../source/mlock.c -o obj/mlock.o
gcc -DPACKAGE_NAME="" -DPACKAGE_TARNAME="" -DPACKAGE_VERSION="" -DPACKAGE_STRING="" -DPACKAGE_BUGREPORT="" -DPACKAGE_URL="" -DHAVE_FCNTL_H=1 -DHAVE_WINDOWS_H=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_ERRNO_H=1 -DHAVE_UNISTD_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDIO_H=1 -DHAVE_TLHELP32_H=1 -DHAVE_PSAPI_H=1 -I../include -c ../source/munlock.c -o obj/munlock.o
gcc -DPACKAGE_NAME="" -DPACKAGE_TARNAME="" -DPACKAGE_VERSION="" -DPACKAGE_STRING="" -DPACKAGE_BUGREPORT="" -DPACKAGE_URL="" -DHAVE_FCNTL_H=1 -DHAVE_WINDOWS_H=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_ERRNO_H=1 -DHAVE_UNISTD_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDIO_H=1 -DHAVE_TLHELP32_H=1 -DHAVE_PSAPI_H=1 -I../include -c ../source/posix_madvise.c -o obj/posix_madvise.o
gcc -DPACKAGE_NAME="" -DPACKAGE_TARNAME="" -DPACKAGE_VERSION="" -DPACKAGE_STRING="" -DPACKAGE_BUGREPORT="" -DPACKAGE_URL="" -DHAVE_FCNTL_H=1 -DHAVE_WINDOWS_H=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_ERRNO_H=1 -DHAVE_UNISTD_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDIO_H=1 -DHAVE_TLHELP32_H=1 -DHAVE_PSAPI_H=1 -I../include -c ../source/madvise.c -o obj/madvise.o
gcc -DPACKAGE_NAME="" -DPACKAGE_TARNAME="" -DPACKAGE_VERSION="" -DPACKAGE_STRING="" -DPACKAGE_BUGREPORT="" -DPACKAGE_URL="" -DHAVE_FCNTL_H=1 -DHAVE_WINDOWS_H=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_ERRNO_H=1 -DHAVE_UNISTD_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDIO_H=1 -DHAVE_TLHELP32_H=1 -DHAVE_PSAPI_H=1 -I../include -c ../source/shm_open.c -o obj/shm_open.o
../source/shm_open.c: In function ‘shm_open’:
../source/shm_open.c:26:3: warning: implicit declaration of function ‘_get_errno’; did you mean ‘__errno’? [-Wimplicit-function-declaration]
26 | _get_errno (&error_value);
| ^~~~~~~~~~
| __errno
../source/shm_open.c:27:3: error: too few arguments to function ‘mkdir’
27 | mkdir (foldername);
| ^~~~~
In file included from /usr/include/sys/_default_fcntl.h:211,
from /usr/include/sys/fcntl.h:3,
from /usr/include/fcntl.h:12,
from ../source/shm_open.c:6:
/usr/include/sys/stat.h:140:9: note: declared here
140 | int mkdir (const char *_path, mode_t __mode );
| ^~~~~
../source/shm_open.c:28:3: warning: implicit declaration of function ‘_set_errno’; did you mean ‘__errno’? [-Wimplicit-function-declaration]
28 | _set_errno (error_value);
| ^~~~~~~~~~
| __errno
../source/shm_open.c:39:5: warning: implicit declaration of function ‘_fullpath’; did you mean ‘FillPath’? [-Wimplicit-function-declaration]
39 | _fullpath (NULL, filename,
| ^~~~~~~~~
| FillPath
../source/shm_open.c:39:5: warning: initialization of ‘char *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
make: *** [Makefile:94: shm_open.o] Error 1

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.