try this on top of the original one (without my first fix attempt), let's see.
diff --git a/WINGs/WINGs/WINGsP.h b/WINGs/WINGs/WINGsP.h index bb58906..a619a70 100644 --- a/WINGs/WINGs/WINGsP.h +++ b/WINGs/WINGs/WINGsP.h @@ -16,6 +16,7 @@ #include <stdlib.h> #include <string.h> +#include <strings.h> #include <stdio.h> #ifdef __cplusplus diff --git a/WINGs/proplist.c b/WINGs/proplist.c index 2e25e39..4121494 100644 --- a/WINGs/proplist.c +++ b/WINGs/proplist.c @@ -1,9 +1,4 @@ -#if !defined(_XOPEN_SOURCE) || _XOPEN_SOURCE - 0 < 600 -#undef _XOPEN_SOURCE -#define _XOPEN_SOURCE 600 -#endif - #include <sys/types.h> #include <sys/stat.h> diff --git a/WINGs/string.c b/WINGs/string.c index c51a0f1..aabad31 100644 --- a/WINGs/string.c +++ b/WINGs/string.c @@ -1,3 +1,10 @@ +/* + * Until FreeBSD gets their act together; + * http://www.mail-archive.com/[email protected]/msg69469.html + */ +#if defined( FREEBSD ) +# undef _XOPEN_SOURCE +#endif #include "wconfig.h" @@ -234,7 +241,7 @@ char *wstrappend(char *dst, char *src) } -#ifdef HAVE_STRLCAT +#if HAVE_STRLCAT size_t wstrlcat(char *dst, const char *src, size_t siz) { @@ -295,7 +302,7 @@ wstrlcat(char *dst, const char *src, size_t siz) } #endif /* HAVE_STRLCAT */ -#ifdef HAVE_STRLCPY +#if HAVE_STRLCPY size_t wstrlcpy(char *dst, const char *src, size_t siz) { diff --git a/WINGs/userdefaults.c b/WINGs/userdefaults.c index 4eaed82..6de410e 100644 --- a/WINGs/userdefaults.c +++ b/WINGs/userdefaults.c @@ -1,6 +1,7 @@ #include <stdlib.h> #include <string.h> +#include <strings.h> #include <stdio.h> #include <assert.h> #include <unistd.h> diff --git a/WINGs/wfontpanel.c b/WINGs/wfontpanel.c index 53173a7..3cf14c8 100644 --- a/WINGs/wfontpanel.c +++ b/WINGs/wfontpanel.c @@ -5,6 +5,7 @@ #include <ctype.h> #include <string.h> +#include <strings.h> #include <stdint.h> #include <X11/Xft/Xft.h> diff --git a/WINGs/wscroller.c b/WINGs/wscroller.c index 6afca48..671bb22 100644 --- a/WINGs/wscroller.c +++ b/WINGs/wscroller.c @@ -1,4 +1,12 @@ +/* + * Until FreeBSD gets their act together; + * http://www.mail-archive.com/[email protected]/msg69469.html + */ +#if defined( FREEBSD ) +# undef _XOPEN_SOURCE +#endif + #include "WINGsP.h" #include <math.h> diff --git a/WPrefs.app/WPrefs.h b/WPrefs.app/WPrefs.h index f1e348c..9242f10 100644 --- a/WPrefs.app/WPrefs.h +++ b/WPrefs.app/WPrefs.h @@ -25,6 +25,7 @@ #include <stdlib.h> #include <stdio.h> #include <string.h> +#include <strings.h> #include <signal.h> #include <X11/Xlib.h> diff --git a/WPrefs.app/xmodifier.c b/WPrefs.app/xmodifier.c index a83e19c..35046f2 100644 --- a/WPrefs.app/xmodifier.c +++ b/WPrefs.app/xmodifier.c @@ -32,6 +32,7 @@ Perpetrator: Sudish Joseph <[email protected]>, Sept. 1997. */ Boston, MA 02110-1301 USA. */ #include <string.h> +#include <strings.h> #include <X11/Xlib.h> #include <X11/keysym.h> diff --git a/configure.ac b/configure.ac index f108424..f9abd47 100644 --- a/configure.ac +++ b/configure.ac @@ -82,10 +82,11 @@ dnl ================================ case "${host}" in *-*-linux*|*-*-cygwin*) WM_OSDEP="linux" + CFLAGS="$CFLAGS -D_XOPEN_SOURCE=600" ;; *-*-freebsd*) WM_OSDEP="bsd" - CFLAGS="$CFLAGS -DFREEBSD" + CFLAGS="$CFLAGS -D_XOPEN_SOURCE=600 -DFREEBSD" ;; *-*-netbsd*) WM_OSDEP="bsd" diff --git a/src/defaults.c b/src/defaults.c index 3de5761..70c8a8a 100644 --- a/src/defaults.c +++ b/src/defaults.c @@ -27,6 +27,7 @@ #include <stdlib.h> #include <unistd.h> #include <string.h> +#include <strings.h> #include <ctype.h> #include <time.h> #include <sys/types.h> diff --git a/src/dock.c b/src/dock.c index 5afd9db..5e7cc93 100644 --- a/src/dock.c +++ b/src/dock.c @@ -26,6 +26,7 @@ #include <X11/Xutil.h> #include <stdlib.h> #include <string.h> +#include <strings.h> #include <unistd.h> #include <math.h> #include <limits.h> diff --git a/src/event.c b/src/event.c index 57197b7..e45cdc2 100644 --- a/src/event.c +++ b/src/event.c @@ -22,6 +22,7 @@ #include "wconfig.h" #ifdef HAVE_INOTIFY +#include <sys/select.h> #include <sys/inotify.h> #endif @@ -29,6 +30,8 @@ #include <stdlib.h> #include <unistd.h> #include <string.h> +#include <strings.h> +#include <time.h> #include <X11/Xlib.h> #include <X11/Xutil.h> diff --git a/src/misc.c b/src/misc.c index 3b53a6f..3381c2a 100644 --- a/src/misc.c +++ b/src/misc.c @@ -26,6 +26,7 @@ #include <stdlib.h> #include <stdio.h> #include <string.h> +#include <strings.h> #include <unistd.h> #include <stdarg.h> #include <pwd.h> diff --git a/src/osdep_bsd.c b/src/osdep_bsd.c index e3063a9..372b4cf 100644 --- a/src/osdep_bsd.c +++ b/src/osdep_bsd.c @@ -1,3 +1,10 @@ +/* + * Until FreeBSD gets their act together; + * http://www.mail-archive.com/[email protected]/msg69469.html + */ +#if defined( FREEBSD ) +# undef _XOPEN_SOURCE +#endif #if defined( FREEBSD ) || defined( DRAGONFLYBSD ) # include <sys/types.h> diff --git a/src/rootmenu.c b/src/rootmenu.c index 25f3d88..5592f73 100644 --- a/src/rootmenu.c +++ b/src/rootmenu.c @@ -29,6 +29,7 @@ #include <sys/wait.h> #include <sys/types.h> #include <string.h> +#include <strings.h> #include <ctype.h> #include <time.h> #include <dirent.h> diff --git a/src/session.c b/src/session.c index 5d72ef1..4a50f78 100644 --- a/src/session.c +++ b/src/session.c @@ -65,6 +65,7 @@ #include <stdlib.h> #include <stdio.h> #include <string.h> +#include <strings.h> #include <unistd.h> #include <time.h> diff --git a/src/wdefaults.c b/src/wdefaults.c index 26c6a26..ffe3b20 100644 --- a/src/wdefaults.c +++ b/src/wdefaults.c @@ -25,6 +25,7 @@ #include <stdlib.h> #include <unistd.h> #include <string.h> +#include <strings.h> #include <ctype.h> #include <X11/Xlib.h> diff --git a/src/winspector.c b/src/winspector.c index 53f2634..8b14094 100644 --- a/src/winspector.c +++ b/src/winspector.c @@ -27,6 +27,7 @@ #include <stdlib.h> #include <stdio.h> #include <string.h> +#include <strings.h> #include "WindowMaker.h" #include "screen.h" diff --git a/src/xmodifier.c b/src/xmodifier.c index 1080f0a..7bae013 100644 --- a/src/xmodifier.c +++ b/src/xmodifier.c @@ -30,6 +30,7 @@ Perpetrator: Sudish Joseph <[email protected]>, Sept. 1997. */ #include "wconfig.h" #include <string.h> +#include <strings.h> #include <X11/Xlib.h> #include <X11/keysym.h> diff --git a/util/getstyle.c b/util/getstyle.c index 214ff23..1a9ac31 100644 --- a/util/getstyle.c +++ b/util/getstyle.c @@ -35,6 +35,7 @@ #include <stdio.h> #include <stdlib.h> #include <string.h> +#include <strings.h> #include <unistd.h> #include <WINGs/WUtil.h> diff --git a/util/setstyle.c b/util/setstyle.c index 1f6ca3d..a0d764d 100644 --- a/util/setstyle.c +++ b/util/setstyle.c @@ -30,6 +30,7 @@ #include <stdio.h> #include <stdlib.h> #include <string.h> +#include <strings.h> #include <unistd.h> #include <X11/Xlib.h> diff --git a/util/wmmenugen.c b/util/wmmenugen.c index b5417cd..82ad8ce 100644 --- a/util/wmmenugen.c +++ b/util/wmmenugen.c @@ -18,12 +18,6 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ -#if (_GLIBC__ || __FreeBSD__) && \ - (!defined(_XOPEN_SOURCE) || _XOPEN_SOURCE - 0 < 600) -#undef _XOPEN_SOURCE -#define _XOPEN_SOURCE 600 -#endif - #include <sys/types.h> #include <sys/stat.h> diff --git a/util/wmmenugen_parse_wmconfig.c b/util/wmmenugen_parse_wmconfig.c index 59672f4..12fcb14 100644 --- a/util/wmmenugen_parse_wmconfig.c +++ b/util/wmmenugen_parse_wmconfig.c @@ -20,12 +20,6 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ -#if (_GLIBC__ || __FreeBSD__) && \ - (!defined(_XOPEN_SOURCE) || _XOPEN_SOURCE - 0 < 600) -#undef _XOPEN_SOURCE -#define _XOPEN_SOURCE 600 -#endif - #include <sys/types.h> #include <sys/stat.h> diff --git a/util/wmmenugen_parse_xdg.c b/util/wmmenugen_parse_xdg.c index 00a360e..14fdee7 100644 --- a/util/wmmenugen_parse_xdg.c +++ b/util/wmmenugen_parse_xdg.c @@ -36,11 +36,6 @@ * Basic validation of the .desktop file is done. */ -#if !defined(_XOPEN_SOURCE) || _XOPEN_SOURCE - 0 < 600 -#undef _XOPEN_SOURCE -#define _XOPEN_SOURCE 600 -#endif - #include <sys/types.h> #include <sys/stat.h> diff --git a/util/wmsetbg.c b/util/wmsetbg.c index 856587d..17b0583 100644 --- a/util/wmsetbg.c +++ b/util/wmsetbg.c @@ -31,6 +31,7 @@ #include <X11/Xutil.h> #include <X11/Xatom.h> #include <string.h> +#include <strings.h> #include <pwd.h> #include <signal.h> #include <sys/types.h> -- [-] mkdir /nonexistent -- To unsubscribe, send mail to [email protected].
