Changeset 609 for branches/GNU/src/binutils/include/nlm
- Timestamp:
- Aug 16, 2003, 6:59:22 PM (22 years ago)
- Location:
- branches/GNU/src/binutils/include/nlm
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/GNU/src/binutils/include/nlm/ChangeLog
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r608 r609 1 2001- 06-07Alan Modra <amodra@bigpond.net.au>1 2001-10-02 Alan Modra <amodra@bigpond.net.au> 2 2 3 * Many files: Update copyright notices. 3 * common.h (NLM_CAT, NLM_CAT3): Don't define. 4 (NLM_CAT4): Update conditions under which this is defined. Document 5 why CONCAT4 can't be used. 4 6 5 7 Fri May 6 13:31:04 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com) -
Property cvs2svn:cvs-rev
changed from
-
branches/GNU/src/binutils/include/nlm/common.h
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r608 r609 1 1 /* NLM (NetWare Loadable Module) support for BFD. 2 Copyright 1993 Free Software Foundation, Inc.2 Copyright 1993, 2001 Free Software Foundation, Inc. 3 3 4 4 Written by Fred Fish @ Cygnus Support … … 24 24 that are common to both the internal and external representations. */ 25 25 26 /* Semi-portable string concatenation in cpp.27 The NLM_CAT4 hack is to avoid a problem with some strict ANSI C28 preprocessors. The problem is, "32_" or "64_" are not a valid29 preprocessing tokens, and we don't want extra underscores (e.g.,30 "nlm_32_"). The XNLM_CAT2 macro will cause the inner NLM_CAT macros31 to be evaluated first, producing still-valid pp-tokens. Then the32 final concatenation can be done. (Sigh.) */33 34 #ifdef SABER35 # define NLM_CAT(a,b) a##b36 # define NLM_CAT3(a,b,c) a##b##c37 # define NLM_CAT4(a,b,c,d) a##b##c##d38 #else39 # ifdef __STDC__40 # define NLM_CAT(a,b) a##b41 # define NLM_CAT3(a,b,c) a##b##c42 # define XNLM_CAT2(a,b) NLM_CAT(a,b)43 # define NLM_CAT4(a,b,c,d) XNLM_CAT2(NLM_CAT(a,b),NLM_CAT(c,d))44 # else45 # define NLM_CAT(a,b) a/**/b46 # define NLM_CAT3(a,b,c) a/**/b/**/c47 # define NLM_CAT4(a,b,c,d) a/**/b/**/c/**/d48 # endif49 #endif50 51 26 /* If NLM_ARCH_SIZE is not defined, default to 32. NLM_ARCH_SIZE is 52 27 optionally defined by the application. */ … … 54 29 #ifndef NLM_ARCH_SIZE 55 30 # define NLM_ARCH_SIZE 32 31 #endif 32 33 /* Due to horrible details of ANSI macro expansion, we can't use CONCAT4 34 for NLM_NAME. CONCAT2 is used in BFD_JUMP_TABLE macros, and some of 35 them will expand to tokens that themselves are macros defined in terms 36 of NLM_NAME. If NLM_NAME were defined using CONCAT4 (which is itself 37 defined in bfd-in.h using CONCAT2), ANSI preprocessor rules say that 38 the CONCAT2 within NLM_NAME should not be expanded. 39 So use another name. */ 40 #if defined (__STDC__) || defined (ALMOST_STDC) || defined (HAVE_STRINGIZE) 41 #ifdef SABER 42 #define NLM_CAT4(a,b,c,d) a##b##c##d 43 #else 44 /* This hack is to avoid a problem with some strict ANSI C preprocessors. 45 The problem is, "32_" is not a valid preprocessing token, and we don't 46 want extra underscores (e.g., "nlm_32_"). The NLM_XCAT2 macro will 47 cause the inner CAT2 macros to be evaluated first, producing 48 still-valid pp-tokens. Then the final concatenation can be done. */ 49 #define NLM_CAT2(a,b) a##b 50 #define NLM_XCAT2(a,b) NLM_CAT2(a,b) 51 #define NLM_CAT4(a,b,c,d) NLM_XCAT2(NLM_CAT2(a,b),NLM_CAT2(c,d)) 52 #endif 53 #else 54 #define NLM_CAT4(a,b,c,d) a/**/b/**/c/**/d 56 55 #endif 57 56 -
Property cvs2svn:cvs-rev
changed from
Note:
See TracChangeset
for help on using the changeset viewer.