Index: trunk/config.auto.h.in =================================================================== --- trunk/config.auto.h.in (revision 2549) +++ trunk/config.auto.h.in (revision 2550) @@ -2,8 +2,6 @@ /**** TODO ****/ -/* Define to 1 if you have the `getpwuid' function. */ -#define HAVE_GETPWUID 1 /* Define to 1 if you have the header file. */ #define HAVE_PWD_H 1 @@ -79,6 +77,9 @@ print {\n\n/* Define to 1 if you have the `gdImagePng' function. */\n} print_ternary libs/gui/gd/gdImagePng/presents {#define HAVE_GDIMAGEPNG 1} {/* #undef HAVE_GDIMAGEPNG */} +print {\n\n/* Define to 1 if you have the `getpwuid' function. */\n} +print_ternary libs/userpass/getpwuid/presents {#define HAVE_GETPWUID 1} {/* #undef HAVE_GETPWUID */} + print {\n\n/* Wrapper for S_ISLNK(x); always return 0 if S_ISLNK doesn't exist */\n} switch ?/target/libs/fs/stat/macros/S_ISLNK case {^$} print {#define WRAP_S_ISLNK(x) 0}; end; Index: trunk/scconfig/Makefile =================================================================== --- trunk/scconfig/Makefile (revision 2549) +++ trunk/scconfig/Makefile (revision 2550) @@ -42,7 +42,7 @@ # include src/socket/Makefile.plugin # Comment this line if you do not need user/password API detection -# include src/userpass/Makefile.plugin +include src/userpass/Makefile.plugin # Comment this line if you do not need gui (X11, toolkits) include src/gui/Makefile.plugin Index: trunk/scconfig/hooks.c =================================================================== --- trunk/scconfig/hooks.c (revision 2549) +++ trunk/scconfig/hooks.c (revision 2550) @@ -165,7 +165,8 @@ want_stroke = plug_is_enabled("stroke"); require("cc/fpic", 0, 1); - require("libs/fs/mkdtemp", 0, 0); + require("libs/fs/mkdtemp/*", 0, 0); + require("libs/userpass/getpwuid/*", 0, 0); if (require("libs/ldl", 0, 0) != 0) { if (require("libs/LoadLibrary", 0, 0) != 0) { Index: trunk/src/Makefile.dep =================================================================== --- trunk/src/Makefile.dep (revision 2549) +++ trunk/src/Makefile.dep (revision 2550) @@ -1375,7 +1375,9 @@ global.h crosshair.h data.h drill.h error.h search.h misc_util.h misc.h \ mymem.h mymem.h rats.h rtree.h strflags.h macro.h undo.h find.h draw.h \ pcb-printf.h plugins.h hid_actions.h misc_util.h \ - ../src_plugins/report/report_conf.h conf.h compat_misc.h dolists.h \ + ../src_plugins/report/report_conf.h conf.h compat_misc.h \ + ../src_3rd/genregex/regex_sei.h ../src_3rd/genregex/regex_templ.h \ + ../src_3rd/genregex/regex.h dolists.h \ ../src_plugins/report/report_conf_fields.h ../src_plugins/shand_cmd/command.o: ../src_plugins/shand_cmd/command.c \ ../config.h ../config.auto.h conf_core.h conf.h global.h const.h macro.h \ @@ -1435,12 +1437,17 @@ ../src_3rd/liblihata/dom.h ../src_3rd/liblihata/lihata.h \ ../src_3rd/liblihata/parser.h ../src_3rd/liblihata/genht/htsp.h \ ../src_3rd/liblihata/genht/ht.h ../src_3rd/liblihata/genht/ht_inlines.h \ - ../src_3rd/genvector/vtp0.h list_conf.h change.h data.h draw.h error.h \ - global.h set.h undo.h ../src_plugins/vendordrill/vendor.h stub_vendor.h \ - plugins.h hid_flags.h hid_actions.h hid_cfg.h \ - ../src_plugins/vendordrill/vendor_conf.h conf.h compat_misc.h \ - ../src_3rd/liblihata/tree.h dolists.h \ + ../src_3rd/genvector/vtp0.h list_conf.h ../src_3rd/genregex/regex_sei.h \ + ../src_3rd/genregex/regex_templ.h ../src_3rd/genregex/regex.h change.h \ + data.h draw.h error.h global.h set.h undo.h \ + ../src_plugins/vendordrill/vendor.h stub_vendor.h plugins.h hid_flags.h \ + hid_actions.h hid_cfg.h ../src_plugins/vendordrill/vendor_conf.h conf.h \ + compat_misc.h ../src_3rd/liblihata/tree.h dolists.h \ ../src_plugins/vendordrill/vendor_conf_fields.h +regex.o: ../src_3rd/genregex/regex.c ../src_3rd/genregex/regex.h +regex_sei.o: ../src_3rd/genregex/regex_sei.c \ + ../src_3rd/genregex/regex_templ.c ../src_3rd/genregex/regex_templ.h \ + ../src_3rd/genregex/regex.h gds_char.o: ../src_3rd/genvector/gds_char.c \ ../src_3rd/genvector/gds_char.h ../src_3rd/genvector/genvector_impl.h \ ../src_3rd/genvector/genvector_undef.h \ @@ -1608,16 +1615,16 @@ ../src_3rd/genvector/genvector_undef.h hid.h vtroutestyle.h \ global_element.h list_element.h compat_dl.o: compat_dl.c ../config.h ../config.auto.h compat_dl.h \ - global.h const.h macro.h global_typedefs.h unit.h global_objs.h \ - ../src_3rd/genlist/gendlist.h globalconst.h polyarea.h list_common.h \ - list_line.h ../src_3rd/genlist/gentdlist_impl.h \ + compat_inc.h global.h const.h macro.h global_typedefs.h unit.h \ + global_objs.h ../src_3rd/genlist/gendlist.h globalconst.h polyarea.h \ + list_common.h list_line.h ../src_3rd/genlist/gentdlist_impl.h \ ../src_3rd/genlist/gendlist.h ../src_3rd/genlist/gentdlist_undef.h \ list_arc.h list_text.h list_poly.h list_pad.h list_pin.h list_rat.h \ vtonpoint.h ../src_3rd/genvector/genvector_impl.h \ ../src_3rd/genvector/genvector_undef.h hid.h vtroutestyle.h \ global_element.h list_element.h -compat_fs.o: compat_fs.c ../config.h ../config.auto.h compat_fs.h \ - compat_misc.h ../src_3rd/genvector/gds_char.h \ +compat_fs.o: compat_fs.c ../config.h ../config.auto.h compat_inc.h \ + compat_fs.h compat_misc.h ../src_3rd/genvector/gds_char.h \ ../src_3rd/genvector/genvector_impl.h \ ../src_3rd/genvector/genvector_undef.h global.h const.h macro.h \ global_typedefs.h unit.h global_objs.h ../src_3rd/genlist/gendlist.h \ @@ -1629,9 +1636,9 @@ compat_lrealpath.o: compat_lrealpath.c ../config.h ../config.auto.h \ compat_lrealpath.h compat_misc.h compat_misc.o: compat_misc.c ../config.h ../config.auto.h compat_misc.h \ - global.h const.h macro.h global_typedefs.h unit.h global_objs.h \ - ../src_3rd/genlist/gendlist.h globalconst.h polyarea.h list_common.h \ - list_line.h ../src_3rd/genlist/gentdlist_impl.h \ + compat_inc.h global.h const.h macro.h global_typedefs.h unit.h \ + global_objs.h ../src_3rd/genlist/gendlist.h globalconst.h polyarea.h \ + list_common.h list_line.h ../src_3rd/genlist/gentdlist_impl.h \ ../src_3rd/genlist/gendlist.h ../src_3rd/genlist/gentdlist_undef.h \ list_arc.h list_text.h list_poly.h list_pad.h list_pin.h list_rat.h \ vtonpoint.h ../src_3rd/genvector/genvector_impl.h \ @@ -2016,8 +2023,8 @@ list_arc.h list_text.h list_poly.h list_pad.h list_pin.h list_rat.h \ vtonpoint.h ../src_3rd/genvector/genvector_impl.h \ ../src_3rd/genvector/genvector_undef.h hid.h vtroutestyle.h \ - global_element.h list_element.h hid_nogui.h compat_dl.h misc.h \ - ../src_3rd/genvector/gds_char.h mymem.h plugins.h hid_attrib.h \ + global_element.h list_element.h hid_nogui.h compat_dl.h compat_inc.h \ + misc.h ../src_3rd/genvector/gds_char.h mymem.h plugins.h hid_attrib.h \ hid_flags.h misc_util.h conf_core.h conf.h pcb-printf.h \ ../src_3rd/liblihata/lihata.h ../src_3rd/liblihata/dom.h \ ../src_3rd/liblihata/lihata.h ../src_3rd/liblihata/parser.h \ @@ -2218,13 +2225,15 @@ vtonpoint.h ../src_3rd/genvector/genvector_impl.h \ ../src_3rd/genvector/genvector_undef.h hid.h vtroutestyle.h \ global_element.h list_element.h mymem.h rtree.h rats_patch.h -netlist.o: netlist.c ../config.h ../config.auto.h action_helper.h \ - global.h const.h macro.h global_typedefs.h unit.h global_objs.h \ - ../src_3rd/genlist/gendlist.h globalconst.h polyarea.h list_common.h \ - list_line.h ../src_3rd/genlist/gentdlist_impl.h \ - ../src_3rd/genlist/gendlist.h ../src_3rd/genlist/gentdlist_undef.h \ - list_arc.h list_text.h list_poly.h list_pad.h list_pin.h list_rat.h \ - vtonpoint.h ../src_3rd/genvector/genvector_impl.h \ +netlist.o: netlist.c ../config.h ../config.auto.h \ + ../src_3rd/genregex/regex_sei.h ../src_3rd/genregex/regex_templ.h \ + ../src_3rd/genregex/regex.h action_helper.h global.h const.h macro.h \ + global_typedefs.h unit.h global_objs.h ../src_3rd/genlist/gendlist.h \ + globalconst.h polyarea.h list_common.h list_line.h \ + ../src_3rd/genlist/gentdlist_impl.h ../src_3rd/genlist/gendlist.h \ + ../src_3rd/genlist/gentdlist_undef.h list_arc.h list_text.h list_poly.h \ + list_pad.h list_pin.h list_rat.h vtonpoint.h \ + ../src_3rd/genvector/genvector_impl.h \ ../src_3rd/genvector/genvector_undef.h hid.h vtroutestyle.h \ global_element.h list_element.h data.h error.h plug_io.h conf.h \ pcb-printf.h ../src_3rd/genvector/gds_char.h \ @@ -2526,7 +2535,9 @@ ../src_3rd/liblihata/parser.h ../src_3rd/liblihata/genht/htsp.h \ ../src_3rd/liblihata/genht/ht.h ../src_3rd/liblihata/genht/ht_inlines.h \ ../src_3rd/genvector/vtp0.h list_conf.h data.h draw.h error.h search.h \ - misc_util.h select.h undo.h rats.h misc.h mymem.h find.h + misc_util.h select.h undo.h rats.h misc.h mymem.h find.h \ + ../src_3rd/genregex/regex_sei.h ../src_3rd/genregex/regex_templ.h \ + ../src_3rd/genregex/regex.h select_act.o: select_act.c ../config.h ../config.auto.h conf_core.h \ conf.h global.h const.h macro.h global_typedefs.h unit.h global_objs.h \ ../src_3rd/genlist/gendlist.h globalconst.h polyarea.h list_common.h \ Index: trunk/src/compat_inc.h.in =================================================================== --- trunk/src/compat_inc.h.in (revision 2549) +++ trunk/src/compat_inc.h.in (revision 2550) @@ -11,7 +11,7 @@ @?/target/libs/fs/mkdir/includes@ @?/target/libs/fs/_mkdir/includes@ @?/target/libs/fs/mkdtemp/includes@ - +@?/target/libs/userpass/getpwuid/includes@ @] put /tmpasm/IFS {\n} Index: trunk/src/compat_misc.c =================================================================== --- trunk/src/compat_misc.c (revision 2549) +++ trunk/src/compat_misc.c (revision 2550) @@ -25,11 +25,8 @@ #include #include #include "compat_misc.h" +#include "compat_inc.h" #include "global.h" - -#ifdef HAVE_PWD_H -#include -#endif #ifdef HAVE_UNISTD_H #include #endif