Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
G
gdut-drcom
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nanahira
gdut-drcom
Commits
25ab5979
Commit
25ab5979
authored
Dec 12, 2016
by
chenhaowen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: version marco expand error
parent
8883866c
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
11 deletions
+11
-11
src/config.c
src/config.c
+1
-5
src/config.h
src/config.h
+8
-0
src/gdut-drcom.c
src/gdut-drcom.c
+2
-6
No files found.
src/config.c
View file @
25ab5979
...
...
@@ -5,10 +5,6 @@
#include <unistd.h>
#include <getopt.h>
#ifndef VERSION
#define VERSION 0.0.0
#endif
struct
option_s
{
char
key
[
256
];
char
value
[
256
];
...
...
@@ -46,7 +42,7 @@ void set_enable_crypt(int enable)
void
get_version
(
char
*
version
)
{
strcpy
(
version
,
"VERSION"
);
strcpy
(
version
,
_VERSION
);
}
void
set_log_file
(
char
*
log_file
,
int
len
)
...
...
src/config.h
View file @
25ab5979
...
...
@@ -3,6 +3,14 @@
#include <stdio.h>
#ifndef VERSION
#define VERSION 0.0.0
#endif
#define _VERSION __VERSION(VERSION)
#define __VERSION(str) ___VERSION(str)
#define ___VERSION(str) #str
enum
CRYPT_TYPE
{
DISABLE_CRYPT
=
0
,
ENABLE_CRYPT
=
1
,
...
...
src/gdut-drcom.c
View file @
25ab5979
...
...
@@ -5,10 +5,6 @@
#include "auth.h"
#include "config.h"
#ifndef VERSION
#define VERSION 0.0.0
#endif
static
void
print_help
(
char
*
name
);
int
main
(
int
argc
,
char
*
argv
[])
...
...
@@ -67,7 +63,7 @@ int main(int argc, char *argv[])
exit
(
0
);
break
;
case
'v'
:
fprintf
(
stdout
,
"version: %s
\n
"
,
"VERSION"
);
fprintf
(
stdout
,
"version: %s
\n
"
,
_VERSION
);
exit
(
0
);
break
;
case
'l'
:
...
...
@@ -107,7 +103,7 @@ static void print_help(char *name)
" /___/ "
);
fprintf
(
stdout
,
"A third-party drcom client for gdut. version %s
\n
"
,
"VERSION"
);
fprintf
(
stdout
,
"A third-party drcom client for gdut. version %s
\n
"
,
_VERSION
);
fprintf
(
stdout
,
"usage:
\n
"
);
fprintf
(
stdout
,
" %s
\n
"
,
name
);
fprintf
(
stdout
,
" --remote-ip <ip addr> The server ip.
\n
"
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment