* Copyright 2001-2004 David Abrahams.
* Copyright 2005 Rene Rivera.
* Distributed under the Boost Software License, Version 1.0.
- * (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
+ * (See accompanying file LICENSE.txt or https://www.bfgroup.xyz/b2/LICENSE.txt)
*/
/*
#include "output.h"
#include <assert.h>
+#include <errno.h>
#include <stdio.h>
#include <sys/stat.h> /* needed for mkdir() */
if ( !*dirstr ) dirstr = ".";
if ( -1 == ( n = scandir( dirstr, &namelist, NULL, alphasort ) ) )
+ {
+ if (n != ENOENT && n != ENOTDIR)
+ err_printf( "[errno %d] scandir '%s' failed: %s\n",
+ errno, dirstr, strerror(errno) );
return -1;
+ }
string_new( path );
while ( n-- )
char * src;
char * dest;
- size_t ar_hdr_name_size = sizeof( ar_hdr.ar_name ); // Workaround for sizeof strncpy warning.
+ int32_t ar_hdr_name_size = sizeof( ar_hdr.ar_name ); // Workaround for sizeof strncpy warning.
strncpy( lar_name, ar_hdr.ar_name, ar_hdr_name_size );
sscanf( ar_hdr.ar_date, "%ld", &lar_date );