#include <stdlib.h>
#include <string.h>
#include <sys/stat.h>
+#include <zzip/__mkdir.h>
#include <zzip/__string.h>
#include <zzip/__debug.h>
#include "unzzipcat-zip.h"
makedirs(dir_name);
free (dir_name);
} else {
- mkdir(name, 775);
+ _zzip_mkdir(name, 775);
errno = 0;
}
}
#include <stdlib.h>
#include <string.h>
#include <sys/stat.h>
+#include <zzip/__mkdir.h>
#include <zzip/__string.h>
#include "unzzipcat-zip.h"
makedirs(dir_name);
free (dir_name);
} else {
- mkdir(name, 775);
+ _zzip_mkdir(name, 775);
errno = 0;
}
}
#include <stdlib.h>
#include <string.h>
#include <sys/stat.h>
+#include <zzip/__mkdir.h>
#include <zzip/__string.h>
#include "unzzipcat-zip.h"
makedirs(dir_name);
free (dir_name);
} else {
- mkdir(name, 775);
+ _zzip_mkdir(name, 775);
errno = 0;
}
}
#include <stdlib.h>
#include <string.h>
#include <sys/stat.h>
+#include <zzip/__mkdir.h>
#include <zzip/__string.h>
#include "unzzipcat-zip.h"
makedirs(dir_name);
free (dir_name);
} else {
- mkdir(name, 775);
+ _zzip_mkdir(name, 775);
errno = 0;
}
}
zzip_HEADERS = $(libzzip_la_headers) \
$(libzzipmmapped_la_headers) \
$(libzzipfseeko_la_headers)
-noinst_HEADERS = __debug.h __hints.h __mmap.h __dirent.h __fnmatch.h __string.h
+noinst_HEADERS = __debug.h __hints.h __mmap.h __dirent.h __fnmatch.h __string.h __mkdir.h
#
VERSION_INFO=@VERSION_INFO@
RELEASE_INFO=@RELEASE_INFO@
$(libzzipmmapped_la_headers) \
$(libzzipfseeko_la_headers)
-noinst_HEADERS = __debug.h __hints.h __mmap.h __dirent.h __fnmatch.h __string.h
+noinst_HEADERS = __debug.h __hints.h __mmap.h __dirent.h __fnmatch.h __string.h __mkdir.h
#
libzzip_la_SOURCES = \
zip.c \
--- /dev/null
+#ifndef __ZZIP_INTERNAL_MKDIR_H
+#define __ZZIP_INTERNAL_MKDIR_H
+
+#include <zzip/conf.h>
+
+# ifdef ZZIP_HAVE_DIRECT_H
+# define _zzip_mkdir(a,b) mkdir(a)
+# else
+# define _zzip_mkdir mkdir
+# endif
+
+#endif
-
/*
* The write-support in zziplib is not a full-flegded interface to the
* internals that zip file-header or zip archive an contain. It's
#include <zzip/format.h>
#include <zzip/plugin.h>
+#include <zzip/__mkdir.h>
#include <zzip/__debug.h>
#define ___ {
# define S_IRWXO 00007
# endif
-# ifdef ZZIP_HAVE_DIRECT_H
-# define _mkdir(a,b) mkdir(a)
-# else
-# define _mkdir mkdir
-# endif
-
/** create a new zip archive for writing
*
* This function will create a new zip archive. The returned parameter
/* not implemented - however, we respect that a null argument to
* zzip_mkdir and zzip_creat works, so we silently still do the mkdir
*/
- if (! _mkdir(name, o_mode) || errno == EEXIST)
+ if (! _zzip_mkdir(name, o_mode) || errno == EEXIST)
errno = EROFS;
return 0;
} else
{
if (o_mode & S_IWGRP)
{
- if (-1 == _mkdir(name, o_mode) && errno != EEXIST) /* fail */
+ if (-1 == _zzip_mkdir(name, o_mode) && errno != EEXIST) /* fail */
return 0;
return zzip_opendir(name);
} else
zzip_file_mkdir(ZZIP_DIR * dir, zzip_char_t * name, int o_mode)
{
if (! dir)
- return _mkdir(name, o_mode);
+ return _zzip_mkdir(name, o_mode);
if (! _ZZIP_TRY)
{ /* not implemented */