Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: remove redundant POSIX function aliases #990

Merged
merged 1 commit into from
Dec 19, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 9 additions & 15 deletions src/windows/port.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,15 +49,16 @@
#define WIN32_LEAN_AND_MEAN /* We always want minimal includes */
#endif

#include <direct.h> /* for _getcwd() */
#include <io.h> /* because we so often use open/close/etc */
#include <process.h> /* for _getpid() */
#include <windows.h>
#include <winsock.h> /* for gethostname */
#include <io.h> /* because we so often use open/close/etc */
#include <direct.h> /* for _getcwd() */
#include <process.h> /* for _getpid() */
#include <cstdarg> /* template_dictionary.cc uses va_copy */
#include <cstdio> /* read in vsnprintf decl. before redifining it */
#include <cstring> /* for _strnicmp(), strerror_s() */
#include <ctime> /* for localtime_s() */
#include <winsock.h> /* for gethostname */

#include <cstdarg> /* template_dictionary.cc uses va_copy */
#include <cstdio> /* read in vsnprintf decl. before redefining it */
#include <cstring> /* for _strnicmp(), strerror_s() */
#include <ctime> /* for localtime_s() */
/* Note: the C++ #includes are all together at the bottom. This file is
* used by both C and C++ code, so we put all the C++ together.
*/
Expand All @@ -80,13 +81,6 @@

/* file I/O */
#define PATH_MAX 1024
#define access _access
#define getcwd _getcwd
#define open _open
#define read _read
#define write(fd, p, n) _write(fd, p, n)
#define lseek _lseek
#define close _close
#define popen _popen
#define pclose _pclose
#define R_OK 04 /* read-only (for access()) */
Expand Down