summaryrefslogtreecommitdiff
path: root/mysys
diff options
context:
space:
mode:
authorunknown <miguel@hegel.txg.br>2004-08-24 10:40:20 -0300
committerunknown <miguel@hegel.txg.br>2004-08-24 10:40:20 -0300
commit9d1a9d72cba1aa828e631f520540411d7508a4e0 (patch)
tree1de898956c111f063c9ab200d92988c0961613ad /mysys
parent6212c6e7f5104e558065688cd2b3bafc31e0c487 (diff)
downloadmariadb-git-9d1a9d72cba1aa828e631f520540411d7508a4e0.tar.gz
Fix warning VC++ and fix applied fisrt to source 4.1
mysys/my_lib.c: Same fix for bug #4737 that wrongly I did first on tree 4.1 mysys/my_vsnprintf.c: Fix VC++ warning assuming that my_vsnprintf() is external BitKeeper/etc/logging_ok: Logging to logging@openlogging.org accepted
Diffstat (limited to 'mysys')
-rw-r--r--mysys/my_lib.c11
-rw-r--r--mysys/my_vsnprintf.c20
2 files changed, 9 insertions, 22 deletions
diff --git a/mysys/my_lib.c b/mysys/my_lib.c
index 0207d9a3683..055e00d2efc 100644
--- a/mysys/my_lib.c
+++ b/mysys/my_lib.c
@@ -461,17 +461,6 @@ MY_DIR *my_dir(const char *path, myf MyFlags)
else
finfo.mystat= NULL;
- /*
- If the directory is the root directory of the drive, Windows sometimes
- creates hidden or system files there (like RECYCLER); do not show
- them. We would need to see how this can be achieved with a Borland
- compiler.
- */
-#ifndef __BORLANDC__
- if (attrib & (_A_HIDDEN | _A_SYSTEM))
- continue;
-#endif
-
if (push_dynamic(dir_entries_storage, (gptr)&finfo))
goto error;
diff --git a/mysys/my_vsnprintf.c b/mysys/my_vsnprintf.c
index 289c21e1ea4..e7cc780060c 100644
--- a/mysys/my_vsnprintf.c
+++ b/mysys/my_vsnprintf.c
@@ -33,17 +33,6 @@
length of result string
*/
-int my_snprintf(char* to, size_t n, const char* fmt, ...)
-{
- int result;
- va_list args;
- va_start(args,fmt);
- result= my_vsnprintf(to, n, fmt, args);
- va_end(args);
- return result;
-}
-
-
int my_vsnprintf(char *to, size_t n, const char* fmt, va_list ap)
{
char *start=to, *end=to+n-1;
@@ -140,6 +129,15 @@ int my_vsnprintf(char *to, size_t n, const char* fmt, va_list ap)
return (uint) (to - start);
}
+int my_snprintf(char* to, size_t n, const char* fmt, ...)
+{
+ int result;
+ va_list args;
+ va_start(args,fmt);
+ result= my_vsnprintf(to, n, fmt, args);
+ va_end(args);
+ return result;
+}
#ifdef MAIN
#define OVERRUN_SENTRY 250