13 Commits

Author SHA1 Message Date
Bart Van Assche
6f49179491 Makefiles: Use -Wextra instead of -W
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9040 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-07-05 02:14:28 +00:00
Bart Van Assche
fda71c077d Include <poll.h> instead of <sys/poll.h>
According to the Single Unix Specification, the poll() function has been
declared in the <poll.h> header file. This makes the SCST code compatible
with the musl C library. See also https://en.wikipedia.org/wiki/Musl. See
also https://github.com/bvanassche/scst/issues/23.



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8992 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-05-31 03:41:17 +00:00
Bart Van Assche
22f1132073 Makefiles: Rework build mode switching
Move the build_mode file from the top level into the scst directory. Write
build mode defines into scst/include/build_mode.h and include that file
directly or indirectly in all source files that depend on these #defines.
This approach has the advantage that "make clean" does no longer has to
be run when switching between build modes because the kernel build system
recognizes build_mode.h as a dependency and triggers a rebuild of all
source files that directly or indirectly include the build_mode.h header
file.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8347 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-05-05 18:19:38 +00:00
Bart Van Assche
3002ba7652 usr/stpgd: Fix the perf build
Reported-by: Rob Turk <robtu@rtist.nl>


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8256 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-04-20 15:53:06 +00:00
Bart Van Assche
623d4e6d0a Makefiles: Use build_mode instead of modifying the Makefile when switching the build mode
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8074 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-03-25 19:53:39 +00:00
Bart Van Assche
81c9a1f49d make uninstall: Do not remove /usr/local/sbin
Reported-by: Heiner Lesaar <heiner.lesaar@googlemail.com>


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7998 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-03-01 04:15:01 +00:00
Bart Van Assche
e1b418938e usr/stpgd: Fix make install failure for relative DESTDIR
When DESTDIR is a relative path, make install fails to install
`scst_on_stpg` for not having created `$(DESTDIR)$(PREFIX)/bin/scst`.

When DESTDIR is an absolute path, make install doesn't fail to install
`scst_on_stpg` because usr/fileio has already created the directory.

usr/stpgd should explicitly create `$(DESTDIR)$(PREFIX)/bin/scst`
so that it can handle a relative DESTDIR, plus be independent of
usr/fileio installation.

--
 # cd usr
 # make install DESTDIR=./aaa
 cd fileio && make install
 make[1]: Entering directory '/tmp/scst/usr/fileio'
 install -d ./aaa/usr/local/bin/scst
 install -m 755 fileio_tgt ./aaa/usr/local/bin/scst
 make[1]: Leaving directory '/tmp/scst/usr/fileio'
 cd stpgd && make install
 make[1]: Entering directory '/tmp/scst/usr/stpgd'
 install -d ./aaa/usr/local/sbin
 install -m 700 stpgd ./aaa/usr/local/sbin
 install -m 700 scst_on_stpg ./aaa/usr/local/bin/scst/scst_on_stpg
 install: cannot create regular file './aaa/usr/local/bin/scst/scst_on_stpg': No such file or directory
 Makefile:60: recipe for target 'install' failed
 make[1]: *** [install] Error 1
 make[1]: Leaving directory '/tmp/scst/usr/stpgd'
 Makefile:32: recipe for target 'install' failed
 make: *** [install] Error 2

Signed-off-by: Tomohiro Kusumi <kusumi.tomohiro@osnexus.com>


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7403 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-06-04 16:23:45 +00:00
Bart Van Assche
9e35afe1e0 Annotate fall-through in switch statements in a form recognized by gcc 7
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7216 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2017-08-27 15:28:57 +00:00
Vladislav Bolkhovitin
a614104023 usr: fix -Wmissing-prototypes warnings
Fix all twelve [-Wmissing-prototypes] warnings by adding "static" to their
declarations.

Signed-off-by: David Butterfield <dab21774@gmail.com>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7202 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2017-06-01 04:08:02 +00:00
Vladislav Bolkhovitin
a23e34fb62 The argument to sleep() would get "promoted" to an integer with value zero.
-               sleep(0.1);
+               usleep(100*1000);

Signed-off-by: David Butterfield <dab21774@gmail.com>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7107 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2017-04-13 22:04:07 +00:00
Vladislav Bolkhovitin
dd3f46fd28 stpgd: Fix compilation in perf mode
Reported-by: TomK <tk@mdevsys.com>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6815 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2016-02-24 01:01:54 +00:00
Bart Van Assche
c7ed845936 user space code: Fix the code for generating a release archive
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6782 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2016-01-20 00:35:29 +00:00
Vladislav Bolkhovitin
ae38d284e0 Explicit ALUA user space
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6579 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2015-11-06 03:40:37 +00:00