]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
Support for building DLLs on Windows.
authorBruno Haible <bruno@clisp.org>
Sun, 24 Aug 2003 17:53:56 +0000 (17:53 +0000)
committerBruno Haible <bruno@clisp.org>
Tue, 23 Jun 2009 10:10:54 +0000 (12:10 +0200)
14 files changed:
gettext-tools/lib/argmatch.h
gettext-tools/lib/error-progname.h
gettext-tools/lib/getopt.h
gettext-tools/lib/obstack.h
gettext-tools/lib/progname.h
gettext-tools/src/Makefile.am
gettext-tools/src/format.h
gettext-tools/src/message.h
gettext-tools/src/msgl-cat.h
gettext-tools/src/plural-table.h
gettext-tools/src/po-charset.h
gettext-tools/src/po-lex.h
gettext-tools/src/read-po.h
gettext-tools/src/write-mo.h

index deb908fb9d1b03427caa9805a5379a52985d6670..85cbc8cbb09f7513c86b8987074fa1951f6e7d3a 100644 (file)
@@ -1,5 +1,5 @@
 /* argmatch.h -- definitions and prototypes for argmatch.c
-   Copyright (C) 1990, 1998, 1999, 2001, 2002 Free Software Foundation, Inc.
+   Copyright (C) 1990, 1998, 1999, 2001-2003 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
@@ -57,7 +57,7 @@ int argmatch (char const *arg, char const *const *arglist,
    return.  By default, this is a function that calls ARGMATCH_DIE which
    in turn defaults to `exit (EXIT_FAILURE)'.  */
 typedef void (*argmatch_exit_fn) (void);
-extern argmatch_exit_fn argmatch_die;
+extern DLL_VARIABLE argmatch_exit_fn argmatch_die;
 
 /* Report on stderr why argmatch failed.  Report correct values. */
 
index f13d55de93e736f7263dafeecbbe08011acc2368..c70d1d54e11b47d13de5cf4cccfd1ab2406edb59 100644 (file)
@@ -38,7 +38,7 @@ extern "C" {
    Default is true.
    A reason to omit the prefix is for better interoperability with Emacs'
    compile.el.  */
-extern bool error_with_progname;
+extern DLL_VARIABLE bool error_with_progname;
 
 /* Print program_name prefix on stderr if and only if error_with_progname
    is true.  */
index 4283c35b168acb3a4a4770cd6f646797478128ab..3b0732fdbefceb882802c98948405dfc2eff8565 100644 (file)
@@ -1,5 +1,5 @@
 /* Declarations for getopt.
-   Copyright (C) 1989-1994, 1996-1999, 2001 Free Software Foundation, Inc.
+   Copyright (C) 1989-1994, 1996-1999, 2001, 2003 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -44,7 +44,7 @@ extern "C" {
    Also, when `ordering' is RETURN_IN_ORDER,
    each non-option ARGV-element is returned here.  */
 
-extern char *optarg;
+extern DLL_VARIABLE char *optarg;
 
 /* Index in ARGV of the next element to be scanned.
    This is used for communication to and from the caller
@@ -58,16 +58,16 @@ extern char *optarg;
    Otherwise, `optind' communicates from one call to the next
    how much of ARGV has been scanned so far.  */
 
-extern int optind;
+extern DLL_VARIABLE int optind;
 
 /* Callers store zero here to inhibit the error message `getopt' prints
    for unrecognized options.  */
 
-extern int opterr;
+extern DLL_VARIABLE int opterr;
 
 /* Set to an option character which was unrecognized.  */
 
-extern int optopt;
+extern DLL_VARIABLE int optopt;
 
 #ifndef __need_getopt
 /* Describe the long-named options requested by the application.
index c949730e5e22aed3522b8cd0318684ff6beff679..9c91977ff1ef873b157c5a9ca758a4967d6660b1 100644 (file)
@@ -1,5 +1,5 @@
 /* obstack.h - object stack macros
-   Copyright (C) 1988,89,90,91,92,93,94,96,97,98,99 Free Software Foundation, Inc.
+   Copyright (C) 1988-1994, 1996-1999, 2003 Free Software Foundation, Inc.
 
    This file is part of the GNU C Library.  Its master source is NOT part of
    the C library, however.  The master source lives in /gd/gnu/lib.
@@ -261,13 +261,13 @@ int obstack_memory_used (struct obstack *obstack);
    should either abort gracefully or use longjump - but shouldn't
    return.  The default action is to print a message and abort.  */
 #if defined __STDC__ && __STDC__
-extern void (*obstack_alloc_failed_handler) (void);
+extern DLL_VARIABLE void (*obstack_alloc_failed_handler) (void);
 #else
-extern void (*obstack_alloc_failed_handler) ();
+extern DLL_VARIABLE void (*obstack_alloc_failed_handler) ();
 #endif
 
 /* Exit value used when `print_and_abort' is used.  */
-extern int obstack_exit_failure;
+extern DLL_VARIABLE int obstack_exit_failure;
 \f
 /* Pointer to beginning of object being allocated or to be allocated next.
    Note that this might not be the final address of the object
index 85169c356ffbedb31b8bd8dc07e6bf9b57e1ab03..171ece9885de4d8e9ee6c4552ab13473a242f701 100644 (file)
@@ -32,7 +32,7 @@ extern "C" {
 
 
 /* String containing name the program is called with.  */
-extern const char *program_name;
+extern DLL_VARIABLE const char *program_name;
 
 /* Set program_name, based on argv[0].  */
 extern void set_program_name (const char *argv0);
index 9c747090a22f4f7eb0154882c457356e077a9029..6bcadb0f281ec02df004bc74b7d4a3b05dd096e9 100644 (file)
@@ -221,7 +221,7 @@ BUILT_SOURCES = \
 
 po-lex.o po-lex.lo: po-gram-gen2.h
 po-gram-gen2.h: po-gram-gen.h
-       $(SED) 's/yy/po_gram_/g' $(srcdir)/po-gram-gen.h > $@-tmp
+       $(SED) -e 's/yy/po_gram_/g' -e 's/extern /extern DLL_VARIABLE /' $(srcdir)/po-gram-gen.h > $@-tmp
        mv $@-tmp $@
 
 # We must add the '#include <vms_jackets.h>' here, not inside x-java.l,
index ad01e5bfa1bc8f0c3f713588c8616167d7b8aea6..1d173800a4f429f6de8d01f08df97e0e18741d37 100644 (file)
@@ -61,24 +61,24 @@ struct formatstring_parser
 };
 
 /* Format string parsers, each defined in its own file.  */
-extern struct formatstring_parser formatstring_c;
-extern struct formatstring_parser formatstring_python;
-extern struct formatstring_parser formatstring_lisp;
-extern struct formatstring_parser formatstring_elisp;
-extern struct formatstring_parser formatstring_librep;
-extern struct formatstring_parser formatstring_smalltalk;
-extern struct formatstring_parser formatstring_java;
-extern struct formatstring_parser formatstring_awk;
-extern struct formatstring_parser formatstring_pascal;
-extern struct formatstring_parser formatstring_ycp;
-extern struct formatstring_parser formatstring_tcl;
-extern struct formatstring_parser formatstring_perl;
-extern struct formatstring_parser formatstring_perl_brace;
-extern struct formatstring_parser formatstring_php;
-extern struct formatstring_parser formatstring_gcc_internal;
+extern DLL_VARIABLE struct formatstring_parser formatstring_c;
+extern DLL_VARIABLE struct formatstring_parser formatstring_python;
+extern DLL_VARIABLE struct formatstring_parser formatstring_lisp;
+extern DLL_VARIABLE struct formatstring_parser formatstring_elisp;
+extern DLL_VARIABLE struct formatstring_parser formatstring_librep;
+extern DLL_VARIABLE struct formatstring_parser formatstring_smalltalk;
+extern DLL_VARIABLE struct formatstring_parser formatstring_java;
+extern DLL_VARIABLE struct formatstring_parser formatstring_awk;
+extern DLL_VARIABLE struct formatstring_parser formatstring_pascal;
+extern DLL_VARIABLE struct formatstring_parser formatstring_ycp;
+extern DLL_VARIABLE struct formatstring_parser formatstring_tcl;
+extern DLL_VARIABLE struct formatstring_parser formatstring_perl;
+extern DLL_VARIABLE struct formatstring_parser formatstring_perl_brace;
+extern DLL_VARIABLE struct formatstring_parser formatstring_php;
+extern DLL_VARIABLE struct formatstring_parser formatstring_gcc_internal;
 
 /* Table of all format string parsers.  */
-extern struct formatstring_parser *formatstring_parsers[NFORMATS];
+extern DLL_VARIABLE struct formatstring_parser *formatstring_parsers[NFORMATS];
 
 /* Returns an array of the ISO C 99 <inttypes.h> format directives
    contained in the argument string.  *intervalsp is assigned to a freshly
index 4968b5ec1073421fb728f9e0ecac93dbcc691cf4..20aae574fbcce97c5378ea061beeef91c6137ce1 100644 (file)
@@ -57,8 +57,8 @@ enum format_type
   format_gcc_internal
 };
 #define NFORMATS 15    /* Number of format_type enum values.  */
-extern const char *const format_language[NFORMATS];
-extern const char *const format_language_pretty[NFORMATS];
+extern DLL_VARIABLE const char *const format_language[NFORMATS];
+extern DLL_VARIABLE const char *const format_language_pretty[NFORMATS];
 
 /* Is current msgid a format string?  */
 enum is_format
index abdc56495603758cbad55c46e494ec78dc20eb05..e4035a0706615e0413a837d0d43b3231a1f370a7 100644 (file)
@@ -31,20 +31,20 @@ extern "C" {
 
 
 /* These variables control which messages are selected.  */
-extern int more_than;
-extern int less_than;
+extern DLL_VARIABLE int more_than;
+extern DLL_VARIABLE int less_than;
 
 /* If true, use the first available translation.
    If false, merge all available translations into one and fuzzy it.  */
-extern bool use_first;
+extern DLL_VARIABLE bool use_first;
 
 /* If true, merge like msgcomm.
    If false, merge like msgcat and msguniq.  */
-extern bool msgcomm_mode;
+extern DLL_VARIABLE bool msgcomm_mode;
 
 /* If true, omit the header entry.
    If false, keep the header entry present in the input.  */
-extern bool omit_header;
+extern DLL_VARIABLE bool omit_header;
 
 extern msgdomain_list_ty *
        catenate_msgdomain_list (string_list_ty *file_list,
index ae7a7a8500c2b7d8ce3c33b9e6c0ff02650a5343..c8dffdd96ce0d1a55bf6778b36b1d65e7be52c28 100644 (file)
@@ -1,5 +1,5 @@
 /* Table of known plural form expressions.
-   Copyright (C) 2001-2002 Free Software Foundation, Inc.
+   Copyright (C) 2001-2003 Free Software Foundation, Inc.
    Written by Bruno Haible <haible@clisp.cons.org>, 2002.
 
    This program is free software; you can redistribute it and/or modify
@@ -28,7 +28,7 @@ struct plural_table_entry
   const char *value;
 };
 
-extern struct plural_table_entry plural_table[];
-extern const size_t plural_table_size;
+extern DLL_VARIABLE struct plural_table_entry plural_table[];
+extern DLL_VARIABLE const size_t plural_table_size;
 
 #endif /* _PLURAL_TABLE_H */
index 887a5b4fe8b48a6964bb216312a6dd4d4dda0603..951e94515ff5ec74649b05561e5c348732add80a 100644 (file)
@@ -37,10 +37,10 @@ extern "C" {
 extern const char *po_charset_canonicalize (const char *charset);
 
 /* The canonicalized encoding name for ASCII.  */
-extern const char *po_charset_ascii;
+extern DLL_VARIABLE const char *po_charset_ascii;
 
 /* The canonicalized encoding name for UTF-8.  */
-extern const char *po_charset_utf8;
+extern DLL_VARIABLE const char *po_charset_utf8;
 
 /* Test for ASCII compatibility.  */
 extern bool po_charset_ascii_compatible (const char *canon_charset);
@@ -57,15 +57,15 @@ extern bool po_is_charset_weird_cjk (const char *canon_charset);
 
 
 /* The PO file's encoding, as specified in the header entry.  */
-extern const char *po_lex_charset;
+extern DLL_VARIABLE const char *po_lex_charset;
 
 #if HAVE_ICONV
 /* Converter from the PO file's encoding to UTF-8.  */
-extern iconv_t po_lex_iconv;
+extern DLL_VARIABLE iconv_t po_lex_iconv;
 #endif
 /* If no converter is available, some information about the structure of the
    PO file's encoding.  */
-extern bool po_lex_weird_cjk;
+extern DLL_VARIABLE bool po_lex_weird_cjk;
 
 /* Initialize the PO file's encoding.  */
 extern void po_lex_charset_init (void);
index c9e0aafc2d45fa7ee552a4a5caa9abdbfd2fbb78..12ee225288f27f7c37ed880f949532adb9b5f790 100644 (file)
@@ -40,15 +40,15 @@ extern "C" {
 /* Global variables from po-lex.c.  */
 
 /* Current position within the PO file.  */
-extern lex_pos_ty gram_pos;
-extern int gram_pos_column;
+extern DLL_VARIABLE lex_pos_ty gram_pos;
+extern DLL_VARIABLE int gram_pos_column;
 
 /* Number of parse errors within a PO file that cause the program to
    terminate.  Cf. error_message_count, declared in <error.h>.  */
-extern unsigned int gram_max_allowed_errors;
+extern DLL_VARIABLE unsigned int gram_max_allowed_errors;
 
 /* True if obsolete entries shall be considered as valid.  */
-extern bool pass_obsolete_entries;
+extern DLL_VARIABLE bool pass_obsolete_entries;
 
 
 /* Prepare lexical analysis.  */
index f40163e75bfa0aa16e7394f2379066fa4f8d83be..c3cb9bf6da38d4c4dfc530cc4bd0a2ac4eeaedb1 100644 (file)
@@ -151,15 +151,15 @@ extern default_po_reader_ty *
 
 /* If nonzero, remember comments for file name and line number for each
    msgid, if present in the reference input.  Defaults to true.  */
-extern int line_comment;
+extern DLL_VARIABLE int line_comment;
 
 /* If false, duplicate msgids in the same domain and file generate an error.
    If true, such msgids are allowed; the caller should treat them
    appropriately.  Defaults to false.  */
-extern bool allow_duplicates;
+extern DLL_VARIABLE bool allow_duplicates;
 
 /* Expected syntax of the input files.  */
-extern input_syntax_ty input_syntax;
+extern DLL_VARIABLE input_syntax_ty input_syntax;
 
 /* Read the input file from a stream.  Returns a list of messages.  */
 extern msgdomain_list_ty *read_po (FILE *fp, const char *real_filename,
index b0b4923002c153b35bac3de59ecf9a1a20d85c17..ce40463a3f951695de2e7a7959d4938ee13bf6da 100644 (file)
@@ -1,5 +1,5 @@
 /* Writing binary .mo files.
-   Copyright (C) 1995-1998, 2000-2002 Free Software Foundation, Inc.
+   Copyright (C) 1995-1998, 2000-2003 Free Software Foundation, Inc.
    Written by Ulrich Drepper <drepper@gnu.ai.mit.edu>, April 1995.
 
    This program is free software; you can redistribute it and/or modify
 #include "message.h"
 
 /* Alignment of strings in resulting .mo file.  */
-extern size_t alignment;
+extern DLL_VARIABLE size_t alignment;
 
 /* True if no hash table in .mo is wanted.  */
-extern bool no_hash_table;
+extern DLL_VARIABLE bool no_hash_table;
 
 /* Write a GNU mo file.  mlp is a list containing the messages to be output.
    domain_name is the domain name, file_name is the desired file name.