Skip to content

Commit

Permalink
Moved blob specific defines for the Windows build to blob.c
Browse files Browse the repository at this point in the history
  • Loading branch information
dlemstra committed Apr 27, 2024
1 parent d98a6dc commit a4c84b6
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 17 deletions.
19 changes: 19 additions & 0 deletions MagickCore/blob.c
Expand Up @@ -93,6 +93,25 @@
#include <io.h>
#define _O_BINARY O_BINARY
#endif
#if defined(MAGICKCORE_WINDOWS_SUPPORT)
# if !defined(fsync)
# define fsync _commit
# endif
# if !defined(mmap)
# define MAGICKCORE_HAVE_MMAP 1
# define mmap(address,length,protection,access,file,offset) \
NTMapMemory(address,length,protection,access,file,offset)
# endif
# if !defined(munmap)
# define munmap(address,length) NTUnmapMemory(address,length)
# endif
# if !defined(pclose)
# define pclose _pclose
# endif
# if !defined(popen)
# define popen _popen
# endif
#endif

/*
Typedef declarations.
Expand Down
17 changes: 0 additions & 17 deletions MagickCore/nt-base-private.h
Expand Up @@ -33,9 +33,6 @@ extern "C" {
#if !defined(closedir)
# define closedir(directory) NTCloseDirectory(directory)
#endif
#if !defined(fsync)
# define fsync _commit
#endif
#if !defined(MAGICKCORE_LTDL_DELEGATE)
#if !defined(lt_dlclose)
# define lt_dlclose(handle) NTCloseLibrary(handle)
Expand All @@ -50,23 +47,9 @@ extern "C" {
# define lt_dlsym(handle,name) NTGetLibrarySymbol(handle,name)
#endif
#endif
#if !defined(mmap)
# define MAGICKCORE_HAVE_MMAP 1
# define mmap(address,length,protection,access,file,offset) \
NTMapMemory(address,length,protection,access,file,offset)
#endif
#if !defined(munmap)
# define munmap(address,length) NTUnmapMemory(address,length)
#endif
#if !defined(opendir)
# define opendir(directory) NTOpenDirectory(directory)
#endif
#if !defined(pclose)
# define pclose _pclose
#endif
#if !defined(popen)
# define popen _popen
#endif
#if !defined(read)
# define read(fd,buffer,count) _read(fd,buffer,(unsigned int) count)
#endif
Expand Down

0 comments on commit a4c84b6

Please sign in to comment.