X-Git-Url: http://git.sourceforge.jp/view?a=blobdiff_plain;f=fixincludes%2Ffixfixes.c;h=c883253123d92e8fb23077f72e356d230898bef2;hb=029a9a37c3f60ccc7d6fc6d50c4e0fc22de0a76d;hp=19fa27ed12109e8d8340d3e2576aef75b007c042;hpb=2b59cb0507a0cd617d4b6fda5d0ba9673daf1fb2;p=pf3gnuchains%2Fgcc-fork.git diff --git a/fixincludes/fixfixes.c b/fixincludes/fixfixes.c index 19fa27ed121..c883253123d 100644 --- a/fixincludes/fixfixes.c +++ b/fixincludes/fixfixes.c @@ -3,7 +3,7 @@ Test to see if a particular fix should be applied to a header file. - Copyright (C) 1997, 1998, 1999, 2000, 2001, 2003 + Copyright (C) 1997, 1998, 1999, 2000, 2001, 2003, 2004 Free Software Foundation, Inc. = = = = = = = = = = = = = = = = = = = = = = = = = @@ -605,7 +605,7 @@ FIX_PROC_HEAD( wrap_fix ) * *both* the fix name and the file name. */ size_t ln = strlen( filname ) + strlen( p_fixd->fix_name ) + 14; - char* pz = xmalloc( ln ); + char* pz = XNEWVEC (char, ln); pz_name = pz; sprintf( pz, "FIXINC_WRAP_%s-%s", filname, p_fixd->fix_name ); @@ -749,6 +749,8 @@ main( int argc, char** argv ) return EXIT_FAILURE; } + initialize_opts (); + { char* pz = argv[1]; long idx; @@ -768,7 +770,7 @@ main( int argc, char** argv ) return EXIT_FAILURE; } - pz_tmptmp = xmalloc (strlen (argv[4]) + 5); + pz_tmptmp = XNEWVEC (char, strlen (argv[4]) + 5); strcpy( pz_tmptmp, argv[4] ); /* Don't lose because "12345678" and "12345678X" map to the same @@ -776,10 +778,12 @@ main( int argc, char** argv ) doesn't allow more than one dot in the trunk of a file name. */ pz_tmp_base = basename( pz_tmptmp ); pz_tmp_dot = strchr( pz_tmp_base, '.' ); +#ifdef _PC_NAME_MAX if (pathconf( pz_tmptmp, _PC_NAME_MAX ) <= 12 /* is this DOS or Windows9X? */ && pz_tmp_dot != (char*)NULL) strcpy (pz_tmp_dot+1, "X"); /* nuke the original extension */ else +#endif /* _PC_NAME_MAX */ strcat (pz_tmptmp, ".X"); if (freopen (pz_tmptmp, "w", stdout) != stdout) {