Skip to content

Commit 91f4a5a

Browse files
committed
Build src/port/dirmod.c only on Windows.
Since commit ba7c597, port/dirmod.c has contained only Windows-specific functions. Most platforms don't seem to mind uselessly building an empty file, but OS X for one issues warnings. Hence, treat dirmod.c as a Windows-specific file selected by configure rather than one that's always built. We can revert this change if dirmod.c ever gains any non-Windows functionality again. Back-patch to 9.4 where the mentioned commit appeared.
1 parent df9ebf1 commit 91f4a5a

File tree

4 files changed

+9
-2
lines changed

4 files changed

+9
-2
lines changed

configure

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12083,6 +12083,12 @@ esac
1208312083
fi
1208412084

1208512085

12086+
case " $LIBOBJS " in
12087+
*" dirmod.$ac_objext "* ) ;;
12088+
*) LIBOBJS="$LIBOBJS dirmod.$ac_objext"
12089+
;;
12090+
esac
12091+
1208612092
case " $LIBOBJS " in
1208712093
*" kill.$ac_objext "* ) ;;
1208812094
*) LIBOBJS="$LIBOBJS kill.$ac_objext"

configure.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1439,6 +1439,7 @@ fi
14391439
# Win32 support
14401440
if test "$PORTNAME" = "win32"; then
14411441
AC_REPLACE_FUNCS(gettimeofday)
1442+
AC_LIBOBJ(dirmod)
14421443
AC_LIBOBJ(kill)
14431444
AC_LIBOBJ(open)
14441445
AC_LIBOBJ(system)

src/include/port.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ extern void get_man_path(const char *my_exec_path, char *ret_path);
6161
extern bool get_home_path(char *ret_path);
6262
extern void get_parent_directory(char *path);
6363

64-
/* port/dirmod.c */
64+
/* common/pgfnames.c */
6565
extern char **pgfnames(const char *path);
6666
extern void pgfnames_cleanup(char **filenames);
6767

src/port/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ include $(top_builddir)/src/Makefile.global
3030
override CPPFLAGS := -I$(top_builddir)/src/port -DFRONTEND $(CPPFLAGS)
3131
LIBS += $(PTHREAD_LIBS)
3232

33-
OBJS = $(LIBOBJS) chklocale.o dirmod.o erand48.o inet_net_ntop.o \
33+
OBJS = $(LIBOBJS) chklocale.o erand48.o inet_net_ntop.o \
3434
noblock.o path.o pgcheckdir.o pgmkdirp.o pgsleep.o \
3535
pgstrcasecmp.o pqsignal.o \
3636
qsort.o qsort_arg.o quotes.o sprompt.o tar.o thread.o

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy