2009-11-09 Robert Millan <rmh.grub@aybabtu.com>
* util/mkisofs/fnmatch.c: Remove. * util/mkisofs/getopt1.c: Likewise. * util/mkisofs/getopt.c: Likewise. * conf/common.rmk (grub_mkisofs_SOURCES): Replace `util/mkisofs/fnmatch.c', `util/mkisofs/getopt1.c' and `util/mkisofs/getopt.c' with `gnulib/fnmatch.c', `gnulib/getopt1.c' and `gnulib/getopt.c'. (grub_mkisofs_CFLAGS): Add `-I$(srcdir)/gnulib'. * configure.ac: Detect `mingw32msvc' host_os. Check for lstat(), getuid() and getgid(). * util/mkisofs/joliet.c: Include `<stdint.h>'. Replace all instances of `u_char' with `uint8_t'. * util/mkisofs/mkisofs.h: Include `<sys/stat.h>'. [!HAVE_GETUID] (getuid): New function (stub). [!HAVE_GETGID] (getgid): Likewise. [!HAVE_LSTAT] (lstat): Likewise. [!S_IROTH] (S_IROTH): New macro (dummy). [!S_IRGRP] (S_IRGRP): Likewise.
This commit is contained in:
parent
84b860d827
commit
4825d7908c
8 changed files with 83 additions and 1204 deletions
|
@ -3,9 +3,11 @@
|
|||
|
||||
Copyright 1997 Eric Youngdale.
|
||||
|
||||
Copyright (C) 2009 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2, or (at your option)
|
||||
the Free Software Foundation; either version 3, or (at your option)
|
||||
any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
|
@ -14,7 +16,7 @@
|
|||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
|
||||
|
||||
static char rcsid[] ="$Id: joliet.c,v 1.14 1999/03/07 17:41:19 eric Exp $";
|
||||
|
@ -74,6 +76,7 @@ static char rcsid[] ="$Id: joliet.c,v 1.14 1999/03/07 17:41:19 eric Exp $";
|
|||
#include "mkisofs.h"
|
||||
#include "iso9660.h"
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
#include <time.h>
|
||||
|
||||
|
@ -107,12 +110,12 @@ static void FDECL3(convert_to_unicode, unsigned char *, buffer, int, size, char
|
|||
*/
|
||||
if( source == NULL )
|
||||
{
|
||||
tmpbuf = (u_char *) e_malloc(size);
|
||||
tmpbuf = (uint8_t *) e_malloc(size);
|
||||
memcpy( tmpbuf, buffer, size);
|
||||
}
|
||||
else
|
||||
{
|
||||
tmpbuf = (u_char *)source;
|
||||
tmpbuf = (uint8_t *)source;
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -237,15 +240,15 @@ static void FDECL1(get_joliet_vol_desc, struct iso_primary_descriptor *, jvol_de
|
|||
* just be really lazy and do a char -> short conversion. We probably
|
||||
* will want to filter any characters >= 0x80.
|
||||
*/
|
||||
convert_to_unicode((u_char *)jvol_desc->system_id, sizeof(jvol_desc->system_id), NULL);
|
||||
convert_to_unicode((u_char *)jvol_desc->volume_id, sizeof(jvol_desc->volume_id), NULL);
|
||||
convert_to_unicode((u_char *)jvol_desc->volume_set_id, sizeof(jvol_desc->volume_set_id), NULL);
|
||||
convert_to_unicode((u_char *)jvol_desc->publisher_id, sizeof(jvol_desc->publisher_id), NULL);
|
||||
convert_to_unicode((u_char *)jvol_desc->preparer_id, sizeof(jvol_desc->preparer_id), NULL);
|
||||
convert_to_unicode((u_char *)jvol_desc->application_id, sizeof(jvol_desc->application_id), NULL);
|
||||
convert_to_unicode((u_char *)jvol_desc->copyright_file_id, sizeof(jvol_desc->copyright_file_id), NULL);
|
||||
convert_to_unicode((u_char *)jvol_desc->abstract_file_id, sizeof(jvol_desc->abstract_file_id), NULL);
|
||||
convert_to_unicode((u_char *)jvol_desc->bibliographic_file_id, sizeof(jvol_desc->bibliographic_file_id), NULL);
|
||||
convert_to_unicode((uint8_t *)jvol_desc->system_id, sizeof(jvol_desc->system_id), NULL);
|
||||
convert_to_unicode((uint8_t *)jvol_desc->volume_id, sizeof(jvol_desc->volume_id), NULL);
|
||||
convert_to_unicode((uint8_t *)jvol_desc->volume_set_id, sizeof(jvol_desc->volume_set_id), NULL);
|
||||
convert_to_unicode((uint8_t *)jvol_desc->publisher_id, sizeof(jvol_desc->publisher_id), NULL);
|
||||
convert_to_unicode((uint8_t *)jvol_desc->preparer_id, sizeof(jvol_desc->preparer_id), NULL);
|
||||
convert_to_unicode((uint8_t *)jvol_desc->application_id, sizeof(jvol_desc->application_id), NULL);
|
||||
convert_to_unicode((uint8_t *)jvol_desc->copyright_file_id, sizeof(jvol_desc->copyright_file_id), NULL);
|
||||
convert_to_unicode((uint8_t *)jvol_desc->abstract_file_id, sizeof(jvol_desc->abstract_file_id), NULL);
|
||||
convert_to_unicode((uint8_t *)jvol_desc->bibliographic_file_id, sizeof(jvol_desc->bibliographic_file_id), NULL);
|
||||
|
||||
|
||||
}
|
||||
|
@ -459,9 +462,9 @@ static int generate_joliet_path_tables()
|
|||
}
|
||||
else
|
||||
{
|
||||
convert_to_unicode((u_char *)jpath_table_l + jpath_table_index,
|
||||
convert_to_unicode((uint8_t *)jpath_table_l + jpath_table_index,
|
||||
namelen, de->name);
|
||||
convert_to_unicode((u_char *)jpath_table_m + jpath_table_index,
|
||||
convert_to_unicode((uint8_t *)jpath_table_m + jpath_table_index,
|
||||
namelen, de->name);
|
||||
jpath_table_index += namelen;
|
||||
}
|
||||
|
@ -634,7 +637,7 @@ static void FDECL2(generate_one_joliet_directory, struct directory *, dpnt, FILE
|
|||
}
|
||||
else
|
||||
{
|
||||
convert_to_unicode((u_char *)directory_buffer + dir_index,
|
||||
convert_to_unicode((uint8_t *)directory_buffer + dir_index,
|
||||
cvt_len,
|
||||
s_entry1->name);
|
||||
dir_index += cvt_len;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue