Back to index

courier  0.68.2
intl-exports.c
Go to the documentation of this file.
00001 /* List of exported symbols of libintl on Cygwin.
00002    Copyright (C) 2006 Free Software Foundation, Inc.
00003    Written by Bruno Haible <bruno@clisp.org>, 2006.
00004 
00005    This program is free software; you can redistribute it and/or modify it
00006    under the terms of the GNU Library General Public License as published
00007    by the Free Software Foundation; either version 2, or (at your option)
00008    any later version.
00009 
00010    This program is distributed in the hope that it will be useful,
00011    but WITHOUT ANY WARRANTY; without even the implied warranty of
00012    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00013    Library General Public License for more details.
00014 
00015    You should have received a copy of the GNU Library General Public
00016    License along with this program; if not, write to the Free Software
00017    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
00018    USA.  */
00019 
00020  /* IMP(x) is a symbol that contains the address of x.  */
00021 #define IMP(x) _imp__##x
00022 
00023  /* Ensure that the variable x is exported from the library, and that a
00024     pseudo-variable IMP(x) is available.  */
00025 #define VARIABLE(x) \
00026  /* Export x without redefining x.  This code was found by compiling a  \
00027     snippet:                                                            \
00028       extern __declspec(dllexport) int x; int x = 42;  */               \
00029  asm (".section .drectve\n");                                           \
00030  asm (".ascii \" -export:" #x ",data\"\n");                             \
00031  asm (".data\n");                                                       \
00032  /* Allocate a pseudo-variable IMP(x).  */                              \
00033  extern int x;                                                          \
00034  void * IMP(x) = &x;
00035 
00036 VARIABLE(libintl_version)