Commit 91f4a5a9 authored by Tom Lane's avatar Tom Lane

Build src/port/dirmod.c only on Windows.

Since commit ba7c5975, 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.
parent df9ebf1e
...@@ -12083,6 +12083,12 @@ esac ...@@ -12083,6 +12083,12 @@ esac
fi fi
case " $LIBOBJS " in
*" dirmod.$ac_objext "* ) ;;
*) LIBOBJS="$LIBOBJS dirmod.$ac_objext"
;;
esac
case " $LIBOBJS " in case " $LIBOBJS " in
*" kill.$ac_objext "* ) ;; *" kill.$ac_objext "* ) ;;
*) LIBOBJS="$LIBOBJS kill.$ac_objext" *) LIBOBJS="$LIBOBJS kill.$ac_objext"
......
...@@ -1439,6 +1439,7 @@ fi ...@@ -1439,6 +1439,7 @@ fi
# Win32 support # Win32 support
if test "$PORTNAME" = "win32"; then if test "$PORTNAME" = "win32"; then
AC_REPLACE_FUNCS(gettimeofday) AC_REPLACE_FUNCS(gettimeofday)
AC_LIBOBJ(dirmod)
AC_LIBOBJ(kill) AC_LIBOBJ(kill)
AC_LIBOBJ(open) AC_LIBOBJ(open)
AC_LIBOBJ(system) AC_LIBOBJ(system)
......
...@@ -61,7 +61,7 @@ extern void get_man_path(const char *my_exec_path, char *ret_path); ...@@ -61,7 +61,7 @@ extern void get_man_path(const char *my_exec_path, char *ret_path);
extern bool get_home_path(char *ret_path); extern bool get_home_path(char *ret_path);
extern void get_parent_directory(char *path); extern void get_parent_directory(char *path);
/* port/dirmod.c */ /* common/pgfnames.c */
extern char **pgfnames(const char *path); extern char **pgfnames(const char *path);
extern void pgfnames_cleanup(char **filenames); extern void pgfnames_cleanup(char **filenames);
......
...@@ -30,7 +30,7 @@ include $(top_builddir)/src/Makefile.global ...@@ -30,7 +30,7 @@ include $(top_builddir)/src/Makefile.global
override CPPFLAGS := -I$(top_builddir)/src/port -DFRONTEND $(CPPFLAGS) override CPPFLAGS := -I$(top_builddir)/src/port -DFRONTEND $(CPPFLAGS)
LIBS += $(PTHREAD_LIBS) LIBS += $(PTHREAD_LIBS)
OBJS = $(LIBOBJS) chklocale.o dirmod.o erand48.o inet_net_ntop.o \ OBJS = $(LIBOBJS) chklocale.o erand48.o inet_net_ntop.o \
noblock.o path.o pgcheckdir.o pgmkdirp.o pgsleep.o \ noblock.o path.o pgcheckdir.o pgmkdirp.o pgsleep.o \
pgstrcasecmp.o pqsignal.o \ pgstrcasecmp.o pqsignal.o \
qsort.o qsort_arg.o quotes.o sprompt.o tar.o thread.o qsort.o qsort_arg.o quotes.o sprompt.o tar.o thread.o
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment