ntfsprogs: provide WINAPI definition

Copied from a header in the public domain.

Fixes compiler error:

ntfsusermap.c:149:13: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘LookupAccountNameA’
  149 | BOOL WINAPI LookupAccountNameA(const char*, const char*, void*,
      |             ^~~~~~~~~~~~~~~~~~
ntfsusermap.c:151:13: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘GetUserNameA’
  151 | BOOL WINAPI GetUserNameA(char*, u32*);
      |             ^~~~~~~~~~~~
pull/106/head
CodingKoopa 2024-03-08 06:31:19 +00:00
parent f196023841
commit 9e0b9ec23a
2 changed files with 20 additions and 0 deletions

View File

@ -434,6 +434,16 @@ struct SDH { /* this is an image of an $SDH index entry */
} ;
#ifdef HAVE_WINDOWS_H
// Copied from minwindef.h.
#ifndef WINAPI
#if defined(_ARM_)
#define WINAPI
#else
#define WINAPI __stdcall
#endif
#endif
/*
* Including <windows.h> leads to numerous conflicts with layout.h
* so define a few needed Windows calls unrelated to ntfs-3g

View File

@ -142,6 +142,16 @@
#include "misc.h"
#ifdef HAVE_WINDOWS_H
// Copied from minwindef.h.
#ifndef WINAPI
#if defined(_ARM_)
#define WINAPI
#else
#define WINAPI __stdcall
#endif
#endif
/*
* Including <windows.h> leads to numerous conflicts with layout.h
* so define a few needed Windows calls unrelated to ntfs-3g