Changeset 104 in openpam for trunk


Ignore:
Timestamp:
Apr 6, 2002, 7:02:06 PM (18 years ago)
Author:
Dag-Erling Smørgrav
Message:

Fix bugs in portability code; libpam now builds on NetBSD 1.5.2.

Sponsored by: DARPA, NAI Labs

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/security/openpam.h

    r100 r104  
    3232 * SUCH DAMAGE.
    3333 *
    34  * $P4: //depot/projects/openpam/include/security/openpam.h#13 $
     34 * $P4: //depot/projects/openpam/include/security/openpam.h#14 $
    3535 */
    3636
     
    118118 * Log to syslog
    119119 */
    120 void _openpam_log(int _level,
     120void
     121_openpam_log(int _level,
    121122        const char *_func,
    122123        const char *_fmt,
    123124        ...);
    124125
    125 #if defined(__STDC__) && (__STDC_VERSION__ > 199901L)
     126#if defined(__STDC__) && (__STDC_VERSION__ >= 199901L)
    126127#define openpam_log(lvl, fmt, ...) \
    127128        _openpam_log((lvl), __func__, fmt, __VA_ARGS__)
    128 #elif defined(__GNUC__)
     129#elif defined(__GNUC__) && (__GNUC__ >= 2) && (__GNUC_MINOR__ >= 95)
     130#define openpam_log(lvl, fmt, ...) \
     131        _openpam_log((lvl), __func__, fmt, ##fmt)
     132#elif defined(__GNUC__) && defined(__FUNCTION__)
    129133#define openpam_log(lvl, fmt...) \
    130         _openpam_log((lvl), __func__, ##fmt)
     134        _openpam_log((lvl), __FUNCTION__, ##fmt)
    131135#else
    132 extern openpam_log(int _level, const char *_format, ...);
     136void
     137openpam_log(int _level,
     138        const char *_format,
     139        ...);
    133140#endif
    134141
     
    191198 * You are not expected to understand this.
    192199 */
    193 #if defined(__GNUC__) && !defined(__PIC__)
    194200#if defined(__FreeBSD__)
    195201#define PAM_SOEXT ".so"
    196202#else
    197 #error Static linking is not supported on your platform
    198 #endif
     203#ifndef NO_STATIC_MODULES
     204#define NO_STATIC_MODULES
     205#endif
     206#endif
     207#if defined(__GNUC__) && !defined(__PIC__) && !defined(NO_STATIC_MODULES)
    199208/* gcc, static linking */
    200209#include <sys/cdefs.h>
Note: See TracChangeset for help on using the changeset viewer.