fix: remove cur_name.h content to tdef.h and del cur_name.h

This commit is contained in:
Alex Duan 2025-02-13 13:00:46 +08:00
parent f4774273ee
commit 400254820c
12 changed files with 22 additions and 102 deletions

View File

@ -31,9 +31,6 @@
extern "C" {
#endif
#if defined(CUS_NAME) || defined(CUS_PROMPT) || defined(CUS_EMAIL)
#include "cus_name.h"
#endif
#ifdef WINDOWS

View File

@ -1,31 +0,0 @@
/*
* Copyright (c) 2019 TAOS Data, Inc. <jhtao@taosdata.com>
*
* This program is free software: you can use, redistribute, and/or modify
* it under the terms of the GNU Affero General Public License, version 3
* or later ("AGPL"), as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef _CUS_NAME_H_
#define _CUS_NAME_H_
#ifndef CUS_NAME
#define CUS_NAME "TDengine"
#endif
#ifndef CUS_PROMPT
#define CUS_PROMPT "taos"
#endif
#ifndef CUS_EMAIL
#define CUS_EMAIL "<support@taosdata.com>"
#endif
#endif // _CUS_NAME_H_

View File

@ -79,6 +79,10 @@ extern const int32_t TYPE_BYTES[21];
#define TSDB_DEFAULT_PASS "taosdata"
#endif
//
// support OEM
//
#ifndef TD_PRODUCT_NAME
#ifdef TD_ENTERPRISE
#define TD_PRODUCT_NAME "TDengine Enterprise Edition"
@ -87,6 +91,19 @@ extern const int32_t TYPE_BYTES[21];
#endif
#endif
#ifndef CUS_NAME
#define CUS_NAME "TDengine"
#endif
#ifndef CUS_PROMPT
#define CUS_PROMPT "taos"
#endif
#ifndef CUS_EMAIL
#define CUS_EMAIL "<support@taosdata.com>"
#endif
#define TSDB_TRUE 1
#define TSDB_FALSE 0
#define TSDB_OK 0

View File

@ -38,9 +38,6 @@
#include "tversion.h"
#include "tconv.h"
#if defined(CUS_NAME) || defined(CUS_PROMPT) || defined(CUS_EMAIL)
#include "cus_name.h"
#endif
#ifndef CUS_PROMPT
#define CUS_PROMPT "taos"

View File

@ -28,9 +28,6 @@
#include "tutil.h"
#if defined(CUS_NAME) || defined(CUS_PROMPT) || defined(CUS_EMAIL)
#include "cus_name.h"
#endif
#define CONFIG_PATH_LEN (TSDB_FILENAME_LEN + 12)
#define CONFIG_FILE_LEN (CONFIG_PATH_LEN + 32)

View File

@ -27,22 +27,8 @@
#include "dmUtil.h"
#include "tcs.h"
#include "qworker.h"
#include "tdef.h"
#if defined(CUS_NAME) || defined(CUS_PROMPT) || defined(CUS_EMAIL)
#include "cus_name.h"
#else
#ifndef CUS_NAME
#define CUS_NAME "TDengine"
#endif
#ifndef CUS_PROMPT
#define CUS_PROMPT "taos"
#endif
#ifndef CUS_EMAIL
#define CUS_EMAIL "<support@taosdata.com>"
#endif
#endif
// clang-format off
#define DM_APOLLO_URL "The apollo string to use when configuring the server, such as: -a 'jsonFile:./tests/cfg.json', cfg.json text can be '{\"fqdn\":\"td1\"}'."
#define DM_CFG_DIR "Configuration directory."

View File

@ -17,13 +17,6 @@
#include "os.h"
#include "taoserror.h"
#if defined(CUS_NAME) || defined(CUS_PROMPT) || defined(CUS_EMAIL)
#include "cus_name.h"
#else
#ifndef CUS_PROMPT
#define CUS_PROMPT "taos"
#endif
#endif
#define PROCESS_ITEM 12
#define UUIDLEN37 37

View File

@ -20,13 +20,6 @@
#include "shellInt.h"
#include "version.h"
#if defined(CUS_NAME) || defined(CUS_PROMPT) || defined(CUS_EMAIL)
#include "cus_name.h"
#else
#ifndef CUS_PROMPT
#define CUS_PROMPT "taos"
#endif
#endif
#define TAOS_CONSOLE_PROMPT_CONTINUE " -> "

View File

@ -38,6 +38,7 @@
#include <taos.h>
#include <taoserror.h>
#include <tdef.h>
#include <toolsdef.h>
#ifdef WEBSOCKET
@ -49,22 +50,6 @@
// ---------------- define ----------------
//
#if defined(CUS_NAME) || defined(CUS_PROMPT) || defined(CUS_EMAIL)
#include <cus_name.h>
#else
#ifndef CUS_NAME
#define CUS_NAME "TDengine"
#endif
#ifndef CUS_PROMPT
#define CUS_PROMPT "taos"
#endif
#ifndef CUS_EMAIL
#define CUS_EMAIL "<support@taosdata.com>"
#endif
#endif
// use 256 as normal buffer length
#define BUFFER_LEN 256

View File

@ -10,7 +10,8 @@
* FITNESS FOR A PARTICULAR PURPOSE.
*/
#include <bench.h>
#include <tdef.h> // include/util/
#include <bench.h>
#include "benchLog.h"
#include <toolsdef.h>

View File

@ -21,23 +21,7 @@
#endif
#endif
extern char version[];
#if defined(CUS_NAME) || defined(CUS_PROMPT) || defined(CUS_EMAIL)
#include "cus_name.h"
#else
#ifndef CUS_NAME
#define CUS_NAME "TDengine"
#endif
#ifndef CUS_PROMPT
#define CUS_PROMPT "taos"
#endif
#ifndef CUS_EMAIL
#define CUS_EMAIL "<support@taosdata.com>"
#endif
#endif
#ifdef WINDOWS
char g_configDir[MAX_PATH_LEN] = {0}; // "C:\\TDengine\\cfg"};

View File

@ -11,6 +11,7 @@
#define _GNU_SOURCE
#include <tdef.h> // include/util/
#include "dump.h"
#include "dumpUtil.h"
#ifdef WEBSOCKET