From: VMware, Inc <> Date: Mon, 21 May 2012 22:22:02 +0000 (-0700) Subject: EXTERN: remive archaic definition X-Git-Tag: 2012.05.21-724730~39 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=4e01f6ed02d47c3efed605a2ae984ad53dc449d2;p=thirdparty%2Fopen-vm-tools.git EXTERN: remive archaic definition Signed-off-by: Dmitry Torokhov --- diff --git a/open-vm-tools/lib/hgfsServer/hgfsServerInt.h b/open-vm-tools/lib/hgfsServer/hgfsServerInt.h index 20cced6b9..e5bd80581 100644 --- a/open-vm-tools/lib/hgfsServer/hgfsServerInt.h +++ b/open-vm-tools/lib/hgfsServer/hgfsServerInt.h @@ -89,7 +89,7 @@ #endif /* Value of config option to require using host timestamps */ -EXTERN Bool alwaysUseHostTime; +extern Bool alwaysUseHostTime; /* Identifier for a local file */ typedef struct HgfsLocalId { diff --git a/open-vm-tools/lib/include/config.h b/open-vm-tools/lib/include/config.h index 31d9ad6e0..f0ea6370e 100644 --- a/open-vm-tools/lib/include/config.h +++ b/open-vm-tools/lib/include/config.h @@ -36,79 +36,79 @@ struct CryptoKey; struct KeySafeUserRing; -EXTERN void Config_SetAny(const char *value, - const char *fmt, ...) PRINTF_DECL(2, 3); -EXTERN void Config_SetString(const char *value, - const char *fmt, ...) PRINTF_DECL(2, 3); -EXTERN void Config_SetStringPlain(const char *value, - const char *fmt, ...) PRINTF_DECL(2, 3); -EXTERN void Config_SetBool(Bool value, const char *fmt, ...) PRINTF_DECL(2, 3); -EXTERN void Config_SetBoolPlain(Bool value, const char *fmt, ...) PRINTF_DECL(2, 3); -EXTERN void Config_SetLong(int32 value, - const char *fmt, ...) PRINTF_DECL(2, 3); -EXTERN void Config_SetInt64(int64 value, - const char *fmt, ...) PRINTF_DECL(2, 3); -EXTERN void Config_SetLongPlain(int32 value, - const char *fmt, ...) PRINTF_DECL(2, 3); -EXTERN void Config_SetDouble(double value, - const char *fmt, ...) PRINTF_DECL(2, 3); - -EXTERN char *Config_GetString(const char *defaultValue, - const char *fmt, ...) PRINTF_DECL(2, 3); -EXTERN char *Config_GetStringPlain(const char *defaultValue, - const char *fmt, ...) PRINTF_DECL(2, 3); -EXTERN char *Config_GetAsString(const char *fmt, ...) PRINTF_DECL(1, 2); -EXTERN char *Config_GetStringEnum(const char *defaultValue, - const char **choices, - const char *fmt, ...) PRINTF_DECL(3, 4); - -EXTERN int Config_CompareVersion(const char *version); -EXTERN int Config_CompareVersions(const char *version1, const char *version2); -EXTERN char *Config_GetPathName(const char *defaultValue, - const char *fmt, ...) PRINTF_DECL(2, 3); -EXTERN Bool Config_GetBool(Bool defaultValue, +void Config_SetAny(const char *value, + const char *fmt, ...) PRINTF_DECL(2, 3); +void Config_SetString(const char *value, + const char *fmt, ...) PRINTF_DECL(2, 3); +void Config_SetStringPlain(const char *value, const char *fmt, ...) PRINTF_DECL(2, 3); -EXTERN Bool Config_GetBoolPlain(Bool defaultValue, - const char *fmt, ...) PRINTF_DECL(2, 3); -EXTERN int32 Config_GetLong(int32 defaultValue, +void Config_SetBool(Bool value, const char *fmt, ...) PRINTF_DECL(2, 3); +void Config_SetBoolPlain(Bool value, const char *fmt, ...) PRINTF_DECL(2, 3); +void Config_SetLong(int32 value, + const char *fmt, ...) PRINTF_DECL(2, 3); +void Config_SetInt64(int64 value, + const char *fmt, ...) PRINTF_DECL(2, 3); +void Config_SetLongPlain(int32 value, + const char *fmt, ...) PRINTF_DECL(2, 3); +void Config_SetDouble(double value, + const char *fmt, ...) PRINTF_DECL(2, 3); + +char *Config_GetString(const char *defaultValue, + const char *fmt, ...) PRINTF_DECL(2, 3); +char *Config_GetStringPlain(const char *defaultValue, const char *fmt, ...) PRINTF_DECL(2, 3); -EXTERN int64 Config_GetInt64(int64 defaultValue, - const char *fmt, ...) PRINTF_DECL(2, 3); -EXTERN int32 Config_GetLongPlain(int32 defaultValue, - const char *fmt, ...) PRINTF_DECL(2, 3); -EXTERN int32 Config_GetTriState(int32 defaultValue, - const char *fmt, ...) PRINTF_DECL(2, 3); -EXTERN double Config_GetDouble(double defaultValue, - const char *fmt, ...) PRINTF_DECL(2, 3); -EXTERN Bool Config_NotSet(const char *fmt, ...) PRINTF_DECL(1, 2); -EXTERN void Config_Unset(const char *fmt, ...) PRINTF_DECL(1, 2); -EXTERN void Config_UnsetWithPrefix(const char *fmt, ...) PRINTF_DECL(1, 2); - -EXTERN void Config_Set(void *value, int type, - const char *fmt, ...) PRINTF_DECL(3, 4); +char *Config_GetAsString(const char *fmt, ...) PRINTF_DECL(1, 2); +char *Config_GetStringEnum(const char *defaultValue, + const char **choices, + const char *fmt, ...) PRINTF_DECL(3, 4); + +int Config_CompareVersion(const char *version); +int Config_CompareVersions(const char *version1, const char *version2); +char *Config_GetPathName(const char *defaultValue, + const char *fmt, ...) PRINTF_DECL(2, 3); +Bool Config_GetBool(Bool defaultValue, + const char *fmt, ...) PRINTF_DECL(2, 3); +Bool Config_GetBoolPlain(Bool defaultValue, + const char *fmt, ...) PRINTF_DECL(2, 3); +int32 Config_GetLong(int32 defaultValue, + const char *fmt, ...) PRINTF_DECL(2, 3); +int64 Config_GetInt64(int64 defaultValue, + const char *fmt, ...) PRINTF_DECL(2, 3); +int32 Config_GetLongPlain(int32 defaultValue, + const char *fmt, ...) PRINTF_DECL(2, 3); +int32 Config_GetTriState(int32 defaultValue, + const char *fmt, ...) PRINTF_DECL(2, 3); +double Config_GetDouble(double defaultValue, + const char *fmt, ...) PRINTF_DECL(2, 3); +Bool Config_NotSet(const char *fmt, ...) PRINTF_DECL(1, 2); +void Config_Unset(const char *fmt, ...) PRINTF_DECL(1, 2); +void Config_UnsetWithPrefix(const char *fmt, ...) PRINTF_DECL(1, 2); + +void Config_Set(void *value, int type, + const char *fmt, ...) PRINTF_DECL(3, 4); /* * This is tricky to call because it returns allocated storage. Use * the typed wrappers instead (Config_Get*). */ -EXTERN void *Config_Get(const void *pDefaultValue, int type, - const char *fmt, ...) PRINTF_DECL(3, 4); +void *Config_Get(const void *pDefaultValue, int type, + const char *fmt, ...) PRINTF_DECL(3, 4); -EXTERN void Config_MarkModified(const char *fmt, ...) PRINTF_DECL(1, 2); -EXTERN Bool Config_Load(const char *filename); -EXTERN Bool Config_Write(const char *dummy); -EXTERN Bool Config_WriteNoMsg(void); +void Config_MarkModified(const char *fmt, ...) PRINTF_DECL(1, 2); +Bool Config_Load(const char *filename); +Bool Config_Write(const char *dummy); +Bool Config_WriteNoMsg(void); -EXTERN Bool Config_FileIsPresent(void); -EXTERN Bool Config_FileIsWritable(void); +Bool Config_FileIsPresent(void); +Bool Config_FileIsWritable(void); -EXTERN uint32 Config_GetMask(uint32 defaultMask, const char *optionName); -EXTERN uint64 Config_GetMask64(uint64 defaultMask, const char *optionName); +uint32 Config_GetMask(uint32 defaultMask, const char *optionName); +uint64 Config_GetMask64(uint64 defaultMask, const char *optionName); -EXTERN Bool Config_GetDataFileKey(struct CryptoKey **key, - struct KeySafeUserRing **userRing); +Bool Config_GetDataFileKey(struct CryptoKey **key, + struct KeySafeUserRing **userRing); -EXTERN Bool Config_GetDataFileKeys(struct KeySafeUserRing **parentKeys, - struct KeySafeUserRing **allKeys); +Bool Config_GetDataFileKeys(struct KeySafeUserRing **parentKeys, + struct KeySafeUserRing **allKeys); #endif // _CONFIG_H_ diff --git a/open-vm-tools/lib/include/cryptoError.h b/open-vm-tools/lib/include/cryptoError.h index 0ab4249eb..7744a5d13 100644 --- a/open-vm-tools/lib/include/cryptoError.h +++ b/open-vm-tools/lib/include/cryptoError.h @@ -57,10 +57,10 @@ typedef int CryptoError; #define CRYPTO_ERROR_NO_CRYPTO ((CryptoError) 11) #define CRYPTO_ERROR_LOCK_FAILURE ((CryptoError) 12) -EXTERN const char * +const char * CryptoError_ToString(CryptoError error); -EXTERN const char * +const char * CryptoError_ToMsgString(CryptoError error); diff --git a/open-vm-tools/lib/include/iovector.h b/open-vm-tools/lib/include/iovector.h index 208df3a5d..1791e1717 100644 --- a/open-vm-tools/lib/include/iovector.h +++ b/open-vm-tools/lib/include/iovector.h @@ -61,54 +61,54 @@ typedef struct VMIOVec { #define LAZY_ALLOC_MAGIC ((void*)0xF0F0) -EXTERN VMIOVec* IOV_Split(VMIOVec *regionV, - SectorType numSectors, - uint32 sectorSize); - -EXTERN void IOV_Log(const VMIOVec *iov); -EXTERN void IOV_Zero(VMIOVec *iov); -EXTERN Bool IOV_IsZero(VMIOVec* iov); -EXTERN VMIOVec* IOV_Duplicate(VMIOVec* iovIn); -EXTERN VMIOVec* IOV_Allocate(int numEntries); -EXTERN void IOV_Free(VMIOVec* iov); -EXTERN void IOV_DuplicateStatic(VMIOVec *iovIn, - int numStaticEntries, - struct iovec *staticEntries, - VMIOVec *iovOut); - -EXTERN void IOV_MakeSingleIOV(VMIOVec* v, - struct iovec* iov, - SectorType startSector, - SectorType dataLen, - uint32 sectorSize, - uint8* buffer, - Bool read); - -EXTERN void IOV_WriteIovToBuf(struct iovec* entries, - int numEntries, - uint8* bufOut, - size_t bufSize); - -EXTERN void IOV_WriteBufToIov(const uint8* bufIn, - size_t bufSize, - struct iovec* entries, - int numEntries); - -EXTERN size_t +VMIOVec* IOV_Split(VMIOVec *regionV, + SectorType numSectors, + uint32 sectorSize); + +void IOV_Log(const VMIOVec *iov); +void IOV_Zero(VMIOVec *iov); +Bool IOV_IsZero(VMIOVec* iov); +VMIOVec* IOV_Duplicate(VMIOVec* iovIn); +VMIOVec* IOV_Allocate(int numEntries); +void IOV_Free(VMIOVec* iov); +void IOV_DuplicateStatic(VMIOVec *iovIn, + int numStaticEntries, + struct iovec *staticEntries, + VMIOVec *iovOut); + +void IOV_MakeSingleIOV(VMIOVec* v, + struct iovec* iov, + SectorType startSector, + SectorType dataLen, + uint32 sectorSize, + uint8* buffer, + Bool read); + +void IOV_WriteIovToBuf(struct iovec* entries, + int numEntries, + uint8* bufOut, + size_t bufSize); + +void IOV_WriteBufToIov(const uint8* bufIn, + size_t bufSize, + struct iovec* entries, + int numEntries); + +size_t IOV_WriteIovToBufPlus(struct iovec* entries, int numEntries, uint8* bufOut, size_t bufSize, size_t iovOffset); -EXTERN size_t +size_t IOV_WriteBufToIovPlus(uint8* bufIn, size_t bufSize, struct iovec* entries, int numEntries, size_t iovOffset); -EXTERN size_t +size_t IOV_WriteIovToIov(VMIOVec *srcIov, VMIOVec *dstIov, uint32 sectorSizeShift); @@ -133,8 +133,8 @@ IOV_WriteIovToIov(VMIOVec *srcIov, #if VMX86_DEBUG #define IOV_ASSERT(IOVEC, NUM_ENTRIES) IOV_Assert(IOVEC, NUM_ENTRIES) -EXTERN void IOV_Assert(struct iovec *iov, // IN: iovector - uint32 numEntries); // IN: # of entries in 'iov' +void IOV_Assert(struct iovec *iov, // IN: iovector + uint32 numEntries); // IN: # of entries in 'iov' #else #define IOV_ASSERT(IOVEC, NUM_ENTRIES) ((void) 0) #endif diff --git a/open-vm-tools/lib/include/msg.h b/open-vm-tools/lib/include/msg.h index 9667150c3..b438e4819 100644 --- a/open-vm-tools/lib/include/msg.h +++ b/open-vm-tools/lib/include/msg.h @@ -111,85 +111,90 @@ VMX86_EXTERN_DATA Msg_String const Msg_RetryCancelButtons[]; VMX86_EXTERN_DATA Msg_String const Msg_OKCancelButtons[]; VMX86_EXTERN_DATA Msg_String const Msg_RetryAbortButtons[]; -EXTERN Msg_String const Msg_Severities[]; +extern Msg_String const Msg_Severities[]; /* * Functions */ -EXTERN void Msg_Append(const char *idFmt, ...) - PRINTF_DECL(1, 2); -EXTERN void Msg_AppendStr(const char *id); -EXTERN void Msg_Post(MsgSeverity severity, const char *idFmt, ...) - PRINTF_DECL(2, 3); -EXTERN void Msg_PostMsgList(MsgSeverity severity, const MsgList *msgs); - -EXTERN char *Msg_Format(const char *idFmt, ...) - PRINTF_DECL(1, 2); -EXTERN char *Msg_VFormat(const char *idFmt, va_list arguments); -EXTERN unsigned Msg_Question(Msg_String const *buttons, - int defaultAnswer, const char *idFmt, ...) - PRINTF_DECL(3, 4); -EXTERN void Msg_AppendMsgList(const MsgList *msgs); +void Msg_Append(const char *idFmt, + ...) PRINTF_DECL(1, 2); +void Msg_AppendStr(const char *id); +void Msg_Post(MsgSeverity severity, + const char *idFmt, + ...) PRINTF_DECL(2, 3); +void Msg_PostMsgList(MsgSeverity severity, + const MsgList *msgs); + +char *Msg_Format(const char *idFmt, + ...) PRINTF_DECL(1, 2); +char *Msg_VFormat(const char *idFmt, + va_list arguments); +unsigned Msg_Question(Msg_String const *buttons, + int defaultAnswer, + const char *idFmt, ...) PRINTF_DECL(3, 4); +void Msg_AppendMsgList(const MsgList *msgs); /* * Unfortunately, gcc warns about both NULL and "" being passed as format * strings, and callers of Msg_Progress() like to do that. So I'm removing * the PRINTF_DECL() for now. --Jeremy. */ -EXTERN int Msg_Progress(int percentDone, Bool cancelButton, const char *idFmt, - ...); -EXTERN int Msg_ProgressScaled(int percentDone, int opsDone, int opsTotal, - Bool cancelButton); - -EXTERN void *Msg_LazyProgressStart(Bool allowCancel, - const char *idFmt, - ...) - PRINTF_DECL(2, 3); -EXTERN Bool Msg_LazyProgress(void *handle, - Bool allowCancel, - int percent, - const char *idFmt, - ...) - PRINTF_DECL(4, 5); -EXTERN void Msg_LazyProgressEnd(void *handle); - - -EXTERN HintResult Msg_Hint(Bool defaultShow, HintOptions options, - const char *idFmt, ...) - PRINTF_DECL(3, 4); -EXTERN HintResult Msg_HintMsgList(Bool defaultShow, HintOptions options, - MsgList *msg); -EXTERN int Msg_CompareAnswer(Msg_String const *buttons, unsigned answer, - const char *string); -EXTERN char *Msg_GetString(const char *idString); -EXTERN char *Msg_GetStringSafe(const char *idString); -EXTERN char *Msg_GetPlainButtonText(const char *idString); -EXTERN char *Msg_GetLocale(void); -EXTERN void Msg_SetLocale(const char *locale, const char *binaryName); -EXTERN void Msg_SetLocaleEx(const char *locale, const char *binaryName, - const char *baseDirPath); -EXTERN char *Msg_FormatFloat(double value, unsigned int precision); -EXTERN char *Msg_FormatSizeInBytes(uint64 size); -EXTERN Bool Msg_LoadMessageFile(const char *locale, const char *fileName); -EXTERN void Msg_ForceUnblock(void); +int Msg_Progress(int percentDone, Bool cancelButton, const char *idFmt, + ...); +int Msg_ProgressScaled(int percentDone, int opsDone, int opsTotal, + Bool cancelButton); + +void *Msg_LazyProgressStart(Bool allowCancel, + const char *idFmt, + ...) PRINTF_DECL(2, 3); + +Bool Msg_LazyProgress(void *handle, + Bool allowCancel, + int percent, + const char *idFmt, + ...) PRINTF_DECL(4, 5); + +void Msg_LazyProgressEnd(void *handle); + + +HintResult Msg_Hint(Bool defaultShow, + HintOptions options, + const char *idFmt, + ...) PRINTF_DECL(3, 4); + +HintResult Msg_HintMsgList(Bool defaultShow, HintOptions options, + MsgList *msg); +int Msg_CompareAnswer(Msg_String const *buttons, unsigned answer, + const char *string); +char *Msg_GetString(const char *idString); +char *Msg_GetStringSafe(const char *idString); +char *Msg_GetPlainButtonText(const char *idString); +char *Msg_GetLocale(void); +void Msg_SetLocale(const char *locale, const char *binaryName); +void Msg_SetLocaleEx(const char *locale, const char *binaryName, + const char *baseDirPath); +char *Msg_FormatFloat(double value, unsigned int precision); +char *Msg_FormatSizeInBytes(uint64 size); +Bool Msg_LoadMessageFile(const char *locale, const char *fileName); +void Msg_ForceUnblock(void); /* * Message buffer management */ -EXTERN const char *Msg_GetMessages(void); -EXTERN const char *Msg_GetMessagesAndReset(void); -EXTERN void Msg_LogAndReset(void); -EXTERN MsgList *Msg_GetMsgList(void); -EXTERN MsgList *Msg_GetMsgListAndReset(void); -EXTERN char *Msg_LocalizeList(const MsgList *messages); -EXTERN void Msg_Reset(Bool log); -EXTERN Bool Msg_Present(void); -EXTERN void Msg_ExitThread(void); -EXTERN void Msg_Exit(void); +const char *Msg_GetMessages(void); +const char *Msg_GetMessagesAndReset(void); +void Msg_LogAndReset(void); +MsgList *Msg_GetMsgList(void); +MsgList *Msg_GetMsgListAndReset(void); +char *Msg_LocalizeList(const MsgList *messages); +void Msg_Reset(Bool log); +Bool Msg_Present(void); +void Msg_ExitThread(void); +void Msg_Exit(void); /* @@ -224,11 +229,11 @@ EXTERN void Msg_Exit(void); * To implement message dialogs */ -EXTERN void Msg_SetCallback(MsgCallback *cb); -EXTERN void Msg_SetThreadCallback(MsgCallback *cb); +void Msg_SetCallback(MsgCallback *cb); +void Msg_SetThreadCallback(MsgCallback *cb); -EXTERN void Msg_GetCallback(MsgCallback *cb); -EXTERN void Msg_GetThreadCallback(MsgCallback *cb); +void Msg_GetCallback(MsgCallback *cb); +void Msg_GetThreadCallback(MsgCallback *cb); /* @@ -240,7 +245,7 @@ EXTERN void Msg_GetThreadCallback(MsgCallback *cb); Err_Errno2String(errorNumber) ) #ifdef _WIN32 -EXTERN const char *Msg_HResult2String(long hr); +const char *Msg_HResult2String(long hr); #endif #endif // ifndef _MSG_H_ diff --git a/open-vm-tools/lib/include/msgList.h b/open-vm-tools/lib/include/msgList.h index 943496c0e..5461b9efc 100644 --- a/open-vm-tools/lib/include/msgList.h +++ b/open-vm-tools/lib/include/msgList.h @@ -54,19 +54,19 @@ struct MsgList { * Functions */ -EXTERN MsgList *MsgList_Create(const char *idFmt, ...); -EXTERN MsgList *MsgList_VCreate(const char *idFmt, va_list args); -EXTERN MsgList *MsgList_CreateStr(const char *id); +MsgList *MsgList_Create(const char *idFmt, ...); +MsgList *MsgList_VCreate(const char *idFmt, va_list args); +MsgList *MsgList_CreateStr(const char *id); -EXTERN void MsgList_Append(MsgList **tail, const char *idFmt, ...); -EXTERN void MsgList_VAppend(MsgList **tail, const char *idFmt, va_list args); -EXTERN void MsgList_AppendStr(MsgList **tail, const char *id); +void MsgList_Append(MsgList **tail, const char *idFmt, ...); +void MsgList_VAppend(MsgList **tail, const char *idFmt, va_list args); +void MsgList_AppendStr(MsgList **tail, const char *id); -EXTERN void MsgList_Log(const MsgList *messages); -EXTERN char *MsgList_ToString(const MsgList *messages); -EXTERN MsgList *MsgList_Copy(const MsgList *src); -EXTERN void MsgList_Free(MsgList *messages); +void MsgList_Log(const MsgList *messages); +char *MsgList_ToString(const MsgList *messages); +MsgList *MsgList_Copy(const MsgList *src); +void MsgList_Free(MsgList *messages); -EXTERN const char *MsgList_GetMsgID(const MsgList *messages); +const char *MsgList_GetMsgID(const MsgList *messages); #endif // ifndef _MSGLIST_H_ diff --git a/open-vm-tools/lib/include/panic.h b/open-vm-tools/lib/include/panic.h index 969aff983..31b453e2b 100644 --- a/open-vm-tools/lib/include/panic.h +++ b/open-vm-tools/lib/include/panic.h @@ -33,7 +33,7 @@ * Initialize module to read custom behavior from config files. */ -EXTERN void Panic_Init(void); +void Panic_Init(void); /* * If you want the Panic module to just handle everything: implement Panic() @@ -42,41 +42,41 @@ EXTERN void Panic_Init(void); * desired and get the default implementation of each feature. */ -EXTERN NORETURN void Panic_Panic(const char *format, va_list args); +NORETURN void Panic_Panic(const char *format, va_list args); /* * On panic, post a UI dialog about the panic and how to diagnose it: */ -EXTERN void Panic_SetPanicMsgPost(Bool postMsg); -EXTERN Bool Panic_GetPanicMsgPost(void); -EXTERN void Panic_PostPanicMsg(const char *format, ...); +void Panic_SetPanicMsgPost(Bool postMsg); +Bool Panic_GetPanicMsgPost(void); +void Panic_PostPanicMsg(const char *format, ...); /* * On panic, break into a debugger or enter an infinite loop until a * debugger stops it: */ -EXTERN void Panic_SetBreakOnPanic(Bool breakOnPanic); -EXTERN Bool Panic_GetBreakOnPanic(void); -EXTERN void Panic_BreakOnPanic(void); -EXTERN void Panic_LoopOnPanic(void); +void Panic_SetBreakOnPanic(Bool breakOnPanic); +Bool Panic_GetBreakOnPanic(void); +void Panic_BreakOnPanic(void); +void Panic_LoopOnPanic(void); /* * On panic, dump core; Panic is also the place where various pieces of * back end stash information about the core dump. */ -EXTERN void Panic_SetCoreDumpOnPanic(Bool dumpCore); -EXTERN Bool Panic_GetCoreDumpOnPanic(void); -EXTERN void Panic_SetCoreDumpFileName(const char *fileName); -EXTERN int Panic_GetCoreDumpFlags(void); -EXTERN void Panic_SetCoreDumpFlags(int flags); +void Panic_SetCoreDumpOnPanic(Bool dumpCore); +Bool Panic_GetCoreDumpOnPanic(void); +void Panic_SetCoreDumpFileName(const char *fileName); +int Panic_GetCoreDumpFlags(void); +void Panic_SetCoreDumpFlags(int flags); /* * Extra debugging information that Panic module knows how to dump. */ -EXTERN void Panic_DumpGuiResources(void); +void Panic_DumpGuiResources(void); #endif // _PANIC_H_ diff --git a/open-vm-tools/lib/include/str.h b/open-vm-tools/lib/include/str.h index dfec5e395..2a33cb0df 100644 --- a/open-vm-tools/lib/include/str.h +++ b/open-vm-tools/lib/include/str.h @@ -88,30 +88,30 @@ */ #ifdef HAS_BSD_PRINTF -EXTERN int Str_Sprintf_C_Locale(char *buf, size_t max, - const char *fmt, ...) PRINTF_DECL(3, 4); +int Str_Sprintf_C_Locale(char *buf, size_t max, + const char *fmt, ...) PRINTF_DECL(3, 4); #endif -EXTERN int Str_Sprintf(char *buf, size_t max, - const char *fmt, ...) PRINTF_DECL(3, 4); -EXTERN int Str_Snprintf(char *buf, size_t len, - const char *fmt, ...) PRINTF_DECL(3, 4); -EXTERN int Str_Vsnprintf(char *buf, size_t len, - const char *fmt, va_list args); -EXTERN size_t Str_Strlen(const char *src, size_t maxLen); -EXTERN char *Str_Strnstr(const char *src, const char *sub, size_t n); -EXTERN char *Str_Strcpy(char *dst, const char *src, size_t maxLen); -EXTERN char *Str_Strcat(char *dst, const char *src, size_t maxLen); -EXTERN char *Str_Strncat(char *buf, size_t bufSize, const char *src, size_t n); - -EXTERN char *Str_Asprintf(size_t *length, - const char *format, ...) PRINTF_DECL(2, 3); -EXTERN char *Str_Vasprintf(size_t *length, const char *format, - va_list arguments); -EXTERN char *Str_SafeAsprintf(size_t *length, - const char *format, ...) PRINTF_DECL(2, 3); -EXTERN char *Str_SafeVasprintf(size_t *length, const char *format, - va_list arguments); +int Str_Sprintf(char *buf, size_t max, + const char *fmt, ...) PRINTF_DECL(3, 4); +int Str_Snprintf(char *buf, size_t len, + const char *fmt, ...) PRINTF_DECL(3, 4); +int Str_Vsnprintf(char *buf, size_t len, + const char *fmt, va_list args); +size_t Str_Strlen(const char *src, size_t maxLen); +char *Str_Strnstr(const char *src, const char *sub, size_t n); +char *Str_Strcpy(char *dst, const char *src, size_t maxLen); +char *Str_Strcat(char *dst, const char *src, size_t maxLen); +char *Str_Strncat(char *buf, size_t bufSize, const char *src, size_t n); + +char *Str_Asprintf(size_t *length, + const char *format, ...) PRINTF_DECL(2, 3); +char *Str_Vasprintf(size_t *length, const char *format, + va_list arguments); +char *Str_SafeAsprintf(size_t *length, + const char *format, ...) PRINTF_DECL(2, 3); +char *Str_SafeVasprintf(size_t *length, const char *format, + va_list arguments); #if defined(_WIN32) || defined(__linux__) // { @@ -128,25 +128,25 @@ EXTERN char *Str_SafeVasprintf(size_t *length, const char *format, * strings of "wchar_t" units, regardless of platform. */ -EXTERN int Str_Swprintf(wchar_t *buf, size_t max, - const wchar_t *fmt, ...); -EXTERN int Str_Snwprintf(wchar_t *buf, size_t len, - const wchar_t *fmt, ...); -EXTERN int Str_Vsnwprintf(wchar_t *buf, size_t len, - const wchar_t *fmt, va_list args); -EXTERN wchar_t *Str_Wcscpy(wchar_t *dst, const wchar_t *src, size_t maxLen); -EXTERN wchar_t *Str_Wcscat(wchar_t *dst, const wchar_t *src, size_t maxLen); -EXTERN wchar_t *Str_Wcsncat(wchar_t *buf, size_t bufSize, const wchar_t *src, - size_t n); - -EXTERN wchar_t *Str_Aswprintf(size_t *length, - const wchar_t *format, ...); -EXTERN wchar_t *Str_Vaswprintf(size_t *length, const wchar_t *format, - va_list arguments); -EXTERN wchar_t *Str_SafeAswprintf(size_t *length, - const wchar_t *format, ...); -EXTERN wchar_t *Str_SafeVaswprintf(size_t *length, const wchar_t *format, - va_list arguments); +int Str_Swprintf(wchar_t *buf, size_t max, + const wchar_t *fmt, ...); +int Str_Snwprintf(wchar_t *buf, size_t len, + const wchar_t *fmt, ...); +int Str_Vsnwprintf(wchar_t *buf, size_t len, + const wchar_t *fmt, va_list args); +wchar_t *Str_Wcscpy(wchar_t *dst, const wchar_t *src, size_t maxLen); +wchar_t *Str_Wcscat(wchar_t *dst, const wchar_t *src, size_t maxLen); +wchar_t *Str_Wcsncat(wchar_t *buf, size_t bufSize, const wchar_t *src, + size_t n); + +wchar_t *Str_Aswprintf(size_t *length, + const wchar_t *format, ...); +wchar_t *Str_Vaswprintf(size_t *length, const wchar_t *format, + va_list arguments); +wchar_t *Str_SafeAswprintf(size_t *length, + const wchar_t *format, ...); +wchar_t *Str_SafeVaswprintf(size_t *length, const wchar_t *format, + va_list arguments); unsigned char *Str_Mbscpy(char *buf, const char *src, size_t maxSize); diff --git a/open-vm-tools/lib/include/timeutil.h b/open-vm-tools/lib/include/timeutil.h index fd1632fef..e9b4b813a 100644 --- a/open-vm-tools/lib/include/timeutil.h +++ b/open-vm-tools/lib/include/timeutil.h @@ -86,50 +86,50 @@ typedef struct TimeUtil_Expiration { } TimeUtil_Expiration; -EXTERN time_t TimeUtil_MakeTime(const TimeUtil_Date *d); +time_t TimeUtil_MakeTime(const TimeUtil_Date *d); -EXTERN Bool TimeUtil_StringToDate(TimeUtil_Date *d, // IN/OUT - char const *date); // IN: 'YYYYMMDD' or 'YYYY/MM/DD' or 'YYYY-MM-DD' +Bool TimeUtil_StringToDate(TimeUtil_Date *d, // IN/OUT + char const *date); // IN: 'YYYYMMDD' or 'YYYY/MM/DD' or 'YYYY-MM-DD' -EXTERN Bool TimeUtil_DaysSubtract(TimeUtil_Date *d, // IN/OUT - unsigned int nr); // IN +Bool TimeUtil_DaysSubtract(TimeUtil_Date *d, // IN/OUT + unsigned int nr); // IN -EXTERN int TimeUtil_DeltaDays(TimeUtil_Date const *left, // IN - TimeUtil_Date const *right); // IN +int TimeUtil_DeltaDays(TimeUtil_Date const *left, // IN + TimeUtil_Date const *right); // IN -EXTERN void TimeUtil_DaysAdd(TimeUtil_Date *d, // IN/OUT - unsigned int nr); // IN +void TimeUtil_DaysAdd(TimeUtil_Date *d, // IN/OUT + unsigned int nr); // IN -EXTERN void TimeUtil_PopulateWithCurrent(Bool local, // IN - TimeUtil_Date *d); // OUT +void TimeUtil_PopulateWithCurrent(Bool local, // IN + TimeUtil_Date *d); // OUT -EXTERN void TimeUtil_GetTimeOfDay(TimeUtil_TimeOfDay *d); // OUT +void TimeUtil_GetTimeOfDay(TimeUtil_TimeOfDay *d); // OUT -EXTERN unsigned int TimeUtil_DaysLeft(TimeUtil_Date const *d); // IN +unsigned int TimeUtil_DaysLeft(TimeUtil_Date const *d); // IN -EXTERN Bool TimeUtil_ExpirationLowerThan(TimeUtil_Expiration const *left, // IN - TimeUtil_Expiration const *right); // IN +Bool TimeUtil_ExpirationLowerThan(TimeUtil_Expiration const *left, // IN + TimeUtil_Expiration const *right); // IN -EXTERN Bool TimeUtil_DateLowerThan(TimeUtil_Date const *left, // IN - TimeUtil_Date const *right); // IN +Bool TimeUtil_DateLowerThan(TimeUtil_Date const *left, // IN + TimeUtil_Date const *right); // IN -EXTERN void TimeUtil_ProductExpiration(TimeUtil_Expiration *e); // OUT +void TimeUtil_ProductExpiration(TimeUtil_Expiration *e); // OUT -EXTERN char * TimeUtil_GetTimeFormat(int64 utcTime, // IN - Bool showDate, // IN - Bool showTime); // IN +char * TimeUtil_GetTimeFormat(int64 utcTime, // IN + Bool showDate, // IN + Bool showTime); // IN -EXTERN int TimeUtil_NtTimeToUnixTime(struct timespec *unixTime, // OUT - VmTimeType ntTime); // IN +int TimeUtil_NtTimeToUnixTime(struct timespec *unixTime, // OUT + VmTimeType ntTime); // IN -EXTERN VmTimeType TimeUtil_UnixTimeToNtTime(struct timespec unixTime); // IN +VmTimeType TimeUtil_UnixTimeToNtTime(struct timespec unixTime); // IN #ifdef _WIN32 -EXTERN Bool TimeUtil_UTCTimeToSystemTime(const __time64_t utcTime, // IN - SYSTEMTIME *systemTime); // OUT +Bool TimeUtil_UTCTimeToSystemTime(const __time64_t utcTime, // IN + SYSTEMTIME *systemTime); // OUT #endif -EXTERN int TimeUtil_GetLocalWindowsTimeZoneIndexAndName(char **ptzName); +int TimeUtil_GetLocalWindowsTimeZoneIndexAndName(char **ptzName); #endif // _TIMEUTIL_H_ diff --git a/open-vm-tools/lib/include/util.h b/open-vm-tools/lib/include/util.h index d79bdf81f..09dfc9f54 100644 --- a/open-vm-tools/lib/include/util.h +++ b/open-vm-tools/lib/include/util.h @@ -61,39 +61,39 @@ typedef pid_t Util_ThreadID; #endif -EXTERN uint32 CRC_Compute(const uint8 *buf, int len); -EXTERN uint32 Util_Checksum32(const uint32 *buf, int len); -EXTERN uint32 Util_Checksum(const uint8 *buf, int len); -EXTERN uint32 Util_Checksumv(void *iov, int numEntries); -EXTERN uint32 Util_HashString(const char *str); -EXTERN Unicode Util_ExpandString(ConstUnicode fileName); -EXTERN void Util_ExitThread(int); -EXTERN NORETURN void Util_ExitProcessAbruptly(int); -EXTERN int Util_HasAdminPriv(void); +uint32 CRC_Compute(const uint8 *buf, int len); +uint32 Util_Checksum32(const uint32 *buf, int len); +uint32 Util_Checksum(const uint8 *buf, int len); +uint32 Util_Checksumv(void *iov, int numEntries); +uint32 Util_HashString(const char *str); +Unicode Util_ExpandString(ConstUnicode fileName); +void Util_ExitThread(int); +NORETURN void Util_ExitProcessAbruptly(int); +int Util_HasAdminPriv(void); #if defined _WIN32 && defined USERLEVEL -EXTERN int Util_TokenHasAdminPriv(HANDLE token); -EXTERN int Util_TokenHasInteractPriv(HANDLE token); +int Util_TokenHasAdminPriv(HANDLE token); +int Util_TokenHasInteractPriv(HANDLE token); #endif -EXTERN Bool Util_Data2Buffer(char *buf, size_t bufSize, const void *data0, - size_t dataSize); -EXTERN char *Util_GetCanonicalPath(const char *path); +Bool Util_Data2Buffer(char *buf, size_t bufSize, const void *data0, + size_t dataSize); +char *Util_GetCanonicalPath(const char *path); #ifdef _WIN32 -EXTERN char *Util_CompatGetCanonicalPath(const char *path); -EXTERN char *Util_GetCanonicalPathForHash(const char *path); -EXTERN char *Util_CompatGetLowerCaseCanonicalPath(const char* path); +char *Util_CompatGetCanonicalPath(const char *path); +char *Util_GetCanonicalPathForHash(const char *path); +char *Util_CompatGetLowerCaseCanonicalPath(const char* path); #endif -EXTERN int Util_BumpNoFds(uint32 *cur, uint32 *wanted); -EXTERN Bool Util_CanonicalPathsIdentical(const char *path1, const char *path2); -EXTERN Bool Util_IsAbsolutePath(const char *path); -EXTERN unsigned Util_GetPrime(unsigned n0); -EXTERN Util_ThreadID Util_GetCurrentThreadId(void); +int Util_BumpNoFds(uint32 *cur, uint32 *wanted); +Bool Util_CanonicalPathsIdentical(const char *path1, const char *path2); +Bool Util_IsAbsolutePath(const char *path); +unsigned Util_GetPrime(unsigned n0); +Util_ThreadID Util_GetCurrentThreadId(void); -EXTERN char *Util_DeriveFileName(const char *source, - const char *name, - const char *ext); +char *Util_DeriveFileName(const char *source, + const char *name, + const char *ext); -EXTERN char *Util_CombineStrings(char **sources, int count); -EXTERN char **Util_SeparateStrings(char *source, int *count); +char *Util_CombineStrings(char **sources, int count); +char **Util_SeparateStrings(char *source, int *count); typedef struct UtilSingleUseResource UtilSingleUseResource; UtilSingleUseResource *Util_SingleUseAcquire(const char *name); @@ -101,7 +101,7 @@ void Util_SingleUseRelease(UtilSingleUseResource *res); #if defined(__linux__) || defined(__FreeBSD__) || defined(sun) -EXTERN Bool Util_GetProcessName(pid_t pid, char *bufOut, size_t bufOutSize); +Bool Util_GetProcessName(pid_t pid, char *bufOut, size_t bufOutSize); #endif // backtrace functions and utilities @@ -151,8 +151,8 @@ Bool Util_QueryCStResidency(uint32 *numCpus, uint32 *numCStates, /* * In util_shared.h */ -EXTERN Bool Util_Throttle(uint32 count); -EXTERN uint32 Util_FastRand(uint32 seed); +Bool Util_Throttle(uint32 count); +uint32 Util_FastRand(uint32 seed); /* @@ -255,8 +255,8 @@ Util_BufferIsEmpty(void const *base, // IN: } -EXTERN Bool Util_MakeSureDirExistsAndAccessible(char const *path, - unsigned int mode); +Bool Util_MakeSureDirExistsAndAccessible(char const *path, + unsigned int mode); #if _WIN32 # define DIRSEPS "\\" @@ -307,25 +307,25 @@ EXTERN Bool Util_MakeSureDirExistsAndAccessible(char const *path, *-------------------------------------------------------------------------- */ -EXTERN void *UtilSafeMalloc0(size_t size); -EXTERN void *UtilSafeMalloc1(size_t size, - int bugNumber, const char *file, int lineno); +void *UtilSafeMalloc0(size_t size); +void *UtilSafeMalloc1(size_t size, + int bugNumber, const char *file, int lineno); -EXTERN void *UtilSafeRealloc0(void *ptr, size_t size); -EXTERN void *UtilSafeRealloc1(void *ptr, size_t size, - int bugNumber, const char *file, int lineno); +void *UtilSafeRealloc0(void *ptr, size_t size); +void *UtilSafeRealloc1(void *ptr, size_t size, + int bugNumber, const char *file, int lineno); -EXTERN void *UtilSafeCalloc0(size_t nmemb, size_t size); -EXTERN void *UtilSafeCalloc1(size_t nmemb, size_t size, - int bugNumber, const char *file, int lineno); +void *UtilSafeCalloc0(size_t nmemb, size_t size); +void *UtilSafeCalloc1(size_t nmemb, size_t size, + int bugNumber, const char *file, int lineno); -EXTERN char *UtilSafeStrdup0(const char *s); -EXTERN char *UtilSafeStrdup1(const char *s, - int bugNumber, const char *file, int lineno); +char *UtilSafeStrdup0(const char *s); +char *UtilSafeStrdup1(const char *s, + int bugNumber, const char *file, int lineno); -EXTERN char *UtilSafeStrndup0(const char *s, size_t n); -EXTERN char *UtilSafeStrndup1(const char *s, size_t n, - int bugNumber, const char *file, int lineno); +char *UtilSafeStrndup0(const char *s, size_t n); +char *UtilSafeStrndup1(const char *s, size_t n, + int bugNumber, const char *file, int lineno); /* * Debug builds carry extra arguments into the allocation functions for @@ -398,7 +398,7 @@ EXTERN char *UtilSafeStrndup1(const char *s, size_t n, #endif /* VMX86_DEBUG */ -EXTERN void *Util_Memcpy(void *dest, const void *src, size_t count); +void *Util_Memcpy(void *dest, const void *src, size_t count); /* diff --git a/open-vm-tools/services/plugins/dndcp/dnd/dnd.h b/open-vm-tools/services/plugins/dndcp/dnd/dnd.h index 6000fa35d..e3e19bde3 100644 --- a/open-vm-tools/services/plugins/dndcp/dnd/dnd.h +++ b/open-vm-tools/services/plugins/dndcp/dnd/dnd.h @@ -203,52 +203,52 @@ typedef struct DnDBlockControl { /* * Windows-specific functions */ -EXTERN Unicode DnD_GetClipboardFormatName(UINT cf); -EXTERN HGLOBAL DnD_CopyStringToGlobal(ConstUnicode str); -EXTERN HGLOBAL DnD_CopyDWORDToGlobal(DWORD *pDWORD); -EXTERN HGLOBAL DnD_CreateHDrop(ConstUnicode path, ConstUnicode fileList); -EXTERN HGLOBAL DnD_CreateHDropForGuest(ConstUnicode path, - ConstUnicode fileList); -EXTERN size_t DnD_CPStringToLocalString(ConstUnicode bufIn, - utf16_t **bufOut); -EXTERN size_t DnD_LocalStringToCPString(utf16_t *bufIn, - char **bufOut); -EXTERN Bool DnD_SetCPClipboardFromLocalText(CPClipboard *clip, - utf16_t *bufIn); -EXTERN Bool DnD_SetCPClipboardFromLocalRtf(CPClipboard *clip, - char *bufIn); -EXTERN Bool DnD_SetCPClipboardFromBMPInfo(CPClipboard *clip, - const LPBITMAPINFOHEADER bmi, - DND_CPFORMAT fmt); -EXTERN Bool DnD_SetCPClipboardFromHBITMAP(CPClipboard *clip, - HBITMAP hBitmap, - DND_CPFORMAT fmt); -EXTERN Bool DnD_PNGToLocalFormat(const unsigned char *pngData, - unsigned int pngDataLen, - int pngReadFlags, - DynBuf *bmpData, - HBITMAP *hBitmap); -EXTERN Bool DnD_FakeMouseEvent(DWORD flag); -EXTERN Bool DnD_FakeMouseState(DWORD key, Bool isDown); -EXTERN Bool DnD_FakeEscapeKey(void); -EXTERN Bool DnD_DeleteLocalDirectory(ConstUnicode localDir); -EXTERN Bool DnD_SetClipboard(UINT format, char *buffer, int len); -EXTERN Bool DnD_GetFileList(HDROP hDrop, - char **remoteFiles, - int *remoteLength, - char **localFiles, - int *localLength, - uint64 *totalSize); +Unicode DnD_GetClipboardFormatName(UINT cf); +HGLOBAL DnD_CopyStringToGlobal(ConstUnicode str); +HGLOBAL DnD_CopyDWORDToGlobal(DWORD *pDWORD); +HGLOBAL DnD_CreateHDrop(ConstUnicode path, ConstUnicode fileList); +HGLOBAL DnD_CreateHDropForGuest(ConstUnicode path, + ConstUnicode fileList); +size_t DnD_CPStringToLocalString(ConstUnicode bufIn, + utf16_t **bufOut); +size_t DnD_LocalStringToCPString(utf16_t *bufIn, + char **bufOut); +Bool DnD_SetCPClipboardFromLocalText(CPClipboard *clip, + utf16_t *bufIn); +Bool DnD_SetCPClipboardFromLocalRtf(CPClipboard *clip, + char *bufIn); +Bool DnD_SetCPClipboardFromBMPInfo(CPClipboard *clip, + const LPBITMAPINFOHEADER bmi, + DND_CPFORMAT fmt); +Bool DnD_SetCPClipboardFromHBITMAP(CPClipboard *clip, + HBITMAP hBitmap, + DND_CPFORMAT fmt); +Bool DnD_PNGToLocalFormat(const unsigned char *pngData, + unsigned int pngDataLen, + int pngReadFlags, + DynBuf *bmpData, + HBITMAP *hBitmap); +Bool DnD_FakeMouseEvent(DWORD flag); +Bool DnD_FakeMouseState(DWORD key, Bool isDown); +Bool DnD_FakeEscapeKey(void); +Bool DnD_DeleteLocalDirectory(ConstUnicode localDir); +Bool DnD_SetClipboard(UINT format, char *buffer, int len); +Bool DnD_GetFileList(HDROP hDrop, + char **remoteFiles, + int *remoteLength, + char **localFiles, + int *localLength, + uint64 *totalSize); #else /* * Posix-specific functions */ -EXTERN char *DnD_UriListGetNextFile(char const *uriList, - size_t *index, - size_t *length); -EXTERN Bool DnD_UriIsNonFileSchemes(char const *uri); +char *DnD_UriListGetNextFile(char const *uriList, + size_t *index, + size_t *length); +Bool DnD_UriIsNonFileSchemes(char const *uri); #endif /*