зеркало из https://github.com/mozilla/pjs.git
Bugzilla bug 103881: <sys/cdefs.h> as opposed to <cdefs.h> should be
included if HAVE_SYS_CDEFS_H is defined. Other cleanups related to cdefs.h. r=shaver. Modified files: dbm/src/snprintf.c dbm/include/cdefs.h dbm/include/mcom_db.h dbm/include/nsres.h
This commit is contained in:
Родитель
1a24cca0d5
Коммит
afe4a14413
|
@ -77,13 +77,6 @@
|
|||
#ifndef _CDEFS_H_
|
||||
#define _CDEFS_H_
|
||||
|
||||
#ifdef __BEGIN_DECLS
|
||||
#undef __BEGIN_DECLS
|
||||
#endif
|
||||
#ifdef __END_DECLS
|
||||
#undef __END_DECLS
|
||||
#endif
|
||||
|
||||
#if defined(__cplusplus)
|
||||
#define __BEGIN_DECLS extern "C" {
|
||||
#define __END_DECLS }
|
||||
|
@ -99,18 +92,12 @@
|
|||
* in between its arguments. __CONCAT can also concatenate double-quoted
|
||||
* strings produced by the __STRING macro, but this only works with ANSI C.
|
||||
*/
|
||||
#undef __P
|
||||
#undef __CONCAT
|
||||
#undef __STRING
|
||||
|
||||
#if defined(__STDC__) || defined(__cplusplus) || defined(_WINDOWS) || defined(XP_OS2)
|
||||
#define __P(protos) protos /* full-blown ANSI C */
|
||||
#define __CONCAT(x,y) x ## y
|
||||
#define __STRING(x) #x
|
||||
|
||||
#ifndef __const
|
||||
#define __const const /* define reserved names to standard */
|
||||
#endif /* __const */
|
||||
#define __signed signed
|
||||
#define __volatile volatile
|
||||
#ifndef _WINDOWS
|
||||
|
@ -172,11 +159,4 @@
|
|||
#define __pure
|
||||
#endif
|
||||
|
||||
#ifdef AIXV3
|
||||
/* Wont compile without const. Need a cleaner way to handle this. */
|
||||
#ifdef const
|
||||
#undef const
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#endif /* !_CDEFS_H_ */
|
||||
|
|
|
@ -77,7 +77,7 @@
|
|||
#ifndef HAVE_SYS_CDEFS_H
|
||||
#include "cdefs.h"
|
||||
#else
|
||||
#include <cdefs.h>
|
||||
#include <sys/cdefs.h>
|
||||
#endif
|
||||
#include "prtypes.h"
|
||||
|
||||
|
@ -231,10 +231,6 @@ XP_END_PROTOS
|
|||
#include <errno.h>
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_SYS_CDEFS_H
|
||||
#include "cdefs.h"
|
||||
#endif
|
||||
|
||||
#ifndef _WINDOWS /* included above to prevent spurious warnings chouck 12-Sep-95 */
|
||||
#include <limits.h>
|
||||
#endif
|
||||
|
|
|
@ -1,42 +0,0 @@
|
|||
#ifndef NSRES_H
|
||||
#define NSRES_H
|
||||
#include "cdefs.h"
|
||||
#include "mcom_db.h"
|
||||
|
||||
__BEGIN_DECLS
|
||||
|
||||
/* C version */
|
||||
#define NSRESHANDLE void *
|
||||
|
||||
typedef void (*NSRESTHREADFUNC)(void *);
|
||||
|
||||
typedef struct NSRESTHREADINFO
|
||||
{
|
||||
void *lock;
|
||||
NSRESTHREADFUNC fn_lock;
|
||||
NSRESTHREADFUNC fn_unlock;
|
||||
} NSRESTHREADINFO;
|
||||
|
||||
#define MAXBUFNUM 10
|
||||
#define MAXSTRINGLEN 300
|
||||
|
||||
#define NSRES_CREATE 1
|
||||
#define NSRES_OPEN 2
|
||||
|
||||
|
||||
|
||||
NSRESHANDLE NSResCreateTable(const char *filename, NSRESTHREADINFO *threadinfo);
|
||||
NSRESHANDLE NSResOpenTable(const char *filename, NSRESTHREADINFO *threadinfo);
|
||||
void NSResCloseTable(NSRESHANDLE handle);
|
||||
|
||||
char *NSResLoadString(NSRESHANDLE handle, const char * library, int32 id,
|
||||
unsigned int charsetid, char *retbuf);
|
||||
int32 NSResGetSize(NSRESHANDLE handle, const char *library, int32 id);
|
||||
int32 NSResLoadResource(NSRESHANDLE handle, const char *library, int32 id, char *retbuf);
|
||||
int NSResAddString(NSRESHANDLE handle, const char *library, int32 id, const char *string, unsigned int charset);
|
||||
|
||||
__END_DECLS
|
||||
|
||||
|
||||
#endif
|
||||
|
|
@ -5,9 +5,9 @@
|
|||
#include <stddef.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#if defined(_WINDOWS) || defined(SOLARIS) || defined(AIXV3) || defined(AIX) || defined(OSF1) || defined(NEC) || !defined(HAVE_SYS_CDEFS_H)
|
||||
#ifndef HAVE_SYS_CDEFS_H
|
||||
#include "cdefs.h"
|
||||
#elif !defined(HPUX) && !defined(UNIXWARE) && !defined(SNI)
|
||||
#else
|
||||
#include <sys/cdefs.h>
|
||||
#endif
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче