summaryrefslogtreecommitdiff
path: root/lib/et
AgeCommit message (Collapse)AuthorFilesLines
2011-10-05libcom_err: declare com_err_gettext to be staticTheodore Ts'o1-1/+1
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2011-10-05libcom_err: add set_com_err_gettext()Theodore Ts'o2-2/+25
This function allows programs to pass in a pointer to the gettext function so that error table strings will can be internationalized. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2011-10-05compile_et: generate *_err.c files that have strings marked for xgettextTheodore Ts'o7-209/+223
This allows error code strings to be internationalized. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2011-09-18Shorten compile commands run by the build systemTheodore Ts'o7-7/+17
The DEFS line in MCONFIG had gotten so long that it exceeded 4k, and this was starting to cause some tools heartburn. It also made "make V=1" almost useless, since trying to following the individual commands run by make was lost in the noise of all of the defines. So fix this by putting the configure-generated defines in lib/config.h and the directory pathnames to lib/dirpaths.h. In addition, clean up some vestigal defines in configure.in and in the Makefiles to further shorten the cc command lines. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2011-06-04libcom_err: Fix install rule if installing with hard linksTheodore Ts'o1-1/+2
If $(LINK_INSTALL_FLAGS) is -f instead of -sf, the Makefile's install rule would not work correctly while installing com_err.h Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2011-02-20e2fsprogs: create com_err.h link in includedirEric Sandeen1-0/+1
After debian bug #192277, debian/rules started making a symlink to com_err.h in /usr/include. Now I have Fedora bug #550889 for the same issue, and perhaps it's time to make this link by default, rather than fixing it up in packaging steps? [ Changed by tytso to remove the explicit -s option; this will default to creating a hard link by default, which slightly faster. If people want to use symlinks for all links during the install process, they can use configure option --enable-symlink-install. The reason for this change is that some file systems, like AFS, don't support symlinks, and AFS users complain when they can't build or install into AFS. So I don't want to use symlinks unconditionally without a way of switching things back and forth, and it's easier if we just make all links made during the install process to be hard links or sym links. ] Signed-off-by: Eric Sandeen <sandeen@redhat.com> Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2010-05-15libcom_err: Only output ^M when tty is in raw modeTheodore Ts'o1-2/+22
This fixes a long-standing botch in the com_err library, and solves a regression test problem for libss that gets tickled by source code management systems (like Perforce) that don't preserve CRLF line endings with fidelity. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2010-03-15libcom_err: Add support for Heimdal com_right_r function()Theodore Ts'o2-0/+17
Addresses-Sourceforge-Bug: #2963865 Addresses-Debian-Bug: #558910 Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2009-11-29debian: Fix FTBFS problem caused by texi2html changing its output locationTheodore Ts'o2-1/+9
Unfortunately, texi2html gratuitously changed its behavior of where its output html files are placed when the -split_chapter is in effect. (First it was in a subdirectory; then it was in the current directory; now it's back to putting the output html files in a subdirectory again.) Support either way of doing things since the texi2html team seems to be indecisive... Addresses-Debian-Bug: #552934 Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2009-07-02Add support for configure --enable-verbose-makecmdsTheodore Ts'o1-27/+27
Some people don't want to see the concise "kernel-style" make output. This configure option allows build engines that want to see the full set of commands executed by the makefile to get what they want. Most people will find this more distracting than useful, unless they need to debug the Makefiles. (It is not necessary to rerun configure to enable this verbose make output temprarily; if a developer wants to do a quick debug of a directory's makefile, he or she can simply edit the definition of the $(E) and $(Q) variables in the Makefile; instructions can be found in the MCONFIG file which is included in at the beginning of every Makefile.) Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2009-04-22libcom_err: Declare prototypes for et_list_lock/unlock in com_err.hTheodore Ts'o1-0/+4
Define the prototypes for et_list_lock() and et_list_unlock() in com_err.h. This promotes better error checking and avoids warnings when compiling the library and programs that call these functions. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-10-02libcom_err: Add missing type declarations to clean up -Wall warningsTheodore Ts'o1-5/+5
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-10-01libcom_err: Fix file descriptor leak after an execTheodore Ts'o1-7/+21
Some applications repeatedly re-exec themselves, and if they use the com_err library, they can leak a file descriptor for each re-exec. Fix this by setting the close-on-exec flag on the debug file descriptor. In addition, if the COMERR_DEBUG environment variable isn't set, don't open the file handle at all. Addresses-Red-Hat-Bugzilla: #464689 Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-09-12libcom_err: Use sem_post/sem_init to prevent race conditionsTheodore Ts'o3-8/+77
SuSE has been carrying a patch for a long time to prevent a largely theoretical race condition if a multi-threaded application adds and removes error tables in multiple threads. Unfortunately SuSE's approach breaks compatibility by forcing applications to link and compile with the -pthread option; using pthread mutexes has historically been problematic. This commit fixes things in a more portable way by using sem_post/sem_wait instead, which is an older interface that doesn't require the pthreads library. Linux happens to implement sem_post/sem_init using futexes, and -lrt ends up pulling in -lpthread, but the advantage of using POSIX semaphores is that applications don't have to be built using -pthread, unlike the use of pthread mutexes. The add_error_table() and remove_error_table() interfaces are the preferred interfaces and locking protection have been added to only these interfaces. I have not added locking protection to the generated initialize_xxx_error_table and initialize_xxx_error_table_r interfaces, to avoid adding symbol dependencies that would cause a library to fail to work when linking against older com_err libraries that do not export et_list_lock() and et_list_unlock(). Threaded applications shouldn't be using these interfaces in any case. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-09-02Fix pkg-config files: use Requires.private and fix the include directoryTheodore Ts'o1-1/+1
Addresses-Sourceforge-Bug: #2089537 Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-08-27Remove trailing whitespace for the entire source treeTheodore Ts'o3-35/+35
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-02-10Merge branch 'maint' into nextTheodore Ts'o1-1/+7
2008-02-09libcom_err: Use thread local storage to fix reentrancy problemsTheodore Ts'o1-1/+7
Address the theoretical problem of two threads trying to format a different unknown error code by using TLS. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2007-12-17Merge branch 'maint' into nextTheodore Ts'o1-2/+2
Conflicts: lib/ext2fs/closefs.c
2007-12-15libcom_err: Fix sign-extension problem on 64-bit systems in error_message()Theodore Ts'o1-2/+2
On 64-bit systems (or anything with sizeof(long) > sizeof(int)), we sometimes get error codes passed to error_message which have been cast from an (int) to an (unsigned int). This almost always happens if you're using libgssapi_krb5, which returns an error code which is less than 0 but is returned in an (unsigned int). For example, -1765328377L gets cast to 2529638919, which is 0x96c73a07, not 0xffffffff96c73a07, so error_message() fails to find a matching error table. When error_message() then calls the error_table_name() function to get a name to use in the "unknown code" message, it gets a correct value back. This happens because error_table_name() drops most of the higher bits of the parameter it's passed before doing anything else with it (& 077777777f, or & 0xffffff). If we did the same thing in error_message(), we wouldn't have a problem there, either. Problem reported and fixed by: Nalin Dahyabhai Addresses-Sourceforge-Bug: #1809658 Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2007-11-01texinfo: Fix directory entriesDmitry V. Levin1-4/+2
According to texinfo documentation, @dircategory and @direntry...@end direntry commands are more appropriate. For details see http://www.gnu.org/software/texinfo/manual/texinfo/html_node/Installing-Dir-Entries.html Signed-off-by: Dmitry V. Levin <ldv@altlinux.org> Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2007-07-08Remove Changelog files since they're not used after the git migrationTheodore Ts'o1-459/+0
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2007-06-24Update Release Notes, Changelogs, version.h, etc. for 1.40 releaseTheodore Ts'o1-0/+4
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2007-06-24Fix the info-dir line for the com_err.texinfo fileTheodore Ts'o2-1/+10
Fix the info-dir line so that the menu name does not contain a .info prefix. First of all, it's ugly, secondly, it causes the install-info command to fail to remove the com_err info file from the /usr/share/info/dir file when the comerr-dev package is removed and purged. Addresses Debian Bug: #401711 Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2007-05-25Fix gcc -Wall warnings, especially on 64-bit systemsAndreas Dilger2-0/+11
Signed-off-by: Andreas Dilger <adilger@clusterfs.com> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2006-12-22Add debugging code to the com_err libraryTheodore Ts'o2-0/+84
If the environment variable COMERR_DEBUG is set to 1, print out debugging messages as error tables are added and removed from the com_err library. If the COMERR_DEBUG_FILE environment variable is set (and the process is not setuid) the debugging messages may be redirected to a file. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2006-11-12Set local environment variables to C so mk_cmds and compile_et always workTheodore Ts'o2-0/+18
Addresses SourceForge Bug: #1532177 Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2006-10-22Add datarootdir definition for compatibility with autoconf 2.60Theodore Ts'o2-0/+7
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2006-08-05Create the generated files read-only to remind developers not to edit them.Andreas Dilger2-4/+11
Signed-off-by: Andreas Dilger <adilger@clusterfs.com> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2005-12-10Address parallel build problem in the library MakefilesTheodore Ts'o2-0/+8
Add a dependency to make sure that the subdirectories are created before creating all of the object files. Addresses Sourceforge Bug: #1261553 Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2005-07-19Fix com_err bug in compile_et: # of error messages can be wrongTheodore Ts'o2-0/+6
Fixed bug where error messages using continuations wouldn't increment the message count. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2005-06-30Update for e2fsprogs 1.38 release.Theodore Ts'o1-0/+4
2005-06-20error_message.c, init_et.c: Segregate error tables registeredTheodore Ts'o3-14/+24
via add_error_table() and the other dynamic methods from the ones allocated via initialize_xxx_error_table() so that we won't fail even for error tables created using old versions of compile_et. Thanks to Nalin Dahyabhai for this suggested patch.
2005-06-20et_c.awk: Use a dynamically allocated structure inTheodore Ts'o8-63/+65
initialize_xxx_error_table(), to prevent segfaults if an old library calls initialize_xxx_error_table, and another library/application calls add_error_table() on the same error table, and then calls remove_error_table(). (Addresses Sourcefroge Bug #1150146)
2005-05-06If the .c and .h file already exist, and they have not changed, use the Theodore Ts'o3-4/+20
original versions of the files, so as to avoid rebuilding files when not necessary. Also fixes a potential SMP/Parallel build problem when one make process runs compile_et to generate the .h file, and a partially generated .c file is compiled by another make process. (Addresses Sourceforge Bug: #1157933)
2005-03-21Update for the e2fsprogs 1.37 release.Theodore Ts'o1-0/+4
2005-02-05Update for release of e2fsprogs 1.36.Theodore Ts'o1-0/+4
2005-02-05Remove *.pc files on a "make distclean"Theodore Ts'o2-1/+6
Remove emacs backup files in tests/Makefile on a "make clean"
2005-01-26Add pkg-config files to e2fsprogs's libraries.Theodore Ts'o3-4/+26
2005-01-06Add imap_err.et to the lib/et regression test suite.Theodore Ts'o3-0/+258
2004-12-15Add install-strip and install-shlibs-strip targetsTheodore Ts'o2-10/+19
Use Linux-kernel-style makefile output for "make install" Update intl/Makefile.in to version from gettext 0.14.1
2004-12-14Use MKINSTALLDIRS macro so that the Makefiles can find the scriptTheodore Ts'o2-1/+5
correctly. Update Makefile dependencies. Update "make depend" production so that it filters out comments inserted by newer gcc compilers. Remove sync from e2fsck's "make all" target.
2004-11-30Use Linux-kernel-style makefile output to make it easier to Theodore Ts'o2-7/+14
see errors/warnings.
2004-11-19Remove the a.out DLL support, since it's been obsolete and unmaintainedTheodore Ts'o7-192/+0
for a long time now.
2004-09-17Remove XSI:isms for greater portability. (Addresses Theodore Ts'o2-2/+7
Debian Bug #255589)
2004-05-05Remove .cvsignore files; they were out of date, and causes lintianTheodore Ts'o1-2/+0
to flame about their presence in the source tarball.
2004-02-29Patch from Brian Bergstrand to use the correct -fPIC flag forTheodore Ts'o2-1/+6
Darwin in order to get rid of the compiler warning.
2004-02-28Update version number for e2fsprogs 1.35 release.Theodore Ts'o1-0/+4
2003-12-11com_err.3: Fix C syntax error pointed out by ESR.Theodore Ts'o2-9/+6
2003-11-28et_c.awk: Add declaration of the Heimdal initialization routineTheodore Ts'o4-4/+8
to avoid gcc -Wall complaints (Incomplete checkin --- see previous changeset as well)