[120070] branches/release_2_3/base

cal at macports.org cal at macports.org
Wed May 14 15:27:37 PDT 2014


Revision: 120070
          https://trac.macports.org/changeset/120070
Author:   cal at macports.org
Date:     2014-05-14 15:27:37 -0700 (Wed, 14 May 2014)
Log Message:
-----------
Merge r120059 from trunk:

 base: pextlib1.0: Use feature test macros to ensure standard compliance, fix warnings on Linux, uses C99

Revision Links:
--------------
    https://trac.macports.org/changeset/120059

Modified Paths:
--------------
    branches/release_2_3/base/src/pextlib1.0/Makefile.in
    branches/release_2_3/base/src/pextlib1.0/Pextlib.c
    branches/release_2_3/base/src/pextlib1.0/curl.c
    branches/release_2_3/base/src/pextlib1.0/filemap.c
    branches/release_2_3/base/src/pextlib1.0/fs-traverse.c
    branches/release_2_3/base/src/pextlib1.0/mktemp.c
    branches/release_2_3/base/src/pextlib1.0/readline.c
    branches/release_2_3/base/src/pextlib1.0/realpath.c
    branches/release_2_3/base/src/pextlib1.0/rmd160cmd.c
    branches/release_2_3/base/src/pextlib1.0/setmode.c
    branches/release_2_3/base/src/pextlib1.0/strcasecmp.h
    branches/release_2_3/base/src/pextlib1.0/strsed.c
    branches/release_2_3/base/src/pextlib1.0/system.c
    branches/release_2_3/base/src/pextlib1.0/tracelib.c
    branches/release_2_3/base/src/pextlib1.0/tty.c
    branches/release_2_3/base/src/pextlib1.0/uid.c
    branches/release_2_3/base/src/pextlib1.0/xinstall.c

Property Changed:
----------------
    branches/release_2_3/base/
    branches/release_2_3/base/src/pextlib1.0/Makefile.in


Property changes on: branches/release_2_3/base
___________________________________________________________________
Modified: svn:mergeinfo
   - /branches/gsoc08-privileges/base:37343-46937
/branches/gsoc09-logging/base:51231-60371
/branches/gsoc11-rev-upgrade/base:78828-88375
/branches/gsoc11-statistics/base:79520,79666
/branches/gsoc13-tests:106692-111324
/branches/universal-sanity/base:51872-52323
/branches/variant-descs-14482/base:34469-34855,34900-37508,37511-37512,41040-41463,42575-42626,42640-42659
/trunk/base:118038-118039,118056,118161,118559,118562-118569,118598-118599,118602-118603,118606-118607,118640,119169,119171,119175,119204,119297,119987,119992,120036,120038
/users/perry/base-bugs_and_notes:45682-46060
/users/perry/base-select:44044-44692
   + /branches/gsoc08-privileges/base:37343-46937
/branches/gsoc09-logging/base:51231-60371
/branches/gsoc11-rev-upgrade/base:78828-88375
/branches/gsoc11-statistics/base:79520,79666
/branches/gsoc13-tests:106692-111324
/branches/universal-sanity/base:51872-52323
/branches/variant-descs-14482/base:34469-34855,34900-37508,37511-37512,41040-41463,42575-42626,42640-42659
/trunk/base:118038-118039,118056,118161,118559,118562-118569,118598-118599,118602-118603,118606-118607,118640,119169,119171,119175,119204,119297,119987,119992,120036,120038,120059
/users/perry/base-bugs_and_notes:45682-46060
/users/perry/base-select:44044-44692

Modified: branches/release_2_3/base/src/pextlib1.0/Makefile.in
===================================================================
--- branches/release_2_3/base/src/pextlib1.0/Makefile.in	2014-05-14 22:24:13 UTC (rev 120069)
+++ branches/release_2_3/base/src/pextlib1.0/Makefile.in	2014-05-14 22:27:37 UTC (rev 120070)
@@ -18,7 +18,7 @@
 
 include $(srcdir)/../../Mk/macports.tea.mk
 
-CFLAGS+= ${CURL_CFLAGS} ${MD5_CFLAGS} ${READLINE_CFLAGS} -D_BSD_SOURCE
+CFLAGS+= ${CURL_CFLAGS} ${MD5_CFLAGS} ${READLINE_CFLAGS}
 LIBS+= ${CURL_LIBS} ${MD5_LIBS} ${READLINE_LIBS}
 ifeq ($(shell uname), Darwin)
 LIBS+= ../registry2.0/registry${SHLIB_SUFFIX}


Property changes on: branches/release_2_3/base/src/pextlib1.0/Makefile.in
___________________________________________________________________
Modified: svn:mergeinfo
   - /branches/gsoc08-privileges/base/src/pextlib1.0/Makefile:37343-46937
/branches/gsoc09-logging/base/src/pextlib1.0/Makefile:51231-60371
/branches/gsoc11-rev-upgrade/base/src/pextlib1.0/Makefile:78828-88375
/branches/gsoc13-tests/src/pextlib1.0/Makefile.in:106692-111324
/branches/universal-sanity/base/src/pextlib1.0/Makefile:51872-52323
/branches/variant-descs-14482/base/src/pextlib1.0/Makefile:34469-34855,34900-37508,37511-37512,41040-41463,42575-42626,42640-42659
/trunk/base/src/pextlib1.0/Makefile.in:118562-118569,119169,120038
/users/perry/base-bugs_and_notes/src/pextlib1.0/Makefile:45682-46060
/users/perry/base-select/src/pextlib1.0/Makefile:44044-44692
   + /branches/gsoc08-privileges/base/src/pextlib1.0/Makefile:37343-46937
/branches/gsoc09-logging/base/src/pextlib1.0/Makefile:51231-60371
/branches/gsoc11-rev-upgrade/base/src/pextlib1.0/Makefile:78828-88375
/branches/gsoc13-tests/src/pextlib1.0/Makefile.in:106692-111324
/branches/universal-sanity/base/src/pextlib1.0/Makefile:51872-52323
/branches/variant-descs-14482/base/src/pextlib1.0/Makefile:34469-34855,34900-37508,37511-37512,41040-41463,42575-42626,42640-42659
/trunk/base/src/pextlib1.0/Makefile.in:118562-118569,119169,120038,120059
/users/perry/base-bugs_and_notes/src/pextlib1.0/Makefile:45682-46060
/users/perry/base-select/src/pextlib1.0/Makefile:44044-44692

Modified: branches/release_2_3/base/src/pextlib1.0/Pextlib.c
===================================================================
--- branches/release_2_3/base/src/pextlib1.0/Pextlib.c	2014-05-14 22:24:13 UTC (rev 120069)
+++ branches/release_2_3/base/src/pextlib1.0/Pextlib.c	2014-05-14 22:27:37 UTC (rev 120070)
@@ -33,10 +33,17 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 
-#if HAVE_CONFIG_H
+#ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
 
+/* required for strdup(3) on Linux and OS X */
+#define _XOPEN_SOURCE 600L
+/* required for clearenv(3)/setenv(3)/unsetenv(3) on Linux */
+#define _BSD_SOURCE
+/* required for clearenv(3)/setenv(3)/unsetenv(3) on OS X */
+#define _DARWIN_C_SOURCE
+
 #include <sys/types.h>
 #include <sys/socket.h>
 #include <sys/stat.h>
@@ -361,13 +368,6 @@
 int UnsetEnvCmd(ClientData clientData UNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[])
 {
     char *name;
-    char **envp;
-    char *equals;
-    size_t len;
-    Tcl_Obj *tclList;
-    int listLength;
-    Tcl_Obj **listArray;
-    int loopCounter;
 
     if (objc != 2) {
         Tcl_WrongNumArgs(interp, 1, objv, "name");
@@ -386,18 +386,21 @@
            clearenv() but that is not yet standardized, instead use Tcl's
            list capability to easily build an array of strings for each
            env name, then loop through that list to unsetenv() each one */
-        tclList = Tcl_NewListObj( 0, NULL );
+        Tcl_Obj *tclList = Tcl_NewListObj( 0, NULL );
         Tcl_IncrRefCount( tclList );
         /* unset all current environment variables */
-        for (envp = environ; *envp != NULL; envp++) {
-            equals = strchr(*envp, '=');
+        for (char **envp = environ; *envp != NULL; envp++) {
+            char *equals = strchr(*envp, '=');
             if (equals != NULL) {
-                len = (size_t)(equals - *envp);
+				size_t len = (size_t)(equals - *envp);
                 Tcl_ListObjAppendElement(interp, tclList, Tcl_NewStringObj(*envp, len));
             }
         }
+
+		int listLength;
+		Tcl_Obj **listArray;
         Tcl_ListObjGetElements(interp, tclList, &listLength, &listArray);
-        for (loopCounter = 0; loopCounter < listLength; loopCounter++) {
+        for (int loopCounter = 0; loopCounter < listLength; loopCounter++) {
             unsetenv(Tcl_GetString(listArray[loopCounter]));
         }
         Tcl_DecrRefCount( tclList );

Modified: branches/release_2_3/base/src/pextlib1.0/curl.c
===================================================================
--- branches/release_2_3/base/src/pextlib1.0/curl.c	2014-05-14 22:24:13 UTC (rev 120069)
+++ branches/release_2_3/base/src/pextlib1.0/curl.c	2014-05-14 22:27:37 UTC (rev 120070)
@@ -61,7 +61,6 @@
 /* ========================================================================= **
  * Definitions
  * ========================================================================= */
-#pragma mark Definitions
 
 /* ------------------------------------------------------------------------- **
  * Global cURL handle
@@ -93,8 +92,6 @@
 /* ========================================================================= **
  * Entry points
  * ========================================================================= */
-#pragma mark -
-#pragma mark Entry points
 
 /**
  * Set the result if a libcurl error occurred return TCL_ERROR.
@@ -1291,8 +1288,6 @@
 /* ========================================================================= **
  * Callback function
  * ========================================================================= */
-#pragma mark -
-#pragma mark Callback function
 static int CurlProgressHandler(
 		tcl_callback_t *callback,
 		double dltotal,

Modified: branches/release_2_3/base/src/pextlib1.0/filemap.c
===================================================================
--- branches/release_2_3/base/src/pextlib1.0/filemap.c	2014-05-14 22:24:13 UTC (rev 120069)
+++ branches/release_2_3/base/src/pextlib1.0/filemap.c	2014-05-14 22:27:37 UTC (rev 120070)
@@ -30,10 +30,13 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 
-#if HAVE_CONFIG_H
+#ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
 
+/* needed for NAME_MAX and PATH_MAX on Linux */
+#define _XOPEN_SOURCE
+
 #include <sys/stat.h>
 #include <errno.h>
 #include <fcntl.h>
@@ -48,7 +51,6 @@
 /* ========================================================================= **
  * Definitions
  * ========================================================================= */
-#pragma mark Definitions
 
 /* ------------------------------------------------------------------------- **
  * Internal structures
@@ -184,8 +186,6 @@
 /* ========================================================================= **
  * Tree access functions
  * ========================================================================= */
-#pragma mark -
-#pragma mark Access functions
 
 /**
  * Load the database from a file.
@@ -1118,8 +1118,6 @@
 /* ========================================================================= **
  * Tcl object functions
  * ========================================================================= */
-#pragma mark -
-#pragma mark Tcl object functions
 
 /**
  * Free the object.
@@ -1205,8 +1203,6 @@
 /* ========================================================================= **
  * Entry points
  * ========================================================================= */
-#pragma mark -
-#pragma mark Entry points
 
 /**
  * Set the result if an error occurred and return TCL_ERROR.

Modified: branches/release_2_3/base/src/pextlib1.0/fs-traverse.c
===================================================================
--- branches/release_2_3/base/src/pextlib1.0/fs-traverse.c	2014-05-14 22:24:13 UTC (rev 120069)
+++ branches/release_2_3/base/src/pextlib1.0/fs-traverse.c	2014-05-14 22:27:37 UTC (rev 120070)
@@ -38,6 +38,10 @@
 #include <config.h>
 #endif
 
+/* required for u_short in fts.h on Linux; I think this can be considered a bug
+ * in the system header, though. */
+#define _BSD_SOURCE
+
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <errno.h>

Modified: branches/release_2_3/base/src/pextlib1.0/mktemp.c
===================================================================
--- branches/release_2_3/base/src/pextlib1.0/mktemp.c	2014-05-14 22:24:13 UTC (rev 120069)
+++ branches/release_2_3/base/src/pextlib1.0/mktemp.c	2014-05-14 22:27:37 UTC (rev 120070)
@@ -34,6 +34,13 @@
 #include <config.h>
 #endif
 
+/* required for strdup(3)/mkdtemp(3) on Linux */
+#define _XOPEN_SOURCE 700L
+/* required for mktemp(3) if _XOPEN_SOURCE >= 600L on Linux */
+#define _BSD_SOURCE
+/* required for mkdtemp(3) on OS X */
+#define _DARWIN_C_SOURCE
+
 #include <errno.h>
 #include <stdlib.h>
 #include <string.h>

Modified: branches/release_2_3/base/src/pextlib1.0/readline.c
===================================================================
--- branches/release_2_3/base/src/pextlib1.0/readline.c	2014-05-14 22:24:13 UTC (rev 120069)
+++ branches/release_2_3/base/src/pextlib1.0/readline.c	2014-05-14 22:27:37 UTC (rev 120070)
@@ -8,19 +8,22 @@
  *
  */
 
-#if HAVE_CONFIG_H
+#ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
 
+/* required for strdup(3) on Linux and OS X */
+#define _XOPEN_SOURCE 600L
+
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
 
-#if HAVE_READLINE_READLINE_H
+#ifdef HAVE_READLINE_READLINE_H
 #include <readline/readline.h>
 #endif
 
-#if HAVE_READLINE_HISTORY_H
+#ifdef HAVE_READLINE_HISTORY_H
 #include <readline/history.h>
 #endif
 
@@ -29,7 +32,7 @@
 #include "readline.h"
 
 /* Globals */
-#if HAVE_READLINE_READLINE_H
+#ifdef HAVE_READLINE_READLINE_H
 Tcl_Interp* completion_interp = NULL;
 Tcl_Obj* attempted_completion_word = NULL;
 Tcl_Obj* generator_word = NULL;
@@ -55,7 +58,7 @@
 #endif
 
 
-#if HAVE_LIBREADLINE
+#ifdef HAVE_LIBREADLINE
 char*
 completion_generator(const char* text, int state)
 {
@@ -156,7 +159,7 @@
 {
 	char* action;
 	Tcl_Obj *tcl_result;
-#if HAVE_LIBREADLINE
+#ifdef HAVE_LIBREADLINE
 	int argbase;
 	int argcnt;
 #endif
@@ -173,7 +176,7 @@
 	
 		int initOk = 0;
 		
-#if HAVE_LIBREADLINE
+#ifdef HAVE_LIBREADLINE
 		/* Set the name of our program, so .inputrc can be conditionalized */
 		if (objc == 3) {
 			rl_readline_name = strdup(Tcl_GetString(objv[2]));
@@ -194,7 +197,7 @@
 		tcl_result = Tcl_NewIntObj(initOk);	
 		Tcl_SetObjResult(interp, tcl_result);
 
-#if HAVE_LIBREADLINE
+#ifdef HAVE_LIBREADLINE
 	} else if (0 == strcmp("read", action)) {
 	
 		char* s;
@@ -272,7 +275,7 @@
 int RLHistoryCmd(ClientData clientData UNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[])
 {
 	char* action = NULL;
-#if HAVE_LIBREADLINE
+#ifdef HAVE_LIBREADLINE
 	char* s = NULL;
 	int i = 0;
 	Tcl_Obj *tcl_result;
@@ -286,7 +289,7 @@
 
 	/* Case out on action */
 	if (0) {
-#if HAVE_LIBREADLINE
+#ifdef HAVE_LIBREADLINE
 	} else if (0 == strcmp("add", action)) {
 		if (objc != 3) {
 			Tcl_WrongNumArgs(interp, 1, objv, "add line");

Modified: branches/release_2_3/base/src/pextlib1.0/realpath.c
===================================================================
--- branches/release_2_3/base/src/pextlib1.0/realpath.c	2014-05-14 22:24:13 UTC (rev 120069)
+++ branches/release_2_3/base/src/pextlib1.0/realpath.c	2014-05-14 22:27:37 UTC (rev 120070)
@@ -34,6 +34,9 @@
 #include <config.h>
 #endif
 
+/* required for PATH_MAX and realpath(3) */
+#define _XOPEN_SOURCE 500
+
 #include <tcl.h>
 
 #include <errno.h>

Modified: branches/release_2_3/base/src/pextlib1.0/rmd160cmd.c
===================================================================
--- branches/release_2_3/base/src/pextlib1.0/rmd160cmd.c	2014-05-14 22:24:13 UTC (rev 120069)
+++ branches/release_2_3/base/src/pextlib1.0/rmd160cmd.c	2014-05-14 22:27:37 UTC (rev 120070)
@@ -35,6 +35,9 @@
 #include <config.h>
 #endif
 
+/* required for u_char on Linux */
+#define _BSD_SOURCE
+
 #include <string.h>
 #include <stdio.h>
 #include <fcntl.h>

Modified: branches/release_2_3/base/src/pextlib1.0/setmode.c
===================================================================
--- branches/release_2_3/base/src/pextlib1.0/setmode.c	2014-05-14 22:24:13 UTC (rev 120069)
+++ branches/release_2_3/base/src/pextlib1.0/setmode.c	2014-05-14 22:27:37 UTC (rev 120070)
@@ -46,6 +46,11 @@
 #endif
 #endif /* LIBC_SCCS and not lint */
 
+/* required for sigfillset(3)/sigemptyset(3) and S_ISVTX */
+#define _XOPEN_SOURCE 500
+/* required for u_int and u_long */
+#define _BSD_SOURCE
+
 #include <sys/types.h>
 #include <sys/stat.h>
 
@@ -190,7 +195,7 @@
 	BITCMD *set, *saveset, *endset;
 	sigset_t sigset, sigoset;
 	mode_t mask;
-	int equalopdone, permXbits, setlen;
+	int equalopdone = 0, permXbits, setlen;
 	long perml;
 
 	if (!*p)
@@ -378,7 +383,7 @@
 	case '-':
 	case 'X':
 		set->cmd = op;
-		set->bits = (who ? who : mask) & oparg;
+		set->bits = (who ? ((mode_t) who) : ((mode_t) mask)) & oparg;
 		break;
 
 	case 'u':

Modified: branches/release_2_3/base/src/pextlib1.0/strcasecmp.h
===================================================================
--- branches/release_2_3/base/src/pextlib1.0/strcasecmp.h	2014-05-14 22:24:13 UTC (rev 120069)
+++ branches/release_2_3/base/src/pextlib1.0/strcasecmp.h	2014-05-14 22:27:37 UTC (rev 120070)
@@ -30,13 +30,18 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
 #include <string.h>
+#include <strings.h>
 
-#if !HAVE_STRCASECMP
+#ifndef HAVE_STRCASECMP
 	#define strcasecmp xstrcasecmp
 #endif
 
-#if !HAVE_STRNCASECMP
+#ifndef HAVE_STRNCASECMP
 	#define strncasecmp xstrncasecmp
 #endif
 

Modified: branches/release_2_3/base/src/pextlib1.0/strsed.c
===================================================================
--- branches/release_2_3/base/src/pextlib1.0/strsed.c	2014-05-14 22:24:13 UTC (rev 120069)
+++ branches/release_2_3/base/src/pextlib1.0/strsed.c	2014-05-14 22:27:37 UTC (rev 120070)
@@ -131,6 +131,9 @@
 
 #include "strsed.h"
 
+/* required for strdup(3) on Linux and OS X */
+#define _XOPEN_SOURCE 600L
+
 #include <ctype.h>
 #include <string.h>
 #include <stdlib.h>

Modified: branches/release_2_3/base/src/pextlib1.0/system.c
===================================================================
--- branches/release_2_3/base/src/pextlib1.0/system.c	2014-05-14 22:24:13 UTC (rev 120069)
+++ branches/release_2_3/base/src/pextlib1.0/system.c	2014-05-14 22:27:37 UTC (rev 120070)
@@ -36,6 +36,11 @@
 #include <config.h>
 #endif
 
+/* required for fdopen(3)/seteuid(2), among others */
+#define _XOPEN_SOURCE 600
+/* required for fgetln(3) on OS X */
+#define _DARWIN_C_SOURCE
+
 #include <tcl.h>
 
 #if HAVE_PATHS_H
@@ -111,8 +116,8 @@
     char *args[7];
     char *cmdstring;
     int sandbox = 0;
-    char *sandbox_exec_path;
-    char *profilestr;
+    char *sandbox_exec_path = NULL;
+    char *profilestr = NULL;
     FILE *pdes;
     int fdset[2], nullfd;
     int fline, pos, ret;

Modified: branches/release_2_3/base/src/pextlib1.0/tracelib.c
===================================================================
--- branches/release_2_3/base/src/pextlib1.0/tracelib.c	2014-05-14 22:24:13 UTC (rev 120069)
+++ branches/release_2_3/base/src/pextlib1.0/tracelib.c	2014-05-14 22:27:37 UTC (rev 120070)
@@ -848,6 +848,14 @@
 
 int TracelibCmd(ClientData clientData UNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
     int result = TCL_OK;
+
+    /* There is no args for commands now. */
+    if (objc < 2) {
+        Tcl_WrongNumArgs(interp, 1, objv, "option");
+        return TCL_ERROR;
+    }
+
+#ifdef HAVE_TRACEMODE_SUPPORT
     static const char *options[] = {"setname", "opensocket", "run", "clean", "setsandbox", "closesocket", "setdeps", "enablefence", 0};
     typedef enum {
         kSetName,
@@ -861,13 +869,6 @@
     } EOptions;
     EOptions current_option;
 
-    /* There is no args for commands now. */
-    if (objc < 2) {
-        Tcl_WrongNumArgs(interp, 1, objv, "option");
-        return TCL_ERROR;
-    }
-
-#ifdef HAVE_TRACEMODE_SUPPORT
     result = Tcl_GetIndexFromObj(interp, objv[1], options, "option", 0, (int *)&current_option);
     if (result == TCL_OK) {
         switch (current_option) {

Modified: branches/release_2_3/base/src/pextlib1.0/tty.c
===================================================================
--- branches/release_2_3/base/src/pextlib1.0/tty.c	2014-05-14 22:24:13 UTC (rev 120069)
+++ branches/release_2_3/base/src/pextlib1.0/tty.c	2014-05-14 22:27:37 UTC (rev 120070)
@@ -38,6 +38,7 @@
 #include <config.h>
 #endif
 
+#include <stdint.h>
 #include <sys/ioctl.h>
 #include <unistd.h>
 

Modified: branches/release_2_3/base/src/pextlib1.0/uid.c
===================================================================
--- branches/release_2_3/base/src/pextlib1.0/uid.c	2014-05-14 22:24:13 UTC (rev 120069)
+++ branches/release_2_3/base/src/pextlib1.0/uid.c	2014-05-14 22:27:37 UTC (rev 120070)
@@ -12,6 +12,9 @@
 #include <config.h>
 #endif
 
+/* required for seteuid(2)/setegid(2) */
+#define _BSD_SOURCE
+
 #include <sys/types.h>
 #include <grp.h>
 #include <pwd.h>

Modified: branches/release_2_3/base/src/pextlib1.0/xinstall.c
===================================================================
--- branches/release_2_3/base/src/pextlib1.0/xinstall.c	2014-05-14 22:24:13 UTC (rev 120069)
+++ branches/release_2_3/base/src/pextlib1.0/xinstall.c	2014-05-14 22:27:37 UTC (rev 120070)
@@ -41,6 +41,9 @@
 #include <config.h>
 #endif
 
+/* required for u_int and u_long */
+#define _BSD_SOURCE
+
 #if HAVE_SYS_CDEFS_H
 #include <sys/cdefs.h>
 #endif
@@ -148,7 +151,7 @@
 	u_long fset = 0;
 	int no_target, rval;
 	u_int iflags;
-	char *flags, *curdir;
+	char *curdir;
 	const char *group, *owner, *cp;
 	Tcl_Obj *to_name;
 	int dodir = 0;
@@ -198,7 +201,7 @@
 				Tcl_WrongNumArgs(interp, 1, objv, "-f");
 				return TCL_ERROR;
 			}
-			flags = Tcl_GetString(*(++objv));
+			char *flags = Tcl_GetString(*(++objv));
 			if (strtofflags(&flags, &fset, NULL)) {
 				Tcl_SetResult(interp, "invalid flags for -f", TCL_STATIC);
 				return TCL_ERROR;
@@ -428,7 +431,11 @@
  *	build a path name and install the file
  */
 static int
+#if defined(UF_NODUMP)
 install(Tcl_Interp *interp, const char *from_name, const char *to_name, u_long fset, u_int flags)
+#else
+install(Tcl_Interp *interp, const char *from_name, const char *to_name, u_long fset UNUSED, u_int flags)
+#endif
 {
 	struct stat from_sb, temp_sb, to_sb;
 	struct timeval tvb[2];
@@ -869,7 +876,11 @@
  *	create a new file, overwriting an existing one if necessary
  */
 static int
+#if defined(UF_IMMUTABLE) && defined(SF_IMMUTABLE)
 create_newfile(Tcl_Interp *interp, const char *path, int target, struct stat *sbp)
+#else
+create_newfile(Tcl_Interp *interp, const char *path, int target, struct stat *sbp UNUSED)
+#endif
 {
 	char backup[MAXPATHLEN];
 	int saved_errno = 0;
@@ -1105,7 +1116,11 @@
  *	return true (1) if mmap should be tried, false (0) if not.
  */
 int
+#ifdef MFSNAMELEN
 trymmap(int fd)
+#else
+trymmap(int fd UNUSED)
+#endif
 {
 /*
  * The ifdef is for bootstrapping - f_fstypename doesn't exist in
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20140514/28f09961/attachment-0001.html>


More information about the macports-changes mailing list