Skip to content

Commit 54037d7

Browse files
committed
Move FD_SETSIZE to configure.ac
The commit from the pull request #644 sets the macro FD_SETSIZE to 128 for every host OS, while it is needed on Windows only. Note that this macro has a much higher value on other OS and after this commit it get reduced to 128 only. Since in configure.ac is already present a hook to change the compile defines for Windows, move there also FD_SETSIZE. Signed-off-by: Antonio Borneo <[email protected]>
1 parent 3bed4c8 commit 54037d7

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

Makefile.am

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,15 +37,13 @@ DISTCLEANFILES += jimtcl/jsmn/jsmn.o
3737
endif
3838

3939
# common flags used in openocd build
40-
AM_CFLAGS = $(GCC_WARNINGS)\
41-
-DFD_SETSIZE=128
40+
AM_CFLAGS = $(GCC_WARNINGS)
4241

4342
AM_CPPFLAGS = $(HOST_CPPFLAGS)\
4443
-I$(top_srcdir)/src \
4544
-I$(top_builddir)/src \
4645
-DPKGDATADIR=\"$(pkgdatadir)\" \
47-
-DBINDIR=\"$(bindir)\"\
48-
-DFD_SETSIZE=128
46+
-DBINDIR=\"$(bindir)\"
4947

5048
if INTERNAL_JIMTCL
5149
AM_CPPFLAGS += -I$(top_srcdir)/jimtcl \

configure.ac

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -436,7 +436,7 @@ AS_CASE([$host],
436436
# In case enable_buspirate=auto, make sure it will not be built.
437437
enable_buspirate=no
438438
439-
AC_SUBST([HOST_CPPFLAGS], [-D__USE_MINGW_ANSI_STDIO])
439+
AC_SUBST([HOST_CPPFLAGS], ["-D__USE_MINGW_ANSI_STDIO -DFD_SETSIZE=128"])
440440
],
441441
[*darwin*], [
442442
is_darwin=yes

0 commit comments

Comments
 (0)