Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 251965 Details for
Bug 265232
app-text/texlive-core-2008-r4 uses internal copy of icu
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Adopted patch from bug 326021
texlive-core-icu-many-cflags.patch (text/plain), 4.08 KB, created by
Martin Väth
on 2010-10-25 21:57:07 UTC
(
hide
)
Description:
Adopted patch from bug 326021
Filename:
MIME Type:
Creator:
Martin Väth
Created:
2010-10-25 21:57:07 UTC
Size:
4.08 KB
patch
obsolete
>--- libs/icu/icu-4.4/tools/pkgdata/pkgdata.cpp >+++ libs/icu/icu-4.4/tools/pkgdata/pkgdata.cpp >@@ -95,6 +95,7 @@ > #endif > > #define LARGE_BUFFER_MAX_SIZE 2048 >+#define MEDIUM_BUFFER_MAX_SIZE 1024 > #define SMALL_BUFFER_MAX_SIZE 512 > > static void loadLists(UPKGOptions *o, UErrorCode *status); >@@ -561,42 +562,53 @@ > char gencFilePath[SMALL_BUFFER_MAX_SIZE] = ""; > char version_major[10] = ""; > UBool reverseExt = FALSE; >+ unsigned currentBufferSize = MEDIUM_BUFFER_MAX_SIZE; > > /* Initialize pkgdataFlags */ > pkgDataFlags = (char**)uprv_malloc(sizeof(char*) * PKGDATA_FLAGS_SIZE); >- if (pkgDataFlags != NULL) { >- for (int32_t i = 0; i < PKGDATA_FLAGS_SIZE; i++) { >- pkgDataFlags[i] = (char*)uprv_malloc(sizeof(char) * SMALL_BUFFER_MAX_SIZE); >- if (pkgDataFlags[i] != NULL) { >- pkgDataFlags[i][0] = 0; >- } else { >- fprintf(stderr,"Error allocating memory for pkgDataFlags.\n"); >- return -1; >+#if !defined(WINDOWS_WITH_MSVC) || defined(USING_CYGWIN) >+ /* If we run out of space, allocate more */ >+ do { >+#endif >+ if (pkgDataFlags != NULL) { >+ for (int32_t i = 0; i < PKGDATA_FLAGS_SIZE; i++) { >+ pkgDataFlags[i] = (char*)uprv_malloc(sizeof(char) * currentBufferSize); >+ if (pkgDataFlags[i] != NULL) { >+ pkgDataFlags[i][0] = 0; >+ } else { >+ fprintf(stderr,"Error allocating memory for pkgDataFlags.\n"); >+ return -1; >+ } > } >+ } else { >+ fprintf(stderr,"Error allocating memory for pkgDataFlags.\n"); >+ return -1; > } >- } else { >- fprintf(stderr,"Error allocating memory for pkgDataFlags.\n"); >- return -1; >- } > >- if(o->verbose) { >- fprintf(stdout, "# pkgDataFlags="); >- for(int32_t i=0;i<PKGDATA_FLAGS_SIZE && pkgDataFlags[i][0];i++) { >- fprintf(stdout, "%c \"%s\"", (i>0)?',':' ',pkgDataFlags[i]); >- } >- fprintf(stdout, "\n"); >- } >+ if(o->verbose) { >+ fprintf(stdout, "# pkgDataFlags="); >+ for(int32_t i=0;i<PKGDATA_FLAGS_SIZE && pkgDataFlags[i][0];i++) { >+ fprintf(stdout, "%c \"%s\"", (i>0)?',':' ',pkgDataFlags[i]); >+ } >+ fprintf(stdout, "\n"); >+ } > > #ifndef WINDOWS_WITH_MSVC >- /* Read in options file. */ >- if(o->verbose) { >- fprintf(stdout, "# Reading options file %s\n", o->options); >- } >- parseFlagsFile(o->options, pkgDataFlags, SMALL_BUFFER_MAX_SIZE, (int32_t)PKGDATA_FLAGS_SIZE, &status); >- if (U_FAILURE(status)) { >- fprintf(stderr,"Unable to open or read \"%s\" option file. status = %s\n", o->options, u_errorName(status)); >- return -1; >- } >+ /* Read in options file. */ >+ if(o->verbose) { >+ fprintf(stdout, "# Reading options file %s\n", o->options); >+ } >+ parseFlagsFile(o->options, pkgDataFlags, currentBufferSize, (int32_t)PKGDATA_FLAGS_SIZE, &status); >+ if (status == U_BUFFER_OVERFLOW_ERROR) { >+ for (int32_t i = 0; i < PKGDATA_FLAGS_SIZE; i++) { >+ uprv_free(pkgDataFlags[i]); >+ } >+ currentBufferSize *= 2; >+ } else if (U_FAILURE(status)) { >+ fprintf(stderr,"Unable to open or read \"%s\" option file. status = %s\n", o->options, u_errorName(status)); >+ return -1; >+ } >+ } while (status == U_BUFFER_OVERFLOW_ERROR); > > /* Get the version major number. */ > if (o->version != NULL) {
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 265232
: 251965