mirror of
https://github.com/MariaDB/server.git
synced 2025-01-16 20:12:31 +01:00
b6cae0f647
backport things from 4.0. This is safe as the functions are not used! Fixed bug in new mutex handling in InnoDB Make allow_break() and dont_break() defines. Docs/manual.texi: Remove -fomit-frame-pointer from default binaries configure.in: Use -lcma library on HPUX include/my_sys.h: Added functions for symbolic link handling to make it possible to backport things from 4.0. (This is safe as the functions are not used!) include/mysys_err.h: Error messages for symlink functions. innobase/include/sync0sync.ic: Fixed bug in new mutex handling mysys/Makefile.am: Symlink handling mysys/errors.c: Symlink handling mysys/mf_brkhant.c: Make allow_break() and dont_break() defines. sql/sql_select.h: Fix for Intel compiler. BitKeeper/etc/logging_ok: Logging to logging@openlogging.org accepted
74 lines
2 KiB
C
74 lines
2 KiB
C
/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
|
|
|
|
This library is free software; you can redistribute it and/or
|
|
modify it under the terms of the GNU Library General Public
|
|
License as published by the Free Software Foundation; either
|
|
version 2 of the License, or (at your option) any later version.
|
|
|
|
This library 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. See the GNU
|
|
Library General Public License for more details.
|
|
|
|
You should have received a copy of the GNU Library General Public
|
|
License along with this library; if not, write to the Free
|
|
Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
|
|
MA 02111-1307, USA */
|
|
|
|
/* Dont let the user break when you are doing something important */
|
|
/* Remembers if it got 'SIGINT' and executes it on allow_break */
|
|
/* A static buffer is used; don't call dont_break() twice in a row */
|
|
|
|
#include "mysys_priv.h"
|
|
#include "my_static.h"
|
|
|
|
/* Set variable that we can't break */
|
|
|
|
#if !defined(THREAD)
|
|
void dont_break(void)
|
|
{
|
|
my_dont_interrupt=1;
|
|
return;
|
|
} /* dont_break */
|
|
|
|
void allow_break(void)
|
|
{
|
|
{
|
|
reg1 int index;
|
|
|
|
my_dont_interrupt=0;
|
|
if (_my_signals)
|
|
{
|
|
if (_my_signals > MAX_SIGNALS)
|
|
_my_signals=MAX_SIGNALS;
|
|
for (index=0 ; index < _my_signals ; index++)
|
|
{
|
|
if (_my_sig_remember[index].func) /* Safequard */
|
|
{
|
|
(*_my_sig_remember[index].func)(_my_sig_remember[index].number);
|
|
_my_sig_remember[index].func=0;
|
|
}
|
|
}
|
|
_my_signals=0;
|
|
}
|
|
}
|
|
} /* dont_break */
|
|
#endif
|
|
|
|
/* Set old status */
|
|
|
|
#if !defined(THREAD)
|
|
void my_remember_signal(int signal_number, sig_handler (*func) (int))
|
|
{
|
|
#ifndef __WIN__
|
|
reg1 int index;
|
|
|
|
index=_my_signals++; /* Nobody can break a ++ ? */
|
|
if (index < MAX_SIGNALS)
|
|
{
|
|
_my_sig_remember[index].number=signal_number;
|
|
_my_sig_remember[index].func=func;
|
|
}
|
|
#endif /* __WIN__ */
|
|
} /* my_remember_signal */
|
|
#endif /* THREAD */
|