Skip to content

Commit

Permalink
Revert "do not define internal libc macros"
Browse files Browse the repository at this point in the history
another attempt at fixing macos

This reverts commit be5bf3e.
  • Loading branch information
N-R-K committed Jul 1, 2023
1 parent 6ad7aac commit 6185e3c
Showing 1 changed file with 16 additions and 6 deletions.
22 changes: 16 additions & 6 deletions src/nnn.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,6 @@
*/

#define _FILE_OFFSET_BITS 64 /* Support large files on 32-bit glibc */
#define _XOPEN_SOURCE_EXTENDED
#undef _XOPEN_SOURCE
#define _XOPEN_SOURCE 700L
#ifndef NCURSES_WIDECHAR
#define NCURSES_WIDECHAR 1
#endif

#if defined(__linux__) || defined(MINGW) || defined(__MINGW32__) \
|| defined(__MINGW64__) || defined(__CYGWIN__)
Expand Down Expand Up @@ -65,6 +59,19 @@
#endif
#include <sys/wait.h>

#ifdef __linux__ /* Fix failure due to mvaddnwstr() */
#ifndef NCURSES_WIDECHAR
#define NCURSES_WIDECHAR 1
#endif
#elif defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__) \
|| defined(__APPLE__) || defined(__sun)
#ifndef _XOPEN_SOURCE_EXTENDED
#define _XOPEN_SOURCE_EXTENDED
#endif
#endif
#ifndef __USE_XOPEN /* Fix wcswidth() failure, ncursesw/curses.h includes whcar.h on Ubuntu 14.04 */
#define __USE_XOPEN
#endif
#include <dirent.h>
#include <errno.h>
#include <fcntl.h>
Expand Down Expand Up @@ -94,6 +101,9 @@
#include <unistd.h>
#include <stddef.h>
#include <stdalign.h>
#ifndef __USE_XOPEN_EXTENDED
#define __USE_XOPEN_EXTENDED 1
#endif
#include <ftw.h>
#include <pwd.h>
#include <grp.h>
Expand Down

0 comments on commit 6185e3c

Please sign in to comment.