Pull strict-aliasing fix for sockaddr_46.
[exim.git] / src / src / directory.c
index ad15ae88e6f291bc994b0a3ade48ac4f9778cc04..c6d46aa5dadce985e89d8887ae17bc5db87b6f9f 100644 (file)
@@ -1,10 +1,8 @@
-/* $Cambridge: exim/src/src/directory.c,v 1.3 2005/06/22 15:44:38 ph10 Exp $ */
-
 /*************************************************
 *     Exim - an Internet mail transport agent    *
 *************************************************/
 
-/* Copyright (c) University of Cambridge 1995 - 2005 */
+/* Copyright (c) University of Cambridge 1995 - 2009 */
 /* See the file NOTICE for conditions of use and distribution. */
 
 #include "exim.h"
@@ -36,10 +34,12 @@ Returns:    panic on failure if panic is set; otherwise return FALSE;
 */
 
 BOOL
-directory_make(uschar *parent, uschar *name, int mode, BOOL panic)
+directory_make(const uschar *parent, const uschar *name,
+               int mode, BOOL panic)
 {
 BOOL use_chown = parent == spool_directory && geteuid() == root_uid;
-uschar *p, *slash;
+uschar *p;
+const uschar *slash;
 int c = 1;
 struct stat statbuf;
 uschar buffer[256];
@@ -47,7 +47,7 @@ uschar buffer[256];
 if (parent == NULL)
   {
   p = buffer + 1;
-  slash = parent = US"";
+  slash = parent = CUS"";
   }
 else
   {