Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Update to eglibc 2.19 with ubuntu/debian patches
Change-Id: I620625c7e5984d738ddbafe586dcad20691d9a32
Signed-off-by: Davide Bettio <davide.bettio@ispirata.com>
  • Loading branch information
bettio committed Mar 31, 2014
1 parent e23cc8d commit 14c2593
Show file tree
Hide file tree
Showing 15 changed files with 236 additions and 3,097 deletions.
29 changes: 23 additions & 6 deletions build-locale-archive.c
Expand Up @@ -26,6 +26,12 @@ int verbose = 0;
int max_locarchive_open_retry = 10;
const char *output_prefix;

/* Endianness should have been taken care of by localedef. We don't need to do
additional swapping. We need this variable exported however, since
locarchive.c uses it to determine if it needs to swap endianness of a value
before writing to or reading from the archive. */
bool swap_endianness_p = false;

static const char *locnames[] =
{
#define DEFINE_CATEGORY(category, category_name, items, a) \
Expand Down Expand Up @@ -96,7 +102,7 @@ open_tmpl_archive (struct locarhandle *ah)
struct stat64 st;
int fd;
struct locarhead head;
const char *archivefname = tmpl_file;
const char *archivefname = ah->fname == NULL ? tmpl_file : ah->fname;

/* Open the archive. We must have exclusive write access. */
fd = open64 (archivefname, O_RDONLY);
Expand Down Expand Up @@ -250,7 +256,8 @@ compute_data (struct locarhandle *ah, struct nameent *name, size_t sumused,
}

static int
fill_archive (struct locarhandle *tmpl_ah, size_t nlist, char *list[],
fill_archive (struct locarhandle *tmpl_ah,
const char *fname, size_t nlist, char *list[],
const char *primary)
{
struct locarhandle ah;
Expand Down Expand Up @@ -304,6 +311,9 @@ fill_archive (struct locarhandle *tmpl_ah, size_t nlist, char *list[],

/* Open the archive. This call never returns if we cannot
successfully open the archive. */
ah.fname = NULL;
if (fname != NULL)
ah.fname = fname;
open_archive (&ah, false);

if (primary != NULL)
Expand Down Expand Up @@ -532,7 +542,7 @@ fill_archive (struct locarhandle *tmpl_ah, size_t nlist, char *list[],
return result;
}

int main ()
int main (int argc, char *argv[])
{
char path[4096];
DIR *dirp;
Expand All @@ -547,6 +557,11 @@ int main ()
if (dirp == NULL)
error (EXIT_FAILURE, errno, "cannot open directory \"%s\"", loc_path);

/* Use the template file as specified on the command line. */
tmpl_ah.fname = NULL;
if (argc > 1)
tmpl_ah.fname = argv[1];

open_tmpl_archive (&tmpl_ah);

unlink (locar_file);
Expand Down Expand Up @@ -623,10 +638,12 @@ int main ()
cnt++;
}
closedir (dirp);
fill_archive (&tmpl_ah, cnt, list, primary);
/* Store the archive to the file specified as the second argument on the
command line or the default locale archive. */
fill_archive (&tmpl_ah, argc > 2 ? argv[2] : NULL, cnt, list, primary);
close_archive (&tmpl_ah);
truncate (tmpl_file, 0);
char *argv[] = { "/usr/sbin/tzdata-update", NULL };
execve (argv[0], (char *const *)argv, (char *const *)&argv[1]);
char *tz_argv[] = { "/usr/sbin/tzdata-update", NULL };
execve (tz_argv[0], (char *const *)tz_argv, (char *const *)&tz_argv[1]);
exit (0);
}
16 changes: 0 additions & 16 deletions eglibc-2.15-mips-async-unwind.patch

This file was deleted.

11 changes: 0 additions & 11 deletions eglibc-2.15-mips-no-n32-n64.patch

This file was deleted.

0 comments on commit 14c2593

Please sign in to comment.