]> granicus.if.org Git - postgresql/commitdiff
Build src/port/dirmod.c only on Windows.
authorTom Lane <tgl@sss.pgh.pa.us>
Sat, 14 Mar 2015 18:08:45 +0000 (14:08 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Sat, 14 Mar 2015 18:08:45 +0000 (14:08 -0400)
Since commit ba7c5975adea74c6f17bdb0e0427ad85962092a2, 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.

configure
configure.in
src/include/port.h
src/port/Makefile

index 52048696e2e9a1f92fc92164fa78399dece4a874..6c4d65f29b2f6516710bd9e17f6cbd0a9882defe 100755 (executable)
--- a/configure
+++ b/configure
@@ -11989,6 +11989,12 @@ esac
 fi
 
 
+  case " $LIBOBJS " in
+  *" dirmod.$ac_objext "* ) ;;
+  *) LIBOBJS="$LIBOBJS dirmod.$ac_objext"
+ ;;
+esac
+
   case " $LIBOBJS " in
   *" kill.$ac_objext "* ) ;;
   *) LIBOBJS="$LIBOBJS kill.$ac_objext"
index 5c6d6e2c7024d35194ba2d28dbcb1b9c903b6b25..a09f9042c9915d93d8a4db339bcd4b1ecf2da170 100644 (file)
@@ -1454,6 +1454,7 @@ fi
 # Win32 support
 if test "$PORTNAME" = "win32"; then
   AC_REPLACE_FUNCS(gettimeofday)
+  AC_LIBOBJ(dirmod)
   AC_LIBOBJ(kill)
   AC_LIBOBJ(open)
   AC_LIBOBJ(system)
index 7dcc81ee14b5c5d1839c42f87369397ad366cba3..86941f7ddd79d11c52dd3df2387ea86f3345b95a 100644 (file)
@@ -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 void get_parent_directory(char *path);
 
-/* port/dirmod.c */
+/* common/pgfnames.c */
 extern char **pgfnames(const char *path);
 extern void pgfnames_cleanup(char **filenames);
 
index 6dc642cd3e516d1e2e6807f9455a63fa9c920385..835b034fe96c9e27b37ae88de369fd7507018742 100644 (file)
@@ -30,7 +30,7 @@ include $(top_builddir)/src/Makefile.global
 override CPPFLAGS := -I$(top_builddir)/src/port -DFRONTEND $(CPPFLAGS)
 LIBS += $(PTHREAD_LIBS)
 
-OBJS = $(LIBOBJS) chklocale.o dirmod.o erand48.o fls.o inet_net_ntop.o \
+OBJS = $(LIBOBJS) chklocale.o erand48.o fls.o inet_net_ntop.o \
        noblock.o path.o pgcheckdir.o pg_crc.o pgmkdirp.o pgsleep.o \
        pgstrcasecmp.o pqsignal.o \
        qsort.o qsort_arg.o quotes.o sprompt.o tar.o thread.o