-/*-
+/* $Id: soelim.c,v 1.5 2015/11/07 14:22:29 schwarze Exp $ */
+/*
* Copyright (c) 2014 Baptiste Daroussin <bapt@FreeBSD.org>
* All rights reserved.
*
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+#include "config.h"
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
+#include <sys/types.h>
-#include <sys/param.h>
-
-#define _WITH_GETLINE
+#include <ctype.h>
+#if HAVE_ERR
+#include <err.h>
+#endif
+#include <limits.h>
#include <stdio.h>
-#include <unistd.h>
#include <stdlib.h>
-#include <stdbool.h>
#include <string.h>
+#if HAVE_STRINGLIST
#include <stringlist.h>
-#include <err.h>
-#include <ctype.h>
+#else
+#include "compat_stringlist.h"
+#endif
+#include <unistd.h>
#define C_OPTION 0x1
soelim_fopen(const char *name)
{
FILE *f;
- char path[MAXPATHLEN];
+ char path[PATH_MAX];
size_t i;
if (strcmp(name, "-") == 0)